Reputation: 338
I am using style mapbox://styles/mapbox/dark-v9 with Mapbox GL JS API, and I would like to reduce the density of labels.
As far as I researched, density is based on labels collision boxes.
Is there an option where I could set the density as I create the Map Javascript Object?
Or, can I increase labels' collision boxes by any means? Add some padding, for instance?
Any help is appreciated! Thanks!
Upvotes: 0
Views: 1282
Reputation: 3055
The text-padding symbol layout property does this https://www.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-text-padding.
It's probably easier to copy the dark style in Mapbox Studio and set this value for label layers.
Upvotes: 2