使用google的weather api可以得到天气的xml文件,如下链接
http://www.google.com/ig/api?weather=,,,31174165,121433841
但是现在我想知道里面所有的天气种类,找了很久,都没找到
目前知道的有Clear,Partly Sunny,storm,frog等
谁能告诉我有哪些,或者告诉我去哪里可以找到,谢谢

解决方案 »

  1.   

    给你贴上今天北京的天气。这个你自己解一下xml就可以了。
    <xml_api_reply version="1"><weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0"><forecast_information><city data="Beijing, Beijing"/><postal_code data="Beijing"/><latitude_e6 data=""/><longitude_e6 data=""/><forecast_date data="2011-06-09"/><current_date_time data="2011-06-09 14:30:00 +0000"/><unit_system data="SI"/></forecast_information><current_conditions><condition data="晴"/><temp_f data="75"/><temp_c data="24"/><humidity data="湿度: 73%"/><icon data="/ig/images/weather/sunny.gif"/><wind_condition data="风向: 北、风速:1 米/秒"/></current_conditions><forecast_conditions><day_of_week data="周四"/><low data="21"/><high data="35"/><icon data="/ig/images/weather/mostly_sunny.gif"/><condition data="晴间多云"/></forecast_conditions><forecast_conditions><day_of_week data="周五"/><low data="18"/><high data="32"/><icon data="/ig/images/weather/mostly_sunny.gif"/><condition data="以晴为主"/></forecast_conditions><forecast_conditions><day_of_week data="周六"/><low data="18"/><high data="32"/><icon data="/ig/images/weather/sunny.gif"/><condition data="晴"/></forecast_conditions><forecast_conditions><day_of_week data="周日"/><low data="19"/><high data="35"/><icon data="/ig/images/weather/sunny.gif"/><condition data="晴"/></forecast_conditions></weather></xml_api_reply>
      

  2.   

    这个只能猜了
    这是我自己写的,也是楼主这个url返回的天气情况
    if (current.getCondition().equals("晴") || 
    current.getCondition().equals("以晴为主") || 
    current.getCondition().equals("晴间多云") ||
    current.getCondition().equals("Clear") ||
    current.getCondition().equals("Sunny") ||
    current.getCondition().equals("Mostly Sunny") ||
    current.getCondition().equals("Partly Sunny") ||
    current.getCondition().equals("Fine")) {
    mWeatherIconFlg = WEATHER_FINE;
    } else if (current.getCondition().equals("多云") || 
       current.getCondition().equals("局部多云") || 
       current.getCondition().equals("Mostly Cloudy") || 
       current.getCondition().equals("Partly Cloudy") ||
       current.getCondition().equals("Cloudy")) {
    mWeatherIconFlg = WEATHER_CLOUD;
    } else if (current.getCondition().equals("雾霾") ||
       current.getCondition().equals("烟雾") ||
       current.getCondition().equals("Smoke") ||
       current.getCondition().equals("Haze")) {
    mWeatherIconFlg = WEATHER_HAZE;
    } else if (current.getCondition().equals("阴") ||
       current.getCondition().equals("Overcast")) {
    mWeatherIconFlg = WEATHER_YIN;
    } else if (current.getCondition().equals("雪") || 
       current.getCondition().equals("小雪") || 
       current.getCondition().equals("中雪") ||
       current.getCondition().equals("大雪") ||
       current.getCondition().equals("暴雪") ||
       current.getCondition().equals("Light snow") ||
       current.getCondition().equals("Snow")) {
    mWeatherIconFlg = WEATHER_SNOW;
    } else if (current.getCondition().equals("雨夹雪") || 
       current.getCondition().equals("Sleet")) {
    mWeatherIconFlg = WEATHER_YUJIAXUE;
    } else if (current.getCondition().equals("雷阵雨") || 
       current.getCondition().equals("Thunderstorm")) {
    mWeatherIconFlg = WEATHER_LEIZHENYU;
    } else if (current.getCondition().equals("阵雨") || 
       current.getCondition().equals("Storm")) {
    mWeatherIconFlg = WEATHER_ZHENYU;
    } else if (current.getCondition().equals("小雨") || 
       current.getCondition().equals("可能有雨") || 
       current.getCondition().equals("可能有暴风雨") || 
       current.getCondition().equals("Chance of Rain") || 
       current.getCondition().equals("Chance of Storm") || 
       current.getCondition().equals("Light rain")) {
    mWeatherIconFlg = WEATHER_XIAOYU;
    } else if (current.getCondition().equals("中雨") || 
       current.getCondition().equals("雨") || 
       current.getCondition().equals("小到中雨") ||
       current.getCondition().equals("Rain") ||
       current.getCondition().equals("Moderate rain")) {
    mWeatherIconFlg = WEATHER_ZHONGYU;
    } else if (current.getCondition().equals("大雨") ||
       current.getCondition().equals("中到大雨") ||
       current.getCondition().equals("Pour")) {
    mWeatherIconFlg = WEATHER_DAYU;
    } else if (current.getCondition().equals("暴雨") || 
       current.getCondition().equals("大到暴雨") || 
       current.getCondition().equals("Rainstorm")) {
    mWeatherIconFlg = WEATHER_DAYU;
    } else if (current.getCondition().equals("雾") || 
       current.getCondition().equals("Fog")) {
    mWeatherIconFlg = WEATHER_FOG;
    } else {
    mWeatherIconFlg = 0;
    }
      

  3.   

    刚才看了下他们的xml文档,google天气图片的名称就是以天气来命名的,搜了一下,最全的一个有21种天气
    现在贴上来http://www.google.com.hk/ig/images/weather/chance_of_rain.gif       
    http://www.google.com.hk/ig/images/weather/chance_of_snow.gif       
    http://www.google.com.hk/ig/images/weather/chance_of_storm.gif      
    http://www.google.com.hk/ig/images/weather/chance_of_tstorm.gif     
    http://www.google.com.hk/ig/images/weather/cloudy.gif               
    http://www.google.com.hk/ig/images/weather/dust.gif                 
    http://www.google.com.hk/ig/images/weather/flurries.gif             
    http://www.google.com.hk/ig/images/weather/fog.gif                  
    http://www.google.com.hk/ig/images/weather/haze.gif                 
    http://www.google.com.hk/ig/images/weather/icy.gif                  
    http://www.google.com.hk/ig/images/weather/mist.gif                 
    http://www.google.com.hk/ig/images/weather/mostly_cloudy.gif        
    http://www.google.com.hk/ig/images/weather/mostly_sunny.gif         
    http://www.google.com.hk/ig/images/weather/partly_cloudy.gif        
    http://www.google.com.hk/ig/images/weather/rain.gif                 
    http://www.google.com.hk/ig/images/weather/sleet.gif                
    http://www.google.com.hk/ig/images/weather/smoke.gif                
    http://www.google.com.hk/ig/images/weather/snow.gif                 
    http://www.google.com.hk/ig/images/weather/storm.gif                
    http://www.google.com.hk/ig/images/weather/sunny.gif                
    http://www.google.com.hk/ig/images/weather/thunderstorm.gif         
                                                                        
    欢迎补充 
      

  4.   

    <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>没有中文的