MKMapItem*mylocation = [MKMapItemmapItemForCurrentLocation];
// 当前经纬度
floatcurrentLatitude = mylocation.placemark.location.coordinate.latitude;
floatcurrentLongitude = mylocation.placemark.location.coordinate.longitude;
// 默认位置(模拟器测试要注释掉才行)
[selfsetMapViewCenter:CLLocationCoordinate2DMake(currentLatitude, currentLongitude)];
网友评论