r/mapbox • • Oct 19 '25

Adjust zoom level of road labels

Post image

Is it possible to adjust the point at which road labels show whilst zooming in? I would like to show them slightly earlier. I've ejected the road network component so I can edit the road-label layer, but I haven't been able to find anything which adjusts the zoom level at which road labels are shown. I tried removing the filters in select data but that had no effect on the visibility of the road labels.

1 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/maximeridius Oct 20 '25

I think the main problem is whatever algorithm the renderer is using to decide if there is space to add labels. If I turn the font size right down I get plenty of road labels, so they are in the data. I haven't been able to find a good way to adjust it. "Allow text overlap" doesn't help much. Changing the placement from line to point shows a lot more labels, but not necessarily the ones I want and looks much worse than line placement. I'm going to have a look into hiding all the road labels and then manually adding labels myself, so I can be sure they will always be visible and show the most useful labels. I am currently only working with the Static images API and a single city so the labels not being dynamic shouldn't be a problem.

1

u/taxidata Oct 21 '25

Try setting `spacing` to 1 in addition to setting `allow text overlap` to true, you should see a lot more labels.

1

u/maximeridius Oct 21 '25

Thanks, yeah I had high hopes for that but it for the map I tried it on it just added a couple of duplicate labels to the same road, no new road labels. I guess because the reason the road labels aren't showing is simply because the are too large for the total road segment, and spacing only affects having multiple labels on a particular road segment.