This webpart uses the current logged in user to get location information from the User Profile Service and then displays the weather for the users location. In order for this to work properly you will need to provide the correct profile attributes since everyone's environment is a bit different.  Right now the webpart looks for a profile property called "City" and "Country".  If these do not exist in your UPS you will need to modify and rebuild the webpart or add them to your UPS.

Therefor I am offering this code as a starting point for you to modify so that you do not need to reinvent the wheel. This webpart will not work out of the box for most people so this is more of a developer's webpart than an end-user's if you do not know what profile properties you have.

Last edited Aug 1, 2012 at 6:18 PM by jkuter, version 3