Set language on Vector Tiles Map (Mapbox)

27 views
Skip to first unread message

André Lergier

unread,
Nov 15, 2021, 6:31:14 AM11/15/21
to GeoAdminCh API
Hi there

I use your Vector Tiles Map with Mapbox. So I refer to the following style: https://vectortiles.geo.admin.ch/styles/ch.swisstopo.leichte-basiskarte.vt/style.json

How can I change the language of the labels based on the language of the website?
As I see on this page, your vector tiles exist in multiple languages, but I don't know how I can use them.

Thanks for you help!

GeoAdminCh API

unread,
Nov 15, 2021, 7:08:48 AM11/15/21
to GeoAdminCh API

André Lergier

unread,
Nov 15, 2021, 1:20:37 PM11/15/21
to GeoAdminCh API
Thanks!

It might be useful to create a Codepen for this example, so it's not necessary to grab the right lines from the source code...

Reply all
Reply to author
Forward
0 new messages