首先集成高德SDK.然后导入头文件#import <AMapLocationKit/AMapLocationKit.h>
self.locationManagers = [[AMapLocationManager alloc] init];
[self.locationManagers setDesiredAccuracy:kCLLocationAccuracyHundredMeters];
[self.locationManagers setPausesLocationUpdatesAutomatically:NO];
[self.locationManagers setLocationTimeout:2];
[self.locationManagers setReGeocodeTimeout:5];
[self.locationManagers requestLocationWithReGeocode:NO completionBlock:^(CLLocation *location, AMapLocationReGeocode *regeocode, NSError *error) {
if (error)
{
}
else
{
self.latitude = [NSString stringWithFormat:@"%f",location.coordinate.latitude];
self.longitude = [NSString stringWithFormat:@"%f",location.coordinate.longitude];
}
[self dengluRequet];
}];