解决集结地点位经度越过180°时计算错误的问题

This commit is contained in:
zh
2025-08-15 10:16:05 +08:00
parent eec0ca44c0
commit 08bdd515a9
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ class DrawAssemble extends Draw {
if (this.points_ids.length === 1) {
let pnts = new Array();
this.positions.forEach((item) => {
if(item.lng<=0) {
if(item.lng<-90) {
item.lng += 360
}
pnts.push([item.lng, item.lat]);

View File

@ -503,7 +503,7 @@ class Tools {
let points = positions.length;
let pnts = new Array();
positions.forEach((item) => {
if(item.lng<=0) {
if(item.lng<-90) {
item.lng += 360
}
pnts.push([item.lng, item.lat]);