• Resolved pibinko2

    (@pibinko2)


    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

    (@hupe13)

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

    Thread Starter pibinko2

    (@pibinko2)

    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.

    Thread Starter pibinko2

    (@pibinko2)

    thanks – both work!

    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 track2</name>
    • <name>bike track3</name>
    • <name>bike track4</name>

    and group with

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

    Example

    • This reply was modified 4 months, 1 week ago by hupe13.
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.