简体   繁体   中英

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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM