增加金光农场(广西农垦育种基地)演示

master
贾肃 5 months ago
parent 6fd57f051d
commit e47bc80887
  1. 16
      src/views/system/base/mapMarkers.vue
  2. 119
      src/views/system/base/massifMap.vue

@ -2,19 +2,25 @@
<script setup>
import {ElAmap, useGeolocation, lazyAMapApiLoaderInstance} from "@vuemap/vue-amap";
import BaseRightControl from "@/views/system/base/baseRightControl.vue";
const router = useRouter()
const maxHeight = ref(window.innerHeight - 100);
const zoom = ref(13);
const center = ref([
116.338461,
39.97947
107.5856025,
22.484856
]);
const baseList = ref([
{
baseId: 1,
position: [116.338461, 39.97947],
label: '测试',
}
},
{
baseId: 2,
position: [107.5856025, 22.484856],
label: '金光农场(广西农垦育种基地)',
},
])
const control = reactive({
//
@ -87,7 +93,7 @@ const selectPoi = ({poi}) => {
v-for="item in baseList"
:position="item.position"
:title="item.label"
:label="{content:item.label,offset:[5,0]}"
:label="{content:item.label,offset:[0,0]}"
:visible="true"
:draggable="false"
@click="clickMarker(item)"
@ -119,10 +125,12 @@ const selectPoi = ({poi}) => {
pointer-events: all;
}
}
.local-icon {
width: 30px;
height: 30px;
}
:deep(.amap-marker-label) {
border: none;
border-radius: 5px;

@ -48,7 +48,7 @@ const mouseToolRef = ref(null)
// ()
const floorSpace = ref(0)
const maxHeight = ref(window.innerHeight - 100);
const zoom = ref(17);
const zoom = ref(16);
//
const protract = ref(false)
//
@ -62,6 +62,54 @@ const gridLines = ref([])
const polygonList = reactive([
{
id: 1,
title: '地块1',
cropType: '甘蔗',
path: [
[
107.585681,
22.481152
],
[
107.585536,
22.481152
],
[
107.585524,
22.48856
],
[
107.585662,
22.48844
],
],
fillColor: undefined
},
{
id: 2,
title: '地块2',
cropType: '甘蔗',
path: [
[
107.585526,
22.481149
],
[
107.585274,
22.481137
],
[
107.585257,
22.48857
],
[
107.585515,
22.48839
]
],
fillColor: undefined
},
{
id: 3,
title: '测试地块1',
cropType: '甘蔗',
path: [
@ -89,7 +137,7 @@ const polygonList = reactive([
fillColor: undefined
},
{
id: 2,
id: 4,
title: '测试地块2',
cropType: '甘蔗',
path: [
@ -160,6 +208,66 @@ const ridgeList = ref([
]
]
},
{
id:1,
polygonId:1,
title:'垄1',
path:[
[
107.585681,
22.481152
],
[
107.585662,
22.48844
]
]
},
{
id:2,
polygonId:1,
title:'垄28',
path:[
[
107.585536,
22.481152
],
[
107.585524,
22.48856
]
]
},
{
id:3,
polygonId:2,
title:'垄1',
path:[
[
107.585526,
22.481149
],
[
107.585515,
22.48839
]
]
},
{
id:3,
polygonId:2,
title:'垄43',
path:[
[
107.585274,
22.481137
],
[
107.585257,
22.48857
]
]
},
])
//
const plantList = ref([
@ -305,8 +413,8 @@ const cancelMassif = () => {
}
//
const center = ref([
116.338461,
39.97947
107.5856025,
22.484856
]);
//
const selectPoi = ({poi}) => {
@ -477,7 +585,6 @@ const toAddMassif = () => {
:path="polygonTemp"
@addnode="updateMassif"
@removenode="updateMassif"
:zooms="[13,20]"
@adjust="updateMassif"
:visible="true"
:editable="true"
@ -496,7 +603,6 @@ const toAddMassif = () => {
<el-amap-polyline
v-if="control.massifGrid"
v-for="grid in gridLines"
:zooms="[16,20]"
stroke-color="#e36ea4"
:path="grid"
:visible="true">
@ -505,7 +611,6 @@ const toAddMassif = () => {
<el-amap-polyline
v-if="control.showRidge"
v-for="ridge in ridgeList"
:zooms="[16,20]"
:strokeWeight="5"
strokeColor="#a4e36e"
:path="ridge.path"

Loading…
Cancel
Save