Share |

YoWindow weather widget parameters

YoWindow widget is highly customizable.
You can change its look and behavior by passing a number of parameters.
This is easy.
If you are a programmer you can use our JavaScript API to manipulate the widget.

The parameters (variables) are passed through "flashvar" parameter of Flash component.
The parameters must be divided by & symbol.
Example.
<param name="flashvars" value="location_id=gn:5128581&amp;time_format=12"/>

  • location_id
    An identifier of a location in Geonames data-base.
    Value format: gn:[geonames-id]
    You can find geonames-id for a location on this page.
    Example: location_id=gn:498817

    API: setLocationId(locationId:String)

  • lat and lon - latitude and longitude
    You can pass actual coordinates instead of location_id.
    Example, Prague coordinates: lat=505&lon=14.4&location_name=Prague

    API: not available yet

  • location_name
    Custom location name.
    Example: location_name=Emerald City


    API: setLocationName(name:String)

  • landscape
    Landscape id or URL.
    Available landscape ids:
    • village
    • seaside
    • airport
    When you pass a URL, make sure you point widget to .ywl file, but NOT to .png image.
    Example:
    landscape=seaside
    Example:
    landscape=http://landscape.yowindow.com/landscapes/colosseum/colosseum.ywl

    API: setLandscapeUrl(landscape:String)

  • moment
    Time navigation.
    Format: ISO 8601.
    YYYY-MM-DDThh:mm:ss[Z+-]hh:mm
    Z means GMT

    Example: time in GMT: moment=2011-03-29T21:29:56Z

    API: setMoment(isoTime:String)

    Use RsUtil.formatIsoDateAndTime(isoTime) function from RsUtil.js to convert JavaScript Date to isoTime format.
    http://js.yowindow.com/js/RsUtil.js

    Example: navigate to 15:30 of the current day.
    By default local time zone of the selected location used, but you can format isoTime with a desired time-zone if you need to.
    var time = new Date();
    time.setHours(15);
    time.setMinutes(30);
    var isoTime = RsUtil.formatIsoDateAndTime(time);
    yowidget.setMoment(isoTime);


  • lang
    Widget language id. Valid values: de, de-at, en, etc...
    Example: lang=ru

    No API.
  • time_format
    Values: 12|24
    Example: time_format=12

  • background
    Example: background=#FFFFFF

    The parameter affects the background of the area around the landscape (if there is any space) and location bar background.

  • text_color
    Example: text_color=#000000
    The parameter affects the color of the text in location-bar.

  • mini_temperature
    Values: [true, false]
    Show temperature.

  • mini_time
    Values: [true, false]
    Show time.

  • mini_locationBar
    Values: [true, false]
    Show Location Bar.

  • mini_momentBar
    Values: [true, false]
    Show Moment Bar.

  • forecast_provider
    Force weather forecast provider
    Available values:
    • yrno - yr.no weather forecast
    • nws - National Weather Service forecast (United States only)
    • owm - Open Weather Map - http://openweathermap.org/

  • current_weather_icao
    Force METAR station for the current weather Value is METAR station ICAO code
    Example: current_weather_icao=ULLI

    API: setCurrentWeatherIcao(icao:String)


  • current_weather_url
    URL to yowindow.xml file provided by Personal Weather Station (PWS).
    Please read display PWS weather inside YoWindow widget for the details.
    API: setCurrentWeatherUrl(url:String)

  • view_direction Value: [0..360]
    You may want to adjust this parameter to make YoWindow Widget look more similar to your window.

    view_direction is the angle where the observer looks at (where your window faces).
    0 - the user looks North
    90 - the user looks East
    180 - the user looks South

    This parameter will only impact wind direction animation in YoWindow (clouds motion direction, where rain or snow fall to, and the grass is leaning to).

    It does not affect the sun and the moon appearance and position.

    Pay attention that YoWindow is a 2 dimensional program.
    When the wind blows in your face, YoWindow will animate the grass and the clouds as though the wind blows from a side.

  • auto_update_weather [true, false]
    Default: true.
    If the weather is automatically updated.
    An option for PWS owners - set to false to avoid your server overload when the user left the page open.

    API: setAutoUpdateWeather(b:Boolean)

  • Units control

  • us - Unit system
    • metric - Metric
    • us - United States
    • uk - United Kingdom
    • russia - Russia

  • Example: us=metric

  • u_temperature - Temperature
    • f - Fahrenheit
    • c - Celsius

  • Example: u_temperature=c

  • u_wind_speed - Wind speed
    • mph - Mile per hour
    • kph - Kilometes per hour
    • mps - Meters per second
    • knot - Knots
    • beaufort - Beaufort scale

  • u_pressure - Pressure
    • mm - Millimeters
    • in - Inches
    • mbar - Millibar
    • kpa - Kilo Pascals
    • hpa - Hyper Pascals

  • u_pressure_level - Pressure measurement level
    • sea
    • location

  • u_distance - Distance
    • mile - Miles
    • km - Kilometers

  • u_rain_rate - Rain/Snow rate
    • in - Inches
    • mm - Millimeters
    • cm - Centimeters

  • API

    setUnitSystem(unitSystem:String)
    - unitSystem - unit system id from the table above.
    setUnit(aspect:String, unit:String)
    - aspect - name of a weather aspect from the table above. IMPORTANT: omit "u_" prefix. Instead of "u_pressure", pass "pressure".
    - unit - desired unit identifier
    Example: set temperature unit to Fahrenheit - yowidget.setUnit("temperature", "f");

    User Interface

  • ui_opacity
  • The percentage of User Interface opacity.
    Default value is 60.
    Increase the opacity to improve text readability in wide-screen mode.
    Example: ui_opacity=90

    API: setUiOpacity(percent:Number)
    Example: make UI 100% opaque yowidget.setUiOpacity(100);

    Inspector

    Show/hide inspector items. To show an item assign "1" or "true", to hide - "0" or "false"
    Example: hide pressure - i_pressure=0

  • i_location

  • i_weather
  • i_temperature
  • i_temperatureRange
  • i_skyImage
  • i_skyDescription
  • i_wind
  • i_pressure
  • i_humidity
  • i_dewPoint
  • i_feelsLike
  • i_precipitationChance
  • i_precipitationAmount
  • i_snowLevel
  • i_dailyRainTotal
  • i_uv
  • i_visibility
  • i_observeTime

  • i_astronomy
  • i_sunrise
  • i_sunset
  • i_dayLength
  • i_moonPhase

  • API: setInspectorItemVisible(id:String, visible:Boolean)
    - id - inspector item identifier from the table above.
    IMPORTANT: omit "i_" prefix. Instead of "i_astronomy", pass "astronomy".

    Example: display astronomy section -
    yowidget.setInspectorItemVisible("astronomy", true);
    Example: hide pressure -
    yowidget.setInspectorItemVisible("pressure", false);


    Forecast Panel

  • fp_expanded
  • Values: [true, false]
    Expand/collapse Forecast Panel.
    Example: fp_expanded=true - expand the panel

    API: setFpExpanded(b:Boolean)
    Example: expand the panel -
    yowidget.setFpExpanded(true);

  • fp_day_count
  • The number of days displayed in the Forecast Panel Example: fp_day_count=7 - display 7 days

    API: setFpDayCount(count:Number)
    Example: display 7 days -
    yowidget.setFpDayCount(7);


The list was originally composed by ikarus1969
weather forecast