(mapInfo, map)
| 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); |
nothing calls this directly
no test coverage detected