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

Labels not detecting tile edges #221

Open
ZachTRice opened this issue May 27, 2019 · 0 comments
Open

Labels not detecting tile edges #221

ZachTRice opened this issue May 27, 2019 · 0 comments

Comments

@ZachTRice
Copy link

ZachTRice commented May 27, 2019

There seems to be an issue where labels are not detecting / offsetting from tile edges. There is a chance this could be related to #220 because ideally, text-variable-anchor would adjust the label position to the right of the point when it detects an edge.

Screenshot_68

This looks particularly strange when we wrap the base layer
Screenshot_69

layer style example:

{
      "id": "default_style",
      "source": "OrbitTracks_CloudSat_Ascending",
      "source-layer": "OrbitTracks_CloudSat_Ascending",
      "type": "line",
      "paint": {
        "line-color": "#ff0000",
        "line-width": 2
      }
    },
    {
      "id": "default_style",
      "source": "OrbitTracks_CloudSat_Ascending",
      "source-layer": "OrbitTracks_CloudSat_Ascending",
      "type": "circle",
      "paint": {
        "circle-radius": "5",
        "circle-color": "#ff0000"
      }
    },
    {
      "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
      }
    },
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

1 participant