mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Spanish language labels can be incorrect and limited

Open interwebjill opened this issue 1 year ago • 1 comments

We are using:

map.setLayoutProperty(label, 'text-field', ['get', `name_${language-abbr}`]

to switch between label languages in our Mapbox Studio custom map. The label data source is Mapbox Streets v8. The text field formula I am using in Mapbox Studio is

to-string(coalesce(name, name_local))

When I use the option 'es' for the language-abbr in the code above, Long Beach in Los Angeles changes to 'Kragujevac', which is a city in Serbia. Please see the screenshots below.

For now, is there a workaround to specifically replace the 'Kragujevac' label with 'Long Beach' when the label language is set to 'es'? For a more proper fix, I'd love to be able to pass this issue on to the appropriate Mapbox team.

There are also many missing Spanish language labels in Los Angeles County. I cannot get Spanish labels for roads, parks, and other POI's. As a result, these labels disappear on the map when the language is changed to Spanish. Airports, waterways, and streams have good coverage!

mapbox-gl-js version: 2.10.0

browser: Any

Expected Behavior

Screen Shot 2022-09-20 at 4 32 26 PM

Actual Behavior

Screen Shot 2022-09-20 at 4 32 53 PM

interwebjill avatar Sep 21 '22 00:09 interwebjill

Thanks for reporting this issue @interwebjill!

We're looking into the incorrect label for Long Beach. As a workaround, you can add an override to always display the name in English as described here.

There are also many missing Spanish language labels in Los Angeles County. I cannot get Spanish labels for roads, parks, and other POI's. As a result, these labels disappear on the map when the language is changed to Spanish. Airports, waterways, and streams have good coverage!

I think you should be able to see fallbacks to English labels by using the same expression as studio, something like this (untested) ['coalesce', ['get', 'name_${language-abbr}'], ['get', 'name']]

SnailBones avatar Sep 21 '22 16:09 SnailBones

The incorrect Spanish label for Long Beach has been resolved.

SnailBones avatar Oct 21 '22 18:10 SnailBones