qy-vue-plugins 0.1.26 → 0.1.27
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/chunks/{MapView-CPtBXPNN.js → MapView-BH4pj8R5.js} +91 -89
- package/dist/chunks/MapView-CuJvhcA4.js +5 -0
- package/dist/chunks/{lerc-C6hy7wwt.js → lerc-BFT59NbM.js} +1 -1
- package/dist/chunks/{lerc-DUe7LuVV.js → lerc-DOkenKh5.js} +1 -1
- package/dist/mapbox/MapView.cjs +1 -1
- package/dist/mapbox/MapView.mjs +1 -1
- package/dist/mapbox/widgets/ShapeDialog.cjs +1 -1
- package/dist/mapbox/widgets/ShapeDialog.mjs +1 -1
- package/dist/mapbox.cjs +1 -1
- package/dist/mapbox.mjs +10 -9
- package/dist/qy-vue-plugins.css +1 -1
- package/dist/types/mapbox/MapView.vue.d.ts +1 -0
- package/dist/types/mapbox/index.d.ts +2 -2
- package/dist/types/mapbox/useTif.d.ts +1 -0
- package/package/mapbox/index.ts +2 -2
- package/package/mapbox/useTif.ts +3 -0
- package/package.json +1 -1
- package/dist/chunks/MapView-_PQa8Dp3.js +0 -5
|
@@ -208,11 +208,11 @@ function Ni() {
|
|
|
208
208
|
const g = m !== -1 && y[m - 1] === "/";
|
|
209
209
|
if (s && console.log("[xml-utils] selfClosing:", g), g === !1)
|
|
210
210
|
if (f) {
|
|
211
|
-
let b = 0,
|
|
211
|
+
let b = 0, S = 1, v = 0;
|
|
212
212
|
for (; (m = e(y, "[ /]" + i + ">", b)) !== -1; ) {
|
|
213
213
|
const O = y.substring(b, m + 1);
|
|
214
|
-
if (
|
|
215
|
-
>]`), v += r(O, "</" + i + ">"), v >=
|
|
214
|
+
if (S += r(O, "<" + i + `[
|
|
215
|
+
>]`), v += r(O, "</" + i + ">"), v >= S) break;
|
|
216
216
|
b = m;
|
|
217
217
|
}
|
|
218
218
|
} else
|
|
@@ -521,7 +521,7 @@ le([8, 32946], () => import("./deflate-DbhbvOaP.js").then((t) => t.default));
|
|
|
521
521
|
le(32773, () => import("./packbits-BuzK6gM3.js").then((t) => t.default));
|
|
522
522
|
le(
|
|
523
523
|
34887,
|
|
524
|
-
() => import("./lerc-
|
|
524
|
+
() => import("./lerc-DOkenKh5.js").then(async (t) => (await t.zstd.init(), t)).then((t) => t.default)
|
|
525
525
|
);
|
|
526
526
|
le(50001, () => import("./webimage--SJddlky.js").then((t) => t.default));
|
|
527
527
|
function Ge(t, e, r, n = 1) {
|
|
@@ -551,8 +551,8 @@ function Wi(t, e, r, n, o) {
|
|
|
551
551
|
for (let l = 0; l < o; ++l) {
|
|
552
552
|
const h = c * l, y = Math.floor(h), m = Math.min(Math.ceil(h), r - 1);
|
|
553
553
|
for (let g = 0; g < n; ++g) {
|
|
554
|
-
const d = i * g, I = d % 1, p = Math.floor(d), b = Math.min(Math.ceil(d), e - 1),
|
|
555
|
-
me(
|
|
554
|
+
const d = i * g, I = d % 1, p = Math.floor(d), b = Math.min(Math.ceil(d), e - 1), S = s[y * e + p], v = s[y * e + b], O = s[m * e + p], F = s[m * e + b], U = me(
|
|
555
|
+
me(S, v, I),
|
|
556
556
|
me(O, F, I),
|
|
557
557
|
h % 1
|
|
558
558
|
);
|
|
@@ -593,13 +593,13 @@ function tr(t, e, r, n, o, i) {
|
|
|
593
593
|
const h = s * l, y = Math.floor(h), m = Math.min(Math.ceil(h), r - 1);
|
|
594
594
|
for (let g = 0; g < n; ++g) {
|
|
595
595
|
const d = c * g, I = d % 1, p = Math.floor(d), b = Math.min(Math.ceil(d), e - 1);
|
|
596
|
-
for (let
|
|
597
|
-
const v = t[y * e * i + p * i +
|
|
596
|
+
for (let S = 0; S < i; ++S) {
|
|
597
|
+
const v = t[y * e * i + p * i + S], O = t[y * e * i + b * i + S], F = t[m * e * i + p * i + S], U = t[m * e * i + b * i + S], X = me(
|
|
598
598
|
me(v, O, I),
|
|
599
599
|
me(F, U, I),
|
|
600
600
|
h % 1
|
|
601
601
|
);
|
|
602
|
-
f[l * n * i + g * i +
|
|
602
|
+
f[l * n * i + g * i + S] = X;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
}
|
|
@@ -680,8 +680,8 @@ function nr(t, e, r, n, o, i, c) {
|
|
|
680
680
|
const I = d * g;
|
|
681
681
|
for (let p = 0; p < i; ++p) {
|
|
682
682
|
const b = I + p * l * o;
|
|
683
|
-
for (let
|
|
684
|
-
const v = b +
|
|
683
|
+
for (let S = 0; S < l; ++S) {
|
|
684
|
+
const v = b + S * o, O = (d * i + p) * l + S, F = Math.floor(v / 8), U = v % 8;
|
|
685
685
|
if (U + o <= 8)
|
|
686
686
|
h[O] = s.getUint8(F) >> 8 - o - U & y;
|
|
687
687
|
else if (U + o <= 16)
|
|
@@ -884,7 +884,7 @@ class ar {
|
|
|
884
884
|
), p = Math.max(Math.floor(e[1] / y), 0), b = Math.min(
|
|
885
885
|
Math.ceil(e[3] / y),
|
|
886
886
|
Math.ceil(g / y)
|
|
887
|
-
),
|
|
887
|
+
), S = e[2] - e[0];
|
|
888
888
|
let v = this.getBytesPerPixel();
|
|
889
889
|
const O = [], F = [];
|
|
890
890
|
for (let R = 0; R < r.length; ++R)
|
|
@@ -899,15 +899,15 @@ class ar {
|
|
|
899
899
|
this.planarConfiguration === 2 && (v = this.getSampleByteSize(ee), V = this.getTileOrStrip(q, R, ee, i, l));
|
|
900
900
|
const te = V.then((W) => {
|
|
901
901
|
const ce = W.data, we = new DataView(ce), fe = this.getBlockHeight(W.y), ae = W.y * y, ue = W.x * h, De = ae + fe, a = (W.x + 1) * h, u = F[j], w = Math.min(fe, fe - (De - e[3]), g - ae), C = Math.min(h, h - (a - e[2]), m - ue);
|
|
902
|
-
for (let
|
|
902
|
+
for (let T = Math.max(0, e[1] - ae); T < w; ++T)
|
|
903
903
|
for (let x = Math.max(0, e[0] - ue); x < C; ++x) {
|
|
904
|
-
const E = (
|
|
904
|
+
const E = (T * h + x) * v, L = u.call(
|
|
905
905
|
we,
|
|
906
906
|
E + O[j],
|
|
907
907
|
X
|
|
908
908
|
);
|
|
909
909
|
let G;
|
|
910
|
-
o ? (G = (
|
|
910
|
+
o ? (G = (T + ae - e[1]) * S * r.length + (x + ue - e[0]) * r.length + j, n[G] = L) : (G = (T + ae - e[1]) * S + x + ue - e[0], n[j][G] = L);
|
|
911
911
|
}
|
|
912
912
|
});
|
|
913
913
|
U.push(te);
|
|
@@ -959,21 +959,21 @@ class ar {
|
|
|
959
959
|
throw new Error("Invalid subsets");
|
|
960
960
|
const y = h[2] - h[0], m = h[3] - h[1], g = y * m, d = this.getSamplesPerPixel();
|
|
961
961
|
if (!r || !r.length)
|
|
962
|
-
for (let
|
|
963
|
-
r.push(
|
|
962
|
+
for (let S = 0; S < d; ++S)
|
|
963
|
+
r.push(S);
|
|
964
964
|
else
|
|
965
|
-
for (let
|
|
966
|
-
if (r[
|
|
967
|
-
return Promise.reject(new RangeError(`Invalid sample index '${r[
|
|
965
|
+
for (let S = 0; S < r.length; ++S)
|
|
966
|
+
if (r[S] >= d)
|
|
967
|
+
return Promise.reject(new RangeError(`Invalid sample index '${r[S]}'.`));
|
|
968
968
|
let I;
|
|
969
969
|
if (n) {
|
|
970
|
-
const
|
|
971
|
-
I = qe(
|
|
970
|
+
const S = this.fileDirectory.SampleFormat ? Math.max.apply(null, this.fileDirectory.SampleFormat) : 1, v = Math.max.apply(null, this.fileDirectory.BitsPerSample);
|
|
971
|
+
I = qe(S, v, g * r.length), f && I.fill(f);
|
|
972
972
|
} else {
|
|
973
973
|
I = [];
|
|
974
|
-
for (let
|
|
975
|
-
const v = this.getArrayForSample(r[
|
|
976
|
-
Array.isArray(f) &&
|
|
974
|
+
for (let S = 0; S < r.length; ++S) {
|
|
975
|
+
const v = this.getArrayForSample(r[S], g);
|
|
976
|
+
Array.isArray(f) && S < f.length ? v.fill(f[S]) : f && !Array.isArray(f) && v.fill(f), I.push(v);
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
979
|
const p = o || await Hi(this.fileDirectory);
|
|
@@ -1031,8 +1031,8 @@ class ar {
|
|
|
1031
1031
|
let b = [0, 1, 2];
|
|
1032
1032
|
if (this.fileDirectory.ExtraSamples !== Ui.Unspecified && s) {
|
|
1033
1033
|
b = [];
|
|
1034
|
-
for (let
|
|
1035
|
-
b.push(
|
|
1034
|
+
for (let S = 0; S < this.fileDirectory.BitsPerSample.length; S += 1)
|
|
1035
|
+
b.push(S);
|
|
1036
1036
|
}
|
|
1037
1037
|
return this.readRasters({
|
|
1038
1038
|
window: e,
|
|
@@ -1096,10 +1096,10 @@ class ar {
|
|
|
1096
1096
|
throw new Error("Unsupported photometric interpretation.");
|
|
1097
1097
|
}
|
|
1098
1098
|
if (!r) {
|
|
1099
|
-
const b = new Uint8Array(p.length / 3),
|
|
1099
|
+
const b = new Uint8Array(p.length / 3), S = new Uint8Array(p.length / 3), v = new Uint8Array(p.length / 3);
|
|
1100
1100
|
for (let O = 0, F = 0; O < p.length; O += 3, ++F)
|
|
1101
|
-
b[F] = p[O],
|
|
1102
|
-
p = [b,
|
|
1101
|
+
b[F] = p[O], S[F] = p[O + 1], v[F] = p[O + 2];
|
|
1102
|
+
p = [b, S, v];
|
|
1103
1103
|
}
|
|
1104
1104
|
return p.width = d.width, p.height = d.height, p;
|
|
1105
1105
|
}
|
|
@@ -1702,11 +1702,11 @@ class We extends gr {
|
|
|
1702
1702
|
for (let y = 0; y < i; f += r, ++y) {
|
|
1703
1703
|
const m = o.readUint16(f), g = o.readUint16(f + 2), d = this.bigTiff ? o.readUint64(f + 4) : o.readUint32(f + 4);
|
|
1704
1704
|
let I, p;
|
|
1705
|
-
const b = Ye(g),
|
|
1705
|
+
const b = Ye(g), S = f + (this.bigTiff ? 12 : 8);
|
|
1706
1706
|
if (b * d <= (this.bigTiff ? 8 : 4))
|
|
1707
|
-
I = ye(o, g, d,
|
|
1707
|
+
I = ye(o, g, d, S);
|
|
1708
1708
|
else {
|
|
1709
|
-
const v = o.readOffset(
|
|
1709
|
+
const v = o.readOffset(S), O = Ye(g) * d;
|
|
1710
1710
|
if (o.covers(v, O))
|
|
1711
1711
|
I = ye(o, g, d, v);
|
|
1712
1712
|
else {
|
|
@@ -1848,7 +1848,8 @@ function mr(t) {
|
|
|
1848
1848
|
min: null,
|
|
1849
1849
|
max: null,
|
|
1850
1850
|
originalMin: null,
|
|
1851
|
-
originalMax: null
|
|
1851
|
+
originalMax: null,
|
|
1852
|
+
bounds: []
|
|
1852
1853
|
};
|
|
1853
1854
|
async function o(l, h = ["#000000", "#FFFFFF"]) {
|
|
1854
1855
|
console.log("Adding TIF layer with URL/File:", l, h);
|
|
@@ -1868,7 +1869,7 @@ function mr(t) {
|
|
|
1868
1869
|
console.log("fileDirectory", p);
|
|
1869
1870
|
const b = parseInt(p.GDAL_NODATA);
|
|
1870
1871
|
console.log("GDAL_NODATA", typeof b, b);
|
|
1871
|
-
const
|
|
1872
|
+
const S = Zt(g), v = await g.readRasters();
|
|
1872
1873
|
r = { image: g, data: v, width: d, height: I }, console.log("GeoTIFF data loaded:", r);
|
|
1873
1874
|
const O = Array.isArray(v) ? v : [v];
|
|
1874
1875
|
let F = 1 / 0, U = -1 / 0;
|
|
@@ -1879,17 +1880,18 @@ function mr(t) {
|
|
|
1879
1880
|
min: F,
|
|
1880
1881
|
max: U,
|
|
1881
1882
|
originalMin: F,
|
|
1882
|
-
originalMax: U
|
|
1883
|
+
originalMax: U,
|
|
1884
|
+
bounds: S
|
|
1883
1885
|
}, console.log("Data range calculated:", n);
|
|
1884
1886
|
const X = f(v, d, I, h, b);
|
|
1885
1887
|
if (!X) {
|
|
1886
1888
|
console.error("Failed to create image data from GeoTIFF.");
|
|
1887
1889
|
return;
|
|
1888
1890
|
}
|
|
1889
|
-
c(X, d, I,
|
|
1891
|
+
c(X, d, I, S, y), (R = t.value) == null || R.fitBounds(
|
|
1890
1892
|
[
|
|
1891
|
-
[
|
|
1892
|
-
[
|
|
1893
|
+
[S[0], S[1]],
|
|
1894
|
+
[S[2], S[3]]
|
|
1893
1895
|
],
|
|
1894
1896
|
{ padding: 50 }
|
|
1895
1897
|
);
|
|
@@ -1902,10 +1904,10 @@ function mr(t) {
|
|
|
1902
1904
|
p.width = h, p.height = y;
|
|
1903
1905
|
const b = p.getContext("2d");
|
|
1904
1906
|
b == null || b.putImageData(l, 0, 0);
|
|
1905
|
-
const
|
|
1907
|
+
const S = p.toDataURL("image/png");
|
|
1906
1908
|
(F = t.value) == null || F.addSource(I, {
|
|
1907
1909
|
type: "image",
|
|
1908
|
-
url:
|
|
1910
|
+
url: S,
|
|
1909
1911
|
coordinates: [
|
|
1910
1912
|
[m[0], m[3]],
|
|
1911
1913
|
// 左上角
|
|
@@ -1936,7 +1938,7 @@ function mr(t) {
|
|
|
1936
1938
|
function f(l, h, y, m, g = null) {
|
|
1937
1939
|
const d = document.createElement("canvas");
|
|
1938
1940
|
d.width = h, d.height = y;
|
|
1939
|
-
const I = d.getContext("2d"), p = I == null ? void 0 : I.createImageData(h, y), b = Array.isArray(l) ? l : [l],
|
|
1941
|
+
const I = d.getContext("2d"), p = I == null ? void 0 : I.createImageData(h, y), b = Array.isArray(l) ? l : [l], S = h * y;
|
|
1940
1942
|
let v = n.min, O = n.max;
|
|
1941
1943
|
(v === null || O === null) && (v = 0, O = 255);
|
|
1942
1944
|
const F = m.map(Jt), U = F.length;
|
|
@@ -1948,7 +1950,7 @@ function mr(t) {
|
|
|
1948
1950
|
const q = 1 / (U - 1), V = Math.floor(R / q), Y = (R - V * q) / q, j = F[V], ee = F[Math.min(V + 1, U - 1)];
|
|
1949
1951
|
return [Math.round(j[0] + (ee[0] - j[0]) * Y), Math.round(j[1] + (ee[1] - j[1]) * Y), Math.round(j[2] + (ee[2] - j[2]) * Y)];
|
|
1950
1952
|
}
|
|
1951
|
-
for (let R = 0; R <
|
|
1953
|
+
for (let R = 0; R < S; R++) {
|
|
1952
1954
|
let q, V, Y, j;
|
|
1953
1955
|
const ee = b[0][R];
|
|
1954
1956
|
if (g !== null && ee === g)
|
|
@@ -2074,7 +2076,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2074
2076
|
console.log("渲染geoJSON---->"), b(a);
|
|
2075
2077
|
else {
|
|
2076
2078
|
const C = z(a);
|
|
2077
|
-
((w = i.value) == null ? void 0 : w.getLayer(C)) == null ? (console.log("首次渲染---->"),
|
|
2079
|
+
((w = i.value) == null ? void 0 : w.getLayer(C)) == null ? (console.log("首次渲染---->"), S(a)) : (console.log("非首次渲染---->更新图层"), p(a, JSON.parse(a.layerPaintConfig)));
|
|
2078
2080
|
}
|
|
2079
2081
|
};
|
|
2080
2082
|
function p(a, u) {
|
|
@@ -2084,11 +2086,11 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2084
2086
|
console.log("currentLayerType--->", w);
|
|
2085
2087
|
const C = JSON.parse(JSON.stringify(u));
|
|
2086
2088
|
console.log("newStyleConfig---->", C);
|
|
2087
|
-
const
|
|
2088
|
-
console.log("newFillColorConfig---->",
|
|
2089
|
+
const T = Ht(C);
|
|
2090
|
+
console.log("newFillColorConfig---->", T);
|
|
2089
2091
|
const x = ct(C);
|
|
2090
|
-
if (console.log("outlineStyle---->", x), w == "fill" &&
|
|
2091
|
-
(G = i.value) == null || G.setPaintProperty(z(a), "fill-color",
|
|
2092
|
+
if (console.log("outlineStyle---->", x), w == "fill" && T && x)
|
|
2093
|
+
(G = i.value) == null || G.setPaintProperty(z(a), "fill-color", T["fill-color"]), (P = i.value) == null || P.setPaintProperty(z(a), "fill-opacity", T["fill-opacity"]), (M = i.value) == null || M.setPaintProperty(z(a), "fill-outline-color", T["fill-outline-color"]), x && x["line-color"] && ((B = i.value) == null || B.setPaintProperty(z(a) + "-outline", "line-color", x["line-color"])), x && x["line-opacity"], x && x["line-width"] && ((A = i.value) == null || A.setPaintProperty(z(a) + "-outline", "line-width", x["line-width"])), (D = i.value) == null || D.setPaintProperty(z(a) + "-outline", "line-dasharray", []), x && x["line-dasharray"] && (console.log("outlineStyle['line-dasharray']----->", x["line-dasharray"]), (K = i.value) == null || K.setPaintProperty(z(a) + "-outline", "line-dasharray", x["line-dasharray"]));
|
|
2092
2094
|
else if (w == "line")
|
|
2093
2095
|
x && x["line-color"] && (($ = i.value) == null || $.setPaintProperty(z(a), "line-color", x["line-color"])), x && x["line-opacity"] && ((H = i.value) == null || H.setPaintProperty(z(a), "line-opacity", x["line-opacity"])), x && x["line-width"] && ((J = i.value) == null || J.setPaintProperty(z(a), "line-width", x["line-width"])), (ie = i.value) == null || ie.setPaintProperty(z(a), "line-dasharray", []), x && x["line-dasharray"] && ((Ie = i.value) == null || Ie.setPaintProperty(z(a), "line-dasharray", x["line-dasharray"]));
|
|
2094
2096
|
else if (w == "circle") {
|
|
@@ -2130,7 +2132,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2130
2132
|
}
|
|
2131
2133
|
const u = JSON.parse(a.customLayerConfig), w = z(a);
|
|
2132
2134
|
((x = i.value) == null ? void 0 : x.getLayer(w)) !== void 0 && (console.warn(`图层 ${w} 已存在,无法重复添加`), (E = i.value) == null || E.removeLayer(w), (L = i.value) == null || L.removeSource(w));
|
|
2133
|
-
const
|
|
2135
|
+
const T = JSON.parse(a.geoJSON);
|
|
2134
2136
|
switch (a.layerType) {
|
|
2135
2137
|
case "symbol":
|
|
2136
2138
|
const $ = {
|
|
@@ -2145,7 +2147,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2145
2147
|
type: "Feature",
|
|
2146
2148
|
geometry: {
|
|
2147
2149
|
type: "Point",
|
|
2148
|
-
coordinates:
|
|
2150
|
+
coordinates: T.features[0].geometry.coordinates
|
|
2149
2151
|
},
|
|
2150
2152
|
properties: {
|
|
2151
2153
|
title: a.layerName || u.iconName,
|
|
@@ -2186,7 +2188,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2186
2188
|
source: {
|
|
2187
2189
|
type: "geojson",
|
|
2188
2190
|
// 数据源类型为 GeoJSON
|
|
2189
|
-
data:
|
|
2191
|
+
data: T
|
|
2190
2192
|
},
|
|
2191
2193
|
layout: {
|
|
2192
2194
|
"line-join": "round",
|
|
@@ -2229,7 +2231,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2229
2231
|
source: {
|
|
2230
2232
|
type: "geojson",
|
|
2231
2233
|
// 数据源类型为 GeoJSON
|
|
2232
|
-
data:
|
|
2234
|
+
data: T
|
|
2233
2235
|
},
|
|
2234
2236
|
layout: {},
|
|
2235
2237
|
paint: {
|
|
@@ -2241,18 +2243,18 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2241
2243
|
break;
|
|
2242
2244
|
}
|
|
2243
2245
|
}
|
|
2244
|
-
function
|
|
2246
|
+
function S(a) {
|
|
2245
2247
|
var L, G, P, M, B;
|
|
2246
2248
|
console.log("加载图层---->", a);
|
|
2247
2249
|
const u = z(a), w = Ke(a);
|
|
2248
2250
|
console.log("sourceId--->", w);
|
|
2249
2251
|
const C = Qt(a);
|
|
2250
2252
|
console.log("styleConfig", C);
|
|
2251
|
-
const
|
|
2253
|
+
const T = Ue(a);
|
|
2252
2254
|
((L = i.value) == null ? void 0 : L.getSource(w)) || (P = i.value) == null || P.addSource(w, {
|
|
2253
2255
|
type: "geojson",
|
|
2254
2256
|
data: (G = a.url) == null ? void 0 : G.replace("bjhweb", "bjh")
|
|
2255
|
-
}), console.log("layerType--->",
|
|
2257
|
+
}), console.log("layerType--->", T);
|
|
2256
2258
|
const E = {
|
|
2257
2259
|
id: u,
|
|
2258
2260
|
source: w,
|
|
@@ -2260,9 +2262,9 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2260
2262
|
layout: {
|
|
2261
2263
|
visibility: "visible"
|
|
2262
2264
|
},
|
|
2263
|
-
type:
|
|
2265
|
+
type: T
|
|
2264
2266
|
};
|
|
2265
|
-
if (
|
|
2267
|
+
if (T != "symbol")
|
|
2266
2268
|
E.paint = ft(a);
|
|
2267
2269
|
else {
|
|
2268
2270
|
const A = ft(a);
|
|
@@ -2277,7 +2279,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2277
2279
|
...A
|
|
2278
2280
|
};
|
|
2279
2281
|
}
|
|
2280
|
-
if (console.log("layerConfig--->", E), (M = i.value) == null || M.addLayer(E),
|
|
2282
|
+
if (console.log("layerConfig--->", E), (M = i.value) == null || M.addLayer(E), T == "fill") {
|
|
2281
2283
|
const A = ct(C);
|
|
2282
2284
|
(B = i.value) == null || B.addLayer({
|
|
2283
2285
|
id: u + "-outline",
|
|
@@ -2311,7 +2313,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2311
2313
|
outlineColor: "#02d2e0",
|
|
2312
2314
|
outlineWidth: 3
|
|
2313
2315
|
};
|
|
2314
|
-
let
|
|
2316
|
+
let T = a.layerPaintConfig ? JSON.parse(a.layerPaintConfig) : C;
|
|
2315
2317
|
if (!a.lineInfo) {
|
|
2316
2318
|
console.error("调查数据缺失,无法添加线图层");
|
|
2317
2319
|
return;
|
|
@@ -2339,11 +2341,11 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2339
2341
|
if (E.length > 0) {
|
|
2340
2342
|
M || i.value.addSource(P, G), A && i.value.removeLayer(B);
|
|
2341
2343
|
let D = {
|
|
2342
|
-
"line-color":
|
|
2343
|
-
"line-width":
|
|
2344
|
+
"line-color": T.outlineColor,
|
|
2345
|
+
"line-width": T.outlineWidth,
|
|
2344
2346
|
"line-opacity": 1
|
|
2345
2347
|
};
|
|
2346
|
-
switch (
|
|
2348
|
+
switch (T.outlineStyle) {
|
|
2347
2349
|
case "simple-dash":
|
|
2348
2350
|
D["line-dasharray"] = [2, 2];
|
|
2349
2351
|
break;
|
|
@@ -2377,7 +2379,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2377
2379
|
pointRenderType: "points"
|
|
2378
2380
|
// 默认使用图标渲染
|
|
2379
2381
|
};
|
|
2380
|
-
let
|
|
2382
|
+
let T = a.layerPaintConfig ? JSON.parse(a.layerPaintConfig) : C;
|
|
2381
2383
|
if (console.log("走这里---->", a), !a.lineInfo) {
|
|
2382
2384
|
console.error("调查数据缺失,无法添加点图层");
|
|
2383
2385
|
return;
|
|
@@ -2389,18 +2391,18 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2389
2391
|
a.lineInfo.forEach((x) => {
|
|
2390
2392
|
var A;
|
|
2391
2393
|
let E = [0, 0];
|
|
2392
|
-
x.latitude && x.longitude && (E = [Number(x.longitude), Number(x.latitude)]), x.latitudeStart && x.longitudeStart && (E = [Number(x.longitudeStart), Number(x.latitudeStart)]), console.log("layerPaintConfig.pointRenderType ",
|
|
2394
|
+
x.latitude && x.longitude && (E = [Number(x.longitude), Number(x.latitude)]), x.latitudeStart && x.longitudeStart && (E = [Number(x.longitudeStart), Number(x.latitudeStart)]), console.log("layerPaintConfig.pointRenderType ", T);
|
|
2393
2395
|
const L = document.createElement("div");
|
|
2394
|
-
if (
|
|
2396
|
+
if (T.pointRenderType == "icons") {
|
|
2395
2397
|
L.className = "research-location-icon-el";
|
|
2396
2398
|
const D = document.createElement("img");
|
|
2397
|
-
D.className = "research-location-img-el", D.src = Ve +
|
|
2399
|
+
D.className = "research-location-img-el", D.src = Ve + T.currentMapIconName, L.appendChild(D);
|
|
2398
2400
|
} else {
|
|
2399
2401
|
L.className = "research-location-point";
|
|
2400
2402
|
const D = document.createElement("div");
|
|
2401
2403
|
D.className = "research-location-point-content", L.appendChild(D);
|
|
2402
2404
|
const K = document.createElement("div");
|
|
2403
|
-
K.className = "research-location-point-content-inner", K.style.backgroundColor =
|
|
2405
|
+
K.className = "research-location-point-content-inner", K.style.backgroundColor = T.pointTintColor ? T.pointTintColor : "#02d2e0", D.appendChild(K);
|
|
2404
2406
|
const $ = document.createElement("div");
|
|
2405
2407
|
$.className = "research-location-point-line", L.appendChild($);
|
|
2406
2408
|
}
|
|
@@ -2426,8 +2428,8 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2426
2428
|
}
|
|
2427
2429
|
const R = se();
|
|
2428
2430
|
function q(a, u) {
|
|
2429
|
-
const { clientX: w, clientY: C } = a,
|
|
2430
|
-
R.value.showPopup(
|
|
2431
|
+
const { clientX: w, clientY: C } = a, T = w + 28, x = C - 60;
|
|
2432
|
+
R.value.showPopup(T, x, u);
|
|
2431
2433
|
}
|
|
2432
2434
|
function V(a) {
|
|
2433
2435
|
const u = d.value.find((w) => w.id === a.id);
|
|
@@ -2440,8 +2442,8 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2440
2442
|
return Promise.reject(new Error("地图实例未初始化,无法加载图标资源"));
|
|
2441
2443
|
const a = ei.map(
|
|
2442
2444
|
(u) => new Promise((w, C) => {
|
|
2443
|
-
var
|
|
2444
|
-
(
|
|
2445
|
+
var T;
|
|
2446
|
+
(T = i.value) == null || T.loadImage(Ve + u.fileName, (x, E) => {
|
|
2445
2447
|
var L;
|
|
2446
2448
|
x ? C(x) : (E && ((L = i.value) == null || L.addImage(u.fileName, E)), w(!0));
|
|
2447
2449
|
});
|
|
@@ -2454,10 +2456,10 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2454
2456
|
console.log("removeThirdPartyLayer---->", a);
|
|
2455
2457
|
const u = z(a), w = Ue(a), C = (x = i.value) == null ? void 0 : x.getLayer(u);
|
|
2456
2458
|
console.log("currentLayerType---->", w, C);
|
|
2457
|
-
let
|
|
2459
|
+
let T = -1;
|
|
2458
2460
|
if (d.value.forEach((D, K) => {
|
|
2459
|
-
D.id == a.id && (
|
|
2460
|
-
}),
|
|
2461
|
+
D.id == a.id && (T = K);
|
|
2462
|
+
}), T > -1 && d.value.splice(T, 1), C) {
|
|
2461
2463
|
const D = (E = i.value) == null ? void 0 : E.getLayer(u);
|
|
2462
2464
|
if (D) {
|
|
2463
2465
|
const K = D.source;
|
|
@@ -2526,7 +2528,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2526
2528
|
zoom: 4,
|
|
2527
2529
|
duration: 400
|
|
2528
2530
|
}), setTimeout(async () => {
|
|
2529
|
-
var
|
|
2531
|
+
var T, x, E, L, G;
|
|
2530
2532
|
if (!a) return;
|
|
2531
2533
|
let u = Ke(a);
|
|
2532
2534
|
if (a.geoJSON && (u = z(a)), a.url && !a.geoJSON)
|
|
@@ -2535,7 +2537,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2535
2537
|
if (B && B.features && B.features.length > 0) {
|
|
2536
2538
|
const A = Ae.bbox(B);
|
|
2537
2539
|
if (A && !te(A)) {
|
|
2538
|
-
(
|
|
2540
|
+
(T = i.value) == null || T.fitBounds(
|
|
2539
2541
|
[
|
|
2540
2542
|
[A[0], A[1]],
|
|
2541
2543
|
[A[2], A[3]]
|
|
@@ -2623,7 +2625,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2623
2625
|
};
|
|
2624
2626
|
});
|
|
2625
2627
|
function ce(a) {
|
|
2626
|
-
var C,
|
|
2628
|
+
var C, T, x, E;
|
|
2627
2629
|
V(a);
|
|
2628
2630
|
const u = {
|
|
2629
2631
|
outlineColor: "#02d2e0",
|
|
@@ -2644,7 +2646,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2644
2646
|
type: "FeatureCollection",
|
|
2645
2647
|
features: P
|
|
2646
2648
|
}
|
|
2647
|
-
}), (
|
|
2649
|
+
}), (T = i.value) == null || T.addLayer({
|
|
2648
2650
|
id: G,
|
|
2649
2651
|
type: "heatmap",
|
|
2650
2652
|
source: L,
|
|
@@ -2709,10 +2711,10 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2709
2711
|
ae(a);
|
|
2710
2712
|
const u = `${a.id}-geo-line-layer`, w = `${a.id}-research-point`;
|
|
2711
2713
|
((x = i.value) == null ? void 0 : x.getLayer(u)) && ((E = i.value) == null || E.removeLayer(u));
|
|
2712
|
-
let
|
|
2714
|
+
let T = -1;
|
|
2713
2715
|
v.value.forEach((G, P) => {
|
|
2714
|
-
G.id == w && (
|
|
2715
|
-
}),
|
|
2716
|
+
G.id == w && (T = P);
|
|
2717
|
+
}), T > -1 && (v.value[T].marker && ((L = v.value[T].marker) == null || L.remove()), v.value.splice(T, 1)), X();
|
|
2716
2718
|
}
|
|
2717
2719
|
const fe = async ({
|
|
2718
2720
|
mapRootId: a,
|
|
@@ -2720,7 +2722,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2720
2722
|
visible: w,
|
|
2721
2723
|
delLayer: C
|
|
2722
2724
|
}) => {
|
|
2723
|
-
var
|
|
2725
|
+
var T;
|
|
2724
2726
|
if (console.log("接收到图层切换事件", t.mapRootId, a, u), a === t.mapRootId && i.value)
|
|
2725
2727
|
if (w)
|
|
2726
2728
|
if (console.log("delLayer", C), C && (console.log("mmb: 删除图层", u), j(u)), u.layerType == "species-group")
|
|
@@ -2728,7 +2730,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2728
2730
|
else if (u.layerDataType == "research") {
|
|
2729
2731
|
if (u.layerType == "line" || u.layerType == "symbol") {
|
|
2730
2732
|
if (!u.lineInfo) {
|
|
2731
|
-
const x = await ((
|
|
2733
|
+
const x = await ((T = t.researchDataRequest) == null ? void 0 : T.call(t, u));
|
|
2732
2734
|
if (x) {
|
|
2733
2735
|
const { lineInfo: E, pointInfo: L } = x;
|
|
2734
2736
|
u.lineInfo = E, u.pointInfo = L;
|
|
@@ -2750,8 +2752,8 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2750
2752
|
function ue(a) {
|
|
2751
2753
|
var u, w, C;
|
|
2752
2754
|
if (ae(a), a.layerPaintConfig) {
|
|
2753
|
-
const
|
|
2754
|
-
if (
|
|
2755
|
+
const T = JSON.parse(a.layerPaintConfig);
|
|
2756
|
+
if (T && T.pointRenderType == "heatMap") {
|
|
2755
2757
|
let x = a.id + "-source", E = a.id + "-layer";
|
|
2756
2758
|
(u = i.value) == null || u.removeLayer(E), (w = i.value) == null || w.removeSource(x);
|
|
2757
2759
|
} else
|
|
@@ -2768,13 +2770,13 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2768
2770
|
X();
|
|
2769
2771
|
}
|
|
2770
2772
|
const De = ({ mapRootId: a, layer: u }) => {
|
|
2771
|
-
|
|
2773
|
+
console.log("接收到定位到图层中心事件", u), a === t.mapRootId && i.value && ee(u);
|
|
2772
2774
|
};
|
|
2773
2775
|
return Kt(() => {
|
|
2774
2776
|
var a, u, w, C;
|
|
2775
2777
|
o.setMapBoxToken(t.mapBoxToken), o.setTdtToken(t.tdtToken), o.setMaxZoom(t.mapRootId, t.maxZoom), o.setMinZoom(t.mapRootId, t.minZoom), o.setZoom(t.mapRootId, t.zoom), o.setPitch(t.mapRootId, t.pitch), o.setThreeDPitch(t.mapRootId, t.pitch), t.center && Array.isArray(t.center) && t.center.length > 0 ? (o.setCenter(t.mapRootId, t.center), h()) : navigator.geolocation.getCurrentPosition(
|
|
2776
|
-
(
|
|
2777
|
-
const { latitude: x, longitude: E } =
|
|
2778
|
+
(T) => {
|
|
2779
|
+
const { latitude: x, longitude: E } = T.coords;
|
|
2778
2780
|
o.setCenter(t.mapRootId, [E, x]), h();
|
|
2779
2781
|
},
|
|
2780
2782
|
() => {
|
|
@@ -2811,7 +2813,7 @@ const pr = ["id"], xr = { class: "left-bar" }, wr = { class: "right-bar" }, Ir =
|
|
|
2811
2813
|
], 8, pr)
|
|
2812
2814
|
], 512));
|
|
2813
2815
|
}
|
|
2814
|
-
}), Br = /* @__PURE__ */ ni(vr, [["__scopeId", "data-v-
|
|
2816
|
+
}), Br = /* @__PURE__ */ ni(vr, [["__scopeId", "data-v-a16ccb9f"]]);
|
|
2815
2817
|
export {
|
|
2816
2818
|
Nr as L,
|
|
2817
2819
|
Br as M,
|