Radar wandert bei Klick auf mappoint, nicht bei Klick auf Hotspots, activemappoint wandert auch nicht

  • Bekannte Fragestellung eines Neulings
    zur Frage der Bindung des Radars an die Pos.
    der Hotspots in der Karte.
    Anbei die verkürzten Codes zur besseren Übersicht.
    Beim Wechsel der Szene über die Hotspots
    springt der Radar nicht zur richtigen Position.

    Mögliche Fehlerquellen hab ich rot markiert.
    Ich bitte um Tipps mit korrekter Syntax.
    In den Foren gibt es oft verkürzte Schreibweisen.
    Müssen den Spots die Koordinaten des Radars einzeln
    zugewiesen werden oder erfolgt dies automatisiert über %1?

    Tour besteht aus 2 Dateien.


    <krpano version="1.19" title="">

    <script src="radar.js"></script>

    <include url="skin/vtourskin.xml" />
    <include url="skin/grundriss.xml" />

    <!-- customize skin settings: maps, gyro, webvr, thumbnails, tooltips, layout, design, ... -->
    <skin_settings maps="false"
    maps_type="google"
    maps_bing_api_key=""
    maps_google_api_key=""
    maps_zoombuttons="true"
    gyro="true"
    webvr="true"
    webvr_gyro_keeplookingdirection="false"
    webvr_prev_next_hotspots="true"
    littleplanetintro="true"
    title="true"
    thumbs="true"
    thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
    thumbs_opened="false"
    thumbs_text="false"
    thumbs_dragging="true"
    thumbs_onhoverscrolling="false"
    thumbs_scrollbuttons="false"
    thumbs_scrollindicator="false"
    thumbs_loop="false"
    tooltips_buttons="false"
    tooltips_thumbs="false"
    tooltips_hotspots="false"
    tooltips_mapspots="false"
    deeplinking="false"
    loadscene_flags="MERGE"
    loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
    loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
    loadscene_blend_next="SLIDEBLEND(0.5, 0, 0.75, linear)"
    loadingtext="loading..."
    layout_width="100%"
    layout_maxwidth="814"
    controlbar_width="-24"
    controlbar_height="40"
    controlbar_offset="20"
    controlbar_offset_closed="-40"
    controlbar_overlap.no-fractionalscaling="10"
    controlbar_overlap.fractionalscaling="0"
    design_skin_images="vtourskin.png"
    design_bgcolor="0x2D3E50"
    design_bgalpha="0.8"
    design_bgborder="0"
    design_bgroundedge="1"
    design_bgshadow="0 4 10 0x000000 0.3"
    design_thumbborder_bgborder="3 0xFFFFFF 1.0"
    design_thumbborder_padding="2"
    design_thumbborder_bgroundedge="0"
    design_text_css="color:#FFFFFF; font-family:Arial;"
    design_text_shadow="1"
    />

    <!--
    For an alternative skin design either change the <skin_settings> values
    from above or optionally include one of the predefined designs from below.
    -->
    <!-- <include url="skin/vtourskin_design_flat_light.xml" /> -->
    <!-- <include url="skin/vtourskin_design_glass.xml" /> -->
    <!-- <include url="skin/vtourskin_design_ultra_light.xml" /> -->
    <!-- <include url="skin/vtourskin_design_117.xml" /> -->
    <!-- <include url="skin/vtourskin_design_117round.xml" /> -->
    <!-- <include url="skin/vtourskin_design_black.xml" /> -->


    <!-- startup action - load the first scene -->
    <action name="startup" autorun="onstart">
    if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
    loadscene(get(startscene), null, MERGE); Fehler? activate?
    if(startactions !== null, startactions() );
    </action>



    <scene name="scene_Nr1051_Panorama" title="Nr1051_Panorama" onstart="delayedcall(1,activatespot(spot1););" havevrimage="true" thumburl="panos/Nr1051_Panorama.tiles/thumb.jpg" lat="" lng="" heading=""> delayedcall notwendig?

    <view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

    <preview url="panos/Nr1051_Panorama.tiles/preview.jpg" />

    <image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
    <level tiledimagewidth="3200" tiledimageheight="3200">
    <cube url="panos/Nr1051_Panorama.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="1536" tiledimageheight="1536">
    <cube url="panos/Nr1051_Panorama.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="768" tiledimageheight="768">
    <cube url="panos/Nr1051_Panorama.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
    </level>

    </image>

    <image if="webvr.isenabled">
    <cube url="panos/Nr1051_Panorama.tiles/vr/pano_%s.jpg" />
    </image>
    <hotspot name="spot2" style="skin_hotspotstyle" ath="47.329" atv="7.050" linkedscene="scene_nr1052_panorama" /> Fehler? activespot Koord.
    <hotspot name="spot3" style="skin_hotspotstyle" ath="27.172" atv="85.295" linkedscene="scene_nr1051_panorama" />

    <hotspot name="spot5" style="skin_hotspotstyle" ath="-122.519" atv="10.328" linkedscene="scene_nr1055_panorama" />

    <hotspot name="spot7" style="skin_hotspotstyle" ath="163.431" atv="6.370" linkedscene="scene_nr1053_panorama" />
    <hotspot name="spot8" style="skin_hotspotstyle" ath="-140.545" atv="6.299" linkedscene="scene_nr1057_panorama" />
    </scene>

    <scene name="scene_Nr1052_Panorama" title="Nr1052_Panorama" onstart="" havevrimage="true" thumburl="panos/Nr1052_Panorama.tiles/thumb.jpg" lat="" lng="" heading="">

    <view hlookat="156.243" vlookat="0.334" fovtype="MFOV" fov="120.000" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

    <preview url="panos/Nr1052_Panorama.tiles/preview.jpg" />

    <image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
    <level tiledimagewidth="3200" tiledimageheight="3200">
    <cube url="panos/Nr1052_Panorama.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="1536" tiledimageheight="1536">
    <cube url="panos/Nr1052_Panorama.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="768" tiledimageheight="768">
    <cube url="panos/Nr1052_Panorama.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
    </level>
    </image>

    <image if="webvr.isenabled">
    <cube url="panos/Nr1052_Panorama.tiles/vr/pano_%s.jpg" />
    </image>
    <hotspot name="spot2" style="skin_hotspotstyle" ath="161.501" atv="1.568" linkedscene="scene_nr1054_panorama" />
    <hotspot name="spot3" style="skin_hotspotstyle" ath="-162.533" atv="5.119" linkedscene="scene_nr1056_panorama" />


    </scene>

    <scene name="scene_Nr1053_Panorama" title="Nr1053_Panorama" onstart="" havevrimage="true" thumburl="panos/Nr1053_Panorama.tiles/thumb.jpg" lat="" lng="" heading="">

    <view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

    <preview url="panos/Nr1053_Panorama.tiles/preview.jpg" />

    <image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
    <level tiledimagewidth="3200" tiledimageheight="3200">
    <cube url="panos/Nr1053_Panorama.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="1536" tiledimageheight="1536">
    <cube url="panos/Nr1053_Panorama.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="768" tiledimageheight="768">
    <cube url="panos/Nr1053_Panorama.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
    </level>
    </image>

    <image if="webvr.isenabled">
    <cube url="panos/Nr1053_Panorama.tiles/vr/pano_%s.jpg" />
    </image>
    <hotspot name="spot2" style="skin_hotspotstyle" ath="-141.975" atv="5.379" linkedscene="scene_nr1054_panorama" />

    </scene>

    <scene name="scene_Nr1054_Panorama" title="Nr1054_Panorama" onstart="" havevrimage="true" thumburl="panos/Nr1054_Panorama.tiles/thumb.jpg" lat="" lng="" heading="">

    <view hlookat="166.550" vlookat="9.585" fovtype="MFOV" fov="120.000" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

    <preview url="panos/Nr1054_Panorama.tiles/preview.jpg" />

    <image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
    <level tiledimagewidth="3200" tiledimageheight="3200">
    <cube url="panos/Nr1054_Panorama.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="1536" tiledimageheight="1536">
    <cube url="panos/Nr1054_Panorama.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="768" tiledimageheight="768">
    <cube url="panos/Nr1054_Panorama.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
    </level>
    </image>

    <image if="webvr.isenabled">
    <cube url="panos/Nr1054_Panorama.tiles/vr/pano_%s.jpg" />
    </image>
    <hotspot name="spot2" style="skin_hotspotstyle" ath="-99.357" atv="-3.738" linkedscene="scene_nr1055_panorama" />
    <hotspot name="spot3" style="skin_hotspotstyle" ath="-169.164" atv="-2.372" linkedscene="scene_nr1052_panorama" />

    </scene>


    </scene>

    <plugin name="activespot" woher kommen die Koordinaten?
    url="mappointactive.png"
    keep="true"
    parent="Radar"
    align="center"
    edge="center"
    scale="0.5"
    visible="true"
    zorder="8"/>



    <action name="activatespot"> Übertrag der Koordinaten auf die spots?
    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>
    </krpano>


    _____________________________________________________________________________

    <krpano>

    <!-- krpano 1.19.pr9 - Virtual Tour Skin -->


    <!-- Einbinden Grundriss alpha ist Transparenz-->
    <plugin name="Grundriss"
    url="Grundriss2.jpg"
    keep="true"
    align="leftbottom"
    x="10"
    y="10"
    zorder ="2"
    alpha="0.8"
    handcursor="false"
    edge="leftbottom"
    scalechildren="true"
    width="prop"
    height="25%"
    onclick="action(openmap);" />

    <!--Aktionen für das vergrößern und verkleiner des Grundrisses-->
    <action name="closemap">
    plugin[Grundriss].changeorigin(leftbottom,leftbottom);
    tween(plugin[Grundriss].height,20%);
    set(plugin[Grundriss].onclick,action(openmap););
    </action>

    <action name="openmap">
    plugin[Grundriss].changeorigin(leftbottom,leftbottom);
    tween(plugin[Grundriss].height,80%);
    set(plugin[Grundriss].onclick,action(closemap););
    </action>


    <!--Map active points-->
    <!--Map the point for the 1 scene-->

    <!--Map the point for the 2 scene-->

    <!-- activated spot image (child of the radar layer) -->
    <plugin name="activespot"
    url="mappointactive.png"
    keep="true"
    parent="Radar"
    align="topleft"
    edge="center"
    visible="true"
    zorder="3"/>

    <plugin name="radar"
    url="%SWFPATH%/plugins/radar.swf"
    alturl="%SWFPATH%/plugins/radar.js"
    zorder ="1"
    keep="true"
    parent="Grundriss"
    mask ="mapmask"
    align="lefttop"
    edge="center"
    visible="true"
    fillcolor="0xFFCC33"
    fillalpha="0.7"
    scale="0.5"
    headingoffset="0"
    glow="true"
    glowcolor="0xFFCC33"
    glowwidth="14"
    glowstrength="113"
    linewidth="0.3"
    linecolor="0xFF0000"
    linealpha="0.1"
    invert="false"
    editmode="true"/>

    <plugin name="mapmask" url="mapmask.png" keep="true" parent="Grundriss" visible="false" enabled="true" zorder ="1"/>

    <!--action name="activatespot"-->
    <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>

    <!--Map the point for the 1 scene-->
    <plugin name="mappoint_1"
    url="Panorama-Standpunkt_RGB.png"
    width="30"
    height="30"
    keep="true"
    parent="Grundriss"
    align="lefttop"
    edge="center"
    zorder="2"
    x="107.6"
    y="68.7"
    onhover="showtext(Nr1051_Panorama);"
    onclick="loadscene(scene_Nr1051_Panorama);
    set(plugin[radar].x, 107.6);
    set(plugin[radar].y, 67.7);
    set(plugin[radar].heading, -50)" />


    <!--Map the point for the 2 scene-->
    <plugin name="mappoint_2"
    url="Panorama-Standpunkt_RGB.png"
    width="30"
    height="30"
    keep="true"
    parent="Grundriss"
    zorder="2"
    x="150.0"
    y="43.6"
    onhover="showtext(Nr1052_Panorama);"
    onclick="loadscene(scene_Nr1052_Panorama);
    set(plugin[radar].x, 150.0);
    set(plugin[radar].y, 43.6);
    set(plugin[radar].headingoffset, 40)" />


    <!--Map the point for the 3 scene-->
    <plugin name="mappoint_3"
    url="Panorama-Standpunkt_RGB.png"
    width="30"
    height="30"
    keep="true"
    parent="Grundriss"
    align="lefttop"
    edge="center"
    zorder="2"
    x="110.5"
    y="114.2"
    onhover="showtext(Nr1053_Panorama);"
    onclick="loadscene(scene_Nr1053_Panorama);
    set(plugin[radar].x, 110.5);
    set(plugin[radar].y, 114.2);
    set(plugin[radar].headingoffset, -45)" />

    <!--Map the point for the 4 scene-->
    <plugin name="mappoint_4"
    url="Panorama-Standpunkt_RGB.png"
    width="30"
    height="30"
    keep="true"
    parent="Grundriss"
    align="lefttop"
    edge="center"
    zorder="2"
    x="106.4"
    y="164.5"
    onhover="showtext(Nr1054_Panorama);"
    onclick="loadscene(scene_Nr1054_Panorama);
    set(plugin[radar].x, 106.4);
    set(plugin[radar].y, 164.5);
    set(plugin[radar].heading, -50.00)" />


    </krpano>

  • Danke an toosten.
    Der Befehl onnewscene ist mir noch völlig unbekannt.
    Auch in den Musterbeispielen taucht er nicht auf.

    Habe bei activatespot

    set(plugin[activespot].parent, plugin[%1]);
    durch
    set(plugin[activespot].Radar, plugin[%1]);
    ersetzt.

    Nun wandert der aktive mappoint zumindest in der Karte mit.
    Wenn ich mir das Musterbeispiel https://krpano.com/examples/108b8…th-imagemap.xml
    ansehe, erschließt sich mir nicht, wo der Verweis aus den Hotspots auf die Lage des Radars in der map zu finden ist

  • Habe zu jedem Hotspot dies ergänzt

    onstart="delayedcall(1,activatespot(spot1););"

    spot1 hab ich durch jeweiligen mappoint der Übersichtskarte ersetzt.

    Nun läuft es wie gewünscht.

Participate now!

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