Reading the official documentation for Google Maps I found that is possible to add the "onMarkerDragEnd" event, but is not available in the b4a library of google maps, I wonder if it is possible to add the event with java code, something like this:
Obviously the code above does not work, I believe it is missing the part of declaring the event listener (setOnMarkerDragListener)
I also tried:
But it doesn't even compile.
Any idea on how to do this?
Documentation:
B4X:
#If Java
public void onMarkerDragEnd (com.google.android.gms.maps.model.Marker marker) {
if (processBA.subExists("gmap_MarkerDragged")) {
processBA.raiseEvent2(null, true, "gmap_MarkerDragged", false, (marker));
}
}
#End If
Obviously the code above does not work, I believe it is missing the part of declaring the event listener (setOnMarkerDragListener)
I also tried:
B4X:
#If Java
public void startListener(com.google.android.gms.maps.GoogleMap mMap){
mMap.setOnMarkerDragListener(new OnMarkerDragListener() {
@Override
public void onMarkerDragEnd(Marker marker) {
if (processBA.subExists("gmap_MarkerDragged")) {
processBA.raiseEvent2(null, true, "gmap_MarkerDragged", false, (marker));
}
}
});
}
#End If
Any idea on how to do this?
Documentation:
GoogleMap.OnMarkerDragListener | Google Play services | Google for Developers
developers.google.com