Sie sind nicht angemeldet.

1

Freitag, 10. Januar 2014, 10:45

google maps 1.17 not working

Hi,
I'd like to know what am I missing. I can not force googlemaps.js working.

I have the right license, in PLUGINS folder is last version of googlemaps.js and the line in vtourskin.xml is changed:
<layer name="skin_map" state="closed" url="" flash_url="%SWFPATH%/plugins/bingmaps.swf" html5_url="%SWFPATH%/plugins/googlemaps.js" visible="false" align="lefttop" width="75%" height="90%" x="0" y="0" zorder="1" zoom="16" lat="50.1084175" lng="14.5840608" bgalpha="0" maptype="satellite" onmapready="skin_addmapspots();">

But I get only empty map.Please why?
flash with BING working:
http://www.virtualczech.cz/ccm/index.html
HTML5 version with not working Googlemaps:
http://www.virtualczech.cz/ccm/indexH5.html

marty

2

Freitag, 10. Januar 2014, 11:30

Hi,

I have to say that's strange - when looking into the browser developer/debug console, I see there is Javascript error in the 'main.js' - but the problem here - that 'main.js' is a file from the Google servers...

Regarding to a quick Google search (for 'google.maps.Load is not a function') this can happen when loading the Google Maps API more than once - and when looking at the load requets - there are indeed TWO load request of the Google Maps API (the request looks like 'http://maps.google.com/maps/api/js?sensor=false&callback=_krpano_gmap_cb_...').

It seems that the 'skin_startup' action is called TWO TIMES in your example.
In that action the url of the googlemaps plugin will be set, and when it will be set two times, this could explain that error.

E.g. here a test - an url where the skin_startup action will be overwritten with a trace:
http://www.virtualczech.cz/ccm/indexH5.html?action[skin_startup].content=showlog();trace(skin_startup-called);

The same here shows only one call:
http://krpano.com/tours/paris/gmap.html?action[skin_startup].content=showlog();trace(skin_startup-called);

That means something in the xml causes a wrong second call of that action - when fixed that, it should work.
But I will also look into that and try to avoid such problems also from viewer side by detecting and avoiding that case.

Best regards,
Klaus

3

Freitag, 10. Januar 2014, 11:44

Hmm.
I have only one line with googlemaps.js in my XML - sending to your PM

I noticed in another my project also:
http://www.virtualczech.cz/pamatnikvitkov/indexH5.html

Bing OK, Google maps empty. I use the same vtourskin.xml and can not find, where it should be called twice :-(

Once, only once I saw Google maps with tresting offline on my HDD. But I could not to reach again :-(

4

Freitag, 10. Januar 2014, 12:06

Hi,

as told for some reason the skin_startup action is called two times.

Here a quick workaround that would allow only one call - add the red lines to the skin_startup action in the vtourskin.xml:

<action name="skin_startup">
if(skin_startup_done === null,
set(skin_startup_done,true);

...
);
</action>


Btw - it's difficult to see but there are 3 '=' characters in the if above.

Best regards,
Klaus

5

Freitag, 10. Januar 2014, 12:34

Very good advice !!!!!

Thanks.

It works!
http://www.virtualczech.cz/ccm/indexH5.html

But i have no idea where the action should be called twice *unsure*

Thanks a lot

martin

Ähnliche Themen