new Overlay(options)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Overlay options.
|
Methods
-
getElement(){HTMLElement|undefined}
Overlay.js, line 223 -
Get the DOM element of this overlay.
Returns:
The Element containing the overlay.
-
getId(){number|string|undefined}
Overlay.js, line 232 -
Get the overlay identifier which is set on constructor.
Returns:
Id.
-
Get the map associated with this overlay.
Returns:
The map that the overlay is part of.
-
getOffset(){Array.<number>}
Overlay.js, line 255 -
Get the offset of this overlay.
Returns:
The offset.
-
Get the current position of this overlay.
Returns:
The spatial point that the overlay is anchored at.
-
Get the current positioning of this overlay.
Returns:
How the overlay is positioned relative to its point on the map.
-
setElement(element)
Overlay.js, line 357 -
Set the DOM element to be associated with this overlay.
Name Type Description element
HTMLElement | undefined The Element containing the overlay.
-
setMap(map)
Overlay.js, line 368 -
Set the map to be associated with this overlay.
Name Type Description map
module:ol/PluggableMap~PluggableMap | undefined The map that the overlay is part of.
-
setOffset(offset)
Overlay.js, line 378 -
Set the offset for this overlay.
Name Type Description offset
Array.<number> Offset.
-
setPosition(position)
Overlay.js, line 390 -
Set the position for this overlay. If the position is
undefined
the overlay is hidden.Name Type Description position
module:ol/coordinate~Coordinate | undefined The spatial point that the overlay is anchored at.
-
setPositioning(positioning)
Overlay.js, line 477 -
Set the positioning for this overlay.
Name Type Description positioning
module:ol/OverlayPositioning how the overlay is positioned relative to its point on the map.