Skip to content

Cluster style does not update when toggling themes on or off. #2136

@dahlalex

Description

@dahlalex

Describe the bug
It seems that the cluster style does not update when toggling themes on or off.

To Reproduce
Steps to reproduce the behavior:

  1. Layers:
{
      "name": "origo-cities",
      "title": "Origokommuner",
      "group": "root",
      "source": "data/origo-cities-3857.geojson",
      "style": "origo-logo",
      "clusterStyle": "origo-logo-cluster",
      "layerType": "cluster",
      "type": "GEOJSON",
      "thematicStyling": true,
      "attributes": [
        {
          "name": "name"
        }
      ],
      "visible": true
    },
  1. Styles:
"origo-logo": [
      [
        {
          "filter": "[name] == 'Hallstahammar'",
          "label": "Hallstahammar",
          "circle": {
            "radius": 10,
            "stroke": {
              "color": "rgba(0,0,0,5)",
              "width": 2.5
            },
            "fill": {
              "color": "rgba(255,0,255,0.7)"
            }
          }
        }
      ],
      [
        {
          "filter": "[name] != 'Hallstahammar'",
          "label": "Annat",
          "circle": {
            "radius": 10,
            "stroke": {
              "color": "rgba(0,0,0,0.5)",
              "width": 2.5
            },
            "fill": {
              "color": "rgba(67,97,238,0.7)"
            }
          }
        }
      ]
    ],
    "origo-logo-cluster": [
      [
        {
          "circle": {
            "radius": 16,
            "fill": {
              "color": "rgba(248,150,30,0.5)"
            },
            "stroke": {
              "color": "rgba(248,150,30,0.9)",
              "width": 4
            }
          }
        },
        {
          "text": {
            "font": "Bold 12px Arial",
            "textAlign": "center",
            "text": "size",
            "fill": {
              "color": "rgba(0,0,0,1.0)"
            },
            "stroke": {
              "color": "rgba(248,150,30,0.3)",
              "width": 2
            }
          }
        }
      ]
    ],

Expected behavior
The cluster style should automatically refresh and update whenever a theme is enabled or disabled. This would ensure that the visual representation remains accurate and consistent with the active theme.

Video

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugMay be fixed by a core developer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions