Direct linking to a specific panorama

  • Well thats 1 image, if you have a tour, you'll have just 1 html, and the hotspots linking to several xml.
    index.html ===loads==> global.xml ==loads==> location1.xml ==can load==> location2, location3, location 4.xml

    But what if you just want to go to location3 instantly (and perhaps with a given vlookat / hlookat) instead of going to the whole tour or making a html for every location?

  • Hi,

    Is it possible to link directly to an panorama with perhaps a specified xml or fov/pan/tilt? So people can email a link to a friend.
    http://example.com/?xml=pano/1.xml or something like that.

    Thanks

    Hi,

    yes, this is possible,

    you can either link direct to the krpano.swf and add parameters
    or to a html file which passes the parameters to the flash file
    (see the https://krpano.com/krpano.html for such)

    I used this several times on my site,

    e.g.

    direct link to a html file with parameters:
    (I recommend this way, because with html/javascript the flashplayer mousewheel bugs
    can be fixed, and there is a flashplayer detection)

    https://krpano.com/krpano.html?pa…view.vlookat=81

    sorry the forum cuts the url, here is full:
    https://krpano.com/krpano.html?pano=panos/kirche/kirche.xml&view.stereographic=true&view.fisheye=1.0&view.fov=150&view.fovmax=150&view.hlookat=-7&view.vlookat=81

    or a link direct to the swf file:

    https://krpano.com/krpano.swf?pan…view.vlookat=81

    full url:
    https://krpano.com/krpano.swf?pano=panos/kirche/kirche.xml&view.stereographic=true&view.fisheye=1.0&view.fov=150&view.fovmax=150&view.hlookat=-7&view.vlookat=81

    best regards,
    Klaus

  • direct link to a html file with parameters not working
    I tried to do so ....tour.html?pano=7.xml
    tour.html : .. so.addVariable("pano", "tour.xml"); ...
    tour.xml : <krpano version="1.0.7" onstart="action(load1);" basedir="%FIRSTXML%" actionintervalbase="timer" logkey="true">

    <action name="load1">
    loadpano(2.xml,null,KEEPALL,BLEND(2));

    </action>
    ...

  • Hi,

    when you add parameters to a HTML file (like tour.html?pano=...)
    then you need to redirect these parameters manually to the flash (via Javascript)

    have a look at the source code of this html file for an example:
    https://krpano.com/krpano.html

    here the interesting part:


    best regards,
    Klaus

  • Hi viewinz,

    I have played a little with your request using the scene example that comes with the Krpano_1.0.8 downloaded files... So, all the following refers to that scene example.
    I have modified the scene.html file adding the above code from Klaus... The html code becomes like this:


    and, as you said, it seems that using http://.../scenes.html?pano=scenes.xml&scene=exterior doesn't work.
    In fact, doing this way there is no loaded scene... and the krpano debuger says:

    Code
    INFO: krpano 1.0.8 beta 9 DEV (build 2009-10-29)
    INFO: Flashplayer WIN 10,0,32,18 PlugIn
    ERROR: loadscene() - scene "scene1" not found


    the action onstart() tries to load the scene1:

    Code
    <action name="onstart">
    loadscene(scene1, null, MERGE);
    </action>


    But fails... I think this is because using the scene=exterior has the effect to redefine the scene tag with the given value... and then, the action onstart() does not work because the scene1 is no more defined...

    So, I have tried with an other approach... Redefining the content of the onstart() action ... Doing this way, we can specify the scene we want to be loaded by the onstart() action.
    Like this: http://.../scenes.html?pano=scenes.xml&action[onstart].content=loadscene(scene3, null, MERGE);

    Code
    http://.../scenes.html?pano=scenes.xml&action[onstart].content=loadscene(scene3, null, MERGE);


    Doing this way, it works...

    Hope this can help.

    SAlut.

  • Dear Michel.

    I am trying to get a direct link for a specific scene in my virtual tour as you suggested. I rewrote the HTML file as you suggested, and got a particularly positive result.
    The viewer skips to a specified scene, but the problem is that it gets stuck for some 10-15 seconds on loading and then shows a black screen and an error:

    Code
    WARNING: unknown action command: plugin[box].selectiditem
    ERROR: XML parsing failed - Error: Error #1023

    In my XML file I use a plugin:

    Code
    <!-- combobox plugin -->
    	<plugin name="box" url="../../plugins/combobox.swf" preload="false"
    	keep="true"
    	align="righttop" x="4" y="17" width="188" 
    	blendmode="normal" />

    In normal mode, when I had a normal link with my scene.xml file written in the HTML everuthing was right with the plugin, but when I am trying to set an external link it seems to have a problem.

    Otherwise the tour jumps directly to the specific scene. Although the screen is black i can figure out the correct position by the built in interactive map.

    Could you suggest a solution, please?

  • Hi,

    yes, when you use the current swfkrpano.js what would be pretty easy:

    Code
    <script type="text/javascript">
    
    
    	var swf = createswf("krpano.swf");
    	swf.addVariable("xml","bathroom.xml");
    	swf.passQueryParameters();
    	swf.embed("krpanoDIV");
    
    
    </script>

    first the xml is set to "bathroom.xml" and then the html query parameters are parsed and set, and if a xml parameter will be set, it overwrite the first setting,

    best regards,
    Klaus

Participate now!

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