IOS: Implement the Mkannotation protocol, set a pin on the map, click to display specific location information
Last Update:2015-10-19
Source: Internet
Author: User
<span id="Label3"></p><p><p><span style="color: #ff5eec; font-family: ‘Hannotate SC‘; font-size: x-large;">How to add a pin (landmark):</span></p></p><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;">by Mapview's Addannotation method you can add a pin to the map</span></span><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;">Multiple pins can be added to the map via Mapview's Addannotations method</span></span><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;">– (void) addannotation: (id <MKAnnotation>) annotation;</span></span><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;">description: An object that complies with the Mkannotation protocol needs to be passed in</span></span><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;"> </span></span><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;">The basic steps are:</span></span><span style="font-family: arial, helvetica, sans-serif; font-size: 18px; color: #ff0000;"><span style="font-family: arial, helvetica, sans-serif; font-size: 18px; color: #ff0000;"><1> Create a new class that adheres to the mkannotation protocol:</span></span><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@interface Myannotation:nsobject <MKAnnotation></span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@property (nonatomic, Assign) cllocationcoordinate2d coordinate;</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@property (nonatomic, copy) nsstring *title;</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@property (nonatomic, copy) nsstring *subtitle;</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@end</span></p></p><p><p><span style="font-size: 18px; font-family: arial, helvetica, sans-serif; color: #ff0000;"><2> Add annotation:</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Myannotation *anno = [[myannotation alloc] init];</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Anno.title = @ "china";</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Anno.subtitle = @ "beijing <span style="color: #891315;">"</span>;</span></p></p><p><p><span style="color: #7caf7a; font-size: 18px;">Longitude and latitude</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Anno.coordinate = Cllocationcoordinate2dmake (40, 110);</span></p></p><p><p><span style="color: #7caf7a; font-family: ‘Hannotate SC‘; font-size: 18px;">Add a PIN to the map</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">[_mapview addannotation:anno];</span></p></p><p><p><span style="color: #7caf7a; font-family: ‘Hannotate SC‘; font-size: 18px;">Move the map to the corresponding position (latitude and longitude Intersection)</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">[_mapview setCenterCoordinate:anno.coordinate animated:yes];</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;"></span></p></p><p><p><span style="color: #f742d2; font-family: ‘Hannotate SC‘; font-size: x-large;">Custom Pins:</span></p></p><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;">implement the Proxy method of Mapview</span></span><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">-(mkannotationview *) mapview: (mkmapview *) mapview viewforannotation: (id<mkannotation>) annotation</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">{</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">static NSString *id = @ "anno";</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Mkpinannotationview *annoview = (mkpinannotationview *) [mapview dequeuereusableannotationviewwithidentifier:id];</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">if (annoview = = Nil) {</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Annoview = [[mkpinannotationview alloc] initwithannotation:annotation reuseidentifier:id];</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Show Bubbles</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Annoview.canshowcallout = YES;</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Set Green</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Annoview.pincolor = mkpinannotationcolorgreen;</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">}</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Return annoview;</span></p></p><p><p>}</p></p><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;">note: You can customize the picture of the pin display by setting the Image property of Mapannotationview</span></span> <span style="font-family: ‘Hannotate SC‘; font-size: large; color: #800000;"><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #800000;">Several of the classes involved are described in some properties or Methods:</span></span><p><p><span style="color: #f84fea; font-family: ‘Hannotate SC‘; font-size: large;">Pin Callout Color Enumeration</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">typedef ns_enum (nsuinteger, Mkpinannotationcolor) {</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">mkpinannotationcolorred = 0,</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">mkpinannotationcolorgreen,</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Mkpinannotationcolorpurple</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">} ;</span></p></p><p><p><span style="color: #f83a18; font-family: ‘Hannotate SC‘; font-size: large;">Pin Tag Gaze graph class</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@interface Mkpinannotationview:mkannotationview</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@property (nonatomic) Mkpinannotationcolor pincolor; <span style="color: #364df5;">//pin Callout Color</span></span></p></p><p><p><span style="font-size: large;"><span style="font-size: 16px;">@property (nonatomic) BOOL animatesdrop</span>; <span style="color: #3649f5;">//whether to show the droplet dynamic</span></span></p></p><p><p><span style="font-size: 15px;">@end</span></p></p><p><p></p></p><p><p><span style="color: #f84440; font-family: ‘Hannotate SC‘; font-size: large;">Label Gaze graph class</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@interface Mkannotationview:nsview</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">-(instancetype) initwithannotation: (id <MKAnnotation>) annotation reuseidentifier: (nsstring*) reuseidentifier ; <span style="color: #3a60f5;">//initialize</span></span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@property (nonatomic, readonly) nsstring *reuseidentifier; <span style="font-size: 18px;">/ <span style="color: #364ef5;"> </span> </span> </span> <span style="color: #364ef5; font-size: 18px;">/reuse identifier</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@property (nonatomic, Strong) ID <MKAnnotation> annotation; <span style="color: #2843f5;">//callout</span></span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@property (nonatomic, Strong) UIImage *image; <span style="color: #3954f5;">//image</span></span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@property (nonatomic) BOOL canshowcallout; <span style="color: #0000ff;">//whether to show Bubbles</span></span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@property (strong, Nonatomic) UIView *leftcalloutaccessoryview; <span style="color: #5146f5;">//bubble left View (multiple to show Pictures)</span></span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">@property (strong, Nonatomic) UIView *rightcalloutaccessoryview; <span style="color: #0000ff;">//bubbles right View</span> </span> <span style="color: #0000ff; font-size: 18px;">(used to display pictures)</span></p></p><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #ff00ff;"><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #ff00ff;">the specific demo examples are as Follows:</span></span><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #ff00ff;"><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #ff00ff;">function: First create a callout to display the name of the current area on the map, and then create a long press gesture, when the person is a place long on time, will automatically add a pin callout in the long press place, and will display a bubble display picture, location name information can be determined</span> ...</span><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #ff0000;"><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #ff0000;">pre-preparation:</span></span><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;">1. Import the Mapkit framework:</span></span><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;"></span></span><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;">2. Import a picture material, used to make a pin view of a picture display:</span></span><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;"></span></span><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;">3. From the top one class, this class implements the <MKAnnotation> protocol, and the custom class Myannotation is:</span></span><span style="font-family: ‘Hannotate SC‘; font-size: large;"><span style="font-family: ‘Hannotate SC‘; font-size: large;"></span></span> <span style="font-family: ‘Hannotate SC‘; font-size: large; color: #ff0000;"><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #ff0000;">Code implementation:</span></span><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #000000;"><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #000000;"><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #000000;">1. Declare the properties of the pin callout in the MYAnnotation.h file of the custom class</span></span></span><pre><pre><span style="color: #0000ff;">#import</span> <Foundation/Foundation.h><span style="color: #0000ff;">#import</span> <MapKit/MapKit.h><span style="color: #0000ff;">@interface</span> myannotation:nsobject<mkannotation><span style="color: #000000;">@property (assign,nonatomic) cllocationcoordinate2d coordinate; </span> <span style="color: #008000;">//latitude and longitude coordinates</span> <span style="color: #000000;"></span> *<span style="color: #000000;"><span style="color: #008000;">//pin Callout Title</span></span> *<span style="color: #000000;"><span style="color: #008000;">//pin callout sub-title</span></span> <span style="color: #0000ff;">@end</span></pre></pre><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #000000;"><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #000000;">2. Declare the map view properties in the Viewcontroller.m file and implement the Map view protocol</span></span><pre><pre><span style="color: #0000ff;">#import</span> <span style="color: #800000;">"</span> <span style="color: #800000;">ViewController.h</span> <span style="color: #800000;">"</span> <span style="color: #0000ff;">#import</span> <MapKit/MapKit.h><span style="color: #0000ff;">#import</span><span style="color: #800000;">"</span><span style="color: #800000;">MyAnnotation.h</span><span style="color: #800000;">"</span><span style="color: #0000ff;">@ Interface</span> Viewcontroller () <MKMapViewDelegate><span style="color: #000000;"></span>*<span style="color: #000000;">mapview; <span style="color: #008000;">//declare A map view control</span> </span> <span style="color: #0000ff;">@end</span></pre></pre><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #000000;"><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #000000;"><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #000000;">3. Create a callout for the specified location while creating a long press gesture</span></span></span><pre>- (<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span><span style="color: #000000;"><span style="color: #000000;">) Viewdidload {[super viewdidload]; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Create a Map instance</span></span>Self.mapview =<span style="color: #000000;"><span style="color: #000000;">[[mkmapview alloc]initwithframe:self.view.frame]; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">set the type of map</span></span>Self.mapView.mapType =<span style="color: #000000;"><span style="color: #000000;">mkmaptypestandard; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">set up a proxy for a map</span></span>Self.mapview.<span style="color: #0000ff;"><span style="color: #0000ff;">Delegate</span></span>=<span style="color: #000000;">self <span style="color: #000000;">; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Add a map view to the controller view</span></span><span style="color: #000000;"><span style="color: #000000;">[self.view addSubview:self.mapView]; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Create a callout</span></span>Myannotation *annotation =<span style="color: #000000;"><span style="color: #000000;">[[myannotation alloc]init];<br> <br> <span style="color: #008000;">//set the latitude and longitude of Beijing</span> annotation.coordinate</span></span>= Cllocationcoordinate2dmake (<span style="color: #800080;"><span style="color: #800080;"></span> +</span>,<span style="color: #800080;"><span style="color: #800080;"></span> the</span><span style="color: #000000;"><span style="color: #000000;">); Annotation.title</span></span>=<span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">China</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #000000;"><span style="color: #000000;">; Annotation.subtitle</span></span>=<span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">Beijing</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Add a callout</span></span><span style="color: #000000;"><span style="color: #000000;">[self.mapview addannotation:annotation]; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">let the map show the area of the callout</span></span><span style="color: #000000;"><span style="color: #000000;">[self.mapview setCenterCoordinate:annotation.coordinate animated:yes]; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Add a long press longpress gesture</span></span>Uilongpressgesturerecognizer *longpress =<span style="color: #000000;"><span style="color: #000000;">[[uilongpressgesturerecognizer alloc]initwithtarget:self action: @selector (longpress:)]; [self.mapview addgesturerecognizer:longpress];}</span></span></pre><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">4. Handle long press gesture events to create custom pin callouts</span></p></p><pre>-(<span style="color: #0000ff;"><span style="color: #0000ff;">void</span></span>) Longpress: (uilongpressgesturerecognizer *<span style="color: #000000;"><span style="color: #000000;">) sender{</span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Get Current Location</span></span>Cgpoint location =<span style="color: #000000;"><span style="color: #000000;">[sender locationInView:self.view]; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">latitude and longitude degree</span></span>cllocationcoordinate2d coordinate =<span style="color: #000000;"><span style="color: #000000;">[self.mapview convertpoint:location toCoordinateFromView:self.mapView]; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Create a new callout</span></span>Myannotation *annotation =<span style="color: #000000;"><span style="color: #000000;">[[myannotation alloc]init]; Annotation.coordinate</span></span>=<span style="color: #000000;"><span style="color: #000000;">coordinate; Annotation.title</span></span>=<span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">New Callout</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #000000;"><span style="color: #000000;">; Annotation.subtitle</span></span>=<span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">waiting</span> to be developed ...</span><span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Add a callout</span></span><span style="color: #000000;"><span style="color: #000000;">[self.mapview addannotation:annotation];}</span></span></pre><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">5. Implement the Proxy method of map view</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #800000;">Proxy methods for #pragma mark-mapview</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #800000;">Display labels and bubbles, and set a picture on a bubble</span></p></p><pre><span style="color: #800000;"><span style="color: #800000;">#pragma mark display Mark Gaze</span></span>-(mkannotationview *) mapview: (mkmapview *) mapview viewforannotation: (<span style="color: #0000ff;"><span style="color: #0000ff;">ID</span></span><MKAnnotation><span style="color: #000000;"><span style="color: #000000;">) annotation{</span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Set Reuse</span> identifiers</span> <span style="color: #0000ff;"><span style="color: #0000ff;">Static</span></span>NSString *annotationid =<span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">annotation</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #000000;"><span style="color: #000000;">; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">first, look for the queue from the reuse</span></span>Mkpinannotationview *view = (mkpinannotationview*<span style="color: #000000;"><span style="color: #000000;">) [mapview dequeuereusableannotationviewwithidentifier:annotationid]; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">create if not found</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">if</span></span>(!<span style="color: #000000;"><span style="color: #000000;">View) {view</span></span>=<span style="color: #000000;"><span style="color: #000000;">[[mkpinannotationview alloc]init]; } </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Setting Properties</span></span>View.annotation =<span style="color: #000000;"><span style="color: #000000;">annotation; View.canshowcallout</span></span>= YES;<span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Show Bubbles</span></span>View.pincolor = mkpinannotationcolorgreen;<span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">Pin Color</span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">show pictures instead of pins</span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">view.image = [UIImage imagenamed:@ "1.png"]; </span></span><span style="color: #008000;"><span style="color: #008000;">//</span></span><span style="color: #008000;"><span style="color: #008000;">display a picture in a bubble view</span></span>View.rightcalloutaccessoryview = [[uiimageview Alloc]initwithimage:[uiimage imagenamed:<span style="color: #800000;"><span style="color: #800000;">@"</span></span><span style="color: #800000;"><span style="color: #800000;">1.png</span></span><span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #000000;"><span style="color: #000000;">]]; </span></span><span style="color: #0000ff;"><span style="color: #0000ff;">return</span></span><span style="color: #000000;"><span style="color: #000000;">view;}</span></span></pre><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large; color: #800000;">Methods to invoke when labeling and canceling labels are selected</span></p></p><pre><pre><span style="color: #800000;">#pragma mark has selected the handling event for the callout</span> -(<span style="color: #0000ff;">void</span>) mapview: (mkmapview *) Mapview didselectannotationview: ( Mkannotationview *<span style="color: #000000;">) view{ NSLog (</span><span style="color: #ff0000;">@ "selected callout"</span><span style="color: #000000;">);}</span> <span style="color: #800000;">#pragma mark cancels the processing event for the callout</span> -(<span style="color: #0000ff;">void</span>) mapview: (mkmapview *) Mapview diddeselectannotationview: ( Mkannotationview *<span style="color: #000000;">) view{ NSLog (</span><span style="color: #ff0000;">@ "canceled callout"</span><span style="color: #000000;">);</span></pre></pre><p><p></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Demo Result: (the output will not print when the callout is checked and canceled)</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">Start: when you click the Pin callout:</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;"></span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;">And then at random in a place long time to appear a new big head this callout when clicking on the big Head callout:</span></p></p><p><p><span style="font-family: ‘Hannotate SC‘; font-size: large;"></span></p></p><p><p>IOS: Implement the Mkannotation protocol, set a pin on the map, click to display specific location information</p></p></span>