android - OsmDroid load multiple offline map -
i have different .sqlite map files , load on mapview. i'm able load 1 sqlite file. possible load multiple offline maps ? in case different sqlite files.
in short answer yes. ironically, did myself few days ago.
if you're using same tile source, such "mapnik", spanned across multiple tile archives, shouldn't have anything. use default tile provider, set setusedataconnection(false)
, set tile source match source of what's in archives , you're off races. since 5.0, can use offlinetileprovider , explicitly specify tile archives load.
if you're using mixed tiles sources , want create composite (e.g. ignore tile source names , display first tile available), possible trickery.
- first, override databasefilearchive , remove check tile source name
- override other archive classes needed remove check tile source name.
- if you're using v5 or newer, can register custom databasefilearchive implementation using
archivefilefactory.registerarchivefileprovider
older v5? use custom tile provider- use tile source want @ point, since it's ignored @ file archive loader.
with second approach, may run performance issues lot of tile archives, fyi.
edit: there way this, using multiple tileoverlays. other base layer, set loading lines , background transparent.
Comments
Post a Comment