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

View: New views
2 Messages — Rating Filter:   Alert me  

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

by Jan Martin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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]


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

by Erik Krause :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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