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

Method indexOf

src/common/overlay/levelRenderer/Util.js:250–260  ·  view source on GitHub ↗

* @function LevelRenderer.Tool.Util.prototype.indexOf * @description 查询数组中元素的index * @return {Object} 偏移量。

(array, value)

Source from the content-addressed store, hash-verified

248 * @return {Object} 偏移量。
249 */
250 indexOf(array, value) {
251 if (array.indexOf) {
252 return array.indexOf(value);
253 }
254 for (var i = 0, len = array.length; i < len; i++) {
255 if (array[i] === value) {
256 return i;
257 }
258 }
259 return -1;
260 }
261
262
263 /**

Callers 15

InitMapSpec.jsFile · 0.80
WebMapV2Spec.jsFile · 0.80
callbackFunction · 0.80
WebMapSpec.jsFile · 0.80
WebMapV3Spec.jsFile · 0.80
WebMapV22Spec.jsFile · 0.80
filterFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected