android maps: How to Long Click a Map?

后端 未结 8 1797
遥遥无期
遥遥无期 2020-12-02 12:41

How do I long click on a mapview so that a place marker appears at that point on the map?

I tried a couple ways without success:

1) Using setOnLongCl

8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 13:02

    If you're going with the delayed post/message to a handler (a solution I use myself), it can be useful to test if the map has moved, i.e. if mapView.getMapCenter(), mapView.getLatitudeSpan() and mapView.getLongitudeSpan() return the same as when the pointer went down.

提交回复
热议问题