There are many ways on how to do that. I propose one here:
- Introduce new attribute on your scene definition
- Create event when new pano is loaded to check this attribute on active scene and based on that turn on/off plugin visility.
Code:
Example of scene definition with new custom attribute:
|
Quellcode
|
1
2
|
<scene name="scene_01" title="Show any plugin" onstart="" thumburl="panos/01.tiles/thumb.jpg" lat="" lng="" heading="" show_any_plugin="true">
<scene name="scene_02" title="Hide any plugin" onstart="" thumburl="panos/02.tiles/thumb.jpg" lat="" lng="" heading="" show_any_plugin="false">
|
Any layer and event code:
|
Quellcode
|
1
2
|
<events name="any_plugin_visibility" keep="true" onnewpano="if(scene[get(xml.scene)].show_any_plugin,set(layer[any_plugin].visible,true);,set(layer[any_plugin].visible,false); )" />
<layer name="any_plugin" keep="true" url="skin/anyplugin.png" align="center" x="0" y="0" visible="true" />
|
Online example:
http://webonjee.com/radna-mapa/anton/__k…lity/index.html
Code:
here
regards
Umalo