@mapcatch/util 2.2.5 → 2.2.6
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/catchUtil.min.cjs.js +5 -5
- package/dist/catchUtil.min.esm.js +19 -15
- package/dist/catchUtil.min.js +5 -5
- package/package.json +2 -5
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
|
-
import maplibre from "maplibre-gl";
|
|
3
2
|
let getRandomValues;
|
|
4
3
|
const rnds8 = new Uint8Array(16);
|
|
5
4
|
function rng() {
|
|
@@ -10875,7 +10874,7 @@ function setI18nInstance(e, r) {
|
|
|
10875
10874
|
i18nInstance.instance.addResourceBundle(n, "i18n", locales[n], !0, !0);
|
|
10876
10875
|
}), t = i18nInstance.instance.t) : r === "vue-i18n" && (Object.entries(locales).forEach(([n, o]) => {
|
|
10877
10876
|
e.global.mergeLocaleMessage(n, o);
|
|
10878
|
-
}),
|
|
10877
|
+
}), t = i18nInstance.instance.global.t);
|
|
10879
10878
|
}
|
|
10880
10879
|
function getI18nInstance() {
|
|
10881
10880
|
return i18nInstance;
|
|
@@ -52335,7 +52334,7 @@ crsList.forEach((e) => {
|
|
|
52335
52334
|
const errorCodes = {
|
|
52336
52335
|
1: "\u610F\u5916\u9000\u51FA",
|
|
52337
52336
|
1e3: "\u91CD\u5EFA\u5931\u8D25\uFF0C\u8BF7\u89E3\u6790\u65E5\u5FD7\u67E5\u770B\u539F\u56E0",
|
|
52338
|
-
1001: "\
|
|
52337
|
+
1001: "\u5185\u5B58\u4E0D\u8DB3",
|
|
52339
52338
|
1002: "\u5750\u6807\u7CFB\u7EDF\u9519\u8BEF",
|
|
52340
52339
|
1003: "\u7A7A\u4E09\u6210\u679C\u4E3A\u7A7A",
|
|
52341
52340
|
1004: "\u70B9\u4E91\u6210\u679C\u4E3A\u7A7A",
|
|
@@ -52356,7 +52355,10 @@ const errorCodes = {
|
|
|
52356
52355
|
3e3: "\u6587\u4EF6\u8BFB\u5199\u9519\u8BEF",
|
|
52357
52356
|
3001: "JSON\u5B57\u6BB5\u89E3\u6790\u9519\u8BEF",
|
|
52358
52357
|
3002: "\u7167\u7247\u8BFB\u53D6\u9519\u8BEF",
|
|
52359
|
-
|
|
52358
|
+
3004: "\u673A\u5668\u5B66\u4E60\u6A21\u578B\u8BFB\u53D6\u9519\u8BEF",
|
|
52359
|
+
4e3: "GPU\u8BBE\u5907\u9519\u8BEF\uFF0C\u68C0\u67E5GPU\u662F\u5426\u4E3A\u82F1\u4F1F\u8FBE\u4EE5\u53CA\u9A71\u52A8\u53F7\u662F\u5426\u6EE1\u8DB3\u8981\u6C42",
|
|
52360
|
+
5e3: "\u96F7\u8FBE\u6570\u636E\u8BFB\u53D6\u9519\u8BEF",
|
|
52361
|
+
5001: "\u70B9\u4E91\u548C\u8F68\u8FF9\u65F6\u95F4\u6233\u5339\u914D\u9519\u8BEF",
|
|
52360
52362
|
64: "\u7F51\u7EDC\u9519\u8BEF",
|
|
52361
52363
|
74: "\u7F51\u7EDC\u8BF7\u6C42\u8D85\u65F6",
|
|
52362
52364
|
83886084: "\u627E\u4E0D\u5230\u670D\u52A1\u5668",
|
|
@@ -60350,6 +60352,8 @@ function getTilePixelCoord(e, r) {
|
|
|
60350
60352
|
};
|
|
60351
60353
|
}
|
|
60352
60354
|
function getUTMProjection(e) {
|
|
60355
|
+
if (e < -180 || e > 180)
|
|
60356
|
+
return null;
|
|
60353
60357
|
let r = 32600, n = Math.ceil((e + 180) / 6);
|
|
60354
60358
|
return {
|
|
60355
60359
|
type: 3,
|
|
@@ -75639,7 +75643,7 @@ async function _formatMetadata(e, r = 1) {
|
|
|
75639
75643
|
async function getImageSize(e) {
|
|
75640
75644
|
try {
|
|
75641
75645
|
let r = await getFileBuffer(e), n = lookup(r), o, s = getFileExtent(e);
|
|
75642
|
-
if (s === "tif" || s === "tiff") {
|
|
75646
|
+
if (s === "tif" || s === "tiff" || s === "png") {
|
|
75643
75647
|
let l;
|
|
75644
75648
|
typeof e == "string" ? l = e : typeof window < "u" && e instanceof window.File ? l = e.name : l = Buffer.concat([r.subarray(0, 10240), r.subarray(r.length / 2, 10240), r.subarray(-10240)]), typeof l == "string" ? typeof Buffer < "u" ? o = getMd5(Buffer.from(l)) : o = getMd5(new TextEncoder().encode(l)) : o = getMd5(l);
|
|
75645
75649
|
} else
|
|
@@ -83978,7 +83982,7 @@ function getSurveyOverview(e, r) {
|
|
|
83978
83982
|
{
|
|
83979
83983
|
label: i18n.t("report.gsd"),
|
|
83980
83984
|
unit: "m",
|
|
83981
|
-
value: r.scene_gsd ? `${_$1.round(r.scene_gsd,
|
|
83985
|
+
value: r.scene_gsd ? `${_$1.round(r.scene_gsd, 5)}` : i18n.t("report.no_data")
|
|
83982
83986
|
},
|
|
83983
83987
|
{
|
|
83984
83988
|
label: i18n.t("report.zone_area"),
|
|
@@ -84692,13 +84696,13 @@ function getStyle(e, r) {
|
|
|
84692
84696
|
}
|
|
84693
84697
|
}), n;
|
|
84694
84698
|
}
|
|
84695
|
-
function initMap(e, r) {
|
|
84696
|
-
return new Promise((
|
|
84697
|
-
let
|
|
84698
|
-
|
|
84699
|
-
let
|
|
84700
|
-
container:
|
|
84701
|
-
style:
|
|
84699
|
+
function initMap(e, r, n) {
|
|
84700
|
+
return new Promise((o) => {
|
|
84701
|
+
let s = getStyle(e, r), l = document.createElement("div");
|
|
84702
|
+
l.style.width = "800px", l.style.height = "400px", l.style.position = "absolute", l.style.zIndex = "-1", document.body.appendChild(l);
|
|
84703
|
+
let c = new n.Map({
|
|
84704
|
+
container: l,
|
|
84705
|
+
style: s,
|
|
84702
84706
|
bearing: 0,
|
|
84703
84707
|
pitch: 0,
|
|
84704
84708
|
center: [110.9, 32.79],
|
|
@@ -84710,8 +84714,8 @@ function initMap(e, r) {
|
|
|
84710
84714
|
preserveDrawingBuffer: !0,
|
|
84711
84715
|
localFontFamily: "sans-serif"
|
|
84712
84716
|
});
|
|
84713
|
-
|
|
84714
|
-
|
|
84717
|
+
c.on("load", () => {
|
|
84718
|
+
o(c);
|
|
84715
84719
|
});
|
|
84716
84720
|
});
|
|
84717
84721
|
}
|