Taps on a map appear to be accumulating
<p>I have written an app which displays the location of a set of traffic cameras in the city of Dublin. I show these as markers on a map. When a user taps on a marker they are brought to a new activity showing the latest picture from the camera in question. It seems to work for the first tap. The image shows and hitting back brings you to the map of camera locations again. However tapping again (same marker or different) brings you to the image, but then clicking back shows you the image a second time. The instances of the ImageView appear to be accumulating with each successive tap. </p>

<p>The relevant code (I think) is:</p>

<pre><code>    @Override
    public boolean onTap(int index) {
        Log.d(TAG, "Tap done on" + index);
        Intent i = new Intent(TrafficViewActivity.this, CameraViewer.class);
        i.putExtra("imageSrc", getItem(index).getImageSrc());
        startActivity(i);
        return super.onTap(index);
    }
</code></pre>

<p>and this (which does not do anything custom):</p>

<pre><code>    @Override
    public boolean onTap(GeoPoint p, MapView mapView) {
        // mController.animateTo(p);
        Log.d(TAG, "onTap geopoint:");

        return super.onTap(p, mapView);
    }
</code></pre>

<p>The above 2 methods are both found in a class I have created with this signature:</p>

<pre><code>class HelloItemizedOverlay extends ItemizedOverlay&lt;MyOverlayItem&gt;
</code></pre>

<p>The target activity just has an onResume which looks like this:</p>

<pre><code>@Override
protected void onResume() {
    super.onResume();
    Intent i = getIntent();
    Bundle ex = i.getExtras();
    if (ex != null) {
        String imageSrc = (String) ex.get("imageSrc");

        Log.d(TAG, "imageSrc: " + imageSrc);
        Util u = new Util();

        u.downloadFile(mImage, imageSrc);
    }
}
</code></pre>

<p>When I look in my log file it does indeed appear as if the taps are being called multiple times, but I don't understand why this is. Any help would be great.</p>
