靜態unGet the current position of this overlay.
The spatial point that the overlay is anchored at.
Get the current positioning of this overlay.
How the overlay is positioned relative to its point on the map.
Set the map to be associated with this overlay.
The map that the overlay is part of.
Set the position for this overlay. If the position is undefined the
overlay is hidden.
The spatial point that the overlay is anchored at.
Set the positioning for this overlay.
how the overlay is positioned relative to its point on the map.
Listen for a certain type of event.
The event type or array of event types.
The listener function.
可選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.
Listen once for a certain type of event.
The event type or array of event types.
The listener function.
可選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.
函數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.
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);
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:
參數: options
Overlay options.
Api
stable