【问题标题】:Get cities by state and country Google API按州和国家/地区 Google API 获取城市
【发布时间】:2017-09-02 23:57:51
【问题描述】:

我尝试使用 Google Places API 来实现这个目标,并且我知道如何按国家/地区获取城市。但我需要添加按美国国家和州搜索的选项。也许我应该使用其他 API。

【问题讨论】:

    标签: google-maps google-places-api google-places


    【解决方案1】:

    Places API 目前不支持它。

    公共问题跟踪器中有一个功能请求添加此功能:

    https://issuetracker.google.com/issues/35822067

    随时为功能请求加注星标以添加您的投票。

    一种解决方法可能是为每个状态使用边界,并使用选项 strictBounds: true 将结果限制在特定区域。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-09-26
      • 1970-01-01
      • 2012-11-18
      • 2014-09-08
      • 1970-01-01
      • 1970-01-01
      • 2019-05-27
      相关资源
      最近更新 更多