Weather Service example

The WeatherService can provide many pieces of information including current conditions and forecasts. Figure 5 shows the property sheet for a weather report (one locale under the weather service), with examples.

Figure 5. Example Weather Report property sheet


Example Weather Report property sheet

This information may be displayed on a graphic by creating a bound label that references the weather service and the applicable property. For example in this case, if you wanted to display the forecast for today, the referenced ord would be “station:│slot:/Services/WeatherService/Charlotte/day0”.

Note you could simply expand the WeatherService in the Nav tree to find this slot, and then drag it into the Px page, where the “Make Widget” wizard would automatically resolve to this ord. If the format Text is left at the default “%.%”, then the text values in appear in the graphic as shown in the second line in Figure 6.

Figure 6. Default BoundLabel Text to Weather Report’s “Today”


Default BoundLabel Text to Weather Report’s “Today”


Each of the properties of “Today” can be referenced individually in the format Text to control whether they appear, or to provide additional text and formatting. For example, setting the Text to the following:

 High %High.value% ˚F / Low %Low.value% ˚F / Precip %PrecipChance.value%%%

will result in the graphic displaying text as shown in the second line in Figure 7.

Figure 7. Example modified BoundLabel Text to Weather Report’s “Today”


Example modified BoundLabel Text to Weather Report’s “Today”


NoteIn order to display a “%” symbol, you must enter two percentage symbols, since they are used as delimiters in the format Text fields.