Has anybody figured out how to implement draggable markers with the new Google Maps SDK for iOS? The API does not provide it natively, yet. Feature request is already submitted.
Swift 3.0
Sweet! All I had to do was add this variable to my marker. Then when carefully select and hold the marker for a moment you can drag it around.
marker.isDraggable = true
I have not yet implemented the delegates to save my marker data but here's what it should look like.
extension MapVC : GMSMapViewDelegate {
func mapView (_ mapView: GMSMapView, didEndDragging didEndDraggingMarker: GMSMarker) {
print("Drag ended!")
print("Update Marker data if stored somewhere.")
}
}
Note: For a while I was trying to un-animate the screen and marker from floating and animating UP after selected. Now I see that it's a "feature" since your finger is in the way and you can't really see well if it doesn't move the screen during a drag. (Duh!)