Fires:
Methods
-
Get the layer source.
Returns:
The layer source (ornull
if not yet set).
-
setMap(map)
layer/Layer.js, line 178 -
Sets 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
module:ol/Map#forEachLayerAtPixel
will receivenull
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
module:ol/Map#addLayer
instead.Name Type Description map
module:ol/PluggableMap~PluggableMap Map.
-
setSource(source)
layer/Layer.js, line 209 -
Set the layer source.
Name Type Description source
module:ol/source/Source~Source The layer source.