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

Method getMapInfo

src/common/mapping/WebMapV2Base.js:168–189  ·  view source on GitHub ↗
(_taskID)

Source from the content-addressed store, hash-verified

166 }
167
168 getMapInfo(_taskID) {
169 this.serverUrl = this.serverUrl && this.webMapService.handleServerUrl(this.serverUrl);
170 this.webMapService
171 .getMapInfo()
172 .then(
173 (mapInfo) => {
174 if (this._taskID !== _taskID) {
175 return;
176 }
177 // 存储地图的名称以及描述等信息,返回给用户
178 this.mapParams = mapInfo.mapParams;
179 this._getMapInfo(mapInfo, _taskID);
180 },
181 error => {
182 throw error;
183 }
184 )
185 .catch(error => {
186 this._fire('mapcreatefailed', { error });
187 console.log(error);
188 });
189 }
190
191 getBaseLayerType(layerInfo) {
192 let layerType = layerInfo.layerType; // 底图和rest地图兼容

Callers 1

initWebMapMethod · 0.95

Calls 3

_getMapInfoMethod · 0.95
_fireMethod · 0.95
handleServerUrlMethod · 0.80

Tested by

no test coverage detected