This commit is contained in:
parent
d73a294967
commit
aa24dc255a
|
@ -816,10 +816,8 @@ const getCssj = () => {
|
||||||
|
|
||||||
var arrJWD = [[[]]];
|
var arrJWD = [[[]]];
|
||||||
var arr1;
|
var arr1;
|
||||||
var iii;
|
|
||||||
//百度bd09墨卡托坐标转换百度bd09经纬度坐标
|
//百度bd09墨卡托坐标转换百度bd09经纬度坐标
|
||||||
const bd09 = async (x, y, index) => {
|
const bd09 = (x, y) => {
|
||||||
iii=index;
|
|
||||||
var ggPoint = new BMapGL.Point(x, y);
|
var ggPoint = new BMapGL.Point(x, y);
|
||||||
var pointArr = [];
|
var pointArr = [];
|
||||||
pointArr.push(ggPoint);
|
pointArr.push(ggPoint);
|
||||||
|
@ -829,11 +827,9 @@ const bd09 = async (x, y, index) => {
|
||||||
arr1.push(e.points[0].lng);
|
arr1.push(e.points[0].lng);
|
||||||
arr1.push(e.points[0].lat);
|
arr1.push(e.points[0].lat);
|
||||||
console.log("arr1", arr1);
|
console.log("arr1", arr1);
|
||||||
arr1.push(iii);
|
|
||||||
arrJWD[0][0].push(arr1);
|
arrJWD[0][0].push(arr1);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//开启编辑
|
//开启编辑
|
||||||
const openEdit = () => {
|
const openEdit = () => {
|
||||||
cs_choose_arr.value[0].enableEditing();
|
cs_choose_arr.value[0].enableEditing();
|
||||||
|
@ -841,12 +837,21 @@ const openEdit = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
//关闭编辑
|
//关闭编辑
|
||||||
const closeEdit = () => {
|
const closeEdit = async () => {
|
||||||
cs_choose_arr.value[0].disableEditing();
|
cs_choose_arr.value[0].disableEditing();
|
||||||
console.log(cs_choose_arr.value[0]);
|
console.log(cs_choose_arr.value[0]);
|
||||||
cs_choose_arr.value[0].points.forEach((item, index) => {
|
for (const item of cs_choose_arr.value[0].points) {
|
||||||
bd09(item.lng, item.lat, index);
|
if (item?.latLng) {
|
||||||
});
|
arr1 = [];
|
||||||
|
arr1.push(item?.latLng.lng);
|
||||||
|
arr1.push(item?.latLng.lat);
|
||||||
|
arrJWD[0][0].push(arr1);
|
||||||
|
} else {
|
||||||
|
bd09(item.lng, item.lat);
|
||||||
|
//延迟0.1秒,保证convertor.translate执行完
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 100));
|
||||||
|
}
|
||||||
|
}
|
||||||
console.log("arrJWD", arrJWD);
|
console.log("arrJWD", arrJWD);
|
||||||
};
|
};
|
||||||
//点击龙游县初始化
|
//点击龙游县初始化
|
||||||
|
|
Loading…
Reference in New Issue