chartographer icon indicating copy to clipboard operation
chartographer copied to clipboard

Format properties don't work for symbol layers

Open kelsey-taylor opened this issue 9 months ago • 0 comments

Describe the issue

We used a format expression for a set of styles recently that caused some odd rendering with Maplibre in Chartographer:

Image

The expressions for these look like this:

Image

...but with fields to pull from, so really more like:

[
      "case",
      ["any", 
        ["!", ["has", "name"]],
        ["==", ["get", "name"], ""]
      ],
      ["get", "name:en"],
      ["any", 
        ["!", ["has", "name:en"]],
        ["==", ["get", "name:en"], ""]
      ],
      ["get", "name"],
      [
        "format",
        ["get", "name"],
        "\n",
        ["get", "name:en"],
        {
          "font-scale": 0.8
        },
      ],
    ],

It looks like Chartographer is converting these format expressions into step expressions for some reason. Not sure what's going on there.

kelsey-taylor avatar Apr 15 '25 14:04 kelsey-taylor