站点信息
This commit is contained in:
parent
4d6f8bbb30
commit
7a8c8edc0b
@ -210,6 +210,7 @@
|
|||||||
} = arrPoint[0];
|
} = arrPoint[0];
|
||||||
if (type == "add") {
|
if (type == "add") {
|
||||||
map.reverseGeocoder(qqmapsdk, longitude, latitude, (res) => {
|
map.reverseGeocoder(qqmapsdk, longitude, latitude, (res) => {
|
||||||
|
console.log("3333333333333","reverseGeocoder",longitude, latitude,res)
|
||||||
const {
|
const {
|
||||||
formatted_addresses: {
|
formatted_addresses: {
|
||||||
recommend
|
recommend
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.divSearchCel {
|
.divSearchCel {
|
||||||
line-height: 3px;
|
line-height: 5px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :style="{width:'100vw',height}">
|
<div :style="{width:'100vw',height}">
|
||||||
<map id="mapRef" ref="mapRef" :style="{width:'100vw',height}" show-location :markers="markers"
|
<map id="mapRef" ref="mapRef" :style="{width:'100vw',height}" show-location :longitude="mapcenter.longitude"
|
||||||
:polygons="polygons" :circles="circles" :polyline="polyline" :scale="scale" @tap="mapTap" />
|
:latitude="mapcenter.latitude" :markers="markers" :polygons="polygons" :circles="circles"
|
||||||
|
:polyline="polyline" :scale="scale" @tap="mapTap" />
|
||||||
<div class="divNav">
|
<div class="divNav">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -84,6 +85,10 @@
|
|||||||
const title = ref("新建站点");
|
const title = ref("新建站点");
|
||||||
let isload = false;
|
let isload = false;
|
||||||
let oMap = null;
|
let oMap = null;
|
||||||
|
const mapcenter = ref({
|
||||||
|
longitude: "",
|
||||||
|
latitude: ""
|
||||||
|
})
|
||||||
const scale = ref(18);
|
const scale = ref(18);
|
||||||
const polygons = ref([]);
|
const polygons = ref([]);
|
||||||
const circles = ref([]);
|
const circles = ref([]);
|
||||||
@ -375,7 +380,10 @@
|
|||||||
latitude,
|
latitude,
|
||||||
longitude
|
longitude
|
||||||
} = res;
|
} = res;
|
||||||
|
mapcenter.value={
|
||||||
|
latitude,
|
||||||
|
longitude
|
||||||
|
};
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,14 +413,19 @@
|
|||||||
let index = findIndex(arrCirclesData, obj);
|
let index = findIndex(arrCirclesData, obj);
|
||||||
|
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
const {latitude,longitude}=arrCircles_region[index];
|
const {
|
||||||
|
latitude,
|
||||||
|
longitude
|
||||||
|
} = arrCircles_region[index];
|
||||||
arrCirclesData.splice(index, 1);
|
arrCirclesData.splice(index, 1);
|
||||||
arrCircles_region.splice(index, 1);
|
arrCircles_region.splice(index, 1);
|
||||||
arrEditC.push(map.addCirle(drawColor, drawFillColor, longitude, latitude, radius.value));
|
arrEditC.push(map.addCirle(drawColor, drawFillColor, longitude, latitude, radius.value));
|
||||||
} else {
|
} else {
|
||||||
index = findIndex(arrPolygonsData, obj);
|
index = findIndex(arrPolygonsData, obj);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
const {points:arrPoint}=arrPolygons_region[index];
|
const {
|
||||||
|
points: arrPoint
|
||||||
|
} = arrPolygons_region[index];
|
||||||
arrPolygonsData.splice(index, 1);
|
arrPolygonsData.splice(index, 1);
|
||||||
arrPolygons_region.splice(index, 1);
|
arrPolygons_region.splice(index, 1);
|
||||||
arrEditP.push(map.addPolygon(drawColor, drawFillColor, arrPoint))
|
arrEditP.push(map.addPolygon(drawColor, drawFillColor, arrPoint))
|
||||||
@ -430,7 +443,10 @@
|
|||||||
|
|
||||||
|
|
||||||
function defualtZoom() {
|
function defualtZoom() {
|
||||||
if (polygons.value.length == 0) return;
|
console.log("888888888888888888defualtZoom", polygons.value)
|
||||||
|
if (polygons.value.length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const arrPoint = polygons.value[0].points;
|
const arrPoint = polygons.value[0].points;
|
||||||
oMap.includePoints({
|
oMap.includePoints({
|
||||||
points: arrPoint,
|
points: arrPoint,
|
||||||
@ -455,11 +471,12 @@
|
|||||||
oMap = map.getMap("mapRef", getCurrentInstance());
|
oMap = map.getMap("mapRef", getCurrentInstance());
|
||||||
//oMap.moveToLocation();
|
//oMap.moveToLocation();
|
||||||
isload = true;
|
isload = true;
|
||||||
|
getLocation();
|
||||||
defualtZoom();
|
defualtZoom();
|
||||||
});
|
});
|
||||||
|
|
||||||
onLoad(options => {
|
onLoad(options => {
|
||||||
console.log("33333333333333333","options",options)
|
console.log("33333333333333333", "options,isload", options,isload)
|
||||||
let title = "站点地图";
|
let title = "站点地图";
|
||||||
const {
|
const {
|
||||||
type,
|
type,
|
||||||
@ -493,6 +510,8 @@
|
|||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title
|
title
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
loadData();
|
loadData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -56,7 +56,7 @@ export const reverseGeocoder = (qqmapsdk, longitude, latitude, success, fail) =>
|
|||||||
if (success) success(res.result);
|
if (success) success(res.result);
|
||||||
},
|
},
|
||||||
fail: (res) => {
|
fail: (res) => {
|
||||||
if (fail) success(fail);
|
if (fail) fail(res);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ export function getOperation(zoneId, callback) {
|
|||||||
} = item;
|
} = item;
|
||||||
arrRegionID.push(regionId);
|
arrRegionID.push(regionId);
|
||||||
const scolor = "#578FD4";
|
const scolor = "#578FD4";
|
||||||
const fcolor = "rgba(192,218,245,0.3)";
|
const fcolor = "#c0daf54d";
|
||||||
if (shapeType == 1) {
|
if (shapeType == 1) {
|
||||||
const {
|
const {
|
||||||
longitude: lng,
|
longitude: lng,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user