使用Google Weather API查询天气预报
来源:互联网 发布:软件系统分为 编辑:程序博客网 时间:2024/06/06 12:37
Google Weather API 只支持美国地区使用邮政编码进行查询,例如:
http://www.google.com/ig/api?hl=zh-cn&weather=94043
(94043 为 山景城, 美国加州 的邮政编码)
而除了美国以外的地区需要使用经纬度坐标作为参数才能执行 Google Weather API, 例如:
http://www.google.com/ig/api?hl=zh-cn&weather=,,,30670000,104019996
(30670000,104019996 为 成都, 中国大陆 的经纬度坐标)
当然,也可能通行城市名称的汉语拼音来查询,例如:以下是北京的天气
http://www.google.com/ig/api?hl=zh-cn&weather=Beijing
要其它地区的经纬度坐标,可以通过 Google API 提供的国家代码列表及相应的城市经纬度坐标列表可以查询到,以下是 Google API 提供的查询参数:
http://www.google.com/ig/countries?output=xml&hl=zh-cn
(查询 Google 所支持的所有国家的代码,并以 zh-cn 简体中文显示)
http://www.google.com/ig/api?hl=zh-cn&weather=94043
(94043 为 山景城, 美国加州 的邮政编码)
而除了美国以外的地区需要使用经纬度坐标作为参数才能执行 Google Weather API, 例如:
http://www.google.com/ig/api?hl=zh-cn&weather=,,,30670000,104019996
(30670000,104019996 为 成都, 中国大陆 的经纬度坐标)
当然,也可能通行城市名称的汉语拼音来查询,例如:以下是北京的天气
http://www.google.com/ig/api?hl=zh-cn&weather=Beijing
要其它地区的经纬度坐标,可以通过 Google API 提供的国家代码列表及相应的城市经纬度坐标列表可以查询到,以下是 Google API 提供的查询参数:
http://www.google.com/ig/countries?output=xml&hl=zh-cn
(查询 Google 所支持的所有国家的代码,并以 zh-cn 简体中文显示)
http://www.google.com/ig/cities?output=xml&hl=zh-cn&country=cn
原文地址:http://blog.csdn.net/hello_haozi/article/details/7564537
0 0
- 使用Google Weather API查询天气预报
- 使用Google Weather API查询天气预报
- 使用Google Weather API查询天气预报
- 使用Google Weather API查询天气预报
- 使用Google Weather API查询天气预报
- 使用Google Weather API查询天气预报
- 使用Google Weather API查询天气预报
- 使用Google Weather API查询天气预报
- 使用Google Weather API查询天气预报
- 使用Google Weather API查询天气预报
- 使用Google Weather API查询天气预报
- 使用Google Weather API 制作天气预报应用
- 使用Google Weather的API
- Google 天气预报 英语版本 调用google weather api
- 用prototype和Google的weather api做天气预报
- 天气预报+定时短信分享(Google Weather API)
- Google weather API 天气使用方式
- google weather api
- error: more than one device and emulator .
- 在代码里面设置组件的相对位置
- 操作系统课堂笔记(5)存储管理
- 程序两种空间的切换
- 跟我一起写 Makefile(十四)
- 使用Google Weather API查询天气预报
- Windows服务
- Android AIDL简单例子
- platform_device与platform_driver
- centOS下安装mysql workbench详细步骤
- VC 内存泄漏 检查
- PL/SQL 读写OS文件
- 人的一生应该追求什么东西呢
- 基础知识