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

Method _initWebMap

src/common/mapping/WebMapBase.js:520–550  ·  view source on GitHub ↗
(clean = true)

Source from the content-addressed store, hash-verified

518 }
519
520 _initWebMap(clean = true) {
521 clean && this.clean();
522 if (this.webMapInfo) {
523 // 传入是webmap对象
524 const mapInfo = this.webMapInfo;
525 mapInfo.mapParams = {
526 title: this.webMapInfo.title,
527 description: this.webMapInfo.description
528 };
529 this.mapParams = mapInfo.mapParams;
530 Promise.resolve()
531 .then(() => {
532 this._getMapInfo(mapInfo);
533 })
534 .catch((error) => {
535 this._fire('mapcreatefailed', { error });
536 });
537 return;
538 } else if (!this.mapId || !this.options.serverUrl) {
539 Promise.resolve()
540 .then(() => {
541 this._createMap('MapStyle');
542 })
543 .catch((error) => {
544 this._fire('mapcreatefailed', { error });
545 });
546 return;
547 }
548 this._taskID = new Date();
549 this.getMapInfo(this._taskID);
550 }
551
552 setZoom(zoom) {
553 if (this.map) {

Callers 4

setStyleMethod · 0.95
setWebMapOptionsMethod · 0.95
setMapIdMethod · 0.95

Calls 5

cleanMethod · 0.95
_getMapInfoMethod · 0.95
_fireMethod · 0.95
_createMapMethod · 0.95
getMapInfoMethod · 0.95

Tested by

no test coverage detected