I would like to zoom for selected place and user location using google map.
I have method for fit bounds:
func fitToMarker(marker: GMSMarker) {
let bounds = GMSCoordinateBounds()
bounds.includingCoordinate(self.userMarker.position)
bounds.includingCoordinate(marker.position)
self.mapView.animate(with: GMSCameraUpdate.fit(bounds))
}
and I use it after selected button in method:
func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker)