I'm trying to create a map application that first allows a user to tap on the GoogleMaps screen, and then marking that spot with an ItemizedOverlay object, so I use this method:
@Override
public boolean onTap(GeoPoint p, MapView mapView) {
blah blah
}
However, the result of this method is that on the first user tap, it then generates a bunch of other ItemizedOverlay objects on the map. However, I now want those new ItemizedOverlay objects to have a different onTap method, so in particular, I want to be able to use this version:
@Override
protected boolean onTap(int index) {
when you click on the new ItemizedOverlay objects, something else happens
}
So right now I have both methods in my class. I figure that when the user first taps the screen, the first onTap method is called, and a whole bunch of new ItemizedOverlay objects are created and then added to the map. And when a user then clicks on one of these new ItemizedOverlay objects, then the second onTap method should be called. However, this doesn't seem to be the case, since right now, when I click on those objects, nothing is happening.
Any ideas on what's going on?


