@mapcatch/util 2.0.7 → 2.0.9-a

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.
@@ -6815,17 +6815,17 @@ const layerGroups = [
6815
6815
  point: [
6816
6816
  {
6817
6817
  field: "lng",
6818
- label: "\u7ECF\u5EA6\uFF08X\uFF09",
6818
+ label: "\u7ECF\u5EA6/X",
6819
6819
  unit: ""
6820
6820
  },
6821
6821
  {
6822
6822
  field: "lat",
6823
- label: "\u7EAC\u5EA6\uFF08Y\uFF09",
6823
+ label: "\u7EAC\u5EA6/Y",
6824
6824
  unit: ""
6825
6825
  },
6826
6826
  {
6827
6827
  field: "height",
6828
- label: "\u9AD8\u7A0B\uFF08Z\uFF09",
6828
+ label: "\u9AD8\u7A0B/Z",
6829
6829
  unit: "m"
6830
6830
  }
6831
6831
  ],
@@ -70675,7 +70675,7 @@ function _formatMetadata(e, n = 1) {
70675
70675
  return es(this, null, function* () {
70676
70676
  let l = yield getFileBuffer(e, n), u = getMd5(l);
70677
70677
  return new Promise((d, p) => {
70678
- getData(l, function(y, o) {
70678
+ getData(l.buffer, function(y, o) {
70679
70679
  if (o)
70680
70680
  return o.message === "Offset is outside the bounds of the DataView" && n < 3 ? d(_formatMetadata(e, n + 1)) : p(o);
70681
70681
  let { exif: j, xmp: Re } = getAllTags(y);
@@ -70729,18 +70729,17 @@ function getFileExtent(e) {
70729
70729
  }
70730
70730
  function getFileBuffer(e, n) {
70731
70731
  return es(this, null, function* () {
70732
- if (typeof e == "string") {
70733
- const l = require("fs");
70732
+ if (typeof e == "string")
70734
70733
  if (n) {
70735
- let u = l.openSync(e), d = Buffer.alloc(65536 * n);
70736
- return yield new Promise((p) => {
70737
- l.read(u, d, 0, d.length, 0, () => {
70738
- p(), l.closeSync(u);
70734
+ let l = fs.openSync(e), u = Buffer.alloc(65536 * n);
70735
+ return yield new Promise((d) => {
70736
+ fs.read(l, u, 0, u.length, 0, () => {
70737
+ d(), fs.closeSync(l);
70739
70738
  });
70740
- }), d.buffer;
70739
+ }), u;
70741
70740
  } else
70742
- return l.readFileSync(e).buffer;
70743
- } else
70741
+ return fs.readFileSync(e);
70742
+ else
70744
70743
  return n && (e = e.slice(0, 65536 * n)), yield new Promise((l, u) => {
70745
70744
  var d = new FileReader();
70746
70745
  d.readAsArrayBuffer(e), d.onload = (p) => {
@@ -112515,7 +112514,7 @@ function getStyle(e, n) {
112515
112514
  "background-color": "#000000"
112516
112515
  }
112517
112516
  });
112518
- let { taskName: u, projectName: d, user_id: p, data_type: y } = n, o = y === "infrared" ? "tmp" : "dom", j = `http://127.0.0.1:10024/${p}/${encodeURIComponent(d)}/${encodeURIComponent(u)}/result/2D/${layerFolders[o]}/{z}/{x}/{y}.webp`;
112517
+ let { taskName: u, projectName: d, user_id: p, data_type: y } = n, o = y === "infrared" ? "tmp" : "dom", j = `http://127.0.0.1:${window.baseServerPort}/${p}/${encodeURIComponent(d)}/${encodeURIComponent(u)}/result/2D/${layerFolders[o]}/{z}/{x}/{y}.webp`;
112519
112518
  return l.sources.dom_image = {
112520
112519
  type: "raster",
112521
112520
  tiles: [j],