Custom Node Id in javascript

Q&A about the latest versions
Post Reply
nikolakakis.manolis
Posts: 6
Joined: Mon Jan 21, 2019 1:19 pm

Custom Node Id in javascript

Post by nikolakakis.manolis » Sat Nov 30, 2019 10:04 am

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!

nikolakakis.manolis
Posts: 6
Joined: Mon Jan 21, 2019 1:19 pm

Re: Custom Node Id in javascript

Post by nikolakakis.manolis » Tue Dec 10, 2019 7:33 pm

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 (...)

nikolakakis.manolis
Posts: 6
Joined: Mon Jan 21, 2019 1:19 pm

Re: Custom Node Id in javascript

Post by nikolakakis.manolis » Wed Dec 11, 2019 3:31 pm

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
Last edited by nikolakakis.manolis on Thu Dec 12, 2019 8:19 am, edited 1 time in total.

User avatar
Hopki
Gnome
Posts: 9652
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: Custom Node Id in javascript

Post by Hopki » Wed Dec 11, 2019 10:34 pm

Hi,
Have you seen this page: https://ggnome.com/doc/pano2vr/6/javascript-api/
Regards,
Hopki

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 11 guests