You need to sign in to do that
Don't have an account?
KillerRamana Kumar
Personalization Dynamic Current Weather Widget
Hi Friends, Thanks in advance!
I want to create a Dynamic Current Weather Widget based on user Address.I have tried wunderground.com API & 'http://www.wunderground.com/weather/api/d/docs?d=resources/code-samples&MR=1 (http://www.wunderground.com/weather/api/d/docs?d=resources/code-samples&MR=1)' some other API's I have used But Iam unable to configure.I want the screen as like this
(Or)
I want to create a Dynamic Current Weather Widget based on user Address.I have tried wunderground.com API & 'http://www.wunderground.com/weather/api/d/docs?d=resources/code-samples&MR=1 (http://www.wunderground.com/weather/api/d/docs?d=resources/code-samples&MR=1)' some other API's I have used But Iam unable to configure.I want the screen as like this
(Or)
Thanks,
Karanraj
I want get it by using Developer API. To fetch Weather Forecast i have used following code
<apex:page standardController="Account">
<h3>Current Weather</h3>
<div id="current-weather"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script>
jQuery(document).ready(function($) {
$.ajax({
url : "http://api.wunderground.com/api/a0acd71c9fdb4095/conditions/q/CA/San_Francisco.json",
dataType : "jsonp",
success : function(parsed_json) {
var location = parsed_json['location']['city'];
var temp_f = parsed_json['current_observation']['temp_f'];
$("#current-weather").text("Current temperature in " + location + " is " + temp_f);
}
});
});
</script>
</apex:page>
-----
Using developer API i have created.
API: http://api.wunderground.com/api/a0acd71c9fdb4095/conditions/q/CA/San_Francisco.json
For country - {!user.country} . where can i add user name, State etc..in this url.