添加路径点选项
This commit is contained in:
parent
3ea7becaa6
commit
712e9afcf3
@ -8,6 +8,14 @@
|
|||||||
<q-btn @click="search">查询</q-btn>
|
<q-btn @click="search">查询</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end flex-wrap items-center p-1">
|
<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
|
<q-toggle
|
||||||
label="仅使用高精度定位"
|
label="仅使用高精度定位"
|
||||||
v-model="options.useHighAccuracyLocation"
|
v-model="options.useHighAccuracyLocation"
|
||||||
@ -119,7 +127,8 @@ const layers = reactive({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const options = reactive({
|
const options = reactive({
|
||||||
useHighAccuracyLocation: true
|
useHighAccuracyLocation: true,
|
||||||
|
showMarker: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
const authModel = reactive({
|
const authModel = reactive({
|
||||||
@ -151,11 +160,15 @@ function login(){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleUseHighAccuracyLocation(){
|
function redrawMap(){
|
||||||
clearMap()
|
clearMap()
|
||||||
drawMap()
|
drawMap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleUseHighAccuracyLocation(){
|
||||||
|
redrawMap()
|
||||||
|
}
|
||||||
|
|
||||||
function toggleSatellite(){
|
function toggleSatellite(){
|
||||||
if (layers.satellite.show) {
|
if (layers.satellite.show) {
|
||||||
layers.satellite.inst.show()
|
layers.satellite.inst.show()
|
||||||
@ -362,8 +375,11 @@ function drawMap(){
|
|||||||
allowCollision: false,
|
allowCollision: false,
|
||||||
});
|
});
|
||||||
data.labelsLayer = labelsLayer
|
data.labelsLayer = labelsLayer
|
||||||
labelsLayer.add(markers)
|
|
||||||
map.add(data.labelsLayer)
|
if(options.showMarker){
|
||||||
|
labelsLayer.add(markers)
|
||||||
|
map.add(data.labelsLayer)
|
||||||
|
}
|
||||||
|
|
||||||
let lines = []
|
let lines = []
|
||||||
let prev = moment(0)
|
let prev = moment(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user