派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-03-08 95ff3cadc7685f6470a0d6c78429dbfd5b1451d9
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()
          })