Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. let locations = [CLLocation(latitude: 37.582691, longitude: 127.011186), CLLocation(latitude: 37.586112,longitude: 127.011047), CLLocation(latitude: 37.588212, longitude: 127.010438)]
  2. var coordinates = locations.map({(location: CLLocation) -> CLLocationCoordinate2D in return location.coordinate})
  3. let polyline = MKPolyline(coordinates: &coordinates, count: locations.count)
  4. let polygon = MKPolygon(coordinates: &coordinates, count: locations.count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement