|
@@ -42,6 +42,15 @@
|
|
|
</div>
|
|
|
</el-popover>
|
|
|
</div>
|
|
|
+ <div class="location">
|
|
|
+ <el-tooltip
|
|
|
+ effect="light"
|
|
|
+ content="清空标绘"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <img class="__hover" src="./images/tools-measure-circle.png" @click="clearDraw"/>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
<div class="measure">
|
|
|
<el-popover
|
|
|
placement="right"
|
|
@@ -168,9 +177,9 @@ import { useStore } from "vuex";
|
|
|
import { useRouter } from "vue-router";
|
|
|
import OlMap from "./ol-map.vue";
|
|
|
import InitMapInfoClass from "./initMapInfo";
|
|
|
-import MeasureFunc from "./func/measure";
|
|
|
+import MeasureFunc, {clearMeasureDom} from "./func/measure";
|
|
|
import DrawFunc, {DrawClear} from "./func/draw";
|
|
|
-import LocationFunc from "./func/location";
|
|
|
+import LocationFunc, {clearLocationDom} from "./func/location";
|
|
|
import ToolsLocationCom from './component/tools/tools-location.vue'
|
|
|
import * as BaseDraw from './func/base-draw'
|
|
|
import {ElMessage, ElMessageBox} from "element-plus";
|
|
@@ -342,6 +351,11 @@ export default defineComponent({
|
|
|
}
|
|
|
MarkDraw.draw(easyMap.value, config)
|
|
|
}
|
|
|
+ const clearDraw = () => {
|
|
|
+ clearMeasureDom(easyMap.value) // 测量
|
|
|
+ MarkDraw.clearMarkDom(easyMap.value) // 标绘
|
|
|
+ clearLocationDom(easyMap.value) // 定位
|
|
|
+ }
|
|
|
onMounted(() => {
|
|
|
nextTick(() => {});
|
|
|
});
|
|
@@ -362,6 +376,7 @@ export default defineComponent({
|
|
|
ref_drawEditsForm,
|
|
|
drawEditsWktPlaceholderCpt,
|
|
|
markDraw,
|
|
|
+ clearDraw
|
|
|
};
|
|
|
},
|
|
|
});
|