runbir-tools 1.0.10 → 1.0.11
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/runbir-tools.es.js +173 -143
- package/dist/runbir-tools.umd.js +9 -9
- package/package.json +1 -1
package/dist/runbir-tools.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".map[data-v-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".map[data-v-7da5e12c]{width:100%;height:100%}@keyframes rotate-7da5e12c{0%{transform:rotate(0)}to{transform:rotate(360deg)}}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
2
|
var ze = Object.defineProperty;
|
|
3
3
|
var Ve = (s, e, t) => e in s ? ze(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
4
4
|
var se = (s, e, t) => Ve(s, typeof e != "symbol" ? e + "" : e, t);
|
|
@@ -1924,7 +1924,7 @@ function get$2(s, e) {
|
|
|
1924
1924
|
}
|
|
1925
1925
|
const K0 = 0.9996, E = 669438e-8, E2 = E * E, E3 = E2 * E, E_P2 = E / (1 - E), SQRT_E = Math.sqrt(1 - E), _E = (1 - SQRT_E) / (1 + SQRT_E), _E2 = _E * _E, _E3 = _E2 * _E, _E4 = _E3 * _E, _E5 = _E4 * _E, M1 = 1 - E / 4 - 3 * E2 / 64 - 5 * E3 / 256, M2 = 3 * E / 8 + 3 * E2 / 32 + 45 * E3 / 1024, M3 = 15 * E2 / 256 + 45 * E3 / 1024, M4 = 35 * E3 / 3072, P2 = 3 / 2 * _E - 27 / 32 * _E3 + 269 / 512 * _E5, P3 = 21 / 16 * _E2 - 55 / 32 * _E4, P4 = 151 / 96 * _E3 - 417 / 128 * _E5, P5 = 1097 / 512 * _E4, R = 6378137;
|
|
1926
1926
|
function toLonLat(s, e, t) {
|
|
1927
|
-
const i = s - 5e5, o = (t.north ? e : e - 1e7) / K0 / (R * M1), a = o + P2 * Math.sin(2 * o) + P3 * Math.sin(4 * o) + P4 * Math.sin(6 * o) + P5 * Math.sin(8 * o), l = Math.sin(a), c = l * l, h = Math.cos(a), u = l / h, d = u * u, g = d * d, f = 1 - E * c, m = Math.sqrt(1 - E * c), p = R / m, _ = (1 - E) / f, y = E_P2 * h ** 2, A = y * y, x = i / (p * K0), C = x * x, T = C * x,
|
|
1927
|
+
const i = s - 5e5, o = (t.north ? e : e - 1e7) / K0 / (R * M1), a = o + P2 * Math.sin(2 * o) + P3 * Math.sin(4 * o) + P4 * Math.sin(6 * o) + P5 * Math.sin(8 * o), l = Math.sin(a), c = l * l, h = Math.cos(a), u = l / h, d = u * u, g = d * d, f = 1 - E * c, m = Math.sqrt(1 - E * c), p = R / m, _ = (1 - E) / f, y = E_P2 * h ** 2, A = y * y, x = i / (p * K0), C = x * x, T = C * x, I = T * x, w = I * x, S = w * x, L = a - u / _ * (C / 2 - I / 24 * (5 + 3 * d + 10 * y - 4 * A - 9 * E_P2)) + S / 720 * (61 + 90 * d + 298 * y + 45 * g - 252 * E_P2 - 3 * A);
|
|
1928
1928
|
let D = (x - T / 6 * (1 + 2 * d + y) + w / 120 * (5 - 2 * y + 28 * d - 3 * A + 8 * E_P2 + 24 * g)) / h;
|
|
1929
1929
|
return D = wrap(
|
|
1930
1930
|
D + toRadians(zoneToCentralLongitude(t.number)),
|
|
@@ -11166,19 +11166,19 @@ function buildText(s, e) {
|
|
|
11166
11166
|
s,
|
|
11167
11167
|
t + "padding",
|
|
11168
11168
|
e
|
|
11169
|
-
),
|
|
11169
|
+
), I = optionalDeclutterMode(
|
|
11170
11170
|
s,
|
|
11171
11171
|
t + "declutter-mode"
|
|
11172
|
-
), w = new Text({ declutterMode:
|
|
11173
|
-
return function(
|
|
11174
|
-
if (w.setText(i(
|
|
11175
|
-
const L = g(
|
|
11172
|
+
), w = new Text({ declutterMode: I });
|
|
11173
|
+
return function(S) {
|
|
11174
|
+
if (w.setText(i(S)), n && w.setFill(n(S)), r && w.setBackgroundFill(r(S)), o && w.setStroke(o(S)), a && w.setBackgroundStroke(a(S)), l && w.setFont(l(S)), c && w.setMaxAngle(c(S)), h && w.setOffsetX(h(S)), u && w.setOffsetY(u(S)), d && w.setOverflow(d(S)), g) {
|
|
11175
|
+
const L = g(S);
|
|
11176
11176
|
if (L !== "point" && L !== "line")
|
|
11177
11177
|
throw new Error("Expected point or line for text-placement");
|
|
11178
11178
|
w.setPlacement(L);
|
|
11179
11179
|
}
|
|
11180
|
-
if (f && w.setRepeat(f(
|
|
11181
|
-
const L = y(
|
|
11180
|
+
if (f && w.setRepeat(f(S)), m && w.setScale(m(S)), p && w.setRotateWithView(p(S)), _ && w.setRotation(_(S)), y) {
|
|
11181
|
+
const L = y(S);
|
|
11182
11182
|
if (L !== "left" && L !== "center" && L !== "right" && L !== "end" && L !== "start")
|
|
11183
11183
|
throw new Error(
|
|
11184
11184
|
"Expected left, right, center, start, or end for text-align"
|
|
@@ -11186,20 +11186,20 @@ function buildText(s, e) {
|
|
|
11186
11186
|
w.setTextAlign(L);
|
|
11187
11187
|
}
|
|
11188
11188
|
if (A) {
|
|
11189
|
-
const L = A(
|
|
11189
|
+
const L = A(S);
|
|
11190
11190
|
if (L !== "left" && L !== "right" && L !== "center")
|
|
11191
11191
|
throw new Error("Expected left, right, or center for text-justify");
|
|
11192
11192
|
w.setJustify(L);
|
|
11193
11193
|
}
|
|
11194
11194
|
if (x) {
|
|
11195
|
-
const L = x(
|
|
11195
|
+
const L = x(S);
|
|
11196
11196
|
if (L !== "bottom" && L !== "top" && L !== "middle" && L !== "alphabetic" && L !== "hanging")
|
|
11197
11197
|
throw new Error(
|
|
11198
11198
|
"Expected bottom, top, middle, alphabetic, or hanging for text-baseline"
|
|
11199
11199
|
);
|
|
11200
11200
|
w.setTextBaseline(L);
|
|
11201
11201
|
}
|
|
11202
|
-
return T && w.setPadding(T(
|
|
11202
|
+
return T && w.setPadding(T(S)), C && w.setKeepUpright(C(S)), w;
|
|
11203
11203
|
};
|
|
11204
11204
|
}
|
|
11205
11205
|
function buildImage(s, e) {
|
|
@@ -11249,8 +11249,8 @@ function buildIcon(s, e) {
|
|
|
11249
11249
|
size: x,
|
|
11250
11250
|
declutterMode: C
|
|
11251
11251
|
});
|
|
11252
|
-
return function(
|
|
11253
|
-
return a && T.setOpacity(a(
|
|
11252
|
+
return function(I) {
|
|
11253
|
+
return a && T.setOpacity(a(I)), l && T.setDisplacement(l(I)), c && T.setRotation(c(I)), h && T.setRotateWithView(h(I)), o && T.setScale(o(I)), r && T.setAnchor(r(I)), T;
|
|
11254
11254
|
};
|
|
11255
11255
|
}
|
|
11256
11256
|
function buildShape(s, e) {
|
|
@@ -11741,8 +11741,8 @@ class MapRenderer extends Disposable {
|
|
|
11741
11741
|
forEachFeatureAtCoordinate(e, t, i, n, r, o, a, l) {
|
|
11742
11742
|
let c;
|
|
11743
11743
|
const h = t.viewState;
|
|
11744
|
-
function u(x, C, T,
|
|
11745
|
-
return r.call(o, C, x ? T : null,
|
|
11744
|
+
function u(x, C, T, I) {
|
|
11745
|
+
return r.call(o, C, x ? T : null, I);
|
|
11746
11746
|
}
|
|
11747
11747
|
const d = h.projection, g = wrapX$1(e.slice(), d), f = [[0, 0]];
|
|
11748
11748
|
if (d.canWrapX() && n) {
|
|
@@ -11755,11 +11755,11 @@ class MapRenderer extends Disposable {
|
|
|
11755
11755
|
), y = [];
|
|
11756
11756
|
for (let x = 0; x < f.length; x++)
|
|
11757
11757
|
for (let C = p - 1; C >= 0; --C) {
|
|
11758
|
-
const T = m[C],
|
|
11759
|
-
if (
|
|
11760
|
-
const w =
|
|
11761
|
-
if (w &&
|
|
11762
|
-
const L =
|
|
11758
|
+
const T = m[C], I = T.layer;
|
|
11759
|
+
if (I.hasRenderer() && inView(T, h) && a.call(l, I)) {
|
|
11760
|
+
const w = I.getRenderer(), S = I.getSource();
|
|
11761
|
+
if (w && S) {
|
|
11762
|
+
const L = S.getWrapX() ? g : e, D = u.bind(
|
|
11763
11763
|
null,
|
|
11764
11764
|
T.managed
|
|
11765
11765
|
);
|
|
@@ -17522,19 +17522,19 @@ class CanvasTextBuilder extends CanvasBuilder {
|
|
|
17522
17522
|
) : y = [h.slice(m, d[p])];
|
|
17523
17523
|
for (let A = 0, x = y.length; A < x; ++A) {
|
|
17524
17524
|
const C = y[A];
|
|
17525
|
-
let T = 0,
|
|
17525
|
+
let T = 0, I = C.length;
|
|
17526
17526
|
if (f == null) {
|
|
17527
|
-
const
|
|
17527
|
+
const S = matchingChunk(
|
|
17528
17528
|
o.maxAngle,
|
|
17529
17529
|
C,
|
|
17530
17530
|
0,
|
|
17531
17531
|
C.length,
|
|
17532
17532
|
2
|
|
17533
17533
|
);
|
|
17534
|
-
T =
|
|
17534
|
+
T = S[0], I = S[1];
|
|
17535
17535
|
}
|
|
17536
|
-
for (let
|
|
17537
|
-
a.push(C[
|
|
17536
|
+
for (let S = T; S < I; S += u)
|
|
17537
|
+
a.push(C[S], C[S + 1]);
|
|
17538
17538
|
const w = a.length;
|
|
17539
17539
|
m = d[p], this.drawChars_(l, w), l = w;
|
|
17540
17540
|
}
|
|
@@ -17583,8 +17583,8 @@ class CanvasTextBuilder extends CanvasBuilder {
|
|
|
17583
17583
|
if (d && (g - l) / 2 !== h.length / u) {
|
|
17584
17584
|
let x = l / 2;
|
|
17585
17585
|
d = d.filter((C, T) => {
|
|
17586
|
-
const
|
|
17587
|
-
return
|
|
17586
|
+
const I = a[(x + T) * 2] === h[T * u] && a[(x + T) * 2 + 1] === h[T * u + 1];
|
|
17587
|
+
return I || --x, I;
|
|
17588
17588
|
});
|
|
17589
17589
|
}
|
|
17590
17590
|
this.saveTextStates_();
|
|
@@ -17592,8 +17592,8 @@ class CanvasTextBuilder extends CanvasBuilder {
|
|
|
17592
17592
|
this.beginGeometry(e, t, i);
|
|
17593
17593
|
let p = o.padding;
|
|
17594
17594
|
if (p != defaultPadding && (o.scale[0] < 0 || o.scale[1] < 0)) {
|
|
17595
|
-
let x = o.padding[0], C = o.padding[1], T = o.padding[2],
|
|
17596
|
-
o.scale[0] < 0 && (C = -C,
|
|
17595
|
+
let x = o.padding[0], C = o.padding[1], T = o.padding[2], I = o.padding[3];
|
|
17596
|
+
o.scale[0] < 0 && (C = -C, I = -I), o.scale[1] < 0 && (x = -x, T = -T), p = [x, C, T, I];
|
|
17597
17597
|
}
|
|
17598
17598
|
const _ = this.pixelRatio;
|
|
17599
17599
|
this.instructions.push([
|
|
@@ -17830,10 +17830,10 @@ function drawTextOnPath(s, e, t, i, n, r, o, a, l, c, h, u, d = !0) {
|
|
|
17830
17830
|
A();
|
|
17831
17831
|
while (e < t - i && y + _ < r);
|
|
17832
17832
|
let x = _ === 0 ? 0 : (r - y) / _;
|
|
17833
|
-
const C = lerp(m, g, x), T = lerp(p, f, x),
|
|
17834
|
-
for (; e < t - i && y + _ <
|
|
17833
|
+
const C = lerp(m, g, x), T = lerp(p, f, x), I = e - i, w = y, S = r + a * l(c, n, h);
|
|
17834
|
+
for (; e < t - i && y + _ < S; )
|
|
17835
17835
|
A();
|
|
17836
|
-
x = _ === 0 ? 0 : (
|
|
17836
|
+
x = _ === 0 ? 0 : (S - y) / _;
|
|
17837
17837
|
const L = lerp(m, g, x), D = lerp(p, f, x);
|
|
17838
17838
|
let b = !1;
|
|
17839
17839
|
if (d)
|
|
@@ -17842,13 +17842,13 @@ function drawTextOnPath(s, e, t, i, n, r, o, a, l, c, h, u, d = !0) {
|
|
|
17842
17842
|
rotate(G, 0, 4, 2, u, G, G), b = G[0] > G[2];
|
|
17843
17843
|
} else
|
|
17844
17844
|
b = C > L;
|
|
17845
|
-
const P = Math.PI, O = [], B =
|
|
17846
|
-
e =
|
|
17845
|
+
const P = Math.PI, O = [], B = I + i === e;
|
|
17846
|
+
e = I, _ = 0, y = w, g = s[e], f = s[e + 1];
|
|
17847
17847
|
let N;
|
|
17848
17848
|
if (B) {
|
|
17849
17849
|
A(), N = Math.atan2(f - p, g - m), b && (N += N > 0 ? -P : P);
|
|
17850
17850
|
const G = (L + C) / 2, F = (D + T) / 2;
|
|
17851
|
-
return O[0] = [G, F, (
|
|
17851
|
+
return O[0] = [G, F, (S - r) / 2, N, n], O;
|
|
17852
17852
|
}
|
|
17853
17853
|
n = n.replace(/\n/g, " ");
|
|
17854
17854
|
for (let G = 0, F = n.length; G < F; ) {
|
|
@@ -18013,33 +18013,33 @@ class Executor {
|
|
|
18013
18013
|
`).reduce(createTextChunks, []), { width: f, height: m, widths: p, heights: _, lineWidths: y } = getTextDimensions(
|
|
18014
18014
|
l,
|
|
18015
18015
|
g
|
|
18016
|
-
), A = f + d, x = [], C = (A + 2) * h[0], T = (m + d) * h[1],
|
|
18016
|
+
), A = f + d, x = [], C = (A + 2) * h[0], T = (m + d) * h[1], I = {
|
|
18017
18017
|
width: C < 0 ? Math.floor(C) : Math.ceil(C),
|
|
18018
18018
|
height: T < 0 ? Math.floor(T) : Math.ceil(T),
|
|
18019
18019
|
contextInstructions: x
|
|
18020
18020
|
};
|
|
18021
18021
|
(h[0] != 1 || h[1] != 1) && x.push("scale", h), n && (x.push("strokeStyle", o.strokeStyle), x.push("lineWidth", d), x.push("lineCap", o.lineCap), x.push("lineJoin", o.lineJoin), x.push("miterLimit", o.miterLimit), x.push("setLineDash", [o.lineDash]), x.push("lineDashOffset", o.lineDashOffset)), i && x.push("fillStyle", a.fillStyle), x.push("textBaseline", "middle"), x.push("textAlign", "center");
|
|
18022
18022
|
const w = 0.5 - u;
|
|
18023
|
-
let
|
|
18023
|
+
let S = u * A + w * d;
|
|
18024
18024
|
const L = [], D = [];
|
|
18025
18025
|
let b = 0, P = 0, O = 0, B = 0, N;
|
|
18026
18026
|
for (let G = 0, F = g.length; G < F; G += 2) {
|
|
18027
18027
|
const X = g[G];
|
|
18028
18028
|
if (X === `
|
|
18029
18029
|
`) {
|
|
18030
|
-
P += b, b = 0,
|
|
18030
|
+
P += b, b = 0, S = u * A + w * d, ++B;
|
|
18031
18031
|
continue;
|
|
18032
18032
|
}
|
|
18033
18033
|
const W = g[G + 1] || l.font;
|
|
18034
18034
|
W !== N && (n && L.push("font", W), i && D.push("font", W), N = W), b = Math.max(b, _[O]);
|
|
18035
18035
|
const U = [
|
|
18036
18036
|
X,
|
|
18037
|
-
|
|
18037
|
+
S + w * p[O] + u * (p[O] - y[B]),
|
|
18038
18038
|
0.5 * (d + b) + P
|
|
18039
18039
|
];
|
|
18040
|
-
|
|
18040
|
+
S += p[O], n && L.push("strokeText", U), i && D.push("fillText", U), ++O;
|
|
18041
18041
|
}
|
|
18042
|
-
return Array.prototype.push.apply(x, L), Array.prototype.push.apply(x, D), this.labels_[r] =
|
|
18042
|
+
return Array.prototype.push.apply(x, L), Array.prototype.push.apply(x, D), this.labels_[r] = I, I;
|
|
18043
18043
|
}
|
|
18044
18044
|
/**
|
|
18045
18045
|
* @param {CanvasRenderingContext2D} context Context.
|
|
@@ -18082,10 +18082,10 @@ class Executor {
|
|
|
18082
18082
|
calculateImageOrLabelDimensions_(e, t, i, n, r, o, a, l, c, h, u, d, g, f, m, p) {
|
|
18083
18083
|
a *= d[0], l *= d[1];
|
|
18084
18084
|
let _ = i - a, y = n - l;
|
|
18085
|
-
const A = r + c > e ? e - c : r, x = o + h > t ? t - h : o, C = f[3] + A * d[0] + f[1], T = f[0] + x * d[1] + f[2],
|
|
18086
|
-
(m || u !== 0) && (p1[0] =
|
|
18087
|
-
let
|
|
18088
|
-
return u !== 0 ? (
|
|
18085
|
+
const A = r + c > e ? e - c : r, x = o + h > t ? t - h : o, C = f[3] + A * d[0] + f[1], T = f[0] + x * d[1] + f[2], I = _ - f[3], w = y - f[0];
|
|
18086
|
+
(m || u !== 0) && (p1[0] = I, p4[0] = I, p1[1] = w, p2[1] = w, p2[0] = I + C, p3[0] = p2[0], p3[1] = w + T, p4[1] = p3[1]);
|
|
18087
|
+
let S;
|
|
18088
|
+
return u !== 0 ? (S = compose(
|
|
18089
18089
|
create(),
|
|
18090
18090
|
i,
|
|
18091
18091
|
n,
|
|
@@ -18094,16 +18094,16 @@ class Executor {
|
|
|
18094
18094
|
u,
|
|
18095
18095
|
-i,
|
|
18096
18096
|
-n
|
|
18097
|
-
), apply(
|
|
18097
|
+
), apply(S, p1), apply(S, p2), apply(S, p3), apply(S, p4), createOrUpdate$2(
|
|
18098
18098
|
Math.min(p1[0], p2[0], p3[0], p4[0]),
|
|
18099
18099
|
Math.min(p1[1], p2[1], p3[1], p4[1]),
|
|
18100
18100
|
Math.max(p1[0], p2[0], p3[0], p4[0]),
|
|
18101
18101
|
Math.max(p1[1], p2[1], p3[1], p4[1]),
|
|
18102
18102
|
tmpExtent
|
|
18103
18103
|
)) : createOrUpdate$2(
|
|
18104
|
-
Math.min(
|
|
18104
|
+
Math.min(I, I + C),
|
|
18105
18105
|
Math.min(w, w + T),
|
|
18106
|
-
Math.max(
|
|
18106
|
+
Math.max(I, I + C),
|
|
18107
18107
|
Math.max(w, w + T),
|
|
18108
18108
|
tmpExtent
|
|
18109
18109
|
), g && (_ = Math.round(_), y = Math.round(y)), {
|
|
@@ -18120,7 +18120,7 @@ class Executor {
|
|
|
18120
18120
|
maxY: tmpExtent[3],
|
|
18121
18121
|
value: p
|
|
18122
18122
|
},
|
|
18123
|
-
canvasTransform:
|
|
18123
|
+
canvasTransform: S,
|
|
18124
18124
|
scale: d
|
|
18125
18125
|
};
|
|
18126
18126
|
}
|
|
@@ -18236,7 +18236,7 @@ class Executor {
|
|
|
18236
18236
|
), setFromArray(this.renderedTransform_, i));
|
|
18237
18237
|
let u = 0;
|
|
18238
18238
|
const d = n.length;
|
|
18239
|
-
let g = 0, f, m, p, _, y, A, x, C, T,
|
|
18239
|
+
let g = 0, f, m, p, _, y, A, x, C, T, I, w, S, L, D = 0, b = 0;
|
|
18240
18240
|
const P = this.coordinateCache_, O = this.viewRotation_, B = Math.round(Math.atan2(-i[1], i[0]) * 1e12) / 1e12, N = (
|
|
18241
18241
|
/** @type {import("../../render.js").State} */
|
|
18242
18242
|
{
|
|
@@ -18277,10 +18277,10 @@ class Executor {
|
|
|
18277
18277
|
const Te = (
|
|
18278
18278
|
/** @type {import("../../geom/SimpleGeometry.js").default} */
|
|
18279
18279
|
v[3]
|
|
18280
|
-
),
|
|
18280
|
+
), Se = v[4], ye = v[5];
|
|
18281
18281
|
N.geometry = Te, N.feature = F, u in P || (P[u] = []);
|
|
18282
18282
|
const ue = P[u];
|
|
18283
|
-
ye ? ye(h, g, f, 2, ue) : (ue[0] = h[g], ue[1] = h[g + 1], ue.length = 2), c && (c.zIndex = v[6]),
|
|
18283
|
+
ye ? ye(h, g, f, 2, ue) : (ue[0] = h[g], ue[1] = h[g + 1], ue.length = 2), c && (c.zIndex = v[6]), Se(ue, N), ++u;
|
|
18284
18284
|
break;
|
|
18285
18285
|
case Instruction.DRAW_IMAGE:
|
|
18286
18286
|
g = /** @type {number} */
|
|
@@ -18324,15 +18324,15 @@ class Executor {
|
|
|
18324
18324
|
v[15]
|
|
18325
18325
|
);
|
|
18326
18326
|
if (!T && v.length >= 20) {
|
|
18327
|
-
|
|
18327
|
+
I = /** @type {string} */
|
|
18328
18328
|
v[19], w = /** @type {string} */
|
|
18329
|
-
v[20],
|
|
18329
|
+
v[20], S = /** @type {string} */
|
|
18330
18330
|
v[21], L = /** @type {string} */
|
|
18331
18331
|
v[22];
|
|
18332
18332
|
const ee = this.drawLabelWithPointPlacement_(
|
|
18333
|
-
S,
|
|
18334
|
-
w,
|
|
18335
18333
|
I,
|
|
18334
|
+
w,
|
|
18335
|
+
S,
|
|
18336
18336
|
L
|
|
18337
18337
|
);
|
|
18338
18338
|
T = ee.label, v[3] = T;
|
|
@@ -18350,11 +18350,11 @@ class Executor {
|
|
|
18350
18350
|
let ve;
|
|
18351
18351
|
v.length > 25 && (ve = /** @type {number} */
|
|
18352
18352
|
v[25]);
|
|
18353
|
-
let Re, we,
|
|
18353
|
+
let Re, we, Ie;
|
|
18354
18354
|
v.length > 17 ? (Re = /** @type {Array<number>} */
|
|
18355
18355
|
v[16], we = /** @type {Array<*>} */
|
|
18356
|
-
v[17],
|
|
18357
|
-
v[18]) : (Re = defaultPadding, we = null,
|
|
18356
|
+
v[17], Ie = /** @type {Array<*>} */
|
|
18357
|
+
v[18]) : (Re = defaultPadding, we = null, Ie = null), Ee && B ? de += O : !Ee && !B && (de -= O);
|
|
18358
18358
|
let Be = 0;
|
|
18359
18359
|
for (; g < f; g += 2) {
|
|
18360
18360
|
if (ve && ve[Be++] < _e / this.pixelRatio)
|
|
@@ -18374,7 +18374,7 @@ class Executor {
|
|
|
18374
18374
|
me,
|
|
18375
18375
|
r,
|
|
18376
18376
|
Re,
|
|
18377
|
-
!!we || !!
|
|
18377
|
+
!!we || !!Ie,
|
|
18378
18378
|
F
|
|
18379
18379
|
), ge = [
|
|
18380
18380
|
e,
|
|
@@ -18383,7 +18383,7 @@ class Executor {
|
|
|
18383
18383
|
ee,
|
|
18384
18384
|
oe,
|
|
18385
18385
|
we,
|
|
18386
|
-
|
|
18386
|
+
Ie
|
|
18387
18387
|
];
|
|
18388
18388
|
if (l) {
|
|
18389
18389
|
let te, ae, ie;
|
|
@@ -18433,14 +18433,14 @@ class Executor {
|
|
|
18433
18433
|
/** @type {number} */
|
|
18434
18434
|
v[8]
|
|
18435
18435
|
);
|
|
18436
|
-
|
|
18436
|
+
S = /** @type {string} */
|
|
18437
18437
|
v[9];
|
|
18438
18438
|
const Pe = (
|
|
18439
18439
|
/** @type {number} */
|
|
18440
18440
|
v[10]
|
|
18441
18441
|
);
|
|
18442
|
-
|
|
18443
|
-
v[11], Array.isArray(
|
|
18442
|
+
I = /** @type {string|Array<string>} */
|
|
18443
|
+
v[11], Array.isArray(I) && (I = I.reduce(richTextToPlainText, "")), w = /** @type {string} */
|
|
18444
18444
|
v[12];
|
|
18445
18445
|
const ke = [
|
|
18446
18446
|
/** @type {number} */
|
|
@@ -18458,14 +18458,14 @@ class Executor {
|
|
|
18458
18458
|
];
|
|
18459
18459
|
let Ae;
|
|
18460
18460
|
xe in this.widths_ ? Ae = this.widths_[xe] : (Ae = {}, this.widths_[xe] = Ae);
|
|
18461
|
-
const Ne = lineStringLength(h, Oe, be, 2), Ge = Math.abs(Ce[0]) * measureAndCacheTextWidth(xe,
|
|
18461
|
+
const Ne = lineStringLength(h, Oe, be, 2), Ge = Math.abs(Ce[0]) * measureAndCacheTextWidth(xe, I, Ae);
|
|
18462
18462
|
if (Xe || Ge <= Ne) {
|
|
18463
|
-
const ee = this.textStates[w].textAlign, ge = (Ne - Ge) * horizontalTextAlign(
|
|
18463
|
+
const ee = this.textStates[w].textAlign, ge = (Ne - Ge) * horizontalTextAlign(I, ee), te = drawTextOnPath(
|
|
18464
18464
|
h,
|
|
18465
18465
|
Oe,
|
|
18466
18466
|
be,
|
|
18467
18467
|
2,
|
|
18468
|
-
|
|
18468
|
+
I,
|
|
18469
18469
|
ge,
|
|
18470
18470
|
We,
|
|
18471
18471
|
Math.abs(Ce[0]),
|
|
@@ -18478,10 +18478,10 @@ class Executor {
|
|
|
18478
18478
|
e: if (te) {
|
|
18479
18479
|
const ae = [];
|
|
18480
18480
|
let ie, le, he, Y, q;
|
|
18481
|
-
if (
|
|
18481
|
+
if (S)
|
|
18482
18482
|
for (ie = 0, le = te.length; ie < le; ++ie) {
|
|
18483
18483
|
q = te[ie], he = /** @type {string} */
|
|
18484
|
-
q[4], Y = this.createLabel(he, w, "",
|
|
18484
|
+
q[4], Y = this.createLabel(he, w, "", S), m = /** @type {number} */
|
|
18485
18485
|
q[2] + (Ce[0] < 0 ? -Pe : Pe), p = Le * Y.height + (0.5 - Le) * 2 * Pe * Ce[1] / Ce[0] - Fe;
|
|
18486
18486
|
const ce = this.calculateImageOrLabelDimensions_(
|
|
18487
18487
|
Y.width,
|
|
@@ -18748,17 +18748,17 @@ class ExecutorGroup {
|
|
|
18748
18748
|
));
|
|
18749
18749
|
const d = getPixelIndexArray(n);
|
|
18750
18750
|
let g;
|
|
18751
|
-
function f(C, T,
|
|
18751
|
+
function f(C, T, I) {
|
|
18752
18752
|
const w = h.getImageData(
|
|
18753
18753
|
0,
|
|
18754
18754
|
0,
|
|
18755
18755
|
a,
|
|
18756
18756
|
a
|
|
18757
18757
|
).data;
|
|
18758
|
-
for (let
|
|
18759
|
-
if (w[d[
|
|
18760
|
-
if (!o ||
|
|
18761
|
-
const D = (d[
|
|
18758
|
+
for (let S = 0, L = d.length; S < L; S++)
|
|
18759
|
+
if (w[d[S]] > 0) {
|
|
18760
|
+
if (!o || I === "none" || g !== "Image" && g !== "Text" || o.includes(C)) {
|
|
18761
|
+
const D = (d[S] - 3) / 4, b = n - D % a, P = n - (D / a | 0), O = r(C, T, b * b + P * P);
|
|
18762
18762
|
if (O)
|
|
18763
18763
|
return O;
|
|
18764
18764
|
}
|
|
@@ -18900,8 +18900,8 @@ function createHitDetectionImageData(s, e, t, i, n, r, o, a, l) {
|
|
|
18900
18900
|
continue;
|
|
18901
18901
|
Array.isArray(T) || (T = [T]);
|
|
18902
18902
|
const w = (A * p).toString(16).padStart(7, "#00000");
|
|
18903
|
-
for (let
|
|
18904
|
-
const D = T[
|
|
18903
|
+
for (let S = 0, L = T.length; S < L; ++S) {
|
|
18904
|
+
const D = T[S], b = D.getGeometryFunction()(x);
|
|
18905
18905
|
if (!b || !intersects$1(c, b.getExtent()))
|
|
18906
18906
|
continue;
|
|
18907
18907
|
const P = D.clone(), O = P.getFill();
|
|
@@ -18958,11 +18958,11 @@ function createHitDetectionImageData(s, e, t, i, n, r, o, a, l) {
|
|
|
18958
18958
|
for (let A = 0, x = y.length; A < x; ++A) {
|
|
18959
18959
|
const C = _[y[A]];
|
|
18960
18960
|
for (const T in C) {
|
|
18961
|
-
const
|
|
18962
|
-
for (let w = 0,
|
|
18963
|
-
f.setStyle(
|
|
18961
|
+
const I = C[T];
|
|
18962
|
+
for (let w = 0, S = I.length; w < S; w += 2) {
|
|
18963
|
+
f.setStyle(I[w + 1]);
|
|
18964
18964
|
for (let L = 0, D = e.length; L < D; ++L)
|
|
18965
|
-
f.setTransform(e[L]), f.drawGeometry(
|
|
18965
|
+
f.setTransform(e[L]), f.drawGeometry(I[w]);
|
|
18966
18966
|
}
|
|
18967
18967
|
}
|
|
18968
18968
|
}
|
|
@@ -19307,7 +19307,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
19307
19307
|
const n = t.extent, r = t.viewState, o = r.center, a = r.resolution, l = r.projection, c = r.rotation, h = l.getExtent(), u = this.getLayer().getSource(), d = this.getLayer().getDeclutter(), g = t.pixelRatio, f = t.viewHints, m = !(f[ViewHint.ANIMATING] || f[ViewHint.INTERACTING]), p = this.context, _ = Math.round(getWidth(n) / a * g), y = Math.round(getHeight(n) / a * g), A = u.getWrapX() && l.canWrapX(), x = A ? getWidth(h) : null, C = A ? Math.ceil((n[2] - h[2]) / x) + 1 : 1;
|
|
19308
19308
|
let T = A ? Math.floor((n[0] - h[0]) / x) : 0;
|
|
19309
19309
|
do {
|
|
19310
|
-
let
|
|
19310
|
+
let I = this.getRenderTransform(
|
|
19311
19311
|
o,
|
|
19312
19312
|
a,
|
|
19313
19313
|
0,
|
|
@@ -19316,10 +19316,10 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
19316
19316
|
y,
|
|
19317
19317
|
T * x
|
|
19318
19318
|
);
|
|
19319
|
-
t.declutter && (
|
|
19319
|
+
t.declutter && (I = I.slice(0)), e.execute(
|
|
19320
19320
|
p,
|
|
19321
19321
|
[p.canvas.width, p.canvas.height],
|
|
19322
|
-
|
|
19322
|
+
I,
|
|
19323
19323
|
c,
|
|
19324
19324
|
m,
|
|
19325
19325
|
i === void 0 ? ALL : i ? DECLUTTER : NON_DECLUTTER,
|
|
@@ -19565,9 +19565,9 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
19565
19565
|
let T;
|
|
19566
19566
|
for (let O = 0, B = A.length; O < B; ++O)
|
|
19567
19567
|
i.loadFeatures(A[O], u, h);
|
|
19568
|
-
const
|
|
19568
|
+
const I = getSquaredTolerance(u, d);
|
|
19569
19569
|
let w = !0;
|
|
19570
|
-
const
|
|
19570
|
+
const S = (
|
|
19571
19571
|
/**
|
|
19572
19572
|
* @param {import("../../Feature.js").default} feature Feature.
|
|
19573
19573
|
* @param {number} index Index.
|
|
@@ -19578,7 +19578,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
19578
19578
|
if (G && (N = G(O, u)), N) {
|
|
19579
19579
|
const F = this.renderFeature(
|
|
19580
19580
|
O,
|
|
19581
|
-
|
|
19581
|
+
I,
|
|
19582
19582
|
N,
|
|
19583
19583
|
C,
|
|
19584
19584
|
T,
|
|
@@ -19591,7 +19591,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
19591
19591
|
), L = toUserExtent(_), D = i.getFeaturesInExtent(L);
|
|
19592
19592
|
m && D.sort(m);
|
|
19593
19593
|
for (let O = 0, B = D.length; O < B; ++O)
|
|
19594
|
-
|
|
19594
|
+
S(D[O], O);
|
|
19595
19595
|
this.renderedFeatures_ = D, this.ready = w;
|
|
19596
19596
|
const b = C.finish(), P = new ExecutorGroup(
|
|
19597
19597
|
_,
|
|
@@ -20006,7 +20006,7 @@ function render(s, e, t, i, n, r, o, a, l, c, h, u, d, g) {
|
|
|
20006
20006
|
}
|
|
20007
20007
|
f.globalCompositeOperation = "lighter";
|
|
20008
20008
|
const p = createEmpty();
|
|
20009
|
-
l.forEach(function(C, T,
|
|
20009
|
+
l.forEach(function(C, T, I) {
|
|
20010
20010
|
extend$1(p, C.extent);
|
|
20011
20011
|
});
|
|
20012
20012
|
let _;
|
|
@@ -20015,7 +20015,7 @@ function render(s, e, t, i, n, r, o, a, l, c, h, u, d, g) {
|
|
|
20015
20015
|
Math.round(getWidth(p) * y),
|
|
20016
20016
|
Math.round(getHeight(p) * y),
|
|
20017
20017
|
canvasPool
|
|
20018
|
-
), u || (_.imageSmoothingEnabled = !1), l.forEach(function(C, T,
|
|
20018
|
+
), u || (_.imageSmoothingEnabled = !1), l.forEach(function(C, T, I) {
|
|
20019
20019
|
if (C.image.width > 0 && C.image.height > 0) {
|
|
20020
20020
|
if (C.clipExtent) {
|
|
20021
20021
|
_.save();
|
|
@@ -20027,7 +20027,7 @@ function render(s, e, t, i, n, r, o, a, l, c, h, u, d, g) {
|
|
|
20027
20027
|
u ? B : Math.round(P + B) - Math.round(P)
|
|
20028
20028
|
), _.clip();
|
|
20029
20029
|
}
|
|
20030
|
-
const w = (C.extent[0] - p[0]) * y,
|
|
20030
|
+
const w = (C.extent[0] - p[0]) * y, S = -(C.extent[3] - p[3]) * y, L = getWidth(C.extent) * y, D = getHeight(C.extent) * y;
|
|
20031
20031
|
_.drawImage(
|
|
20032
20032
|
C.image,
|
|
20033
20033
|
c,
|
|
@@ -20035,22 +20035,22 @@ function render(s, e, t, i, n, r, o, a, l, c, h, u, d, g) {
|
|
|
20035
20035
|
C.image.width - 2 * c,
|
|
20036
20036
|
C.image.height - 2 * c,
|
|
20037
20037
|
u ? w : Math.round(w),
|
|
20038
|
-
u ?
|
|
20038
|
+
u ? S : Math.round(S),
|
|
20039
20039
|
u ? L : Math.round(w + L) - Math.round(w),
|
|
20040
|
-
u ? D : Math.round(
|
|
20040
|
+
u ? D : Math.round(S + D) - Math.round(S)
|
|
20041
20041
|
), C.clipExtent && _.restore();
|
|
20042
20042
|
}
|
|
20043
20043
|
}));
|
|
20044
20044
|
const x = getTopLeft(o);
|
|
20045
|
-
return a.getTriangles().forEach(function(C, T,
|
|
20046
|
-
const w = C.source,
|
|
20045
|
+
return a.getTriangles().forEach(function(C, T, I) {
|
|
20046
|
+
const w = C.source, S = C.target;
|
|
20047
20047
|
let L = w[0][0], D = w[0][1], b = w[1][0], P = w[1][1], O = w[2][0], B = w[2][1];
|
|
20048
|
-
const N = m((
|
|
20049
|
-
-(
|
|
20050
|
-
), F = m((
|
|
20051
|
-
-(
|
|
20052
|
-
), W = m((
|
|
20053
|
-
-(
|
|
20048
|
+
const N = m((S[0][0] - x[0]) / r), G = m(
|
|
20049
|
+
-(S[0][1] - x[1]) / r
|
|
20050
|
+
), F = m((S[1][0] - x[0]) / r), X = m(
|
|
20051
|
+
-(S[1][1] - x[1]) / r
|
|
20052
|
+
), W = m((S[2][0] - x[0]) / r), U = m(
|
|
20053
|
+
-(S[2][1] - x[1]) / r
|
|
20054
20054
|
), v = L, K = D;
|
|
20055
20055
|
L = 0, D = 0, b -= v, P -= K, O -= v, B -= K;
|
|
20056
20056
|
const H = [
|
|
@@ -20097,9 +20097,9 @@ function render(s, e, t, i, n, r, o, a, l, c, h, u, d, g) {
|
|
|
20097
20097
|
);
|
|
20098
20098
|
}
|
|
20099
20099
|
f.drawImage(Q, 0, 0), f.restore();
|
|
20100
|
-
}), _ && (releaseCanvas(_), canvasPool.push(_.canvas)), h && (f.save(), f.globalCompositeOperation = "source-over", f.strokeStyle = "black", f.lineWidth = 1, a.getTriangles().forEach(function(C, T,
|
|
20101
|
-
const w = C.target,
|
|
20102
|
-
f.beginPath(), f.moveTo(D, b), f.lineTo(
|
|
20100
|
+
}), _ && (releaseCanvas(_), canvasPool.push(_.canvas)), h && (f.save(), f.globalCompositeOperation = "source-over", f.strokeStyle = "black", f.lineWidth = 1, a.getTriangles().forEach(function(C, T, I) {
|
|
20101
|
+
const w = C.target, S = (w[0][0] - x[0]) / r, L = -(w[0][1] - x[1]) / r, D = (w[1][0] - x[0]) / r, b = -(w[1][1] - x[1]) / r, P = (w[2][0] - x[0]) / r, O = -(w[2][1] - x[1]) / r;
|
|
20102
|
+
f.beginPath(), f.moveTo(D, b), f.lineTo(S, L), f.lineTo(P, O), f.closePath(), f.stroke();
|
|
20103
20103
|
}), f.restore()), f.canvas;
|
|
20104
20104
|
}
|
|
20105
20105
|
const MAX_SUBDIVISION = 10, MAX_TRIANGLE_WIDTH = 0.25;
|
|
@@ -20386,27 +20386,27 @@ class ReprojTile extends Tile {
|
|
|
20386
20386
|
)) : C = getIntersection(C, m)), !getArea(C))
|
|
20387
20387
|
this.state = TileState.EMPTY;
|
|
20388
20388
|
else {
|
|
20389
|
-
let T = 0,
|
|
20390
|
-
e.canWrapX() && (T = getWidth(_),
|
|
20389
|
+
let T = 0, I = 0;
|
|
20390
|
+
e.canWrapX() && (T = getWidth(_), I = Math.floor(
|
|
20391
20391
|
(C[0] - _[0]) / T
|
|
20392
20392
|
)), wrapAndSliceX(
|
|
20393
20393
|
C.slice(),
|
|
20394
20394
|
e,
|
|
20395
20395
|
!0
|
|
20396
|
-
).forEach((
|
|
20396
|
+
).forEach((S) => {
|
|
20397
20397
|
const L = t.getTileRangeForExtentAndZ(
|
|
20398
|
-
|
|
20398
|
+
S,
|
|
20399
20399
|
this.sourceZ_
|
|
20400
20400
|
);
|
|
20401
20401
|
for (let D = L.minX; D <= L.maxX; D++)
|
|
20402
20402
|
for (let b = L.minY; b <= L.maxY; b++) {
|
|
20403
20403
|
const P = c(this.sourceZ_, D, b, a);
|
|
20404
20404
|
if (P) {
|
|
20405
|
-
const O =
|
|
20405
|
+
const O = I * T;
|
|
20406
20406
|
this.sourceTiles_.push({ tile: P, offset: O });
|
|
20407
20407
|
}
|
|
20408
20408
|
}
|
|
20409
|
-
++
|
|
20409
|
+
++I;
|
|
20410
20410
|
}), this.sourceTiles_.length === 0 && (this.state = TileState.EMPTY);
|
|
20411
20411
|
}
|
|
20412
20412
|
}
|
|
@@ -20839,11 +20839,11 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
|
|
|
20839
20839
|
const p = this.context.canvas.width, _ = this.context.canvas.height, y = this.getRenderContext(e);
|
|
20840
20840
|
let A = !1, x = !0;
|
|
20841
20841
|
if (c.extent) {
|
|
20842
|
-
const
|
|
20842
|
+
const S = fromUserExtent(
|
|
20843
20843
|
c.extent,
|
|
20844
20844
|
u.projection
|
|
20845
20845
|
);
|
|
20846
|
-
x = intersects$1(
|
|
20846
|
+
x = intersects$1(S, e.extent), A = x && !containsExtent(S, e.extent), A && this.clipUnrotated(y, e, S);
|
|
20847
20847
|
}
|
|
20848
20848
|
const C = i.getImage(), T = compose(
|
|
20849
20849
|
this.tempTransform,
|
|
@@ -20856,10 +20856,10 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
|
|
|
20856
20856
|
l * (d[1] - n[3]) / a
|
|
20857
20857
|
);
|
|
20858
20858
|
this.renderedResolution = a * h / l;
|
|
20859
|
-
const
|
|
20860
|
-
if (this.getLayer().getSource().getInterpolate() || (y.imageSmoothingEnabled = !1), this.preRender(y, e), x &&
|
|
20861
|
-
const
|
|
20862
|
-
D !== 1 && (y.save(), y.globalAlpha = D), y.drawImage(C, 0, 0, +C.width, +C.height,
|
|
20859
|
+
const I = C.width * T[0], w = C.height * T[3];
|
|
20860
|
+
if (this.getLayer().getSource().getInterpolate() || (y.imageSmoothingEnabled = !1), this.preRender(y, e), x && I >= 0.5 && w >= 0.5) {
|
|
20861
|
+
const S = T[4], L = T[5], D = c.opacity;
|
|
20862
|
+
D !== 1 && (y.save(), y.globalAlpha = D), y.drawImage(C, 0, 0, +C.width, +C.height, S, L, I, w), D !== 1 && y.restore();
|
|
20863
20863
|
}
|
|
20864
20864
|
return this.postRender(this.context, e), A && y.restore(), y.imageSmoothingEnabled = !0, this.container;
|
|
20865
20865
|
}
|
|
@@ -21083,8 +21083,8 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
21083
21083
|
const C = this.getTile(p, A, x, e);
|
|
21084
21084
|
if (!C || !addTileToLookup(n, C, p))
|
|
21085
21085
|
continue;
|
|
21086
|
-
const
|
|
21087
|
-
if (u[
|
|
21086
|
+
const I = C.getKey();
|
|
21087
|
+
if (u[I] = !0, C.getState() === TileState.IDLE && !e.tileQueue.isKeyQueued(I)) {
|
|
21088
21088
|
const w = createOrUpdate(p, A, x, this.tempTileCoord_);
|
|
21089
21089
|
e.tileQueue.enqueue([
|
|
21090
21090
|
C,
|
|
@@ -21185,7 +21185,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
21185
21185
|
a[1] - C,
|
|
21186
21186
|
a[0] + x,
|
|
21187
21187
|
a[1] + C
|
|
21188
|
-
],
|
|
21188
|
+
], I = {};
|
|
21189
21189
|
this.renderedTiles.length = 0;
|
|
21190
21190
|
const w = c.getPreload();
|
|
21191
21191
|
if (e.nextExtent) {
|
|
@@ -21193,21 +21193,21 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
21193
21193
|
n.nextResolution,
|
|
21194
21194
|
h.zDirection
|
|
21195
21195
|
), X = getRenderExtent(e, e.nextExtent);
|
|
21196
|
-
this.enqueueTiles(e, X, F,
|
|
21196
|
+
this.enqueueTiles(e, X, F, I, w);
|
|
21197
21197
|
}
|
|
21198
|
-
const
|
|
21199
|
-
if (this.enqueueTiles(e,
|
|
21198
|
+
const S = getRenderExtent(e, m);
|
|
21199
|
+
if (this.enqueueTiles(e, S, d, I, 0), w > 0 && setTimeout(() => {
|
|
21200
21200
|
this.enqueueTiles(
|
|
21201
21201
|
e,
|
|
21202
|
-
I,
|
|
21203
|
-
d - 1,
|
|
21204
21202
|
S,
|
|
21203
|
+
d - 1,
|
|
21204
|
+
I,
|
|
21205
21205
|
w - 1
|
|
21206
21206
|
);
|
|
21207
|
-
}, 0), !(d in
|
|
21207
|
+
}, 0), !(d in I))
|
|
21208
21208
|
return this.container;
|
|
21209
21209
|
const L = getUid(this), D = e.time;
|
|
21210
|
-
for (const F of
|
|
21210
|
+
for (const F of I[d]) {
|
|
21211
21211
|
const X = F.getState();
|
|
21212
21212
|
if (X === TileState.EMPTY)
|
|
21213
21213
|
continue;
|
|
@@ -21216,15 +21216,15 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
21216
21216
|
F.endTransition(L);
|
|
21217
21217
|
continue;
|
|
21218
21218
|
}
|
|
21219
|
-
if (X !== TileState.ERROR && (this.renderComplete = !1), this.findStaleTile_(W,
|
|
21220
|
-
removeTileFromLookup(
|
|
21219
|
+
if (X !== TileState.ERROR && (this.renderComplete = !1), this.findStaleTile_(W, I)) {
|
|
21220
|
+
removeTileFromLookup(I, F, d), e.animate = !0;
|
|
21221
21221
|
continue;
|
|
21222
21222
|
}
|
|
21223
21223
|
if (this.findAltTiles_(
|
|
21224
21224
|
u,
|
|
21225
21225
|
W,
|
|
21226
21226
|
d + 1,
|
|
21227
|
-
|
|
21227
|
+
I
|
|
21228
21228
|
))
|
|
21229
21229
|
continue;
|
|
21230
21230
|
const K = u.getMinZoom();
|
|
@@ -21232,7 +21232,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
21232
21232
|
u,
|
|
21233
21233
|
W,
|
|
21234
21234
|
H,
|
|
21235
|
-
|
|
21235
|
+
I
|
|
21236
21236
|
); --H)
|
|
21237
21237
|
;
|
|
21238
21238
|
}
|
|
@@ -21247,7 +21247,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
21247
21247
|
-_ / 2,
|
|
21248
21248
|
-y / 2
|
|
21249
21249
|
), i.extent && this.clipUnrotated(P, e, A), h.getInterpolate() || (P.imageSmoothingEnabled = !1), this.preRender(P, e);
|
|
21250
|
-
const O = Object.keys(
|
|
21250
|
+
const O = Object.keys(I).map(Number);
|
|
21251
21251
|
O.sort(ascending);
|
|
21252
21252
|
let B;
|
|
21253
21253
|
const N = [], G = [];
|
|
@@ -21263,10 +21263,10 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
21263
21263
|
p * (Q[0] - T[0]) / g,
|
|
21264
21264
|
p * (T[3] - Q[3]) / g
|
|
21265
21265
|
]), re = p * h.getGutterForProjection(r);
|
|
21266
|
-
for (const ne of
|
|
21266
|
+
for (const ne of I[X]) {
|
|
21267
21267
|
if (ne.getState() !== TileState.LOADED)
|
|
21268
21268
|
continue;
|
|
21269
|
-
const J = ne.tileCoord, Te = z[1] - J[1],
|
|
21269
|
+
const J = ne.tileCoord, Te = z[1] - J[1], Se = Math.round(j[0] - (Te - 1) * K), ye = z[2] - J[2], ue = Math.round(j[1] - (ye - 1) * H), $ = Math.round(j[0] - Te * K), oe = Math.round(j[1] - ye * H), fe = Se - $, pe = ue - oe, Ee = O.length === 1;
|
|
21270
21270
|
let de = !1;
|
|
21271
21271
|
B = [$, oe, $ + fe, oe, $ + fe, oe + pe, $, oe + pe];
|
|
21272
21272
|
for (let me = 0, _e = N.length; me < _e; ++me)
|
|
@@ -24510,6 +24510,29 @@ const _hoisted_1 = {
|
|
|
24510
24510
|
function capitalize(s) {
|
|
24511
24511
|
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
24512
24512
|
}
|
|
24513
|
+
const cloneDeepKeepFunction = (s) => {
|
|
24514
|
+
if (Array.isArray(s))
|
|
24515
|
+
return s.map((e) => cloneDeepKeepFunction(e));
|
|
24516
|
+
if (s && typeof s == "object") {
|
|
24517
|
+
const e = {};
|
|
24518
|
+
return Object.keys(s).forEach((t) => {
|
|
24519
|
+
e[t] = cloneDeepKeepFunction(s[t]);
|
|
24520
|
+
}), e;
|
|
24521
|
+
}
|
|
24522
|
+
return s;
|
|
24523
|
+
}, isEqualWithFunction = (s, e) => {
|
|
24524
|
+
if (typeof s == "function" || typeof e == "function")
|
|
24525
|
+
return typeof s != "function" || typeof e != "function" ? !1 : s === e || s.toString() === e.toString();
|
|
24526
|
+
if (s === e)
|
|
24527
|
+
return !0;
|
|
24528
|
+
if (Array.isArray(s) && Array.isArray(e))
|
|
24529
|
+
return s.length !== e.length ? !1 : s.every((t, i) => isEqualWithFunction(t, e[i]));
|
|
24530
|
+
if (s && e && typeof s == "object" && typeof e == "object") {
|
|
24531
|
+
const t = Object.keys(s), i = Object.keys(e);
|
|
24532
|
+
return t.length !== i.length ? !1 : t.every((n) => isEqualWithFunction(s[n], e[n]));
|
|
24533
|
+
}
|
|
24534
|
+
return !1;
|
|
24535
|
+
};
|
|
24513
24536
|
function getColor(s) {
|
|
24514
24537
|
return s < 10.8 ? "#404040" : s < 13.9 ? "#008000" : s < 17.2 ? "#0000ff" : s < 24.5 ? "#ff7d00" : "#ff0000";
|
|
24515
24538
|
}
|
|
@@ -24526,7 +24549,7 @@ const _hoisted_1 = {
|
|
|
24526
24549
|
typhoonList[t].drawWindCircle(), typhoonPoint = void 0;
|
|
24527
24550
|
}
|
|
24528
24551
|
};
|
|
24529
|
-
|
|
24552
|
+
onMounted(() => {
|
|
24530
24553
|
map = new Map(options);
|
|
24531
24554
|
const s = /* @__PURE__ */ new Set();
|
|
24532
24555
|
props.options.event && props.options.event.register.forEach((e) => {
|
|
@@ -24578,27 +24601,34 @@ const _hoisted_1 = {
|
|
|
24578
24601
|
(s) => {
|
|
24579
24602
|
map.setView(new View(s));
|
|
24580
24603
|
}
|
|
24581
|
-
)
|
|
24582
|
-
|
|
24583
|
-
|
|
24604
|
+
);
|
|
24605
|
+
let previousLayersSnapshot = cloneDeepKeepFunction(props.options.layers);
|
|
24606
|
+
return watch(
|
|
24607
|
+
() => props.options.layers,
|
|
24608
|
+
(s) => {
|
|
24609
|
+
if (!map) {
|
|
24610
|
+
previousLayersSnapshot = cloneDeepKeepFunction(s);
|
|
24611
|
+
return;
|
|
24612
|
+
}
|
|
24613
|
+
const e = previousLayersSnapshot;
|
|
24584
24614
|
s.forEach((t) => {
|
|
24585
24615
|
const i = e.findIndex((n) => n.id === t.id);
|
|
24586
24616
|
if (i > -1) {
|
|
24587
24617
|
const n = {};
|
|
24588
24618
|
for (const r in t)
|
|
24589
|
-
if (
|
|
24619
|
+
if (!isEqualWithFunction(t[r], e[i][r]))
|
|
24590
24620
|
if (r === "source") {
|
|
24591
24621
|
const o = {};
|
|
24592
24622
|
for (const a in t[r])
|
|
24593
|
-
|
|
24623
|
+
isEqualWithFunction(t[r][a], e[i][r][a]) || (o[a] = t[r][a]);
|
|
24594
24624
|
n[r] = o;
|
|
24595
24625
|
} else t.type === "point" && r === "data" ? (n.add = [], n.update = [], n.delete = [], t[r].forEach((o) => {
|
|
24596
24626
|
const a = e[i][r].findIndex((l) => l.id === o.id);
|
|
24597
|
-
a < 0 ? n.add.push(o) :
|
|
24627
|
+
a < 0 ? n.add.push(o) : isEqualWithFunction(o, e[i][r][a]) || n.update.push(o);
|
|
24598
24628
|
}), e[i][r].forEach((o) => {
|
|
24599
24629
|
t[r].find((l) => l.id === o.id) || n.delete.push(o);
|
|
24600
24630
|
})) : n[r] = t[r];
|
|
24601
|
-
|
|
24631
|
+
Object.keys(n).length > 0 && updateLayer(t.id, t.type, n);
|
|
24602
24632
|
} else {
|
|
24603
24633
|
const n = addLayer(t);
|
|
24604
24634
|
map.addLayer(n);
|
|
@@ -24612,7 +24642,7 @@ const _hoisted_1 = {
|
|
|
24612
24642
|
a.includes(o) && (map.removeOverlay(typhoonMarks[a].nameOverlay), map.removeOverlay(typhoonMarks[a].lastPointOverlay), delete typhoonMarks[a]);
|
|
24613
24643
|
}
|
|
24614
24644
|
}
|
|
24615
|
-
});
|
|
24645
|
+
}), previousLayersSnapshot = cloneDeepKeepFunction(s);
|
|
24616
24646
|
},
|
|
24617
24647
|
{ deep: !0 }
|
|
24618
24648
|
), (s, e) => (openBlock(), createElementBlock("div", _hoisted_1));
|
|
@@ -24622,7 +24652,7 @@ const _hoisted_1 = {
|
|
|
24622
24652
|
for (const [i, n] of e)
|
|
24623
24653
|
t[i] = n;
|
|
24624
24654
|
return t;
|
|
24625
|
-
}, VueOl = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
24655
|
+
}, VueOl = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7da5e12c"]]), plugin = {
|
|
24626
24656
|
install(s) {
|
|
24627
24657
|
s.component("VueOl", VueOl);
|
|
24628
24658
|
}
|