[英]How do i clear the OSMdroid cache
I loaded the same tiles (Mapbox) into OSmdroid, but know when i modify it on the web, it changes in my app, but the former map still remaines in the cache, and is replace by the new map little by little. 我将相同的磁贴(Mapbox)加载到OSmdroid中,但是知道当我在网上修改它时,它在我的应用程序中发生了变化,但是前一个地图仍然在缓存中保留,并且被新地图一点一点地替换。
I want to know how to delete the cache, programmatically, so it can load the tiles normally. 我想知道如何以编程方式删除缓存,以便它可以正常加载磁贴。
I've got the code to load it right here : 我有代码在这里加载它:
private void loadMap() {
String html = "http://a.tiles.mapbox.com/v3/myUsername.map-f1rhoycw/";
String name = "500x300";
XYTileSource freemap = new XYTileSource(name, null, 0, 16, 256, ".png", html);
map.setTileSource(freemap);
mapController = map.getController();
mapController.setZoom(16);
map.setMultiTouchControls(true);
}
尝试这个:
mMapView.getTileProvider().clearTileCache()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.