Created
July 25, 2012 17:33
-
-
Save cocoahero/3177422 to your computer and use it in GitHub Desktop.
OSMDroid MBTiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XYTileSource MBTILESRENDER = new XYTileSource("mbtiles", ResourceProxy.string.offline_mode, 1, 20, 256, ".png", "http://example.org/"); | |
DefaultResourceProxyImpl mResourceProxy = new DefaultResourceProxyImpl(this.getApplicationContext()); | |
SimpleRegisterReceiver simpleReceiver = new SimpleRegisterReceiver(this.getActivity()); | |
File f = new File(Environment.getExternalStorageDirectory(), "mymbtilesfile.mbtiles"); | |
IArchiveFile[] files = { MBTilesFileArchive.getDatabaseFileArchive(f) }; | |
MapTileModuleProviderBase moduleProvider = new MapTileFileArchiveProvider(simpleReceiver, MBTILESRENDER, files); | |
MapTileProviderArray mProvider = new MapTileProviderArray(MBTILESRENDER, null, new MapTileModuleProviderBase[] { moduleProvider }); | |
this.mMapView = new MapView(this, 256, mResourceProxy, mProvider); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment