【发布时间】:2022-01-18 17:25:09
【问题描述】:
我从方法reverseGeocodeLocation(_ location: CLLocation) 获得了一个位置名称。我的要求是在离线模式下将 Lat-Long 值存储在 DB 中,我还想存储从上述方法获得的这个位置名称字符串。
这是我已经实现的:
geoCoder.reverseGeocodeLocation(location, completionHandler: { (placemarks, error) in
let place = placemarks?[0]
var countryName = ""
if let countryString = place?.country {
countryName = countryString
}
离线模式下绝对可以得到lat-long;我的问题是,上述方法是否也适用于离线模式?
【问题讨论】:
标签: ios swift cllocationmanager reverse-geocoding cllocation