osm-americana / openstreetmap-americana

A quintessentially American map style
https://americanamap.org
Creative Commons Zero v1.0 Universal
182 stars 59 forks source link

Label major waterways at lower zoom levels #600

Open 1ec5 opened 1 year ago

1ec5 commented 1 year ago

This style doesn’t seem to label any waterway until zoom level 8 or 9, but some major waterways should be labeled at lower zoom levels too. For example, labels for the Rio Grande, Mississippi, Missouri, and Ohio at zoom level 4 would help explain why the international and state boundaries of the U.S. look as they do.

1ec5 commented 1 year ago

@jleedev pointed out in Slack that the labels do show up at lower zoom levels as long as text-max-angle is very high. Cranking up the text-max-angle isn’t really an option, because the features are very curvy. This issue technically affects road name labels as well (#514), but rivers are particularly impacted because they tend to be sinewy.

We need more aggressively simplified geometries at these lower zoom levels in order to show the labels. The style specification has a tolerance option for GeoJSON sources but can’t support this option for vector tile sources: mapbox/mapbox-gl-js#6129. So the simplification would need to happen in the vector tile generation process. Alternatively, as a workaround, we could do some feature querying at runtime to copy these geometries into a GeoJSON source, which we could then apply the tolerance option to. But that kind of seems like overkill for just these river labels.