I'm Using this plugin: Simple Weather on my site to get the weather tied into a simple widget I'm building.
All I need to do is display a more in depth location from the postcode. Currently, if I console log the 'result' object in it's source code, I only have three options for location.
In the each function from the plugin, I have added this:
console.log(result);
Within this big object, I can see a location object, which has these values:
location: Object
city: "Sydney"
country: "AS"
region: ""
I'd like it if I could get the state, PROPER suburb/city, postcode. Current'y I have entered in a postcode of 2250 for Australia, Sydney is NOT the city for that postcode.
Is there's something I can add in to retrieve this data?
Here's what I'm using to instantiate simple weather.
$.simpleWeather({
zipcode: '2250', //Gosford
//woeid: '2357536',
location: 'Australia',
unit: 'c',
success: function(weather) {
$('#imageThumbnail').html('<img src="'+weather.image+'" width="110" >');
$('#degree .degree').html(weather.temp+'° ');
$('.minmax .min').html('MIN: '+weather.low+'°' + weather.units.temp);
$('.minmax .max').html('MAX: '+weather.high+'°' + weather.units.temp);
$(".weather .content").slideDown().closest('.weather').find('.loading').remove();
},
error: function(error) {
$(".weather").html('<p>'+error+'</p>');
}
});
$.simpleWeather({...});
? – Simon C