111
This commit is contained in:
parent
c86f041201
commit
d73a294967
|
@ -804,43 +804,48 @@ const initMap = () => {
|
||||||
//添加街道名
|
//添加街道名
|
||||||
addJd();
|
addJd();
|
||||||
};
|
};
|
||||||
const getCssj=()=>{
|
const getCssj = () => {
|
||||||
http.get("/api/ggfwyth/regionalDivision/getCsRegionalDivision").then((res) => {
|
http
|
||||||
if(res.code == 200){
|
.get("/api/ggfwyth/regionalDivision/getCsRegionalDivision")
|
||||||
cssj=JSON.parse(res.data);
|
.then((res) => {
|
||||||
}
|
if (res.code == 200) {
|
||||||
});
|
cssj = JSON.parse(res.data);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
var arrJWD = [[[]]];
|
var arrJWD = [[[]]];
|
||||||
|
var arr1;
|
||||||
|
var iii;
|
||||||
//百度bd09墨卡托坐标转换百度bd09经纬度坐标
|
//百度bd09墨卡托坐标转换百度bd09经纬度坐标
|
||||||
const bd09 = async (x, y) => {
|
const bd09 = async (x, y, index) => {
|
||||||
|
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);
|
||||||
var convertor = new BMapGL.Convertor();
|
var convertor = new BMapGL.Convertor();
|
||||||
convertor.translate(pointArr, COORDINATES_BD09_MC, COORDINATES_BD09, (e) => {
|
convertor.translate(pointArr, COORDINATES_BD09_MC, COORDINATES_BD09, (e) => {
|
||||||
let arr1 = [];
|
arr1 = [];
|
||||||
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();
|
||||||
console.log(cs_choose_arr.value[0]);
|
console.log(cs_choose_arr.value[0]);
|
||||||
// bd09(13274780.785348017,3334646.4713317254);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//关闭编辑
|
//关闭编辑
|
||||||
const closeEdit = () => {
|
const closeEdit = () => {
|
||||||
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) => {
|
cs_choose_arr.value[0].points.forEach((item, index) => {
|
||||||
bd09(item.lng, item.lat,index);
|
bd09(item.lng, item.lat, index);
|
||||||
});
|
});
|
||||||
console.log("arrJWD", arrJWD);
|
console.log("arrJWD", arrJWD);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue