new ImageLayer(opt_options)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Layer options.
|
Fires:
-
change
(module:ol/events/Event~Event) - Generic change event. Triggered when the revision counter is increased. -
change:extent
(module:ol/Object.ObjectEvent) -
change:maxResolution
(module:ol/Object.ObjectEvent) -
change:minResolution
(module:ol/Object.ObjectEvent) -
change:opacity
(module:ol/Object.ObjectEvent) -
change:source
(module:ol/Object.ObjectEvent) -
change:visible
(module:ol/Object.ObjectEvent) -
change:zIndex
(module:ol/Object.ObjectEvent) -
postcompose
(module:ol/render/Event~RenderEvent) -
precompose
(module:ol/render/Event~RenderEvent) -
propertychange
(module:ol/Object.ObjectEvent) - Triggered when a property is changed. -
render
(module:ol/render/Event~RenderEvent) -
rendercomplete
(module:ol/render/Event~RenderEvent) - Triggered when rendering is complete, i.e. all sources and tiles have finished loading for the current viewport, and all tiles are faded in.
Extends
Observable Properties
Name | Type | Settable | ol/Object.ObjectEvent type | Description |
---|---|---|---|---|
extent |
module:ol/extent~Extent | undefined | yes | change:extent |
The layer extent. |
maxResolution |
number | yes | change:maxresolution |
The maximum resolution of the layer. |
minResolution |
number | yes | change:minresolution |
The minimum resolution of the layer. |
opacity |
number | yes | change:opacity |
The opacity of the layer. |
source |
module:ol/source/Source~Source | yes | change:source |
The layer source (or |
visible |
boolean | yes | change:visible |
The visibility of the layer. |
zIndex |
number | yes | change:zindex |
The Z-index of the layer. |
Methods
-
Return the associated
source
of the image layer.Returns:
Source.
-
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.
-
Set the layer source.
Name Type Description source
module:ol/source/Source~Source The layer source.