KapoorVashisht / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

Get Tile Count of a Map View In android #443

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. Load OSM MapView in android.

2. Determine whether all tile are loaded.

3. To determine whether all tiles are loaded or not, there is no method.

http://stackoverflow.com/questions/17311557/get-tile-count-of-a-map-view-in-andr
oid

Original issue reported on code.google.com by TharakaN...@gmail.com on 26 Jun 2013 at 6:13

GoogleCodeExporter commented 8 years ago

Original comment by kurtzm...@gmail.com on 26 Jun 2013 at 1:09

GoogleCodeExporter commented 8 years ago
Take a look at TilesOverlay and the TileLooper implementation. This is what we 
use to load and then draw each tile on the screen. In handleTile we attempt to 
get the tile from the tile provider mTileProvider.getMapTile(pTile). If that 
returns a Drawable then the tile is loaded, if not it will return null.

A simple way to do this is to extend TilesOverlay, override drawTiles(...) and 
call your own TileLooper before calling super.drawTiles(...) that will check to 
see if all the tiles that get passed to handleTile(...) are not null. To use 
your TilesOverlay call 
mMapView.getOverlayManager().setTilesOverlay(myTilesOverlay).

Original comment by kurtzm...@gmail.com on 26 Jun 2013 at 1:10

GoogleCodeExporter commented 8 years ago
This has been answered in 
http://stackoverflow.com/questions/17079359/detect-if-the-osm-mapview-is-still-l
oading-or-not-in-android

Original comment by kurtzm...@gmail.com on 27 Jun 2013 at 1:28