Re:SoftBank Leads $164M Bet on Mapbox
by dageshi on Tuesday October 10, 2017 @12:35PM
(#15443150)
My main gripe with Mapbox and perhaps it's something that's been fixed recently? Is that you could never force place names to English whe available. So if you're making a map of Tourist map of thailand then the default for all places will obviously be in Thai, if you want to use the English translations which is in the underlying OSM data you can't. But you can if you roll your own...
[ Parent
| on HN ]
The `{name}` field that's the default for most place labels in styles is the "local name", in the local symbol system.
Change it to `{name_en}` in your style for place labels, and you'll get English-script names where available.
Thank you, I will look into it again, admittedly I think it's been at least a year since I last checked into see if it's possible.
Vector tiles can contain names in multiple languages, and the style sheet can decide how to render: prioritise English, prioritise local, or show both.
Check this out https://www.mapbox.com/mapbox-gl-js/example/language-switch/