Weather Alerts

The ALKMaps.Layer.WeatherAlerts layer can be used to display weather alerts data provided by the National Weather Service.

By default the layer is displayed along with two controls. The first is the ALKMaps.Control.WeatherAlertLegend control, which is used to display the type of weather alert associated with each color according to the National Weather Service. The second control is ALKMaps.Control.WeatherAlertOption, this control provides a graphical user interface allowing the user to filter weather alerts by severity, urgency, certainty, and alert event names.



The WeatherAlerts layer takes to parameters, the first being a string containing the name of your layer and the second is an optional options object. The possible options are layed out in the table below. Although the ALKMaps.Control.WeatherAlertOption control allows you to filter out weather alerts on the fly, you also have the option of filtering out what weather alerts are dispayed when defining your Weather Alerts layer. The alertFilters property of the options object has urgency, severity, certainty, and eventNames properties for filtering according to the same criteria as the control, or all alerts will be displayed if nothing is specified. This allows you to still have the option of filtering if you choose not to display the control(s), or can simply help eliminate irrelevant data that you don't want the user to see.

Parameter Type Description/Values
alertFilters Object
Property Type Values
urgency String [All | Extreme | Severe | Moderate | Minor | Unknown]

Default: All
severity String [All | Immediate | Expected | Future | Past | Unknown]

Default: All
certainty String [All | Observed | Likely | Possible | Unlikely | Unknown]

Default: All
eventNames Array of String Such as ["Winter Storm Warning", "Flood Watch"]
Weather alert events with exact matching names will be returned.

Default: NULL
This filter will be ignored. All available matching events will be returned. Note: A complete list of event names can be found in the box below this table.
startTime String Start time used for filtering out weather alerts with earlier expiration dates/times.
Use standard formats such as ISO8601("2015-08-29T13:45:30-07:00") or RFC1123("Sat, 29 Aug 2015 20:45:30 GMT").

Default: NULL
endTime String End time used for filtering out weather alerts with later effective dates/times.
Use standard formats such as ISO8601("2015-08-29T13:45:30-07:00") or RFC1123("Sat, 29 Aug 2015 20:45:30 GMT").

Default: NULL
legendDisplayClass String Name of custom css class for the Weather Alert Legend control
optionDisplayClass String Name of custom css class for the Weather Alert Option control
legendControlVisible Boolean If it is false, the control will always be hidden.

Default: true
optionControlVisible Boolean If it is false, the control will always be hidden.

Default: true
externalDivForLegend DOMElement External div element to be used for the Weather Alert Legend control.
externalDivForOption DOMElement External div element to be used for the Weather Alert Option control.
onErrorCallback Function Callback function triggered on service error.

For a more detailed explaination on how to customize the ALKMaps.Control.WeatherAlertLegend and ALKMaps.Control.WeatherAlertOption controls, please visit the Weather Alerts example page and view the source code.

Alert Event Names:
"911 Telephone Outage" | "Administrative Message" | "Air Quality Alert" | "Air Stagnation Advisory" | "Arroyo and Small Stream Flood Advisory" | "Ashfall Advisory" | "Ashfall Warning" | "Avalanche Advisory" | "Avalanche Warning" | "Avalanche Watch" | "Beach Hazards Statement" | "Blizzard Warning" | "Blizzard Watch" | "Blowing Dust Advisory" | "Brisk Wind Advisory" | "Child Abduction Emergency" | "Civil Danger Warning" | "Civil Emergency Message" | "Coastal Flood Advisory" | "Coastal Flood Statement" | "Coastal Flood Warning" | "Coastal Flood Watch" | "Dense Fog Advisory" | "Dense Smoke Advisory" | "Dust Storm Warning" | "Earthquake Warning" | "Evacuation - Immediate" | "Excessive Heat Warning" | "Excessive Heat Watch" | "Extreme Cold Warning" | "Extreme Cold Watch" | "Extreme Fire Danger" | "Extreme Wind Warning" | "Fire Warning" | "Fire Weather Watch" | "Flash Flood Statement" | "Flash Flood Warning" | "Flash Flood Watch" | "Flood Advisory" | "Flood Statement" | "Flood Warning" | "Flood Watch" | "Freeze Warning" | "Freeze Watch" | "Freezing Fog Advisory" | "Freezing Rain Advisory" | "Freezing Spray Advisory" | "Frost Advisory" | "Gale Warning" | "Gale Watch" | "Hard Freeze Warning" | "Hazardous Materials Warning" | "Hazardous Seas Warning" | "Hazardous Seas Watch" | "Hazardous Weather Outlook" | "Heat Advisory" | "Heavy Freezing Spray Warning" | "Heavy Freezing Spray Watch" | "High Surf Advisory" | "High Surf Warning" | "High Wind Warning" | "High Wind Watch" | "Hurricane Force Wind Warning" | "Hurricane Force Wind Watch" | "Hurricane Local Statement" | "Hurricane Warning" | "Hurricane Watch" | "Hydrologic Advisory" | "Hydrologic Outlook" | "Ice Storm Warning" | "Lake Effect Snow Advisory" | "Lake Effect Snow Warning" | "Lake Effect Snow Watch" | "Lake Wind Advisory" | "Lakeshore Flood Advisory" | "Lakeshore Flood Statement" | "Lakeshore Flood Warning" | "Lakeshore Flood Watch" | "Law Enforcement Warning" | "Local Area Emergency" | "Low Water Advisory" | "Marine Weather Statement" | "Nuclear Power Plant Warning" | "Radiological Hazard Warning" | "Red Flag Warning" | "Rip Current Statement" | "Severe Thunderstorm Warning" | "Severe Thunderstorm Watch" | "Severe Weather Statement" | "Shelter In Place Warning" | "Short Term Forecast" | "Small Craft Advisory" | "Small Craft Advisory For Hazardous Seas" | "Small Craft Advisory For Rough Bar" | "Small Craft Advisory For Winds" | "Small Stream Flood Advisory" | "Special Marine Warning" | "Special Weather Statement" | "Storm Warning" | "Storm Watch" | "Test" | "Tornado Warning" | "Tornado Watch" | "Tropical Depression Local Statement" | "Tropical Storm Local Statement" | "Tropical Storm Warning" | "Tropical Storm Watch" | "Tsunami Advisory" | "Tsunami Warning" | "Tsunami Watch" | "Typhoon Local Statement" | "Typhoon Warning" | "Typhoon Watch" | "Urban and Small Stream Flood Advisory" | "Volcano Warning" | "Wind Advisory" | "Wind Chill Advisory" | "Wind Chill Warning" | "Wind Chill Watch" | "Winter Storm Warning" | "Winter Storm Watch" | "Winter Weather Advisory"