RasterVectorCollection

RasterVectorCollection(quadtreePrimitive)

Real-time rasterization class, obtained by the Scene class. Rasterization refers to the process of converting an image in a vector graphics format into a bitmap. This class can realize real-time rasterization of vector graphics.
Name Type Description
quadtreePrimitive PrimitiveCollecton A collection of quadtree primitives.

Members

alpha : Number

Get or set the transparency of the rasterized data (0 is completely transparent)。

readonlybounds : bound

Get the bounds of the data.

readonlycanvasHeight : Number

Get the height of the canvas.

readonlycanvasWidth : Number

Get the width of the canvas.

Methods

add(options)

Add quasi-rasterized vector objects.
Name Type Description
options Object A parameter object has the following properties:
Name Type Description
name String optional the name of the vector object
positions position optional The position of the vector object
polygonBound position optional Vector object polygonal boundary.
pickId position optional The selection ID of the vector object.
fillColor position optional The fill color of the vector object.
lineColor position optional Line color for vector objects.
lineWidth position optional The lineweight of the vector object.
geometryType position optional Geometric Object Types for Live RasterizationRasterGeometryType
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)

Removes added vector objects by name.
Name Type Description
name String The name of the raster-vector object to remove

removeAll()

Removes all vector objects.