Copies a range of elements from this collection to a destination collection.
Namespace: MindFusion.Mapping
Package: IEnumerable.js
JavaScript Copy Code |
---|
function copyTo (destination, length, [sourceIndex, [destinationIndex]]) |
IEnumerable. The destination collection.
Number. The length of the range to copy.
Number. The starting index of the range to copy.
Number. The index at which the range should be copied.
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; // create some markers with images var markers2 = new m.DecorationLayer("Images2"); if(markers.decorations.count > 10) |