ALKMaps.Layer.WeatherAlerts (Leaflet)

The ALKMaps weather alerts layer.

Inherits from

  • <L.Class>
Summary
ALKMaps.Layer.WeatherAlerts (Leaflet)The ALKMaps weather alerts layer.
Properties
alertFilters{Object} Use this to override default weather alert filters.
Constructor
L.ALKMaps.Layer.WeatherAlertsInitializes a new L.ALKMaps.Layer.WeatherAlerts object
Functions
addAlertsAdd alerts to this layer.
removeAlertsRemove all alerts layers.
getAlertsGets alerts for the view-port.
getAlertFiltersGets alert filters.
setAlertFiltersUpdates all alert filter items at once.
redrawRedraws alerts on the layer.
weatherAlertsCreate a new ALKMaps.Layer.WeatherAlerts instance

Properties

alertFilters

{Object} Use this to override default weather alert filters.  Like {urgency: “All”, severity: “All”, certainty: “All”, eventNames: [“Winter Storm Warning”, “Flood Watch”], startTime: “2015-08-29T13:45:30-07:00”, endTime: “2015-08-31T13:45:30-07:00”}.  Available values for “severity” are “All”, “Extreme”, “Severe”, “Moderate”, “Minor”, “Unknown”.  Available values for “urgency” are “All”, “Immediate”, “Expected”, “Future”, “Past”, “Unknown”.  Available values for “certainty” are “All”, “Observed”, “Likely”, “Possible”, “Unlikely”, “Unknown”.  Available values for “eventNames” are array of event names such as [“Winter Storm Warning”, “Flood Watch”].  For “startTime” use standard formats such as ISO8601(“2015-08-29T13:45:30-07:00”) or RFC1123(“Sat, 29 Aug 2015 20:45:30 GMT”).  For “endTime” use standard formats such as ISO8601(“2015-08-29T13:45:30-07:00”) or RFC1123(“Sat, 29 Aug 2015 20:45:30 GMT”).

Constructor

L.ALKMaps.Layer.WeatherAlerts

Initializes a new L.ALKMaps.Layer.WeatherAlerts object

Parameters

geoJson{String} Weather alerts in GeoJson format.
options{Object} Are style function, onEachFeature function, filter function, alertFilters property

Functions

addAlerts

addAlerts: function()

Add alerts to this layer.

removeAlerts

removeAlerts: function()

Remove all alerts layers.

getAlerts

getAlerts: function()

Gets alerts for the view-port.

getAlertFilters

getAlertFilters: function()

Gets alert filters.

setAlertFilters

setAlertFilters: function(filter)

Updates all alert filter items at once.

redraw

redraw: function()

Redraws alerts on the layer.  One use case can be filters are updated first, then redraw the alerts.

weatherAlerts

layer.weatherAlerts = function()

Create a new ALKMaps.Layer.WeatherAlerts instance

Parameters

var weatherAlertLayer = L.ALKMaps.Layer.weatherAlerts();
weatherAlertLayer.addTo(map).addAlerts();

Returns

{Object} An instance of L.ALKMaps.Layer.WeatherAlerts

addAlerts: function()
Add alerts to this layer.
removeAlerts: function()
Remove all alerts layers.
getAlerts: function()
Gets alerts for the view-port.
getAlertFilters: function()
Gets alert filters.
setAlertFilters: function(filter)
Updates all alert filter items at once.
redraw: function()
Redraws alerts on the layer.
layer.weatherAlerts = function()
Create a new ALKMaps.Layer.WeatherAlerts instance
Close