将CLLocation转换为CLLocationDegrees

时间:2012-02-16 05:00:48

标签: iphone objective-c cllocationmanager cllocation

如何将CLLocation转换为CLLocationDegrees,以便创建CLLocationCoordinate2D结构?

2 个答案:

答案 0 :(得分:6)

直接从CLLocation的CLLocationCoordinate2D属性获取coordinate

myLocationCoordinate2D = myLocation.coordinate;

Reference Docs

答案 1 :(得分:3)

CLLocation.coordinate属性将为您返回CLLocationCoordinate2D。无需进行任何转换。