You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

PanLUX

Beginner

  • "PanLUX" started this thread

Posts: 24

Location: Zagreb, Croatia

  • Send private message

1

Wednesday, July 27th 2016, 7:09pm

Google Maps MissingKeyMapError

I dont understand this Google Maps API key error?!

If I generating GM API key, where to put it?

I use krpano 1.19-pr5

--
PanLUX
PanLUX has attached the following images:
  • DS-GoogleMapsError01.jpg
  • DS-GoogleMapsError02.jpg

2

Thursday, July 28th 2016, 11:21am

Hi,

do you have a link to the example where you have got that error message?

Google has changed it's API again and requires a key now, but normally there should be only a warning in the browser console...

There is currently no direct way to set the key (an API will be added in the next release) but as workaround it would be possible to set the key this way:

Source code

1
2
3
4
<plugin name="map"
 	...
 	language="&amp;key=YOUR GOOGLE MAPS API KEY"
 	/>


Best regards,
Klaus

PanLUX

Beginner

  • "PanLUX" started this thread

Posts: 24

Location: Zagreb, Croatia

  • Send private message

3

Sunday, July 31st 2016, 1:51pm

Hi, Klaus

Links are here:
http://www.konoba-didovsan.com/panorama/GornjiGrad.html
http://www.konoba-didovsan.com/panorama/Kajzerica.html

This is not on my server, and it wasn't online until now.

--
PanLUX

4

Friday, August 5th 2016, 7:42pm

Which file do I add the API Key to?

Hello,

I am having the same issue as PanLUX. I am not sure which file to add the workaround code provided by Klaus to? Would someone be able to enlighten me? *g*


Thank you!

5

Friday, August 5th 2016, 10:29pm

Hi,

in the new 1.19-pr6 version the googlemaps.js plugin supports the key setting to allow setting the Google Maps API key.

The tour.xml / vtourskin.xml files were also updated - just set the API key in the tour.xml at the 'maps_api_key' setting.

Best regards,
Klaus

PanLUX

Beginner

  • "PanLUX" started this thread

Posts: 24

Location: Zagreb, Croatia

  • Send private message

6

Saturday, August 6th 2016, 7:59pm

Thanks Klaus, for a quick upgrade of google maps plugin
The tour.xml / vtourskin.xml files were also updated - just set the API key in the tour.xml at the 'maps_api_key' setting.
I think it would be better to use this in vtourskin.xml:

Source code

7
8
9
10
11
<skin_settings
    maps="true"
    maps_type="google"
    maps_bing_api_key=""
    maps_google_api_key=""

...

Source code

383
384
385
386
387
388
389
390
391
392
393
394
if(device.flash,
    copy(layer[skin_map].key, skin_settings.maps_bing_api_key);
    set(layer[skin_map].url, '%SWFPATH%/plugins/bingmaps.swf');
  ,
    if(skin_settings.maps_type == 'bing',
        copy(layer[skin_map].key, skin_settings.maps_bing_api_key);
        set(layer[skin_map].url, '%SWFPATH%/plugins/bingmaps.js');
      ,
        copy(layer[skin_map].key, skin_settings.maps_google_api_key);
        set(layer[skin_map].url, '%SWFPATH%/plugins/googlemaps.js');
      );
  );


--
PanLUX

7

Monday, August 8th 2016, 5:46pm

Hi,

I agree - I have changed that now.

Best regards,
Klaus