Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Label placement along geometry broken despite symbol-placement:line #6974

Closed

Description

@johannesanderwald

Hello,

We are developing an app and the problem is that the label placement is broken. The label is not rendered according to the line it belongs. However, it works fine in GL JS.

We are using Android API Level 16.

What can we do about it?

device-2016-10-25-170039

Activity

  1. muesliq commented on Nov 9, 2016

    @muesliq

    Here the same area as the first screenshot rendered in GL JS:
    screen shot 2016-11-09 at 15 24 34

  2. jfirebaugh commented on Nov 9, 2016

    @jfirebaugh
    Contributor

    Can you please provide the style and code used in those two screenshots?

  3. jfirebaugh commented on Nov 9, 2016

    @jfirebaugh
    Contributor

    Also, can you be more specific about what rendering you expected in the first case?

  4. muesliq commented on Nov 10, 2016

    @muesliq

    Hi @jfirebaugh, look at the labels (ski pistes and lifts) here:

    mapbox-gl-bug

    Style (the expected rendering is symbol-placement:line):

        {
          "source": "pistes",
          "type": "symbol",
          "layout": {
            "text-field": "{name}",
            "text-font": ["Open Sans Regular"],
            "symbol-spacing": 400,
            "text-size": {"stops": [[8, 8], [20, 20]], "base": 1.2},
            "text-padding": 2,
            "text-letter-spacing": 0.05,
            "symbol-placement": "line",
            "text-max-angle": 40
          },
          "id": "pistes-label",
          "source-layer": "road_label",
          "paint": {
            "text-halo-width": {"stops": [[13, 1], [20, 2]]},
            "text-halo-color": "hsla(0, 0%, 100%, 1)",
            "text-color": "hsla(0, 0%, 0%, 0.8)"
          },
          "minzoom": 13,
          "filter": ["in", "class", "aerialway", "piste"]
        },
    

    (In case you wonder: The colors of the lines were changed between the two versions, yet the labels weren't changed.)

    The same problem also appears with road labels ("Oberer Sonnberg"):

    device-2016-10-25-170222

  5. jfirebaugh commented on Nov 10, 2016

    @jfirebaugh
    Contributor

    Thank you for the clarification. I see what you're referring to now and it looks like the same issue as #6922. I'm going to close this issue and ask for additional information in #6922.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions