DynamicLayersGroup

This class provides methods for creating a group of additional layers in which geometric forms such as points, lines, polylines, polygons...etc can be added and removed dynamically.

Note about the class identifier (classID) :

Cartographic identifiers are already defined and can be used when creating new layers to the map. (See CartoConst for the full list of existing Cartographic class IDs). You can use those existing class IDs when creating new layers. The layers will be rendered according to the style defined for this class ID. You can also use your own class ID. Its value must be different that those defined in CartoConst.

The z-index of the layers is defined by their class ID : a higher class ID means a higher z-index. For example, a layer with a classID of 10003L will be rendered of top of all layers with a classID < 10003L Custom class IDs must be between 12000 and 12999.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Optional name of this group of Dynamic Layer(s)

Functions

Link copied to clipboard
fun addForm(classID: Long, form: Form, atts: Array<Attribute>?): Boolean

Inserts the given SVS form in the layer that corresponds to the specified classID.

Link copied to clipboard
Link copied to clipboard
fun newCorridor(classID: Long, pts: Array<GeoPoint>, radius: Int, atts: Array<Attribute>?): Polygon2D?

Adds a corridor (polygon) defined by a polyline and a radius into the specified class.

Link copied to clipboard
fun newEllipse(classID: Long, rect: GeoRect, atts: Array<Attribute>?): Ellipse2D?

Adds a simple 2D-ellipse into the specified class.

Link copied to clipboard
fun newLine(classID: Long, pt1: GeoPoint, pt2: GeoPoint, atts: Array<Attribute>?): Polyline2D?

Adds a simple line into the specified class and returns the corresponding Polyline2D form.

Link copied to clipboard
fun newPoint(classID: Long, pt: GeoPoint, atts: Array<Attribute>?): Point2D?

Adds a simple point into the specified class and returns the corresponding Point2D form.

Link copied to clipboard
fun newPolygon(classID: Long, pts: Array<GeoPoint>, atts: Array<Attribute>?): Polygon2D?

Adds a simple polygon into the specified class and returns the corresponding Polygon2D form.

Link copied to clipboard
fun newPolyline(classID: Long, pts: Array<GeoPoint>, atts: Array<Attribute>?): Polyline2D?

Adds a simple polyline into the specified class and returns the corresponding Polyline2D form.

Link copied to clipboard
fun newRectangle(classID: Long, rect: GeoRect, atts: Array<Attribute>?): Rectangle2D?

Adds a simple 2D-rectangle into the specified class and returns the corresponding Rectangle2D form.

Link copied to clipboard
fun remove(classID: Long): Boolean

Removes and destroys all SVS Forms (of any type) from the specified classID.

fun remove(classID: Long, form: Form, detach: Boolean): Boolean

Removes the specified form from the layer that corresponds to the specified classID.

Link copied to clipboard
fun update(classID: Long, geoType: Form.GeoType): Boolean

Update all objects of the specified type in the specified classID. Use this method if you update an object (i.e. a POI) attributes to change it's style to immediately update it on the map.