ASP.NET Pack Programmer's Guide
IEnumerable.add Method
See Also
 





Adds an object to the end of the collection.

Namespace: MindFusion.Mapping
Package: IEnumerable.js

 Syntax

JavaScript  Copy Code

function add (item)

 Parameters

item

Object. The object to add.

 Example

The following code creates a new Marker and adds it to the decorations collection of a DecorationLayer called markers. The decorations property is of type ObservableCollection, which derives from IEnumerable.

JavaScript  Copy Code

var m = MindFusion.Mapping;

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

// 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";
markers.decorations.add(mark);

 See Also

IEnumerable Members
IEnumerable Class
MindFusion.Mapping Namespace