Starting Multiple map activities
<p>Hi I am implementing two mapview in different activities they both works, the scenario is there is one large mapview which contains some projection points so when a point is clicked it should open up a new activity filled with some details. So my second activity is a scrollview layout that contains a small mapview at bottom which works fine</p>

<p><strong>ISSUE</strong>: <em>but when i press back button and goes back to previous mapview i get some warnings and that mapview doesnt load anymore i get a half of the map screen with white background</em> </p>

<p>Main mapview: <a href="http://stackoverflow.com/questions/4923422/mapview-show-overlay-details-when-clicked">mapView show overlay details when clicked</a></p>

<p>so when i click on the balloon as shown in figure it opens up a new activity that also contains a mapview so when i press back button and gets back the main mapview(the one shown in figure above) cuts into half and i get these warnings:</p>

<pre><code>02-22 14:39:39.806: WARN/System.err(7823): java.lang.IllegalStateException: Connection pool shut down.
02-22 14:39:39.806: WARN/System.err(7823):     at org.apache.http.impl.conn.tsccm.ConnPoolByRoute.getEntryBlocking(ConnPoolByRoute.java:284)
02-22 14:39:39.806: WARN/System.err(7823):     at org.apache.http.impl.conn.tsccm.ConnPoolByRoute$1.getPoolEntry(ConnPoolByRoute.java:238)
02-22 14:39:39.816: WARN/System.err(7823):     at org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager$1.getConnection(ThreadSafeClientConnManager.java:175)
02-22 14:39:39.816: WARN/System.err(7823):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:325)
02-22 14:39:39.816: WARN/System.err(7823):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
02-22 14:39:39.826: WARN/System.err(7823):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
02-22 14:39:39.826: WARN/System.err(7823):     at com.google.common.io.android.AndroidHttpClient.execute(Unknown Source)
02-22 14:39:39.826: WARN/System.err(7823):     at com.google.common.io.android.GoogleHttpClient.executeWithoutRewriting(Unknown Source)
02-22 14:39:39.836: WARN/System.err(7823):     at com.google.common.io.android.GoogleHttpClient.execute(Unknown Source)
02-22 14:39:39.836: WARN/System.err(7823):     at com.google.common.io.android.GoogleHttpClient.execute(Unknown Source)
02-22 14:39:39.836: WARN/System.err(7823):     at com.google.common.io.android.AndroidHttpConnectionFactory$AndroidGoogleHttpConnection.getResponse(Unknown Source)
02-22 14:39:39.836: WARN/System.err(7823):     at com.google.common.io.android.AndroidHttpConnectionFactory$AndroidGoogleHttpConnection.openDataInputStream(Unknown Source)
02-22 14:39:39.846: WARN/System.err(7823):     at com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(Unknown Source)
02-22 14:39:39.846: WARN/System.err(7823):     at com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(Unknown Source)
02-22 14:39:39.846: WARN/System.err(7823):     at java.lang.Thread.run(Thread.java:1102)
</code></pre>

<p>I found one post saying its not possible to implement two map view in an application, I found one solution here but didnt worked: 
<a href="http://stackoverflow.com/questions/3379575/how-to-use-multiple-mapactivities-mapviews-per-android-application-process">How to use multiple MapActivities/MapViews per Android application/process</a> </p>

<p>It says to start each mapview in different process as follows:</p>

<pre><code>&lt;activity android:name=".activity.directory.MapView1" android:process=":MapView1"&gt;
&lt;activity android:name=".activity.directory.MapView2" android:process=":MapView2"&gt;
</code></pre>

<p>The above solution didnt worked for me, my code is as under:</p>

<p><strong>MainMapView Class</strong></p>

<pre><code>public class CouponMapView extends MapActivity{

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.large_mapview);
        mapView = (MapView) findViewById(R.id.mapview);
       // mapView.setBuiltInZoomControls(true);
        mapView.setStreetView(false);
        mapView.setTraffic(false);
       // layout = findViewById(R.id.)

        List&lt;Overlay&gt; mapOverlays = mapView.getOverlays();
        Drawable drawable = this.getResources().getDrawable(R.drawable.mappointer);
        ItemizedOverlay itemizedoverlay = new ItemizedOverlay(drawable, mapView, getParent());
        OverlayItem overlayitem;
        GeoPoint point = null;
        double lat;
        double lng;

        try{
            tempData = dataArray.gettempData();         

            for (int i = 0; i &lt; this.totalLimit; i++) {
                lat = Double.parseDouble(tempData.get(i).getLatitude());
                lng = Double.parseDouble(tempData.get(i).getLongitude());

                point = new GeoPoint((int) (lat * 1E6),(int) (lng * 1E6));

                overlayitem = new OverlayItem(point, tempData.get(i).getId()+"", tempData.get(i).getInfo().getName());
                itemizedoverlay.addOverlay(overlayitem);
                itemizedoverlay.setBalloonBottomOffset(10);
                mapOverlays.add(itemizedoverlay);

            }
        }catch(Exception e){

        }
        try{
            final MapController mc = mapView.getController();
            mc.animateTo(point);
            mc.setZoom(16);
        }catch(Exception e){

        }
    }
    protected boolean isRouteDisplayed() {
        // TfODO Auto-generated method stub
        return false;
    }
}
</code></pre>

<p><strong>IM calling onTap method of this class to start a new activity</strong></p>

<pre><code>public class ItemizedOverlay extends BalloonItemizedOverlay&lt;OverlayItem&gt; {
    private ArrayList&lt;OverlayItem&gt; overlays = new ArrayList&lt;OverlayItem&gt;();
    private Context context;
    private Activity activity;
    private int id;

    public ItemizedOverlay(Drawable defaultMarker, MapView mapView, Activity activity) {
        super(boundCenter(defaultMarker), mapView);
        context = mapView.getContext();
        this.activity = activity;
    }

    public void addOverlay(OverlayItem overlay) {
        overlays.add(overlay);
        populate();
    }

    @Override
    protected OverlayItem createItem(int i) {
        return overlays.get(i);
    }

    @Override
    public int size() {
        return overlays.size();
    }

    @Override
    protected boolean onBalloonTap(int index) {
        Intent Details = new Intent(context, Tab.class);
        Details.putExtra("Id", 1327);
        context.startActivity(Details);
        return true;
    }
} 
</code></pre>

<p>The third class is the details class that contains another mapview implementation and is a simple linearlayout but includes a map. I dont think there is anything wrong with the above code but there must be something i am missing in the first class to refresh its view, though i have tried view.requestlayout/view.invalidate but they didnt work either</p>
