ALP*_*IYA 5 iphone objective-c cllocationmanager ios4 ios-4.2
我有问题获取当前位置iOS 4.0中的经度和纬度也尝试在iOS 4.2中实际上我想在我的应用程序上绘制从当前位置到特定位置的路线,我在我的应用程序中尝试了很多方法但我无法获得结果
请回复任何人知道这个.
谢谢!!:)
Bil*_*ess 16
CLLocationManager *lm = [[CLLocationManager alloc] init];
lm.delegate = self;
lm.desiredAccuracy = kCLLocationAccuracyBest;
lm.distanceFilter = kCLDistanceFilterNone;
[lm startUpdatingLocation];
CLLocation *location = [lm location];
CLLocationCoordinate2D coord;
coord.longitude = location.coordinate.longitude;
coord.latitude = location.coordinate.latitude;
// or a one shot fill
coord = [location coordinate];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
28317 次 |
| 最近记录: |