First off, my issue is unlike the various API-key related MapView tile issues, and it also does not match this question or that one, albeit it does have similarities.

Sometimes I encounter that a couple of tiles fail to load, leaving empty grey spots on the Android MapView.
LogCat shows this:

05-15 11:55:01.178: W/System.err(11978): IOException processing: 26
05-15 11:55:01.178: W/System.err(11978): java.io.EOFException
05-15 11:55:01.178: W/System.err(11978):    at java.io.DataInputStream.readFully(DataInputStream.java:267)
05-15 11:55:01.178: W/System.err(11978):    at java.io.DataInputStream.readFully(DataInputStream.java:212)
05-15 11:55:01.178: W/System.err(11978):    at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readImageData(BaseTileRequest.java:194)
05-15 11:55:01.178: W/System.err(11978):    at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:124)
05-15 11:55:01.178: W/System.err(11978):    at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
05-15 11:55:01.178: W/System.err(11978):    at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
05-15 11:55:01.178: W/System.err(11978):    at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
05-15 11:55:01.178: W/System.err(11978):    at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
05-15 11:55:01.188: W/System.err(11978):    at java.lang.Thread.run(Thread.java:1027)

This can be reproduced in a barebones app containing only a MapView when you rotate the device while moving and zooming around on the map. It does not happen all the time, though. Maybe there is some kind of race condition.

package my.TestApp;

import com.google.android.maps.*;

import android.os.Bundle;

public class MainActivity extends MapActivity  {

MapView mapView;


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        mapView = (MapView) findViewById(R.id.mapview);
        mapView.setBuiltInZoomControls(true);
    }

    @Override
    protected boolean isRouteDisplayed() {
        return false;
    }
}

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mainlayout"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <com.google.android.maps.MapView
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:clickable="true"
        android:apiKey="MyApiKeyGoesHere"
    />

</RelativeLayout>
0

There are 0 best solutions below