masoud vali
masoud vali

Reputation: 1536

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)

Upvotes: 1

Views: 753

Answers (1)

Cyprien
Cyprien

Reputation: 99

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:

  • Take the latest style you want, such as: https://github.com/openmaptiles/klokantech-basic-gl-style
  • Update the style to point to your source, glyphs and sprites. (use your current style as a basis)
  • Potentially change the name of the fonts if they do not match the ones served by your server (I had to update from "Noto Sans Regular" to "Klokantech Noto Sans Regular")

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.

Upvotes: 2

Related Questions