PlaceLabelText

Place / city label display helpers.

Maghreb OSM/name strings often pack Latin + Tifinagh + Arabic into one field. Android's default typeface covers Latin/Arabic/Cyrillic/Greek but not Tifinagh, which shows up as nonsense symbols (Casablanca, Tamanrasset, …). Prefer English when present; when Latin is already in the string, keep the Latin run only; otherwise drop glyphs the font cannot draw.

Functions

Link copied to clipboard
fun resolvePreferredName(feature: Feature, labelKeyPath: String = "name"): String?

English name when available, else local name, then sanitizeForDisplay.

Link copied to clipboard

Cleans a resolved label string for GLES atlas drawing.