Swift .map not providing expected data type
That should be pretty simple. What you actually need is to zip your x
and y
coordinates and map the MKMapPoint
initializer:
let allMapPoints = zip(data.fenceX, data.fenceY).map(MKMapPoint.init)
That should be pretty simple. What you actually need is to zip your x
and y
coordinates and map the MKMapPoint
initializer:
let allMapPoints = zip(data.fenceX, data.fenceY).map(MKMapPoint.init)