Overlay options.
An element to be displayed over the map and attached to a single map location. Like ol.control.Control, 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.
Example:
var popup = new ol.Overlay({
element: document.getElementById('popup')
});
popup.setPosition(coordinate);
map.addOverlay(popup);
stable
Get the current position of this overlay.
The spatial point that the overlay is anchored at.
stable
Get the current positioning of this overlay.
How the overlay is positioned relative to its point on the map.
stable
Listen for a certain type of event.
The event type or array of event types.
The listener function.
Optional
opt_this: ObjectThe object to use as this
in listener
.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
stable
Listen once for a certain type of event.
The event type or array of event types.
The listener function.
Optional
opt_this: ObjectThe object to use as this
in listener
.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
stable
Set the map to be associated with this overlay.
The map that the overlay is part of.
stable
Set the position for this overlay. If the position is undefined
the
overlay is hidden.
The spatial point that the overlay is anchored at.
stable
Set the positioning for this overlay.
how the overlay is positioned relative to its point on the map.
stable
Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).
Values.
Optional
opt_silent: booleanUpdate without triggering an event.
stable
Removes an event listener using the key returned by on()
or once()
.
Note that using the ol.Observable.unByKey static function is to
be preferred.
stable
Static
unGenerated using TypeDoc
Classdesc
An element to be displayed over the map and attached to a single map location. Like ol.control.Control, 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.
Example:
Param: options
Overlay options.
Api
stable