Gets the element at the given index.
Namespace: MindFusion.Mapping
Package: IEnumerable.js
JavaScript Copy Code |
---|
function item (index) |
Number. The index.
Object. The element at the given index.
The following code creates a DecorationLayer and adds Marker instances to it. Then it checks if the decoration items are more than 2 and if yes - gets the second one. The decorations property is of type ObservableCollection, which derives from IEnumerable.
JavaScript Copy Code |
---|
var m = MindFusion.Mapping; var markers = new m.DecorationLayer("Images"); // create some markers with images mark = new m.Marker(); if(markers.decorations.count > 2) |