Skip to content

Fall back to abbreviated names when space is constrained #1239

Description

@1ec5

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.

Activity

  1. added theissue type on Dec 15, 2025
  2. 1ec5 commented on Dec 15, 2025

    @1ec5
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions