OSM offline on Android

自闭症网瘾萝莉.ら 提交于 2020-03-23 23:17:04

问题


I'm trying to build an offline map on android and I'm still a beginner in that. so I added osmdroid to my project and I downloaded a the map data from this link. after some searching in the internet I still didn't find an example to display the data. In addition osmdroid use sd card location from what I found. is there a possibility to change that with a clear example about how to do it ?

thank you


回答1:


You downloaded raw openstreetmap data. Osmdroid requires rendered tiles for offline functionality.

So you have two problems:

1) How to get rendered tiles. 2) How to integrate them into the application for offline usage.

Osmdroid has quite good documentation about offline maps and it is quite complex topic which cannot be covered in one proper Stackoverflow answer. You'll need to go through osmdroid wiki article Offline-Map-Tiles where are covered both your problems (and even your question about file location).

There are other wiki topics you schuld check.

  • https://github.com/osmdroid/osmdroid/wiki/Map-Sources
  • https://github.com/osmdroid/osmdroid/wiki/Modular-Tile-Provider-Architecture


来源:https://stackoverflow.com/questions/45792284/osm-offline-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!