派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-01-09 da21171cc9b248ad9c7f062e41f039eceb910c23
src/components/helpers/BasemapHelper.js
@@ -50,16 +50,15 @@
     * @param layer 待显示图层引用
     * @param isHideOthers 是否先关闭其他图层,默认是true
     */
    showBasemap = (code, isHideOthers = true) => {
    showBasemap = (code, showAnnotation, isHideOthers = true) => {
      const basemap = this.basemapMap.get(code)
      if (isHideOthers) {
        for (let i = 0, len = this.basemapList.length; i < len; ++i) {
          this.map.removeLayer(this.basemapList[i].layer)
          this.map.removeLayer(this.basemapList[i].annotation)
        }
        this.basemapLayerGroup.clearLayers()
      }
      this.map.addLayer(basemap.layer)
      this.map.addLayer(basemap.annotation)
      this.basemapLayerGroup.addLayer(basemap.layer)
      if (showAnnotation) {
        this.basemapLayerGroup.addLayer(basemap.annotation)
      }
    }
    /**