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

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

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

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: 10193
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Wed Dec 11, 2019 10:34 pm

Hi,
Have you seen this page: https://ggnome.com/doc/pano2vr/6/javascript-api/
Regards,
Hopki
Hopki
Garden Gnome Software Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply