"preload" parameter doesn't work for me

  • I am trying to activate a predefined spot on googlemaps from "onstart" action this way:

    Code
    <krpano version="1.0.8" onstart="action(onstart_krpano);">
    
    
    <action name="onstart_krpano">
     	plugin[maps].activatespot(s1);
    </action>
    
    
    <plugin name="maps" preload="true" url="%SWFPATH%/plugins/googlemaps.swf"
    ...

    And I have the following error:
    WARNING: unknown action command: plugin[maps].activatespot

    I deduced that a 'googlemaps' plugin is not loaded (yet) despite that "preload" parameter. If I wrap this .activatespot in a 'delayedcall' action with just a couple seconds delay, it works. But I do not want to rely on timings - for some slow connections 2 seconds might be not enough...

    So does this 'preload' parameter supposed to work with googlemaps or it is just for the 'soundinterface' plugin as in the example at http://www.krpano.com/forum/wbb/inde…ad&threadID=814?

  • Hi,

    the googlemaps plugin is a bit special in this case (at the moment, I'm trying to change that!)

    the googlemaps plugin loads a lot of data and code from the google server before it is really ready to use,

    a way to get notified when the map is ready is the "onmapready" event,

    e.g.

    Code
    <plugin name="maps" ... onmapready="action(onstart_krpano);" />

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!