pan, tilt, roll and FoV in url

Q&A about the latest versions
Post Reply
User avatar
zap
Posts: 391
Joined: Thu May 29, 2008 12:13 pm
Contact:

Hi
is it possible to open a pano2vr panorama with its pan, tilt, roll and FoV parameter by browser/ url command

Kind of
http://panorama.html&pan=20&tilt=40&roll=0&FoV=40

how could I do this ?


Why would this be needed:
User clicks on a hyperlink opening a panorama from a specific angle and POV
opening the panorama from another hyperlink will give him another angle and POV


thx for your assistance.
360 Panorama Creators http://luxmap.com
Google Trusted Photographer
User avatar
JimWatters
Posts: 329
Joined: Thu Oct 07, 2010 6:16 pm
Location: Saint John, New Brunswick
Contact:

User avatar
zap
Posts: 391
Joined: Thu May 29, 2008 12:13 pm
Contact:

Hi Jim

Thx for your feedback.
but wouldn't this mean I have to create a html per fov/tilt ec. like

Link 1 : goto pano1.html1
Link 2 : goto pano1.html2
etc..

that would mean it's a static dimension and I can not enter it anyway dyanmically like if I define it in the url parameter.
360 Panorama Creators http://luxmap.com
Google Trusted Photographer
User avatar
JimWatters
Posts: 329
Joined: Thu Oct 07, 2010 6:16 pm
Location: Saint John, New Brunswick
Contact:

It is necessary to parse the URL to find if any parameters are there and if so use them.

Code to get parameters from the URL, add some Javascript like this.
http://code-tricks.com/get-url-paramete ... avascript/

So with a URL like: http://panorama.html?pan=20&tilt=40&FoV=40
You can use the following snippet to move the pano to the position in the URL
var vPan= getUrlParameters("pan", "", true);
var vTilt= getUrlParameters("tilt", "", true);
var vFoV= getUrlParameters("FoV", "", true);

pano.moveTo(vPan,vTilt,vFov,10);

You could use a similar method to constantly set the current URL to the current Pan, Tilt, and FoV, But this might not be desirable because the back button would then only take you back to the last pan.
Better would use the data in your share button.
Post Reply