Google maps not working, how to configure Google Api Key?

Phoca Maps - displaying maps in Joomla! CMS
nkamp
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 24 Nov 2018, 17:34

Google maps not working, how to configure Google Api Key?

Post by nkamp »

Hello,

This driven me completely mad and insane. In the past I have had BT Google maps, but suddenly it doesn't work anymore on the volleybal site.
If I understand google has just free API's which are free. One of them is Google embed Maps. This is the only which I have made active.

I don't want to configure my billing information at Google and what I just want is a simple map with a marker with the address on it.

Here is a link https://www.innovatiemakelaars-wsv.nl/v ... ct-persoon by article, and here by module https://www.innovatiemakelaars-wsv.nl/contact.

I have now installed phoca google maps + plugin. I have these two plugin sugestions:
{phocamaps view=map|id=1}
or
{phocamaps view=link|id=1|text=Map}

The strange thing is the first on is on 'page', I see the border but no map. If I look at the console and than I see these two things:
  • ReferenceError: initMapPlgPM1 is not defined
The first message is jQuery error I think, but how to solve it?
But I'm 100% sure I have a API key, active... What is left? And why is the map shown/visible in the popu[ window?

I hope that somenone can give me the solution.

Nico
christine
Phoca Hero
Phoca Hero
Posts: 2737
Joined: 28 Nov 2010, 17:20

Re: Google maps not working, how to configure Google Api Key?

Post by christine »

Hi Nico,

check, if you have latest version of GM component & plugin.
API key: see similar thread (screenshot): viewtopic.php?f=38&t=59118

Kind regards
Christine
nkamp
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 24 Nov 2018, 17:34

Re: Google maps not working, how to configure Google Api Key?

Post by nkamp »

Hi Christine,

Ok thanks. I had not thought at the idea of 'backend --> Components --> Phoca Maps --> Control Panel --> Options --> Google Maps --> Google Maps API Key'.
I had read somewere I think that you had to fill in at Components --> Phoca Maps --> Maps --> tab advanced at the custom field to fill in there as a parameter 1: google Api Key. I been struggling there but it is working now.

Thanks,

Nico
nkamp
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 24 Nov 2018, 17:34

Re: Google maps not working, how to configure Google Api Key?

Post by nkamp »

Ok, I have one question:
It is working for "google open street map" but if I choose "Google maps" than it doesn't work.

Altough you can at a limit of visiters I don't want add a billing account at google. Why should I give them my Billing information if I put a limitation on the visitors? Reason: I don't want that google does have my credit card information etc.

But if I choose Google maps than "Google Embed maps API" is not enough, I suppose?
Than I need to activate the following API's as well:
  • Google Javascript API
  • Google Geocoding API
  • Google Maps directions API
But the "Google Javascript API", than an Google billing Account is necessary or ...? 'Now I don't have a billing account ant it works one time a per day I think. Is that right what I'm writing here? The second time you will gett "For development purpose only".

With regards,

Nico
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Google maps not working, how to configure Google Api Key?

Post by Jan »

Hi, to display Google maps, you should follow this guide:
https://www.phoca.cz/documents/53-phoca ... ps-api-key
And you need to have the billing account there (see guides directly on Google Maps documentation websites.

Jan
If you find Phoca extensions useful, please support the project
nkamp
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 24 Nov 2018, 17:34

Re: Google maps not working, how to configure Google Api Key?

Post by nkamp »

I have followed this guide and than Google maps embed API is working without a billing account at Google.

But for me it not clear when do I need billing account. And the other thing is I don't want to make a billing account at Google. Google knows enough from people!

Regards,

Nico
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Google maps not working, how to configure Google Api Key?

Post by Jan »

Hi, then you should switch to OpenStreetMap :idea: I think, your questions belong to Google Maps API developers, I am unfortunately not Google Maps API developer so cannot give any clue advices why they need billing account :-( :idea:

Jan
If you find Phoca extensions useful, please support the project
zontor
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 23 Jan 2019, 17:34

Re: Google maps not working, how to configure Google Api Key?

Post by zontor »

We are looking for something similar, as i check google Javascript API needs to have a billing account associated with google so we can use it.
Google Embed maps API does not.
Some joomla plugins/extensions have comming to give a option to configure what API do use, don't know what funcionalities may be limited in Phoca by using Google Embed maps API instead og Google Javascript API
If it works fine phoca devs may create a option to select Google Embed maps API instead og Google Javascript API, as another option like openstreet maps and so on.
Geocoding API and Directions API think don't need the billing associated tought don't know if they need Google Javascript API to work, but for simple maps that can use openstreetmaps too, an option to use Google Embed maps API will be great.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Google maps not working, how to configure Google Api Key?

Post by Jan »

Ok, I will take a look at it to see if there is some option possible to do :idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply