I'd like to create an MKPolygon with a portion that covers a pole.
Drawing a polygon around 0 N 0 E works as expected:
let coordinates = [
CLLocationCoordinate2D(latitude: 20, longitude: 0),
CLLocationCoordinate2D(latitude: 0, longitude: 20),
CLLocationCoordinate2D(latitude: -20, longitude: 0),
CLLocationCoordinate2D(latitude: 0, longitude: -20),
]
let polygon = MKPolygon(coordinates: coordinates, count: coordinates.count)
Attempting to draw a similar square around 90 S 0 E produces a straight line:
let coordinates = [
CLLocationCoordinate2D(latitude: -70, longitude: 0),
CLLocationCoordinate2D(latitude: -70, longitude: 90),
CLLocationCoordinate2D(latitude: -70, longitude: -180),
CLLocationCoordinate2D(latitude: -70, longitude: -90),
]
let polygon = MKPolygon(coordinates: coordinates, count: coordinates.count)
It seems like the coordinates may be converted to map's projection before the path is drawn, although I'm not sure.
Setting .mapType = .hybridFlyover doesn't change much:
What is the correct way to create an MKPolygon around the pole?


