I am working on an app that will show the user the closest locations from a database to the user. When the user selects one of these locations from a list, the user will then see a map on a new screen showing an annotation representing the user, and another annotation representing the location.
Is it possible using the MapKit API to show the 开发者_开发百科user a path from the user to the location? I am not asking about how to show turn by turn directions. I just want to display a path between the two annotations. Is this possible?
In iOS 4.x, Apple added support for map overlays. It might help to read a little bit more about the MKPolyline
& MKPolylineView
classes and the mapView:viewForOverlay:
method defined in the MKMapViewDelegate
protocol. All available in the Map Kit Framework Reference.
精彩评论