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

Method _setExpectLayerLen

src/common/mapping/WebMapV2.js:240–254  ·  view source on GitHub ↗
(mapInfo)

Source from the content-addressed store, hash-verified

238 }
239
240 _setExpectLayerLen(mapInfo) {
241 if (this._shouldLoadBaseLayer(mapInfo, this.layerFilter)) {
242 this.expectLayerLen++;
243 }
244 let overLayers = mapInfo.layers;
245 if (overLayers && overLayers.length > 0) {
246 if (typeof this.layerFilter === 'function') {
247 overLayers = overLayers.filter(this.layerFilter);
248 }
249 this.expectLayerLen += overLayers.length;
250 }
251 if (mapInfo.grid && mapInfo.grid.graticule) {
252 this.expectLayerLen++;
253 }
254 }
255
256 _shouldLoadBaseLayer(mapInfo, layerFilter) {
257 const baseLayer = mapInfo.baseLayer;

Callers 1

_handleLayerInfoMethod · 0.95

Calls 2

_shouldLoadBaseLayerMethod · 0.95
filterMethod · 0.80

Tested by

no test coverage detected