【问题标题】:Convert CLLocation to CLLocationDegrees将 CLLocation 转换为 CLLocationDegrees
【发布时间】:2012-03-07 12:40:34
【问题描述】:

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

【问题讨论】:

  • 是 CLLocation 还是 CLlovation?

标签: iphone objective-c cllocationmanager cllocation


【解决方案1】:

只需直接从 CLLocation 的 coordinate 属性中获取 CLLocationCoordinate2D

myLocationCoordinate2D = myLocation.coordinate;

Reference Docs

【讨论】:

    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-24
      相关资源
      最近更新 更多