This commit is contained in:
duanxiaohai 2024-08-20 13:41:36 +08:00
parent a583794cc5
commit 5af6dbec1a
2 changed files with 32 additions and 12 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -804,22 +804,28 @@ const initMap = () => {
addJd();
};
function mercatorToLngLat(mercator) {
var x = mercator.lng / 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);
return {
lng: x,
lat: y
};
var x = (mercator.lng / 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);
return {
lng: x,
lat: y,
};
}
//
const openEdit = () => {
console.log(cs_choose_arr.value[0]);
console.log(cs_choose_arr.value[0].points[0]);
cs_choose_arr.value[0].enableEditing();
// let a=gcj02towgs84(13275212.822414309,3334688.527092757)
// let a=gcj02towgs84(13275212.822414309,3334688.527092757)
// console.log(a);
// const mercator = { lat: 3333677.0716418824, lng: 13275345.492864026 };
// const latLng = mercatorToLngLat(mercator);
// console.log(latLng);
};
//
const closeEdit = () => {
@ -3592,9 +3598,24 @@ onMounted(async () => {
z-index: 999;
position: absolute;
color: #ffffff;
top: 80px;
top: 120px;
left: 600px;
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 {
background-image: url(@/assets/images/map/map_title_bg.png);
@ -3799,4 +3820,3 @@ onMounted(async () => {
z-index: 9998;
}
</style>