Search
Drawing.strokeThickness Property
See Also
 






Gets or sets the stroke thickness of this drawing.

Namespace: MindFusion.Mapping
File: Drawing.js

 Syntax

JavaScript  Copy Code

get strokeThickness() {}

 Property Value

Number. The thickness in meters or pixels.

 Remarks

If the pixelThickness property is set to true, the value will be considered in pixels, otherwise in meters (the default). Thicknesses defined in meters will be scaled according to the current zoom factor, while thicknesses defined in pixels stays static.

 Example

The following code creates a new CanvasLayer with an id "Drawings" and adds Circle instances. The stroke thickness for the circles outlinings is in pixels. The Circle class extends Drawing:

JavaScript  Copy Code

var m = MindFusion.Mapping;

var points = [
    new m.LatLong(3.5308084104036523, -75.68240577939847),
    new m.LatLong(3.203158862432781, -75.64670021299222),
    new m.LatLong(2.89597766664142, -75.43246681455472),
    new m.LatLong(2.6669084038224167, -75.51898414853909),
    new m.LatLong(2.6600493665912777, -75.99002296689847)];

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

var ids = ["Memorial", "Cathedral", "Museum", "Palace", "Cafe"];

// create markers and circles at the specified points
points.forEach(
    function (point)
    {
        markers.decorations.add(new m.Marker(point));
        var circle = new m.Circle(point, 1000);
        circle.fill = "red";  
        circle.stroke = "orange";  
        circle.pixelThickness = true;
        circle.strokeThickness = 3;
        circle.dashStyle = MindFusion.Drawing.DashStyle.Dash;
       
        drawings.decorations.add(circle);
       
    });

 See Also