博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Android 车联网天气
阅读量:7124 次
发布时间:2019-06-28

本文共 2971 字,大约阅读时间需要 9 分钟。

学友资料:

天气查询

http://api.map.baidu.com/telematics/v3/weather?location=%E8%8B%8F%E5%B7%9E&output=json&ak=640f3985a6437dad8135dae98d775a09

{"error": 0,"status": "success","date": "2015-01-19","results": [{"currentCity": "苏州","pm25": "167","index": [],"weather_data": [{"date": "周一 01月19日 (实时:8℃)","dayPictureUrl": "http://api.map.baidu.com/images/weather/day/qing.png","nightPictureUrl": "http://api.map.baidu.com/images/weather/night/duoyun.png","weather": "晴转多云","wind": "北风3-4级","temperature": "10 ~ 3℃"},{"date": "周二","dayPictureUrl": "http://api.map.baidu.com/images/weather/day/yin.png","nightPictureUrl": "http://api.map.baidu.com/images/weather/night/yin.png","weather": "阴","wind": "东南风3-4级","temperature": "10 ~ 5℃"},{"date": "周三","dayPictureUrl": "http://api.map.baidu.com/images/weather/day/yin.png","nightPictureUrl": "http://api.map.baidu.com/images/weather/night/duoyun.png","weather": "阴转多云","wind": "西风4-5级","temperature": "11 ~ 1℃"},{"date": "周四","dayPictureUrl": "http://api.map.baidu.com/images/weather/day/qing.png","nightPictureUrl": "http://api.map.baidu.com/images/weather/night/duoyun.png","weather": "晴转多云","wind": "西北风4-5级","temperature": "8 ~ 1℃"}]}]}

 

http://api.map.baidu.com/telematics/v3/weather?location=%E8%8B%8F%E5%B7%9E&output=xml&ak=640f3985a6437dad8135dae98d775a09

0
success
2015-01-19
苏州
周一 01月19日 (实时:8℃)
http://api.map.baidu.com/images/weather/day/qing.png
http://api.map.baidu.com/images/weather/night/duoyun.png
晴转多云
北风3-4级
10 ~ 3℃
周二
http://api.map.baidu.com/images/weather/day/yin.png
http://api.map.baidu.com/images/weather/night/yin.png
东南风3-4级
10 ~ 5℃
周三
http://api.map.baidu.com/images/weather/day/yin.png
http://api.map.baidu.com/images/weather/night/duoyun.png
阴转多云
西风4-5级
11 ~ 1℃
周四
http://api.map.baidu.com/images/weather/day/qing.png
http://api.map.baidu.com/images/weather/night/duoyun.png
晴转多云
西北风4-5级
8 ~ 1℃
167

 

学员资料:

http://wthrcdn.etouch.cn/weather_mini?city=深圳

通过城市名字获得天气数据,json数据
http://wthrcdn.etouch.cn/weather_mini?citykey=101280601
通过城市id获得天气数据,json数据

http://wthrcdn.etouch.cn/WeatherApi?citykey=101280601

通过城市id获得天气数据,xml文件数据,
当错误时会有<error>节点
http://wthrcdn.etouch.cn/WeatherApi?city=深圳
通过城市名字获得天气数据,xml文件数据

转载于:https://www.cnblogs.com/xubuhang/p/4233150.html

你可能感兴趣的文章
第十一单元 管理网络
查看>>
还有设了enable secret ,enable password 就无效了
查看>>
memcache + openresty
查看>>
vmware克隆Centos6.4虚拟机网卡无法启动问题
查看>>
Mysql各种存储引擎的特性以及如何选择存储引擎
查看>>
MIT发起人工智能项目MIT IQ,旨在赢回AI领域主动权
查看>>
Guava缓存
查看>>
LAMP和LNMP加速与缓存优化
查看>>
sass安装
查看>>
flv技术专题探讨1
查看>>
我第一个做好的弹出菜单
查看>>
Windows Server 笔记(六):Active Directory域服务:组
查看>>
Linux 2 unit4 磁盘划分
查看>>
用Delphi 实现WebService
查看>>
.Net Micro Framework研究—用MF控制机器人
查看>>
在WORD和EXCEL中输入面积和体积
查看>>
Azure实践系列 4:启用和配置免费的MFA
查看>>
Azure实践系列 5:MFA用户配置及效果展示
查看>>
编程的三层境界——器、术、道
查看>>
Cacti设置流量阀值实现邮件报警
查看>>