Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top