MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / rectifyLayersOrder

Method rectifyLayersOrder

src/common/mapping/WebMapV2.js:2486–2499  ·  view source on GitHub ↗
(appreciableLayers, topLayerBeforeId)

Source from the content-addressed store, hash-verified

2484 }
2485
2486 rectifyLayersOrder(appreciableLayers, topLayerBeforeId) {
2487 const exsitLayers = super.rectifyLayersOrder(appreciableLayers, topLayerBeforeId);
2488 const labelLayerIds = [];
2489 for (let index = exsitLayers.length - 1; index > -1; index--) {
2490 const targetlayerId = exsitLayers[index];
2491 const labelLayerId = this._getSymbolLabelLayerName(targetlayerId);
2492 if (this.map.getLayer(labelLayerId)) {
2493 labelLayerIds.push(labelLayerId);
2494 }
2495 }
2496 labelLayerIds.reverse().forEach((layerId) => {
2497 this.map.moveLayer(layerId);
2498 });
2499 }
2500
2501 _getParamString(obj, existingUrl, uppercase = false) {
2502 const params = [];

Callers 2

_sendMapToUserMethod · 0.95
_setCacheLayerMethod · 0.95

Calls 6

pushMethod · 0.80
forEachMethod · 0.80
reverseMethod · 0.80
getLayerMethod · 0.45
moveLayerMethod · 0.45

Tested by

no test coverage detected