iOS MAMapView 定位不准
各位大神,我这里有个问题,按照官方文档学习的,就是一个简单的定位功能,但是定位的不准,找不到是什么原因,代码很简单,就这么几行#import "ViewController.h"#import <MAMapKit/MAMapKit.h>
#define LBS_AMAP_KEY @"1234567890"
@interface ViewController ()<MAMapViewDelegate>
{
MAMapView *mapView;
}
@end
@implementation ViewController
- (void)viewDidLoad
{
;
;
}
- (void)initMapView
{
.apiKey = LBS_AMAP_KEY;
mapView = [ initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
mapView.delegate = self;
;
mapView.showsUserLocation = YES;
}
- (void)mapView:(MAMapView *)mapView didUpdateUserLocation:(MAUserLocation *)userLocation updatingLocation:(BOOL)updatingLocation
{
CLLocation *currentLocation = userLocation.location;
NSLog(@"latitude:%f--------longitude:%f", currentLocation.coordinate.latitude, currentLocation.coordinate.longitude);
}
@endinfo.plist中也配置了NSLocationWhenInUseUsageDescription,最后打印的经纬度信息就是不对,能不能帮我看看是怎么回事?
同问,也是遇到一样的问题 经纬度不对是什么意思?
我使用时经常会定位到香港,什么原因???
页:
[1]