diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 3531c65..00c4803 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -803,6 +803,15 @@ 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 + }; +} //开启编辑 const openEdit = () => {