它适用于英语,但不适用于俄语launguage。为什么?谷歌地图允许在我的国家输入当地语言。
let geocoder1 = CLGeocoder()
let address1 = "улица Здолбуновская 7г, Киев"
geocoder1.geocodeAddressString(address1) { (placemarks, error) in
if error != nil {
println("No found address")
}
else if let placemarks = placemarks {
if placemarks.count != 0 {
println(placemarks.first!)
}
}
}
let geocoder2 = CLGeocoder()
let address2 = "Zdolbunivska St, 7H, Kyiv, Ukraine"
geocoder2.geocodeAddressString(address2) { (placemarks, error) in
if error != nil {
println("No found address")
}
else if let placemarks = placemarks {
if placemarks.count != 0 {
println(placemarks.first!)
}
}
}
答案 0 :(得分:-1)
我找到了一个解决方案 - 使用Yandex - 它与俄语地址完美配合
https://tech.yandex.com/maps/doc/geocoder/desc/concepts/input_params-docpage/
我找到了pod
https://github.com/exister/YandexGeocoder。
我通过YandexGecoder获取地址并使用谷歌地图将点放在地图上