Class: RasterVectorCollection

RasterVectorCollection

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.name String optional

Name of vector object

options.positions position optional

Position of vector object

options.polygonBound position optional

The boundary of a vector object polygon.

options.pickId position optional

The selection ID for vector objects.

options.fillColor position optional

The fill color of vector objects.

options.lineColor position optional

The line color of a vector object.

options.lineWidth position optional

The line width of a vector object.

options.geometryType position 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
name String

Name of the grid vector object to be removed

removeAll()

Remove all vector objects.