Remove hotspot via Javascript

  • Hi Guys

    is there a plausible reason that explain why I cant' remove hotspot via javascript [rather than I'm an idiot *wink* ]

    here's what i'm doing:

    1. a javascript function is called onxmlcomplete.
    1. in this function [in wich I add hotspot, and it works] I use: krpano.call("removehotspot("+ nameHS + ")");, where nameHS is the dynamic value of the hotspot that I want to remove...
    2. I tried also: krpano.call("removehotspot('"+ nameHS + "')"); krpano.call("removehotspot(\""+ nameHS + "\")");
    3. it depends by ... the hotspots that I want to remove are polygonal?

    thanks in advance... *smile*

    zeno

  • Hi!
    what kind of error you getting?
    There is many reasons
    For example, you can't use external JS interface localy for chrome without special comand line param.
    And so on
    Anyway, first - open log window in krpano viewer and make sure you don't see "External Interface not available" error ;)

    Andrey

  • Hi Andrey

    the error it's that I'm an idiot *g*

    the code is correct and it works.
    The problem is that I checked the hotspot.count variable, that is not modified. I thought that it should decrease.

    thanks.
    zeno

    Hi!
    what kind of error you getting?
    There is many reasons
    For example, you can't use external JS interface localy for chrome without special comand line param.
    And so on
    Anyway, first - open log window in krpano viewer and make sure you don't see "External Interface not available" error ;)

    Andrey

Participate now!

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