• Hi

    I am trying out krpano after having burnt my hand (and my pocket) by buying a competitive software which is good when it works and god help if it doesn't (cause the developers wont). After having wasted over 6 months to develop my first virtual tour (and also having thrown $700 out of the window), I luckily chanced upon krpano and find it very interesting. Of course, it has a lot of coding to be done to meet my requirement, and I am hoping to learn it fast.

    I have no exposure to xml, though I can manage through html and have a few quick doubts. Needless to say, I have searched the forum for these answers, but could not find it. If there has been a solution earlier, would appreciate if I can be redirected to the link. Else, help with coding would be great.

    Here are my first issues I have faced so far:

    1. Auto fit the browser: This works fine when I use width="100%" height="PROP" for a layer. However, when I have other layers within a container, I am not able to control the position of these layers. If I use the same width="100%" and height="PROP" for the inner layers, then they are off mark when the browser window changes and if I do not, then they remain in the same size.

    2. Radar plugin; While the Radar plugin is provided with krpano, I notice that this in itself is not sufficient to show the radars on the FloorPlan. I managed to get the following code , but despite all efforts am unable to get the same running. Can I get a code to have radar function on the Floormap?

    <!-- global settings for map -->

    <plugin name="map" url="graphics/map.png" keep="true"
    align="lefttop" x="16" y="16" alpha="0.85" handcursor="false"
    scalechildren="true"
    width="320"
    height="227"
    onclick="action(closemap);"
    />

    <plugin name="scene_1" url="graphics/mappoint.png" keep="true" parent="map" align="lefttop" edge="center" x="50" y="30" zorder="2" onhover="showtext(Parking Lot);" onclick="loadscene(scene_1, null, MERGE, BLEND(1));" />
    <plugin name="scene_2" url="graphics/mappoint.png" keep="true" parent="map" align="lefttop" edge="center" x="180" y="60" zorder="2" onhover="showtext(Weinkeller);" onclick="loadscene(scene_2, null, MERGE, BLEND(1));" />
    <plugin name="scene_3" url="graphics/mappoint.png" keep="true" parent="map" align="lefttop" edge="center" x="270" y="90" zorder="2" onhover="showtext(Barriquekeller);" onclick="loadscene(scene_3, null, MERGE, BLEND(1));" />

    <!-- activated hotpot -->
    <plugin name="activespot" url="graphics/mappointactive.png" keep="true" align="center" edge="center" visible="false" zorder="3" />

    <!-- radar plugin, set heading with "plugin[radar].heading" -->
    <plugin name="radar"
    url="%SWFPATH%/plugins/radar.swf"
    zorder="1"
    keep="true"
    heading="0"
    parent="map"
    mask="mapmask"
    align="lefttop"
    edge="center"
    x="0" y="0"
    linecolor="0"
    fillcolor="0xFF0000"
    scale="2.5"
    visible="false"
    />

    <!-- mask for radar -->
    <plugin name="mapmask" url="graphics/map_mask.png" keep="true"
    parent="map"
    enabled="false"
    />


    <!-- actions -->
    <action name="closemap">
    set(onclick,action(openmap););
    tween(width,64,distance(320,0.5),easeoutquad);
    tween(height,45,distance(227,0.5),easeoutquad);
    </action>

    <action name="openmap">
    set(onclick,action(closemap););
    tween(width,320,distance(320,0.5),easeoutquad);
    tween(height,227,distance(227,0.5),easeoutquad);
    </action>


    <!-- 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>

    3. Next scene transition: I got this code for auto transition to the next scene after one rotation.

    <krpano version="1.16" onstart="bombtimer(0); startup();">

    <action name="startup">
    if(startscene === null, copy(startscene,scene[0].name));
    loadscene(get(startscene), null, MERGE);
    </action>

    <action name="bombtimer">
    set(bt,%1);
    add(bt,1);
    delayedcall(1, bombtimer(get(bt)));
    if(bt == 42, set(bt,0); nextscene();, );
    </action>

    <action name="nextscene">
    set(ns, get(scene[get(xml.scene)].index) );
    set(maxs, get(scene.count) );
    add(ns,1);
    if(ns == maxs, set(ns,0);, );
    loadscene( get(scene[get(ns)].name ), null, MERGE, BLEND(1.5) );
    </action>

    <autorotate enabled="true" waittime=".5" accel="5.0" speed="8.2" horizon="0.0" tofov="off"/>

    However, when I manually move the scene either clockwise or anticlockwise (by using the left and right arrow keys), then this change in the rotation degree is not taken into account by the above code. Result is that the transition either happens before a full rotation or much after a full rotation.

    Would appreciate if someone can help me with these issues.

    Thanks in advance and patience.

    Best Regards
    GP

  • Maybe this can help you speed up learning:
    1) Don't know exactly what is bothering you so I can suggest to explore: https://krpano.com/examples/117/e…containers.html

    2) in Krpano package example folder you have simple code for placing the maps and spots on it: see: scenes-with-imagemap examples This is good start point for you.

    3) https://krpano.com/forum/wbb/inde…54190#post54190

    In general: If not already done, donwload and explore Krpano package examples folder where you have plenty of examples where you can change the code and see how functionality behave. That way you can speed up your learning curve.

Jetzt mitmachen!

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