main
徐景良 3 months ago
parent 9f1fb902d9
commit e017557425

@ -60,19 +60,11 @@
</div>
<div class="item">
<div class="label">全局航线速度</div>
<div class="content">
<div class="content" style="width:160px;">
<a-input-number style="width:160px" v-model:value="props.polygonAirForm.speed" :min="1" :max="20" />
</div>
</div>
<div class="item">
<div class="label"> 主航线角度</div>
<div class="content">
<a-input-number width="160px" v-model:value="props.polygonAirForm.angle" :min="0" :max="180" />
</div>
</div>
<div class="item">
<div class="label"> 高程优化</div>
</div>
<div class="item">
<div class="label"> 完成动作</div>
@ -154,8 +146,6 @@
<div class="cel">{{item.focalLength}}</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
@ -221,7 +211,7 @@ const checkPoint = (e)=>{
left:-160px;
overflow-y:auto;
line-height:32px;
background:#232323;
background:#101010;
}
.area-options .item{
@ -332,4 +322,15 @@ const checkPoint = (e)=>{
height:30px !important;
background:#3F4150!important ;
}
::v-deep .ant-input-number{
color:#fff!important;
background:#3F4150!important;
border:0px !important;
}
::v-deep .ant-input-number-input{
color:#fff!important;
border:0px !important;
}
</style>

@ -21,7 +21,7 @@
<script lang="ts" setup>
import {ref,onMounted,defineProps,watch} from 'vue'
import { message } from 'ant-design-vue';
import { GeojsonToWkt } from '@/components/MapboxMaps/src/WktGeojsonTransform';
import {buildUUID} from '@/utils/uuid'
import airPoint from './airPoint.vue'
import * as mars3d from "mars3d";
@ -57,6 +57,15 @@ watch(
{ deep: true }
)
const clickPoint = (id)=>{
airPoints.value?.forEach((item,index)=>{
if(item.id == id){
currentAirPoint.value = item;
airPointConfigShow.value = true;
}
})
}
const checkPoint = (e)=>{
currentAirPoint.value = e;
airPointConfigShow.value = true;
@ -91,7 +100,7 @@ const polygonAirForm = ref({
startingPoint:null,
lensMode:1,
gatherMode:1,
heightMode:2,
heightMode:1,
height:120,
speed:15,
angle:0,
@ -100,13 +109,11 @@ const polygonAirForm = ref({
const vChartRef = ref<HTMLElement>()
onMounted(()=>{
initMap();
})
const initMap = ()=>{
map = new mars3d.Map(vChartRef.value,
{
@ -348,6 +355,13 @@ const initMap = ()=>{
])
map.addLayer(graphicLayer);
// 线
graphicLayer.on(mars3d.EventType.click,(e)=>{
//
clickPoint(e.graphic.options.id);
})
//
// handlerDrawStartPoint();
@ -396,8 +410,6 @@ const handlerDrawPoint = (e) => {
let position = mars3d.LngLatPoint.fromCartesian(e.position);
let uuid = buildUUID();
//
@ -587,10 +599,12 @@ const handlerDrawPolygon = async () => {
let polygon = turf.polygon([coordinates])
let lines = generateScanLines(polygon,0.003,0);
// wkt
let wkt = GeojsonToWkt(polygon.geometry);
CalculateAreaInfo(polygon,lines);
// 线
handlerDrawPolygonLine(lines);
}

Loading…
Cancel
Save