雅虎天气,雅虎GeoPlant,谷歌天气或其他API来使用JavaScript连接? [英] Yahoo Weather, Yahoo GeoPlant, Google Weather or another API to connect to with javascript?

查看:113
本文介绍了雅虎天气,雅虎GeoPlant,谷歌天气或其他API来使用JavaScript连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一种方式来获得一定的城市与JavaScript当前的天气回来?哪个API,我会更好地使用?还是有,你可以使用Ajax请求来获得当前的天气任何其他应用程序?

I need a way to get the current weather back for a certain city with javascript? Which API would I be better to use? Or are there any other apps that you can use an ajax request to get the current weather?

GeoPlanit需要一个AppID,所以我没有尝试这样做又和雅虎的天气是一个RSS feed。我也看到了谷歌的天气API不支持在这个阶段?

GeoPlanit required an appid so I haven't tried this yet and yahoo weather is an RSS feed. I have also read that Google's weather API is unsupported at this stage?

感谢。

编辑:也找不到任何将JSON格式返回数据,这是最近的事情,我发现,但只允许拉链codeS - <一个href="http://services.badbamboo.com/REST/Common.ashx?method=GetWeather&zip=80202&jsoncallback=_cb" rel="nofollow">http://services.badbamboo.com/REST/Common.ashx?method=GetWeather&zip=80202&jsoncallback=_cb

Also can't find anything that will return data in JSON format, this is the closest thing I found but it only allows zip codes -- http://services.badbamboo.com/REST/Common.ashx?method=GetWeather&zip=80202&jsoncallback=_cb

推荐答案

您可以解析从雅虎的RSS提要的JavaScript。另请参见:<一href="http://stackoverflow.com/questions/507441/best-weather-apis">http://stackoverflow.com/questions/507441/best-weather-apis

You could parse the RSS feed from Yahoo with JavaScript. Also see: http://stackoverflow.com/questions/507441/best-weather-apis

仅供参考,这是相当琐碎写一个脚本来获取天气在服务器端。

FYI, it's quite trivial to write a script to fetch the weather on the server side.

这篇关于雅虎天气,雅虎GeoPlant,谷歌天气或其他API来使用JavaScript连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆