Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Street labels not centering properly #126

Open
aamirki opened this issue Mar 9, 2023 · 1 comment
Open

Street labels not centering properly #126

aamirki opened this issue Mar 9, 2023 · 1 comment

Comments

@aamirki
Copy link

aamirki commented Mar 9, 2023

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?

@greensopinion
Copy link
Owner

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

feel free to make a contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants