How to draw arc/curve line with MKOverlayView on MKMapView

Shiny picture Shiny · Apr 15, 2011 · Viewed 7.4k times · Source

Help needed now. I can draw lines with MKPolyline and MKPolylineView, but how to draw an arc or curve lines between two coordinates on the MKMapView? Great thanks.

Answer

Ole Begemann picture Ole Begemann · Apr 15, 2011

Reading the documentation, it seems that you can create an instance of MKOverlayPathView and assign an arbitrary CGPathRef object to its path property. This path can contain both straight lines and arcs.

I don't know (and the documentation doesn't mention) in what format the coordinates of the path should be (MKMapPoint or CLLocationCoordinate2D come to mind) but you can probably find that out by experimenting a bit.