1

I want to show the map in my app in English (no localized names in the language most people can't read)

L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',

I'm using mapbox tiles and it's working for me, but all the signs are shown in local languages. Since my app is in English, I don't want to show Chinese signs to my visitors.

I found the docs about how to change the language in mapbox.js, but I don't want to use their library. Is there a way to build tiles url so it would've been aware about the language preferences?

update: mapbox is not really an important requirement. I'm looking for the tile with labels in English. Can't find any

0

If you're using Mapbox Classic you could change the map {id} to use mapbox.run-bike-hike which uses English globally. See https://www.mapbox.com/api-documentation/#maps

Otherwise you would need to modify the default streets style as described at https://www.mapbox.com/help/change-language/#change-label-language-in-mapbox-studio-classic.

If you're Mapbox GL (rather than classic) the instructions are at https://www.mapbox.com/help/change-language/. You can still include raster tiles from your Mapbox GL style in your Leaflet application with https://www.mapbox.com/api-documentation/#retrieve-raster-tiles-from-styles

  • I'm using classic option and mapbox.run-bike-hike is exactly what I was looking for. Thanks! – user93757 Mar 21 '17 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy