0

Weather Report

I want to create weather report with jquery and Json Api

15th Jun 2017, 6:41 AM
Innocent Tauzeni
Innocent Tauzeni - avatar
5 Answers
+ 3
Do it, don't ask for authorization :P Anyway, maybe can you start from there: https://openweathermap.org/api
15th Jun 2017, 8:15 AM
visph
visph - avatar
+ 2
Use the geolocation object feature of error event handling to get more information about the cause of not working: https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation http://mdn.beonex.com/en/Using_geolocation.html
15th Jun 2017, 11:38 AM
visph
visph - avatar
+ 1
$(document).ready(function(){ if(navigator.geolocation){ navigator.geolocation.getCurrentPosition(function(){ $("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude); }); } var api = "http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid=b1b15e88fa797225412429c1c50c122a1"; $.getJSON(api, function(data){ alert() }); }); am getting error
15th Jun 2017, 11:25 AM
Innocent Tauzeni
Innocent Tauzeni - avatar
0
nice bro let me try
15th Jun 2017, 11:23 AM
Innocent Tauzeni
Innocent Tauzeni - avatar
0
thanks brother
15th Jun 2017, 2:39 PM
Innocent Tauzeni
Innocent Tauzeni - avatar