amap_159****293 发表于 2016-3-25 15:09:11

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,最后打印的经纬度信息就是不对,能不能帮我看看是怎么回事?

amap_187****563 发表于 2016-3-25 15:36:09

同问,也是遇到一样的问题

hades_h 发表于 2016-4-6 10:54:19

经纬度不对是什么意思?

amaptPMLREJP 发表于 2016-4-7 20:56:25

我使用时经常会定位到香港,什么原因???
页: [1]
查看完整版本: iOS MAMapView 定位不准