[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]
获取当前经纬度方法
最新推荐文章于 2022-05-29 13:43:53 发布