The following code fragments determine whether an MKMapPoint located inside or outside a polygon, but I'm asking if there is any way to find the nearest distance in meters or amount of time between that point and the polygon where the polygon formed by using geoJSON coordinates?
let renderer = MKPolygonRenderer(polygon: polygon)
let mapPoint: MKMapPoint = MKMapPoint(CLLocationCoordinate2D(latitude: lat, longitude: long))
let polygonViewPoint: CGPoint = renderer.point(for: mapPoint)
if renderer.path.contains(polygonViewPoint) {
print(" Inside polygon")
} else {
print(" Outside polygon.")
}