简体   繁体   中英

Android google map drag drop marker on single click on marker

I am using Google Map API v2.

In this I place a draggable marker on map.

To drag marker I need to long press on marker for some seconds and then after drag event triggers and dragging is possible.

I want that drag event be called single tap to marker.

How to do that ?

Thanks

You can use onTouchListener instead onLongClickListener. Start dragging as soon as touch is detected and stop when touch is completed.

Hope this thread can help you in some way. You can get the idea from this.

Make marker draggable after single click in Android

There is another workaround for this. You can move map under the marker. Marker will remain in the center and the map will move

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM