Class: ImageVector

ol.source.ImageVector

An image source whose images are canvas elements into which vector features read from a vector source (ol.source.Vector) are drawn. An ol.source.ImageVector object is to be used as the source of an image layer (ol.layer.Image). Image layers are rotated, scaled, and translated, as opposed to being re-rendered, during animations and interactions. So, like any other image layer, an image layer configured with an ol.source.ImageVector will exhibit this behaviour. This is in contrast to a vector layer, where vector features are re-drawn during animations and interactions.

new ol.source.ImageVector(options) experimental

Name Type Description
options

Options.

Name Type Description
attributions Array.<ol.Attribution> | undefined experimental

Attributions.

logo string | olx.LogoOptions | undefined experimental

Logo.

projection ol.proj.ProjectionLike experimental

Projection.

ratio number | undefined experimental

Ratio. 1 means canvases are the size of the map viewport, 2 means twice the size of the map viewport, and so on. Default is 1.5.

resolutions Array.<number> | undefined experimental

Resolutions. If specified, new canvases will be created for these resolutions only.

source ol.source.Vector experimental

The vector source from which the vector features drawn in canvas elements are read.

style ol.style.Style | Array.<ol.style.Style> | ol.style.StyleFunction | undefined experimental

Style to use when rendering features to the canvas.

Fires:
  • change experimental - Triggered when the state of the source changes.

Extends

Methods

dispatchChangeEvent() inherited experimental

Dispatches a change event.

Fires:
  • change experimental
Returns:
Attributions.
Returns:
Logo.
Returns:
Projection.

getRevision(){number} inherited experimental

Returns:
Revision.
Returns:
Source.
Returns:
State.

on(type, listener, opt_this){goog.events.Key} inherited

Listen for a certain type of event.

Name Type Description
type string | Array.<string>

The event type or array of event types.

listener function

The listener function.

this Object

The object to use as this in listener.

Returns:
Unique key for the listener.

once(type, listener, opt_this){goog.events.Key} inherited

Listen once for a certain type of event.

Name Type Description
type string | Array.<string>

The event type or array of event types.

listener function

The listener function.

this Object

The object to use as this in listener.

Returns:
Unique key for the listener.

un(type, listener, opt_this) inherited

Unlisten for a certain type of event.

Name Type Description
type string | Array.<string>

The event type or array of event types.

listener function

The listener function.

this Object

The object which was used as this by the listener.

Removes an event listener using the key returned by on() or once().

Name Type Description
key goog.events.Key

Key.