(mapInfo, addedCallback)
| 478 | } |
| 479 | |
| 480 | _initBaseLayer(mapInfo, addedCallback) { |
| 481 | const layerInfo = mapInfo.baseLayer || mapInfo; |
| 482 | const layerType = this.getBaseLayerType(layerInfo); |
| 483 | const mapUrls = this.getMapurls(); |
| 484 | let url; |
| 485 | this.baseLayerProxy = this.webMapService.handleProxy('image'); |
| 486 | switch (layerType) { |
| 487 | case 'TIANDITU': |
| 488 | this.baseLayerProxy = null; |
| 489 | this._createTiandituLayer(mapInfo, addedCallback); |
| 490 | break; |
| 491 | case 'BING': |
| 492 | this.baseLayerProxy = null; |
| 493 | this._createBingLayer(layerInfo.layerID || layerInfo.name, layerInfo, addedCallback); |
| 494 | break; |
| 495 | case 'WMS': |
| 496 | this._createWMSLayer(layerInfo, addedCallback); |
| 497 | break; |
| 498 | case 'WMTS': |
| 499 | this._createWMTSLayer(layerInfo, addedCallback); |
| 500 | break; |
| 501 | case 'TILE': |
| 502 | this._createDynamicTiledLayer(layerInfo, addedCallback); |
| 503 | break; |
| 504 | case 'ZXY_TILE': |
| 505 | this._createZXYLayer(layerInfo, addedCallback); |
| 506 | break; |
| 507 | case 'CLOUD': |
| 508 | case 'XYZ': |
| 509 | url = mapUrls[layerInfo.layerType] |
| 510 | .replace('{googleMapsLanguage}', this.googleMapsLanguage) |
| 511 | .replace('{googleMapsAPIKey}', this.googleMapsAPIKey); |
| 512 | this._createXYZLayer(layerInfo, url, addedCallback); |
| 513 | break; |
| 514 | case 'BAIDU': |
| 515 | this.fire('baidumapnotsupport', {}); |
| 516 | addedCallback && addedCallback(); |
| 517 | break; |
| 518 | case 'MAPBOXSTYLE': |
| 519 | this._createMVTBaseLayer(layerInfo, addedCallback); // 添加矢量瓦片服务作为底图 |
| 520 | break; |
| 521 | } |
| 522 | } |
| 523 | |
| 524 | _initOverlayLayers(layers, _taskID) { |
| 525 | // 存储地图上所有的图层对象 |
no test coverage detected