hotspot.count always return zero

  • Hello,

    A few weeks ago I made a simple HTML overlay that would display the number of hotspots in a scene and how many have been discovered. This worked OK.

    Now, my colleague gave me a new virtual tour he made so I could implement this interface and I just can't get it to work. It seems the HTML code has changed since last time.

    I get all variables OK, I can display messages in log windows but I just can get the number of hotspots right.

    I tried every syntax possible and tried the few examples available on this forum.

    Tested on Chrome, Firefox, IE using Krpano Testing server.

    krpano 1.19-pr3 / Panotour Pro V2.5.0 64 bits

    Here's a sample of code :


    function initScene(krpano) {
    var krpano = document.getElementById("krpanoSWFObject");

    krpano.call("showlog('true')");

    krpano.call("trace(all spots - " + krpano.get('hotspot.count')+");");


    initScene is triggered by onReady.

    Any idea ?

    Many thanks.

  • Hi,

    the 'onReady' callback means the viewer itself is ready, but not that a pano or a scene with hotspots is already loaded.

    Try the different way - in your scene add in the onstart event a 'js(...)' call to tell your Javascript the scene is ready and the hotspots are there.

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!