Visitors

myspace visitor tracker

Support WS4GL

Widgets‎ > ‎

WeatherBug Widgets

If you want to have your local weather with Widgets, you can download one of the Widgets available and edit it using any text editor to put your city code or your zip code if you live in the U.S.A.

For example, in the Los Angeles Widget:

<?xml version="1.0" encoding="utf-8"?>
<ws4gl updatefrequency="60" width="320" height="100" bgalpha="#00" bgcolor="#0000ff" xmldataurl="http://api.wxbug.net/getLiveWeatherRSS.aspx?ACode=A6453888564&amp;zipcode=90001&amp;unittype=0&amp;outputType=1">
    <name>WeatherBug - Los Angeles</name>
    <description>Get current weather for Los Angeles</description>
        <author>Patrick Balleux</author>
    <image url="[aws:weather.aws:ob.aws:current-condition.icon]" x="0" y="0" width="100" height="100" />
    <image url="http://www.ws4gl.org/SPBugIcon3.gif" x="0" y="0" width="33" height="34" />
    <text x="103" y="18" fontsize="20" color="#000000" fontname="Monospaced" bold="true" italic="false">[aws:weather.aws:ob.aws:city-state]</text>
    <text x="105" y="20" fontsize="20" color="#ffffff" fontname="Monospaced" bold="true" italic="false">[aws:weather.aws:ob.aws:city-state]</text>
    <text x="103" y="38" fontsize="18" color="#000000" fontname="Monospaced" bold="false" italic="false">[aws:weather.aws:ob.aws:current-condition]</text>
    <text x="105" y="40" fontsize="18" color="#ffffaa" fontname="Monospaced" bold="false" italic="false">[aws:weather.aws:ob.aws:current-condition]</text>
    <text x="103" y="58" fontsize="18" color="#000000" fontname="Monospaced" bold="false" italic="false">Temp: [aws:weather.aws:ob.aws:temp] F</text>
    <text x="105" y="60" fontsize="18" color="#ffffaa" fontname="Monospaced" bold="false" italic="false">Temp: [aws:weather.aws:ob.aws:temp] F</text>
    <text x="103" y="78" fontsize="18" color="#000000" fontname="Monospaced" bold="false" italic="false">Wind: [aws:weather.aws:ob.aws:wind-speed] [aws:weather.aws:ob.aws:wind-speed.units]</text>
    <text x="105" y="80" fontsize="18" color="#ffffaa" fontname="Monospaced" bold="false" italic="false">Wind: [aws:weather.aws:ob.aws:wind-speed] [aws:weather.aws:ob.aws:wind-speed.units]</text>
   
</ws4gl>

Look at the xmldataurl attribute, the URL get the info for the zipcode 90001, simply put your own zipcode in there, and load the Widget from your harddrive.  Zipcode will only work for USA town.

If you live outside the USA, as I do, then you have to use the citycode

The URL for Montreal is like this: xmldataurl="http://api.wxbug.net/getLiveWeatherRSS.aspx?ACode=A6453888564&amp;citycode=54231&amp;unittype=1&amp;outputType=1

To find your citycode, go on the WeatherBug site, enter your city name here, and click the Get City Code button.  This will open an XML file in a new page, and you'll be able to get the city code that you're looking for from that file.

WeatherBug City Code Search


Note: The attribute unittype means 0=English System, 1=Metric System

Sign in  |  Recent Site Activity  |  Terms  |  Report Abuse  |  Print page  |  Powered by Google Sites