how to change the start pano programmatically

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

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
Chief Gnome
Posts: 2611
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

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: 102
Joined: Mon Mar 24, 2014 11:45 am

OK, thank you very much,

Franco
Post Reply