You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fall back to abbreviated names when space is constrained #1239
When there isn’t enough room to label a feature by its primary name, the stylesheets should attempt to label it by a shorter name. This will increase label density and help users navigate the map when it’s filtered to an unfamiliar time period.
Once OpenHistoricalMap/ohm-deploy#661 lands, the tiles will contain short_name properties that correspond to the short_name=* key. This key contains another name that is shorter than name=*, typically an abbreviation of some sort. MapLibre doesn’t have a built-in mechanism for varying text-field by allotted space (maplibre/maplibre-style-spec#1432), so we’d need to duplicate each of the symbol layers to hold the short_names. We’ll also need to undo the work in #1002 to offset labels, or else a given feature could be labeled twice if there’s enough room.
The short_name=* tag is in the contemporary local language, just like name=*. If we’ve localized the name to something else, like name:es=*, we shouldn’t use short_name=* at all.
Activity
1ec5 commentedon Dec 15, 2025
The
short_name=*tag is in the contemporary local language, just likename=*. If we’ve localized the name to something else, likename:es=*, we shouldn’t useshort_name=*at all.