fix(map): Prefer full state names over abbreviations

Coalesce order: name -> ref -> name:short
Shows California not CA

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matt 2026-05-02 19:42:46 +00:00
commit 238fc68546

View file

@ -280,9 +280,9 @@ function applyBaseLabelStyling(map) {
// Use coalesce to fall back to ref (e.g., "CA") then name (e.g., "California") // Use coalesce to fall back to ref (e.g., "CA") then name (e.g., "California")
map.setLayoutProperty('places_region', 'text-field', [ map.setLayoutProperty('places_region', 'text-field', [
'coalesce', 'coalesce',
['get', 'name:short'], ['get', 'name'],
['get', 'ref'], ['get', 'ref'],
['get', 'name'] ['get', 'name:short']
]) ])
} }
} catch (e) { } catch (e) {