Page 2 of 3

Re: MissingKeyMapError javascript error

Posted: 08 Jul 2016, 00:07
by joaoserra69
Bonsoir,

Est-ce que vous avez la solution???

Merci !!!!

Re: MissingKeyMapError javascript error

Posted: 08 Jul 2016, 12:02
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

Re: MissingKeyMapError javascript error

Posted: 08 Jul 2016, 13:35
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

Re: MissingKeyMapError javascript error

Posted: 11 Jul 2016, 02:14
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

Re: MissingKeyMapError javascript error

Posted: 11 Jul 2016, 17:47
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

Re: MissingKeyMapError javascript error

Posted: 13 Jul 2016, 09:26
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

Re: MissingKeyMapError javascript error

Posted: 13 Jul 2016, 15:04
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.

Re: MissingKeyMapError javascript error

Posted: 13 Jul 2016, 15:26
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.

Re: MissingKeyMapError javascript error

Posted: 15 Jul 2016, 00:40
by Jan

Re: MissingKeyMapError javascript error

Posted: 15 Jul 2016, 12:00
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)