天气预报的接口看这里:Android:国家气象局提供的天气预报接口(完整Json接口)
最近由于谷歌天气预报接口出现了一些小问题,没办法,只能重新写一下国家气象局天气预报接口JSON完全解析,程序包括了所有的地点,所以有些复杂
1.首先准备好要解析的json数据,方便以后写程序解析的时候,直接进行分析。如下
查看文本打印? {"weatherinfo": {<!--基本信息--> "city":"北京", "city_en":"beijing", "date_y":"8月14日", "date":"", "week":"星期二", "fchh":"18", "cityid":"101010100", <!--从今天开始到第六天的每天的<strong>天气</strong>情况,这里的温度是摄氏温度--> "temp1":"19℃~31℃", "temp2":"21℃~31℃", "temp3":"22℃~28℃", "temp4":"20℃~28℃", "temp5":"21℃~29℃", "temp6":"22℃~31℃", <!--从今天开始到第六天的每天的<strong>天气</strong>情况,这里的温度是华氏温度--> "tempF1":"66.2℉~87.8℉", "tempF2":"69.8℉~87.8℉", "tempF3":"71.6℉~82.4℉", "tempF4":"68℉~82.4℉", "tempF5":"69.8℉~84.2℉", "tempF6":"71.6℉~87.8℉", <!--<strong>天气</strong>描述--> "weather1":"阵雨转晴", "weather2":"晴", "weather3":"多云转雷阵雨", "weather4":"雷阵雨", "weather5":"多云转阴", "weather6":"雷阵雨", <!--<strong>天气</strong>描述图片序号--> "img1":"3", "img2":"0", "img3":"0", "img4":"99", "img5":"1", "img6":"4", "img7":"4", "img8":"99", "img9":"1", "img10":"2", "img11":"4", "img12":"99", "img_single":"0", <!--图片名称--> "img_title1":"阵雨", "img_title2":"晴", "img_title3":"晴", "img_title4":"晴", "img_title5":"多云", "img_title6":"雷阵雨", "img_title7":"雷阵雨", "img_title8":"雷阵雨", "img_title9":"多云", "img_title10":"阴", "img_title11":"雷阵雨", "img_title12":"雷阵雨", "img_title_single":"晴", <!--风速描述--> "wind1":"微风", "wind2":"微风", "wind3":"微风", "wind4":"微风", "wind5":"微风", "wind6":"微风", "fx1":"微风", "fx2":"微风", <!--风速级别描述--> "fl1":"小于3级", "fl2":"小于3级", "fl3":"小于3级", "fl4":"小于3级", "fl5":"小于3级", "fl6":"小于3级", <!--今天穿衣指数--> "index":"炎热", "index_d":"<strong>天气</strong>炎热,建议着短衫、短裙、短裤、薄型T恤衫、敞领短袖棉衫等清凉夏季服装。", <!--48小时穿衣指数--> "index48":"炎热", "index48_d":"<strong>天气</strong>炎热,建议着短衫、短裙、短裤、薄型T恤衫、敞领短袖棉衫等清凉夏季服装。", <!--紫外线及48小时紫外线--> "index_uv":"很强", "index48_uv":"强", <!--洗车--> "index_xc":"较不宜", <!--旅游--> "index_tr":"适宜", <!--舒适指数--> "index_co":"较不舒适", "st1":"31", "st2":"17", "st3":"31", "st4":"22", "st5":"27", "st6":"22", <!--晨练--> "index_cl":"适宜", <!--晾晒--> "index_ls":"极适宜", <!--过敏--> "index_ag":"易发" } }
2.先让大家看看我的布局,让大家知道我的这个程序是干什么呢。如下图
3.布局代码如下
查看文本打印? <?xmlversion="1.0"encoding="utf-8"?> <LinearLayoutxmlns:android="/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <Spinner android:id="@+id/spinner1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"/> <Spinner android:id="@+id/spinner2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"/> <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="省市查询"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:ems="10" android:text="西安"> <requestFocus/> </EditText> <Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="特殊市县查询"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher"/> <ImageView android:id="@+id/imageView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher"/> <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="LargeText"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <ImageView android:id="@+id/imageView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher"/> <ImageView android:id="@+id/imageView4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher"/> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="LargeText"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <ImageView android:id="@+id/imageView5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher"/> <ImageView android:id="@+id/imageView6" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher"/> <TextView android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="LargeText"/> </LinearLayout> </LinearLayout>
4.因为需要联网,先写上权限 查看文本打印? <uses-permissionandroid:name="android.permission.INTERNET"/> <uses-permissionandroid:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permissionandroid:name="android.permission.READ_PHONE_STATE"/>
5.第一个工具类文件 查看文本打印? ; importjava.util.HashMap; importjava.util.Map; //这个类将所有的县都囊括在内了。 publicclassNameIDMap{ privateString[]allNames; privateString[]allIDs; privateMap<String,String>mapAllNameID; publicMap<String,String>getMapAllNameID(){ returnmapAllNameID; } publicNameIDMap(){ initVar(); for(inti=0;i<allNames.length;i++){ mapAllNameID.put(allNames[i],allIDs[i]); } } privatevoidinitVar(){ mapAllNameID=newHashMap<String,String>(); allNames=newString[]{"北京","海淀","朝阳","顺义","怀柔","通州","昌平", "延庆","丰台","石景山","大兴","房山","密云","门头沟","平谷","八达岭","佛爷顶", "汤河口","密云上甸子","斋堂","霞云岭","上海","闵行","宝山","川沙","嘉定", "南汇","金山","青浦","松江","奉贤","崇明","陈家镇","引水船","徐家汇","浦东", "天津","武清","宝坻","东丽","西青","北辰","宁河","汉沽","静海","津南", "塘沽","大港","平台","蓟县","重庆","永川","合川","南川","江津","万盛", "渝北","北碚","巴南","长寿","黔江","万州天城","万州龙宝","涪陵","开县","城口", "云阳","巫溪","奉节","巫山","潼南","垫江","梁平","忠县","石柱","大足", "荣昌","铜梁","璧山","丰都","武隆","彭水","綦江","酉阳","金佛山","秀山", "沙坪坝","哈尔滨","双城","呼兰","阿城","宾县","依兰","巴彦","通河","方正", "延寿","尚志","五常","木兰","齐齐哈尔","讷河","龙江","甘南","富裕","依安", "拜泉","克山","克东","泰来","牡丹江","海林","穆棱","林口","绥芬河","宁安", "东宁","佳木斯","汤原","抚远","桦川","桦南","同江","富锦","绥化","肇东", "安达","海伦","明水","望奎","兰西","青冈","庆安","绥棱","黑河","嫩江", "孙吴","逊克","五大连池","北安","大兴安岭","塔河","漠河","呼玛","呼中","新林", "阿木尔","加格达奇","伊春","乌伊岭","五营","铁力","嘉荫","大庆","林甸","肇州", "肇源","杜蒙","七台河","勃利","鸡西","虎林","密山","鸡东","鹤岗","绥滨", "萝北","双鸭山","集贤","宝清","饶河","长春","农安","德惠","九台","榆树", "双阳","吉林","舒兰","永吉","蛟河","磐石","桦甸","烟筒山","延吉","敦化", "安图","汪清","和龙","天池","龙井","珲春","图们","松江","罗子沟","延边", "四平","双辽","梨树","公主岭","伊通","孤家子","通化","梅河口","柳河","辉南", "集安","通化县","白城","洮南","大安","镇赉","通榆","辽源","东丰","松原", "乾安","前郭","长岭","扶余","白山","靖宇","临江","东岗","长白","沈阳", "苏家屯","辽中","康平","法库","新民","于洪","新城子","大连","瓦房店","金州", "普兰店","旅顺","长海","庄河","皮口","海洋岛","鞍山","台安","岫岩","海城", "抚顺","清原","章党","本溪","本溪县","草河口","桓仁","丹东","凤城","宽甸", "东港","东沟","锦州","凌海","北宁","义县","黑山","北镇","营口","大石桥", "盖州","阜新","彰武","辽阳","辽阳县","灯塔","铁岭","开原","昌图","西丰", "朝阳","建平","凌源","喀左","北票","羊山","建平县","盘锦","大洼","盘山", "葫芦岛","建昌","绥中","兴城","呼和浩特","土默特左旗","托克托","和林格尔","清水河", "呼和浩特市郊区","武川","包头","白云鄂博","满都拉","土默特右旗","固阳", "达尔罕茂明安联合旗","石拐","乌海","集宁","卓资","化德","商都","希拉穆仁","兴和", "凉城","察哈尔右翼前旗","察哈尔右翼中旗","察哈尔右翼后旗","四子王旗","丰镇","通辽", "舍伯吐","科尔沁左翼中旗","科尔沁左翼后旗","青龙山","开鲁","库伦旗","奈曼旗","扎鲁特旗", "高力板","巴雅尔吐胡硕","通辽钱家店","赤峰","赤峰郊区站","阿鲁科尔沁旗","浩尔吐", "巴林左旗","巴林右旗","林西","克什克腾旗","翁牛特旗","岗子","喀喇沁旗","八里罕", "宁城","敖汉旗","宝过图","鄂尔多斯","达拉特旗","准格尔旗","鄂托克前旗","河南", "伊克乌素","鄂托克旗","杭锦旗","乌审旗","伊金霍洛旗","乌审召","东胜","临河","五原", "磴口","乌拉特前旗","大佘太","乌拉特中旗","乌拉特后旗","海力素","那仁宝力格","杭锦后旗", "巴盟农试站","锡林浩特","朝克乌拉","二连浩特","阿巴嘎旗","伊和郭勒","苏尼特左旗", "苏尼特右旗","朱日和","东乌珠穆沁旗","西乌珠穆沁旗","太仆寺旗","镶黄旗","正镶白旗", "正兰旗","多伦","博克图","乌拉盖","白日乌拉","那日图","呼伦贝尔","海拉尔","小二沟", "阿荣旗","莫力达瓦旗","鄂伦春旗","鄂温克旗","陈巴尔虎旗","新巴尔虎左旗","新巴尔虎右旗", "满洲里","牙克石","扎兰屯","额尔古纳","根河","图里河","乌兰浩特","阿尔山", "科尔沁右翼中旗","胡尔勒","扎赉特旗","索伦","突泉","霍林郭勒","阿拉善左旗","阿拉善右旗", "额济纳旗","拐子湖","吉兰太","锡林高勒","头道湖","中泉子","巴彦诺尔贡","雅布赖", "乌斯太","孪井滩","石家庄","井陉","正定","栾城","行唐","灵寿","高邑","深泽", "赞皇","无极","平山","元氏","赵县","辛集","藁城","晋洲","新乐","保定", "满城","阜平","徐水","唐县","高阳","容城","紫荆关","涞源","望都","安新", "易县","涞水","曲阳","蠡县","顺平","雄县","涿州","定州","安国","高碑店", "张家口","宣化","张北","康保","沽源","尚义","蔚县","阳原","怀安","万全", "怀来","涿鹿","赤城","崇礼","承德","承德县","兴隆","平泉","滦平","隆化", "丰宁","宽城","围场","塞罕坎","唐山","丰南","丰润","滦县","滦南","乐亭", "迁西","玉田","唐海","遵化","迁安","廊坊","固安","永清","香河","大城", "文安","大厂","霸州","三河","沧州","青县","东光","海兴","盐山","肃宁", "南皮","吴桥","献县","孟村","泊头","任丘","黄骅","河间","曹妃甸","衡水", "枣强","武邑","武强","饶阳","安平","故城","景县","阜城","冀州","深州", "邢台","临城","邢台县浆水","内邱","柏乡","隆尧","南和","宁晋","巨鹿","新河", "广宗","平乡","威县","清河","临西","南宫","沙河","任县","邯郸","峰峰", "临漳","成安","大名","涉县","磁县","肥乡","永年","邱县","鸡泽","广平", "馆陶","魏县","曲周","武安","秦皇岛","青龙","昌黎","抚宁","卢龙","北戴河", "太原","清徐","阳曲","娄烦","太原古交区","太原北郊","太原南郊","大同","阳高", "大同县","天镇","广灵","灵邱","浑源","左云","阳泉","盂县","平定","晋中", "榆次","榆社","左权","和顺","昔阳","寿阳","太谷","祁县","平遥","灵石", "介休","长治","黎城","屯留","潞城","襄垣","平顺","武乡","沁县","长子", "沁源","壶关","晋城","沁水","阳城","陵川","高平","临汾","曲沃","永和", "隰县","大宁","吉县","襄汾","蒲县","汾西","洪洞","霍州","乡宁","翼城", "侯马","浮山","安泽","古县","运城","临猗","稷山","万荣","河津","新绛", "绛县","闻喜","垣曲","永济","芮城","夏县","平陆","朔州","平鲁","山阴", "右玉","应县","怀仁","忻州","定襄","五台县豆村","河曲","偏关","神池","宁武", "代县","繁峙","五台山","保德","静乐","岢岚","五寨","原平","吕梁","离石", "临县","兴县","岚县","柳林","石楼","方山","交口","中阳","孝义","汾阳", "文水","交城","西安","长安","临潼","蓝田","周至","户县","高陵","杨凌", "咸阳","三原","礼泉","永寿","淳化","泾阳","武功","乾县","彬县","长武", "旬邑","兴平","延安","延长","延川","子长","宜川","富县","志丹","安塞", "甘泉","洛川","黄陵","黄龙","吴起","榆林","府谷","神木","佳县","定边", "靖边","横山","米脂","子洲","绥德","吴堡","清涧","渭南","华县","潼关", "大荔","白水","富平","蒲城","澄城","合阳","韩城","华阴","华山","商洛", "洛南","柞水","镇安","丹凤","商南","山阳","安康","紫阳","石泉","汉阴", "旬阳","岚皋","平利","白河","镇坪","宁陕","汉中","略阳","勉县","留坝", "洋县","城固","西乡","佛坪","宁强","南郑","镇巴","宝鸡","宝鸡县","千阳", "麟游","岐山","凤翔","扶风","眉县","太白","凤县","陇县","铜川","耀县", "宜君","济南","长清","商河","章丘","平阴","济阳","青岛","崂山","潮连岛", "即墨","胶州","胶南","莱西","平度","淄博","淄川","博山","高青","周村", "沂源","桓台","临淄","德州","武城","临邑","陵县","齐河","乐陵","庆云", "平原","宁津","夏津","禹城","烟台","莱州","长岛","蓬莱","龙口","招远", "栖霞","福山","牟平","莱阳","海阳","千里岩","潍坊","青州","寿光","临朐", "昌乐","昌邑","安丘","高密","诸城","济宁","嘉祥","微山","鱼台","兖州", "金乡","汶上","泗水","梁山","曲阜","邹城","泰安","新泰","泰山","肥城", "东平","宁阳","临沂","莒南","沂南","苍山","临沭","郯城","蒙阴","平邑", "费县","沂水","马站","菏泽","鄄城","郓城","东明","定陶","巨野","曹县", "成武","单县","滨州","博兴","无棣","阳信","惠民","沾化","邹平","东营", "河口","垦利","利津","广饶","威海","文登","荣成","乳山","成山头","石岛", "枣庄","薛城","峄城","台儿庄","滕州","日照","五莲","莒县","莱芜","聊城", "冠县","阳谷","高唐","茌平","东阿","临清","朝城","莘县","乌鲁木齐","蔡家湖", "小渠子","巴仑台","达坂城","十三间房<strong>气象</strong>站","天山大西沟","乌鲁木齐牧试站","天池", "白杨沟","克拉玛依","石河子","炮台","莫索湾","乌兰乌苏","昌吉","呼图壁","米泉", "阜康","吉木萨尔","奇台","玛纳斯","木垒","北塔山","吐鲁番","托克逊","吐鲁番东坎", "鄯善","红柳河","库尔勒","轮台","尉犁","若羌","且末","和静","焉耆","和硕", "库米什","巴音布鲁克","铁干里克","博湖","塔中","阿拉尔","阿克苏","乌什","温宿", "拜城","新和","沙雅","库车","柯坪","阿瓦提","喀什","英吉沙","塔什库尔干", "麦盖提","莎车","叶城","泽普","巴楚","岳普湖","伽师","伊宁","察布查尔", "尼勒克","伊宁县","巩留","新源","昭苏","特克斯","霍城","霍尔果斯","塔城", "裕民","额敏","和布克赛尔","托里","乌苏","沙湾","和丰","哈密","沁城","巴里坤", "伊吾","淖毛湖","和田","皮山","策勒","墨玉","洛浦","民丰","于田","阿勒泰", "哈巴河","一八五团","黑山头","吉木乃","布尔津","福海","富蕴","青河","安德河", "阿图什","乌恰","阿克陶","阿合奇","吐尔尕特","博乐","温泉","精河","阿拉山口", "拉萨","当雄","尼木","墨竹贡卡","日喀则","拉孜","南木林","聂拉木","定日", "江孜","帕里","山南","贡嘎","琼结","加查","浪卡子","错那","隆子","泽当", "林芝","波密","米林","察隅","昌都","丁青","类乌齐","洛隆","左贡","芒康", "八宿","那曲","嘉黎","班戈","安多","索县","比如","阿里","改则","申扎", "狮泉河","普兰","西宁","大通","湟源","湟中","铁卜加","铁卜加寺","中心站", "海东","乐都","民和","互助","化隆","循化","冷湖","平安","黄南","尖扎", "泽库","河南","海南","江西沟","贵德","河卡","兴海","贵南","同德","共和", "果洛","班玛","甘德","达日","久治","玛多","清水河","玛沁","玉树","托托河", "治多","杂多","囊谦","曲麻莱","海西","格尔木","察尔汉","野牛沟","五道梁", "小灶火","天峻","乌兰","都兰","诺木洪","茫崖","大柴旦","茶卡","香日德", "德令哈","海北","门源","祁连","海晏","托勒","刚察","兰州","皋兰","永登", "榆中","定西","通渭","陇西","渭源","临洮","漳县","岷县","安定","平凉", "泾川","灵台","崇信","华亭","庄浪","静宁","崆峒","庆阳","西峰","环县", "华池","合水","正宁","宁县","镇原","庆城","武威","民勤","古浪","乌鞘岭", "天祝","金昌","永昌","张掖","肃南","民乐","临泽","高台","山丹","酒泉", "鼎新","金塔","马鬃山","瓜州","肃北","玉门镇","敦煌","天水","北道区","清水", "秦安","甘谷","武山","张家川","麦积","武都","成县","文县","宕昌","康县", "西和","礼县","徽县","两当","临夏","康乐","永靖","广河","和政","东乡", "合作","临潭","卓尼","舟曲","迭部","玛曲","碌曲","夏河","白银","靖远", "会宁","华家岭","景泰","银川","永宁","灵武","贺兰","石嘴山","惠农","平罗", "陶乐","石炭井","大武口","吴忠","同心","盐池","韦州","麻黄山","青铜峡","固原", "西吉","隆德","泾源","六盘山","彭阳","中卫","中宁","兴仁堡","海原","郑州", "巩义","荥阳","登封","新密","新郑","中牟","郑州农试站","安阳","汤阴","滑县", "内黄","林州","新乡","获嘉","原阳","辉县","卫辉","延津","封丘","长垣", "许昌","鄢陵","襄城","长葛","禹州","平顶山","郏县","宝丰","汝州","叶县", "舞钢","鲁山","信阳","息县","罗山","光山","新县","淮滨","潢川","固始", "商城","鸡公山","信阳地区农试站","南阳","南召","方城","社旗","西峡","内乡", "镇平","淅川","新野","唐河","邓州","桐柏","开封","杞县","尉氏","通许", "兰考","洛阳","新安","孟津","宜阳","洛宁","伊川","嵩县","偃师","栾川", "汝阳","商丘","睢阳区","睢县","民权","虞城","柘城","宁陵","夏邑","永城", "焦作","修武","武陟","沁阳","博爱","温县","孟州","鹤壁","浚县","淇县", "濮阳","台前","南乐","清丰","范县","周口","扶沟","太康","淮阳","西华", "商水","项城","郸城","鹿邑","沈丘","黄泛区","漯河","临颍","舞阳","驻马店", "西平","遂平","上蔡","汝南","泌阳","平舆","新蔡","确山","正阳","三门峡", "灵宝","渑池","卢氏","济源","南京","溧水","高淳","江宁","六合","江浦", "浦口","无锡","江阴","宜兴","镇江","丹阳","扬中","句容","丹徒","苏州", "常熟","张家港","昆山","吴县东山","吴县","吴江","太仓","南通","海安","如皋", "如东","吕泗","吕泗渔场","启东","海门","通州","扬州","宝应","仪征","高邮", "江都","邗江","盐城","响水","滨海","阜宁","射阳","建湖","东台","大丰", "盐都","徐州","徐州农试站","丰县","沛县","邳州","睢宁","新沂","淮安","金湖", "盱眙","洪泽","涟水","淮阴县","淮阴","楚州","连云港","东海","赣榆","灌云", "灌南","西连岛","燕尾港","常州","溧阳","金坛","泰州","兴化","泰兴","姜堰", "靖江","宿迁","沭阳","泗阳","泗洪","武汉","蔡甸","黄陂","新洲","江夏", "襄樊","襄阳","保康","南漳","宜城","老河口","谷城","枣阳","鄂州","孝感", "安陆","云梦","大悟","应城","汉川","黄冈","红安","麻城","罗田","英山", "浠水","蕲春","黄梅","武穴","黄石","大冶","阳新","咸宁","赤壁","嘉鱼", "崇阳","通城","通山","荆州","江陵","公安","石首","监利","洪湖","松滋", "宜昌","远安","秭归","兴山","宜昌县","五峰","当阳","长阳","宜都","枝江", "三峡","夷陵","恩施","利川","建始","咸丰","宣恩","鹤峰","来凤","巴东", "绿葱坡","十堰","竹溪","郧西","郧县","竹山","房县","丹江口","神农架","随州", "广水","荆门","钟祥","京山","天门","仙桃","潜江","杭州","萧山","桐庐", "淳安","建德","余杭","临安","富阳","湖州","长兴","安吉","德清","嘉兴", "嘉善","海宁","桐乡","平湖","海盐","宁波","慈溪","余姚","奉化","象山", "石浦","宁海","鄞县","北仑","鄞州","镇海","绍兴","诸暨","上虞","新昌", "嵊州","台州","括苍山","玉环","三门","天台","仙居","温岭","大陈","洪家", "温州","泰顺","文成","平阳","瑞安","洞头","乐清","永嘉","苍南","丽水", "遂昌","龙泉","缙云","青田","云和","庆元","金华","浦江","兰溪","义乌", "东阳","武义","永康","磐安","衢州","常山","开化","龙游","江山","舟山", "嵊泗","嵊山","岱山","普陀","定海","合肥","长丰","肥东","肥西","蚌埠", "怀远","固镇","五河","芜湖","繁昌","芜湖县","南陵","淮南","凤台","马鞍山", "当涂","安庆","枞阳","太湖","潜山","怀宁","宿松","望江","岳西","桐城", "宿州","砀山","灵璧","泗县","萧县","阜阳","阜南","颍上","临泉","界首", "太和","亳州","涡阳","利辛","蒙城","黄山站","黄山区","屯溪","祁门","黟县", "歙县","休宁","黄山市","滁州","凤阳","明光","定远","全椒","来安","天长", "淮北","濉溪","铜陵","宣城","泾县","旌德","宁国","绩溪","广德","郎溪", "六安","霍邱","寿县","南溪","金寨","霍山","舒城","巢湖","庐江","无为", "含山","和县","池州","东至","青阳","九华山","石台","福州","闽清","闽侯", "罗源","连江","马祖","永泰","平潭","福州郊区","长乐","福清","平潭海峡大桥", "厦门","同安","宁德","古田","霞浦","寿宁","周宁","福安","柘荣","福鼎", "屏南","莆田","仙游","秀屿港","泉州","安溪","九仙山","永春","德化","南安", "崇武","金山","晋江","漳州","长泰","南靖","平和","龙海","漳浦","诏安", "东山","云霄","华安","龙岩","长汀","连城","武平","上杭","永定","漳平", "三明","宁化","清流","泰宁","将乐","建宁","明溪","沙县","尤溪","永安", "大田","南平","顺昌","光泽","邵武","武夷山","浦城","建阳","松溪","政和", "建瓯","南昌","新建","南昌县","安义","进贤","莲塘","九江","瑞昌","庐山", "武宁","德安","永修","湖口","彭泽","星子","都昌","棠荫","修水","上饶", "鄱阳","婺源","康山","余干","万年","德兴","上饶县","弋阳","横峰","铅山", "玉山","广丰","波阳","抚州","广昌","乐安","崇仁","金溪","资溪","宜黄", "南城","南丰","黎川","东乡","宜春","铜鼓","宜丰","万载","上高","靖安", "奉新","高安","樟树","丰城","吉安","吉安县","吉水","新干","峡江","永丰", "永新","井冈山","万安","遂川","泰和","安福","宁冈","赣州","崇义","上犹", "南康","大余","信丰","宁都","石城","瑞金","于都","会昌","安远","全南", "龙南","定南","寻乌","兴国","景德镇","乐平","萍乡","莲花","新余","分宜", "鹰潭","余江","贵溪","长沙","宁乡","浏阳","马坡岭","湘潭","韶山","湘乡", "株洲","攸县","醴陵","株洲县","茶陵","炎陵","衡阳","衡山","衡东","祁东", "衡阳县","常宁","衡南","耒阳","南岳","郴州","桂阳","嘉禾","宜章","临武", "桥口","资兴","汝城","安仁","永兴","桂东","常德","安乡","桃源","汉寿", "澧县","临澧","石门","益阳","赫山区","南县","桃江","安化","沅江","娄底", "双峰","冷水江","冷水滩","新化","涟源","邵阳","隆回","洞口","新邵","邵东", "绥宁","新宁","武冈","城步","邵阳县","岳阳","华容","湘阴","汨罗","平江", "临湘","张家界","桑植","慈利","怀化","鹤城区","沅陵","辰溪","靖州","会同", "通道","麻阳","新晃","芷江","溆浦","黔阳","洪江","永州","祁阳","东安", "双牌","道县","宁远","江永","蓝山","新田","江华","吉首","保靖","永顺", "古丈","凤凰","泸溪","龙山","花垣","贵阳","白云","花溪","乌当","息烽", "开阳","修文","清镇","遵义","遵义县","仁怀","绥阳","湄潭","凤冈","桐梓", "赤水","习水","道真","正安","务川","余庆","汇川","安顺","普定","镇宁", "平坝","紫云","关岭","都匀","贵定","瓮安","长顺","福泉","惠水","龙里", "罗甸","平塘","独山","三都","荔波","凯里","岑巩","施秉","镇远","黄平", "黄平旧洲","麻江","丹寨","三穗","台江","剑河","雷山","黎平","天柱","锦屏", "榕江","从江","炉山","铜仁","江口","玉屏","万山","思南","塘头","印江", "石阡","沿河","德江","松桃","毕节","赫章","金沙","威宁","大方","纳雍", "织金","六盘水","六枝","水城","盘县","黔西","晴隆","兴仁","贞丰","望谟", "兴义","安龙","册亨","普安","成都","龙泉驿","新都","温江","金堂","双流", "郫县","大邑","蒲江","新津","都江堰","彭州","邛崃","崇州","崇庆","彭县", "攀枝花","仁和","米易","盐边","自贡","富顺","荣县","绵阳","三台","盐亭", "安县","梓潼","北川","平武","江油","南充","南部","营山","蓬安","仪陇", "西充","阆中","达州","宣汉","开江","大竹","渠县","万源","达川","遂宁", "蓬溪","射洪","广安","岳池","武胜","邻水","华蓥山","巴中","通江","南江", "平昌","泸州","泸县","合江","叙永","古蔺","纳溪","宜宾","宜宾农试站","宜宾县", "南溪","江安","长宁","高县","珙县","筠连","兴文","屏山","内江","东兴", "威远","资中","隆昌","资阳","安岳","乐至","简阳","乐山","犍为","井研", "夹江","沐川","峨边","马边","峨眉","峨眉山","眉山","仁寿","彭山","洪雅", "丹棱","青神","凉山","木里","盐源","德昌","会理","会东","宁南","普格", "西昌","金阳","昭觉","喜德","冕宁","越西","甘洛","雷波","美姑","布拖", "雅安","名山","荣经","汉源","石棉","天全","芦山","宝兴","甘孜","康定", "泸定","丹巴","九龙","雅江","道孚","炉霍","新龙","德格","白玉","石渠", "色达","理塘","巴塘","乡城","稻城","得荣","阿坝","汶川","理县","茂县", "松潘","九寨沟","金川","小金","黑水","马尔康","壤塘","若尔盖","红原","南坪", "德阳","中江","广汉","什邡","绵竹","罗江","广元","旺苍","青川","剑阁", "苍溪","广州","番禺","从化","增城","花都","天河","韶关","乳源","始兴", "翁源","乐昌","仁化","南雄","新丰","曲江","惠州","博罗","惠阳","惠东", "龙门","梅州","兴宁","蕉岭","大埔","丰顺","平远","五华","梅县","汕头", "潮阳","澄海","南澳","云澳","南澎岛","深圳","珠海","斗门","黄茅洲","佛山", "顺德","三水","南海","肇庆","广宁","四会","德庆","怀集","封开","高要", "湛江","吴川","雷州","徐闻","廉江","硇洲","遂溪","江门","开平","新会", "恩平","台山","上川岛","鹤山","河源","紫金","连平","和平","龙川","清远", "连南","连州","连山","阳山","佛冈","英德","云浮","罗定","新兴","郁南", "潮州","饶平","东莞","中山","阳江","阳春","揭阳","揭西","普宁","惠来", "茂名","高州","化州","电白","信宜","汕尾","海丰","陆丰","遮浪","东沙岛", "昆明","昆明农试站","东川","寻甸","晋宁","宜良","石林","呈贡","富民","嵩明", "禄劝","安宁","太华山","河口","大理","云龙","漾鼻","永平","宾川","弥渡", "祥云","魏山","剑川","洱源","鹤庆","南涧","红河","石屏","建水","弥勒", "元阳","绿春","开远","个旧","蒙自","屏边","泸西","金平","曲靖","沾益", "陆良","富源","马龙","师宗","罗平","会泽","宣威","保山","富宁","龙陵", "施甸","昌宁","腾冲","文山","西畴","马关","麻栗坡","砚山","邱北","广南", "玉溪","澄江","江川","通海","华宁","新平","易门","峨山","元江","楚雄", "大姚","元谋","姚安","牟定","南华","武定","禄丰","双柏","永仁","普洱", "景谷","景东","澜沧","普洱","墨江","江城","孟连","西盟","镇源","镇沅", "宁洱","昭通","鲁甸","彝良","镇雄","威信","巧家","绥江","永善","盐津", "大关","临沧","沧源","耿马","双江","凤庆","永德","云县","镇康","怒江", "福贡","兰坪","泸水","六库","贡山","香格里拉","德钦","维西","中甸","丽江", "永胜","华坪","宁蒗","德宏","潞江坝","陇川","盈江","畹町镇","瑞丽","梁河", "潞西","景洪","大勐龙","勐海","景洪电站","勐腊","南宁","南宁城区","邕宁", "横县","隆安","马山","上林","武鸣","宾阳","硕龙","崇左","天等","龙州", "凭祥","大新","扶绥","宁明","海渊","柳州","柳城","沙塘","鹿寨","柳江", "融安","融水","三江","来宾","忻城","金秀","象州","武宣","桂林","桂林农试站", "龙胜","永福","临桂","兴安","灵川","全州","灌阳","阳朔","恭城","平乐", "荔浦","资源","梧州","藤县","太平","苍梧","蒙山","岑溪","贺州","昭平", "富川","钟山","信都","贵港","桂平","平南","玉林","博白","北流","容县", "陆川","百色","那坡","田阳","德保","靖西","田东","平果","隆林","西林", "乐业","凌云","田林","钦州","浦北","灵山","河池","天峨","东兰","巴马", "环江","罗城","宜州","凤山","南丹","都安","北海","合浦","涠洲岛","防城港", "上思","东兴","板栏","防城","海口","琼山","三亚","东方","临高","澄迈", "儋州","昌江","白沙","琼中","定安","屯昌","琼海","文昌","清兰","保亭", "万宁","陵水","西沙","珊瑚岛","永署礁","南沙岛","乐东","五指山","通什","香港", "九龙","新界","中环","铜锣湾","澳门","台北县","台北市","高雄","东港","大武", "恒春","兰屿","台南","台中","桃园","新竹县","新竹市","公馆","宜兰","马公", "东吉屿","嘉义","阿里山","玉山","新港"}; allIDs=newString[]{"101010100","101010200","101010300", "101010400","101010500","101010600","101010700", "101010800","101010900","101011000","101011100", "101011200","101011300","101011400","101011500", "101011600","101011700","101011800","101011900", "101012000","101012100","10100","10100", "101020300","101020400","101020500","101020600", "101020700","101020800","101020900","101021000", "101021100","101021101","101021102","101021200", "101021300","101030100","101030200","101030300", "101030400","101030500","101030600","101030700", "101030800","101030900","101031000","101031100", "101031200","101031300","101031400","101040100", "101040200","101040300","101040400","101040500", "101040600","101040700","101040800","101040900", "101041000","101041100","101041200","101041300", "101041400","101041500","101041600","101041700", "101041800","101041900","101042000","101042100", "101042200","101042300","101042400","101042500", "101042600","101042700","101042800","101042900", "101043000","101043100","101043200","101043300", "101043400","101043500","101043600","101043700", "101050101","101050102","101050103","101050104", "101050105","101050106","101050107","101050108", "101050109","101050110","101050111","101050112", "101050113","101050201","101050202","101050203", "101050204","101050205","101050206","101050207", "101050208","101050209","101050210","101050301", "101050302","101050303","101050304","101050305", "101050306","101050307","101050401","101050402", "101050403","101050404","101050405","101050406", "101050407","101050501","101050502","101050503", "101050504","101050505","101050506","101050507", "101050508","101050509","101050510","101050601", "101050602","101050603","101050604","101050605", "101050606","101050701","101050702","101050703", "101050704","101050705","101050706","101050707", "101050708","101050801","101050802","101050803", "101050804","101050805","101050901","101050902", "101050903","101050904","101050905","101051002", "101051003","101051101","101051102","101051103", "101051104","101051201","101051202","101051203", "101051301","101051302","101051303","101051304", "101060101","101060102","101060103","101060104", "101060105","101060106","101060201","101060202", "101060203","101060204","101060205","101060206", "101060207","101060301","101060302","101060303", "101060304","101060305","101060306","101060307", "101060308","101060309","101060310","101060311", "101060312","101060401","101060402","101060403", "101060404","101060405","101060406","101060501", "101060502","101060503","101060504","101060505", "101060506","101060601","101060602","101060603", "101060604","101060605","101060701","101060702", "101060801","101060802","101060803","101060804", "101060805","101060901","101060902","101060903", "101060904","101060905","101070101","101070102", "101070103","101070104","101070105","101070106", "101070107","101070108","101070201","101070202", "101070203","101070204","101070205","101070206", "101070207","101070208","101070209","101070301", "101070302","101070303","101070304","101070401", "101070403","101070404","101070501","101070502", "101070503","101070504","101070601","101070602", "101070603","101070604","101070605","101070701", "101070702","101070703","101070704","101070705", "101070706","101070801","101070802","101070803", "101070901","101070902","101071001","101071002", "101071003","101071101","101071102","101071103", "101071104","101071201","101071202","101071203", "101071204","101071205","101071206","101071207", "101071301","101071302","101071303","101071401", "101071402","101071403","101071404","101080101", "101080102","101080103","101080104","101080105", "101080106","101080107","101080201","101080202", "101080203","101080204","101080205","101080206", "101080207","101080301","101080401","101080402", "101080403","101080404","101080405","101080406", "101080407","101080408","101080409","101080410", "101080411","101080412","101080501","101080502", "101080503","101080504","101080505","101080506", "101080507","101080508","101080509","101080510", "101080511","101080512","101080601","101080602", "101080603","101080604","101080605","101080606", "101080607","101080608","101080609","101080610", "101080611","101080612","101080613","101080614", "101080615","101080701","101080703","101080704", "101080705","101080706","101080707","101080708", "101080709","101080710","101080711","101080712", "101080713","101080801","101080802","101080803", "101080804","101080805","101080806","101080807", "101080808","101080809","101080810","101080811", "101080901","101080902","101080903","101080904", "101080905","101080906","101080907","101080908", "101080909","101080910","101080911","101080912", "101080913","101080914","101080915","101080916", "101080917","101080918","101080919","101081000", "101081001","101081002","101081003","101081004", "101081005","101081006","101081007","101081008", "101081009","101081010","101081011","101081012", "101081014","101081015","101081016","101081101", "101081102","101081103","101081104","101081105", "101081106","101081107","101081108","101081201", "101081202","101081203","101081204","101081205", "101081206","101081207","101081208","101081209", "101081210","101081211","101081212","101090101", "101090102","101090103","101090104","101090105", "101090106","101090107","101090108","101090109", "101090110","101090111","101090112","101090113", "101090114","101090115","101090116","101090117", "101090201","101090202","101090203","101090204", "101090205","101090206","101090207","101090208", "101090209","101090210","101090211","101090212", "101090213","101090214","101090215","101090216", "101090217","101090218","101090219","101090220", "101090221","101090301","101090302","101090303", "101090304","101090305","101090306","101090307", "101090308","101090309","101090310","101090311", "101090312","101090313","101090314","101090402", "101090403","101090404","101090405","101090406", "101090407","101090408","101090409","101090410", "101090411","101090501","101090502","101090503", "101090504","101090505","101090506","101090507", "101090508","101090509","101090510","101090511", "101090601","101090602","101090603","101090604", "101090605","101090606","101090607","101090608", "101090609","101090701","101090702","101090703", "101090704","101090705","101090706","101090707", "101090708","101090709","101090710","101090711", "101090712","101090713","101090714","101090715", "101090801","101090802","101090803","101090804", "101090805","101090806","101090807","101090808", "101090809","101090810","101090811","101090901", "101090902","101090903","101090904","101090905", "101090906","101090907","101090908","101090909", "101090910","101090911","101090912","101090913", "101090914","101090915","101090916","101090917", "101090918","101091001","101091002","101091003", "101091004","101091005","101091006","101091007", "101091008","101091009","101091010","101091011", "101091012","101091013","101091014","101091015", "101091016","101091101","101091102","101091103", "101091104","101091105","101091106","101100101", "101100102","101100103","101100104","101100105", "101100106","101100107","101100201","101100202", "101100203","101100204","101100205","101100206", "101100207","101100208","101100301","101100302", "101100303","101100401","101100402","101100403", "101100404","101100405","101100406","101100407", "101100408","101100409","101100410","101100411", "101100412","101100501","101100502","101100503", "101100504","101100505","101100506","101100507", "101100508","101100509","101100510","101100511", "101100601","101100602","101100603","101100604", "101100605","101100701","101100702","101100703", "101100704","101100705","101100706","101100707", "101100708","101100709","101100710","101100711", "101100712","101100713","101100714","101100715", "101100716","101100717","101100801","101100802", "101100803","101100804","101100805","101100806", "101100807","101100808","101100809","101100810", "101100811","101100812","101100813","101100901", "101100902","101100903","101100904","101100905", "101100906","101101001","101101002","101101003", "101101004","101101005","101101006","101101007", "101101008","101101009","101101010","101101011", "101101012","101101013","101101014","101101015", "101101100","101101101","101101102","101101103", "101101104","101101105","101101106","101101107", "101101108","101101109","101101110","101101111", "101101112","101101113","101110101","101110102", "101110103","101110104","101110105","101110106", "101110107","101110108","101110200","101110201", "101110202","101110203","101110204","101110205", "101110206","101110207","101110208","101110209", "101110210","101110211","101110300","101110301", "101110302","101110303","101110304","101110305", "101110306","101110307","101110308","101110309", "101110310","101110311","101110312","101110401", "101110402","101110403","101110404","101110405", "101110406","101110407","101110408","101110409", "101110410","101110411","101110412","101110501", "101110502","101110503","101110504","101110505", "101110506","101110507","101110508","101110509", "101110510","101110511","101110512","101110601", "101110602","101110603","101110605","101110606", "101110607","101110608","101110701","101110702", "101110703","101110704","101110705","101110706", "101110707","101110708","101110709","101110710", "101110801","101110802","101110803","101110804", "101110805","101110806","101110807","101110808", "101110809","101110810","101110811","101110901", "101110902","101110903","101110904","101110905", "101110906","101110907","101110908","101110909", "101110910","101110911","101111001","101111002", "101111003","10111","10112","10113", "10114","10115","10116","10111", "10112","10113","10114","10115", "10116","10117","10118","101120301", "101120302","101120303","101120304","101120305", "101120306","101120307","101120308","101120401", "101120402","101120403","101120404","101120405", "101120406","101120407","101120408","101120409", "101120410","101120411","101120501","101120502", "101120503","101120504","101120505","101120506", "101120507","101120508","101120509","101120510", "101120511","101120512","101120601","101120602", "101120603","101120604","101120605","101120606", "101120607","101120608","101120609","101120701", "101120702","101120703","101120704","101120705", "101120706","101120707","101120708","101120709", "101120710","101120711","101120801","101120802", "101120803","101120804","101120805","101120806", "101120901","101120902","101120903","101120904", "101120905","101120906","101120907","101120908", "101120909","101120910","101120911","101121001", "101121002","101121003","101121004","101121005", "101121006","101121007","101121008","101121009", "101121101","101121102","101121103","101121104", "101121105","101121106","101121107","101121201", "101121202","101121203","101121204","101121205", "101121301","101121302","101121303","101121304", "101121305","101121306","101121401","101121402", "101121403","101121404","101121405","101121501", "101121502","101121503","101121601","101121701", "101121702","101121703","101121704","101121705", "101121706","101121707","101121708","101121709", "101130101","101130102","101130103","101130104", "101130105","101130106","101130107","101130108", "101130109","101130110","101130201","101130301", "101130302","101130303","101130304","101130401", "101130402","101130403","101130404","101130405", "101130406","101130407","101130408","101130409", "101130501","101130502","101130503","101130504", "101130505","101130601","101130602","101130603", "101130604","101130605","101130606","101130607", "101130608","101130609","101130610","101130611", "101130612","101130613","101130701","101130801", "101130802","101130803","101130804","101130805", "101130806","101130807","101130808","101130809", "101130901","101130902","101130903","101130904", "101130905","101130906","101130907","101130908", "101130909","101130910","101131001","101131002", "101131003","101131004","101131005","101131006", "101131007","101131008","101131009","101131010", "101131101","101131102","101131103","101131104", "101131105","101131106","101131107","101131108", "101131201","101131202","101131203","101131204", "101131205","101131301","101131302","101131303", "101131304","101131305","101131306","101131307", "101131401","101131402","101131403","101131404", "101131405","101131406","101131407","101131408", "101131409","101131410","101131501","101131502", "101131503","101131504","101131505","101131601", "101131602","101131603","101131606","101140101", "101140102","101140103","101140104","101140201", "101140202","101140203","101140204","101140205", "101140206","101140207","101140301","101140302", "101140303","101140304","101140305","101140306", "101140307","101140308","101140401","101140402", "101140403","101140404","101140501","101140502", "101140503","101140504","101140505","101140506", "101140507","101140601","101140603","101140604", "101140605","101140606","101140607","101140701", "101140702","101140703","101140704","101140705", "101150101","101150102","101150103","101150104", "101150105","101150106","101150107","101150201", "101150202","101150203","101150204","101150205", "101150206","101150207","101150208","101150301", "101150302","101150303","101150304","101150401", "101150402","101150404","101150405","101150406", "101150407","101150408","101150409","101150501", "101150502","101150503","101150504","101150505", "101150506","101150507","101150508","101150601", "101150602","101150603","101150604","101150605", "101150606","101150701","101150702","101150703", "101150704","101150705","101150706","101150708", "101150709","101150710","101150711","101150712", "101150713","101150714","101150715","101150716", "101150801","101150802","101150803","101150804", "101150805","101150806","101160101","101160102", "101160103","101160104","101160201","101160202", "101160203","101160204","101160205","101160206", "101160207","101160208","101160301","101160302", "101160303","101160304","101160305","101160306", "101160307","101160308","101160401","101160402", "101160403","101160404","101160405","101160406", "101160407","101160408","101160409","101160501", "101160502","101160503","101160504","101160505", "101160601","101160602","101160701","101160702", "101160703","101160704","101160705","101160706", "101160801","101160802","101160803","101160804", "101160805","101160806","101160807","101160808", "101160901","101160902","101160903","101160904", "101160905","101160906","101160907","101160908", "101161001","101161002","101161003","101161004", "101161005","101161006","101161007","101161008", "101161009","101161101","101161102","101161103", "101161104","101161105","101161106","101161201", "101161202","101161203","101161204","101161205", "101161206","101161207","101161208","101161301", "101161302","101161303","101161304","101161305", "101170101","101170102","101170103","101170104", "101170201","101170202","101170203","101170204", "101170205","101170206","101170301","101170302", "101170303","101170304","101170305","101170306", "101170401","101170402","101170403","101170404", "101170405","101170406","101170501","101170502", "101170503","101170504","101180101","101180102", "101180103","101180104","101180105","101180106", "101180107","101180108","101180201","101180202", "101180203","101180204","101180205","101180301", "101180302","101180303","101180304","101180305", "101180306","101180307","101180308","101180401", "101180402","101180403","101180404","101180405", "101180501","101180502","101180503","101180504", "101180505","101180506","101180507","101180601", "101180602","101180603","101180604","101180605", "101180606","101180607","101180608","101180609", "101180610","101180611","101180701","101180702", "101180703","101180704","101180705","101180706", "101180707","101180708","101180709","101180710", "101180711","101180712","101180801","101180802", "101180803","101180804","101180805","101180901", "101180902","101180903","101180904","101180905", "101180906","101180907","101180908","101180909", "101180910","101181001","101181002","101181003", "101181004","101181005","101181006","101181007", "101181008","101181009","101181101","101181102", "101181103","101181104","101181106","101181107", "101181108","101181201","101181202","101181203", "101181301","101181302","101181303","101181304", "101181305","101181401","101181402","101181403", "101181404","101181405","101181406","101181407", "101181408","101181409","101181410","101181411", "101181501","101181502","101181503","101181601", "101181602","101181603","101181604","101181605", "101181606","101181607","101181608","101181609", "101181610","101181701","101181702","101181703", "101181704","101181801","101190101","101190102", "101190103","101190104","101190105","101190106", "101190107","101190201","101190202","101190203", "101190301","101190302","101190303","101190304", "101190305","101190401","101190402","101190403", "101190404","101190405","101190406","101190407", "101190408","101190501","101190502","101190503", "101190504","101190505","101190506","101190507", "101190508","101190509","101190601","101190602", "101190603","101190604","101190605","101190606", "101190701","101190702","101190703","101190704", "101190705","101190706","101190707","101190708", "101190709","101190801","101190802","101190803", "101190804","101190805","101190806","101190807", "101190901","101190902","101190903","101190904", "101190905","101190906","101190907","101190908", "101191001","101191002","101191003","101191004", "101191005","101191006","101191007","101191101", "101191102","101191103","101191201","101191202", "101191203","101191204","101191205","101191301", "101191302","101191303","101191304","101200101", "101200102","101200103","101200104","101200105", "101200201","101200202","101200203","101200204", "101200205","101200206","101200207","101200208", "10101","10101","10102","10103", "10104","10105","10106","10101", "10102","10103","10104","10105", "10106","10107","10108","10109", "10101","10102","10103","10101", "10102","10103","10104","10105", "10106","10101","10102","10103", "10104","10105","10106","10107", "10101","10102","10103","10104", "10105","10106","10107","10108", "10109","10110","10111","10112", "10101","10102","10103","10104", "10105","10106","10107","10108", "10109","10101","10102","10103", "10104","10105","10106","10107", "10101","10101","10102","10101", "10102","10103","10101","10101", "10101","101210101","101210102","101210103", "101210104","101210105","101210106","101210107", "101210108","101210201","101210202","101210203", "101210204","101210301","101210302","101210303", "101210304","101210305","101210306","101210401", "101210403","101210404","101210405","101210406", "101210407","101210408","101210409","101210410", "101210411","101210412","101210501","101210502", "101210503","101210504","101210505","101210601", "101210602","101210603","101210604","101210605", "101210606","101210607","101210608","101210609", "101210701","101210702","101210703","101210704", "101210705","101210706","101210707","101210708", "101210709","101210801","101210802","101210803", "101210804","101210805","101210806","101210807", "101210901","101210902","101210903","101210904", "101210905","101210906","101210907","101210908", "101211001","101211002","101211003","101211004", "101211005","101211101","101211102","101211103", "101211104","101211105","101211106","10121", "10122","10123","10124","10121", "10122","10123","10124","101220301", "101220302","101220303","101220304","101220401", "101220402","101220501","101220502","101220601", "101220602","101220603","101220604","101220605", "101220606","101220607","101220608","101220609", "101220701","101220702","101220703","101220704", "101220705","101220801","101220802","101220803", "101220804","101220805","101220806","101220901", "101220902","101220903","101220904","101221001", "101221002","101221003","101221004","101221005", "101221006","101221007","101221008","101221101", "101221102","101221103","101221104","101221105", "101221106","101221107","101221201","101221202", "101221301","101221401","101221402","101221403", "101221404","101221405","101221406","101221407", "101221501","101221502","101221503","101221504", "101221505","101221506","101221507","101221601", "101221602","101221603","101221604","101221605", "101221701","101221702","101221703","101221704", "101221705","101230101","101230102","101230103", "101230104","101230105","101230106","101230107", "101230108","101230109","101230110","101230111", "101230112","101230201","101230202","101230301", "101230302","101230303","101230304","101230305", "101230306","101230307","101230308","101230309", "101230401","101230402","101230403","101230501", "101230502","101230503","101230504","101230505", "101230506","101230507","101230508","101230509", "101230601","101230602","101230603","101230604", "101230605","101230606","101230607","101230608", "101230609","101230610","101230701","101230702", "101230703","101230704","101230705","101230706", "101230707","101230801","101230802","101230803", "101230804","101230805","101230806","101230807", "101230808","101230809","101230810","101230811", "101230901","101230902","101230903","101230904", "101230905","101230906","101230907","101230908", "101230909","101230910","101240101","101240102", "101240103","101240104","101240105","101240106", "101240201","101240202","101240203","101240204", "101240205","101240206","101240207","101240208", "101240209","101240210","101240211","101240212", "101240301","101240302","101240303","101240304", "101240305","101240306","101240307","101240308", "101240309","101240310","101240311","101240312", "101240313","101240314","101240401","101240402", "101240403","101240404","101240405","101240406", "101240407","101240408","101240409","101240410", "101240411","101240501","101240502","101240503", "101240504","101240505","101240506","101240507", "101240508","101240509","101240510","101240601", "101240602","101240603","101240604","101240605", "101240606","101240607","101240608","101240609", "101240610","101240611","101240612","101240613", "101240701","101240702","101240703","101240704", "101240705","101240706","101240707","101240708", "101240709","101240710","101240711","101240712", "101240713","101240714","101240715","101240716", "101240717","101240801","101240802","101240901", "101240902","101241001","101241002","101241101", "101241102","101241103","101250101","101250102", "101250103","101250104","101250201","101250202", "101250203","101250301","101250302","101250303", "101250304","101250305","101250306","101250401", "101250402","101250403","101250404","101250405", "101250406","101250407","101250408","101250409", "101250501","101250502","101250503","101250504", "101250505","101250506","101250507","101250508", "101250509","101250510","101250511","101250601", "101250602","101250603","101250604","101250605", "101250606","101250607","101250700","101250701", "101250702","101250703","101250704","101250705", "101250801","101250802","101250803","101250804", "101250805","101250806","101250901","101250902", "101250903","101250904","101250905","101250906", "101250907","101250908","101250909","101250910", "101251001","101251002","101251003","101251004", "101251005","101251006","101251101","101251102", "101251103","101251201","101251202","101251203", "101251204","101251205","101251206","101251207", "101251208","101251209","101251210","101251211", "101251301","101251302","101251401","101251402", "101251403","101251404","101251405","101251406", "101251407","101251408","101251409","101251410", "101251501","101251502","101251503","101251504", "101251505","101251506","101251507","101251508", "101260101","101260102","101260103","101260104", "101260105","101260106","101260107","101260108", "101260201","101260202","101260203","101260204", "101260205","101260206","101260207","101260208", "101260209","101260210","101260211","101260212", "101260213","101260214","101260301","101260302", "101260303","101260304","101260305","101260306", "101260401","101260402","101260403","101260404", "101260405","101260406","101260407","101260408", "101260409","101260410","101260411","101260412", "101260501","101260502","101260503","101260504", "101260505","101260506","101260507","101260508", "101260509","101260510","101260511","101260512", "101260513","101260514","101260515","101260516", "101260517","101260518","101260601","101260602", "101260603","101260604","101260605","101260606", "101260607","101260608","101260609","101260610", "101260611","101260701","101260702","101260703", "101260704","101260705","101260706","101260707", "101260801","101260802","101260803","101260804", "101260901","101260902","101260903","101260904", "101260905","101260906","101260907","101260908", "101260909","101270101","101270102","101270103", "101270104","101270105","101270106","101270107", "101270108","101270109","101270110","101270111", "101270112","101270113","101270114","101270115", "101270116","101270201","101270202","101270203", "101270204","101270301","101270302","101270303", "101270401","101270402","101270403","101270404", "101270405","101270406","101270407","101270408", "101270501","101270502","101270503","101270504", "101270505","101270506","101270507","101270601", "101270602","101270603","101270604","101270605", "101270606","101270607","101270701","101270702", "101270703","101270801","101270802","101270803", "101270804","101270805","101270901","101270902", "101270903","101270904","101271001","101271003", "101271004","101271005","101271006","101271007", "101271101","101271102","101271103","101271104", "101271105","101271106","101271107","101271108", "101271109","101271110","101271111","101271201", "101271202","101271203","101271204","101271205", "101271301","101271302","101271303","101271304", "101271401","101271402","101271403","101271404", "101271405","101271406","101271407","101271408", "101271409","101271501","101271502","101271503", "101271504","101271505","101271506","101271601", "101271603","101271604","101271605","101271606", "101271607","101271608","101271609","101271610", "101271611","101271612","101271613","101271614", "101271615","101271616","101271617","101271618", "101271619","101271701","101271702","101271703", "101271704","101271705","101271706","101271707", "101271708","101271801","101271802","101271803", "101271804","101271805","101271806","101271807", "101271808","101271809","101271810","101271811", "101271812","101271813","101271814","101271815", "101271816","101271817","101271818","101271901", "101271902","101271903","101271904","101271905", "101271906","101271907","101271908","101271909", "101271910","101271911","101271912","101271913", "101271914","101272001","101272002","10127", "10127","10127","10127","101272101", "101272102","101272103","101272104","101272105", "101280101","101280102","101280103","101280104", "101280105","101280106","101280201","101280202", "101280203","101280204","101280205","101280206", "101280207","101280208","101280209","101280301", "101280302","101280303","101280304","101280305", "101280401","101280402","101280403","101280404", "101280406","101280407","101280408","101280409", "101280501","101280502","101280503","101280504", "101280505","101280506","101280601","101280701", "101280702","101280703","101280800","101280801", "101280802","101280803","101280901","101280902", "101280903","101280905","101280906","101280907", "101280908","101281001","101281002","101281003", "101281004","101281005","101281006","101281007", "101281101","101281103","101281104","101281105", "101281106","101281107","101281108","101281201", "101281202","101281203","101281204","101281205", "101281301","101281302","101281303","101281304", "101281305","101281306","101281307","101281401", "101281402","101281403","101281404","101281501", "101281502","101281601","101281701","101281801", "101281802","101281901","101281902","101281903", "101281904","101282001","101282002","10128", "10128","10128","101282101","101282102", "101282103","101282104","101282105","101290101", "101290102","101290103","101290104","101290105", "101290106","101290107","101290108","101290109", "101290110","101290111","101290112","101290113", "101290114","101290201","101290202","101290203", "101290204","101290205","101290206","101290207", "101290208","101290209","101290210","101290211", "101290212","101290301","101290302","101290303", "101290304","101290305","101290306","101290307", "101290308","101290309","101290310","101290311", "101290312","101290401","101290402","101290403", "101290404","101290405","101290406","101290407", "101290408","101290409","101290501","101290502", "101290503","101290504","101290505","101290506", "101290601","101290602","101290603","101290604", "101290605","101290606","101290607","101290701", "101290702","101290703","101290704","101290705", "101290706","101290707","101290708","101290709", "101290801","101290802","101290803","101290804", "101290805","101290806","101290807","101290808", "101290809","101290810","101290901","101290902", "101290903","101290904","101290905","101290906", "101290907","101290908","101290909","101290910", "101290911","101290912","101291001","101291002", "101291003","101291004","101291005","101291006", "101291007","101291008","101291009","101291010", "101291101","101291102","101291103","101291104", "101291105","101291106","101291107","101291108", "101291201","101291203","101291204","101291205", "101291206","101291207","101291301","101291302", "101291303","101291304","101291401","101291402", "101291403","101291404","101291501","101291502", "101291503","101291504","101291505","101291506", "101291507","101291508","101291601","101291602", "101291603","101291604","101291605","101300101", "101300102","101300103","101300104","101300105", "101300106","101300107","101300108","101300109", "101300110","101300201","101300202","101300203", "101300204","101300205","101300206","101300207", "101300208","101300301","101300302","101300303", "101300304","101300305","101300306","101300307", "101300308","101300401","101300402","101300403", "101300404","101300405","101300501","101300502", "101300503","101300504","101300505","101300506", "101300507","101300508","101300509","101300510", "101300511","101300512","101300513","101300514", "101300601","101300602","101300603","101300604", "101300605","101300606","101300701","101300702", "101300703","101300704","101300705","101300801", "101300802","101300803","101300901","101300902", "101300903","101300904","101300905","101301001", "101301002","101301003","101301004","101301005", "101301006","101301007","101301008","101301009", "101301010","101301011","101301012","101301101", "101301102","101301103","101301201","101301202", "101301203","101301204","101301205","101301206", "101301207","101301208","101301209","101301210", "101301301","101301302","101301303","101301401", "101301402","101301403","101301404","101301405", "101310101","101310102","101310201","101310202", "101310203","101310204","101310205","101310206", "101310207","101310208","101310209","101310210", "101310211","101310212","101310213","101310214", "101310215","101310216","101310217","101310218", "101310219","101310220","101310221","101310222", "101310223","10131","10132","10133", "10134","10135","101330101","101340101", "101340102","101340201","101340202","101340203", "101340204","101340205","101340301","101340401", "101340501","101340601","101340602","101340603", "101340701","101340801","101340802","101340901", "101340902","101340903","101340904"}; } }
6.第二个工具类文件
查看文本打印? ; importjava.io.BufferedReader; importjava.io.IOException; importjava.io.InputStreamReader; .HttpURLConnection; .URL; publicclassHttpDownloader{ //根据URL下载文件,前提是这个文件当中的内容是文本,函数的返回值就是文本当中的内容 //1.创建一个URL对象 //2.通过URL对象,创建一个HttpURLConnection对象 //3.得到InputStream //4.从InputStream当中读取数据 privateURLurl; publicStringdownload(StringurlStr){ StringBuffersb=newStringBuffer(); Stringline=null; BufferedReaderbuffer=null; try{ url=newURL(urlStr); HttpURLConnectionurlConn=(HttpURLConnection)url .openConnection(); buffer=newBufferedReader(newInputStreamReader( urlConn.getInputStream())); while((line=buffer.readLine())!=null){ sb.append(line); } }catch(Exceptione){ e.printStackTrace(); }finally{ try{ buffer.close(); }catch(IOExceptione){ e.printStackTrace(); } } returnsb.toString(); } }
主文件如下
查看文本打印? ; importjava.io.BufferedInputStream; importjava.io.InputStream; .URL; .URLConnection; importjava.util.HashMap; importjava.util.Map; importorg.json.JSONObject; importandroid.app.Activity; importandroid.graphics.Bitmap; importandroid.graphics.BitmapFactory; importandroid.os.Bundle; importandroid.view.View; importandroid.view.View.OnClickListener; importandroid.widget.AdapterView; importandroid.widget.AdapterView.OnItemSelectedListener; importandroid.widget.ArrayAdapter; importandroid.widget.Button; importandroid.widget.EditText; importandroid.widget.ImageView; importandroid.widget.Spinner; importandroid.widget.TextView; publicclassDemoWeatherJSONActivityextendsActivity{ privateSpinnerspinPro; privateSpinnerspinCity; privateButtonbutton1; privateEditTextetInput; privateButtonbutton2; privateImageViewimage1; privateImageViewimage2; privateImageViewimage3; privateImageViewimage4; privateImageViewimage5; privateImageViewimage6; privateTextViewtext1; privateTextViewtext2; privateTextViewtext3; privateMap<String,String>mapAllNameID; privateString[]strNamePro;//所有的市 privateString[][]strNameCity;//所有的城市 privateStringname;//要查询地址 privateStringid;//要查询的id privateStringstrUrl; privateStringjsonData; //要现实的<strong>天气</strong>信息 privateStringBufferweatherInfo1; privateStringBufferweatherInfo2; privateStringBufferweatherInfo3; //图片资源14,25,36 privateStringweatherPicUrl1; privateStringweatherPicUrl2; privateStringweatherPicUrl3; privateStringweatherPicUrl4; privateStringweatherPicUrl5; privateStringweatherPicUrl6; privateArrayAdapter<CharSequence>adapterCity; privateArrayAdapter<CharSequence>adapterPro; @Override publicvoidonCreate(BundlesavedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.main); this.initWidget(); this.initVar(); this.binding(); } privatevoidinitVar(){ //strUrl="/data/101010100.html"; //得到所有的键值对 mapAllNameID=newHashMap<String,String>(); NameIDMapnameIDMap=newNameIDMap(); mapAllNameID=nameIDMap.getMapAllNameID(); //初始化省市级 strNamePro=newString[]{"黑龙江","吉林","辽宁","内蒙古","河北","山西","陕西", "山东","新疆","西藏","青海","甘肃","宁夏","河南","江苏","湖北","浙江", "安徽","福建","江西","湖南","贵州","四川","广东","云南","广西","海南", "台湾"}; strNameCity=newString[][]{ {"哈尔滨","齐齐哈尔","牡丹江","佳木斯","绥化","黑河","大兴安岭","伊春","大庆", "鸡西","鹤岗","双鸭山"}, {"长春","吉林","延吉","四平","通化","白城","辽源","松原","白山"}, {"沈阳","大连","鞍山","抚顺","本溪","丹东","锦州","营口","阜新","辽阳", "铁岭","朝阳","盘锦","葫芦岛"}, {"呼和浩特","包头","乌海","集宁","通辽","赤峰","鄂尔多斯","临河","锡林浩特", "海拉尔","乌兰浩特","阿拉善左旗"}, {"石家庄","保定","张家口","唐山","廊坊","沧州","衡水","邢台","邯郸","秦皇岛"}, {"太原","大同","阳泉","晋中","长治","晋城","临汾","运城","朔州","忻州", "离石"}, {"西安","三原","延长","榆林","渭南","商洛","安康","汉中","宝鸡","铜川"}, {"济南","青岛","淄博","德州","烟台","潍坊","济宁","泰安","临沂","菏泽", "滨州","东营","威海","枣庄","日照","莱芜","聊城"}, {"乌鲁木齐","克拉玛依","石河子","昌吉","吐鲁番","库尔勒","阿拉尔","阿克苏", "喀什","伊宁","塔城","哈密","和田","阿勒泰","阿图什","博乐"}, {"拉萨","日喀则","山南","林芝","昌都","那曲","阿里"}, {"西宁","海东","黄南","海南","果洛","玉树","海西","海北"}, {"兰州","定西","平凉","庆阳","武威","金昌","张掖","酒泉","天水","武都", "临夏","合作","白银"}, {"银川","石嘴山","吴忠","固原","中卫"}, {"郑州","安阳","新乡","许昌","平顶山","信阳","南阳","开封","洛阳","商丘", "焦作","鹤壁","濮阳","周口","漯河","驻马店","三门峡","济源"}, {"南京","无锡","镇江","苏州","南通","扬州","盐城","徐州","淮安","连云港", "常州","泰州","宿迁"}, {"武汉","襄樊","鄂州","孝感","黄冈","黄石","咸宁","荆州","宜昌","恩施", "十堰","神农架","随州","荆门","天门","仙桃","潜江"}, {"杭州","湖州","嘉兴","宁波","绍兴","台州","温州","丽水","金华","衢州", "舟山"}, {"合肥","蚌埠","芜湖","淮南","马鞍山","安庆","宿州","阜阳","亳州","黄山站", "滁州","淮北","铜陵","宣城","六安","巢湖","池州"}, {"福州","厦门","宁德","莆田","泉州","漳州","龙岩","三明","南平"}, {"南昌","九江","上饶","抚州","宜春","吉安","赣州","景德镇","萍乡","新余", "鹰潭"}, {"长沙","湘潭","株洲","衡阳","郴州","常德","赫山区","娄底","邵阳","岳阳", "张家界","怀化","黔阳","永州","吉首"}, {"贵阳","遵义","安顺","都匀","凯里","铜仁","毕节","六盘水","黔西"}, {"成都","攀枝花","自贡","绵阳","南充","达州","遂宁","广安","巴中","泸州", "宜宾","内江","资阳","乐山","眉山","凉山","雅安","甘孜","阿坝", "德阳","广元"}, {"广州","韶关","惠州","梅州","汕头","深圳","珠海","顺德","肇庆","湛江", "江门","河源","清远","云浮","潮州","东莞","中山","阳江","揭阳", "茂名","汕尾"}, {"昆明","大理","红河","曲靖","保山","文山","玉溪","楚雄","普洱","昭通", "临沧","怒江","香格里拉","丽江","德宏","景洪"}, {"南宁","崇左","柳州","来宾","桂林","梧州","贺州","贵港","玉林","百色", "钦州","河池","北海","防城港"},{"海口","三亚"}, {"台北县","高雄","台南","台中","桃园","新竹县","宜兰","马公","嘉义"}}; adapterPro=newArrayAdapter<CharSequence>(getApplicationContext(), android.R.layout.simple_spinner_item,strNamePro); adapterPro .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinPro.setAdapter(adapterPro); } classProSelectListenerimplementsOnItemSelectedListener{ publicvoidonItemSelected(AdapterView<?>arg0,Viewarg1,intarg2, longarg3){ adapterCity=newArrayAdapter<CharSequence>( DemoWeatherJSONActivity.this, android.R.layout.simple_spinner_item,strNameCity[arg2]);//定义我们所有的列表项 adapterCity .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinCity.setAdapter(adapterCity); } publicvoidonNothingSelected(AdapterView<?>arg0){ } } classCitySelectListenerimplementsOnItemSelectedListener{ publicvoidonItemSelected(AdapterView<?>arg0,Viewarg1,intarg2, longarg3){ name=spinCity.getSelectedItem().toString(); } publicvoidonNothingSelected(AdapterView<?>arg0){ } } classButton1ListenerimplementsOnClickListener{ publicvoidonClick(Viewv){ //根据选中的名字得到对应的id然后下载网页 NameIDMapnameIDMap=newNameIDMap(); mapAllNameID=nameIDMap.getMapAllNameID(); id=mapAllNameID.get(name); strUrl="/data/"+id+".html"; //将网页上的内容下载下来 HttpDownloaderhttp=newHttpDownloader(); jsonData=http.download(strUrl); //<strong>天气</strong>情况 parseJson(jsonData); //<strong>天气</strong>图片 weatherPic(); } } privatevoidweatherPic(){//<strong>天气</strong>图片 try{ image1.setImageBitmap(getBitmap(weatherPicUrl1)); image2.setImageBitmap(getBitmap(weatherPicUrl2)); image3.setImageBitmap(getBitmap(weatherPicUrl3)); image4.setImageBitmap(getBitmap(weatherPicUrl4)); image5.setImageBitmap(getBitmap(weatherPicUrl5)); image6.setImageBitmap(getBitmap(weatherPicUrl6)); }catch(Exceptione){ e.printStackTrace(); } } //根据图片的url得到要显示的图片 privateBitmapgetBitmap(Stringurl){ Bitmapbm=null;//生成了一张bmp图像 try{ URLiconurl=newURL("/img/b"+url +".gif"); URLConnectionconn=iconurl.openConnection(); conn.connect(); //获得图像的字符流 InputStreamis=conn.getInputStream(); BufferedInputStreambis=newBufferedInputStream(is,8192); bm=BitmapFactory.decodeStream(bis); bis.close(); is.close();//关闭流 }catch(Exceptione){ e.printStackTrace(); } returnbm; } //json数据<strong>解析</strong> privatevoidparseJson(StringjsonData){ try{ JSONObjectallWeatherData=newJSONObject(jsonData); JSONObjectweatherData=allWeatherData .getJSONObject("weatherinfo"); //第一天的<strong>天气</strong>情况 weatherInfo1=newStringBuffer(); weatherInfo1.append("地点:"+weatherData.getString("city")); weatherInfo1.append("\n时间:"+weatherData.getString("date_y") +""+weatherData.getString("week")); weatherInfo1.append("\n今日<strong>天气</strong>:"+weatherData.getString("weather1")); weatherInfo1.append("\n温度:"+weatherData.getString("temp1")); weatherPicUrl1=weatherData.getString("img1"); weatherPicUrl2=weatherData.getString("img2"); weatherInfo1.append("\n风速:"+weatherData.getString("wind1")+"" +weatherData.getString("fl1")); //第二天的<strong>天气</strong>情况 weatherInfo2=newStringBuffer(); weatherInfo2.append("明天<strong>天气</strong>:"+weatherData.getString("weather2")); weatherInfo2.append("\n温度:"+weatherData.getString("temp2")); weatherPicUrl3=weatherData.getString("img3"); weatherPicUrl4=weatherData.getString("img4"); weatherInfo2.append("\n风速:"+weatherData.getString("wind2")+"" +weatherData.getString("fl2")); //第三天的<strong>天气</strong>情况 weatherInfo3=newStringBuffer(); weatherInfo3.append("后天<strong>天气</strong>:"+weatherData.getString("weather3")); weatherInfo3.append("\n温度:"+weatherData.getString("temp3")); weatherPicUrl5=weatherData.getString("img5"); weatherPicUrl6=weatherData.getString("img6"); weatherInfo3.append("\n风速:"+weatherData.getString("wind3")+"" +weatherData.getString("fl3")); text1.setText(weatherInfo1); text2.setText(weatherInfo2); text3.setText(weatherInfo3); }catch(Exceptione){ e.printStackTrace(); } } classButton2ListenerimplementsOnClickListener{ publicvoidonClick(Viewv){ NameIDMapnameIDMap=newNameIDMap(); mapAllNameID=nameIDMap.getMapAllNameID(); id=mapAllNameID.get(etInput.getText().toString()); strUrl="/data/"+id+".html"; //将网页上的内容下载下来 HttpDownloaderhttp=newHttpDownloader(); jsonData=http.download(strUrl); //<strong>天气</strong>情况 parseJson(jsonData); //<strong>天气</strong>图片 weatherPic(); } } privatevoidbinding(){//绑定监听器 button1.setOnClickListener(newButton1Listener()); button2.setOnClickListener(newButton2Listener()); spinPro.setOnItemSelectedListener(newProSelectListener()); spinCity.setOnItemSelectedListener(newCitySelectListener()); } privatevoidinitWidget(){//控件初始化 spinPro=(Spinner)findViewById(R.id.spinner1); spinCity=(Spinner)findViewById(R.id.spinner2); button1=(Button)findViewById(R.id.button1); button2=(Button)findViewById(R.id.button2); etInput=(EditText)findViewById(R.id.editText1); text1=(TextView)findViewById(R.id.textView1); text2=(TextView)findViewById(R.id.textView2); text3=(TextView)findViewById(R.id.textView3); image1=(ImageView)findViewById(R.id.imageView1); image2=(ImageView)findViewById(R.id.imageView2); image3=(ImageView)findViewById(R.id.imageView3); image4=(ImageView)findViewById(R.id.imageView4); image5=(ImageView)findViewById(R.id.imageView5); image6=(ImageView)findViewById(R.id.imageView6); } }
如果觉得《Android:国家气象局天气预报接口JSON完全解析》对你有帮助,请点赞、收藏,并留下你的观点哦!