[SOLVED] Is it possible to toggle visibility of map markers? (Map element skin editor, Leaflet API)

Q&A about the latest versions
Post Reply
SHjelle
Posts: 20
Joined: Wed Apr 08, 2020 10:57 am
Location: Longyearbyen
Contact:

Hi,

Is there a way to further customize the map element you get in the skin editor?
My example is that I have a location with panoramas from different months, user can select between the different months to view that spot during that time.
However, I would love to have the leaflet API map running, but since I can't control which set of markers are visible, I can't do that.

One idea I had was to just build the map separately outside Pano2VR, then have it in an <iframe> within the guide. But... then of course the VR guide does not communicate with the map, so I can't see which marker is active, where I'm looking etc.

My project can be viewed here:
https://learningarcticbiology.info/360/vfg/map/

More specifically here is where I have images from different months:
https://learningarcticbiology.info/360/ ... 0.0,140.00

Right now on these seasonal guides I use still images for the map.
Last edited by SHjelle on Fri Mar 03, 2023 9:14 am, edited 1 time in total.
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
You can do this using tags.
If you group each year of panoramas giving them their own tags, then this tag can be used with the map element.
For example, if you have panoramas tagged 2021 and panoramas tagged 2022, you can then use a Set Value Action with the tag 2022, targeting the map element.
The map element will then only show map pins for the nodes from 2022.
Use a Set Value action with 2021 and only the neds with the 2021 tag will show.
If you then have a Set Value action with no value, then all map pins will show.
To open a project with a tag, just give the map element a Set Value action, the tag you need and target _self.
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/
SHjelle
Posts: 20
Joined: Wed Apr 08, 2020 10:57 am
Location: Longyearbyen
Contact:

This worked! Thanks.
Post Reply