靜態unSets the layer to be rendered on top of other layers on a map. The map will
not manage this layer in its layers collection, and the callback in
ol.Map#forEachLayerAtPixel will receive null as layer. This
is useful for temporary layers. To remove an unmanaged layer from the map,
use #setMap(null).
To add the layer to a map and have it managed by the map, use ol.Map#addLayer instead.
Map.
Set the extent at which the layer is visible. If undefined, the layer
will be visible at all extents.
The extent of the layer.
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.
Layer options.
Abstract base class; normally only used for creating subclasses and not instantiated in apps. A visual representation of raster or vector map data. Layers group together those properties that pertain to how the data is to be displayed, irrespective of the source of that data.
Layers are usually added to a map with ol.Map#addLayer. Components like ol.interaction.Select use unmanaged layers internally. These unmanaged layers are associated with the map using ol.layer.Layer#setMap instead.
A generic change event is fired when the state of the source changes.
Classdesc
Abstract base class; normally only used for creating subclasses and not instantiated in apps. A visual representation of raster or vector map data. Layers group together those properties that pertain to how the data is to be displayed, irrespective of the source of that data.
Layers are usually added to a map with ol.Map#addLayer. Components like ol.interaction.Select use unmanaged layers internally. These unmanaged layers are associated with the map using ol.layer.Layer#setMap instead.
A generic
changeevent is fired when the state of the source changes.Fires
ol.render.Event
參數: options
Layer options.
Api
stable