fix(coordinates): MGRS are now separed properly

This commit is contained in:
MarcoJayUsai 2025-03-28 22:21:03 +01:00
parent b600b2503b
commit fbc598e3aa
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ export function OlLocation(props: { location: LatLng; className?: string; refere
>
MGRS
</span>
{MGRS ? MGRS.string : "Error"}
{MGRS ? MGRS.groups.join(" ") : "Error"}
</div>
);
} else if (referenceSystem === "LatLngDec") {

View File

@ -46,7 +46,7 @@ export function CoordinatesPanel(props: {}) {
returnString = `${latlng.lat >= 0 ? "N" : "S"} ${DDToDDM(latlng.lat)}, ${latlng.lng >= 0 ? "E" : "W"} ${DDToDDM(latlng.lng)}`;
break;
case "MGRS":
returnString = latLngToMGRS(latlng.lat, latlng.lng, 6)?.string || "Error";
returnString = latLngToMGRS(latlng.lat, latlng.lng, 6)?.groups.join(" ") || "Error";
break;
}