Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a weather widget using jquery and some API?

I need to create a weather widget. Widget means it should be a table or div where my weather details are displayed. Also I need some api without any limits and free to use to display the weather conditions?

If the API can return data in json format, it will be great. From basic understanding i know that weather.com, google and yahoo have apis. which one is better

like image 551
Mahesh Singh Avatar asked Oct 09 '22 02:10

Mahesh Singh


1 Answers

You can go ahead with yahoo YQL. It gives you response in json format if needed.

You can use select query to weather_forecast table and fetch necessary data. Here is a nice article explaining how to achieve this. even how to display images based on weather conditioin.

http://jobyj.in/api/create-a-weather-widget-using-jquery-yql-and-weather-com/

You need to know how ajax calls are done using jquery to understand this how-to

like image 88
John Dikpal Avatar answered Oct 13 '22 10:10

John Dikpal