获取当前经纬度方法

来源:互联网 发布:知乎绝地求生炸鱼 编辑:程序博客网 时间:2024/05/17 13:07
[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]

原创粉丝点击