ZeLonewolf / openstreetmap-americana

A quintessentially American map style

Home Page:https://americanamap.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Append secondary name glosses to labels depending on context

1ec5 opened this issue · comments

We gloss many kinds of labels with the name in the local language (#592), but this treatment is also useful for other names that a place might be known by. We could add these names to the label depending on the context. For example, a street name label could contain alt_name or official_name in smaller text in parentheses, at least at high enough zoom levels where these additional names wouldn’t collide out more important information. A place’s label could go from listing the nat_name to the reg_name to the loc_name as you zoom in progressively.

As we’ve done with the multilingual labels, we should try to keep the gloss from repeating the primary name in front of the gloss. This blog post demonstrates an approach to glossing peaks with alt_name, along with some deduplication. The style specification doesn’t give us many tools for deduplication, but we can at least perform case and diacritic folding.

For the most part, OpenMapTiles doesn’t expose these secondary name keys. The one exception is route names, which are now available in the transportation_name layer’s route_#_name properties. We might be able to rig something that glosses one of these names if we don’t have a shield for that route network.

Thanks to @n76 for cluing me into his prior work in this area.