ptviewer: How to display next pano with pan tilt fov already applied?

2 messages Options
Embed this post
Permalink
Jan Martin

ptviewer: How to display next pano with pan tilt fov already applied?

Reply Threaded More More options
Print post
Permalink
Hi all,

may I ask for your advice with the following ptviewer problem?

I am building a kind of "unlimited" panorma tour (more like streetview).

To do this the next image needs to have same pan tilt fov as the recent
image.
The following function does this, BUT always displays the next image with
default 0,0,0 before pan tilt fov happens.

I wonder if there is a way to display the new image with pan titl fov
already applied?

Thanks,
Jan

function nextpano(nextimage) {

pan =document.ptviewer.pan();
tilt=document.ptviewer.tilt();
fov =document.ptviewer.fov();

document.ptviewer.newPano('{ file='+nextimage+'}')

// NOT WORKING, because Image not completely loaded yet.
document.ptviewer.gotoView(pan, tilt, fov);

// The following works mostly, but fails if loading needs more then 0.5
seconds.
// Also wrong part of panorama is displayed before pan tilt fov happens.
setTimeout("document.ptviewer.gotoView(pan, tilt, fov)",500);
}


[Non-text portions of this message have been removed]

Erik Krause

Re: ptviewer: How to display next pano with pan tilt fov already applied?

Reply Threaded More More options
Print post
Permalink
Jan Martin wrote:

> To do this the next image needs to have same pan tilt fov as the recent
> image.
[...]
> pan =document.ptviewer.pan();
> tilt=document.ptviewer.tilt();
> fov =document.ptviewer.fov();
>
> document.ptviewer.newPano('{ file='+nextimage+'}')

The PTViewer documentation on
http://webuser.fh-furtwangen.de/~dersch/PTVJ/doc.html
says: "newPano( String ); Load new Panorama as specified in String. The
syntax for String is identical to that of the panorama list."

I think it should be possible (but never tried) to specify pan, tilt and
fov same as you specify file:
document.ptviewer.newPano('{ file='+nextimage+'}{pan='+pan+
                           '}{tilt='+tilt+'}{fov='+fov+'}')


best regards
--
Erik Krause
http://www.erik-krause.de