Google SDK本地语言的本地地址

时间:2016-12-11 10:21:44

标签: swift google-maps google-maps-api-3

它适用于英语,但不适用于俄语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!)

            }
        }
    }

1 个答案:

答案 0 :(得分:-1)

我找到了一个解决方案 - 使用Yandex - 它与俄语地址完美配合

https://tech.yandex.com/maps/doc/geocoder/desc/concepts/input_params-docpage/

我找到了pod

https://github.com/exister/YandexGeocoder

我通过YandexGecoder获取地址并使用谷歌地图将点放在地图上