Search
CircleMarker Constructor
See Also
 






Initializes a new instance of the CircleMarker class.

Namespace: MindFusion.Mapping
File: CircleMarker.js

 Syntax

JavaScript  Copy Code

function CircleMarker ([location, [radius]])

 Parameters

location
Optional.

LatLong. The location of this marker in geographical coordinates.

radius
Optional.

Number. The radius of this marker in meters.

 Example

The following code creates a new CircleMarker and adds it to the decorations of a DecorationLayer.

JavaScript  Copy Code

var m = MindFusion.Mapping;

// create a new instance of the mapView
var view = new m.MapView(document.getElementById("mapView"));
view.theme = "light";
view.mapBounds = new m.LatLongRect(51.507351, -0.127758, 48.856613, 2.352222);

var markers = new m.DecorationLayer("Images");

// create some markers with images
var mark = new m.CircleMarker(new m.LatLong(51.507351, -0.127758), 5);
mark.text = "London";
marker.id = 12;
markers.decorations.add(mark);

view.layers.add(markers);

 See Also