Class: PolygonWeatherAlertsLayerStyle

alk.style.PolygonWeatherAlertsLayerStyle

An instance of this class provides a ol.style.StyleFunction for the alk.layer.WeatherAlertsLayer that styles polygons according to the WeatherAlert.AlertEvent property using alk.val.WeatherAlertColor.

new alk.style.PolygonWeatherAlertsLayerStyle(opt_options)

This constructor creates a Style Function for the Weather Alerts layer.

Name Type Description
options Object

Extends

Methods

styleFunction(feature, resolution){Array.<ol.style.Style>}

This function returns the style for only WeatherAlert features. The feature must have the 'weatherAlert' property and have a suitable polygon or collection of polygons geometries. Geometries may be updated asynchronously.

The styles are generated using the colors from alk.val.WeatherAlertColor. The styles consist of only Fill styles with an opacity set to 0.2 of the designated color.

If the feature is a WeatherAlert feature and does not have an associated color in the color map, the set default style is used.

Name Type Description
feature ol.Feature

The feature, which should have the 'weatherAlert' property.

resolution number

The resolution of the zoom. Ignored.