3

我将相同的图块(Mapbox)加载到 OSmdroid 中,但知道当我在网络上对其进行修改时,它会在我的应用程序中发生变化,但以前的地图仍保留在缓存中,并逐渐被新地图替换。

我想知道如何以编程方式删除缓存,以便它可以正常加载切片。

我有代码可以在这里加载它:

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);

}
4

1 回答 1

0

尝试这个:

mMapView.getTileProvider().clearTileCache()
于 2013-07-03T13:14:58.240 回答