Hi I am trying to remove hotspot from array of hotspot based on hotspot name but it is not working. Here is my code.
var name =
'poi-marker';
var countArr =
this.
krpanoObj.
get(
'hotspot').
getArray();
console.
log(
countArr);
for (
let i =
0;
i <
countArr.
length;
i++) {
var value =
that.
krpanoObj.
get(
'hotspot[ ' +
i +
'].name');
if (
value ==
name) {
console.
log(
'in if');
this.
krpanoObj.
call(
'removehotspot(' +
value +
')');
console.
log(
'countArr',
countArr);
}
}
I want to remove particular hotspot from array which also remove that hotspot from panoroma image also .
P.S I have not saved hotspot in xml yet trying to remove it if someone mistakenly added the hotspot
Any help would be appreciated , thanks.