解决ios webView加载html的地图无法定位问题

1.appDelegate中加入#import

2. {CLLocationManager*locationManager;}

3.加入

if(locationManager==nil) {

locationManager= [[CLLocationManageralloc]init];

locationManager.delegate=self;

locationManager.distanceFilter=500;//定位 频率

if([[[UIDevicecurrentDevice]systemVersion]doubleValue]>=8.0) {

[locationManagerrequestAlwaysAuthorization];

}else

[locationManagerrequestWhenInUseAuthorization];

}

[locationManager  startUpdatingLocation];

你可能感兴趣的:(解决ios webView加载html的地图无法定位问题)