Leaflet_views multiple geofield selected customisation

Created on 8 July 2024, 9 months ago
Updated 6 August 2024, 8 months ago

Hi,
I'm using the leaflet views module to display dynamic maps (great module by the way, thanks).
Each entity I am displaying on the map has 2 geofields (a starting point and a finish point). This is a case similar to the one described here ( https://www.drupal.org/project/leaflet/issues/3273738 ) except that both features are points.
I am able to display both points for each feature on the map by selecting both fields in the datasource parameter, so that's great, but I can't find a way to style these points differently (e.g. a green icon for the start point, a red one for the end point).

The replacement tokens don't seem to be of any use here (because they apply to the entire entity, so to both fields at the same time preventing any differenciation). I also tried styling the field itself in the views "Configure field" section, setting the field formatter as "Leaflet map" which allows for fine tuning of icons and display style, but it seems that these parameters are not taken into account when the views format is a "Leaflet map".

So my question is : is there a way to style 2 geofields from a unique entity differently with the leaflet views module ?
If not, may I suggest to add a way to do so ? (which might be as simple as to ading a replacement pattern, or another dynamic variable, which refers to the field being currently displayed by leaflet views, or to allow the field parameters to override the leaflet views global styling parameters).

Thanks

💬 Support request
Status

Fixed

Version

10.2

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024