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,
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
wouldnt you send them a link to the .html ? the html would then load the pano.
below is what i would email to someone to view this pano.
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
Thanks Klaus this is what I needed :)
Direct linking no working with internet explorer and opera?
In Firefox, Chrome and Safari it all work!
This example link: http://www.cult360.ru/example3/pano.swf?pano=tour/3.xml
Any ideas, at you works in internet explorer and opera?
Best regards!
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>
...
add a & behind it. Explorer reads the extension like a xml file :( http://www.cult360.ru/example3/pano.swf?pano=tour/3.xml&
add a & behind it. Explorer reads the extension like a xml file :( http://www.cult360.ru/example3/pano.swf?pano=tour/3.xml&
I have no problems with pano.swf?pano=...
I have problem only with tour.html?pano=....
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:
// pass all external parameters
var q = document.location.search || document.location.hash;
if(q)
{
var params = q.substring(1).split("&");
for(var i=0; i<params.length; i++)
{
var param = params[i];
var istgl = param.indexOf("=");
var pname = param.substring(0,istgl);
var pval = param.substring(istgl+1);
so.addVariable(pname, pval);
}
}
Display More
best regards,
Klaus
Oh, now everything works perfectly
but if I use "kprotect", it will not work?
Hi, when you use kprotect, then you need to allow the "External Parameters" to get it working
How does this work when you are using scenes?
i.e. ..pano.html?pano=path/doc.xml&scene=exterior doesn't work.
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:
<html>
<head>
<title>krpano.com example</title>
</head>
<style>
body{ font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#FFFFFF; background-color:#000000; margin:0; padding:0; }
* html, * html body{ overflow: hidden; }
a{ color:#555555; text-decoration:underline; }
a:hover{ color:#AAAAAA; text-decoration:underline; }
</style>
<body>
<div id="krpano">
<noscript><table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Javascript not activated<br><br></center></td></tr></table></noscript>
</div>
<script type="text/javascript" src="../../swfobject/swfobject.js"></script>
<script type="text/javascript" src="../../swfobject/swfkrpanomousewheel.js"></script>
<script type="text/javascript">
// <![CDATA[
if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
{
var so = new SWFObject("../../krpano.swf", "krpanoSWFObject", "100%", "100%", "9.0.28","#000000");
so.addParam("allowFullScreen","true");
so.addParam("allowScriptAccess","sameDomain");
//so.addVariable("pano", getQueryParamValue("pano"));
// pass all external parameters
var q = document.location.search || document.location.hash;
if(q)
{
var params = q.substring(1).split("&");
for(var i=0; i<params.length; i++)
{
var param = params[i];
var istgl = param.indexOf("=");
var pname = param.substring(0,istgl);
var pval = param.substring(istgl+1);
if (pname == "krpanologo")
{
// shortcut to hide the logo
pname = "plugin[krpanologo].visible";
}
so.addVariable(pname, pval);
}
}
so.useExpressInstall('./swfobject/expressinstall.swf');
so.setAttribute('xiRedirectUrl', window.location);
if ( so.write("krpano") ) { var mousewheelfixes = new SWFkrpanoMouseWheel(so); }
}
else
{
document.getElementById("krpano").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
}
// ]]>
</script>
</body>
</html>
Display More
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:
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:
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);
Doing this way, it works...
Hope this can help.
SAlut.
Michel, thanks a lot for that.
It didn't work exactly how I wanted but got me thinking and I put variables in the URL and picked them up afterwards and it it worked great.
I.e. like this:
http://viewinz.com/view.html?x=da…ine_parade&l=en
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:
WARNING: unknown action command: plugin[box].selectiditem
ERROR: XML parsing failed - Error: Error #1023
In my XML file I use a plugin:
<!-- 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,
that sounds like an corrupted xml file or download...
which krpano and flashplayer version and what browser are you using?
and do you have a link where that can be seen?
best regards,
Klaus
Is it also possible to load an xml unless it's set in the url? So default load home.xml and if I specified bathroom.xml in the url, it's loading the bathroom?
Hi,
yes, when you use the current swfkrpano.js what would be pretty easy:
<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
Ok, very easy, thank you!
Don’t have an account yet? Register yourself now and be a part of our community!