简体   繁体   中英

Download OSM map data within osmDroid app for offline use

I've built an application that uses osmDroid to display a map, I've managed to use MOBAC to create some offline maps and display them in my app.
I'm now looking to be able to add the feature of being able to select an area of the map in my application and download and cache that area for offline use, to save the user using MOBAC in order to create the offline map that they need.

I know that this can be done as there are various different applications on the google play store that use osmDroid to do this.
I've come across a CacheManager class ( CacheManager.java ) within osmBonusPack and I'm thinking that this may be the solution for what I need but I have no idea how to implement it into my application
I've googled but can't find much documentation on it, does anyone else have any experience using the CacheManager?

Look at OSMNavigator MapActivity source code. It makes use of all ClassManager features (downloading, stats, and cleaning).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM