【问题标题】:Can Google Places API pull specific types of places, like schools, without a location?Google Places API 可以在没有位置的情况下提取特定类型的地方,例如学校吗?
【发布时间】:2017-06-17 20:32:05
【问题描述】:

我希望用户能够搜索他们的学校,并且 Google Places API 返回一个结果列表(学校名称和地址)。

例如。用户输入“Springfield Elementary”,Places API 给出了最佳结果。这有可能吗?

而且还不知道用户的位置?

【问题讨论】:

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


    【解决方案1】:

    您可以查看 Places API text search

    例如,以下请求可以搜索包含“Springfield Elementary”且类型为“school”的地点:

    https://maps.googleapis.com/maps/api/place/textsearch/json?query=Springfield%20Elementary&type=school&key=YOUR_API_KEY

    在视觉上,它看起来像

    我希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-21
      • 1970-01-01
      相关资源
      最近更新 更多