【问题标题】:Google Place Autocomplete- some of the suggestion's addresses aren't displayed in EnglishGoogle Place Autocomplete - 某些建议的地址未以英文显示
【发布时间】:2019-08-13 17:59:52
【问题描述】:

我在我的应用中使用 Google Place Autocomplete。 我通过

导入库
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&language=en"></script>

“Dummy Road, Zurich, Switzerland”等一些地址以部分德语显示(苏黎世以德语显示)。

我也签到了: https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform

而且也是这样显示的。

有没有办法用英文显示整个地址?

【问题讨论】:

    标签: javascript google-maps autocomplete


    【解决方案1】:

    您应该可以设置language parameter。默认情况下,它会尝试根据浏览器设置等内容加载最合适的语言。在您的请求中添加:

    language=en
    

    【讨论】:

    • 它只影响国家而不是城市等
    猜你喜欢
    • 1970-01-01
    • 2016-07-06
    • 1970-01-01
    • 2016-06-22
    • 2018-10-20
    • 1970-01-01
    • 1970-01-01
    • 2023-03-19
    • 1970-01-01
    相关资源
    最近更新 更多