Learn iOS map targeting
I define a property first:
@property (Weak, nonatomic) Iboutlet Mkmapview *MAPV;
It then initializes some parameters of the property when the project is run:
Set the type of the map control Mkmaptypestandard = 0,//default mode //mkmaptypesatellite,// satellite mode //mkmaptypehybrid //Mixed mode self.mapV.mapType = Mkmaptypestandard; Set up auto-tracking, the first time to use the positioning function requires authorization [SELF.MAPV setusertrackingmode:mkusertrackingmodefollow Animated:yes];
Then I run, found that the map location function does not work, a check, found my iOS8 version, for the iOS8 version, must be in the configuration file info.plist a configuration, is to increase Nslocationalwaysusagedescription or nslocationwheninuseusagedescription to tell the user the purpose of using location services :
Once you've added this configuration, you'll be able to navigate the map by running again!
iOS8 version Map location attention Point