Namespace: Array

SuperMap.Array

A series of commonly used extension functions for array operations.

Methods

filter(array, callback, caller){Array}

BaseTypes.js, line 438

Filter array.Provides extension of the Array.prototype.filteron on the ECMA-262 criterion. see: http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter.

Name Type Description
array Array

The array to filter.

callback function

every element on the array will call this function.
If the function return to true, this element contained to the array that be returned. This function has three parameters: the element on the array,the index of the element,array.
If an optional parameter caller is set, the optional parameter caller is parameter of the callback when call the callback function.

caller Object optional

The optional parameter caller is parameter of the callback when call the callback function.

Returns:
Type Description
Array This element contained to the array that be returned when this return value is true.