Javascript weather API text only

4k Views Asked by At

I would like to use a text based weather API(Google API if exists) to show the current temperature of a given point(latitude,longitude). I don't want to show the map, only the value... In fact, What I want is to do something like

$(document).ready(function(){
     var longitude=123456, 
         latitude=7890,
         url="???";
     $.getJSON(url,{long:longitude,lat:latitude},function(result){    
        $('div#weather').html("°F :"+_result);
     });
});

Does anyone have an idea ? if yes, share that with me please. Thank you for reading

2

There are 2 best solutions below

0
Romin On

ProgrammableWeb lists a number of APIs that deal with Weather information. You should investigate from the lsit if any of the APIs meets your requirements.

Weather Category APIs : http://www.programmableweb.com/apitag/weather

1
beddamadre On

Here is a working jQuery example : http://jsbin.com/isukam/1 with Metwit weather API.

Check weather resource for more information.

Disclosure: I own this API.