@idm-plugin/geo 1.6.7 → 1.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1214,7 +1214,7 @@ class a {
|
|
|
1214
1214
|
M = a.strReplace(M, "LNG");
|
|
1215
1215
|
const O = M[M.length - 1].toUpperCase();
|
|
1216
1216
|
M = M.substring(0, M.length - 1).trim();
|
|
1217
|
-
const A = M.split(" ").filter((q) => q !== "").map((q) => Number(q));
|
|
1217
|
+
const A = M.split(" ").filter((q) => q !== "").map((q) => Math.abs(Number(q)));
|
|
1218
1218
|
let [b, W] = A;
|
|
1219
1219
|
if (W = W > 60 ? W / Math.pow(10, String(W).length - 2) : W, b > 360 && !W) {
|
|
1220
1220
|
const q = this.roundPrecision(b / 100, 0);
|
|
@@ -1231,7 +1231,7 @@ class a {
|
|
|
1231
1231
|
M = a.strReplace(M, "LAT");
|
|
1232
1232
|
const O = M[M.length - 1].toUpperCase();
|
|
1233
1233
|
M = M.substring(0, M.length - 1).trim();
|
|
1234
|
-
const A = M.split(" ").filter((q) => q !== "").map((q) => Number(q));
|
|
1234
|
+
const A = M.split(" ").filter((q) => q !== "").map((q) => Math.abs(Number(q)));
|
|
1235
1235
|
let [b, W] = A;
|
|
1236
1236
|
if (W = W > 60 ? W / Math.pow(10, String(W).length - 2) : W, b > 90 && !W) {
|
|
1237
1237
|
const q = this.roundPrecision(b / 100, 0);
|
|
@@ -1282,7 +1282,7 @@ class a {
|
|
|
1282
1282
|
return M;
|
|
1283
1283
|
}
|
|
1284
1284
|
static strReplace(M, z = "LAT") {
|
|
1285
|
-
M = M.replace(/([0-9]+)\.([0-9]+\.[0-9]+)/g, "$1 $2").replace(
|
|
1285
|
+
M = M.replace(/([0-9]+)\.([0-9]+\.[0-9]+)/g, "$1 $2").replace(/([0-9]+)-([0-9]+\.[0-9]+)/g, "$1 $2").replace(/°/, " ").replace(/'/g, " ").replace(/′/g, " ").replace(/"/g, " ").replace(/∼/g, " ").replace(/°/g, " ").replace(/,/g, ".").replace(/^ /g, "").replace(/ $/g, "").trim();
|
|
1286
1286
|
const p = M[M.length - 1].toUpperCase();
|
|
1287
1287
|
if (!["N", "S", "E", "W"].includes(p)) {
|
|
1288
1288
|
const O = M, A = Number(O.split(" ")[0]);
|