Google Map SDK for IOS

Source: Internet
Author: User

According to the start for Google Map SDK provided by Google for iOS set a series of settings, there is not much to say

Https://developers.google.com/maps/documentation/ios/start

Google Map SDK for iOS provides a full set of targeting and display services, so there's no need to call Cllocationmanager in Corelocation to manage location

You only need to set Google Map's

mapview_. mylocationenabled = YES;

mapview_. Settings. Mylocationbutton = YES;

The tracking of the location can be achieved.

However, after iOS8, the same settings will not be able to be located, because Apple forces the developer to add a reminder to use the location information in the positioning service, so if you do not add this reminder, you will not get the location coordinates.

How do I set reminders? Very simple:

In the XXXViewController.h file, add

@property (Nonatomic,retain) Cllocationmanager *locationmanager;

In the Viewdidload: XXXVIEWCONTROLLER.M file, add

[_locationmanager requestwheninuseauthorization];

Join in the XXXVIEWCONTROLLER.M

- (BOOL) ios8{    return [[[Uidevice Currentdevice] systemversion]  @ "8.0 " ];}

Join in the Info.plist

Nslocationwheninuseusagedescription:this'll is used to obtain or track your location.

Such a key-value pair

At this point you can use the iphone's positioning function normally.

Google Map SDK for IOS

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.