Search
CanvasLayer.decorations Property
See Also
 






Gets the collection of Decorations, displayed by this layer.

Namespace: MindFusion.Mapping
File: CanvasLayer.js

 Syntax

JavaScript  Copy Code

get decorations() {}

 Property Value

ObservableCollection. A collection of Decoration instances.

 Example

The following code creates a new CanvasLayer with an id "Drawings" and adds a Polyline that connects an array with dots to the decorations of the layer:

JavaScript  Copy Code

var m = MindFusion.Mapping;

var drawings = new m.CanvasLayer("Drawings");
view.layers.add(drawings);

// create a smooth polyline connecting the points
var poly = new m.Poly(points);
poly.stroke = "#0066ff";
// stroke thickness in meters
poly.strokeThickness = 1000;
poly.strokeDashStyle = d.DashStyle.Dash;
poly.smooth = true;

drawings.decorations.add(poly);

 See Also