MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / map

Method map

src/common/overlay/levelRenderer/Color.js:849–858  ·  view source on GitHub ↗

* @function LevelRenderer.Tool.Color.prototype.map * @description 数组映射 * @param {Array} array - 数组。 * @param {function} fun - 函数。 * @returns {string} 数组映射结果

(array, fun)

Source from the content-addressed store, hash-verified

847 * @returns {string} 数组映射结果
848 */
849 map(array, fun) {
850 if (typeof fun !== 'function') {
851 throw new TypeError();
852 }
853 var len = array ? array.length : 0;
854 for (var i = 0; i < len; i++) {
855 array[i] = fun(array[i]);
856 }
857 return array;
858 }
859
860 /**
861 * @function LevelRenderer.Tool.Color.prototype.adjust

Callers 15

toColorMethod · 0.95
reverseMethod · 0.95
getDataMethod · 0.95
WebMapV2Spec.jsFile · 0.80
callbackFunction · 0.80
LogoSpec.jsFile · 0.80

Calls 1

funFunction · 0.85

Tested by

no test coverage detected