flutter-vector-map-tiles icon indicating copy to clipboard operation
flutter-vector-map-tiles copied to clipboard

Street labels not centering properly

Open aamirki opened this issue 3 years ago • 1 comments

I have this set in my stylesheet for highway_name_other:

{
      "filter": [
        "all",
        [
          "!in",
          "class",
          "motorway",
          "trunk",
          "primary",
          "secondary",
          "tertiary"
        ],
        ["==", "$type", "LineString"]
      ],
      "id": "highway_name_other",
      "layout": {
        "symbol-placement": "line-center",
        "text-anchor": "center",
        "text-justify": "center",
        "symbol-spacing": 350,
         "text-field": [
          "concat",
          ["get", "name:latin"],
          [
              "case",
              ["all", ["has", "name:nonlatin"], ["is-supported-script", ["get", "name:nonlatin"]]],
              ["concat", " ", ["get", "name:nonlatin"]],
              ""
          ]
      ],
        "text-font": ["Noto Sans Regular"],
        "text-max-angle": 30,
        "text-pitch-alignment": "viewport",
        "text-rotation-alignment": "map",
        "text-size": 12,
        "visibility": "visible"
      },
      "paint": {
        "text-color": "#888"
      },
      "source": "openmaptiles",
      "source-layer": "transportation_name",
      "type": "symbol"
    },

Which I expect to center the text onto these roads, as you can see when I load this style into Maputnik: image However if I do the same in Flutter Map using this plugin I get this result: image It seems that the text is not centering properly but only on Flutter Map, which is strange that the result would be different at all. Is this expected?

aamirki avatar Mar 09 '23 21:03 aamirki

this is likely a bug in https://github.com/greensopinion/dart-vector-tile-renderer

feel free to make a contribution

greensopinion avatar Mar 19 '23 23:03 greensopinion