new alk.source.WeatherAlertsSource(opt_options)
This constructor creates a Source object for Weather Alerts data.
Option | Type | Description |
---|---|---|
weatherAlertsService |
alk.service.WeatherAlertsService | undefined |
This option supplies the WeatherAlertsService to use within this source. This option is mutually exclusive with the weatherAlertsServiceOptions options. |
weatherAlertsServiceOptions |
alkx.WeatherAlertsServiceOptions | undefined |
This option supplies the properties with which to create this source's
internal |
polygonsCountyCache |
alk.source.PolygonsCountyCache | undefined |
This option supplies the cache for county polygons. If this option is undefined, then one is created with the polygonsCountyCacheOptions option. This option provides the ability to reuse the cache or replace it with a preloaded one. |
polygonsCountyCacheOptions |
alkx.PolygonsCountyCacheOptions | undefined |
This option is used to create a cache for county polygons. If the
polygonsCountyCache option is undefined, this source creates
|
attributions |
ol.AttributionLike | undefined |
This option is an OpenLayers option passed to the Attributions. |
cacheSize |
number | undefined |
This option is an OpenLayers option passed to the Cache size. Default is 2048. |
extent |
ol.Extent | undefined |
This option is an OpenLayers option passed to the It contains the map extent in which the source is relevant. |
crossOrigin |
null | string | undefined |
This option is an OpenLayers option passed to the The crossOrigin attribute for loaded images. Note that you must provide a
|
opaque |
boolean | undefined |
This option is an OpenLayers option passed to the Whether the layer is opaque. |
maxZoom |
number | undefined |
This option is an OpenLayers option passed to the Optional maximum zoom level. Default is 20 (ALK specific). |
reprojectionErrorThreshold |
number | undefined |
This option is an OpenLayers option passed to the Maximum allowed reprojection error (in pixels). Default is 0.5. Higher values may increase reprojection performance, but decrease precision. |
wrapX |
boolean | undefined |
This option is an OpenLayers option passed to the Whether to wrap the world horizontally. The default, |
Extends
- ol.source.Vector
Methods
-
changeWeatherAlertsService(options)
-
This method causes an entire refresh of this source. It does this by creating a new WeatherAlertsService from the old one with the extended options.
Option Type Description apiKey
string This option contains the ALK ApiKey that gives you permission to extract data from ALK Servers.
dataset
alk.val.Dataset | number | string The option contains the Dataset parameter for the Service. This option specifies an area dataset that may be pertinent to the request.
region
alk.val.Region | number | string This option tells the service in which region the retrieved data is to pertain. Some ALK Services switch underlying services due to this option. For instance, traffic data for North America and Europe may come from different underlying services.
srs
alk.val.SRS | number | string This option tells the service the particular projection that is used any GIS data given to the service.
hostURL
string This option contains the the host and port URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.
path
string This option is the path part of the URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.
pt1
Array.<number> | string This option pertains to only those services that return single images where the options pt1 and pt2 represent the NorthWest and SouthEast coordinates,respectively. This option holds the NorthWest coordinate.
pt2
Array.<number> | string | undefined This option pertains to only those services that return single images where the options pt1 and pt2 represent the NorthWest and SouthEast coordinates,respectively. This option holds the SouthEast coordinate.
point
Array.<number> | string TODO: What does point mean for WeatherAlerts.
urgency
alk.val.Urgency | number | string This option specifies a search filter on the Urgency. Default is
alk.val.Urgency.All
.severity
alk.val.Severity | number | string This option specifies a search filter on the Severity. Default is
alk.val.Severity.All
.certainty
alk.val.Certainty | number | string This option specifies a search filter on the Certainty. Default is
alk.val.Certainty.All
.eventNames
Array.<string> | string This option specifies a search filter on the event names, such as ["Winter Storm Warning", "Flood Watch"].
startTime
string The time after which to search for weather alerts. Use standard formats such as ISO8601("2015-08-29T13:45:30-07:00") or RFC1123("Sat, 29 Aug 2015 20:45:30 GMT").
endTime
string The time before which to search for weather alerts. Use standard formats such as ISO8601("2015-08-29T13:45:30-07:00") or RFC1123("Sat, 29 Aug 2015 20:45:30 GMT").
-
getWeatherAlerts(){Array.<alkx.WeatherAlert>}
-
This function returns the current state of weather alerts received by this source. This function just returns the associated weather alert with each feature currently residing in this source.
NOTE
This returns the immediate current state of the source. If the source is in the process of updating, which could be from user interaction, such as a zoom in or out, the result may not be stable.
One may wait until the source's state, i.e.
getState
, is in the ol.source.State.READY state, as opposed to ol.source.State.LOADING. However, that condition is not really guaranteed at any given point in time, unless other precautions are taken.If one desires a more stable result, use the
alk.service.WeatherAlertsService#get
call with a specific pt1 and pt2 parameters defining the desired extent. -
getWeatherAlertsService(){alk.service.WeatherAlertsService}
-
-
removeAllFeatures(features)
-
This method removes all features from this source.
Name Type Description features
Array.<ol.Feature> -
setWeatherAlertsService(service)
-
Name Type Description service
alk.service.WeatherAlertsService