iOS8 version Map location attention Point

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.