new alk.overlay.WeatherAlertPopup(opt_options)
This constructor creates a popup overlay that displays ALK Weather Alert data.
Option | Type | Description |
---|---|---|
weatherAlert |
alkx.WeatherAlert |
The Weather Alert. |
id |
number | string | undefined |
Set the overlay id. The overlay id can be used with the
|
offset |
Array.<number> | undefined |
Offsets in pixels used when positioning the overlay. The first element in the
array is the horizontal offset. A positive value shifts the overlay right.
The second element in the array is the vertical offset. A positive value
shifts the overlay down. Default is |
position |
ol.Coordinate | undefined |
The overlay position in map projection. |
positioning |
ol.OverlayPositioning | string | undefined |
Defines how the overlay is actually positioned with respect to its |
stopEvent |
boolean | undefined |
Whether event propagation to the map viewport should be stopped. Default is
|
insertFirst |
boolean | undefined |
Whether the overlay is inserted first in the overlay container, or appended.
Default is |
autoPan |
boolean | undefined |
If set to |
autoPanAnimation |
olx.OverlayPanOptions | undefined |
The animation options used to pan the overlay into view. This animation
is only used when |
autoPanMargin |
number | undefined |
The margin (in pixels) between the overlay and the borders of the map when
autopanning. The default is |
Extends
- ol.Overlay
Members
-
closeElement{Element}
-
This property holds the close element.
-
elements{Array.<Array.<string>>}
-
This property holds the [class,label,alertkey] specifications for building the Weather Alert content. Each triple is given to
alk.overlay.WeatherAlertPopup#createElement
. -
itemFormat{string}
-
This parameter contains the HTML string that has {{class}}, {{label}}, and {{content}} strings to form a line in the Weather Alert.
-
listFormat{string}
-
This property contains the HTML string that has {{content}} string for form the list in the weather alert.
Methods
-
createContentElement(alert){Element}
-
This returns the div for the Weather Alert.
Name Type Description alert
alkx.WeatherAlert -
createItemHTML(format, klass, label, content){string}
-
This function returns the HTML string for a single Weather Alert Element.
Name Type Description format
string The format string that has {{class}}, {{label}}, and {{content}} strings.
klass
string The string with which to replace {{class}}.
label
string The string with which to replace {{label}}.
content
string The string with which to replace {{content}}.
-
createListHTML(format, klass, content){string}
-
This method returns the inner HTML, which is a list of items.
Name Type Description format
string The format of the list that contains {{class}} and {{content}}
klass
string The class of the list, if applicable.
content
string The HTML string of the list contents.
-
createPopupElement(alert){Object}
-
This creates the popup element.
Name Type Description alert
alkx.WeatherAlert -
setWeatherAlert(alert)
-
This method sets the weather alert for this popup.
Name Type Description alert
alkx.WeatherAlert The Weather Alert.
Fires:
-
change:element
- Fires this event when changed.
-