Each time the MapView needs to display a tile it has to:
1) Check if the tile exists in the cache - it is already downloaded and is stored on external memory.
2) Download the tile if it is not already cached.
3) Render the tile.
This all happens in a thread of it's own, if the thread fails then the MapView ends up displaying a blank instead of a tile.
The thread might fail for various reasons:
1) Tile request fails.
Network connection might be up and working but if the tileserver is busy/overloaded and doesn't respond to the tile request within a short period of time then the request times out.
Many public tileservers get very overloaded and simply can't serve all tiles that are requested.
2) If you pan the map quickly and over a large area, and change the zoom level a lot in a short period of time then the MapView makes
many requests for tiles.
Lots of requests might cause the device to run out of resources and requests will fail.
And if the tileserver is busy then many requests in a short period of time will likely result in more requests not succeeding.
Often a thread requests a tile, the request doesn't complete in a short period of time and the MapView treats the request as failed, but if the requested tile eventually gets downloaded it is still cached to external memory but NOT rendered to the MapView.
Pan the map a bit or zoom in and then out and when the MapView re-renders the area that was previously blank it now successfully gets the tile from the cache and renders it.
Look at the 'reported issues' for the native java Android OSMDroid library:
Issues - osmdroid - OpenStreetMap-Tools for Android - Google Project Hosting.
You'll see there are
many bugs found and reported but as OSMDroid is a project developed by individuals in their spare time these bugs get fixed as and when the developers have time to do so.
Which tileserver are you displaying tiles from?
OSMDroid supports the
Cloudmade tile server, if you create a Cloudmade account and use the Cloudmade tileserver you
might find tile loading improves noticeably.
(Cloudmade tileservers generally have more resources than the other free open street map tileservers).
Info on using Cloudmade tiles can be found here:
http://www.b4x.com/forum/basic4andr...smdroid-mapview-b4a-tutorial-2.html#post92864.
Martin.