-3

I have an app that is using MapKit's MKRoute. I want to place a UIView on the route on the map, similar to how Apple annotates routes in Maps with an estimated travel time popover:

http://www.siprog2.com/pjx/fichiers/mkroute.jpg

puzzle
  • 6,071
  • 1
  • 25
  • 30
JLA
  • 9

1 Answers1

0

You can use MKAnnotation to annotate a specific coordinate point on your route. Your MKMapView's delegate will then be asked to return an MKAnnotationView if your annotation is in the currently visible area of the map.

Apple has sample code for adding custom annotation views to a map (it's not using a route, but all you need to change is annotate a point on your route).

puzzle
  • 6,071
  • 1
  • 25
  • 30
  • Indeed, i was looking for in a bad direction, and finaly find a previous post on this subject : https://stackoverflow.com/questions/20995787/annotation-along-route-in-mapkit – JLA Apr 26 '19 at 17:03