Query + Direct Node Access component

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

This component uses a query and direct node access to allow you to set variables and opening node, view and projection.
To add the component, download and double-click.
This will open Pano2VR, then select or create a category for the component.

query_code_element.ggskc
(3.07 KiB) Downloaded 12 times

Key features
• Does not show query or Direct node access details in the URL after open (has limitations)
• When used with a shortened URL you can hide the query and node access details
• Allows you to adjust many variables in the query
• Allows Dircet Node Access after the query

Note as it hides the quarry and direct node access data in the address bar, on page refresh this will then be discarded.
The below component does not hide the URL, so also works with a page refresh.

query_code_element_no_hide_url.ggskc
(3.02 KiB) Downloaded 13 times

This does mean all the data will be seen in the address bar but this may not be so important as being able to refresh the page and keep the data.


Queries do have limitations, so please do a web search for query limitations by browser.
Iv not listed them here as this has changed a few time over the years, but a few years ago it was no longer than 80 characters and no more than 100 separate variables.


To use the component open the skin editor and open the components toolbox, then select the category you saved the component to and double-click to add it to your skin.

To help better understand how to use the component there is the test project attached below.

The test project has two variables, var1 which is a true/false variable, when set to true inverts the colours of the Point Hotspot and text boxes.
The second variable var2, is a text variable, use this to add text to the text box, in this project, in this test we add "This is a stereographic projection".
Note you need to add "%20" for a space between text in the URL, so it looks like this: var2=This%20is%20a%20Stereographic%20Projection

The syntax is URL, Query, Direct node access.

Note this example is using var1 and var2, but you can add your own variable names, you will need to add these in the URL, so best advice is keep them short.

This example uses the URL:

Code: Select all

https://support.ggno.me/forum_projects/query/index.html?var1=100&var2=This%20is%20a%20Stereographic%20Projection#node3,-88.8,-67.6,330,9

If you were to use the above URL, you will notice you will only see

Code: Select all

https://support.ggno.me/forum_projects/query/index.html
in the address bar hiding all the data.

To hide all the variables and direct node access data use a short URL, for example: https://go.2vr.at/query
Using the short URL the project will open in Node 3 in a little planet view with inverted colours for the Point Hotspot and text boxes.

The URL https://support.ggno.me/forum_projects/query/index.html
Opens in the first node with default colours.
Attachments
query_dna.zip
(6.07 MiB) Downloaded 13 times
Garden Gnome 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/
User avatar
Hopki
Gnome
Posts: 13032
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

The question was asked can this also be used with tags?
Yes, you can, if your panoramas have tags you can add the tag to the query to show certain nodes in say a menu or map/floor plan.
To do this you set up a variable called something like "var_tag", this would be a text variable with default blank.

Assuming I have a tour with nodes taged with "inside" and "outside".

For a Thumbnail Menu Cloner you would add the action:
Start, Set Value, $(*var_tag), _self
You would add the same action to a Map Element.

Using the query, index.html?var_tag=inside
On open, the thumbnail menu and map will only show the nodes with the tag "inside".

You can also use a logic block to show and hide Point Hotspots, to do this you would use a visible logic block to the Hotspot Icon or Hotspot Template.
Tag, contain, $(*var_tag) true.

The key here is, if the point hotspot points to a node with that tag, it will show in the node you are in. SO the node you are in may not necessarily have the tag.
Regards,
Garden Gnome 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