Search
Marker Constructor
See Also
 






Initializes a new instance of the Marker class.

Namespace: MindFusion.Mapping
File: Marker.js

 Syntax

JavaScript  Copy Code

function Marker ([location])

 Parameters

location
Optional.

LatLong. The location of this marker in geographical coordinates.

 Example

The following code creates a new Marker and adds it to the decorations list of a MapView:

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";


// create some markers with images
var mark = new m.Marker(new m.LatLong(-22.951916, -43.210487));
mark.imageSrc = "./images/christ_redeemer.png";
mark.text = "Christ the Redeemer";

view.decorations.add(mark);

 See Also