Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On Custom Markers page is a description on how to create dynamic styles using OpenLayers Styles and variables from View. There is also other approach, using style field in OpenLayers Data Overlay options. This one seems to be much more simple and limited.
There should be some info, which will help to guide decisions abou which approach to use.
Also, I'm not sure if Custom Markers is a correct name for the page, "Dynamic styles" seems more appropriate to me, since we can change not only externalGraphic
, but also other properties.
Comments
Comment #1
milos.kroulik CreditAttribution: milos.kroulik commentedI guess I should close this issue because of this commit.
Comment #2
PolSure!
I hope you like the changes! It's a major improvement!
Comment #3
jlsevillano CreditAttribution: jlsevillano commentedI'm trying to select the style from the value of the other field, for example,my content type has one field: Production (low,medium,high) and i want to select a different fillcolor (openlayers style) depending the field production value.
I know that in openlayers 7.2x i have (format: OL vector data overlay - options) one field that i can select the style, but not runs ok. My markers has not png image, only fillcolor.
Some way to resolve it?
Thanks.
Comment #4
milos.kroulik CreditAttribution: milos.kroulik commentedYes, I needed to solve the same problem. There are two way to approach this problem:
Also, this issue is closed. Next time, please open separate support request for your question.