gpt4 book ai didi

android - 如何使用 google place api 根据附近的偏好获取 "colleges"列表?

转载 作者:搜寻专家 更新时间:2023-11-01 08:43:23 24 4
gpt4 key购买 nike

我使用过 google place api,因此我知道如何使用它来获得基础知识,但我如何获得 colleges 的列表附近,因为 google place api 还没有那个标签,他们有 school ,而且它没有提供我想要过滤的链接。

过滤器应基于以下内容:

  • 结果应该返回它是什么类型的大学(private or govt.engineering or medical)
  • 最低资格标准
  • 位置(this i can get)
  • 费用

  • 所以我想知道有没有办法从 http 中检索所有这些数据要求?正如我尝试将字段设置为 school除了类(class)地点或 how does college search websites work?,我没有收到以下信息
    https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=lng,lat&radius=5000&types=school&sensor=true&key=........

    但是 google map当我们用谷歌搜索 colleges 时,确实给出了以下结果

    最佳答案

    如果您只想要大学,则可以使用“大学”标签。然而,the JSON response不包括申请费或大学类型等信息(至少现在还没有):

    Each result within the results array may contain the following fields:

    • icon contains the URL of a recommended icon which may be displayed to the user when indicating this result.
    • id contains a unique stable identifier denoting this place. This identifier may not be used to retrieve information about this place, but is guaranteed to be valid across sessions. It can be used to consolidate data about this place, and to verify the identity of a place across separate searches. Note: The id is now deprecated in favor of place_id. See the deprecation notice on this page.
    • geometry contains geometry information about the result, generally including the location (geocode) of the place and (optionally) the viewport identifying its general area of coverage.
    • name contains the human-readable name for the returned result. For establishment results, this is usually the business name.
    • opening_hours may contain the following information:
      • open_now is a boolean value indicating if the place is open at the current time.
    • photos[] — an array of photo objects, each containing a reference to an image. A Place Search will return at most one photo object. Performing a Place Details request on the place may return up to ten photos. More information about Place Photos and how you can use the images in your application can be found in the Place Photos documentation. A photo object is described as:
      • photo_reference — a string used to identify the photo when you perform a Photo request.
      • height — the maximum height of the image.
      • width — the maximum width of the image.
      • html_attributions[] — contains any required attributions. This field will always be present, but may be empty.
    • place_id — a textual identifier that uniquely identifies a place. To retrieve information about the place, pass this identifier in the placeId field of a Places API request. For more information about place IDs, see the place ID overview.
    • scope — Indicates the scope of the place_id. The possible values are:

      • APP: The place ID is recognised by your application only. This is because your application added the place, and the place has not yet passed the moderation process.
      • GOOGLE: The place ID is available to other applications and on Google Maps.

      Note: The scope field is included only in Nearby Search results and Place Details results. You can only retrieve app-scoped places via the Nearby Search and the Place Details requests. If the scope field is not present in a response, it is safe to assume the scope is GOOGLE.

    • alt_ids — An array of zero, one or more alternative place IDs for the place, with a scope related to each alternative ID.

      Note: This array may be empty or not present. If present, it contains the following fields:

      • place_id — The most likely reason for a place to have an alternative place ID is if your application adds a place and receives an application-scoped place ID, then later receives a Google-scoped place ID after passing the moderation process.
      • scope — The scope of an alternative place ID will always be APP, indicating that the alternative place ID is recognised by your application only.

    关于android - 如何使用 google place api 根据附近的偏好获取 "colleges"列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30710800/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com