Clicking on the active mapspot

  • I am currently adding maps to the tour I am working on, and I am using the 'demotour-corfu' example from the 1.18.1 download to learn from, and as the basis for my .xml files (at least as far as implementing the maps is concerned).

    Clicking on an inactive mapspot in the example loads the scene associated with that mapspot, but clicking on the active mapspot currently does absolutely nothing (as might be expected, as the scene linked to the mapspot is the current scene already being displayed).

    However, I would like to modify the .xml file so that clicking on the active mapspot closes the map and returns to the current scene, much the same as clicking the maps button in the control bar does.

    I am a relative newbie to all this, and I could really do with some guidance on how to achieve this. I guess it's probably quite simple, but currently the solution eludes me.

    Any suggestions would be much appreciated, please.

    Regards

    Andrew

  • Hi,just set the 'activespotenabled' setting of the Bingmaps plugin to true:
    https://krpano.com/plugins/bingmaps/#activespotenabled

    That works fine! Thanks Klaus
    .

    without looking at the code I can propose to find the code where onclick event is defined and add something like:
    onclick=" if(xml.scene EQ linkedscene, showmap(false);, loadscene(get(linkedscene)....));"

    Thanks Umalo. That was what I was expecting to have to do, but because the onclick event is created dynamically at run time I couldn't work out how to do it. Thanks anyway.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!