Executes a provided function once for each element.
Namespace: MindFusion.Mapping
Package: IEnumerable.js
JavaScript Copy Code |
---|
function forEach (callback, context) |
function. A function to execute for each element.
Object. The invokation context.
The following code creates a DecorationLayer and adds Marker instances to it. Then it prints them in the console. 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();
|