How to zoom to fit many coordinates in Google Maps in iOS

Issue #463

1
2
3
4
5
func zoom(location1: CLLocation, location2: CLLocation) {
let bounds = GMSCoordinateBounds(coordinate: location1.coordinate, coordinate: location2.coordinate)
let update = GMSCameraUpdate.fit(bounds, withPadding: 16)
mapView.animate(with: update)
}

Comments