Skip to content

Duplicate labels on polygons #801

Open
@westnordost

Description

TANGRAM VERSION:

0.21.1

ENVIRONMENT:

Win10, Firefox

TO REPRODUCE THE ISSUE, FOLLOW THESE STEPS:

Copy&Paste this style into https://play.tangram.city/?#20.00000/53.59579/9.94521

sources:
    jawg:
        type: MVT
        url: https://tile.jawg.io/streets-v2/{z}/{x}/{y}.pbf
        max_zoom: 16
        url_params:
            access-token: Rqx0Qqc3TAHCG5MVXmxSAkaSgwm5nVSq4fV8IeTxiq9cieOQFfOt5BsYjK8Cwkqr

layers:
    buildings:
        data: { source: jawg, layer: building }
        draw:
            polygons:
                order: 100
                color: "#999"
    anything:
        data: { source: jawg, layer: building }
        draw:
            text:
                text_source: function() { return "✕" }
                priority: 1
                collide: false
                font:
                    fill: "#f00"
                    size: 26px
                    weight: bold

RESULT:

You'll see this:

image

There is an extra duplicate label not at the centroid but at the first node of the polygon.

This does not happen for all polygons with labels, only for some.

Tangram-ES has an identical issue.

EXPECTED RESULT:

For polygons, there is only one label.

ADDITIONAL INFORMATION:

This is neither a problem with the OSM data, see: https://www.openstreetmap.org/way/612211229#map=19/53.59555/9.94558

Nor an issue with jawg.io data, see
image
https://www.jawg.io/docs/apidocs/maps/streets-v2/#19.89/53.5957094/9.9453778

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