派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-03-08 47af46140c4ca30488030e93d20a1965b2c848a2
天地图瓦片切换增加淡入淡出效果
1个文件已修改
20 ■■■■■ 已修改文件
src/components/helpers/BasemapHelper.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/helpers/BasemapHelper.js
@@ -53,23 +53,15 @@
     */
    showBasemap = (code, showAnnotation, isHideOthers = true) => {
      const basemap = this.basemapMap.get(code)
      if (isHideOthers) {
        this.basemapLayerGroup.clearLayers()
      }
      setTimeout(() => {
        // const layer = this.basemapLayerGroup.hasLayer(basemap.layer)
        // if (!layer) {
        this.basemapLayerGroup.addLayer(basemap.layer)
        // }
        if (showAnnotation) {
          // if()
          this.basemapLayerGroup.addLayer(basemap.annotation)
        } else {
          this.basemapLayerGroup.removeLayer(basemap.annotation)
        }
      }, 300)
      this.basemapLayerGroup.addLayer(basemap.layer)
      if (showAnnotation) {
        this.basemapLayerGroup.addLayer(basemap.annotation)
      } else {
        this.basemapLayerGroup.removeLayer(basemap.annotation)
      }
    }
    /**