|
@@ -31,10 +31,9 @@
|
|
|
<script setup>
|
|
|
import useLayoutStore from '@/store/layout'
|
|
|
import { useMapStore } from '@/store/map'
|
|
|
-import { clearDraw, DrawPolygon, limitHeightAnalysis, QueryCube } from '@/utils/map/addLayer'
|
|
|
+import { limitHeightAnalysis } from '@/utils/map/addLayer'
|
|
|
import { geometryMeshEffect } from '@/utils/map/addTool.js'
|
|
|
-import { wait } from '@/utils/tools'
|
|
|
-import { ref, watch, onBeforeUnmount } from 'vue'
|
|
|
+import { onBeforeUnmount, ref, watch } from 'vue'
|
|
|
|
|
|
const mapStore = useMapStore()
|
|
|
|
|
@@ -60,19 +59,19 @@ watch(
|
|
|
{ deep: true }
|
|
|
)
|
|
|
|
|
|
-async function handleDraw() {
|
|
|
+/* async function handleDraw() {
|
|
|
if (hasDraw) {
|
|
|
handleClear()
|
|
|
await wait(300)
|
|
|
}
|
|
|
DrawPolygon({ hasZ: true })
|
|
|
-}
|
|
|
+} */
|
|
|
|
|
|
//获取带高度三维体
|
|
|
function getMesh(status) {
|
|
|
if (status == 'hide') {
|
|
|
geometryMeshEffect({
|
|
|
- id: 'sgzy_mesh',
|
|
|
+ id: 'fchc_mesh',
|
|
|
status: 'hide',
|
|
|
})
|
|
|
return
|
|
@@ -93,20 +92,20 @@ function getMesh(status) {
|
|
|
for (let i = 0; i < bigRings[0].length; i++) {
|
|
|
rings.push([bigRings[0][i][0], bigRings[0][i][1], form.value.minZ * 1])
|
|
|
}
|
|
|
- // geometryMeshEffect({
|
|
|
- // id: 'sgzy_mesh',
|
|
|
- // status: 'show',
|
|
|
- // data: [
|
|
|
- // {
|
|
|
- // type: 'polygon',
|
|
|
- // shape: {
|
|
|
- // height: height,
|
|
|
- // rings: [rings],
|
|
|
- // color: [0, 255, 0, 0.1],
|
|
|
- // },
|
|
|
- // },
|
|
|
- // ],
|
|
|
- // })
|
|
|
+ geometryMeshEffect({
|
|
|
+ id: 'fchc_mesh',
|
|
|
+ status: 'show',
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ type: 'polygon',
|
|
|
+ shape: {
|
|
|
+ height: height,
|
|
|
+ rings: [rings],
|
|
|
+ color: [0, 255, 0, 0.1],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
function handleCalc() {
|