问题
I'm using multiple TileOverlay objects as "frames" for my map animation. When an TileOverlay is made visible (via TileOverlay.setVisible(true)), it will start downloading the tiles. How can I detect when the tiles for the overlay have been downloaded and displayed?
回答1:
It's not possible to know from the API if all visible Tiles
are downloaded and displayed.
If you want to know when a single Tile
is downloaded, you may put some code before return
in TileProvider.getTile
. This way you can count downloaded tiles and have some estimates on your original question.
回答2:
You should use OnMapLoadedCallback
mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {
@Override
public void onMapLoaded() {
//Your code
}
});
来源:https://stackoverflow.com/questions/16380546/how-to-detect-when-tileoverlay-has-completed-downloading-tiles