Class: Overlay

An element to be displayed over the map and attached to a single map
location. Like module:ol/control/Control~Control, module:ol/Overlay~Overlays are
visible widgets. Unlike Controls, they are not in a fixed position on the
screen, but are tied to a geographical coordinate, so panning the map will
move an Overlay but not a Control.

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.

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

stopEvent

boolean

true

Whether event propagation to the map
viewport should be stopped. 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 specified by the className property.

insertFirst

boolean

true

Whether the overlay is inserted first
in the overlay container, or appended. 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

false

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

autoPanAnimation

PanOptions

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

20

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