Search
Circle Constructor
See Also
 






Initializes a new instance of the Circle class.

Namespace: MindFusion.Mapping
File: Circle.js

 Syntax

JavaScript  Copy Code

function Circle ([center, [radius]])

 Parameters

center
Optional.

LatLong. The center of this drawing in geographical coordinates.

radius
Optional.

Number. The radius of this drawing.

 Example

The following code creates a new CanvasLayer with an id "Drawings" and adds to its decorations Circle instances, whose coordinates are taken from an array:

JavaScript  Copy Code

var m = MindFusion.Mapping;

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

// 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";
        drawings.decorations.add(circle);
    });

 See Also