2017-08-28 33 views
0

在早期的版本中,osmdroid確實使用本地存儲來緩存瓷磚。有沒有辦法在5.6.5中使用早期的緩存系統?我認爲你必須使用TileWriter而不是SqlWriter,但是如何做到這一點?任何幫助表示讚賞。Osmdroid在瓷磚上使用本地存儲系統

回答

0

您可以使用MapTileProviderBasics並在構造函數中傳遞TileWriter實例。

公共MapTileProviderBasic(最終上下文pContext,最終ITileSource pTileSource,最終IFilesystemCache cacheWriter)

MapTileProviderBasic tileProvider = new MapTileProviderBasic(getApplicationContext(), yourTileSource, new TileWriter()); 

mapView.setTileProvider(tileProvider);