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

Method _handleLayerInfo

src/common/mapping/WebMapV2.js:213–238  ·  view source on GitHub ↗
(mapInfo, _taskID)

Source from the content-addressed store, hash-verified

211 }
212
213 _handleLayerInfo(mapInfo, _taskID) {
214 mapInfo = this._setLayerID(mapInfo);
215 this._mapInfo = mapInfo;
216 this.layerAdded = 0;
217 this.expectLayerLen = 0;
218 const { layers, grid } = mapInfo;
219 this._setExpectLayerLen(mapInfo);
220 if (this.expectLayerLen === 0) {
221 this._sendMapToUser(0, 0);
222 }
223 if (this._shouldLoadBaseLayer(mapInfo, this.layerFilter)) {
224 this._initBaseLayer(mapInfo, () => {
225 this._addLayerSucceeded();
226 });
227 }
228 if (layers && layers.length !== 0) {
229 let filterLayers = layers;
230 if (typeof this.layerFilter === 'function') {
231 filterLayers = layers.filter(this.layerFilter);
232 }
233 this._initOverlayLayers(filterLayers, _taskID);
234 }
235 if (grid && grid.graticule) {
236 this._initGraticuleLayer(grid.graticule);
237 }
238 }
239
240 _setExpectLayerLen(mapInfo) {
241 if (this._shouldLoadBaseLayer(mapInfo, this.layerFilter)) {

Callers 1

_loadLayersMethod · 0.95

Calls 9

_setLayerIDMethod · 0.95
_setExpectLayerLenMethod · 0.95
_sendMapToUserMethod · 0.95
_shouldLoadBaseLayerMethod · 0.95
_initBaseLayerMethod · 0.95
_addLayerSucceededMethod · 0.95
_initOverlayLayersMethod · 0.95
_initGraticuleLayerMethod · 0.95
filterMethod · 0.80

Tested by

no test coverage detected