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

Method initializeMap

src/common/mapping/WebMapV3.js:178–200  ·  view source on GitHub ↗
(mapInfo, map)

Source from the content-addressed store, hash-verified

176 }
177
178 initializeMap(mapInfo, map) {
179 this._mapInfo = mapInfo;
180 this._baseProjection = this._registerMapCRS(mapInfo);
181 if (map) {
182 this.map = map;
183 if (!crsManager.isSameProjection(this.map, this._baseProjection)) {
184 this.fire('projectionnotmatch');
185 return;
186 }
187 this._appendLayers = true;
188 // 处理图层管理添加 sprite
189 const sprite = this._mapInfo.sprite;
190 if (sprite) {
191 this._sprite = sprite;
192 this.map.addStyle({
193 sprite
194 });
195 }
196 this._initLayers();
197 return;
198 }
199 this._createMap();
200 }
201
202 cleanLayers(layers) {
203 super.cleanLayers(layers);

Callers

nothing calls this directly

Calls 5

_registerMapCRSMethod · 0.95
_initLayersMethod · 0.95
_createMapMethod · 0.95
isSameProjectionMethod · 0.45
fireMethod · 0.45

Tested by

no test coverage detected