Sorry if this is a noob question…any idea why I’m getting the error ‘Return from initializer without initializing all stored properties – self.boundary not initialized’ in the Park class? I had the .map closure in there (even copied and pasted from the tutorial thinking I missed something), and also tried replacing it with a loop like in the original tutorial like this:
let cgPoints = boundaryPoints.map { CGPointFromString($0) }
var boundaryTmp: [CLLocationCoordinate2D] = []
for i in 0...cgPoints.count - 1 {
let j = CLLocationCoordinate2DMake(CLLocationDegrees(cgPoints[i].x), CLLocationDegrees(cgPoints[i].y))
boundaryTmp.append(j)
}
self.boundary = boundaryTmp
It should be noted that there are some major performance issues that are reflected when using MapKit on the Xcode 9 betas (sims) as seen here. It may be a good call to call this out in the above posting as the region is rarely, if at all, set and animated.
MKOverlayRenderer also inherits from NSObject. It has no direct association to a UIView. I’m not quite sure why the subclass doesn’t indicate this an why it’s referenced as being a UIView child. A renderer != a view.