派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-03-17 9eb0c9993a0be2fbb00813b7c7b0c0f2a096999c
src/components/LayerController/modules/LcBaseMap.vue
@@ -16,6 +16,7 @@
  data () {
    return {
      isShow: true,
      currentBaseMapCode: 'tianditu_img',
      basemapList: []
    }
  },
@@ -34,7 +35,14 @@
      const code = itm.code
      this.basemapList.forEach((item) => {
        if (item.code === code) {
          this.basemapHelper.showBasemap(item.code, item.conf.annotationCheck, true)
          console.log(this.currentBaseMapCode)
          if (this.currentBaseMapCode == null || this.currentBaseMapCode !== code) {
            this.currentBaseMapCode = code
            this.basemapHelper.showBasemap(item.code, item.conf.annotationCheck, true)
          } else {
            this.basemapHelper.showBasemap(item.code, item.conf.annotationCheck, false)
          }
          this.basemapHelper.getBasemapList().forEach((item) => {
            item.layer.bringToBack()
          })