Get coordinates on tapping map in android

前端 未结 6 1764
北海茫月
北海茫月 2020-12-01 12:49

I\'m trying to make something like this: I have a mapactivity and when the user taps the map it shows the coordinates of that location. I already overrided the onclick metho

6条回答
  •  执笔经年
    2020-12-01 13:37

    I put some details of my implementation in this question: How do I respond to a tap on an Android MapView, but ignore pinch-zoom?

    The problem I found with using onTap() is that it also gets fired when you pinch-zoom, which was not what my app needed. So if you need pinch-zoom, my code should do what you need.

提交回复
热议问题