Map Element with info text which opens a website

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
It was asked that using the Map Element in the skin that it should show an information box on mouse over and when the information box is clicked it should then open a web page in the player.

The attached project does this and a bit more and this is how:

The info text box picks up its text from the nodes user data Information text field.
The URL is also stored in the user data, Source.

The skin is using variables and logic blocks but the important part is the text box is using the place holder $(ui), this pick up the text in the user data text field “user data Information”.
The text box also has an action, Mouse Click, Set Value, Target web_page.
The Value is an iframe which also uses a user data place holder $(us).

Code: Select all

<iframe src="$(us)" width="100%" height="100%" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" frameborder= “0"></iframe>
So in the her data Source you enter the URL it should open.

I have pimped out the skin so you can select if you want the URL to open in the player or a new browser window but the above is the key points.

One other thing is there should not be any gap between the map pin and text box, if there is the mouse will lose focus and the text box will hide, with it overlapping the mouse keeps focus on the map pin as the text box is a child of it.

Regards,
Hopki
Attachments
MapPinURL.zip
(3.77 MiB) Downloaded 182 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/
Post Reply