Open binu8051 opened 1 year ago
i am using a TileDataSource on a layer RasterTileLayer.
TileDataSource windTileDataSource = new GribTilesMapLayer(projections, MainActivity.this, gribFileTileSource, windselectedtype); RasterTileLayer windlayer = new RasterTileLayer(windTileDataSource); mapView.getLayers().add(windlayer);
i load new data to the windTileDataSource and do i need to remove the windlayer everytime and add it again to the mapview? i am doing like this
mapView.getLayers().remove(windlayer); windlayer = new RasterTileLayer(windTileDataSource); mapView.getLayers().add(windlayer);
Is there anyway to refresh the datasource other than this method? to acheive a smooth data change on the mapview.
Yes, there is a method called notifyTilesChanged in TileDataSource class.
notifyTilesChanged
TileDataSource
i am using a TileDataSource on a layer RasterTileLayer.
i load new data to the windTileDataSource and do i need to remove the windlayer everytime and add it again to the mapview? i am doing like this
Is there anyway to refresh the datasource other than this method? to acheive a smooth data change on the mapview.