1. Import the main header file #import <MapKit/MapKit.h>
Mapkit Framework usage notes the prefix for all data types in the Mapkit framework is MK
Mapkit has a more important UI control: Mkmapview, specifically for map display
2.
Set the Usertrackingmode property of Mkmapview to track the current location of the user
Mkusertrackingmodenone: Do not track the user's location
Mkusertrackingmodefollow: Tracks and displays the user's current location on the map mkusertrackingmodefollowwithheading: tracks and displays the user's current location on the map, which rotates with the user's forward direction
3.
You can set the map type by setting the Mapviewtype of Mkmapview
Mkmaptypestandard: General map (left)
Mkmaptypesatellite: Satellite cloud Image (Central)
Mkmaptypehybrid: General map over satellite cloud image (right)
4.
Mkmapview can set a proxy object that is used to listen to the map's related behavior common proxy methods are
-(void) Mapview: (Mkmapview *) Mapview didupdateuserlocation: (mkuserlocation *) userlocation;
A location change will be called only once, constantly monitoring the user's current location every time the call, will be the user's latest location (userlocation parameter) passed in
-(void) Mapview: (Mkmapview *) Mapview regionwillchangeanimated: (BOOL) animated;
Called when the map's display area is about to change
-(void) Mapview: (Mkmapview *) Mapview regiondidchangeanimated: (BOOL) animated;
Called when the display area of the map has changed
Mkuserlocation is actually a PIN model that includes the following properties
@property (nonatomic, copy) NSString *title;
Title displayed on the Pin
@property (nonatomic, copy) NSString *subtitle;
Sub-headings displayed on a PIN
@property (readonly, nonatomic) cllocation *location;
Location information (where are the pins pinned?)
Mapkit frames in iOS use the display of maps