Class: Immediate

ol.render.canvas. Immediate

Name Type Description
context CanvasRenderingContext2D

Context.

pixelRatio number

Pixel ratio.

extent ol.Extent

Extent.

transform goog.vec.Mat4.Number

Transform.

viewRotation number

View rotation.

Extends

Methods

experimental drawAsync(zIndex, callback)

Register a function to be called for rendering at a given zIndex. The function will be called asynchronously. The callback will receive a reference to ol.render.canvas.Immediate context for drawing.

Name Type Description
zIndex number

Z index.

callback function

Callback.

experimental drawCircleGeometry(circleGeometry, data)

Render a circle geometry into the canvas. Rendering is immediate and uses the current fill and stroke styles.

Name Type Description
circleGeometry ol.geom.Circle

Circle geometry.

data Object

Opaque data object,

experimental drawFeature(feature, style)

Render a feature into the canvas. In order to respect the zIndex of the style this method draws asynchronously and thus after calls to drawXxxxGeometry have been finished, effectively drawing the feature on top of everything else. You probably should be using ol.FeatureOverlay instead of calling this method directly.

Name Type Description
feature ol.Feature

Feature.

style ol.style.Style

Style.

experimental drawLineStringGeometry(lineStringGeometry, data)

Render a LineString into the canvas. Rendering is immediate and uses the current style.

Name Type Description
lineStringGeometry ol.geom.LineString

Line string geometry.

data Object

Opaque data object.

experimental drawMultiLineStringGeometry(multiLineStringGeometry, data)

Render a MultiLineString geometry into the canvas. Rendering is immediate and uses the current style.

Name Type Description
multiLineStringGeometry ol.geom.MultiLineString

MultiLineString geometry.

data Object

Opaque data object.

experimental drawMultiPointGeometry(multiPointGeometry, data)

Render a MultiPoint geometry into the canvas. Rendering is immediate and uses the current style.

Name Type Description
multiPointGeometry ol.geom.MultiPoint

MultiPoint geometry.

data Object

Opaque data object.

experimental drawMultiPolygonGeometry(multiPolygonGeometry, data)

Render MultiPolygon geometry into the canvas. Rendering is immediate and uses the current style.

Name Type Description
multiPolygonGeometry ol.geom.MultiPolygon

MultiPolygon geometry.

data Object

Opaque data object.

experimental drawPointGeometry(pointGeometry, data)

Render a Point geometry into the canvas. Rendering is immediate and uses the current style.

Name Type Description
pointGeometry ol.geom.Point

Point geometry.

data Object

Opaque data object.

experimental drawPolygonGeometry(polygonGeometry, data)

Render a Polygon geometry into the canvas. Rendering is immediate and uses the current style.

Name Type Description
polygonGeometry ol.geom.Polygon

Polygon geometry.

data Object

Opaque data object.

experimental setFillStrokeStyle(fillStyle, strokeStyle)

Set the fill and stroke style for subsequent draw operations. To clear either fill or stroke styles, pass null for the appropriate parameter.

Name Type Description
fillStyle ol.style.Fill

Fill style.

strokeStyle ol.style.Stroke

Stroke style.

experimental setImageStyle(imageStyle)

Set the image style for subsequent draw operations. Pass null to remove the image style.

Name Type Description
imageStyle ol.style.Image

Image style.

experimental setTextStyle(textStyle)

Set the text style for subsequent draw operations. Pass null to remove the text style.

Name Type Description
textStyle ol.style.Text

Text style.