@mapcatch/util 2.2.1 → 2.2.2
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 +3 -3
- package/dist/catchUtil.min.esm.js +23 -34
- package/dist/catchUtil.min.js +3 -3
- package/package.json +1 -1
|
@@ -10949,46 +10949,28 @@ layerGroups.forEach((e) => {
|
|
|
10949
10949
|
enumerable: !0
|
|
10950
10950
|
});
|
|
10951
10951
|
});
|
|
10952
|
-
const
|
|
10952
|
+
const tk = "faefd6f11b36b9900c352bcceae49b65", resourceTdt = (e) => ({
|
|
10953
|
+
type: "raster",
|
|
10954
|
+
tileSize: 256,
|
|
10955
|
+
tiles: [`https://t0.tianditu.gov.cn/${e}/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=${e.split("_")[0]}&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=${tk}`],
|
|
10956
|
+
maxzoom: 18,
|
|
10957
|
+
layerType: "bmap"
|
|
10958
|
+
}), bmap_types = {
|
|
10953
10959
|
tdt: [
|
|
10954
10960
|
{
|
|
10955
10961
|
type: "image",
|
|
10956
10962
|
img: "satellite",
|
|
10957
10963
|
items: [
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
tileSize: 256,
|
|
10961
|
-
tiles: ["https://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=faefd6f11b36b9900c352bcceae49b65"],
|
|
10962
|
-
maxzoom: 18,
|
|
10963
|
-
layerType: "bmap"
|
|
10964
|
-
},
|
|
10965
|
-
{
|
|
10966
|
-
type: "raster",
|
|
10967
|
-
tileSize: 256,
|
|
10968
|
-
tiles: ["https://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=faefd6f11b36b9900c352bcceae49b65"],
|
|
10969
|
-
maxzoom: 18,
|
|
10970
|
-
layerType: "bmap"
|
|
10971
|
-
}
|
|
10964
|
+
resourceTdt("img_w"),
|
|
10965
|
+
resourceTdt("cia_w")
|
|
10972
10966
|
]
|
|
10973
10967
|
},
|
|
10974
10968
|
{
|
|
10975
10969
|
type: "vector_standard",
|
|
10976
10970
|
img: "vector_standard",
|
|
10977
10971
|
items: [
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
tileSize: 256,
|
|
10981
|
-
tiles: ["https://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=faefd6f11b36b9900c352bcceae49b65"],
|
|
10982
|
-
maxzoom: 18,
|
|
10983
|
-
layerType: "bmap"
|
|
10984
|
-
},
|
|
10985
|
-
{
|
|
10986
|
-
type: "raster",
|
|
10987
|
-
tileSize: 256,
|
|
10988
|
-
tiles: ["https://t0.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=faefd6f11b36b9900c352bcceae49b65"],
|
|
10989
|
-
maxzoom: 18,
|
|
10990
|
-
layerType: "bmap"
|
|
10991
|
-
}
|
|
10972
|
+
resourceTdt("vec_w"),
|
|
10973
|
+
resourceTdt("cva_w")
|
|
10992
10974
|
]
|
|
10993
10975
|
}
|
|
10994
10976
|
],
|
|
@@ -62054,13 +62036,13 @@ function endsWith(e, r) {
|
|
|
62054
62036
|
return e.indexOf(r, e.length - r.length) !== -1;
|
|
62055
62037
|
}
|
|
62056
62038
|
function convertLength(e, r) {
|
|
62057
|
-
return r === "m" ? e : r === "ft" ? e * 3.28084 : e;
|
|
62039
|
+
return r === "m" ? e : r === "ft" ? e * 3.28084 : r === "usft" ? e * 3.280833333 : e;
|
|
62058
62040
|
}
|
|
62059
62041
|
function convertArea(e, r) {
|
|
62060
|
-
return r === "m2" ? e : r === "km2" ? e / 1e6 : r === "mu" ? e / 666.6667 : r === "hm2" ? e / 1e4 : e;
|
|
62042
|
+
return r === "m2" ? e : r === "km2" ? e / 1e6 : r === "mu" ? e / 666.6667 : r === "hm2" ? e / 1e4 : r === "ft2" ? e / 10.763910416709722 : r === "usft2" ? e / 10.763867361111112 : e;
|
|
62061
62043
|
}
|
|
62062
62044
|
function convertVolume(e, r) {
|
|
62063
|
-
return r === "m3" ? e : r === "yd3" ? e * 1.30795062 : r === "ft3" ? e * 35.
|
|
62045
|
+
return r === "m3" ? e : r === "yd3" ? e * 1.30795062 : r === "ft3" ? e * 35.31466672148859 : r === "usft3" ? e * 35.31472482766484 : e;
|
|
62064
62046
|
}
|
|
62065
62047
|
let clickPoint = null;
|
|
62066
62048
|
function _addEventListener(e, r, s) {
|
|
@@ -85415,9 +85397,15 @@ function getCameras(e) {
|
|
|
85415
85397
|
{
|
|
85416
85398
|
title: "P2",
|
|
85417
85399
|
key: "p2"
|
|
85400
|
+
},
|
|
85401
|
+
{
|
|
85402
|
+
title: "K4",
|
|
85403
|
+
key: "k4"
|
|
85418
85404
|
}
|
|
85419
85405
|
];
|
|
85420
85406
|
return r.forEach((H) => {
|
|
85407
|
+
H.camera_model = H?.camera_model ?? 0;
|
|
85408
|
+
let x = H.camera_model ? m.toSpliced(7, 2) : m.toSpliced(9);
|
|
85421
85409
|
u.push({
|
|
85422
85410
|
cameraId: H.id,
|
|
85423
85411
|
forms: [
|
|
@@ -85438,8 +85426,8 @@ function getCameras(e) {
|
|
|
85438
85426
|
value: `${H.width} \xD7 ${H.height}`
|
|
85439
85427
|
}
|
|
85440
85428
|
],
|
|
85441
|
-
calibrationCols:
|
|
85442
|
-
calibrationData: getCameraCalibrationData(H.id, r, s,
|
|
85429
|
+
calibrationCols: x,
|
|
85430
|
+
calibrationData: getCameraCalibrationData(H.id, r, s, x)
|
|
85443
85431
|
});
|
|
85444
85432
|
}), u;
|
|
85445
85433
|
}
|
|
@@ -85447,6 +85435,7 @@ function getCameraCalibrationData(e, r, s, u) {
|
|
|
85447
85435
|
let m = [i18n.t("report.before_calib"), i18n.t("report.after_calib"), i18n.t("report.diff_val")].map((o) => ({ name: o })), H = s.find((o) => o.id === e), x = r.find((o) => o.id === e);
|
|
85448
85436
|
if (!H || !x)
|
|
85449
85437
|
return m;
|
|
85438
|
+
H.parameters.length > x.parameters.length && H.parameters.splice(1, 1);
|
|
85450
85439
|
for (let o = 0; o < u.length - 1; o++) {
|
|
85451
85440
|
let F = o > 5 ? 6 : 4;
|
|
85452
85441
|
m[0][u[o + 1].key] = _$1.round(H.parameters[o], F), m[1][u[o + 1].key] = _$1.round(x.parameters[o], F), m[2][u[o + 1].key] = _$1.round(x.parameters[o] - H.parameters[o], F);
|