How to use map.osm xml file in osmdroid instead of

2019-06-14 02:40发布

问题:

I have received a customized osm file (map.osm) from my customer to integrate Android project, but I don't know how to use that file, usually I'm using

mapView.setTileSource(TileSourceFactory.MAPNIK);   

So, how I can use the map.osm file my android project.

回答1:

Sorry but AFAIK it doesn't work like that. A Tilesource is a rendered raster map of geodata. Thus you need to render the data first in a local renderer, for example Maperiative or TileMill. They can create a tile folder structure output, that can be used by OSMdroid instead of the official tile sources: http://code.google.com/p/osmdroid/wiki/HowToUsePackager