ShamalKP
(Shamal Kp)
August 4, 2023, 4:49pm
#1
my code looks like below:
locationMap.current = tt.map({
container: locationMapContainer.current ? (locationMapContainer.current as HTMLElement) : ‘’,
key: mapKey,
language: “en-US”,
style: ttMapStyle, //imported from json which is working fine
zoom
})
If i add my custom style, then language is resetting to native
please help me on this
ShamalKP
(Shamal Kp)
August 4, 2023, 7:13pm
#2
I also tried adding language in style json as below but no use:
“sources”: {
“vectorTiles”: {
“maxzoom”: 22,
“minzoom”: 0,
“tiles”: [
“https://a.api.tomtom.com/map/2/tile/basic/{z}/{x}/{y}.pbf?key= ” + mapKey + “&language=en-US”,
“https://b.api.tomtom.com/map/2/tile/basic/{z}/{x}/{y}.pbf?key= ” + mapKey + “&language=en-US”,
“https://c.api.tomtom.com/map/2/tile/basic/{z}/{x}/{y}.pbf?key= ” + mapKey + “&language=en-US”,
“https://d.api.tomtom.com/map/2/tile/basic/{z}/{x}/{y}.pbf?key= ” + mapKey + “&language=en-US”,
],
“type”: “vector”
}
},
maloleps
(Przemek Malolepszy)
August 11, 2023, 9:10am
#3
Tile v2 already contains all translations. So you just need to pick translation that you want.
It is documented here: Content | Map Display API