new RasterVectorCollection(quadtreePrimitive)
Real time rasterization class, obtained from the Scene class. Rasterization refers to the process of converting vector graphics format images into bitmaps, which enables real-time rasterization of vector graphics.
| Name | Type | Description |
|---|---|---|
quadtreePrimitive |
PrimitiveCollecton |
A collection of quadtree elements. |
Members
-
alphaNumber
-
Get or set the transparency of the data after rasterization (0 is completely transparent).
-
readonly boundsbound
-
Obtain the boundary of the data.
-
readonly canvasHeightNumber
-
Get the height of the canvas.
-
readonly canvasWidthNumber
-
Get the width of the canvas.
Methods
-
add()
-
Add vector objects that are quasi gridded.
Name Type Description options.nameString optional Name of vector object
options.positionsposition optional Position of vector object
options.polygonBoundposition optional The boundary of a vector object polygon.
options.pickIdposition optional The selection ID for vector objects.
options.fillColorposition optional The fill color of vector objects.
options.lineColorposition optional The line color of a vector object.
options.lineWidthposition optional The line width of a vector object.
options.geometryTypeposition optional RasterGeometreType is a real-time rasterized geometric object type.
Example
scene.rasterVectorCollection.add({ name : name, pickId : geometry.id, positions : cartographics, fillColor : new SuperMap3D.Color(1.0, 0.0, 0.0, 1.0), lineColor : new SuperMap3D.Color(1.0, 0.0, 1.0, 1.0), lineWidth : 10, geometryType : SuperMap3D.RasterGeometryType.POLYGON }); -
remove(name)
-
Remove the added vector object based on its name.
Name Type Description nameString Name of the grid vector object to be removed
-
removeAll()
-
Remove all vector objects.