Search
MapView.decorations Property
See Also
 






Gets the default Decoration-s collection.

Namespace: MindFusion.Mapping
File: MapView.js

 Syntax

JavaScript  Copy Code

get decorations() {}

 Property Value

ObservableCollection. The default Decoration-s collection.

 Example

The following code creates a new MapView using a <DIV> element called "mapview" that we've declared in the HTML code of the page and adds a new Marker to its decorations collection:

JavaScript  Copy Code

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

//adds the Maker to the decorations collection of the view
view.decorations.add(mark);

 See Also