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

Method addLayer

src/common/mapping/utils/SourceModel.js:13–37  ·  view source on GitHub ↗
(layer)

Source from the content-addressed store, hash-verified

11 }
12
13 addLayer(layer) {
14 if (layer.renderSource.sourceLayer) {
15 if (!this.children) {
16 this.children = [];
17 this.type = 'group';
18 this.renderSource = {};
19 this.dataSource = {};
20 this.themeSetting = {};
21 }
22 if (layer.visible || this.visible) {
23 this.visible = true;
24 } else {
25 this.visible = false;
26 }
27 this.children.push(layer);
28 return;
29 }
30 this.renderLayers.push(...layer.renderLayers);
31 if (layer.reused) {
32 this.reused = layer.reused;
33 }
34 if (layer.layerOrder) {
35 this.layerOrder = layer.layerOrder;
36 }
37 }
38}
39
40export default SourceModel;

Callers 8

_addLayersToMapMethod · 0.45
_initGraticuleLayerMethod · 0.45
_addLayerMethod · 0.45
copyLayerMethod · 0.45
_addLayersToMapMethod · 0.45
_initSourceListMethod · 0.45
_addBaseLayerMethod · 0.45
addL7LayersFunction · 0.45

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected