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

text-variable-anchor not support #220

Open
ZachTRice opened this issue May 27, 2019 · 1 comment
Open

text-variable-anchor not support #220

ZachTRice opened this issue May 27, 2019 · 1 comment

Comments

@ZachTRice
Copy link

It appears that there is no support for an array of text-anchor via the text-variable-anchor mapbox style property. i.e.:

 {
      "id": "default_style",
      "source": "OrbitTracks_CloudSat_Ascending",
      "source-layer": "OrbitTracks_CloudSat_Ascending",
      "type": "symbol",
      "layout": {
        "symbol-placement": "point",
        "symbol-avoid-edges": true,
        "text-field": ["get", "label"],
        "text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],
        "text-size": 10,
        "text-letter-spacing": 0.05,
        "text-variable-anchor": ["left", "right", "top", "bottom"],
        "text-radial-offset": 0.5,
        "text-justify": "auto"
      },
      "paint": {
        "text-color": "#fff",
        "text-halo-color": "#999",
        "text-halo-width": 1
      }
    },

Current behavior:
Screenshot_66

Expected behavior (shown using text-anchor: "left"):
Screenshot_67

text-anchor is currently supported but it will only always offset in 1 direction whereas text-variable-anchor, will try the first anchor direction in an array, then, if there is a collision, it will try the next anchor direction, and so on.

@xycarto
Copy link

xycarto commented May 21, 2024

I wanted to check in and see if there was any chance the text-varible-anchor would be supported i the future. I suspect this is a tricky issue due to it's relationship with declutter. It's be a pretty awesome feature if it were added.

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