百度天气预报接口
来源:互联网 发布:淘宝下拉菜单 编辑:程序博客网 时间:2024/06/14 09:39
百度提供天气预报查询接口API,可以根据经纬度/城市名查询天气情况,我们可以在微信公众平台开发中调用这一接口。
接口说明
根据经纬度/城市名查询天气的结果
接口示例
http://api.map.baidu.com/telematics/v3/weather?location=北京&output=json&ak=yourkey
百度ak申请地址:http://lbsyun.baidu.com/apiconsole/key
接口参数说明
.td{border:1px solid c0c0c0;}
返回结果
返回xml格式的数据
<?xml version="1.0" encoding="utf-8" ?> <CityWeatherResponse> <status>success</status> <date>2014-05-03</date> <results> <currentCity>北京</currentCity> <weather_data> <date>周六(今天, 实时:22℃)</date> <dayPictureUrl>http://api.map.baidu.com/images/weather/day/leizhenyu.png</dayPictureUrl> <nightPictureUrl>http://api.map.baidu.com/images/weather/night/duoyun.png</nightPictureUrl> <weather>雷阵雨转多云</weather> <wind>北风5-6级</wind> <temperature>24 ~ 11℃</temperature> <date>周日</date> <dayPictureUrl>http://api.map.baidu.com/images/weather/day/duoyun.png</dayPictureUrl> <nightPictureUrl>http://api.map.baidu.com/images/weather/night/qing.png</nightPictureUrl> <weather>多云转晴</weather> <wind>北风4-5级</wind> <temperature>19 ~ 8℃</temperature> <date>周一</date> <dayPictureUrl>http://api.map.baidu.com/images/weather/day/qing.png</dayPictureUrl> <nightPictureUrl>http://api.map.baidu.com/images/weather/night/qing.png</nightPictureUrl> <weather>晴</weather> <wind>微风</wind> <temperature>21 ~ 9℃</temperature> <date>周二</date> <dayPictureUrl>http://api.map.baidu.com/images/weather/day/duoyun.png</dayPictureUrl> <nightPictureUrl>http://api.map.baidu.com/images/weather/night/qing.png</nightPictureUrl> <weather>多云转晴</weather> <wind>微风</wind> <temperature>21 ~ 10℃</temperature> </weather_data> </results></CityWeatherResponse>
返回json格式的数据
{ "error": 0, "status": "success", "date": "2014-05-03", "results": [ { "currentCity": "北京", "weather_data": [ { "date": "周六(今天, 实时:22℃)", "dayPictureUrl": "http://api.map.baidu.com/images/weather/day/leizhenyu.png", "nightPictureUrl": "http://api.map.baidu.com/images/weather/night/duoyun.png", "weather": "雷阵雨转多云", "wind": "北风5-6级", "temperature": "24 ~ 11℃" }, { "date": "周日", "dayPictureUrl": "http://api.map.baidu.com/images/weather/day/duoyun.png", "nightPictureUrl": "http://api.map.baidu.com/images/weather/night/qing.png", "weather": "多云转晴", "wind": "北风4-5级", "temperature": "19 ~ 8℃" }, { "date": "周一", "dayPictureUrl": "http://api.map.baidu.com/images/weather/day/qing.png", "nightPictureUrl": "http://api.map.baidu.com/images/weather/night/qing.png", "weather": "晴", "wind": "微风", "temperature": "21 ~ 9℃" }, { "date": "周二", "dayPictureUrl": "http://api.map.baidu.com/images/weather/day/duoyun.png", "nightPictureUrl": "http://api.map.baidu.com/images/weather/night/qing.png", "weather": "多云转晴", "wind": "微风", "temperature": "21 ~ 10℃" } ] } ]}
0 0
- 百度天气预报接口
- 百度天气预报接口
- 百度天气预报接口
- 百度天气预报接口
- 百度天气预报接口
- 百度天气预报接口介绍
- 百度天气预报接口
- 百度天气预报接口
- 百度天气预报接口介绍
- 百度天气预报接口介绍
- 百度天气预报接口介绍
- Android天气预报+百度天气接口
- Android天气预报,Json解析,百度天气接口
- 百度提供天气预报查询接口API
- java天气预报调用百度接口实现
- 如何使用百度天气预报API接口
- 百度天气预报接口介绍--职坐标
- 如何使用百度天气预报API接口
- Android仿IOS上拉下拉弹性效果
- 网络分析与网络数据集—创建网络数据集(一)
- 关于泛型Generics
- nginx+tomcat+memcached负载均衡集群搭建详细笔记(下)
- 无法启动此程序,因为计算机中丢失msvcp90d.dll
- 百度天气预报接口
- glGenTextures(GLsizei n, GLuint *textures)函数说明
- Linux之安装JDK
- mini6410成功移植OPENCV-2.0.0实现人脸检测
- struts2常用标签
- 获取图片高度和宽度
- 网络分析与网络数据集—创建网络数据集(二)
- CODE中创建项目和更新项目的方法
- WHILE (Transact-SQL)