有人知道 Google 的 API 会发布的所有可能的天气条件吗?

我必须将我的图标与预测相匹配,但我找不到条件列表。

有帮助吗?

解决方案

提到了这一点: http://www.blindmotion.com/?p=73 尽管它可能并不完整,因为它不是 Google 发布的。不过,它可能涵盖了大约 99% 的情况,除非 Google 员工随机增强和发布天气 API。

编辑:

blindmotion.com 出现故障,互联网档案馆包含该页面的内容: http://web.archive.org/web/20111001141159/http://www.blindmotion.com/2009/03/google-weather-api-images/ 。(注,2009 年起)

https://gist.github.com/bzerangue/806934 (由 Vijay 撰写,在下面的答案中列出)可能是更新的列表

其他提示

我发现这个名单看起来比任何其他的,我已经看到更完整的

<击> http://dennisdel.com/content/conditions.xml (的不再可用(2016年1月)

<conditions>
 <type>PARTLY SUNNY</type>
 <type>SCATTERED THUNDERSTORMS</type>
 <type>SHOWERS</type>
 <type>SCATTERED SHOWERS</type>
 <type>RAIN AND SNOW</type>
 <type>OVERCAST</type>
 <type>LIGHT SNOW</type>
 <type>FREEZING DRIZZLE</type>
 <type>CHANCE OF RAIN</type>
 <type>SUNNY</type>
 <type>CLEAR</type>
 <type>MOSTLY SUNNY</type>
 <type>PARTLY CLOUDY</type>
 <type>MOSTLY CLOUDY</type>
 <type>CHANCE OF STORM</type>
 <type>RAIN</type>
 <type>CHANCE OF SNOW</type>
 <type>CLOUDY</type>
 <type>MIST</type>
 <type>STORM</type>
 <type>THUNDERSTORM</type>
 <type>CHANCE OF TSTORM</type>
 <type>SLEET</type>
 <type>SNOW</type>
 <type>ICY</type>
 <type>DUST</type>
 <type>FOG</type>
 <type>SMOKE</type>
 <type>HAZE</type>
 <type>FLURRIES</type>
 <type>LIGHT RAIN</type>
 <type>SNOW SHOWERS</type>
 <type>ICE/SNOW</type>
 <type>WINDY</type>
 <type>SCATTERED SNOW SHOWERS</type>
</conditions>

修改 有基于原始名单的一个新的位置:点击 https://gist.github.com/806934

它消除这些从列表

<type>ICE/SNOW</type>
<type>WINDY</type>
<type>SCATTERED SNOW SHOWERS</type>

和添加:

<type>HAIL</type>

可能不会伤害无论如何使用它们全部

这链路被打破我。下面是我在另一个论坛发现了一个清单:

"Clear 
Cloudy 
Fog
Haze 
Light Rain
Mostly Cloudy 
Overcast 
Partly Cloudy
Rain 
Rain Showers 
Showers
Thunderstorm 
Chance of Showers 
Chance of Snow 
Chance of Storm 
Mostly Sunny
Partly Sunny 
Scattered Showers 
Sunny"

这是我能找到的最好的名单: http://www.blindmotion.com/?p = 73

您可能要考虑被正式支持和记录替代的API。雅虎的天气RSS供稿是一个方便,易于使用的API。我使用国家气象局的API 为我的项目之一,因为我需要拉预测在未来特定的时间框架和它让我做,在一个相当简单的方式。

我编这一块,它的一切,到目前为止,我不认为我错过了什么。

Clear
Sunny
Partly Sunny
Mostly Sunny
Scattered Thunderstorms
Showers
Scattered Showers
Rain and Snow
Overcast
Light Snow
Freezing Drizzle
Chance of Rain
Partly Cloudy
Mostly Cloudy
Chance of Storm
Rain
Chance of Snow
Cloudy
Mist
Storm
Thunderstorm
Chance of TStorm
Sleet
Snow
Icy
Dust
Fog
Smoke
Haze
Flurries
Light Rain
Snow Showers
Hail

来源: https://gist.github.com/806934

一些更:雾,粉尘,冰冷,烟雾,雨夹雪

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top