Skip to content

Instantly share code, notes, and snippets.

@DejanEnspyra
Created October 3, 2017 19:04
Show Gist options
  • Save DejanEnspyra/52b437810bd935a54efdedb586522eb3 to your computer and use it in GitHub Desktop.
Save DejanEnspyra/52b437810bd935a54efdedb586522eb3 to your computer and use it in GitHub Desktop.
Polyline Google Maps iOS SDK
func drawRectange(){
/* create the path */
let path = GMSMutablePath()
path.add(CLLocationCoordinate2D(latitude: 37.36, longitude: -122.0))
path.add(CLLocationCoordinate2D(latitude: 37.45, longitude: -122.0))
path.add(CLLocationCoordinate2D(latitude: 37.45, longitude: -122.2))
path.add(CLLocationCoordinate2D(latitude: 37.36, longitude: -122.2))
path.add(CLLocationCoordinate2D(latitude: 37.36, longitude: -122.0))
/* show what you have drawn */
let rectangle = GMSPolyline(path: path)
rectangle.map = mapView
}
@jmohanr
Copy link

jmohanr commented Sep 21, 2018

Hi I have one doubt is GMSpolyline draggle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment