Map loads momentarily

Phoca Maps - displaying maps in Joomla! CMS
qpidity
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 12 Feb 2010, 19:53

Map loads momentarily

Post by qpidity »

Hi,

We've are using the plugin code in an article like this:

Code: Select all

{phocamaps view=link|id=3|text=View Map}


It has always worked but now suddenly we have an issue whereby the map loads momentarily in the modal window and then a second later we get the error message:
Oops! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.
I suspect this might be related to a change in google map policies but am not entirely sure. Would you have any ideas?

Joomla 2.5.28
Phocamaps component 2.0.6
Phocamaps plugin 2.0.5

I know J2.5 is out of date, we're almost ready to go with the J3.6 site but this has suddenly cropped up and we can't go for days without the map showing as it's very important for my client's business.

Thanks in advance and also for the brilliant extension.
qpidity
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 12 Feb 2010, 19:53

Re: Map loads momentarily

Post by qpidity »

I see in the javascript error console that it's due to a missing API key.
Google Maps API error: MissingKeyMapError
Google Maps API warning: NoApiKeys https://developers.google.com/maps/docu ... o-api-keys
I can't see where to add this in phocamaps options.

Grateful for any help.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Map loads momentarily

Post by Jan »

Hi, see this guide:
https://www.phoca.cz/documents/53-phoca- ... ps-api-key

The key then you add in Options of Phoca Maps.

Jan
If you find Phoca extensions useful, please support the project
qpidity
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 12 Feb 2010, 19:53

Re: Map loads momentarily

Post by qpidity »

Hi,

I don't have that option in our version of phocamaps options. I explained earlier that our version doesnt have an API key field.

Can I add it manually in the code until we have our J3.6 version live?
qpidity
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 12 Feb 2010, 19:53

Re: Map loads momentarily

Post by qpidity »

Hi again,

I've uploaded the new Joomla 3.6.0 site to my test server with latest phocamaps installed 3.0.4 and have added the API key to components > phocamaps > options. I created the new Browser API key here https://console.developers.google.com and that is the API key I added. I keep getting the same error with the map appearing and then disappearing almost as soon as it loads. In the javascript console I see the following errors:

Code: Select all

Google Maps API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
Your site URL to be authorized: http://mydomain.com/subdir/index.php?option=com_phocamaps&view=map&id=3:clonlea&tmpl=component
I added *.mydomain/* to the api key credentials.

Any idea why I keep getting this error? I can see the API callback but google just doesn't seem to associate it with the credentials I created in the console. This is actually starting to drive me a little nuts.

Any help appreciated.

Thanks in advance
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9451
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Map loads momentarily

Post by Benno »

Hi,
I added *.mydomain/* to the api key credentials.

Try to check your HTTP referrer again.
In my case the last asterisk (*) is missing, if I save the HTTP referrer, and I receive exactly your error message. (Till now, no idea why..)

Kind regards,
Benno
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9451
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Map loads momentarily

Post by Benno »

Hi,
some important steps to create the API key were added to the documentation:
https://www.phoca.cz/documents/53-phoca- ... ps-api-key

Kind regards,
Benno
Post Reply