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:
Code
hotspots.forEach(function(hotspot) {
var hotspotID = "hotspot-" + hotspot.id;
krPano.call("addhotspot(" + hotspotID + ");");
krPano.call("set(hotspot[" + hotspotID + "].renderer, 'css3d');");
krPano.call("set(hotspot[" + hotspotID + "].atv, " + hotspot.hotspotATV + ");");
krPano.call("set(hotspot[" + hotspotID + "].ath, " + hotspot.hotspotATH + ");");
krPano.call("set(hotspot[" + hotspotID + "].url, 'images/infopoint.png');");
krPano.call("set(hotspot[" + hotspotID + "].sprite.id, " + hotspotID + ");");
});
Display More
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)!