vectoropenstreetmapmapbox-gl-jsmbtilesopenmaptiles

Multi language support in Downloaded mbtiles


I've downloaded mbtiles from openmaptiles and Also displayed them in web page. I used this to translate labels from english to other languages. but it doesn't work. Does anybody know how to change languages? (Should mention that i display it with mapbox gl)


Solution

  • In a similar situation, the styles I got from running the docker setup of tileserver-gl contained many layers such as: "poi_label-en". These label are preventing the new label created by klokantech/openmaptiles-language to display properly (the library will create layers such as "poi_label-de" based on the definition of "poi_label" for German for instance).

    I'd suggest the following steps to make openmaptiles-language works properly:

    Then if you follow klokantech/openmaptiles-language instructions and example it should work properly.

    A quick way to check your javascript implementation would be to use the cloud solution of openmaptiles for the tiles and the style. If it works properly, the javascript part is OK and the problem is in how your style is defined.