diff --git a/dist.zip b/dist.zip index 79e39a1..778896f 100644 Binary files a/dist.zip and b/dist.zip differ diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 00c4803..80db6e9 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -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; } -