ol/render/canvas/Immediate~CanvasImmediateRenderer
A concrete subclass of VectorContext that implements direct rendering of features and geometries to an HTML5 Canvas context. Instances of this class are created internally by the library and provided to application code as vectorContext member of the RenderEvent object associated with postcompose, precompose and render events emitted by layers and maps.
Extends
Methods
-
drawCircle(geometry)
-
Render a circle geometry into the canvas. Rendering is immediate and uses the current fill and stroke styles.
Name Type Description geometryCircle Circle geometry.
-
drawFeature(feature, style)
-
Render a feature into the canvas. Note that any
zIndexon the provided style will be ignored - features are rendered immediately in the order that this method is called. If you needzIndexsupport, you should be using anVectorLayerinstead.Name Type Description featureFeature Feature.
styleStyle Style.
-
drawGeometry(geometry)
-
Render a geometry into the canvas. Call
renderer.setStyle()first to set the rendering style.Name Type Description geometryGeometry | RenderFeature The geometry to render.
-
setStyle(style)
-
Set the rendering style. Note that since this is an immediate rendering API, any
zIndexon the provided style will be ignored.Name Type Description styleStyle The rendering style.
© 2005-present, OpenLayers Contributors All rights reserved.Licensed under the BSD 2-Clause License.
https://openlayers.org/en/latest/apidoc/module-ol_render_canvas_Immediate-CanvasImmediateRenderer.html