Firstly, my problem is not like the various API-related problems with MapView, nor does it correspond to this issue or that one , although it has similarities.
Sometimes I come across the fact that several fragments do not load, leaving empty gray spots on 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 application containing only MapView when you rotate the device while moving and zooming on the map. However, this does not happen all the time. Perhaps 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>
source share