Hello,
I'm new to Javascript.
Is there any JS example showing how can I make my pano url to look like this http://www.mysite.com/pano1#30,2,70
I want visitors to be able to copy and paste any view that they like.
Thank you!
Hello,
I'm new to Javascript.
Is there any JS example showing how can I make my pano url to look like this http://www.mysite.com/pano1#30,2,70
I want visitors to be able to copy and paste any view that they like.
Thank you!
you do it like this:
http://krpano.com/krpano.html?pano=panos/kirche/kirche.xml&view.hlookat=10&view.vlookat=-10&view.fov=30&
and the html has something like this:
<div id="krpanoDIV">
<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="swfkrpano.js"></script>
<script type="text/javascript">
var swf = createswf("krpano.swf");
swf.passQueryParameters();
swf.embed("krpanoDIV");
</script>
Display More
the passQueryParamaters method of the swfobject passes parameters from the url to the swf (krpano)
Thanx for reply, Zephyr! But I'm looking for something like this http://www.360cities.net/image/nea-flog…#0.00,0.00,70.0
Hi,
in this case you would need to parse that parameters manually with Javascript and set it,
e.g.
// get and parse the # parameters here:
var hlookat = ...; // sorry, I don't know yet how to get them, but it's shouldn't be difficult to find that out...
var vlookat = ...;
var fov = ...;
// then load the viewer and set that variables
var swf = createswf("krpano.swf");
swf.addVariable("view.hlookat", hlookat);
swf.addVariable("view.vlookat", vlookat);
swf.addVariable("view.fov", fov);
swf.embed("krpanoDIV");
Display More
best regards,
Klaus
Thank you, Klaus!
Don’t have an account yet? Register yourself now and be a part of our community!