diff --git a/src/views/oneMap/FloodStuationReview/sqhgBottomBox.vue b/src/views/oneMap/FloodStuationReview/sqhgBottomBox.vue index 2bd385f..d178c59 100644 --- a/src/views/oneMap/FloodStuationReview/sqhgBottomBox.vue +++ b/src/views/oneMap/FloodStuationReview/sqhgBottomBox.vue @@ -235,16 +235,18 @@ stepNum.value = 0; hgEngPlay.value = false; showRainLegend.value = false; - if (newfiberMapbox.map.getLayer('canvas-layer0')) { - newfiberMapbox.map.removeLayer('canvas-layer0'); - newfiberMapbox.map.removeSource('canvas-source0'); - } + // newfiberMapbox.map.removeLayer('canvas-layer0'); + // newfiberMapbox.map.removeSource('canvas-source0'); hoursList.value.activeIndex = stepNum.value; clearInterval(runDayInterval.value); if (runDayInterval.value) { runDayInterval.value = null; refresh.value = Math.random(); } + // if (newfiberMapbox.map.getLayer('canvas-layer0')) { + // newfiberMapbox.map.removeLayer('canvas-layer0'); + // newfiberMapbox.map.removeSource('canvas-source0'); + // } } function changeChartData() { @@ -377,10 +379,10 @@ ];*/ let colorScale = [ { value: '0', color: 'rgba(7, 213, 118, 0)' }, - { value: '0.2', color: 'rgba(7, 213, 118, 1)' }, - { value: '5', color: 'rgba(38, 129, 240,1)' }, - { value: '25', color: 'rgba(255, 26, 26, 1)' }, - { value: '250', color: 'rgba(255, 26, 26, 1)' }, + { value: '0.2', color: 'rgb(38, 129, 240)' }, + { value: '5', color: 'rgb(222, 230, 0)' }, + { value: '25', color: 'rgb(255, 26, 26)' }, + { value: '250', color: 'rgb(255, 26, 26)' }, ]; let imageFiles = []; let canvas = []; @@ -421,6 +423,10 @@ ); onBeforeUnmount(() => { emptyRun(); + if (newfiberMapbox.map.getLayer('canvas-layer0')) { + newfiberMapbox.map.removeLayer('canvas-layer0'); + newfiberMapbox.map.removeSource('canvas-source0'); + } newfiberMapbox.map.setZoom(13); });