Projects each element of a sequence into a new form.
Namespace: MindFusion.Mapping
Package: IEnumerable.js
JavaScript Copy Code |
---|
function select (selector) |
function. A transform function to invoke on each element.
IEnumerable. An collection whose elements are the resultof invoking the transform function on each element.
The following code selects all members of a decorations list in a DecorationLayer that have some text set. 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(); markers.decorations.select(function(x) { if (x.text != "") return true}); |