changing the name (or id whichever is identity) of hotspot

  • Greetings,

    I want to change the id of hotspot with another id. I use this code (in javascript):

    krpano().set("hotspot[" + hotspotIdToBeChanged + "].name", "spot"+newUniqueId);


    A hotspot with newUniqueId can be created but It doesn't have the same properties of original hotspot, plus original hotspot stands still, therefore, I guess I am not successful to change the name of the hotspot. Is there a way to clone hotspot with another id/name or can I change the hotspot's name programmatically?

    Best Regards,

  • Hello, I changed from 1.16.1 to 1.16.3


    I tryed once more and it works correctly now. I am not sure actually if it was because of version or my mistake to be honest. But if anyone finds time to try in 1.16.1 my test is:


    var originalAth=krpano().get("hotspot[spot783d78f7-f3ca-44f4-adf7-e63e1a5727dc].point[0].ath");
    console.log(originalAth);
    krpano().set("hotspot[spot783d78f7-f3ca-44f4-adf7-e63e1a5727dc].name", "spottestcase");
    setTimeout(function(){checkTheChange();},2500);

    function checkTheChange(){
    var nameChanged= krpano().get("hotspot[spottestcase].point[0].ath");
    console.log(nameChanged);
    }

Participate now!

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