PlaceResult

关于地点搜索结果的详细信息。

JSON 表示法
{
  "place": {
    object (Place)
  },
  "distanceMeters": number
}
字段
place

object (Place)

某个地点的详细信息。

distanceMeters

number

从搜索位置到地点几何图形或中心中心的直线距离。

地点

某个地点的详细信息。

JSON 表示法
{
  "placeId": string,
  "displayName": string,
  "languageCode": string,
  "address": {
    object (Address)
  },
  "geometry": {
    object (Geometry)
  },
  "types": [
    string
  ],
  "associatedCompounds": [
    {
      object (Compound)
    }
  ]
}
字段
placeId

string

地点的地点 ID。地点 ID 是唯一标识地点的文本。https://developers.google.com/places/web-service/place-id

displayName

string

已本地化的地点的名称。已根据请求中提供的偏好设置进行了本地化。

languageCode

string

与地点相关联的文本字段的语言代码。例如,“姓名”和“地址”。

address

object (Address)

地点的地址。

geometry

object (Geometry)

地点的几何图形。

types[]

string

此结果的一组类型标记。例如,“political”和“locality”。https://developers.google.com/places/web-service/supported_types

associatedCompounds[]

object (Compound)

与该地点相关的化合物。

几何图形

地点的几何图形。

JSON 表示法
{
  "location": {
    object (LatLng)
  },
  "viewport": {
    object (Viewport)
  },
  "displayBoundary": {
    object
  }
}
字段
location

object (LatLng)

包含此消息的实体的中心点。

viewport

object (Viewport)

适合在平均大小的地图上显示地点的视口。

displayBoundary

object (Struct format)

使用 GeoJSON 多边形格式指定多边形

视口

纬度-经度视口,表示为两个对角线方向的 lowhigh 点。视口会被视为一个闭合区域,即包含其边界。纬度范围必须介于 -90 度(含)到 90 度(含)之间,经度范围必须在 -180 度(含)到 180 度(含)之间。各种情况包括:

  • 如果 low = high,则视口将包含该单个点。

  • 如果 low.longitude > high.longitude,经度范围会反转(视口就会穿过 180 度经度线)。

  • 如果 low.longitude = -180 度且 high.longitude = 180 度,则视口会包含所有经度。

  • 如果 low.longitude = 180 度且 high.longitude = -180 度,则经度范围为空。

  • 如果 low.latitude > high.latitude,则纬度范围为空。

必须填充 lowhigh,并且表示的框不能为空(如上述定义所指定)。空白视口会导致错误。

例如,以下视口会完全包围纽约市:

{ "low": { "latitude": 40.477398, "longitude": -74.259087 }, "high": { "latitude": 40.91618, "longitude": -73.70018 } }

JSON 表示法
{
  "low": {
    object (LatLng)
  },
  "high": {
    object (LatLng)
  }
}
字段
low

object (LatLng)

必需。视口的低点。

high

object (LatLng)

必需。视口的高点。

建筑

与地点相关的建筑群。

JSON 表示法
{
  "type": enum (CompoundType),
  "geometry": {
    object (Geometry)
  },
  "entrances": [
    {
      object (Entrance)
    }
  ]
}
字段
type

enum (CompoundType)

化合物的类型。

geometry

object (Geometry)

与化合物关联的几何图形。

entrances[]

object (Entrance)

与相应化合物相关的进入次数列表。

CompoundType

复合类型的值。

枚举
COMPOUND_TYPE_UNSPECIFIED 复合类型未知。
SECTION 复合部分。https://support.google.com/mapskb/answer/7054299
BUILDING 复合建筑。https://support.google.com/mapskb/answer/7013011
GROUNDS 复合场地。https://support.google.com/mapskb/answer/7046859

入口

地点的入口。

JSON 表示法
{
  "location": {
    object (LatLng)
  }
}
字段
location

object (LatLng)

入口的位置。