Tuesday, June 15, 2010

[android-developers] ItemizedOverlay using both onTap methods

I have a MapView where I would like to be able to tap the map to
create a new item at that location if there is no item there, or
display the info about the item if there is.

I tried overriding both the onTap(int) and onTap(GeoPoint, MapView)
methods but apparently if the second method is overridden the first
never gets called (commenting one or the other lets each one work as I
expected).

I thought about just checking if an item was at the location, but
there doesn't seem to be any handy methods available to do that (other
than iterating through the list of items and checking each manually).

Does anyone know of a better way to do this?

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

No comments:

Post a Comment