Yahoo Weather, Yahoo GeoPlant, Google Weather or another API to connect to with javascript?

只谈情不闲聊 提交于 2019-12-24 03:55:12

问题


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 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?

Thanks.

EDIT: 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


回答1:


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

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



来源:https://stackoverflow.com/questions/2321763/yahoo-weather-yahoo-geoplant-google-weather-or-another-api-to-connect-to-with

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!