| | |
| | | import sceneInfoApi from '@/api/sceneInfoApi'; |
| | | import marks from '@/utils/map/marks'; |
| | | import MapUtil from '@/utils/map/util'; |
| | | import { useToolboxStore } from '@/stores/toolbox'; |
| | | import { mapStores } from 'pinia'; |
| | | |
| | | const lableMarkMap = new Map(); |
| | | |
| | |
| | | sceneMap: new Map() |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapStores(useToolboxStore) |
| | | }, |
| | | watch: { |
| | | // 当切换区县时,清空所有选项 |
| | | districtCode(nV, oV) { |
| | | if (nV != oV) { |
| | | this.toolboxStore.selectedDistrict = nV; |
| | | this.handelCheckAllChange(false); |
| | | } |
| | | } |
| | |
| | | const key = this.districtCode + t; |
| | | if (!lableMarkMap.has(key)) { |
| | | this.fetchScene(t).then((res) => { |
| | | const layer = marks.createLabelMarks(sceneIcon(t), res); |
| | | const layer = marks.createLabelMarks( |
| | | sceneIcon(t), |
| | | res, |
| | | false, |
| | | true |
| | | ); |
| | | lableMarkMap.set(key, { show: true, layer }); |
| | | }); |
| | | } else { |