Written By: KiyoWxPolywarn Widget
Polywarn is one of AtmosphericX's most powerful features. It automatically generates alerts whenever a tracked node enters an event polygon.
This allows storm chasers and streamers to quickly see and display when they move into official weather products such as:
- Warnings
- Watches
- Advisories
- Statements
- Other polygon based alerts
Polywarn is particularly useful for live broadcasts, as it can notify both the chaser and their viewers the moment they enter a significant weather alert area.
See more on Location Tracking Nodes with Spotter Network and RealtimeIRL.
Parameter Rules
?is used when starting a query string in a URL.&is used to append additional parameters to an existing query string.trueorfalseshould be supplied depending on whether the parameter expects a boolean value.- All parameters are case sensitive meaning
setsearch != setSearch
Always follow the expected type and position of the parameter when constructing the widget settings.
Example URL: /widgets/example?setWidgetParameter1=value1&setWidgetParameter2=value2
Global Parameters
Below are default values that you can use with /widgets/polywarn. Visit Global Parameters to see a full list of all the global parameters. However setElementThemed is forced to false.
setAnimationStartDuration
- Default (
float):3 - Example:
/widgets/polywarn?setAnimationStartDuration=1.0
setAnimationEndDuration
- Default (
float):3 - Example:
/widgets/polywarn?setAnimationEndDuration=0.5
setAnimationHasEnding
- Default (
boolean):true - Example:
/widgets/polywarn?setAnimationHasEnding=true/false
setAnimatedDelayEnding
- Default (
int):5 - Example:
/widgets/polywarn?setAnimatedDelayEnding=10
setTextCharacterLimit
- Default (
int):125 - Example:
/widgets/polywarn?setTextCharacterLimit=100
setValuePath
- Default (
string/path/null):%properties.event% - Example:
/widgets/polywarn?setValuePath=%properties.event%
setValuePathSecondary
- Default (
string/path/null):Issued at %properties.issued% - Example:
/widgets/polywarn?setValuePathSecondary=Issued at %properties.issued%
setValuePath Tips
Please see Understanding setValuePath to understand how this works. You can also use the /data endpoint which is listed under the RESTful API guide on what type of values you can get.
Local Parameters
Below are default / optional parameters you can use with the polywarn widget. Please be sure to follow the default value type convention.
setSfx
- Description: The sound that is played during the event.
- Default (
string/path/null):/sfx/dash_sfx/boom3.mp3 - Example:
/widgets/polywarn?setSfx=/sfx/dash_sfx/boom2.mp3
setAwaitPeriod
- Description: How long after the last polywarn event playback you should wait in seconds for the next one to play.
- Default (
int):20 - Example:
/widgets/polywarn?setAwaitPeriod=15
setSearch
- Description: What tracker node you want to use. (See: Location Tracking Nodes)
- Default (
string/null):null - Example:
/widgets/polywarn?setSearch=First Last Name
Examples
Example 1
Use the theme color for the event text color and use the boom2 sfx sound effect.
/widgets/polywarn?setSfx=/sfx/dash_sfx/boom2.mp3&setTextThemed=trueExample 2
Use a custom animation duration with a subtitle showing the locations impacted rather than the issued date.
/widgets/polywarn?setAnimationStartDuration=5.0&setAnimationEndDuration=2.0&setValuePathSecondary=Locations impacted: %properties.locations%Example 3
Set the tracking node to John Doe so we can easily get polywarn updates from them
/widgets/polywarn?setSearch=John Doe