O'Reilly logo

iPhone Location Aware Apps by Example by Zeeshan Chawdhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — custom map annotations

Now that we have good hands-on experience with Annotations and Annotation Views, let's explore the full power of Annotation Views by creating our own custom Marker. We will be creating flag-based markers for cities, so if you create an annotation with Mumbai's latitude and longitude values, the annotation will show the Indian Flag, and when we create an Annotation with a San Francisco co-ordinate, it will show the American flag.

  1. We extend from the preceding example and declare one more Annotation object in our class. In the Hello_LocationViewController.h file, add a MKPointAnnotation object as MKPointAnnotation *mumbaiAnnotation; and expose it as a property @property (retain,nonatomic) MKPointAnnotation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required