I am using Google Maps to set the location choice of the user. The user can drag a marker to set the position on the map. What I find is that it is extremely difficult to make the marker move. Let me first show the small code that I have:
mMap.setOnMarkerDragListener(object: GoogleMap.OnMarkerDragListener {
override fun onMarkerDragEnd(p0: Marker?) {
if (p0 != null) {
newlat = p0.position.latitude
newlong = p0.position.longitude
}
}
Before this piece of code I have other routines which first sets a location of the map. The user can then fine tune the position by dragging the marker using the above code. That is my objective. But the marker is not always draggable. It is extremely unpredicatbale when the marker would drag, when it would not. Is there any easier way of doing this?
To Give a better explanation of my problem. In my system, the user first manually enters the address details. In my other routines, Google Map searches for this address and puts the marker at the position. But I have seen that there is usually an error in this. So I am providing the user a final chance to fine tune the position using the draggable feature. While the drag is sometimes successful, it is very difficult to move the marker.