Title: Adding a layer legend
Last modified: November 14, 2024

---

# Adding a layer legend

 *  Resolved [pibinko2](https://wordpress.org/support/users/pibinko2/)
 * (@pibinko2)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/adding-a-layer-legend/)
 * Hello, I would like to know if it is possible to add a legend with a list of 
   layers to the map…I have reviewed the list of options but can’t seem to locate
   one.
 * I also have the extensions for Leaflet Map downloaded, and in several of the 
   examples shown there the legend appears, but not with an ad-hoc command…
 * TIA for any feedback
 * Andrea

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/adding-a-layer-legend/#post-18134269)
 * With an ad-hoc command this is not possible. What do you mean with “layers”?
 *  Thread Starter [pibinko2](https://wordpress.org/support/users/pibinko2/)
 * (@pibinko2)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/adding-a-layer-legend/#post-18134278)
 * 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](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/adding-a-layer-legend/#post-18134345)
 * If you use `leaflet-gpx`, see this [example](https://leafext.de/extra/listtracks/).
   If you want to use `multielevation`, there it is such a control as default.
 *  Thread Starter [pibinko2](https://wordpress.org/support/users/pibinko2/)
 * (@pibinko2)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/adding-a-layer-legend/#post-18134372)
 * thanks – both work!
 *  Plugin Contributor [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/adding-a-layer-legend/#post-18134380)
 * 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 track2</name>`
    - `<name>bike track3</name>`
    - `<name>bike track4</name>`
 * and group with
 *     ```wp-block-code
       [leaflet-featuregroup property="name" values="hike, bike" groups="Hike Tracks, Bike Tracks" substr]
       ```
   
 * [Example](https://leafext.de/en/grouping/gpxfeature/)
    -  This reply was modified 1 year, 6 months ago by [hupe13](https://wordpress.org/support/users/hupe13/).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Adding a layer legend’ is closed to new replies.

 * ![](https://ps.w.org/leaflet-map/assets/icon-256x256.png?rev=1693083)
 * [Leaflet Map](https://wordpress.org/plugins/leaflet-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-map/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-map/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [hupe13](https://wordpress.org/support/users/hupe13/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/adding-a-layer-legend/#post-18134380)
 * Status: resolved