This commit is contained in:
姚宇浩 2024-08-19 17:03:12 +08:00
parent c47aea47fe
commit 79e93bba99
1 changed files with 9 additions and 0 deletions

View File

@ -803,6 +803,15 @@ const initMap = () => {
// //
addJd(); 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 = () => { const openEdit = () => {