Page 1 of 1

Custom Node Id in javascript

Posted: Sat Nov 30, 2019 10:04 am
by nikolakakis.manolis
Hello!
How can I get the current panorama Custom Node id from javascript?

Longer version of the question :p
I want to be able to get the full url of specific panorama (eg https:// vrurl/index.html#CUSTOMNODEID,Pan,Tilt,FOV,Projection) at any time that will contain the Pan, Tilt, Fov and Projection code, however I do not know how to get the Custom Node Id that is set in the User Data tab of the Virtual Tour.

Code: Select all

 var theTilt = pano.getTilt();
 var theFov = pano.getFov();
 var thePan = pano.getPan();
The following is NOT returning the CustomNodeID

Code: Select all

pano.getNodeUserdata()
Thank you!

Re: Custom Node Id in javascript

Posted: Tue Dec 10, 2019 7:33 pm
by nikolakakis.manolis
Hello again (...)
I see the values in the output pano.xml file e.g customnodeid="seljavallalaug". Shall I parse this xml, or is there an existing function that can return it?
Thank you in advance (...)

Re: Custom Node Id in javascript

Posted: Wed Dec 11, 2019 3:31 pm
by nikolakakis.manolis
var currentnode = pano.getCurrentNode();
var currentnodedata = pano.getNodeUserdata(currentnode);
var currentcustomnodeid = currentnodedata.customnodeid;

At least I figured out not to waste time to post questions in this forum

Re: Custom Node Id in javascript

Posted: Wed Dec 11, 2019 10:34 pm
by Hopki
Hi,
Have you seen this page: https://ggnome.com/doc/pano2vr/6/javascript-api/
Regards,
Hopki