Optimize the movement of the marker in Maps

Asked

Viewed 248 times

5

Working with an application where I add one Marker on the map, as :

markUser.draggable(true);

But I want to optimize this method, to move the marker is necessary to hold for a while, I want with a single click can drag it and that it stays right under the person’s finger and not above or below as it happens. Like the Taxis app, 99s.

  • And what would be "optimize"?

  • As I said in the question I want with a single click without needing to make a long click, move the marker.

  • Ah, really! When I read I understood something else. I can’t tell you for sure, but I don’t think it is possible to change this operation.

1 answer

1

Take a look at this project. They reimplemented the use of Marker with drag and drop.

Another option is to implement the method onMapClick of the interface OnMapClickListener and in it you add a Marker. Take a look at this link. Note that the addition of Marker is in the LongClick, but I believe that nothing prevents you from implementing this in Click instead of LongClick.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.