Set id of hotspot div using javascript

  • Hi,

    I'm having problems setting the id of a hotspot div when using Javascript. I've set the renderer to 'css3d', but I get the console error:

    "WARNING: set hotspot[hotspot-6].sprite.id=hotspot-6 - sprite is null!"

    The hotspots themselves appear correctly in the panorama, with their data being loaded from JSON... just without any ids. Here is the code that I'm using within my tour.html <head> tag:

    As far as I know this should be possible - does anyone know what I'm doing wrong? I'm using krpano 1.19 pr16.

    Many thanks in advance (and apologies if this has been covered elsewhere - I've searched, but couldn't find an answer)!

  • Hi Klaus - many thanks for the info, and apologies for the slow response!

    I've tried adding onloaded to the hotspot generation code:

    However, the test() function does not get fired - nothing appears in the console, but the hotspot sprites are visible as usual in the panorama.

    Any ideas?

  • Hi,

    difficult to say when seeing only small part of the example, there can be several reasons...

    Maybe as help here a full example for using krpano fully from JS:

    Best regards,
    Klaus

Participate now!

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