Gets the number of elements.
Namespace: MindFusion.Mapping
Package: IEnumerable.js
JavaScript Copy Code |
---|
function count () |
Number. The number of elements.
The following code creates two DecorationLayer-s and adds Marker instances to them. Then it checks if the count of items in the first layer is more than 10 and if yes - copies the first 10 at the end of the second collection. 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 var markers2 = new m.DecorationLayer("Images2"); if(markers.decorations.count > 10) |