1

I am trying to write code for marker drag on google map in android and I am using the following code for that

First i make the marker draggable by setting setDraggable to true.

Then I listen to user pressing and holding on the marker using setOnMarkerDragListener. I know that onMarkerDragStart will be triggered after press and hold so it is like a long click listener effect. The code is very simple and is basically just simple OnMarkerDragListener as given below

map.setOnMarkerDragListener(new OnMarkerDragListener() {

        @Override
        public void onMarkerDragStart(Marker marker) {
            // TODO Auto-generated method stub
            //Here your code
        }

        @Override
        public void onMarkerDragEnd(Marker marker) {
            // TODO Auto-generated method stub

        }

        @Override
        public void onMarkerDrag(Marker marker) {
            // TODO Auto-generated method stub

        }
    });

The problem is that the marker shifts up by some distance when I start dragging and it looks really bad from user experience point of view. Here is a youtube video link showing the marker shifting up phenomenon what I just explained.

http://www.youtube.com/watch?v=RxAHHJD4nU8

I know that this is a google map api issue but is there any work around for this ?

azmuhak
  • 964
  • 1
  • 11
  • 31
  • 1
    AFAIK there is no workaround yet in this issue. This is [onMarkerDragStart marker anchor position is not respected when dragging](https://code.google.com/p/gmaps-api-issues/issues/detail?id=6132) issue you are talking about. You can star it to be updated about any progress regarding this issue. – Mr.Rebot Aug 27 '16 at 07:11

0 Answers0