On Jun 15, 9:15 am, tfriest <[email protected]> wrote:
> Does anyone know of a better way to do this?

As you've seen, the maps documentation is pretty pathetic. What I know
of the onTap functions has been gleamed from trial and error and
experimentation. This is how I believe it works:

onTap(int) determines whether the item at the specified index will
handle tap events at all. If you return false, the other onTap
function will always return false.

onTap(Point, MapView) determines whether an item in the overlay was
tapped given the touch point, if onTap(int) return true for it's
index.

OK, with that, what you can do is:
return true for onTap(int) always.
in onTap(Point, MapView) call through to the base implementation to
determine if something was tapped. And that's it.

public boolean onTap(point, mapview)
{
 boolean tapped = super.onTap(point, mapView);
 if (tapped)
 showInfo();
else
 dropNewItem(point);

return true; // irrelevant if you only have one itemized overlay
}

Hope that helps.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to