i am using the open weather map api webservice to make an ajax call inorder to get the current weather using the latitude and longitude the problem is the same call works in my normal php folder but it doesnt work in my phongap app. My ajax call is as shown below
$.ajax({
type : "GET",
dataType: "jsonp",
url : "http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139",
}).done( function(msg){
var response = JSON.stringify(msg);
var parsedResponse = JSON.parse(response);
alert(parsedResponse.main.temp_min);
});
});
I have tried without dataType: "jsonp"
tried changing it to "json"
but nothing works at all. Please help me as I am stuck on this currently.