添加路径点选项

This commit is contained in:
Shikong 2023-05-17 17:18:36 +08:00
parent 3ea7becaa6
commit 712e9afcf3

View File

@ -8,6 +8,14 @@
<q-btn @click="search">查询</q-btn>
</div>
<div class="flex justify-end flex-wrap items-center p-1">
<q-toggle
label="显示所有路径点"
v-model="options.showMarker"
color="primary"
@update:model-value="redrawMap"
keep-color
/>
<q-toggle
label="仅使用高精度定位"
v-model="options.useHighAccuracyLocation"
@ -119,7 +127,8 @@ const layers = reactive({
}
})
const options = reactive({
useHighAccuracyLocation: true
useHighAccuracyLocation: true,
showMarker: false,
})
const authModel = reactive({
@ -151,11 +160,15 @@ function login(){
})
}
function toggleUseHighAccuracyLocation(){
function redrawMap(){
clearMap()
drawMap()
}
function toggleUseHighAccuracyLocation(){
redrawMap()
}
function toggleSatellite(){
if (layers.satellite.show) {
layers.satellite.inst.show()
@ -362,8 +375,11 @@ function drawMap(){
allowCollision: false,
});
data.labelsLayer = labelsLayer
if(options.showMarker){
labelsLayer.add(markers)
map.add(data.labelsLayer)
}
let lines = []
let prev = moment(0)