MissingKeyMapError javascript error

Phoca Maps - displaying maps in Joomla! CMS
joaoserra69
Phoca Member
Phoca Member
Posts: 18
Joined: 08 Jul 2016, 00:05

Re: MissingKeyMapError javascript error

Post by joaoserra69 »

Bonsoir,

Est-ce que vous avez la solution???

Merci !!!!

Tags:
NNX
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 08 Jul 2016, 11:47

Re: MissingKeyMapError javascript error

Post by NNX »

Hi,

Here is a solution I've just coded. It's not perfect but it's working for me ! :wink:

In plugins/content/phocamaps/phocamaps.php line 185.

Replace:

Code: Select all

$tmpl['params'] 		= '{other_params:"language='.$mapp->lang.'"}';
By:

Code: Select all

$tmpl['params'] 		= '{other_params:"key=YOUR_API_KEY&language='.$mapp->lang.'"}';
I only use the plugin but I think the component can easily be fixed by forcing

Code: Select all

$this->t['params']
in components/com_phocamaps/views/map/tmpl/default.php (or in a substitution in your template) line 95

Code: Select all

echo $map->addAjaxAPI('maps', '3', $this->t['params']);
It's not a perfect solution but it may be useful while waiting for the offical patch in the next (?) version.

Hope this helps.

NNX
NNX
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 08 Jul 2016, 11:47

Re: MissingKeyMapError javascript error

Post by NNX »

Sorry I've missed the 2nd setting of $tmpl['params'] in plugins/content/phocamaps/phocamaps.php line 180!!!

Code: Select all

$tmpl['params'] 		= '';  
to replace by

Code: Select all

$tmpl['params'] 		= '{other_params:"key=YOUR_API_KEY"}';  
NNX
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47916
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: MissingKeyMapError javascript error

Post by Jan »

Hi,

please, update to the latest version (3.0.4): https://www.phoca.cz/news/890-phoca-maps-3-0-4-released

It should work OK now (including the API Key), see demo (3.0.4): https://www.phoca.cz/documents/53-phoca-maps ... izing-maps

Please, test it and let me know.

Thank you, Jan
If you find Phoca extensions useful, please support the project
Ronny
Phoca Professional
Phoca Professional
Posts: 211
Joined: 03 Nov 2009, 20:31
Location: Germany
Contact:

Re: MissingKeyMapError javascript error

Post by Ronny »

Hey Jan,

thanks for the updated component and plugin - it works great! API key error is gone, and the maps are displayed again as used to be.

Thanks for all your work!


Best regards,
Ronny
jamfx
Phoca Enthusiast
Phoca Enthusiast
Posts: 61
Joined: 08 Mar 2009, 09:26
Contact:

Re: MissingKeyMapError javascript error

Post by jamfx »

Hi Jan,
I upgraded to the latest Version of Plugin and Component of Phoca Maps, but I still got an error message. Of course I also entered the API key following your instructions.
I cleared the cache, but still got the error message. It would be great if you could have a look at www.winckel.org/anfahrt.html


It loads shortly, but then the map is disappearing and the error is thrown.
Thanks for your help in advance.
Best regards
JamFX
fastmax
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 13 Jul 2016, 15:00

Re: MissingKeyMapError javascript error

Post by fastmax »

I have the same problem of "jamfx": phocamaps 3.0.4 with API configured:
loads shortly, but then the map is disappearing and the error is thrown.
The only difference from 3.0.3: Now the error message is in Italian.
jamfx
Phoca Enthusiast
Phoca Enthusiast
Posts: 61
Joined: 08 Mar 2009, 09:26
Contact:

Re: MissingKeyMapError javascript error

Post by jamfx »

As far as I can see, I have a problem activating the API key. I did exactly as described new for about 3-4 times. But nothing works.

:( :( :(
The console says Key not activated. But I don't know how to do it.
Maybe Jan can clarify some steps...
Best regards
JamFX

EDIT: I somehow solved the problem on my own. I managed to activate the "Google Maps JavaScript API" and now everything works smooth. Thanks.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47916
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: MissingKeyMapError javascript error

Post by Jan »

If you find Phoca extensions useful, please support the project
Jaapv
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 11 Mar 2009, 10:28
Location: Netherlands

Re: MissingKeyMapError javascript error

Post by Jaapv »

jamfx wrote:...snip...

EDIT: I somehow solved the problem on my own. I managed to activate the "Google Maps JavaScript API" and now everything works smooth. Thanks.
This worked for me too. 8)
Post Reply