Acces the gmAPI : I dont understand

  • Hello

    I tried this code on a function called on plugin with name "map" :

    I load it as this :


    <plugin name="map"
    ...
    onmapready="gmapi_test();"
    />

    I use map API function :


    <action name="gmapi_test" type="Javascript">
    var krpano = document.getElementById("krpanoSWFObject");
    var mapsplugin = krpano.get("plugin[map]");
    var url = "https://www.randogps.net/nb_telecharge.…earth-trace.kml";
    mapsplugin.gmAPI.getUrl(url);

    </action>

    and i always get this message :

    ERROR: gmapi_test - TypeError: mapsplugin.gmAPI.setOptions is not a function. (In 'mapsplugin.gmAPI.setOptions({elementType: 'geometry', stylers: [{color: '#ebe3cd'}]})', 'mapsplugin.gmAPI.setOptions' is undefined)


    Can u explain why ?


    Thés

Participate now!

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