1、#pragma mark代理方法/*当完成位置更新的时候调用一-次方法会频繁调用*/(void)locationManager:(CLLocationManager*)manager didUpdateLocations:(NSArray*)locations/CLLocat1on:位置对象,最核心的就是经纬度/CLLocationCoordinate2 D coordinate:2D位置坐标-经纬度/CLLocationDegrees lakitude;-纬度double值/CLLocationDegrees longitude;-经度CLLocation*location location
2、s.lastobject;NSLog(locations:%location);/5,停止定位self.mgr stopUpdatingLocation;/1 ocations:+/-50.00m(speed0.00mps/c0urse-1.00)15/12/11中国标准时间09:45:28属性介绍3米Discusslon:4米Returns the coordinate of the current location.5米/6property(readonly,nonatomic)CLLocationCoordinate2D coordinate;78/米上面是个结构体,包含类经纬度下/ty
3、pedef structCLLocationDegrees latitude;CLLocationDegrees longitude;CLLocationCoordinate2D;4#pragma mark代理方法5/*当完成位置更新的时候调用-一次方法会频繁调用*/(void)locationManager:(CLLocationManager*)manager didUpdateLocations:(NSArray经纬度/CLLocationDegrees latitude;-纬度/CLLocationDegrees longitude;-经度CLLocation*location loc
4、ations.lastobject;/NSLog(locations:%location);/5,停止定位self.mgr stopUpdatingLocation;/10 cations:+/-50.00m(speed0.00mps/c0urse-1.00)15/12/11中国标准时间09:45:28NSLog(latitude:%f,longitude:%f,location.coordinate.latitude,location.coordinate.longitude);补充一一一一字符串转化成经纬度/发起人的坐标float lngf YRIsEmptString(_model.longitude)floatValue;float latf YRIsEmptString(_model.latitude)floatValue;CLLocationCoordinate2D coord;coord.longitude=lngf;coord.latitude=latf;