Using Mark Murphy's online books, he describes how to do this. I don't know
if it is the only way, but basically you extend
ItemizedOverlay<OverlayItem>, in the constructor you do the
items.add(OverlyaItem) method call. This will add overlayitem's to the map.
These items are clickable and you can implement the click handler in the
OverlayItem extending class that you provide/add.

I recommend his books. He responds here a lot and has his own forum and
weekly chats as well. Well worth $40.


On Thu, Jan 14, 2010 at 3:01 PM, Jason Proctor <
jason.android.li...@gmail.com> wrote:

> i'm looking to get called when the user taps on any part of a map view and
> i'm having no luck so far.
>
> mapView.setOnClickListener()
> overlay.onTap()
> overlay.onTouchEvent()
>
> none of these produces as much as a peep when the map view is clicked.
>
> i did some googling and found this thread --
>
>
> http://groups.google.com/group/android-developers/browse_thread/thread/c48e2b9368c75e5a
>
> which suggests that overriding mapView.onTouchEvent() works, though calling
> setOnTouchListener() doesn't. however, onTouchEvent() didn't work for me.
>
> tried with the map view set to clickable or unclickable, no difference.
>
> can i get clicks on map views?
>
> thanks
> --
> jason.vp.engineering.particle
>
> --
> 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+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to