- Issue created by @dianacastillo
- Status changed to Fixed
6 months ago 3:22pm 31 July 2024 - 🇮🇹Italy itamair
Unlike the Geofield Map module that provides a dedicated plugin system for dynamic Theming Plugin System and Legend Block creation →
the Leaflet module doesn't provide all that ...But this doesn't look a kind of dramatic lack of functionality,
because Leaflet module users can still take advantage of tokens and replacement patterns support in both Leaflet formatter and view style.
With Leaflet the way I would go is the following:
- Generate a specific Vocabulary with specific terms names and attached images, that would act as dynamic (token based) Leaflet Map markers images in the Leaflet formatter and/or view style;
- Render a correspondant Legend generating a Block of the Vocabulary / Taxonomy terms that you are using for dynamic markers ...All simple like that ...
- 🇩🇰Denmark ressa Copenhagen
In the issue where I commented yesterday, you can see how I add a legend 💬 how to load faster or load a static image while loading map Active . In fact, all legends on arst.dk are inserted with that method, for example the latest for bird species per municipality: https://arst.dk/kort?data=fuglearter
As opposed to the solution suggested by @itamair, it's not dynamically created, but a manually defined SVG-image.
Another option would be to extract the values from the filter in the left side (under "FUGLEARTER"), and create it dynamically based on those values, but I just needed a quick solution, and it does the job.
Automatically closed - issue fixed for 2 weeks with no activity.