Classes
Type Definitions
-
Options{Object}
-
Properties:
Name Type Argument Default Description idnumber | string <optional>
Set the overlay id. The overlay id can be used with the
module:ol/Map~Map#getOverlayByIdmethod.elementHTMLElement <optional>
The overlay element.
offsetArray.<number> <optional>
[0, 0] 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.
positionmodule:ol/coordinate~Coordinate <optional>
The overlay position in map projection.
positioningmodule:ol/OverlayPositioning <optional>
'top-left' Defines how the overlay is actually positioned with respect to its
positionproperty. Possible values are'bottom-left','bottom-center','bottom-right','center-left','center-center','center-right','top-left','top-center', and'top-right'.stopEventboolean <optional>
true Whether event propagation to the map viewport should be stopped. If
truethe overlay is placed in the same container as that of the controls (CSS class nameol-overlaycontainer-stopevent); iffalseit is placed in the container with CSS class name specified by theclassNameproperty.insertFirstboolean <optional>
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
stopEventoption) you will probably setinsertFirsttotrueso the overlay is displayed below the controls.autoPanmodule:ol/Overlay~PanIntoViewOptions | boolean <optional>
false Pan the map when calling
setPosition, so that the overlay is entirely visible in the current viewport? Iftrue(deprecated), thenautoPanAnimationandautoPanMarginwill be used to determine the panning parameters; if an object is supplied then other parameters are ignored.autoPanAnimationmodule:ol/Overlay~PanOptions <optional>
The animation options used to pan the overlay into view. This animation is only used when
autoPanis enabled. Adurationandeasingmay be provided to customize the animation. Deprecated and ignored ifautoPanis supplied as an object.autoPanMarginnumber <optional>
20 The margin (in pixels) between the overlay and the borders of the map when autopanning. Deprecated and ignored if
autoPanis supplied as an object.autoPanOptionsmodule:ol/Overlay~PanIntoViewOptions <optional>
The options to use for the autoPan. This is only used when
autoPanis enabled and has preference over the individualautoPanMarginandautoPanOptions.classNamestring <optional>
'ol-overlay-container ol-selectable' CSS class name.
-
PanIntoViewOptions{Object}
-
Properties:
Name Type Argument Default Description animationmodule:ol/Overlay~PanOptions <optional>
{} The animation parameters for the pan
marginnumber <optional>
20 The margin (in pixels) between the overlay and the borders of the map when panning into view.
-
PanOptions{Object}
-
Properties:
Name Type Argument Default Description durationnumber <optional>
1000 The duration of the animation in milliseconds.
easingfunction <optional>
The easing function to use. Can be one from
module:ol/easingor a custom function. Default ismodule:ol/easing~inAndOut.
OpenLayers