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
Though the question has an accepted answer,
Still one point which has not been discussed.
GMSPolyLine has a property ".path" which can used to bound the map with the complete polyline itself.
mapView.animate(with: GMSCameraUpdate.fit(GMSCoordinateBounds(path: self.polyLineObject.path!), withPadding: 10))
With this approach, It'll do the job for sure.
Coz it has Done for me..
Hope it Helps..