Class: SingleSearchItemPopup

alk.overlay.SingleSearchItemPopup

An instance of this class provides an overlay on the map that will show a SingleSearchItemPopup. It creates the following structure in the DOM.

new alk.overlay.SingleSearchItemPopup(opt_options)

This constructor creates a Popup Overlay for an item from the ALK Single Search Service.

Option Type Description
singleSearchItemPopup alkx.SingleSearchLocation

The Single Search Location.

id number | string | undefined

Set the overlay id. The overlay id can be used with the ol.Map#getOverlayById method.

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 [0, 0].

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 position property. Possible values are 'bottom-left', 'bottom-center', 'bottom-right', 'center-left', 'center-center', 'center-right', 'top-left', 'top-center', and 'top-right'. Default is 'top-left'.

stopEvent boolean | undefined

Whether event propagation to the map viewport should be stopped. Default is true. If true the overlay is placed in the same container as that of the controls (CSS class name ol-overlaycontainer-stopevent); if false it is placed in the container with CSS class name ol-overlaycontainer.

insertFirst boolean | undefined

Whether the overlay is inserted first in the overlay container, or appended. Default is true. If the overlay is placed in the same container as that of the controls (see the stopEvent option) you will probably set insertFirst to true so the overlay is displayed below the controls.

autoPan boolean | undefined

If set to true the map is panned when calling setPosition, so that the overlay is entirely visible in the current viewport. The default is false.

autoPanAnimation olx.OverlayPanOptions | undefined

The animation options used to pan the overlay into view. This animation is only used when autoPan is enabled. A duration and easing may be provided to customize the animation.

autoPanMargin number | undefined

The margin (in pixels) between the overlay and the borders of the map when autopanning. The default is 20.

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.

Methods

createContentElement(location){Element}

This returns the div for the Single Search Item

Name Type Description
location alkx.SingleSearchLocation

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.SingleSearchLocation

setSingleSearchItemPopup(singleSearchItemPopupSpec)

This method sets the traffic camera metadata for this popup.

Name Type Description
singleSearchItemPopupSpec alkx.SingleSearchLocation

The Traffic Camera.

Fires:
change:element
Fires this event when changed.