Skip to content

Scale dependency being ignored on TextSymbolizer #321

@jnewmoyer

Description

@jnewmoyer

Bug

Describe the bug
Converting from SLD to OpenLayers style, my labels are showing at all zoom levels, even though the SLD uses a max scale denominator.

To Reproduce
Steps to reproduce the behavior:

  1. Create an SLD with a label style and max scale denom
  2. Convert the style to geostyler and then to OpenLayers
  3. Style a vector layer with the OL style.

Expected behavior
the labels appear only at scales inside of 1:5M.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 91.x

Additional context

The geostyler rule after converted:

{
      "name": "Labels",
      "scaleDenominator": {
        "max": 5000000
      },
      "symbolizers": [
        {
          "kind": "Text",
          "label": "{{title}}",
          "color": "#ffffff",
          "haloWidth": 1,
          "haloColor": "#000000",
          "offset": [
            0,
            10
          ],
          "size": 19,
          "font": [
            "SansSerif.bold"
          ],
          "fontStyle": "normal",
          "fontWeight": "bold"
        }
      ]
    }

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions