new alk.overlay.TrafficIncidentPopup(opt_options)
This constructor creates a DOM element that will be displayed for an ALK supplied Traffic Incident in a map.
Option | Type | Description |
---|---|---|
trafficIncident |
alkx.TrafficIncidentSpec |
The Traffic Camera Spec. |
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.
-
listFormat{string}
-
This property contains the HTML string that has {{content}} string for form the list in the weather alert.
Methods
-
createContentElement(trafficIncident){Element}
-
This returns the div for the Traffic Camera
Name Type Description trafficIncident
alkx.TrafficIncidentSpec -
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.TrafficIncidentSpec -
setTrafficIncident(trafficIncidentSpec)
-
This method sets the traffic camera metadata for this popup.
Name Type Description trafficIncidentSpec
alkx.TrafficIncidentSpec The Traffic Camera.
Fires:
-
change:element
- Fires this event when changed.
-