iphone开发获取当前经纬度方法.
[lang=objc]
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
NSLog(@”test”);
CLLocationCoordinate2D loc = [newLocation coordinate];
lat = loc.latitude;//get latitude
lon= loc.longitude;//get longitude
}
[/lang]