PDA

View Full Version : How to synchronise rotation of successive panos


BillB
04-23-2008, 01:16 PM
Hi folks

I would like to be able to step through say 3 panoramas, all of the same location, but with certain features changed by photo-editing say view 2 and 3 before uploading the panos. To make the user experience, and the comparison between the images, as clear as possible, when the user clicks a button which loads the next scene, I want it to open with the same rotation angle (and, I guess, zoom and tilt, although I might disable those). So whatever angle the user has panned around to, the next image opens at the same angle. I am guessing that there is probably a way to pass the current pano's rotation angle as a variable to the next pano via the loadpano(...&pan=) command, but I don't know how to code it.

Can anyone help, with a code example please?

Thanks in advance :)

phberlin
04-23-2008, 02:27 PM
Hi BillB,

there's a built-in function for that in FPP, called "pano.leash=lock" (see documentation). So it's as easy as this: Just define a spot that loads the next pano like this:

<spot id="nextpano" url="images/yourbutton.png"
static="1" salign="TR" align="TR"
onClick="pano.leash=lock;loadPano(panoName=panos/nextpano,300);"
/>

Regards, Ph.

BillB
04-23-2008, 03:03 PM
Ph

Thanks so much for the quick and accurate reply - exactly what I wanted, and so easy to do. I thought I had read the documentation, but obviously not as carefully as I should have!

Thanks again

phberlin
04-23-2008, 09:53 PM
Glad I could help :-). Regards, Ph.