开发者

Is it possible to show a path between two annotations using the MapKit API?

开发者 https://www.devze.com 2023-02-02 05:20 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消