当前位置: 代码迷 >> Android >> 获取google weather api中支持的天气种类,该如何解决
  详细解决方案

获取google weather api中支持的天气种类,该如何解决

热度:72   发布时间:2016-05-01 22:07:32.0
获取google weather api中支持的天气种类
使用google的weather api可以得到天气的xml文件,如下链接
http://www.google.com/ig/api?weather=,,,31174165,121433841
但是现在我想知道里面所有的天气种类,找了很久,都没找到
目前知道的有Clear,Partly Sunny,storm,frog等。。。
谁能告诉我有哪些,或者告诉我去哪里可以找到,谢谢

------解决方案--------------------
这个只能猜了
这是我自己写的,也是楼主这个url返回的天气情况
Java code
        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;        }
  相关解决方案