LookupWeatherResponse

LookupWeather RPC 的响应 - 表示所请求位置的天气状况。

此响应同时代表每小时和每日信息,因此响应分为三个部分:每小时、每日和共享。“仅限每小时”和“仅限每日”字段标记为选填。对于每小时和每日信息中共享的字段,有些字段始终存在,因此未标记为可选,而其余字段则标记为可选,因为它们并非始终可用。

JSON 表示法
{
  "weatherCondition": {
    object (WeatherCondition)
  },
  "precipitation": {
    object (Precipitation)
  },
  "wind": {
    object (Wind)
  },
  "returnedLocation": {
    object (Location)
  },
  "attribution": {
    object (Attribution)
  },
  "temperature": {
    object (Temperature)
  },
  "feelsLikeTemperature": {
    object (Temperature)
  },
  "heatIndex": {
    object (Temperature)
  },
  "airPressure": {
    object (AirPressure)
  },
  "maxTemperature": {
    object (Temperature)
  },
  "minTemperature": {
    object (Temperature)
  },
  "feelsLikeMaxTemperature": {
    object (Temperature)
  },
  "feelsLikeMinTemperature": {
    object (Temperature)
  },
  "maxHeatIndex": {
    object (Temperature)
  },
  "sunEvents": {
    object (SunEvents)
  },
  "moonEvents": {
    object (MoonEvents)
  },
  "relativeHumidity": integer,
  "uvIndex": integer,
  "thunderstormProbability": integer,
  "cloudCover": integer,
  "weather": {
    object (WeatherResultData)
  },
  "airQuality": {
    object (AirQualityResultData)
  },
  "pollen": {
    object (PollenResultData)
  },
  "timeZone": string
}
字段
weatherCondition

object (WeatherCondition)

天气状况

precipitation

object (Precipitation)

降水概率和累计降水量

wind

object (Wind)

风况

returnedLocation

object (Location)

必需。返回天气信息的位置。此位置与请求中的位置相同,但如果请求的位置是查找粗略位置的自由文本地址(例如“Mountain View, CA”),则可能与请求中的位置不同。

attribution

object (Attribution)

与天气信息一起显示的必需出处。

temperature

object (Temperature)

每小时温度

feelsLikeTemperature

object (Temperature)

每小时的体感温度。

heatIndex

object (Temperature)

每小时酷热指数温度。

airPressure

object (AirPressure)

每小时气压状况。

maxTemperature

object (Temperature)

全天的最高温度。

minTemperature

object (Temperature)

全天最低温度。

feelsLikeMaxTemperature

object (Temperature)

全天最高体感温度。

feelsLikeMinTemperature

object (Temperature)

全天最低体感温度。

maxHeatIndex

object (Temperature)

全天最高酷热指数温度。

sunEvents

object (SunEvents)

与太阳相关的事件(例如日出、日落)。

moonEvents

object (MoonEvents)

与月亮相关的事件(例如月出、月落)。

relativeHumidity

integer

相对湿度百分比(值介于 0 到 100 之间)。

uvIndex

integer

最高紫外线 (UV) 指数。

thunderstormProbability

integer

雷暴概率(值介于 0 到 100 之间)。

cloudCover

integer

云层覆盖天空的百分比(值介于 0 到 100 之间)。

weather

object (WeatherResultData)

所请求地点的天气状况。

airQuality

object (AirQualityResultData)

所请求位置的空气质量信息。

pollen

object (PollenResultData)

所请求位置的花粉信息。

timeZone

string

位置的已解析 IANA 时区字符串(例如,“America/New_York”“Asia/Tokyo”)。

温度

表示温度值。

JSON 表示法
{
  "unit": enum (Unit),
  "degrees": number
}
字段
unit

enum (Unit)

可选。用于测量温度值的单位的代码。

degrees

number

采用指定单位的温度值(以度为单位)。

SunEvents

表示与太阳相关的事件(例如日出、日落)。

JSON 表示法
{
  "sunriseTime": string,
  "sunsetTime": string
}
字段
sunriseTime

string (Timestamp format)

日出时间。

注意:在某些特殊情况下(例如北极圈以北),一天中可能没有日出时间。在这些情况下,此字段将不设置。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不进行“Z”归一化处理的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

sunsetTime

string (Timestamp format)

日落时间。

注意:在某些特殊情况下(例如北极圈以北),一天中可能没有日落时间。在这些情况下,此字段将不设置。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不进行“Z”归一化处理的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

MoonEvents

表示与月亮相关的事件(例如月出、月落)。

JSON 表示法
{
  "moonPhase": enum (Phase),
  "moonriseTimes": [
    string
  ],
  "moonsetTimes": [
    string
  ]
}
字段
moonPhase

enum (Phase)

可选。月相。

moonriseTimes[]

string (Timestamp format)

月球上边缘出现在地平线上方的时间(请参阅 https://en.wikipedia.org/wiki/Moonrise_and_moonset))。

注意:在大多数情况下,每天只有一个月出时间。在其他情况下,该列表可能为空(例如,当月亮在第二天午夜之后升起时)。不过,在特殊情况下(例如在极地地区),该列表可能包含多个值。在这些情况下,值会按升序排序。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不进行“Z”归一化处理的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

moonsetTimes[]

string (Timestamp format)

月球上边缘消失在地平线以下的时间(请参阅 https://en.wikipedia.org/wiki/Moonrise_and_moonset))。

注意:在大多数情况下,每天只有一个月落时间。在其他情况下,列表可能为空(例如,月亮在次日午夜之后落下)。不过,在特殊情况下(例如在极地地区),该列表可能包含多个值。在这些情况下,值会按升序排序。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不进行“Z”归一化处理的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

WeatherCondition

表示给定位置在给定时间段内的天气状况。

免责声明:天气图标和状况代码可能会发生变化。Google 可能会根据需要引入新的代码和图标,或更新现有代码和图标。建议您定期查看此文档,了解最新信息。

JSON 表示法
{
  "iconBaseUri": string,
  "description": {
    object (LocalizedText)
  },
  "type": enum (Type)
}
字段
iconBaseUri

string

图标的基础 URI,不包括文件类型扩展名。如需显示图标,请根据需要在此 URI 后附加主题和文件类型扩展名(.png 或 .svg)。默认情况下,图标采用浅色主题,但可以附加 _dark 以采用深色模式。例如:“https://maps.gstatic.com/weather/v1/dust.svg”或“https://maps.gstatic.com/weather/v1/dust_dark.svg”,其中 iconBaseUri 为“https://maps.gstatic.com/weather/v1/dust”。

description

object (LocalizedText)

此天气状况的文字说明(本地化)。

type

enum (Type)

天气状况的类型。

LocalizedText

特定语言的文本的本地化变体。

JSON 表示法
{
  "text": string,
  "languageCode": string
}
字段
text

string

与下方的 languageCode 对应的语言的本地化字符串。

languageCode

string

文本的 BCP-47 语言代码,例如“en-US”或“sr-Latn”。

如需了解详情,请参阅 http://www.unicode.org/reports/tr35/#Unicode_locale_identifier。

降水概率

表示指定位置的一组降水量值。

JSON 表示法
{
  "probability": {
    object (PrecipitationProbability)
  },
  "snowQpf": {
    object (QuantitativePrecipitationForecast)
  },
  "qpf": {
    object (QuantitativePrecipitationForecast)
  }
}
字段
probability

object (PrecipitationProbability)

降水概率(值介于 0 到 100 之间)。

snowQpf

object (QuantitativePrecipitationForecast)

一段时间内累积的降雪量,以液态水当量衡量。注意:QPF 是 Quantitative Precipitation Forecast(定量降水预报)的缩写(如需了解详情,请参阅 QuantitativePrecipitationForecast 定义)。

qpf

object (QuantitativePrecipitationForecast)

一段时间内累积的降水量(以液态水当量衡量)。注意:QPF 是 Quantitative Precipitation Forecast(定量降水预报)的缩写(如需了解详情,请参阅 QuantitativePrecipitationForecast 定义)。

PrecipitationProbability

表示给定位置的降水概率。

JSON 表示法
{
  "type": enum (Type),
  "percent": integer
}
字段
type

enum (Type)

可选。表示降水类型的代码。

percent

integer

一个 0 到 100 之间的百分比,表示降水概率。

QuantitativePrecipitationForecast

表示在指定时间段内指定区域的预期融化降水量(参考:https://en.wikipedia.org/wiki/Quantitative_precipitation_forecast),通常简称为 QPF。

JSON 表示法
{
  "unit": enum (Unit),
  "quantity": number
}
字段
unit

enum (Unit)

用于测量累计降水量的单位代码。

quantity

number

一段时间内累积的降水量,以液态水当量衡量。

Wind

表示一组风属性。

JSON 表示法
{
  "direction": {
    object (WindDirection)
  },
  "speed": {
    object (WindSpeed)
  },
  "gust": {
    object (WindSpeed)
  }
}
字段
direction

object (WindDirection)

风向,即风吹来的角度。

speed

object (WindSpeed)

风速。

gust

object (WindSpeed)

阵风(风速突然增加)。

WindDirection

表示风的来源方向。

JSON 表示法
{
  "cardinal": enum (Cardinal),
  "degrees": integer
}
字段
cardinal

enum (Cardinal)

可选。表示风吹来的基本方向的代码。

degrees

integer

风向(以度为单位,值介于 0 到 360 之间)。

WindSpeed

表示风速。

JSON 表示法
{
  "unit": enum (Unit),
  "value": number
}
字段
unit

enum (Unit)

可选。表示风速测量单位的代码。

value

number

风速值。

WeatherResultData

所请求位置的天气状况载荷。

JSON 表示法
{
  "weatherCondition": {
    object (WeatherCondition)
  },
  "precipitation": {
    object (Precipitation)
  },
  "wind": {
    object (Wind)
  },
  "attribution": {
    object (Attribution)
  },
  "dateTime": string,
  "temperature": {
    object (Temperature)
  },
  "feelsLikeTemperature": {
    object (Temperature)
  },
  "heatIndex": {
    object (Temperature)
  },
  "airPressure": {
    object (AirPressure)
  },
  "date": {
    object (Date)
  },
  "maxTemperature": {
    object (Temperature)
  },
  "minTemperature": {
    object (Temperature)
  },
  "feelsLikeMaxTemperature": {
    object (Temperature)
  },
  "feelsLikeMinTemperature": {
    object (Temperature)
  },
  "maxHeatIndex": {
    object (Temperature)
  },
  "sunEvents": {
    object (SunEvents)
  },
  "moonEvents": {
    object (MoonEvents)
  },
  "relativeHumidity": integer,
  "uvIndex": integer,
  "thunderstormProbability": integer,
  "cloudCover": integer
}
字段
weatherCondition

object (WeatherCondition)

天气状况。

precipitation

object (Precipitation)

降水概率和累计降水量。

wind

object (Wind)

风况。

attribution

object (Attribution)

与天气信息一起显示的必需出处。

dateTime

string (Timestamp format)

此每小时或当前天气条目的时间戳。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不进行“Z”归一化处理的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

temperature

object (Temperature)

每小时温度。

feelsLikeTemperature

object (Temperature)

每小时的体感温度。

heatIndex

object (Temperature)

每小时酷热指数温度。

airPressure

object (AirPressure)

每小时气压状况。

date

object (Date)

每日天气预报的公历日期。

maxTemperature

object (Temperature)

全天的最高温度。

minTemperature

object (Temperature)

全天最低温度。

feelsLikeMaxTemperature

object (Temperature)

全天最高体感温度。

feelsLikeMinTemperature

object (Temperature)

全天最低体感温度。

maxHeatIndex

object (Temperature)

全天最高酷热指数温度。

sunEvents

object (SunEvents)

与太阳相关的事件(例如日出、日落)。

moonEvents

object (MoonEvents)

与月亮相关的事件(例如月出、月落)。

relativeHumidity

integer

相对湿度百分比(值介于 0 到 100 之间)。

uvIndex

integer

最高紫外线 (UV) 指数。

thunderstormProbability

integer

雷暴概率(值介于 0 到 100 之间)。

cloudCover

integer

云层覆盖天空的百分比(值介于 0 到 100 之间)。

PollenResultData

所请求位置的花粉载荷。

JSON 表示法
{
  "dailyForecast": {
    object (DailyPollenForecast)
  },
  "attribution": {
    object (Attribution)
  }
}
字段
dailyForecast

object (DailyPollenForecast)

所请求日期的每日花粉预报。

attribution

object (Attribution)

与花粉数据一起显示的必需出处。

DailyPollenForecast

单个日历日的花粉预报。

JSON 表示法
{
  "date": {
    object (Date)
  },
  "categories": [
    {
      object (PollenCategoryInfo)
    }
  ],
  "plantSpecies": [
    {
      object (PlantSpeciesInfo)
    }
  ]
}
字段
date

object (Date)

预报的公历日期。

categories[]

object (PollenCategoryInfo)

宽泛的花粉类别细分(树木、草本、杂草)。

plantSpecies[]

object (PlantSpeciesInfo)

精细的植物物种细分。

PollenCategoryInfo

宽泛花粉类别(例如树木、草、杂草)的信息。

JSON 表示法
{
  "displayName": string,
  "inSeason": boolean,
  "index": {
    object (PollenIndex)
  },
  "healthRecommendations": [
    string
  ]
}
字段
displayName

string

类别的显示名称(例如“树木”“草”“杂草”)。

inSeason

boolean

此花粉类别是否正在该地区盛开。

index

object (PollenIndex)

此类别对应的通用花粉指数 (UPI) 测量值。

healthRecommendations[]

string

针对花粉敏感人群的可行健康建议。

PollenIndex

标准化通用花粉指数 (UPI) 测量。

JSON 表示法
{
  "category": string,
  "description": string,
  "value": integer
}
字段
category

string

本地化类别分类(例如“无”“极低”“低”“中等”“高”“极高”)。

description

string

花粉风险等级的说明。

value

integer

UPI 数值(0 到 5 级)。

PlantSpeciesInfo

特定致敏植物物种的信息。

JSON 表示法
{
  "code": string,
  "displayName": string,
  "family": string,
  "inSeason": boolean,
  "index": {
    object (PollenIndex)
  },
  "season": string,
  "crossReactions": string
}
字段
code

string

机器可读的物种代码(例如“BIRCH”“JAPANESE_CEDAR”“RAGWEED”)。

displayName

string

植物种类的本地化显示名称(例如“桦树”)。

family

string

植物科名(例如“桦木科”)。

inSeason

boolean

此植物物种当前是否处于当季。

index

object (PollenIndex)

此物种的通用花粉指数 (UPI) 测量值。

season

string

典型的花期说明(例如“冬末、春季”)。

crossReactions

string

已知交叉反应性过敏原(例如“桤木、榛树、山毛榉和橡树花粉”)。