Adding a layer legend | WordPress.org

[ad_1]

Plugin Contributor
hupe13

(@hupe13)

With an ad-hoc command this is not possible. What do you mean with “layers”?

hello – this reconnects to my previous posts about GPX tracks…in the Extensions forum I have a series of GPX tracks, and I would like the users to be able to identify the tracks…an option would be via a legend. …otherwise, with the name of the track appearing with a mouse hover o clicking on the track itself…any solution will be fine

thanks!

Plugin Contributor
hupe13

(@hupe13)

If you use leaflet-gpx, see this example. If you want to use multielevation, there it is such a control as default.

Plugin Contributor
hupe13

(@hupe13)

You want to distinguish bike and hike tracks, right? May be, you can use leaflet-featuregroup and group by track name. Write in the gpx file between the name tags similar like

  • <name>hike track1</name>
  • <name>hike track1</name>
  • <name>bike track1</name>
  • <name>bike track1</name>

and group with

[leaflet-featuregroup property="name" values="hike, bike" groups="Hike Tracks, Bike Tracks" substr]

Example

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer