This method is mentioned and explained in apple's documentation. Can someone guide me on how to use it ?
convenience init(coordinates coords: CMutablePointer<CLLocationCoordinate2D>, count: Int)
You could use it like this:
let c1 = CLLocationCoordinate2D(latitude: 0.0, longitude: 0.0)
let c2 = CLLocationCoordinate2D(latitude: 1.0, longitude: 1.0)
var a = [c1, c2]
var polyline = MKPolyline(coordinates: &a, count: a.count)
I can't see a "Swifter" way to create MKPolylines in the docs... I assume they are still building the bridge, here.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.