Class: WeatherAlertsJSON

alk.format.WeatherAlertsJSON

An instance of this class provides a format for reading and writing Weather Alert JSON. See pcmws.api.WeatherAlert.

new alk.format.WeatherAlertsJSON(opt_options)

This constructor creates a Format object with which to parse and decode ALK Weather Alert data.

Features with Polygon geometries are generated based on the data and are given FeatureIds ol.Feature#getId based on the string of each object. With this id, the vector source will not add new features with the same id, thereby eliminating duplicates.

If the optional HashedIdFactory is not replaced, a FnVA32 hash algorithm creates the feature Id based on the entire stringified version of the JSON object for each POI. The chances for collision is 1:2^32.

If a strict adherence to uniqueness is absolutely needed, the idFactory may be replaced with the options.idFactory.

Option Type Description
idFactory alk.format.HashedIdFactory | undefined

This option allows the replacement of the default hashed id factory used by this format. The default is alk.format.HashedIdFactory without hash collision checking.

polygonsCountyCache alk.source.PolygonsCountyCache | undefined

This option alk.source.PolygonsCountyCache for Weather Alerts that do not have polygons.

defaultDataProjection ol.ProjectionLike | undefined

Default data projection. Default is EPSG:4326.

featureProjection ol.ProjectionLike | undefined

Projection for features read or written by the format. Options passed to read or write methods will take precedence.

Extends