【发布时间】:2018-08-18 06:19:33
【问题描述】:
我正在尝试将 CLLocationCoordinates2d 坐标转换为实际街道地址。
我尝试过 CLGeocoder,但没有成功。这是我提供纬度和经度坐标的代码。
let manager = CLLocationManager()
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])
{
guard let locValue: CLLocationCoordinate2D = manager.location?.coordinate else { return }
print("locations = \(locValue.latitude) \(locValue.longitude)")
// let locationtext = "locations = \(locValue.latitude) \(locValue.longitude)"
locationTxt.text = "\(locValue.latitude) \(locValue.longitude)"
}
谢谢!
【问题讨论】:
-
请向我们展示您使用
CLGeocoder的代码。
标签: swift xcode geocoding reverse cllocation