Hallo, ich bin ganz neu hier
Ich versuche gerade, eine kleine Tour mit einer Karte und Radar zu erstellen, allerdings schaffe ich es nicht, dass das Radar aktualisiert wird, wenn ich in der Map auf einen Hotspot klicke.... Der Blickwinkel wird wieder auf den Anfang gestellt, und die Position ändert sich nicht, so als ob activatespot nicht aufgerufen wird. Die Tour habe ich mit Autpano Tour erstellt und dann die XML-Datei geändert :
- <!--
krpano 1.0.8 - scenes example with a image map
- a scene is like an external pano xml file
- it can contains all possible elements - plugins,hotspots,events,...
-->
- <krpano version="1.0.8" >
- <!-- text styles for startup info
-->
<textstyle name="infostyle"
origin="top"
edge="top"
yoffset="10"
textalign="center"
background="false"
border="false"
fontsize="40"
textcolor="0xFFFFFF"
bold="false"
effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
showtime="1.0"
fadetime="1.0"
/>
- <!-- scenes
-->
- <!-- first scene/pano
-->
- <include url="test0.xml"/>
<plugin name="data" keep="true"/>
<autorotate enabled="true"/>
<!-- second scene/pano
-->
<include url="test1.xml"/>
<plugin name="data" keep="true"/>
<autorotate enabled="true"/>
- <!-- global settings
-->
<plugin name="map"
url="testdata/map/map.png"
keep="true"
align="lefttop"
x="10" y="10"
alpha="0.5"
handcursor="false"
scalechildren="true"
onclick="action(closemap);"
/>
<plugin keep="true"
name="spot0"
onclick="set(plugin[data].autorotate,get(autorotate.enabled));
set(autorotate.enabled,false);
loadpano(test0.xml);
set(autorotate.enabled,get(plugin[data].autorotate));
plugin[map].activatespot(spot0);"
url="testdata/graphics/spots/spot0.png"
align="lefttop"
edge="center"
parent="map"
x="43.9331%" y="71.9251%"
/>
<plugin keep="true"
name="spot1"
onclick="set(plugin[data].autorotate,get(autorotate.enabled));
set(autorotate.enabled,false);
loadpano(test1.xml);
set(autorotate.enabled,get(plugin[data].autorotate));
plugin[map].activatespot(spot1);"
url="testdata/graphics/spots/spot0.png"
align="lefttop"
edge="center"
parent="map"
x="20.7113%" y="69.2513%"
/>
- <!-- radar plugin, set heading with "plugin[radar].heading"
-->
<plugin name="radar"
url="%SWFPATH%/plugins/radar.swf"
zorder="1"
keep="true"
mask="mapmask"
heading="-30"
parent="map"
align="lefttop"
edge="center"
x="20.7113%" y="69.2513%"
linecolor="0"
fillcolor="0xFF0000"
scale="1"
visible="true"
/>
- <!-- mask for radar
-->
<plugin name="mapmask"
url="testdata/map/map.png"
keep="true"
parent="map"
x="10" y="10"
enabled="false" />
- <!-- actions
-->
- <!--
activatespot action,
- this action has two arguments:
- %1 = the current spot
- %2 = the current radar heading
-->
<action name="activatespot">
set(plugin[activespot].parent, plugin[%1]);
set(plugin[activespot].visible, true);
copy(plugin[radar].x, plugin[%1].x);
copy(plugin[radar].y, plugin[%1].y);
trace(plugin[radar].x,'-',plugin[radar].y);
set(plugin[radar].visible, true);
set(plugin[radar].heading, %2);
</action>
<action name="closemap">
set(onclick,action(openmap););
tween(width,64,distance(565,0.5),easeoutquad);
tween(height,45,distance(442,0.5),easeoutquad);
</action>
<action name="openmap">set(onclick,action(closemap););
tween(width,565,distance(565,0.5),easeoutquad);
tween(height,442,distance(442,0.5),easeoutquad);
</action>
</krpano>
Display More
Wenn ich bei den Hotspots ein
im onclick ergänze, wird zwar nach dem Klick die Position des Radars aktualisiert, aber danach dreht es sich nicht mehr mit, wenn ich mich im Panorama umschaue. Ich hab jetzt schon alle Beispiele angeschaut, habe aber noch nicht entdecken können, warum das bei mir nicht geht.
Vielen Dank schonmal,
V.Klaffehn