This commit is contained in:
parent
a583794cc5
commit
5af6dbec1a
|
@ -804,22 +804,28 @@ const initMap = () => {
|
||||||
addJd();
|
addJd();
|
||||||
};
|
};
|
||||||
function mercatorToLngLat(mercator) {
|
function mercatorToLngLat(mercator) {
|
||||||
var x = mercator.lng / 20037508.34 * 180;
|
var x = (mercator.lng / 20037508.34) * 180;
|
||||||
var y = mercator.lat / 20037508.34 * 180;
|
var y = (mercator.lat / 20037508.34) * 180;
|
||||||
y = 180 / Math.PI * (2 * Math.atan(Math.exp(y * Math.PI / 180)) - Math.PI / 2);
|
y =
|
||||||
return {
|
(180 / Math.PI) *
|
||||||
lng: x,
|
(2 * Math.atan(Math.exp((y * Math.PI) / 180)) - Math.PI / 2);
|
||||||
lat: y
|
return {
|
||||||
};
|
lng: x,
|
||||||
|
lat: y,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//开启编辑
|
//开启编辑
|
||||||
const openEdit = () => {
|
const openEdit = () => {
|
||||||
console.log(cs_choose_arr.value[0]);
|
console.log(cs_choose_arr.value[0].points[0]);
|
||||||
cs_choose_arr.value[0].enableEditing();
|
cs_choose_arr.value[0].enableEditing();
|
||||||
|
|
||||||
// let a=gcj02towgs84(13275212.822414309,3334688.527092757)
|
// let a=gcj02towgs84(13275212.822414309,3334688.527092757)
|
||||||
// console.log(a);
|
// console.log(a);
|
||||||
|
// const mercator = { lat: 3333677.0716418824, lng: 13275345.492864026 };
|
||||||
|
// const latLng = mercatorToLngLat(mercator);
|
||||||
|
// console.log(latLng);
|
||||||
};
|
};
|
||||||
//关闭编辑
|
//关闭编辑
|
||||||
const closeEdit = () => {
|
const closeEdit = () => {
|
||||||
|
@ -3592,9 +3598,24 @@ onMounted(async () => {
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
top: 80px;
|
top: 120px;
|
||||||
left: 600px;
|
left: 600px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
|
.btnopen {
|
||||||
|
background-color: skyblue;
|
||||||
|
padding: 5px 10px;
|
||||||
|
border-radius: 3px 0 0 3px;
|
||||||
|
}
|
||||||
|
.btnsave {
|
||||||
|
background-color: skyblue;
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
.btnclose {
|
||||||
|
background-color: skyblue;
|
||||||
|
padding: 5px 10px;
|
||||||
|
border-radius: 0 3px 3px 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
background-image: url(@/assets/images/map/map_title_bg.png);
|
background-image: url(@/assets/images/map/map_title_bg.png);
|
||||||
|
@ -3799,4 +3820,3 @@ onMounted(async () => {
|
||||||
z-index: 9998;
|
z-index: 9998;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue