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

Method initializeMap

src/common/mapping/WebMapV2.js:53–70  ·  view source on GitHub ↗
(mapInfo, map)

Source from the content-addressed store, hash-verified

51 }
52
53 async initializeMap(mapInfo, map) {
54 try {
55 this.baseProjection = await this._registerMapCRS(mapInfo);
56 if (map) {
57 if (!crsManager.isSameProjection(map, this.baseProjection) && !this.ignoreBaseProjection) {
58 this.fire('projectionnotmatch');
59 return;
60 }
61 this._appendLayers = true;
62 this.map = map;
63 }
64 this._mapInfo = mapInfo;
65 this._loadLayers(mapInfo, this._taskID);
66 } catch (error) {
67 console.error(error);
68 this.fire('mapcreatefailed', { error });
69 }
70 }
71
72 cleanLayers(layers) {
73 super.cleanLayers(layers);

Callers

nothing calls this directly

Calls 4

_registerMapCRSMethod · 0.95
_loadLayersMethod · 0.95
isSameProjectionMethod · 0.45
fireMethod · 0.45

Tested by

no test coverage detected