0

I am trying to use data from my tileset (.zipped shape file) to show Text Label over my tile layer. However, instead of adding a centered label, it's adding multiple-texts sometimes.

For example 38 or 37.

enter image description here

If I zoom, it adds more

enter image description here

How can I force it to have only single label in the center of the tile instead?

1

If you're trying to label a polygon then you need to tell Mapbox GL JS exactly where you want that label to be for each polygon. You need to do that by creating your own point from the polygon and labelling that instead of the polygon. Otherwise it will label once per tile like what you're seeing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.