how to change the start pano programmatically

Q&A about the latest versions
Post Reply
ffurger
Posts: 69
Joined: Mon Mar 24, 2014 11:45 am

how to change the start pano programmatically

Post by ffurger » Tue Apr 16, 2019 4:31 pm

My pano tours are embedded in a larger structure, which means that a user can enter a tour from any of its nodes.

However, I haven't been able to figure out how to set the start panorama programmatically.
When a pano tour is first loaded, it always retrieve the start pano ID. Adding a #nodeID to the start pano URL is of no help.
The JS API, as far as I can tell, doesn't provide any functionality in this regard.

Any ideas or suggestions would be much appreciated.

-Franco

User avatar
thomas
Site Admin
Posts: 2510
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Re: how to change the start pano programmatically

Post by thomas » Wed Apr 17, 2019 6:06 pm

If you look into the direct node access code, you can find the line

Code: Select all

pano.startNode = startNode;
So you can do something like

Code: Select all

pano.startNode = 'node3';
before the xml is loaded to change the starting node. After the config is loaded you can use the normal "openNext" call.
MfG, Thomas

ffurger
Posts: 69
Joined: Mon Mar 24, 2014 11:45 am

Re: how to change the start pano programmatically

Post by ffurger » Thu Apr 18, 2019 9:56 am

OK, thank you very much,

Franco

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests