I am trying to fit a polyline in the google map view. The polyline was acquired through overview_polyline in the google maps directions api.
Wondering how I would b
You can zoom the map according the route or line displayed in the mapview. So that your route is displayed with in the mapView bounds.
let bounds = GMSCoordinateBounds(path:path! )
self.mapView!.animate(with: GMSCameraUpdate.fit(bounds, withPadding: 50.0))
Here path is GMSPath of the route and mapView is GmsMapView.