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.
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.
You answered yourself in your comment already, but I'd like to point everyone at the excellent AIMapViewWrapper project on GitHub which includes sample code for plotting an arc path over a set of coordinates. In that project it's being used to draw the path a plane takes including a shadow path underneath it (and other stuff such as animating a plane along that path). Should come in handy for anyone taking a stab at this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With