Returns the first element in the collection.
Namespace: MindFusion.Mapping
Package: IEnumerable.js
JavaScript Copy Code |
---|
function first () |
Object. The first element in the collection.
The following code creates a DecorationLayer and adds Marker instances to it. Then it gets the first 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(); var placesToSee = markers.decorations.first(); |