Search code examples
androidmapboxosmdroid

Fonts not recognized in mapbox tile in osmdroid


I am using osmdroid to using map in my simple application and using mapbox.mapbox-streets-v8 as a TileSource:

tileSource.setAccessToken("******");
tileSource.setMapboxMapid("mapbox.mapbox-streets-v8");
mapView.setTileSource(tileSource);

But fonts on map is not known like this:

enter image description here

Look at font's of place?


Solution

  • The Osmdroid library supports only bitmap tiles at the moment. Mapbox supports both vector and bitmap tiles. That means, that the broken text had to be rendered improperly at the mapbox side. Unfortunatelly you cannot do anything to fix that in your android application.

    You should contact mapbox and report the problem to them. Apparently their bitmap tiles for mapbox.mapbox-streets-v8 are not able to display Persian alphabet properly and I am sure they are not aware of that. Go to this link: https://www.mapbox.com/contact/support/#bug/map_api (you have to be logged in into your Mapbox account) and upload the screenshot you provided here. You can also copy the description of the error from my response and add some information about the location of the screenshot. You can also add a link to this SO question.