iOS4 introduced new features like MKOverlay to help draw lines/routes and shapes/polygons on the MKMapView control, however it has always been possible to add these features to maps in iOS3.
Two (Objective-C) examples of displaying geometric shapes on MKMapView in iOS3 are:
- Drawing polyines or routes on a MKMapView by Craig Spitzkoff, which shows how to draw a line on a map from a file of latitude/longitude points.
- Drawing a Point, Line, Polygon on top of MKMapview by Rupert, which builds on the previous example to allow drawing your own lines/polygons on a map.
I put together a class diagram to try and explain how they work (the classes shown are from the 2nd example, which allows you to draw your own shape).
iOS4 examples to follow...