Wajih
Wajih

Reputation: 4383

Best way to fit google map view to contain a polygon in iOS Swift 2.1?

What is the best way to let google map view display the whole Polygon (or Path) in **Swift 2.1** ?

Upvotes: 0

Views: 579

Answers (1)

Jogendra.Com
Jogendra.Com

Reputation: 6454

Try this it will helpfull ..

let bounds = GMSCoordinateBounds(path: path)
self.mapView!.animateWithCameraUpdate(GMSCameraUpdate.fitBounds(bounds, withPadding: 15.0))

Upvotes: 1

Related Questions