@maptalks/vt 0.105.1 → 0.105.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/maptalks.vt.d.ts +1 -1
- package/dist/maptalks.vt.es.js +11 -9
- package/dist/maptalks.vt.es.js.map +1 -1
- package/dist/maptalks.vt.js +276 -274
- package/dist/maptalks.vt.js.map +1 -1
- package/package.json +3 -3
package/dist/maptalks.vt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/vt v0.105.
|
|
2
|
+
* @maptalks/vt v0.105.2
|
|
3
3
|
* LICENSE : undefined
|
|
4
4
|
* (c) 2016-2025 maptalks.org
|
|
5
5
|
*/
|
|
@@ -395,10 +395,10 @@
|
|
|
395
395
|
height: h
|
|
396
396
|
};
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function M(e, t) {
|
|
399
399
|
return t < 1 / 0 && (e.x < 0 || e.x > t || e.y < 0 || e.y > t);
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function S(e) {
|
|
402
402
|
return null == e;
|
|
403
403
|
}
|
|
404
404
|
function P(e, t, n) {
|
|
@@ -1065,7 +1065,7 @@
|
|
|
1065
1065
|
};
|
|
1066
1066
|
var Te = le.exports, we = {
|
|
1067
1067
|
exports: {}
|
|
1068
|
-
},
|
|
1068
|
+
}, Me = {
|
|
1069
1069
|
aliceblue: [ 240, 248, 255 ],
|
|
1070
1070
|
antiquewhite: [ 250, 235, 215 ],
|
|
1071
1071
|
aqua: [ 0, 255, 255 ],
|
|
@@ -1214,8 +1214,8 @@
|
|
|
1214
1214
|
whitesmoke: [ 245, 245, 245 ],
|
|
1215
1215
|
yellow: [ 255, 255, 0 ],
|
|
1216
1216
|
yellowgreen: [ 154, 205, 50 ]
|
|
1217
|
-
},
|
|
1218
|
-
for (var Pe in
|
|
1217
|
+
}, Se = {};
|
|
1218
|
+
for (var Pe in Me) Me.hasOwnProperty(Pe) && (Se[Me[Pe]] = Pe);
|
|
1219
1219
|
var Ie = we.exports = {
|
|
1220
1220
|
rgb: {
|
|
1221
1221
|
channels: 3,
|
|
@@ -1306,16 +1306,16 @@
|
|
|
1306
1306
|
var t, n = e[0] / 255, i = e[1] / 255, r = e[2] / 255;
|
|
1307
1307
|
return [ 100 * ((1 - n - (t = Math.min(1 - n, 1 - i, 1 - r))) / (1 - t) || 0), 100 * ((1 - i - t) / (1 - t) || 0), 100 * ((1 - r - t) / (1 - t) || 0), 100 * t ];
|
|
1308
1308
|
}, Ie.rgb.keyword = function(e) {
|
|
1309
|
-
var t =
|
|
1309
|
+
var t = Se[e];
|
|
1310
1310
|
if (t) return t;
|
|
1311
1311
|
var n, i, r, s = 1 / 0;
|
|
1312
|
-
for (var o in
|
|
1313
|
-
var a = (i = e, r =
|
|
1312
|
+
for (var o in Me) if (Me.hasOwnProperty(o)) {
|
|
1313
|
+
var a = (i = e, r = Me[o], Math.pow(i[0] - r[0], 2) + Math.pow(i[1] - r[1], 2) + Math.pow(i[2] - r[2], 2));
|
|
1314
1314
|
a < s && (s = a, n = o);
|
|
1315
1315
|
}
|
|
1316
1316
|
return n;
|
|
1317
1317
|
}, Ie.keyword.rgb = function(e) {
|
|
1318
|
-
return
|
|
1318
|
+
return Me[e];
|
|
1319
1319
|
}, Ie.rgb.xyz = function(e) {
|
|
1320
1320
|
var t = e[0] / 255, n = e[1] / 255, i = e[2] / 255;
|
|
1321
1321
|
return [ 100 * (.4124 * (t = t > .04045 ? Math.pow((t + .055) / 1.055, 2.4) : t / 12.92) + .3576 * (n = n > .04045 ? Math.pow((n + .055) / 1.055, 2.4) : n / 12.92) + .1805 * (i = i > .04045 ? Math.pow((i + .055) / 1.055, 2.4) : i / 12.92)), 100 * (.2126 * t + .7152 * n + .0722 * i), 100 * (.0193 * t + .1192 * n + .9505 * i) ];
|
|
@@ -1995,7 +1995,7 @@
|
|
|
1995
1995
|
if (!e) return "true";
|
|
1996
1996
|
const t = e[0];
|
|
1997
1997
|
if (e.length <= 1) return "any" === t ? "false" : "true";
|
|
1998
|
-
const n = "==" === t ? bt(e[1], e[2], "===", !1) : "!=" === t ? bt(e[1], e[2], "!==", !1) : "<" === t || ">" === t || "<=" === t || ">=" === t ? bt(e[1], e[2], t, !0) : "any" === t ? Tt(e.slice(1), "||") : "all" === t ? Tt(e.slice(1), "&&") : "none" === t ?
|
|
1998
|
+
const n = "==" === t ? bt(e[1], e[2], "===", !1) : "!=" === t ? bt(e[1], e[2], "!==", !1) : "<" === t || ">" === t || "<=" === t || ">=" === t ? bt(e[1], e[2], t, !0) : "any" === t ? Tt(e.slice(1), "||") : "all" === t ? Tt(e.slice(1), "&&") : "none" === t ? St(Tt(e.slice(1), "||")) : "in" === t ? wt(e[1], e.slice(2)) : "!in" === t ? St(wt(e[1], e.slice(2))) : "has" === t ? Mt(e[1]) : "!has" === t ? St(Mt(e[1])) : "contains" === t ? function(e, t, n) {
|
|
1999
1999
|
const i = vt(e);
|
|
2000
2000
|
return void 0 !== n ? `(${i} + '').indexOf("${t}") === ${n}` : `(${i} + '').indexOf("${t}") >= 0`;
|
|
2001
2001
|
}(e[1], e[2], e[3]) : "true";
|
|
@@ -2025,10 +2025,10 @@
|
|
|
2025
2025
|
const n = JSON.stringify(t.sort(Pt)), i = vt(e);
|
|
2026
2026
|
return t.length <= 200 ? `${n}.indexOf(${i}) !== -1` : `function(v, a, i, j) {\n while (i <= j) { var m = (i + j) >> 1;\n if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;\n }\n return false; }(${i}, ${n},0,${t.length - 1})`;
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2028
|
+
function Mt(e) {
|
|
2029
2029
|
return "$id" === e ? '"id" in f' : `${JSON.stringify(e)} in p`;
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2031
|
+
function St(e) {
|
|
2032
2032
|
return `!(${e})`;
|
|
2033
2033
|
}
|
|
2034
2034
|
function Pt(e, t) {
|
|
@@ -2078,10 +2078,10 @@
|
|
|
2078
2078
|
t + _(e);
|
|
2079
2079
|
})).join("");
|
|
2080
2080
|
}
|
|
2081
|
-
function
|
|
2081
|
+
function M(e, t) {
|
|
2082
2082
|
return e + 22 + 75 * (e < 26) - ((0 != t) << 5);
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function S(e, t, n) {
|
|
2085
2085
|
var i = 0;
|
|
2086
2086
|
for (e = n ? x(e / f) : e >> 1, e += x(e / t); e > y * c >> 1; i += h) e = x(e / y);
|
|
2087
2087
|
return x(i + (y + 1) * e / (e + u));
|
|
@@ -2094,7 +2094,7 @@
|
|
|
2094
2094
|
for (s = y, o = 1, a = h; r >= m && v("invalid-input"), ((u = (p = e.charCodeAt(r++)) - 48 < 10 ? p - 22 : p - 65 < 26 ? p - 65 : p - 97 < 26 ? p - 97 : h) >= h || u > x((l - y) / o)) && v("overflow"),
|
|
2095
2095
|
y += u * o, !(u < (f = a <= b ? 1 : a >= b + c ? c : a - b)); a += h) o > x(l / (d = h - f)) && v("overflow"),
|
|
2096
2096
|
o *= d;
|
|
2097
|
-
b =
|
|
2097
|
+
b = S(y - s, t = g.length + 1, 0 == s), x(y / t) > l - _ && v("overflow"), _ += x(y / t),
|
|
2098
2098
|
y %= t, g.splice(y++, 0, _);
|
|
2099
2099
|
}
|
|
2100
2100
|
return w(g);
|
|
@@ -2107,8 +2107,8 @@
|
|
|
2107
2107
|
for (a - t > x((l - n) / (m = i + 1)) && v("overflow"), n += (a - t) * m, t = a,
|
|
2108
2108
|
o = 0; o < g; ++o) if ((p = e[o]) < t && ++n > l && v("overflow"), p == t) {
|
|
2109
2109
|
for (u = n, f = h; !(u < (d = f <= s ? 1 : f >= s + c ? c : f - s)); f += h) b = u - d,
|
|
2110
|
-
y = h - d, A.push(_(
|
|
2111
|
-
A.push(_(
|
|
2110
|
+
y = h - d, A.push(_(M(d + b % y, 0))), u = x(b / y);
|
|
2111
|
+
A.push(_(M(u, 0))), s = S(n, m, i == r), n = 0, ++i;
|
|
2112
2112
|
}
|
|
2113
2113
|
++n, ++t;
|
|
2114
2114
|
}
|
|
@@ -2807,8 +2807,8 @@
|
|
|
2807
2807
|
})), e;
|
|
2808
2808
|
}
|
|
2809
2809
|
}
|
|
2810
|
-
var
|
|
2811
|
-
const
|
|
2810
|
+
var Mn = wn;
|
|
2811
|
+
const Sn = [ "Unknown", "Point", "LineString", "Polygon" ];
|
|
2812
2812
|
var Pn = class {
|
|
2813
2813
|
constructor() {
|
|
2814
2814
|
this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null,
|
|
@@ -2819,7 +2819,7 @@
|
|
|
2819
2819
|
return this.feature && void 0 !== this.feature.id ? this.feature.id : null;
|
|
2820
2820
|
}
|
|
2821
2821
|
geometryType() {
|
|
2822
|
-
return this.feature ? "number" == typeof this.feature.type ?
|
|
2822
|
+
return this.feature ? "number" == typeof this.feature.type ? Sn[this.feature.type] : this.feature.type : null;
|
|
2823
2823
|
}
|
|
2824
2824
|
geometry() {
|
|
2825
2825
|
return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
|
|
@@ -3165,7 +3165,7 @@
|
|
|
3165
3165
|
}
|
|
3166
3166
|
_parse(e, t) {
|
|
3167
3167
|
function n(e, t, n) {
|
|
3168
|
-
return "assert" === n ? new vn(t, [ e ]) : "coerce" === n ? new
|
|
3168
|
+
return "assert" === n ? new vn(t, [ e ]) : "coerce" === n ? new Mn(t, [ e ]) : e;
|
|
3169
3169
|
}
|
|
3170
3170
|
if (null !== e && "string" != typeof e && "boolean" != typeof e && "number" != typeof e || (e = [ "literal", e ]),
|
|
3171
3171
|
Array.isArray(e)) {
|
|
@@ -3216,7 +3216,7 @@
|
|
|
3216
3216
|
if (e instanceof Cn && "error" === e.name) return !1;
|
|
3217
3217
|
if (e instanceof kn) return !1;
|
|
3218
3218
|
if (e instanceof qn) return !1;
|
|
3219
|
-
const t = e instanceof
|
|
3219
|
+
const t = e instanceof Mn || e instanceof vn;
|
|
3220
3220
|
let n = !0;
|
|
3221
3221
|
return e.eachChild((e => {
|
|
3222
3222
|
n = t ? n && ii(e) : n && e instanceof mn;
|
|
@@ -3352,11 +3352,11 @@
|
|
|
3352
3352
|
let t = (e.l + 16) / 116, n = isNaN(e.a) ? t : t + e.a / 500, i = isNaN(e.b) ? t : t - e.b / 200;
|
|
3353
3353
|
return t = 1 * vi(t), n = ui * vi(n), i = fi * vi(i), new on(bi(3.2404542 * n - 1.5371385 * t - .4985314 * i), bi(-.969266 * n + 1.8760108 * t + .041556 * i), bi(.0556434 * n - .2040259 * t + 1.0572252 * i), e.alpha);
|
|
3354
3354
|
}
|
|
3355
|
-
function
|
|
3355
|
+
function Mi(e, t, n) {
|
|
3356
3356
|
const i = t - e;
|
|
3357
3357
|
return e + n * (i > 180 || i < -180 ? i - 360 * Math.round(i / 360) : i);
|
|
3358
3358
|
}
|
|
3359
|
-
const
|
|
3359
|
+
const Si = {
|
|
3360
3360
|
forward: Ti,
|
|
3361
3361
|
reverse: wi,
|
|
3362
3362
|
interpolate: function(e, t, n) {
|
|
@@ -3388,7 +3388,7 @@
|
|
|
3388
3388
|
},
|
|
3389
3389
|
interpolate: function(e, t, n) {
|
|
3390
3390
|
return {
|
|
3391
|
-
h:
|
|
3391
|
+
h: Mi(e.h, t.h, n),
|
|
3392
3392
|
c: hi(e.c, t.c, n),
|
|
3393
3393
|
l: hi(e.l, t.l, n),
|
|
3394
3394
|
alpha: hi(e.alpha, t.alpha, n)
|
|
@@ -3397,7 +3397,7 @@
|
|
|
3397
3397
|
};
|
|
3398
3398
|
var Ii = Object.freeze({
|
|
3399
3399
|
__proto__: null,
|
|
3400
|
-
lab:
|
|
3400
|
+
lab: Si,
|
|
3401
3401
|
hcl: Pi
|
|
3402
3402
|
});
|
|
3403
3403
|
class Ci {
|
|
@@ -3461,7 +3461,7 @@
|
|
|
3461
3461
|
const r = t.length;
|
|
3462
3462
|
if (i >= t[r - 1]) return n[r - 1].evaluate(e);
|
|
3463
3463
|
const s = ri(t, i), o = t[s], a = t[s + 1], l = Ci.interpolationFactor(this.interpolation, i, o, a), h = n[s].evaluate(e), c = n[s + 1].evaluate(e);
|
|
3464
|
-
return "interpolate" === this.operator ? ci[this.type.kind.toLowerCase()](h, c, l) : "interpolate-hcl" === this.operator ? Pi.reverse(Pi.interpolate(Pi.forward(h), Pi.forward(c), l)) :
|
|
3464
|
+
return "interpolate" === this.operator ? ci[this.type.kind.toLowerCase()](h, c, l) : "interpolate-hcl" === this.operator ? Pi.reverse(Pi.interpolate(Pi.forward(h), Pi.forward(c), l)) : Si.reverse(Si.interpolate(Si.forward(h), Si.forward(c), l));
|
|
3465
3465
|
}
|
|
3466
3466
|
eachChild(e) {
|
|
3467
3467
|
e(this.input);
|
|
@@ -3978,10 +3978,10 @@
|
|
|
3978
3978
|
slice: Yi,
|
|
3979
3979
|
step: oi,
|
|
3980
3980
|
string: vn,
|
|
3981
|
-
"to-boolean":
|
|
3982
|
-
"to-color":
|
|
3983
|
-
"to-number":
|
|
3984
|
-
"to-string":
|
|
3981
|
+
"to-boolean": Mn,
|
|
3982
|
+
"to-color": Mn,
|
|
3983
|
+
"to-number": Mn,
|
|
3984
|
+
"to-string": Mn,
|
|
3985
3985
|
var: ei,
|
|
3986
3986
|
within: qn
|
|
3987
3987
|
};
|
|
@@ -4304,7 +4304,7 @@
|
|
|
4304
4304
|
function wr(e) {
|
|
4305
4305
|
return Array.isArray(e) && e.length > 0 && "string" == typeof e[0] && e[0] in cr;
|
|
4306
4306
|
}
|
|
4307
|
-
function
|
|
4307
|
+
function Mr(e, t) {
|
|
4308
4308
|
const n = new ni(cr, [], t ? function(e) {
|
|
4309
4309
|
const t = {
|
|
4310
4310
|
color: zt,
|
|
@@ -4321,7 +4321,7 @@
|
|
|
4321
4321
|
} : void 0);
|
|
4322
4322
|
return i ? ur(new Tr(i, t)) : fr(n.errors);
|
|
4323
4323
|
}
|
|
4324
|
-
class
|
|
4324
|
+
class Sr {
|
|
4325
4325
|
constructor(e, t) {
|
|
4326
4326
|
this.kind = e, this._styleExpression = t, this.isStateDependent = "constant" !== e && !Jn(t.expression);
|
|
4327
4327
|
}
|
|
@@ -4348,7 +4348,7 @@
|
|
|
4348
4348
|
}
|
|
4349
4349
|
}
|
|
4350
4350
|
function Ir(e, t) {
|
|
4351
|
-
if ("error" === (e =
|
|
4351
|
+
if ("error" === (e = Mr(e, t)).result) return e;
|
|
4352
4352
|
const n = e.value.expression, i = $n(n);
|
|
4353
4353
|
if (!i && !function(e) {
|
|
4354
4354
|
return "data-driven" === e["property-type"];
|
|
@@ -4361,7 +4361,7 @@
|
|
|
4361
4361
|
if (!s && !r) return fr([ new Ft("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') ]);
|
|
4362
4362
|
if (s instanceof Ft) return fr([ s ]);
|
|
4363
4363
|
if (s instanceof Oi && !dr(t)) return fr([ new Ft("", '"interpolate" expressions cannot be used with this property') ]);
|
|
4364
|
-
if (!s) return ur(new
|
|
4364
|
+
if (!s) return ur(new Sr(i ? "constant" : "source", e.value));
|
|
4365
4365
|
const o = s instanceof Oi ? s.interpolation : void 0;
|
|
4366
4366
|
return ur(new Pr(i ? "camera" : "composite", e.value, s.labels, o));
|
|
4367
4367
|
}
|
|
@@ -4417,13 +4417,13 @@
|
|
|
4417
4417
|
} catch (e) {
|
|
4418
4418
|
console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(n, null, 2)}\n `);
|
|
4419
4419
|
}
|
|
4420
|
-
const r =
|
|
4420
|
+
const r = Mr(i, null);
|
|
4421
4421
|
let s = null;
|
|
4422
4422
|
if ("error" === r.result) throw new Error(r.value.map((e => `${e.key}: ${e.message}`)).join(", "));
|
|
4423
4423
|
s = (e, t, n) => r.value.evaluate(e, t, {}, n);
|
|
4424
4424
|
let o = null, a = null;
|
|
4425
4425
|
if (i !== n) {
|
|
4426
|
-
const e =
|
|
4426
|
+
const e = Mr(n, null);
|
|
4427
4427
|
if ("error" === e.result) throw new Error(e.value.map((e => `${e.key}: ${e.message}`)).join(", "));
|
|
4428
4428
|
o = (t, n, i, r, s) => e.value.evaluate(t, n, {}, i, void 0, void 0, r, s), a = !$n(e.value.expression);
|
|
4429
4429
|
}
|
|
@@ -4509,7 +4509,7 @@
|
|
|
4509
4509
|
return !0;
|
|
4510
4510
|
}
|
|
4511
4511
|
},
|
|
4512
|
-
createExpression:
|
|
4512
|
+
createExpression: Mr,
|
|
4513
4513
|
createPropertyExpression: Ir,
|
|
4514
4514
|
normalizePropertyExpression: function(e, t) {
|
|
4515
4515
|
if (gr(e)) return new Cr(e, t);
|
|
@@ -4526,7 +4526,7 @@
|
|
|
4526
4526
|
};
|
|
4527
4527
|
}
|
|
4528
4528
|
},
|
|
4529
|
-
ZoomConstantExpression:
|
|
4529
|
+
ZoomConstantExpression: Sr,
|
|
4530
4530
|
ZoomDependentExpression: Pr,
|
|
4531
4531
|
StylePropertyFunction: Cr
|
|
4532
4532
|
}, {isExpression: zr, createExpression: Vr} = Nr, Ur = {};
|
|
@@ -5163,14 +5163,14 @@
|
|
|
5163
5163
|
return e || "Open Sans Regular";
|
|
5164
5164
|
}
|
|
5165
5165
|
const ws = /\{[\w-]+(?:\|[\w-]+)*\}/g;
|
|
5166
|
-
function
|
|
5166
|
+
function Ms(e, t) {
|
|
5167
5167
|
if (!et(e)) return e;
|
|
5168
5168
|
function n(e) {
|
|
5169
5169
|
if (!t) return As;
|
|
5170
5170
|
const n = t[e];
|
|
5171
5171
|
return Je(n) ? As : Array.isArray(n) ? n.join() : n;
|
|
5172
5172
|
}
|
|
5173
|
-
const [i, r] = bs, s =
|
|
5173
|
+
const [i, r] = bs, s = Ss(e);
|
|
5174
5174
|
for (let t = 0, o = s.length; t < o; t++) {
|
|
5175
5175
|
const o = s[t], a = `${i}${o}${r}`;
|
|
5176
5176
|
if (o.indexOf("|") > 0) {
|
|
@@ -5188,7 +5188,7 @@
|
|
|
5188
5188
|
}
|
|
5189
5189
|
return e;
|
|
5190
5190
|
}
|
|
5191
|
-
function
|
|
5191
|
+
function Ss(e) {
|
|
5192
5192
|
e += As;
|
|
5193
5193
|
const [t, n] = bs, i = [];
|
|
5194
5194
|
let r = !1, s = As;
|
|
@@ -5213,7 +5213,7 @@
|
|
|
5213
5213
|
resolveExpVarNames: function e(t, n) {
|
|
5214
5214
|
if (2 !== n.length || "get" !== n[0]) for (let i = 0; i < n.length; i++) 2 === n[i].length && "get" === n[i][0] ? t.push(n[i][1]) : Array.isArray(n[i]) && e(t, n[i]); else t.push(n[1]);
|
|
5215
5215
|
},
|
|
5216
|
-
resolveText:
|
|
5216
|
+
resolveText: Ms,
|
|
5217
5217
|
resolveText_bak: function(e, t) {
|
|
5218
5218
|
return et(e) ? e.replace(ws, (function(e) {
|
|
5219
5219
|
if (!t) return "";
|
|
@@ -5232,7 +5232,7 @@
|
|
|
5232
5232
|
resolveVarNames: function(e) {
|
|
5233
5233
|
return e.match(ws);
|
|
5234
5234
|
},
|
|
5235
|
-
templateKeys:
|
|
5235
|
+
templateKeys: Ss
|
|
5236
5236
|
});
|
|
5237
5237
|
const Cs = {
|
|
5238
5238
|
"Latin-1 Supplement": e => e >= 128 && e <= 255,
|
|
@@ -5621,9 +5621,9 @@
|
|
|
5621
5621
|
}
|
|
5622
5622
|
getIconAndGlyph() {
|
|
5623
5623
|
if (this.iconGlyph) return this.iconGlyph;
|
|
5624
|
-
const {markerFileFn: e, markerTypeFn: t, markerPathFn: n, markerWidthFn: i, markerHeightFn: r, markerFillFn: s, markerFillPatternFileFn: o, markerFillOpacityFn: a, markerTextFitFn: l, markerTextFitPaddingFn: h, markerLineColorFn: c, markerLineWidthFn: u, markerLineOpacityFn: f, markerLineDasharrayFn: d, markerLinePatternFileFn: p, markerPathWidthFn: g, markerPathHeightFn: m, textNameFn: y, textFaceNameFn: x} = this._fnTypes, {zoom: _} = this.options, v = {}, b = this.symbol, A = this.symbolDef, T = this.feature.properties, w = e ? e(null, T) : b.markerFile,
|
|
5624
|
+
const {markerFileFn: e, markerTypeFn: t, markerPathFn: n, markerWidthFn: i, markerHeightFn: r, markerFillFn: s, markerFillPatternFileFn: o, markerFillOpacityFn: a, markerTextFitFn: l, markerTextFitPaddingFn: h, markerLineColorFn: c, markerLineWidthFn: u, markerLineOpacityFn: f, markerLineDasharrayFn: d, markerLinePatternFileFn: p, markerPathWidthFn: g, markerPathHeightFn: m, textNameFn: y, textFaceNameFn: x} = this._fnTypes, {zoom: _} = this.options, v = {}, b = this.symbol, A = this.symbolDef, T = this.feature.properties, w = e ? e(null, T) : b.markerFile, M = t ? t(null, T) : b.markerType, S = w || M || b.markerPath, P = !Je(this.symbolDef.textName);
|
|
5625
5625
|
let I, C;
|
|
5626
|
-
if (
|
|
5626
|
+
if (S) {
|
|
5627
5627
|
I = function(e, t, n, i, r, s) {
|
|
5628
5628
|
if (Je(t.markerWidth) && Je(t.markerHeight)) return null;
|
|
5629
5629
|
const o = "__fn_markerWidth".trim(), a = "__fn_markerHeight".trim();
|
|
@@ -5638,7 +5638,7 @@
|
|
|
5638
5638
|
const t = A.textSize;
|
|
5639
5639
|
let n = A.textName;
|
|
5640
5640
|
ie(n) && (n = re(n)(_, T));
|
|
5641
|
-
const i =
|
|
5641
|
+
const i = Ms(n, T);
|
|
5642
5642
|
if (i) {
|
|
5643
5643
|
const n = "__fn_textSize".trim(), r = "__fn_textSize_0".trim();
|
|
5644
5644
|
ie(t) && !A[n] && (A[r] = re(t), A[n] = (e, t) => {
|
|
@@ -5656,11 +5656,11 @@
|
|
|
5656
5656
|
}
|
|
5657
5657
|
if (P && (C = _s(b, this.symbolDef, T, _)), !C && !I) return v;
|
|
5658
5658
|
if (I && (I[0] = Math.ceil(I[0]), I[1] = Math.ceil(I[1])), C && (C[0] = Math.ceil(C[0]),
|
|
5659
|
-
C[1] = Math.ceil(C[1])), this.iconSize = I, this.textSize = C,
|
|
5659
|
+
C[1] = Math.ceil(C[1])), this.iconSize = I, this.textSize = C, S && I[0] >= 0 && I[1] >= 0) {
|
|
5660
5660
|
let e;
|
|
5661
|
-
if (
|
|
5661
|
+
if (M) {
|
|
5662
5662
|
const t = {};
|
|
5663
|
-
if (t.markerType =
|
|
5663
|
+
if (t.markerType = M, "path" === M && (t.markerPath = n ? n(null, T) : b.markerPath,
|
|
5664
5664
|
t.markerPathWidth = g ? g(null, T) : b.markerPathWidth, t.markerPathHeight = m ? m(null, T) : b.markerPathHeight),
|
|
5665
5665
|
i) {
|
|
5666
5666
|
const e = i(null, T);
|
|
@@ -5756,7 +5756,7 @@
|
|
|
5756
5756
|
const e = y ? y(this.options.zoom, T) : b.textName;
|
|
5757
5757
|
if (e || 0 === e) {
|
|
5758
5758
|
const t = Ts(x ? x(null, T) : b.textFaceName);
|
|
5759
|
-
let n =
|
|
5759
|
+
let n = Ms(e, T);
|
|
5760
5760
|
n && n.length && (n = qs(n), v.glyph = {
|
|
5761
5761
|
font: t,
|
|
5762
5762
|
text: n
|
|
@@ -6036,37 +6036,37 @@
|
|
|
6036
6036
|
const a = o[e];
|
|
6037
6037
|
if ("vertex" === t) for (let e = 0; e < a.length; e++) {
|
|
6038
6038
|
const t = a[e];
|
|
6039
|
-
for (let o = 0; o < t.length; o++)
|
|
6039
|
+
for (let o = 0; o < t.length; o++) M(t[o], n) || (s.push(t[o]), i && (0 === o ? xo(t[o], t[o], t[e + 1], r) : xo(t[o], t[o - 1], t[o], r)));
|
|
6040
6040
|
} else if ("vertex-first" === t) {
|
|
6041
6041
|
const e = a[0];
|
|
6042
|
-
e && e[0] && !
|
|
6042
|
+
e && e[0] && !M(e[0], n) && (s.push(e[0]), i && xo(e[0], e[0], e[1], r));
|
|
6043
6043
|
} else if ("vertex-last" === t || "vertex-firstlast" === t) {
|
|
6044
6044
|
const e = a[0];
|
|
6045
|
-
if ("vertex-firstlast" === t && e && e[0] && !
|
|
6046
|
-
e && e[e.length - 1] && !
|
|
6045
|
+
if ("vertex-firstlast" === t && e && e[0] && !M(e[0], n) && (s.push(e[0]), i && xo(e[0], e[0], e[1], r)),
|
|
6046
|
+
e && e[e.length - 1] && !M(e[e.length - 1], n)) {
|
|
6047
6047
|
const t = e.length - 1;
|
|
6048
6048
|
s.push(e[t]), i && xo(e[t], e[t - 1], e[t], r);
|
|
6049
6049
|
}
|
|
6050
6050
|
} else {
|
|
6051
6051
|
const e = fo(a, 16);
|
|
6052
|
-
|
|
6052
|
+
M(e, n) || s.push(e);
|
|
6053
6053
|
}
|
|
6054
6054
|
}
|
|
6055
6055
|
} else if (2 === e.type) for (let o = 0; o < e.geometry.length; o++) {
|
|
6056
6056
|
const a = e.geometry[o];
|
|
6057
|
-
if ("vertex" === t) for (let e = 0; e < a.length; e++)
|
|
6057
|
+
if ("vertex" === t) for (let e = 0; e < a.length; e++) M(a[e], n) || (s.push(a[e]),
|
|
6058
6058
|
i && (0 === e ? xo(a[e], a[e], a[e + 1], r) : xo(a[e], a[e - 1], a[e], r))); else if ("vertex-last" === t || "vertex-firstlast" === t) {
|
|
6059
|
-
if ("vertex-firstlast" !== t ||
|
|
6060
|
-
a && a[a.length - 1] && !
|
|
6059
|
+
if ("vertex-firstlast" !== t || M(a[0], n) || (s.push(a[0]), i && xo(a[0], a[0], a[1], r)),
|
|
6060
|
+
a && a[a.length - 1] && !M(a[a.length - 1], n)) {
|
|
6061
6061
|
const e = a.length - 1;
|
|
6062
6062
|
s.push(a[e]), i && xo(a[e], a[e - 1], a[e], r);
|
|
6063
6063
|
}
|
|
6064
|
-
} else
|
|
6064
|
+
} else M(a[0], n) || (s.push(a[0]), i && xo(a[0], a[0], a[1], r));
|
|
6065
6065
|
} else if (1 === e.type) for (let t = 0; t < e.geometry.length; t++) {
|
|
6066
6066
|
const r = e.geometry[t];
|
|
6067
6067
|
for (let e = 0; e < r.length; e++) {
|
|
6068
6068
|
const t = r[e];
|
|
6069
|
-
|
|
6069
|
+
M(t, n) || (i && (t.xRotation = 0, t.yRotation = 0, t.zRotation = 0), s.push(t));
|
|
6070
6070
|
}
|
|
6071
6071
|
}
|
|
6072
6072
|
return s;
|
|
@@ -6119,7 +6119,7 @@
|
|
|
6119
6119
|
const r = (vo + "").trim(), s = function(e, t, n, i) {
|
|
6120
6120
|
const r = (vo + "").trim(), {mergeOnPropertyFn: s} = n;
|
|
6121
6121
|
if (!t.mergeOnProperty) return [];
|
|
6122
|
-
if (!
|
|
6122
|
+
if (!S(o = t.mergeOnProperty) && ("string" == typeof o || null !== o.constructor && o.constructor === String)) return [ {
|
|
6123
6123
|
features: e,
|
|
6124
6124
|
property: t.mergeOnProperty
|
|
6125
6125
|
} ];
|
|
@@ -6130,7 +6130,7 @@
|
|
|
6130
6130
|
const o = e[n].properties = e[n].properties || {};
|
|
6131
6131
|
o.$layer = e[n].layer, o.$type = e[n].type;
|
|
6132
6132
|
const c = s ? s(i, o) : t.mergeOnProperty;
|
|
6133
|
-
|
|
6133
|
+
S(c) ? h.push(e[n]) : (void 0 === l[c] && (l[c] = a.length, a.push({
|
|
6134
6134
|
features: [],
|
|
6135
6135
|
property: c
|
|
6136
6136
|
})), a[l[c]].features.push(e[n]));
|
|
@@ -6348,7 +6348,7 @@
|
|
|
6348
6348
|
}
|
|
6349
6349
|
return r;
|
|
6350
6350
|
}(r.horizontal, p, this.glyphAtlas.positions[t]), x && ($ = x(null, d), ie($) ? this.dynamicAttrs.aTextFill = 1 : $ = ht([], $)),
|
|
6351
|
-
_ && (J = _(this.options.zoom, d),
|
|
6351
|
+
_ && (J = _(this.options.zoom, d), S(J) && (J = 14)), v && (K = v(null, d), ie(K) ? this.dynamicAttrs.aTextHaloFill = 1 : K = ht([], K)),
|
|
6352
6352
|
b && (Q = b(null, d)), A && (ee = 255 * A(null, d)), T && (te = T(null, d) || 0),
|
|
6353
6353
|
I && (ne = I(null, d) || 0), C && (he = +("map" === C(null, d))), k && (ue = +("map" === k(null, d))),
|
|
6354
6354
|
O && (de = P(O(null, d), 0, 360) * Math.PI / 180);
|
|
@@ -6386,8 +6386,8 @@
|
|
|
6386
6386
|
writingMode: void 0,
|
|
6387
6387
|
glyphOffset: [ 0, 0 ]
|
|
6388
6388
|
} ];
|
|
6389
|
-
}(), D && (re = D(null, d)),
|
|
6390
|
-
|
|
6389
|
+
}(), D && (re = D(null, d)), S(re) && (re = Z[0].tex.w), L && (se = L(null, d)),
|
|
6390
|
+
S(se) && (se = Z[0].tex.h), H && (oe = H(null, d)), N && (ae = N(null, d)), z && (le = +("map" === z(null, d))),
|
|
6391
6391
|
V && (ce = +("map" === V(null, d))), U && (fe = P(U(null, d), 0, 360) * Math.PI / 180)),
|
|
6392
6392
|
ie(J) && (this.dynamicAttrs.aTextSize = 1), (ie(Q) || ie(ee)) && (this.dynamicAttrs.aTextHalo = 1),
|
|
6393
6393
|
ie(re) && (this.dynamicAttrs.aMarkerWidth = 1), ie(se) && (this.dynamicAttrs.aMarkerHeight = 1),
|
|
@@ -6400,11 +6400,12 @@
|
|
|
6400
6400
|
E && (pe = 255 * (E(this.options.zoom, d) || 0));
|
|
6401
6401
|
const ge = Y && Y.length || 0;
|
|
6402
6402
|
this.ensureDataCapacity(4 * (ge + (Z && Z.length || 0)), l.length);
|
|
6403
|
-
const me = this.options.EXTENT, {altitudeScale: ye, altitudeProperty: xe, defaultAltitude: _e} = this.options, {altitude: ve} = w(e.feature, ye, xe, _e), be = (e, t, n, i, r, s, o) => {
|
|
6403
|
+
const me = this.options.EXTENT, {altitudeScale: ye, altitudeProperty: xe, defaultAltitude: _e} = this.options, {altitude: ve} = w(e.feature, ye, xe, _e), be = this.needAltitudeAttribute(), Ae = (e, t, n, i, r, s, o) => {
|
|
6404
6404
|
if (!t) return;
|
|
6405
6405
|
const a = e ? ge : 1;
|
|
6406
6406
|
for (let l = 0; l < t.length; l++) {
|
|
6407
6407
|
const c = t[l], {tl: f, tr: d, bl: g, br: m, tex: x} = c;
|
|
6408
|
+
let _;
|
|
6408
6409
|
this._fillPos(h, n, i, r, 10 * f.x, 10 * f.y, x.x, x.y + x.h, e, o), this._fillTextData(h, p, a, c.glyphOffset, s, y, s.axis, s.angleR),
|
|
6409
6410
|
this._fillFnTypeData(h, $, J, K, Q, ee, te, ne, re, se, oe, ae, q, pe, le, he, ce, ue, fe, de, W, X),
|
|
6410
6411
|
this._fillPos(h, n, i, r, 10 * d.x, 10 * d.y, x.x + x.w, x.y + x.h, e, o), this._fillTextData(h, p, a, c.glyphOffset, s, y, s.axis, s.angleR),
|
|
@@ -6413,16 +6414,16 @@
|
|
|
6413
6414
|
this._fillFnTypeData(h, $, J, K, Q, ee, te, ne, re, se, oe, ae, q, pe, le, he, ce, ue, fe, de, W, X),
|
|
6414
6415
|
this._fillPos(h, n, i, r, 10 * m.x, 10 * m.y, x.x + x.w, x.y, e, o), this._fillTextData(h, p, a, c.glyphOffset, s, y, s.axis, s.angleR),
|
|
6415
6416
|
this._fillFnTypeData(h, $, J, K, Q, ee, te, ne, re, se, oe, ae, q, pe, le, he, ce, ue, fe, de, W, X),
|
|
6416
|
-
this.addElements(u, u + 1, u + 2), this.addElements(u + 1, u + 2, u + 3), u += 4
|
|
6417
|
-
|
|
6417
|
+
this.addElements(u, u + 1, u + 2), this.addElements(u + 1, u + 2, u + 3), u += 4,
|
|
6418
|
+
_ = be ? Math.max(Math.abs(n), Math.abs(i)) : Math.max(Math.abs(n), Math.abs(i), Math.abs(r)),
|
|
6418
6419
|
_ > this.maxPos && (this.maxPos = _);
|
|
6419
6420
|
}
|
|
6420
|
-
},
|
|
6421
|
+
}, Te = "text" === this.options.pluginType;
|
|
6421
6422
|
for (let e = 0; e < l.length; e++) {
|
|
6422
6423
|
const t = l[e], n = t.z || ve || 0;
|
|
6423
|
-
if (me !== 1 / 0 &&
|
|
6424
|
+
if (me !== 1 / 0 && M(t, me)) continue;
|
|
6424
6425
|
const i = t.x, r = t.y;
|
|
6425
|
-
m &&
|
|
6426
|
+
m && Ae(!1, Z, i, r, n, t), g && (Te || Ae(!0, Y, i, r, n, t, !0), Ae(!0, Y, i, r, n, t, !1));
|
|
6426
6427
|
}
|
|
6427
6428
|
}
|
|
6428
6429
|
_fillPos(e, t, n, i, r, s, o, a, l, h) {
|
|
@@ -6446,7 +6447,7 @@
|
|
|
6446
6447
|
}
|
|
6447
6448
|
}
|
|
6448
6449
|
_fillFnTypeData(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g, m, y, x, _, v, b) {
|
|
6449
|
-
const {textFillFn: A, textSizeFn: T, textHaloFillFn: w, textHaloRadiusFn:
|
|
6450
|
+
const {textFillFn: A, textSizeFn: T, textHaloFillFn: w, textHaloRadiusFn: M, textDxFn: P, textDyFn: I, textPitchAlignmentFn: C, textRotationAlignmentFn: k, textRotationFn: O, textAllowOverlapFn: F, textIgnorePlacementFn: R, textOpacityFn: E, textHaloOpacityFn: D, markerWidthFn: L, markerHeightFn: H, markerDxFn: N, markerDyFn: z, markerPitchAlignmentFn: V, markerRotationAlignmentFn: U, markerRotationFn: B, markerAllowOverlapFn: G, markerIgnorePlacementFn: j, markerOpacityFn: W} = this._fnTypes;
|
|
6450
6451
|
if (A) {
|
|
6451
6452
|
let n = e.aTextFill.currentIndex;
|
|
6452
6453
|
e.aTextFill[n++] = t[0], e.aTextFill[n++] = t[1], e.aTextFill[n++] = t[2], e.aTextFill[n++] = t[3],
|
|
@@ -6461,10 +6462,10 @@
|
|
|
6461
6462
|
e.aTextHaloFill[t++] = i[0], e.aTextHaloFill[t++] = i[1], e.aTextHaloFill[t++] = i[2],
|
|
6462
6463
|
e.aTextHaloFill[t++] = i[3], e.aTextHaloFill.currentIndex = t;
|
|
6463
6464
|
}
|
|
6464
|
-
if (
|
|
6465
|
+
if (M || D) {
|
|
6465
6466
|
let t = e.aTextHalo.currentIndex;
|
|
6466
6467
|
e.aTextHalo[t++] = r || 0, e.aTextHalo.currentIndex = t, t = e.aTextHalo.currentIndex,
|
|
6467
|
-
e.aTextHalo[t++] = 255 * (
|
|
6468
|
+
e.aTextHalo[t++] = 255 * (S(s) ? 1 : s), e.aTextHalo.currentIndex = t;
|
|
6468
6469
|
}
|
|
6469
6470
|
if (P) {
|
|
6470
6471
|
let t = e.aTextDx.currentIndex;
|
|
@@ -6536,7 +6537,7 @@
|
|
|
6536
6537
|
_getAnchors(e, t, n) {
|
|
6537
6538
|
const {feature: i, symbol: r} = e, s = this._getPlacement(e, r), o = i.properties, {markerSpacingFn: a, textSpacingFn: l, textMaxAngleFn: h} = this._fnTypes, c = ((a ? a(null, o) : r.markerSpacing) || (l ? l(null, o) : r.textSpacing) || 250) * n;
|
|
6538
6539
|
let u = h ? h(this.options.zoom, o) : r.textMaxAngle;
|
|
6539
|
-
|
|
6540
|
+
S(u) && (u = 80), u *= Math.PI / 180;
|
|
6540
6541
|
const f = this.options.EXTENT, d = this.options.altitudeToTileScale, p = this._is3DPitchText();
|
|
6541
6542
|
return mo(e, this.lineVertex, u, t, n, f, s, c, p, d);
|
|
6542
6543
|
}
|
|
@@ -6662,8 +6663,8 @@
|
|
|
6662
6663
|
return Math.atan2(this.y - e.y, this.x - e.x);
|
|
6663
6664
|
}
|
|
6664
6665
|
}
|
|
6665
|
-
var wo,
|
|
6666
|
-
function
|
|
6666
|
+
var wo, Mo = "undefined" != typeof Float32Array ? Float32Array : Array;
|
|
6667
|
+
function So(e, t, n, i) {
|
|
6667
6668
|
return e[0] = t, e[1] = n, e[2] = i, e;
|
|
6668
6669
|
}
|
|
6669
6670
|
function Po(e, t) {
|
|
@@ -6687,13 +6688,13 @@
|
|
|
6687
6688
|
Math.hypot || (Math.hypot = function() {
|
|
6688
6689
|
for (var e = 0, t = arguments.length; t--; ) e += arguments[t] * arguments[t];
|
|
6689
6690
|
return Math.sqrt(e);
|
|
6690
|
-
}), wo = new
|
|
6691
|
-
var e = new
|
|
6692
|
-
|
|
6691
|
+
}), wo = new Mo(3), Mo != Float32Array && (wo[0] = 0, wo[1] = 0, wo[2] = 0), function() {
|
|
6692
|
+
var e = new Mo(4);
|
|
6693
|
+
Mo != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0, e[3] = 0);
|
|
6693
6694
|
}();
|
|
6694
6695
|
!function() {
|
|
6695
|
-
var e = new
|
|
6696
|
-
|
|
6696
|
+
var e = new Mo(2);
|
|
6697
|
+
Mo != Float32Array && (e[0] = 0, e[1] = 0);
|
|
6697
6698
|
}();
|
|
6698
6699
|
const Fo = 63, Ro = Math.cos(Math.PI / 180 * 37.5), Eo = Math.pow(2, 16) / 1, Do = new s, Lo = new s, Ho = new s;
|
|
6699
6700
|
class No extends gs {
|
|
@@ -6901,22 +6902,22 @@
|
|
|
6901
6902
|
t.z = p.z, this.updateDistance(g, t), this.addCurrentVertex(t, y, 0, 0, d), g = t;
|
|
6902
6903
|
}
|
|
6903
6904
|
}
|
|
6904
|
-
const
|
|
6905
|
-
d.middleVertex =
|
|
6906
|
-
let
|
|
6907
|
-
if (
|
|
6908
|
-
"bevel" ===
|
|
6909
|
-
"miter" ===
|
|
6905
|
+
const M = g && m;
|
|
6906
|
+
d.middleVertex = M;
|
|
6907
|
+
let S = M ? n : h ? "butt" : i;
|
|
6908
|
+
if (M && "round" === S && (b < s ? S = "miter" : b <= 2 && (S = "fakeround")), "miter" === S && b > r && !a && (S = "bevel"),
|
|
6909
|
+
"bevel" === S && (b > 2 && (S = "flipbevel"), b < r && (S = "miter")), g && this.updateDistance(g, p),
|
|
6910
|
+
"miter" === S) a ? (this.addCurrentVertex(p, y, 0, 0, d), d.dir = m.sub(p)._unit(),
|
|
6910
6911
|
this.addCurrentVertex(p, x, 0, 0, d)) : (l._mult(b), this.addCurrentVertex(p, l, 0, 0, d),
|
|
6911
|
-
o && (d.currentNormal = x, d.dir = m.sub(p)._unit(), this.addCurrentVertex(p, l, 0, 0, d))); else if ("flipbevel" ===
|
|
6912
|
+
o && (d.currentNormal = x, d.dir = m.sub(p)._unit(), this.addCurrentVertex(p, l, 0, 0, d))); else if ("flipbevel" === S) {
|
|
6912
6913
|
if (b > 100) l = x.mult(-1); else {
|
|
6913
6914
|
const e = b * y.add(x).mag() / y.sub(x).mag();
|
|
6914
6915
|
l._perp()._mult(e * (w ? -1 : 1));
|
|
6915
6916
|
}
|
|
6916
6917
|
this.addCurrentVertex(p, l, 0, 0, d), this.addCurrentVertex(p, l.mult(-1), 0, 0, d);
|
|
6917
|
-
} else if ("bevel" ===
|
|
6918
|
+
} else if ("bevel" === S || "fakeround" === S) {
|
|
6918
6919
|
const e = -Math.sqrt(b * b - 1), t = w ? e : 0, n = w ? 0 : e;
|
|
6919
|
-
if (g && this.addCurrentVertex(p, y, t, n, d), "fakeround" ===
|
|
6920
|
+
if (g && this.addCurrentVertex(p, y, t, n, d), "fakeround" === S) {
|
|
6920
6921
|
const e = Math.round(180 * A / Math.PI / 20);
|
|
6921
6922
|
for (let t = 1; t < e; t++) {
|
|
6922
6923
|
let n = t / e;
|
|
@@ -6929,10 +6930,10 @@
|
|
|
6929
6930
|
}
|
|
6930
6931
|
}
|
|
6931
6932
|
m && (d.currentNormal = x, d.dir = m.sub(p)._unit(), this.addCurrentVertex(p, x, -t, -n, d));
|
|
6932
|
-
} else if ("butt" ===
|
|
6933
|
+
} else if ("butt" === S) this.addCurrentVertex(p, l, 0, 0, d); else if ("square" === S) {
|
|
6933
6934
|
const e = g ? 1 : -1;
|
|
6934
6935
|
this.addCurrentVertex(p, l, e, e, d);
|
|
6935
|
-
} else "round" ===
|
|
6936
|
+
} else "round" === S && (g && (this.addCurrentVertex(p, y, 0, 0, d), this.addCurrentVertex(p, y, 1, 1, d, !0)),
|
|
6936
6937
|
m && (this.addCurrentVertex(p, x, -1, -1, d, !0), this.addCurrentVertex(p, x, 0, 0, d)));
|
|
6937
6938
|
if (!a && T && t < c - 1) {
|
|
6938
6939
|
const e = p.dist(m);
|
|
@@ -7310,13 +7311,13 @@
|
|
|
7310
7311
|
return e.x === t.x && e.y === t.y;
|
|
7311
7312
|
}
|
|
7312
7313
|
function wa(e, t, n, i) {
|
|
7313
|
-
const r =
|
|
7314
|
-
return r !== s && o !== a || !(0 !== r || !
|
|
7314
|
+
const r = Sa(Aa(e, t, n)), s = Sa(Aa(e, t, i)), o = Sa(Aa(n, i, e)), a = Sa(Aa(n, i, t));
|
|
7315
|
+
return r !== s && o !== a || !(0 !== r || !Ma(e, n, t)) || !(0 !== s || !Ma(e, i, t)) || !(0 !== o || !Ma(n, e, i)) || !(0 !== a || !Ma(n, t, i));
|
|
7315
7316
|
}
|
|
7316
|
-
function
|
|
7317
|
+
function Ma(e, t, n) {
|
|
7317
7318
|
return t.x <= Math.max(e.x, n.x) && t.x >= Math.min(e.x, n.x) && t.y <= Math.max(e.y, n.y) && t.y >= Math.min(e.y, n.y);
|
|
7318
7319
|
}
|
|
7319
|
-
function
|
|
7320
|
+
function Sa(e) {
|
|
7320
7321
|
return e > 0 ? 1 : e < 0 ? -1 : 0;
|
|
7321
7322
|
}
|
|
7322
7323
|
function Pa(e, t) {
|
|
@@ -7435,7 +7436,7 @@
|
|
|
7435
7436
|
}
|
|
7436
7437
|
addHalfVertex(e, t, n, i, r, s, o, a) {
|
|
7437
7438
|
const {x: l, y: h, z: c} = e, u = 1 * this.scaledDistance, f = this.options.radialSegments / 2, {x: d, y: p, z: g} = o.dir, m = function(e, t, n, i, r, s, o, a) {
|
|
7438
|
-
|
|
7439
|
+
So(Ua, n, i, r), So(Ba, s, o, 0), Io(Ga, Ua, Ba), Po(Ba, Ba), Po(Ga, Ga), ja[t] || (ja[t] = []);
|
|
7439
7440
|
const l = ja[t];
|
|
7440
7441
|
for (var h = 0; h < t; h++) {
|
|
7441
7442
|
const e = Math.PI * h / t, n = 0, i = 1 - Math.abs(e - n) / (Math.PI / 2);
|
|
@@ -7492,7 +7493,7 @@
|
|
|
7492
7493
|
}
|
|
7493
7494
|
const Xa = [], Ya = [], Za = [], qa = [], $a = [];
|
|
7494
7495
|
function Ja(e, t, n, i, r, s, o, a) {
|
|
7495
|
-
|
|
7496
|
+
So(Ya, n, i, r), So(Za, s, o, 0), Io(qa, Ya, Za), Po(Za, Za), Po(qa, qa), Oo(Xa, e, t);
|
|
7496
7497
|
const l = function(e) {
|
|
7497
7498
|
var t = e[0], n = e[1];
|
|
7498
7499
|
return Math.hypot(t, n);
|
|
@@ -8070,7 +8071,7 @@
|
|
|
8070
8071
|
let i;
|
|
8071
8072
|
n && (i = n(this.options.zoom, t) || [ 255, 255, 255, 255 ], ie(i) ? (this.dynamicAttrs.aColor = 1,
|
|
8072
8073
|
i = [ 0, 0, 0, 0 ]) : i = ht([], i));
|
|
8073
|
-
const r = this.data, s = this.symbol.markerSpacing || 250, o = this.symbol.markerPlacement || "point", a = "line" === this.symbol.markerRotationAlignment, l = this._getAnchors(e, s, o, a);
|
|
8074
|
+
const r = this.data, s = this.symbol.markerSpacing || 250, o = this.symbol.markerPlacement || "point", a = "line" === this.symbol.markerRotationAlignment, l = this._getAnchors(e, s, o, a), h = this.needAltitudeAttribute();
|
|
8074
8075
|
for (let e = 0; e < l.length; e++) {
|
|
8075
8076
|
const t = l[e];
|
|
8076
8077
|
if (this.fillPosition(this.data, t.x, t.y, t.z), a) {
|
|
@@ -8083,7 +8084,8 @@
|
|
|
8083
8084
|
r.aColor[e++] = i[0], r.aColor[e++] = i[1], r.aColor[e++] = i[2], r.aColor[e++] = i[3],
|
|
8084
8085
|
r.aColor.currentIndex = e;
|
|
8085
8086
|
}
|
|
8086
|
-
|
|
8087
|
+
let n;
|
|
8088
|
+
n = h ? Math.max(Math.abs(t.x), Math.abs(t.y)) : Math.max(Math.abs(t.x), Math.abs(t.y), Math.abs(t.z)),
|
|
8087
8089
|
n > this.maxPos && (this.maxPos = n);
|
|
8088
8090
|
}
|
|
8089
8091
|
}
|
|
@@ -8430,7 +8432,7 @@
|
|
|
8430
8432
|
function w(e, t, n) {
|
|
8431
8433
|
return Math.min(Math.max(t, e), n);
|
|
8432
8434
|
}
|
|
8433
|
-
function
|
|
8435
|
+
function M(e) {
|
|
8434
8436
|
var t = Math.round(e).toString(16).toUpperCase();
|
|
8435
8437
|
return t.length < 2 ? "0" + t : t;
|
|
8436
8438
|
}
|
|
@@ -8493,7 +8495,7 @@
|
|
|
8493
8495
|
return null;
|
|
8494
8496
|
}, T.to.hex = function() {
|
|
8495
8497
|
var e = _(arguments);
|
|
8496
|
-
return "#" +
|
|
8498
|
+
return "#" + M(e[0]) + M(e[1]) + M(e[2]) + (e[3] < 1 ? M(Math.round(255 * e[3])) : "");
|
|
8497
8499
|
}, T.to.rgb = function() {
|
|
8498
8500
|
var e = _(arguments);
|
|
8499
8501
|
return e.length < 4 || 1 === e[3] ? "rgb(" + Math.round(e[0]) + ", " + Math.round(e[1]) + ", " + Math.round(e[2]) + ")" : "rgba(" + Math.round(e[0]) + ", " + Math.round(e[1]) + ", " + Math.round(e[2]) + ", " + e[3] + ")";
|
|
@@ -8509,7 +8511,7 @@
|
|
|
8509
8511
|
}, T.to.keyword = function(e) {
|
|
8510
8512
|
return b[e.slice(0, 3)];
|
|
8511
8513
|
};
|
|
8512
|
-
var
|
|
8514
|
+
var S = u.exports, P = {
|
|
8513
8515
|
exports: {}
|
|
8514
8516
|
}, I = {
|
|
8515
8517
|
aliceblue: [ 240, 248, 255 ],
|
|
@@ -9025,7 +9027,7 @@
|
|
|
9025
9027
|
}(i);
|
|
9026
9028
|
}));
|
|
9027
9029
|
}));
|
|
9028
|
-
var G =
|
|
9030
|
+
var G = S, j = B, W = [].slice, X = [ "keyword", "gray", "hex" ], Y = {};
|
|
9029
9031
|
Object.keys(j).forEach((function(e) {
|
|
9030
9032
|
Y[W.call(j[e].labels).sort().join("")] = e;
|
|
9031
9033
|
}));
|
|
@@ -9466,10 +9468,10 @@
|
|
|
9466
9468
|
function we(e) {
|
|
9467
9469
|
return e && "object" == typeof e && (e.stops || e.property && "identity" === e.type || e.expression && "calculate-expression" === e.type);
|
|
9468
9470
|
}
|
|
9469
|
-
function
|
|
9471
|
+
function Me(e) {
|
|
9470
9472
|
return Ie(e, "exponential");
|
|
9471
9473
|
}
|
|
9472
|
-
function
|
|
9474
|
+
function Se(e) {
|
|
9473
9475
|
return Ie(e, "interval");
|
|
9474
9476
|
}
|
|
9475
9477
|
function Pe(e, t) {
|
|
@@ -9487,7 +9489,7 @@
|
|
|
9487
9489
|
const l = function(e) {
|
|
9488
9490
|
Object.defineProperty(o, e, {
|
|
9489
9491
|
get: function() {
|
|
9490
|
-
return this["__fn_" + e] || (this["__fn_" + e] =
|
|
9492
|
+
return this["__fn_" + e] || (this["__fn_" + e] = Me(this["_" + e])), this["__fn_" + e].apply(this, t());
|
|
9491
9493
|
},
|
|
9492
9494
|
set: function(t) {
|
|
9493
9495
|
this["_" + e] = t;
|
|
@@ -10246,9 +10248,9 @@
|
|
|
10246
10248
|
return 3 === e.length && (At[3] = 255), At;
|
|
10247
10249
|
}
|
|
10248
10250
|
function wt(e, t = 4) {
|
|
10249
|
-
return
|
|
10251
|
+
return Mt.bind(this, e, t);
|
|
10250
10252
|
}
|
|
10251
|
-
function
|
|
10253
|
+
function Mt(e, t, n) {
|
|
10252
10254
|
if (Array.isArray(n)) return 3 === n.length && 4 === t && n.push(1), n;
|
|
10253
10255
|
if (e && e[n]) return e[n];
|
|
10254
10256
|
if (void 0 !== n.r && void 0 !== n.g && void 0 !== n.b && void 0 !== n.a) {
|
|
@@ -10257,7 +10259,7 @@
|
|
|
10257
10259
|
const i = Q(n).unitArray();
|
|
10258
10260
|
return 3 === i.length && 4 === t && i.push(1), e && (e[n] = i), i;
|
|
10259
10261
|
}
|
|
10260
|
-
function
|
|
10262
|
+
function St(e, t, n, i) {
|
|
10261
10263
|
if (e.fill) e.fill(t, n, i); else for (let r = n; r < i; r++) e[r] = t;
|
|
10262
10264
|
}
|
|
10263
10265
|
function Pt(e) {
|
|
@@ -12371,7 +12373,7 @@
|
|
|
12371
12373
|
if (!e) return "true";
|
|
12372
12374
|
const t = e[0];
|
|
12373
12375
|
if (e.length <= 1) return "any" === t ? "false" : "true";
|
|
12374
|
-
return `(${"==" === t ?
|
|
12376
|
+
return `(${"==" === t ? Mn(e[1], e[2], "===", !1) : "!=" === t ? Mn(e[1], e[2], "!==", !1) : "<" === t || ">" === t || "<=" === t || ">=" === t ? Mn(e[1], e[2], t, !0) : "any" === t ? Pn(e.slice(1), "||") : "all" === t ? Pn(e.slice(1), "&&") : "none" === t ? kn(Pn(e.slice(1), "||")) : "in" === t ? In(e[1], e.slice(2)) : "!in" === t ? kn(In(e[1], e.slice(2))) : "has" === t ? Cn(e[1]) : "!has" === t ? kn(Cn(e[1])) : "contains" === t ? function(e, t, n) {
|
|
12375
12377
|
const i = wn(e);
|
|
12376
12378
|
return void 0 !== n ? `(${i} + '').indexOf("${t}") === ${n}` : `(${i} + '').indexOf("${t}") >= 0`;
|
|
12377
12379
|
}(e[1], e[2], e[3]) : "true"})`;
|
|
@@ -12379,17 +12381,17 @@
|
|
|
12379
12381
|
function wn(e) {
|
|
12380
12382
|
return "$" === e[0] ? "f." + e.substring(1) : "p[" + JSON.stringify(e) + "]";
|
|
12381
12383
|
}
|
|
12382
|
-
function
|
|
12384
|
+
function Mn(e, t, n, i) {
|
|
12383
12385
|
if ("object" == typeof (r = e) && r && e.op) return function(e, t, n, i) {
|
|
12384
12386
|
const r = e.property, s = e.op;
|
|
12385
12387
|
let o = wn(r);
|
|
12386
12388
|
return "length" !== s ? (console.error(`not support ${s} op`), "false") : (o = `((${o}+='').length)`,
|
|
12387
|
-
|
|
12389
|
+
Sn(o, r, t, n, i));
|
|
12388
12390
|
}(e, t, n, i);
|
|
12389
12391
|
var r;
|
|
12390
|
-
return
|
|
12392
|
+
return Sn(wn(e), e, t, n, i);
|
|
12391
12393
|
}
|
|
12392
|
-
function
|
|
12394
|
+
function Sn(e, t, n, i, r) {
|
|
12393
12395
|
const s = "$type" === t ? An.indexOf(n) : JSON.stringify(n);
|
|
12394
12396
|
return (r ? `typeof ${e}=== typeof ${s}&&` : "") + e + i + s;
|
|
12395
12397
|
}
|
|
@@ -12794,7 +12796,7 @@
|
|
|
12794
12796
|
const l = function(e) {
|
|
12795
12797
|
if (!e) return Jn;
|
|
12796
12798
|
const t = [];
|
|
12797
|
-
for (let n = 0; n < e.length; n++) we(e[n][1]) && !
|
|
12799
|
+
for (let n = 0; n < e.length; n++) we(e[n][1]) && !Me(e[n][1]).isZoomConstant && t.push(e[n][0]);
|
|
12798
12800
|
return t;
|
|
12799
12801
|
}(t[r].stops), h = "identity" === t[r].type && Un.checkIfIdentityZoomDependent(r, t[r].property, s.features);
|
|
12800
12802
|
if (!h && !l.length) return void (void 0 === n.index && Yn(e, i));
|
|
@@ -12906,7 +12908,7 @@
|
|
|
12906
12908
|
e.dirty = !0;
|
|
12907
12909
|
}
|
|
12908
12910
|
} else if (s > 1) for (let t = i * s; t < r * s; t += s) e[t + o] !== c && (e[t + o] = c,
|
|
12909
|
-
e.dirty = !0); else e[i] !== c && (
|
|
12911
|
+
e.dirty = !0); else e[i] !== c && (St(e, c, i, r), e.dirty = !0);
|
|
12910
12912
|
}
|
|
12911
12913
|
function ti(e) {
|
|
12912
12914
|
return Un.isFnTypeSymbol(e);
|
|
@@ -13051,7 +13053,7 @@
|
|
|
13051
13053
|
const r = ui.set(t, n)._multi(i / e.res);
|
|
13052
13054
|
return e.extent2d.contains(r);
|
|
13053
13055
|
}
|
|
13054
|
-
const {SYMBOLS_NEED_REBUILD_IN_VT: gi, StyleUtil: mi, FuncTypeUtil: yi} = h(), {loginIBLResOnCanvas: xi, logoutIBLResOnCanvas: _i, getIBLResOnCanvas: vi} = n.reshader.pbr.PBRUtils, bi = "__gl_textures", Ai = [], Ti = new r.Point(0, 0), wi = new r.Point(0, 0),
|
|
13056
|
+
const {SYMBOLS_NEED_REBUILD_IN_VT: gi, StyleUtil: mi, FuncTypeUtil: yi} = h(), {loginIBLResOnCanvas: xi, logoutIBLResOnCanvas: _i, getIBLResOnCanvas: vi} = n.reshader.pbr.PBRUtils, bi = "__gl_textures", Ai = [], Ti = new r.Point(0, 0), wi = new r.Point(0, 0), Mi = new Float32Array(1), Si = [], Pi = e => 0 === e.properties.level, Ii = e => e.properties.level > 0;
|
|
13055
13057
|
class Ci {
|
|
13056
13058
|
static getBloomSymbol() {
|
|
13057
13059
|
return [ "bloom" ];
|
|
@@ -13080,7 +13082,7 @@
|
|
|
13080
13082
|
return n.getTileLevelValue && n.getTileLevelValue(e, t) || 0;
|
|
13081
13083
|
}
|
|
13082
13084
|
getAnalysisMeshes() {
|
|
13083
|
-
return this.getShadowMeshes ? this.getShadowMeshes() :
|
|
13085
|
+
return this.getShadowMeshes ? this.getShadowMeshes() : Si;
|
|
13084
13086
|
}
|
|
13085
13087
|
isVisible() {
|
|
13086
13088
|
const {minZoom: e, maxZoom: t} = this.sceneConfig, n = this.getMap().getZoom();
|
|
@@ -13144,7 +13146,7 @@
|
|
|
13144
13146
|
if (n) for (const i in n) n[i] && t[i].renderUniforms && mt(e, t[i].renderUniforms);
|
|
13145
13147
|
}
|
|
13146
13148
|
createGeometries(e, t) {
|
|
13147
|
-
if (!e.length) return
|
|
13149
|
+
if (!e.length) return Si;
|
|
13148
13150
|
const n = [];
|
|
13149
13151
|
for (let i = 0; i < e.length; i++) if (e[i]) if (void 0 !== e[i].ref) n[e[i].ref] ? n.push({
|
|
13150
13152
|
geometry: n[e[i].ref].geometry,
|
|
@@ -13424,7 +13426,7 @@
|
|
|
13424
13426
|
enumerable: !0
|
|
13425
13427
|
}) : r[e] = a[e];
|
|
13426
13428
|
}
|
|
13427
|
-
return we(n.visible) && (this._visibleFn[e] =
|
|
13429
|
+
return we(n.visible) && (this._visibleFn[e] = Me(n.visible)), i;
|
|
13428
13430
|
}
|
|
13429
13431
|
getSymbolDef(e) {
|
|
13430
13432
|
return this.symbolDef[e.index];
|
|
@@ -13440,7 +13442,7 @@
|
|
|
13440
13442
|
const e = this.getMap(), t = [], n = () => (t[0] = e.getZoom(), t);
|
|
13441
13443
|
this._symbol = [], this._visibleFn = [];
|
|
13442
13444
|
for (let e = 0; e < this.symbolDef.length; e++) this._symbol[e] = yi.loadSymbolFnTypes(mt({}, this.symbolDef[e]), n),
|
|
13443
|
-
this.symbolDef[e] && we(this.symbolDef[e].visible) && (this._visibleFn[e] =
|
|
13445
|
+
this.symbolDef[e] && we(this.symbolDef[e].visible) && (this._visibleFn[e] = Me(this.symbolDef[e].visible));
|
|
13444
13446
|
}
|
|
13445
13447
|
getFnTypeConfig(e) {
|
|
13446
13448
|
this._fnTypeConfigs || (this._fnTypeConfigs = []);
|
|
@@ -13615,7 +13617,7 @@
|
|
|
13615
13617
|
return t;
|
|
13616
13618
|
}(JSON.stringify(e));
|
|
13617
13619
|
let a = s[o];
|
|
13618
|
-
return a || (a = s[o] = r ?
|
|
13620
|
+
return a || (a = s[o] = r ? Se(e) : Me(e)), a(n.getZoom(), i);
|
|
13619
13621
|
}
|
|
13620
13622
|
highlight(e) {
|
|
13621
13623
|
this._highlighted = e, this._highlightTimestamp = this.layer.getRenderer().getFrameTimestamp(),
|
|
@@ -13695,25 +13697,25 @@
|
|
|
13695
13697
|
}
|
|
13696
13698
|
const v = performance.now();
|
|
13697
13699
|
n.terrainQueryStatus[c] = x;
|
|
13698
|
-
const {xmin: b, ymax: A} = l, T = Ti.set(b, A), w = this.layer.getTileSize().width / n.extent,
|
|
13699
|
-
let
|
|
13700
|
-
|
|
13700
|
+
const {xmin: b, ymax: A} = l, T = Ti.set(b, A), w = this.layer.getTileSize().width / n.extent, M = t.length / e.length;
|
|
13701
|
+
let S = e.queryResult;
|
|
13702
|
+
S || (S = e.queryResult = new Map);
|
|
13701
13703
|
let P = !0;
|
|
13702
13704
|
for (let n = i; n <= s; n++) {
|
|
13703
|
-
let i = t[n *
|
|
13705
|
+
let i = t[n * M];
|
|
13704
13706
|
i < 0 ? i = 0 : i > a && (i = a);
|
|
13705
|
-
let r = t[n *
|
|
13707
|
+
let r = t[n * M + 1];
|
|
13706
13708
|
r < 0 ? r = 0 : r > a && (r = a);
|
|
13707
13709
|
const s = i + r * a;
|
|
13708
|
-
let l, h, c =
|
|
13710
|
+
let l, h, c = S.get(s);
|
|
13709
13711
|
if (c || 0 === c) e[n] !== c && (e[n] = c, e.dirty = !0); else {
|
|
13710
13712
|
for (let e = 0; e < m.length; e++) if (pi(m[e], b + w * i, A - w * r, o)) {
|
|
13711
13713
|
l = m[e];
|
|
13712
13714
|
break;
|
|
13713
13715
|
}
|
|
13714
13716
|
l && (g.getRenderer().isTileCached(l.id) || e[n] === at) && (wi.set(i, r), h = this.layer.queryTilePointTerrain(wi, l, T, a, o)),
|
|
13715
|
-
c = e[n], h && (c = null === h[0] ? at : h[0],
|
|
13716
|
-
e.dirty = !0), h && h[1] ?
|
|
13717
|
+
c = e[n], h && (c = null === h[0] ? at : h[0], Mi[0] = c, c = Mi[0]), e[n] !== c && (e[n] = c,
|
|
13718
|
+
e.dirty = !0), h && h[1] ? S.set(s, c) : P = !1;
|
|
13717
13719
|
}
|
|
13718
13720
|
}
|
|
13719
13721
|
_.altitudeQueryFrameTime = (_.altitudeQueryFrameTime || 0) + (performance.now() - v),
|
|
@@ -13923,9 +13925,9 @@
|
|
|
13923
13925
|
if (!(t = t && t.geometry)) return;
|
|
13924
13926
|
const s = t.properties.features;
|
|
13925
13927
|
if (Vn(s)) return;
|
|
13926
|
-
const o = e.polygonPatternFileWidth, a = e.polygonPatternFileHeight, l =
|
|
13928
|
+
const o = e.polygonPatternFileWidth, a = e.polygonPatternFileHeight, l = Me(e.polygonPatternFileOrigin);
|
|
13927
13929
|
let h, c;
|
|
13928
|
-
we(o) && (h =
|
|
13930
|
+
we(o) && (h = Me(o)), we(a) && (c = Me(a));
|
|
13929
13931
|
const {aPickingId: u, aPatternOrigin: f} = t.data, d = u.length, p = new Float32Array(2 * d);
|
|
13930
13932
|
let g, m, y;
|
|
13931
13933
|
for (let e = 0, t = u.length; e < t; e++) {
|
|
@@ -13953,8 +13955,8 @@
|
|
|
13953
13955
|
const r = t.properties.features;
|
|
13954
13956
|
if (Vn(r)) return;
|
|
13955
13957
|
const s = this.getMap();
|
|
13956
|
-
let o = we(e.uvOffsetInMeter) &&
|
|
13957
|
-
const a =
|
|
13958
|
+
let o = we(e.uvOffsetInMeter) && Se(e.uvOffsetInMeter);
|
|
13959
|
+
const a = Me(e.uvOffset), l = Me(e.polygonPatternFileOrigin), {aPickingId: h, aPatternOrigin: c} = t.data, u = h.length, f = new Float32Array(2 * u);
|
|
13958
13960
|
let d, p, g;
|
|
13959
13961
|
for (let e = 0, t = h.length; e < t; e++) {
|
|
13960
13962
|
if (h[e] === d) {
|
|
@@ -13979,7 +13981,7 @@
|
|
|
13979
13981
|
if (!(t = t && t.geometry)) return;
|
|
13980
13982
|
const r = t.properties.features;
|
|
13981
13983
|
if (Vn(r)) return;
|
|
13982
|
-
const s = this.getMap(), o =
|
|
13984
|
+
const s = this.getMap(), o = Me(e.polygonPatternFileOrigin), a = t.data.aPickingId, l = a.length, h = new Float32Array(2 * l);
|
|
13983
13985
|
let c, u, f;
|
|
13984
13986
|
for (let e = 0, t = a.length; e < t; e++) {
|
|
13985
13987
|
if (a[e] === c) {
|
|
@@ -13994,7 +13996,7 @@
|
|
|
13994
13996
|
t.data.aPatternOrigin = h;
|
|
13995
13997
|
}
|
|
13996
13998
|
createFnTypeConfig(e, t) {
|
|
13997
|
-
const n =
|
|
13999
|
+
const n = Se(t.polygonFill), i = Me(t.polygonOpacity), r = Me(t.uvScale), s = Me(t.uvOffset), o = new Uint8Array(1), a = new Uint16Array(2), l = new Uint8Array(2);
|
|
13998
14000
|
return [ {
|
|
13999
14001
|
attrName: "aColor",
|
|
14000
14002
|
symbolName: "polygonFill",
|
|
@@ -14250,7 +14252,7 @@
|
|
|
14250
14252
|
super.paint(e);
|
|
14251
14253
|
}
|
|
14252
14254
|
createFnTypeConfig(e, t) {
|
|
14253
|
-
const n =
|
|
14255
|
+
const n = Se(t.lineColor), i = Se(t.aLinePatternAnimSpeed), r = Se(t.aLinePatternGap), s = this.createShapeFnTypeConfigs(e, t), o = new Int8Array(2);
|
|
14254
14256
|
return [ {
|
|
14255
14257
|
attrName: "aColor",
|
|
14256
14258
|
symbolName: "lineColor",
|
|
@@ -14288,7 +14290,7 @@
|
|
|
14288
14290
|
} ].concat(s);
|
|
14289
14291
|
}
|
|
14290
14292
|
createShapeFnTypeConfigs(e, t) {
|
|
14291
|
-
const n =
|
|
14293
|
+
const n = Me(t.lineWidth), i = Me(t.lineOpacity), r = Me(t.lineStrokeWidth), s = Me(t.lineDx), o = Me(t.lineDy), a = new Uint16Array(1), l = new Int8Array(1);
|
|
14292
14294
|
return [ {
|
|
14293
14295
|
attrName: "aLineWidth",
|
|
14294
14296
|
symbolName: "lineWidth",
|
|
@@ -15505,14 +15507,14 @@
|
|
|
15505
15507
|
return e[0] = t[0] - n, e[1] = t[1] - n, e[2] = t[2] + n, e[3] = t[3] + n, e;
|
|
15506
15508
|
}
|
|
15507
15509
|
var Tr = "#include <gl2_vert>\n#define SHADER_NAME MARKER\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aShape;\nattribute vec4 aTexCoord;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute vec2 aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#if defined(HAS_TEXT_DX) || defined(HAS_TEXT_DY) || defined(HAS_MARKER_DX) || defined(HAS_MARKER_DY)\nattribute vec4 aDxDy;\n#endif\n#ifndef HAS_MARKER_DX\nuniform float markerDx;\n#endif\n#ifndef HAS_MARKER_DY\nuniform float markerDy;\n#endif\n#ifndef HAS_TEXT_DX\nuniform float textDx;\n#endif\n#ifndef HAS_TEXT_DY\nuniform float textDy;\n#endif\n#ifdef HAS_MARKER_WIDTH\nattribute float aMarkerWidth;\n#else\nuniform float markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nattribute float aMarkerHeight;\n#else\nuniform float markerHeight;\n#endif\n#if defined(HAS_MARKER_PITCH_ALIGN) || defined(HAS_TEXT_PITCH_ALIGN)\nattribute vec2 aPitchAlign;\n#endif\n#ifndef HAS_MARKER_PITCH_ALIGN\nuniform float markerPitchWithMap;\n#endif\n#ifndef HAS_TEXT_PITCH_ALIGN\nuniform float textPitchWithMap;\n#endif\n#if defined(HAS_MARKER_ROTATION_ALIGN) || defined(HAS_TEXT_ROTATION_ALIGN)\nattribute vec2 aRotationAlign;\n#endif\n#ifndef HAS_MARKER_ROTATION_ALIGN\nuniform float markerRotateWithMap;\n#endif\n#ifndef HAS_TEXT_ROTATION_ALIGN\nuniform float textRotateWithMap;\n#endif\nuniform float flipY;\n#if defined(HAS_MARKER_ROTATION) || defined(HAS_TEXT_ROTATION)\nattribute vec2 aRotation;\n#endif\n#ifndef HAS_MARKER_ROTATION\nuniform float markerRotation;\n#endif\n#ifndef HAS_TEXT_ROTATION\nuniform float textRotation;\n#endif\n#ifdef HAS_PAD_OFFSET\nattribute vec2 aPadOffset;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 positionMatrix;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform float markerPerspectiveRatio;\nuniform float glyphSize;\nuniform vec2 iconSize;\nuniform vec2 canvasSize;\nuniform vec2 iconTexSize;\nuniform vec2 glyphTexSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\nuniform float isRenderingTerrain;\n#include <vt_position_vert>\nvarying float vIsText;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vOpacity;\nvarying float vGammaScale;\nvarying float vTextSize;\nvarying float vHalo;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nattribute vec2 aTextHalo;\nvarying vec2 vTextHalo;\n#endif\n#include <highlight_vert>\n#else\n#include <fbo_picking_vert>\n#endif\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_SIZE\nfloat d = aTextSize * layerScale;\n#else\nfloat d = textSize * layerScale;\n#endif\n#ifdef HAS_TEXT_DX\nfloat e = aDxDy.z;\n#else\nfloat e = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat f = aDxDy.w;\n#else\nfloat f = textDy;\n#endif\n#ifdef HAS_MARKER_WIDTH\nfloat h = aMarkerWidth;\n#else\nfloat h = markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nfloat i = aMarkerHeight;\n#else\nfloat i = markerHeight;\n#endif\n#ifdef HAS_MARKER_DX\nfloat j = aDxDy.x;\n#else\nfloat j = markerDx;\n#endif\n#ifdef HAS_MARKER_DY\nfloat k = aDxDy.y;\n#else\nfloat k = markerDy;\n#endif\nfloat l = aTexCoord.z;\n float m;\n if(l > .5) {\n \n#ifdef HAS_TEXT_PITCH_ALIGN\nm = aPitchAlign.y;\n#else\nm = textPitchWithMap;\n#endif\n } else {\n \n#ifdef HAS_MARKER_PITCH_ALIGN\nm = aPitchAlign.x;\n#else\nm = markerPitchWithMap;\n#endif\n }\n float n;\n if(l > .5) {\n \n#ifdef HAS_TEXT_ROTATION_ALIGN\nn = aRotationAlign.y;\n#else\nn = textRotateWithMap;\n#endif\n } else {\n \n#ifdef HAS_MARKER_ROTATION_ALIGN\nn = aRotationAlign.x;\n#else\nn = markerRotateWithMap;\n#endif\n }\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c, 1.);\n float o = gl_Position.w;\n float u;\n if(isRenderingTerrain == 1. && m == 1.) {\n u = 1.;\n } else {\n float v = (1. - cameraToCenterDistance / o) * markerPerspectiveRatio;\n u = clamp(.5 + .5 * (1. - v), .0, 4.);\n }\n float A;\n if(l > .5) {\n \n#ifdef HAS_TEXT_ROTATION\nA = -aRotation.y / 9362. - mapRotation * n;\n#else\nA = -textRotation - mapRotation * n;\n#endif\n } else {\n \n#ifdef HAS_MARKER_ROTATION\nA = -aRotation.x / 9362. - mapRotation * n;\n#else\nA = -markerRotation - mapRotation * n;\n#endif\n }\n if(m == 1.) {\n \n#ifdef REVERSE_MAP_ROTATION_ON_PITCH\nA += mapRotation;\n#else\nif(l > .5) {\n A -= mapRotation;\n } else {\n A += mapRotation;\n }\n#endif\n }\n float B = sin(A);\n float C = cos(A);\n mat2 D = mat2(C, -1. * B, B, C);\n vec2 E = (aShape / 10.0);\n if(m == 1. && flipY == .0) {\n E *= vec2(1., -1.);\n }\n vIsText = l;\n if(l > .5) {\n E = E / glyphSize * d;\n } else {\n \n#ifdef HAS_PAD_OFFSET\nfloat F = aPadOffset.x - 1.;\n float G = aPadOffset.y;\n#else\nfloat F = .0;\n float G = .0;\n#endif\nE = (E / iconSize * vec2(h, i) + vec2(F, G)) * layerScale;\n }\n E = D * E;\n float H;\n if(isRenderingTerrain == 1.) {\n H = 1.;\n } else {\n H = o / cameraToCenterDistance;\n }\n if(m == .0) {\n vec2 I = E * 2. / canvasSize;\n gl_Position.xy += I * u * o;\n } else if(l > .5) {\n float J;\n if(isRenderingTerrain == 1.) {\n J = tileRatio / zoomScale;\n } else {\n J = tileRatio / zoomScale * H * u;\n }\n vec2 I = E;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(I, .0) * J, 1.);\n } else {\n vec2 I = E;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(I, .0) * tileRatio / zoomScale * H * u, 1.);\n }\n if(l > .5) {\n gl_Position.xy += vec2(e, -f) * 2. / canvasSize * o;\n } else {\n gl_Position.xy += vec2(j, -k) * 2. / canvasSize * o;\n }\n#ifndef PICKING_MODE\nif(m == .0) {\n vGammaScale = mix(1., H, textPerspectiveRatio);\n } else {\n vGammaScale = H + mapPitch / 4.;\n }\n vGammaScale = clamp(vGammaScale, .0, 1.);\n if(l > .5) {\n vTexCoord = aTexCoord.xy / glyphTexSize;\n } else {\n vTexCoord = aTexCoord.xy / iconTexSize;\n }\n vHalo = aTexCoord.w;\n vTextSize = d;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nif(l > .5) {\n vOpacity *= aColorOpacity.y / 255.;\n } else {\n vOpacity *= aColorOpacity.x / 255.;\n }\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nvTextHalo = aTextHalo;\n#endif\nhighlight_setVarying();\n#else\n#ifdef ENABLE_COLLISION\nbool K = aOpacity == 255.;\n#else\nbool K = true;\n#endif\nfbo_picking_setData(gl_Position.w, K);\n#endif\n}";
|
|
15508
|
-
const wr = [],
|
|
15510
|
+
const wr = [], Mr = [], Sr = [], Pr = [], Ir = [], Cr = [];
|
|
15509
15511
|
function kr(e, t, i, r, s, o, a, l, h, c, u, f, d, p) {
|
|
15510
15512
|
const {tileRatio: g, tileResolution: m} = h, y = g / (m / c.getResolution()) * (u / c.cameraToCenterDistance) * f;
|
|
15511
15513
|
n.vec2.scale(i, i, y), n.vec2.scale(r, r, y), n.vec2.scale(s, s, y), n.vec2.scale(o, o, y),
|
|
15512
|
-
n.vec3.set(wr, i[0], i[1], d ? i[2] / p : 0), n.vec3.set(
|
|
15513
|
-
n.vec3.set(
|
|
15514
|
-
n.vec3.add(wr, wr, t), n.vec3.add(
|
|
15515
|
-
oi(i, wr, a, c.width, c.height), oi(r,
|
|
15514
|
+
n.vec3.set(wr, i[0], i[1], d ? i[2] / p : 0), n.vec3.set(Mr, r[0], r[1], d ? r[2] / p : 0),
|
|
15515
|
+
n.vec3.set(Sr, s[0], s[1], d ? s[2] / p : 0), n.vec3.set(Pr, o[0], o[1], d ? o[2] / p : 0),
|
|
15516
|
+
n.vec3.add(wr, wr, t), n.vec3.add(Mr, Mr, t), n.vec3.add(Sr, Sr, t), n.vec3.add(Pr, Pr, t),
|
|
15517
|
+
oi(i, wr, a, c.width, c.height), oi(r, Mr, a, c.width, c.height), oi(s, Sr, a, c.width, c.height),
|
|
15516
15518
|
oi(o, Pr, a, c.width, c.height), n.vec2.set(Ir, Math.min(i[0], r[0], s[0], o[0]), Math.min(i[1], r[1], s[1], o[1])),
|
|
15517
15519
|
n.vec2.set(Cr, Math.max(i[0], r[0], s[0], o[0]), Math.max(i[1], r[1], s[1], o[1])),
|
|
15518
15520
|
n.vec4.set(e, Ir[0] + l[0], Ir[1] + l[1], Cr[0] + l[0], Cr[1] + l[1]);
|
|
@@ -15541,7 +15543,7 @@
|
|
|
15541
15543
|
if (o.markerPerspectiveRatio) {
|
|
15542
15544
|
m = yt(.5 + .5 * (1 - (1 - a / g) * o.markerPerspectiveRatio), 0, 4);
|
|
15543
15545
|
}
|
|
15544
|
-
const {aShape: y, aMarkerDx: x, aMarkerDy: _, aMarkerWidth: v, aMarkerHeight: b, aPitchAlign: A, aRotationAlign: T, aRotation: w} = l,
|
|
15546
|
+
const {aShape: y, aMarkerDx: x, aMarkerDy: _, aMarkerWidth: v, aMarkerHeight: b, aPitchAlign: A, aRotationAlign: T, aRotation: w} = l, M = x ? x[i] : h.markerDx, S = _ ? _[i] : h.markerDy, P = A ? A[2 * i] : o.markerPitchWithMap, I = T ? T[2 * i] : o.markerRotateWithMap, C = n.vec2.set(Wr, M || 0, -(S || 0));
|
|
15545
15547
|
let k = n.vec2.set(Ur, y[2 * i] / 10, y[2 * i + 1] / 10), O = n.vec2.set(Br, y[2 * i + 2] / 10, y[2 * i + 3] / 10), F = n.vec2.set(Gr, y[2 * i + 4] / 10, y[2 * i + 5] / 10), R = n.vec2.set(jr, y[2 * i + 6] / 10, y[2 * i + 7] / 10);
|
|
15546
15548
|
0 === o.flipY && 1 === P && (n.vec2.multiply(k, k, Xr), n.vec2.multiply(O, O, Xr),
|
|
15547
15549
|
n.vec2.multiply(F, F, Xr), n.vec2.multiply(R, R, Xr));
|
|
@@ -15573,13 +15575,13 @@
|
|
|
15573
15575
|
y = yt(.5 + .5 * (1 - (1 - u / m) * c.textPerspectiveRatio), 0, 4);
|
|
15574
15576
|
}
|
|
15575
15577
|
const {aTextDx: x, aTextDy: _, aPitchAlign: v, aRotationAlign: b, aRotation: A, aType: T, aDxDy: w} = r.geometry.properties;
|
|
15576
|
-
let
|
|
15577
|
-
w ? (
|
|
15578
|
+
let M, S, P;
|
|
15579
|
+
w ? (M = w[4 * a + 2], S = w[4 * a + 3]) : (M = x ? x[a] : d.textDx, S = _ ? _[a] : d.textDy),
|
|
15578
15580
|
v && (P = T ? v[2 * a + 1] : v[a]);
|
|
15579
15581
|
const I = v ? P : c.textPitchWithMap;
|
|
15580
15582
|
let C;
|
|
15581
15583
|
b && (C = T ? b[2 * a + 1] : b[a]);
|
|
15582
|
-
const k = b ? C : c.textRotateWithMap, O = n.vec2.set(ns,
|
|
15584
|
+
const k = b ? C : c.textRotateWithMap, O = n.vec2.set(ns, M || 0, -(S || 0));
|
|
15583
15585
|
if (p) {
|
|
15584
15586
|
const {aOffset: r, aShape: s} = f, o = r.length !== s.length;
|
|
15585
15587
|
let u, d, p, g;
|
|
@@ -15846,7 +15848,7 @@
|
|
|
15846
15848
|
};
|
|
15847
15849
|
}
|
|
15848
15850
|
function gs(e, t) {
|
|
15849
|
-
const n =
|
|
15851
|
+
const n = Me(t.textFill), i = Me(t.textSize), r = Me(t.textHaloFill), s = Me(t.textHaloRadius), o = Me(t.textHaloOpacity), a = Me(t.textDx), l = Me(t.textDy), h = Me(t.textOpacity), c = Se(t.textPitchAlignment), u = Se(t.textRotationAlignment), f = Me(t.textRotation), d = Se(t.textAllowOverlapFn), p = Se(t.textIgnorePlacement), g = {}, m = new Int16Array(1), y = new Uint16Array(1);
|
|
15850
15852
|
return [ {
|
|
15851
15853
|
attrName: "aTextFill",
|
|
15852
15854
|
symbolName: "textFill",
|
|
@@ -16027,7 +16029,7 @@
|
|
|
16027
16029
|
}(e, t, i) : null;
|
|
16028
16030
|
}
|
|
16029
16031
|
const As = [], Ts = [];
|
|
16030
|
-
const ws = 6,
|
|
16032
|
+
const ws = 6, Ms = 4, Ss = new Uint16Array(1), Ps = new Int8Array(1);
|
|
16031
16033
|
function Is(e, t, i, r, s, o, a, l, h) {
|
|
16032
16034
|
if (t.isDisposed() || 0 === t.data.aPosition.length) return null;
|
|
16033
16035
|
const c = !!t.properties.iconAtlas, u = !!t.properties.glyphAtlas;
|
|
@@ -16148,7 +16150,7 @@
|
|
|
16148
16150
|
}(e);
|
|
16149
16151
|
}
|
|
16150
16152
|
function Rs(e, t) {
|
|
16151
|
-
const n =
|
|
16153
|
+
const n = Me(t.markerWidth), i = Me(t.markerHeight), r = Me(t.markerDx), s = Me(t.markerDy), o = Me(t.markerOpacity), a = Me(t.markerTextFit), l = Se(t.markerPitchAlignment), h = Se(t.textPitchAlignment), c = Se(t.markerRotationAlignment), u = Se(t.textRotationAlignment), f = Me(t.markerRotation), d = Me(t.textRotation), p = Se(t.markerAllowOverlapFn), g = Se(t.markerIgnorePlacement), m = Me(t.textOpacity), y = Me(t.textDx), x = Me(t.textDy), _ = new Int16Array(1), v = new Uint16Array(1);
|
|
16152
16154
|
return [ {
|
|
16153
16155
|
attrName: "aMarkerWidth",
|
|
16154
16156
|
symbolName: "markerWidth",
|
|
@@ -16338,7 +16340,7 @@
|
|
|
16338
16340
|
}(t);
|
|
16339
16341
|
const s = function(e, t) {
|
|
16340
16342
|
let n = e.properties.textFitFn;
|
|
16341
|
-
we(t) && (n = e.properties.textFitFn =
|
|
16343
|
+
we(t) && (n = e.properties.textFitFn = Se(t));
|
|
16342
16344
|
const i = "none" !== t, r = [], s = e.properties.iconElements, o = e.data.aPickingId, a = e.properties.textElements, l = e.data.aPickingId, h = e.properties.aCount, c = e.properties.features;
|
|
16343
16345
|
let u, f = a[0];
|
|
16344
16346
|
u = {
|
|
@@ -16405,14 +16407,14 @@
|
|
|
16405
16407
|
let s = "both" === i || "width" === i, o = "both" === i || "height" === i;
|
|
16406
16408
|
if (we(n.markerTextFit)) {
|
|
16407
16409
|
let e = t.properties.textFitFn;
|
|
16408
|
-
e || (e = t.properties.textFitFn =
|
|
16410
|
+
e || (e = t.properties.textFitFn = Me(n.markerTextFit));
|
|
16409
16411
|
const {features: i} = t.properties, a = t.properties.iconElements, {aPickingId: l} = t.data, h = [], c = [];
|
|
16410
16412
|
let u = !0;
|
|
16411
16413
|
for (let t = 0; t < a.length; t += ws) {
|
|
16412
16414
|
const n = i[l[a[t]]], r = (n && n.feature || {}).properties || {};
|
|
16413
16415
|
let s = e(null, r);
|
|
16414
16416
|
if (we(s)) {
|
|
16415
|
-
s = (r.textFitFn = r.textFitFn ||
|
|
16417
|
+
s = (r.textFitFn = r.textFitFn || Me(s))(null, r);
|
|
16416
16418
|
}
|
|
16417
16419
|
"both" === s ? (h.push(t / ws), c.push(t / ws)) : "width" === s ? (u = !1, h.push(t / ws)) : "height" === s && (u = !1,
|
|
16418
16420
|
c.push(t / ws));
|
|
@@ -16442,7 +16444,7 @@
|
|
|
16442
16444
|
r.aMarkerHeight = new Uint16Array(c), r.aMarkerHeight.fill(e), e && (r.aMarkerHeight.dirty = !0),
|
|
16443
16445
|
t.data.aMarkerHeight = new Uint16Array(c);
|
|
16444
16446
|
}
|
|
16445
|
-
const u = this.getSymbolDef(t.properties.symbolIndex), f =
|
|
16447
|
+
const u = this.getSymbolDef(t.properties.symbolIndex), f = Me(u.textSize);
|
|
16446
16448
|
Hs.call(this, e, t), (!we(u.textSize) || f.isZoomConstant && f.isFeatureConstant) && (r.isFitConstant = !0);
|
|
16447
16449
|
}
|
|
16448
16450
|
const Ls = [ 0, 0, 0, 0 ];
|
|
@@ -16453,40 +16455,40 @@
|
|
|
16453
16455
|
if (i.isFitConstant || !i.labelShape || !i.labelShape.length) return;
|
|
16454
16456
|
const r = this.getSymbolDef(t.properties.symbolIndex), s = r.textSize;
|
|
16455
16457
|
let o;
|
|
16456
|
-
we(s) && (o = n._textSizeFn ? n._textSizeFn : n._textSizeFn =
|
|
16458
|
+
we(s) && (o = n._textSizeFn ? n._textSizeFn : n._textSizeFn = Me(s));
|
|
16457
16459
|
const a = r.markerTextFitPadding || Ls;
|
|
16458
16460
|
let l;
|
|
16459
|
-
we(a) && (l = i._paddingFn ? i._paddingFn : i._paddingFn =
|
|
16461
|
+
we(a) && (l = i._paddingFn ? i._paddingFn : i._paddingFn = Se(a));
|
|
16460
16462
|
const h = e.getZoom(), {fitIcons: c, fitWidthIcons: u, fitHeightIcons: f} = i, {aMarkerWidth: d, aMarkerHeight: p, labelShape: g} = i, m = t.properties.iconElements, {features: y, aPickingId: x} = i, _ = (e, t, n, r) => {
|
|
16461
16463
|
const c = g[4 * t], u = g[4 * t + 1], f = g[4 * t + 2], m = g[4 * t + 3];
|
|
16462
16464
|
if (!(c || u || f || m)) return;
|
|
16463
16465
|
const _ = x[e], v = y[_] && y[_].feature, b = v && v.properties || {};
|
|
16464
16466
|
let A = o ? o(h, b) : s;
|
|
16465
16467
|
if (we(A)) {
|
|
16466
|
-
A = (b.textSizeFn = b.textSizeFn ||
|
|
16468
|
+
A = (b.textSizeFn = b.textSizeFn || Me(A))(h, b);
|
|
16467
16469
|
}
|
|
16468
16470
|
A /= Lr;
|
|
16469
16471
|
let T, w = l && l(h, b) || a;
|
|
16470
16472
|
if (we(w)) {
|
|
16471
|
-
w = (b.fitPaddingFn = b.fitPaddingFn ||
|
|
16473
|
+
w = (b.fitPaddingFn = b.fitPaddingFn || Se(w))(h, b);
|
|
16472
16474
|
}
|
|
16473
16475
|
if (w = w || Ls, w[0] === w[2] && w[1] === w[3] || (T = i.aPadOffset, T || (T = i.aPadOffset = new Int8Array(2 * d.length))),
|
|
16474
16476
|
d && n) {
|
|
16475
16477
|
const t = Math.abs((f - c) / 10 * A) + (w[1] + w[3] || 0);
|
|
16476
|
-
if (
|
|
16478
|
+
if (Ss[0] = t, d[e] !== Ss[0] && (St(d, Ss[0], e, e + Ms), d.dirty = !0), T) {
|
|
16477
16479
|
const t = (w[1] + w[3]) / 2 - w[3];
|
|
16478
16480
|
if (Ps[0] = t, T[2 * e] !== Ps[0]) {
|
|
16479
|
-
for (let n = e; n < e +
|
|
16481
|
+
for (let n = e; n < e + Ms; n++) T[2 * n] = t;
|
|
16480
16482
|
T.dirty = !0;
|
|
16481
16483
|
}
|
|
16482
16484
|
}
|
|
16483
16485
|
}
|
|
16484
16486
|
if (p && r) {
|
|
16485
16487
|
const t = Math.abs((m - u) / 10 * A) + (w[0] + w[2] || 0);
|
|
16486
|
-
if (
|
|
16488
|
+
if (Ss[0] = t, p[e] !== Ss[0] && (St(p, Ss[0], e, e + Ms), p.dirty = !0), T) {
|
|
16487
16489
|
const t = w[0] - (w[0] + w[2]) / 2;
|
|
16488
16490
|
if (Ps[0] = t, T[2 * e + 1] !== Ps[0]) {
|
|
16489
|
-
for (let n = e; n < e +
|
|
16491
|
+
for (let n = e; n < e + Ms; n++) T[2 * n + 1] = t;
|
|
16490
16492
|
T.dirty = !0;
|
|
16491
16493
|
}
|
|
16492
16494
|
}
|
|
@@ -16620,7 +16622,7 @@
|
|
|
16620
16622
|
i < n.length && o.fill(e++, i, n.length);
|
|
16621
16623
|
} else {
|
|
16622
16624
|
let e = 0;
|
|
16623
|
-
for (let t = 0; t < n.length; t +=
|
|
16625
|
+
for (let t = 0; t < n.length; t += Ms) o.fill(e++, t, t + Ms);
|
|
16624
16626
|
}
|
|
16625
16627
|
e.properties.collideIds = o, e.properties.uniqueCollideIds = kt(o, !t);
|
|
16626
16628
|
} else if (a) {
|
|
@@ -16628,8 +16630,8 @@
|
|
|
16628
16630
|
if (!i) return;
|
|
16629
16631
|
let r = 0, s = i[0];
|
|
16630
16632
|
for (let e = 0; e < n.length; ) {
|
|
16631
|
-
const t = e + s *
|
|
16632
|
-
n.fill(r++, e, t), e += s *
|
|
16633
|
+
const t = e + s * Ms;
|
|
16634
|
+
n.fill(r++, e, t), e += s * Ms, t < n.length && (s = i[t]);
|
|
16633
16635
|
}
|
|
16634
16636
|
e.properties.uniqueCollideIds = kt(n, !t);
|
|
16635
16637
|
}
|
|
@@ -16919,32 +16921,32 @@
|
|
|
16919
16921
|
}
|
|
16920
16922
|
const Xs = [], Ys = [], Zs = [];
|
|
16921
16923
|
function qs(e, t, i, r, s, o, a, l, h, c, u, f, d) {
|
|
16922
|
-
const {aGlyphOffset: p, aSegment: g, aTextDx: m, aTextDy: y, symbolIndex: x} = t.geometry.properties, _ = this.getSymbol(x), v = m ? m[s] : _.textDx, b = y ? y[s] : _.textDy, A = n.vec2.set(Zs, v || 0, b || 0), T = n.vec2.set(Xs, p[2 * s], p[2 * s + 1]), w = n.vec3.set(Ys, g[3 * s], g[3 * s + 1], g[3 * s + 2]),
|
|
16924
|
+
const {aGlyphOffset: p, aSegment: g, aTextDx: m, aTextDy: y, symbolIndex: x} = t.geometry.properties, _ = this.getSymbol(x), v = m ? m[s] : _.textDx, b = y ? y[s] : _.textDy, A = n.vec2.set(Zs, v || 0, b || 0), T = n.vec2.set(Xs, p[2 * s], p[2 * s + 1]), w = n.vec3.set(Ys, g[3 * s], g[3 * s + 1], g[3 * s + 2]), M = function(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g, m, y) {
|
|
16923
16925
|
p || (p = i);
|
|
16924
16926
|
const x = t.geometry.properties.line, _ = s[0] * u, v = f ? _ - o : _ + o;
|
|
16925
16927
|
let b = v > 0 ? 1 : -1, A = 0;
|
|
16926
16928
|
f && (b *= -1, A = Math.PI), b < 0 && (A += Math.PI);
|
|
16927
16929
|
const T = h + c, w = Math.abs(v);
|
|
16928
|
-
let
|
|
16930
|
+
let M = b > 0 ? l : l + 1, S = ri.convert(i), P = ri.convert(i), I = ri.convert(r), C = ri.convert(r), k = 0, O = 0;
|
|
16929
16931
|
for (;k + O <= w; ) {
|
|
16930
|
-
if (
|
|
16931
|
-
P.x =
|
|
16932
|
-
I.x = x[3 *
|
|
16932
|
+
if (M += b, M < h || M >= T) return null;
|
|
16933
|
+
P.x = S.x, P.y = S.y, C.x = I.x, C.y = I.y, S.x = n[3 * M], S.y = n[3 * M + 1],
|
|
16934
|
+
I.x = x[3 * M], I.y = x[3 * M + 1], k += O, O = P.dist(S) / d;
|
|
16933
16935
|
}
|
|
16934
16936
|
const F = (w - k) / O, R = g && g.getRenderer(), E = R && R.getTerrainHelper(), D = t.properties.tile.terrainTileInfos;
|
|
16935
16937
|
if (!y && E) {
|
|
16936
16938
|
const {extent: n} = t.properties.tile, i = g.getTileSize().width / n, r = g.getMap();
|
|
16937
16939
|
let s = I.sub(C).mult(F)._add(C);
|
|
16938
|
-
|
|
16939
|
-
const o = A + Math.atan2(
|
|
16940
|
+
S = di(ai, r, t, I, i, g, m, D), P = di(li, r, t, C, i, g, m, D), s = di(hi, r, t, s, i, g, m, D);
|
|
16941
|
+
const o = A + Math.atan2(S[1] - P[1], S[0] - P[0]);
|
|
16940
16942
|
return e[0] = (s[0] - p[0]) / d, e[1] = (s[1] - p[1]) / d, e[2] = o, e;
|
|
16941
16943
|
}
|
|
16942
|
-
const L =
|
|
16944
|
+
const L = S.sub(P), H = L.mult(F)._add(P);
|
|
16943
16945
|
H._add(L._unit()._perp()._mult(a * b));
|
|
16944
|
-
const N = A + Math.atan2(
|
|
16946
|
+
const N = A + Math.atan2(S.y - P.y, S.x - P.x);
|
|
16945
16947
|
return e[0] = (H.x - i[0]) / d, e[1] = (H.y - i[1]) / d, e[2] = N, e;
|
|
16946
16948
|
}(e, t, r, o, a, T, A[0], A[1], w[0], w[1], w[2], i / 24, h, l, c, u, f, d);
|
|
16947
|
-
return
|
|
16949
|
+
return M;
|
|
16948
16950
|
}
|
|
16949
16951
|
const $s = [], Js = [];
|
|
16950
16952
|
function Ks(e, t, i, r, s, o, a, l, h, c, u, f, d) {
|
|
@@ -16973,7 +16975,7 @@
|
|
|
16973
16975
|
}, ho = function(e) {
|
|
16974
16976
|
const t = this.layer.getRenderer(), n = e.properties.tile.z, i = t.getCurrentTileZoom();
|
|
16975
16977
|
return !this._isHalo0(e) && !t.isForeground(e) && "line" === e.geometry.properties.textPlacement && n < i;
|
|
16976
|
-
}, co = [ 0, 0, 3 ], uo = [], fo = [], po = [], go = [], mo = [], yo = [], xo = [], _o = [], vo = [ 1, -1 ], bo = new Int16Array(3), Ao = [], To = [], wo = [],
|
|
16978
|
+
}, co = [ 0, 0, 3 ], uo = [], fo = [], po = [], go = [], mo = [], yo = [], xo = [], _o = [], vo = [ 1, -1 ], bo = new Int16Array(3), Ao = [], To = [], wo = [], Mo = [], So = [], Po = [], Io = [], Co = {}, ko = {}, Oo = {}, Fo = [], Ro = [], Eo = n.mat4.identity([]), Do = [];
|
|
16977
16979
|
class Lo extends xr {
|
|
16978
16980
|
static getBloomSymbol() {
|
|
16979
16981
|
return [ "textBloom" ];
|
|
@@ -17033,7 +17035,7 @@
|
|
|
17033
17035
|
}
|
|
17034
17036
|
return i;
|
|
17035
17037
|
};
|
|
17036
|
-
} else we(t.textName) && (this._textNameFn[e] =
|
|
17038
|
+
} else we(t.textName) && (this._textNameFn[e] = Me(t.textName));
|
|
17037
17039
|
}
|
|
17038
17040
|
}
|
|
17039
17041
|
shouldDeleteMeshOnUpdateSymbol(e) {
|
|
@@ -17195,29 +17197,29 @@
|
|
|
17195
17197
|
const l = this.layer.getRenderer(), h = e.material.uniforms, c = 1 === h.textPitchWithMap, u = !c && l.getTerrainHelper && l.getTerrainHelper(), f = this.isEnableCollision(), d = this.getMap(), p = e.geometry, g = p.desc.positionSize, {aShape: m, aOffset: y, aAnchor: x, aAltitude: _, aPitchRotation: v} = p.properties;
|
|
17196
17198
|
let {aProjectedAnchor: b} = p.properties;
|
|
17197
17199
|
b || (b = p.properties.aProjectedAnchor = new Array(x.length / g * 3));
|
|
17198
|
-
const A = p.properties.aTextSize, T = !a, w = t[i],
|
|
17199
|
-
let
|
|
17200
|
-
|
|
17201
|
-
const P = oi(mo,
|
|
17200
|
+
const A = p.properties.aTextSize, T = !a, w = t[i], M = w * g;
|
|
17201
|
+
let S;
|
|
17202
|
+
S = p.data.aAltitude ? n.vec3.set(go, x[M], x[M + 1], _[w]) : io.unpackPosition(go, x[M], x[M + 1], x[M + 2]);
|
|
17203
|
+
const P = oi(mo, S, o, d.width, d.height), I = p.properties.aTerrainAltitude;
|
|
17202
17204
|
let C;
|
|
17203
17205
|
if (I) {
|
|
17204
17206
|
const e = I[w];
|
|
17205
17207
|
if (e === at) return b[3 * w] = ot, b[3 * w + 1] = ot, b[3 * w + 2] = ot, !1;
|
|
17206
|
-
e ? (C = n.vec3.set(Ro, ...
|
|
17208
|
+
e ? (C = n.vec3.set(Ro, ...S), C[2] = 100 * e, C = oi(C, C, o, d.width, d.height)) : C = P;
|
|
17207
17209
|
} else C = P;
|
|
17208
17210
|
const k = d.getDevicePixelRatio();
|
|
17209
17211
|
if (n.vec4.scale(Do, C, 1 / k), d.isOffscreen(Do)) return f || Ho(y, t, i, r), b[3 * w] = ot,
|
|
17210
17212
|
b[3 * w + 1] = ot, b[3 * w + 2] = ot, !1;
|
|
17211
|
-
T && (
|
|
17213
|
+
T && (S = P), b[3 * w] = C[0], b[3 * w + 1] = C[1], b[3 * w + 2] = C[2];
|
|
17212
17214
|
const O = T ? 1 : p.properties.tileExtent / this.layer.getTileSize().width;
|
|
17213
17215
|
let F = !0;
|
|
17214
|
-
const R = t[i], E = t[r - 1], D = A ? A[R] : e.properties.textSize, L = this._updateNormal(e, D, s, R, E,
|
|
17216
|
+
const R = t[i], E = t[r - 1], D = A ? A[R] : e.properties.textSize, L = this._updateNormal(e, D, s, R, E, S, go, O, a);
|
|
17215
17217
|
if (null === L) return Ho(y, t, i, r), !1;
|
|
17216
17218
|
const H = E - R <= 3, N = Math.floor(L / 2), z = L % 2;
|
|
17217
17219
|
for (let a = i; a < r; a += 6) {
|
|
17218
17220
|
const l = t[a];
|
|
17219
17221
|
let d;
|
|
17220
|
-
if (d = N || a !== i || H || u ? N || a !== r - 6 || H || u ? qs.call(this, fo, e, D, s, l,
|
|
17222
|
+
if (d = N || a !== i || H || u ? N || a !== r - 6 || H || u ? qs.call(this, fo, e, D, s, l, S, go, O, N, C, this.layer, o, c) : Io : Po,
|
|
17221
17223
|
!d) {
|
|
17222
17224
|
F = !1, f || Ho(y, t, i, r);
|
|
17223
17225
|
break;
|
|
@@ -17227,8 +17229,8 @@
|
|
|
17227
17229
|
const g = Fr(yo, p, 0, h.textRotateWithMap, h.textPitchWithMap), x = y.length > m.length;
|
|
17228
17230
|
let _;
|
|
17229
17231
|
if (x) {
|
|
17230
|
-
n.vec3.set(
|
|
17231
|
-
const e = n.vec3.normalize(
|
|
17232
|
+
n.vec3.set(Mo, v[3 * l], v[3 * l + 1], 0);
|
|
17233
|
+
const e = n.vec3.normalize(Mo, Mo), t = -v[3 * l + 2];
|
|
17232
17234
|
if (t) {
|
|
17233
17235
|
const i = n.quat.setAxisAngle(Ao, e, t);
|
|
17234
17236
|
n.mat4.fromTranslation(To, co), n.mat4.fromQuat(wo, i), _ = n.mat4.multiply(wo, wo, To);
|
|
@@ -17314,7 +17316,7 @@
|
|
|
17314
17316
|
}
|
|
17315
17317
|
}
|
|
17316
17318
|
getUniformValues(e, t) {
|
|
17317
|
-
const i = t && t.isRenderingTerrainSkin, r = this.layer.getTileSize().width, s = i ? Eo : e.projViewMatrix, o = e.cameraToCenterDistance, a = n.vec2.set(
|
|
17319
|
+
const i = t && t.isRenderingTerrainSkin, r = this.layer.getTileSize().width, s = i ? Eo : e.projViewMatrix, o = e.cameraToCenterDistance, a = n.vec2.set(So, e.width, e.height);
|
|
17318
17320
|
i && n.vec2.set(a, r, r);
|
|
17319
17321
|
const l = Ue(e.getResolution(), e);
|
|
17320
17322
|
return {
|
|
@@ -17389,7 +17391,7 @@
|
|
|
17389
17391
|
h.properties.symbolIndex = r, h;
|
|
17390
17392
|
}
|
|
17391
17393
|
createFnTypeConfig(e, t) {
|
|
17392
|
-
const n =
|
|
17394
|
+
const n = Se(t.markerFill);
|
|
17393
17395
|
return [ {
|
|
17394
17396
|
attrName: "aColor",
|
|
17395
17397
|
symbolName: "markerFill",
|
|
@@ -17465,7 +17467,7 @@
|
|
|
17465
17467
|
class jo extends Fi {
|
|
17466
17468
|
constructor(e, t, n, i, r, s) {
|
|
17467
17469
|
if (super(e, t, n, i, r, s), this.primitive = "lines", we(this.symbolDef.lineColor)) {
|
|
17468
|
-
const e = t.getMap(), n =
|
|
17470
|
+
const e = t.getMap(), n = Se(this.symbolDef.lineColor);
|
|
17469
17471
|
this.colorSymbol = t => n(e.getZoom(), t);
|
|
17470
17472
|
}
|
|
17471
17473
|
}
|
|
@@ -17737,7 +17739,7 @@
|
|
|
17737
17739
|
return !("line-extrusion" === this.dataConfig.type && !e.altitudeProperty && !t.altitudeProperty);
|
|
17738
17740
|
}
|
|
17739
17741
|
createFnTypeConfig(e, t) {
|
|
17740
|
-
const n =
|
|
17742
|
+
const n = Se(t.polygonFill || t.lineColor), i = Me(t.polygonOpacity || t.lineOpacity), r = Me(t.lineWidth), s = new Uint8Array(1), o = new Uint16Array(1), a = t.polygonFill ? "polygonFill" : t.lineColor ? "lineColor" : "polygonFill", l = t.polygonOpacity ? "polygonOpacity" : t.lineOpacity ? "lineOpacity" : "polygonOpacity";
|
|
17741
17743
|
return [ {
|
|
17742
17744
|
attrName: "aColor",
|
|
17743
17745
|
type: Uint8Array,
|
|
@@ -18350,7 +18352,7 @@
|
|
|
18350
18352
|
r;
|
|
18351
18353
|
}
|
|
18352
18354
|
createFnTypeConfig(e, t) {
|
|
18353
|
-
const n =
|
|
18355
|
+
const n = Se(t.lineColor), i = Se(t.aLinePatternAnimSpeed), r = Se(t.aLinePatternGap), s = this.createShapeFnTypeConfigs(e, t), o = new Int8Array(2);
|
|
18354
18356
|
return [ {
|
|
18355
18357
|
attrName: "aColor",
|
|
18356
18358
|
symbolName: "lineColor",
|
|
@@ -18388,7 +18390,7 @@
|
|
|
18388
18390
|
} ].concat(s);
|
|
18389
18391
|
}
|
|
18390
18392
|
createShapeFnTypeConfigs(e, t) {
|
|
18391
|
-
const n =
|
|
18393
|
+
const n = Me(t.lineWidth), i = Me(t.lineOpacity), r = new Uint16Array(1);
|
|
18392
18394
|
return [ {
|
|
18393
18395
|
attrName: "aLineWidth",
|
|
18394
18396
|
symbolName: "lineWidth",
|
|
@@ -18425,7 +18427,7 @@
|
|
|
18425
18427
|
delete this.shader);
|
|
18426
18428
|
}
|
|
18427
18429
|
}
|
|
18428
|
-
const {PackUtil: da} = h(), pa = [], ga = [], ma = [], ya = [], xa = [], _a = [ 0, 0, 0 ], va = [ 0, 0, 0 ], ba = [ 1, 1, 1 ], Aa = [], Ta = [ 1, 1, 1, 1 ], wa = [],
|
|
18430
|
+
const {PackUtil: da} = h(), pa = [], ga = [], ma = [], ya = [], xa = [], _a = [ 0, 0, 0 ], va = [ 0, 0, 0 ], ba = [ 1, 1, 1 ], Aa = [], Ta = [ 1, 1, 1, 1 ], wa = [], Ma = [ 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1 ], Sa = e => class extends e {
|
|
18429
18431
|
constructor(e, t, i, r, s, o) {
|
|
18430
18432
|
super(e, t, i, r, s, o), this._ready = !1, this.scene.sortFunction = this.sortByCommandKey;
|
|
18431
18433
|
const a = r.fetchOptions || {};
|
|
@@ -18491,9 +18493,9 @@
|
|
|
18491
18493
|
};
|
|
18492
18494
|
const b = this._hasFuncType(), A = this._getMeterScale(), T = n.mat4.identity([]);
|
|
18493
18495
|
n.mat4.scale(T, T, [ A, A, A ]);
|
|
18494
|
-
const w = [],
|
|
18495
|
-
for (let e = 0; e <
|
|
18496
|
-
const t =
|
|
18496
|
+
const w = [], M = this.getSymbols();
|
|
18497
|
+
for (let e = 0; e < M.length; e++) {
|
|
18498
|
+
const t = M[e], r = this._gltfMeshInfos[e];
|
|
18497
18499
|
if (!r) continue;
|
|
18498
18500
|
const l = this._gltfPack[e][0], {fixSizeOnZoom: h} = t;
|
|
18499
18501
|
let c = n.mat4.identity([]);
|
|
@@ -18501,21 +18503,21 @@
|
|
|
18501
18503
|
let u = 0;
|
|
18502
18504
|
r.forEach((e => {
|
|
18503
18505
|
const {geometry: i, nodeMatrix: r} = e;
|
|
18504
|
-
n.mat4.multiply(wa,
|
|
18506
|
+
n.mat4.multiply(wa, Ma, r), n.mat4.multiply(wa, c, wa);
|
|
18505
18507
|
const s = n.mat4.multiply(wa, T, wa), o = i.boundingBox.copy();
|
|
18506
18508
|
o.transform(s);
|
|
18507
18509
|
const a = this._calAnchorTranslation(o, t);
|
|
18508
18510
|
Math.abs(a) > Math.abs(u) && (u = a);
|
|
18509
18511
|
}));
|
|
18510
18512
|
const f = [ 0, 0, u ], d = r.map(((r, d) => {
|
|
18511
|
-
const {geometry: p, materialInfo: b, morphWeights: A, extraInfo: w, nodeIndex:
|
|
18513
|
+
const {geometry: p, materialInfo: b, morphWeights: A, extraInfo: w, nodeIndex: M} = r;
|
|
18512
18514
|
t.alphaTest && (b.alphaTest = t.alphaTest);
|
|
18513
|
-
const
|
|
18515
|
+
const S = new (this.getMaterialClazz(b))(b), P = {}, I = new n.reshader.InstancedMesh(x, g, p, S, {
|
|
18514
18516
|
transparent: !1,
|
|
18515
18517
|
picking: !0
|
|
18516
18518
|
});
|
|
18517
18519
|
if (l.hasSkinAnimation()) {
|
|
18518
|
-
const t = this._updateAnimation(I, e, 0)[
|
|
18520
|
+
const t = this._updateAnimation(I, e, 0)[M];
|
|
18519
18521
|
I.setUniform("jointTexture", t.jointTexture), I.setUniform("jointTextureSize", t.jointTextureSize),
|
|
18520
18522
|
I.setUniform("numJoints", t.numJoints), I.setUniform("skinAnimation", +this._isSkinAnimating(e)),
|
|
18521
18523
|
I.properties.startTime = s, P.HAS_SKIN = 1;
|
|
@@ -18524,8 +18526,8 @@
|
|
|
18524
18526
|
bt(I.uniforms, "polygonFill", t, "markerFill", Ta, wt(this.colorCache)), bt(I.uniforms, "polygonOpacity", t, "markerOpacity", 1);
|
|
18525
18527
|
const C = [];
|
|
18526
18528
|
I.setPositionMatrix((() => {
|
|
18527
|
-
const t = this._getMeshNodeMatrix(e, d,
|
|
18528
|
-
n.mat4.multiply(C,
|
|
18529
|
+
const t = this._getMeshNodeMatrix(e, d, M);
|
|
18530
|
+
n.mat4.multiply(C, Ma, t), n.mat4.multiply(C, c, C), n.mat4.multiply(C, T, C);
|
|
18529
18531
|
const i = n.mat4.identity(wa);
|
|
18530
18532
|
if (0 !== u && (n.mat4.fromTranslation(i, f), n.mat4.multiply(C, i, C)), Pt(h)) {
|
|
18531
18533
|
const e = o.getGLScale() / o.getGLScale(h);
|
|
@@ -18542,7 +18544,7 @@
|
|
|
18542
18544
|
}), m.instance_color && (P.HAS_INSTANCE_COLOR = 1), m.aTerrainAltitude && (P.HAS_INSTANCE_TERRAIN_ALTITUDE = 1,
|
|
18543
18545
|
I.setUniform("terrainAltitudeScale", 100 * this.layer.getRenderer().getZScale())),
|
|
18544
18546
|
P.HAS_LAYER_OPACITY = 1, mt(I.properties, a.properties), I.properties.aPickingId = _,
|
|
18545
|
-
I.properties.nodeIndex =
|
|
18547
|
+
I.properties.nodeIndex = M, I.properties.pickingIdIndiceMap = v, I.setDefines(P),
|
|
18546
18548
|
I.properties.symbolIndex = {
|
|
18547
18549
|
index: e
|
|
18548
18550
|
}, I;
|
|
@@ -18624,10 +18626,10 @@
|
|
|
18624
18626
|
t[0] < y && (y = t[0]), t[0] > v && (v = t[0]), t[1] < x && (x = t[1]), t[1] > b && (b = t[1]),
|
|
18625
18627
|
t[2] < _ && (_ = t[2]), t[2] > A && (A = t[2]);
|
|
18626
18628
|
}
|
|
18627
|
-
const
|
|
18629
|
+
const M = (y + v) / 2, S = (x + b) / 2, P = (_ + A) / 2, I = [], C = this._hasFuncType(), k = [ 0, 0, 1 ];
|
|
18628
18630
|
for (let t = 0; t < d; t++) {
|
|
18629
18631
|
o ? n.vec3.set(w, s[t * h], s[t * h + 1], o[t]) : da.unpackPosition(w, s[t * h], s[t * h + 1], s[t * h + 2]);
|
|
18630
|
-
const i = w[0], r = w[1], d = n.vec3.set(T, i * p -
|
|
18632
|
+
const i = w[0], r = w[1], d = n.vec3.set(T, i * p - M, -r * p - S, (w[2] + m) * g - P), y = a && a[t] || 0, x = l && l[t] || 0;
|
|
18631
18633
|
if (y || x) {
|
|
18632
18634
|
n.mat4.fromRotation(I, x, k);
|
|
18633
18635
|
const e = n.vec3.set(pa, i, r, 0), t = n.vec3.normalize(e, n.vec3.cross(e, e, k));
|
|
@@ -18642,7 +18644,7 @@
|
|
|
18642
18644
|
f("instance_vectorA", t, I, 0), f("instance_vectorB", t, I, 1), f("instance_vectorC", t, I, 2),
|
|
18643
18645
|
e.aPickingId[t] = c[t];
|
|
18644
18646
|
}
|
|
18645
|
-
return n.vec3.set(T,
|
|
18647
|
+
return n.vec3.set(T, M, S, P), T;
|
|
18646
18648
|
}
|
|
18647
18649
|
_getMeterScale() {
|
|
18648
18650
|
if (!this._meterScale) {
|
|
@@ -18679,11 +18681,11 @@
|
|
|
18679
18681
|
}
|
|
18680
18682
|
_initTRSFuncType() {
|
|
18681
18683
|
const e = this.symbolDef[0];
|
|
18682
|
-
we(e.modelHeight) && (this._modelHeightFn =
|
|
18683
|
-
we(e.translationY) && (this._tyFn =
|
|
18684
|
-
we(e.rotationX) && (this._rxFn =
|
|
18685
|
-
we(e.rotationZ) && (this._rzFn =
|
|
18686
|
-
we(e.scaleY) && (this._syFn =
|
|
18684
|
+
we(e.modelHeight) && (this._modelHeightFn = Me(e.modelHeight)), we(e.translationX) && (this._txFn = Me(e.translationX)),
|
|
18685
|
+
we(e.translationY) && (this._tyFn = Me(e.translationY)), we(e.translationZ) && (this._tzFn = Me(e.translationZ)),
|
|
18686
|
+
we(e.rotationX) && (this._rxFn = Me(e.rotationX)), we(e.rotationY) && (this._ryFn = Me(e.rotationY)),
|
|
18687
|
+
we(e.rotationZ) && (this._rzFn = Me(e.rotationZ)), we(e.scaleX) && (this._sxFn = Me(e.scaleX)),
|
|
18688
|
+
we(e.scaleY) && (this._syFn = Me(e.scaleY)), we(e.scaleZ) && (this._szFn = Me(e.scaleZ));
|
|
18687
18689
|
}
|
|
18688
18690
|
_hasFuncType() {
|
|
18689
18691
|
return !!(this._modelHeightFn && !this._modelHeightFn.isFeatureConstant || this._txFn && !this._txFn.isFeatureConstant || this._tyFn && !this._tyFn.isFeatureConstant || this._tzFn && !this._tzFn.isFeatureConstant || this._rxFn && !this._rxFn.isFeatureConstant || this._ryFn && !this._ryFn.isFeatureConstant || this._rzFn && !this._rzFn.isFeatureConstant || this._sxFn && !this._sxFn.isFeatureConstant || this._syFn && !this._syFn.isFeatureConstant || this._szFn && !this._szFn.isFeatureConstant);
|
|
@@ -18749,12 +18751,12 @@
|
|
|
18749
18751
|
return n.mat4.fromRotationTranslationScale(e, l, s, a);
|
|
18750
18752
|
}
|
|
18751
18753
|
};
|
|
18752
|
-
class Pa extends(
|
|
18754
|
+
class Pa extends(Sa(ra)){
|
|
18753
18755
|
getMaterialClazz(e) {
|
|
18754
18756
|
return e.diffuseFactor ? n.reshader.PhongSpecularGlossinessMaterial : n.reshader.PhongMaterial;
|
|
18755
18757
|
}
|
|
18756
18758
|
}
|
|
18757
|
-
class Ia extends(
|
|
18759
|
+
class Ia extends(Sa(la)){
|
|
18758
18760
|
getMaterialClazz(e) {
|
|
18759
18761
|
return e.specularGlossinessTexture || e.diffuseTexture ? n.reshader.pbr.StandardSpecularGlossinessMaterial : n.reshader.pbr.StandardMaterial;
|
|
18760
18762
|
}
|
|
@@ -19061,7 +19063,7 @@
|
|
|
19061
19063
|
Za.registerAt(en);
|
|
19062
19064
|
const qa = zn("heatmap", class extends Fi {
|
|
19063
19065
|
createFnTypeConfig(e, t) {
|
|
19064
|
-
const n =
|
|
19066
|
+
const n = Me(t.heatmapWeight), i = new Int16Array(1);
|
|
19065
19067
|
return [ {
|
|
19066
19068
|
attrName: "aWeight",
|
|
19067
19069
|
symbolName: "heatmapWeight",
|
|
@@ -20064,7 +20066,7 @@
|
|
|
20064
20066
|
}
|
|
20065
20067
|
return !0;
|
|
20066
20068
|
}
|
|
20067
|
-
function
|
|
20069
|
+
function Ml(e, t, n) {
|
|
20068
20070
|
if (!e || e.type !== t) return null;
|
|
20069
20071
|
const i = new n(e.id, e.options), s = e.geometries, o = [];
|
|
20070
20072
|
for (let e = 0; e < s.length; e++) {
|
|
@@ -20073,9 +20075,9 @@
|
|
|
20073
20075
|
}
|
|
20074
20076
|
return i.addGeometry(o), i;
|
|
20075
20077
|
}
|
|
20076
|
-
class
|
|
20078
|
+
class Sl extends ln {
|
|
20077
20079
|
static fromJSON(e) {
|
|
20078
|
-
return
|
|
20080
|
+
return Ml(e, "PointLayer", Sl);
|
|
20079
20081
|
}
|
|
20080
20082
|
constructor(...e) {
|
|
20081
20083
|
super(...e), this.options.sceneConfig || (this.options.sceneConfig = Fe({}, Ke));
|
|
@@ -20087,7 +20089,7 @@
|
|
|
20087
20089
|
return 0;
|
|
20088
20090
|
}
|
|
20089
20091
|
}
|
|
20090
|
-
|
|
20092
|
+
Sl.mergeOptions({
|
|
20091
20093
|
glyphSdfLimitPerFrame: 15,
|
|
20092
20094
|
iconErrorUrl: null,
|
|
20093
20095
|
workarounds: {
|
|
@@ -20095,8 +20097,8 @@
|
|
|
20095
20097
|
},
|
|
20096
20098
|
collision: !1,
|
|
20097
20099
|
collisionFrameLimit: 1
|
|
20098
|
-
}),
|
|
20099
|
-
|
|
20100
|
+
}), Sl.registerJSONType("PointLayer"), Sl.registerRenderer("canvas", null);
|
|
20101
|
+
Sl.registerRenderer("gl", class extends gl {
|
|
20100
20102
|
constructor(...e) {
|
|
20101
20103
|
super(...e), this.GeometryTypes = [ r.Marker, r.MultiPoint ];
|
|
20102
20104
|
}
|
|
@@ -20109,7 +20111,7 @@
|
|
|
20109
20111
|
const {LinePack: Pl} = h();
|
|
20110
20112
|
class Il extends ln {
|
|
20111
20113
|
static fromJSON(e) {
|
|
20112
|
-
return
|
|
20114
|
+
return Ml(e, "LineStringLayer", Il);
|
|
20113
20115
|
}
|
|
20114
20116
|
}
|
|
20115
20117
|
Il.mergeOptions({
|
|
@@ -20149,7 +20151,7 @@
|
|
|
20149
20151
|
const {PolygonPack: kl} = h();
|
|
20150
20152
|
class Ol extends ln {
|
|
20151
20153
|
static fromJSON(e) {
|
|
20152
|
-
return
|
|
20154
|
+
return Ml(e, "PolygonLayer", Ol);
|
|
20153
20155
|
}
|
|
20154
20156
|
}
|
|
20155
20157
|
Ol.registerJSONType("PolygonLayer");
|
|
@@ -20622,11 +20624,11 @@
|
|
|
20622
20624
|
e.copyWithin(r, r - 2 * y, r - y), r += y, (n = n || []).push(y / 3);
|
|
20623
20625
|
const _ = n.getLength();
|
|
20624
20626
|
for (let t = 0; t < _; t++) {
|
|
20625
|
-
|
|
20627
|
+
Mh(x + (n[t - 1] || 0), x + n[t], e, y / 3, l, i, h, c, u, f, s, d, p, g, m);
|
|
20626
20628
|
}
|
|
20627
20629
|
return r;
|
|
20628
20630
|
}
|
|
20629
|
-
function
|
|
20631
|
+
function Mh(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p) {
|
|
20630
20632
|
const g = s.getLength();
|
|
20631
20633
|
let m, y;
|
|
20632
20634
|
for (let o = e, a = t; o < a - 1; o++) if (m = o, y = o + 1, r === 1 / 0 || !Dl(n, m, y, r)) if ((o - e) % 2 == 1 && (m += 2 * i,
|
|
@@ -20650,14 +20652,14 @@
|
|
|
20650
20652
|
const w = u % 6;
|
|
20651
20653
|
0 === e ? (5 === w && (m = ql(r, s, u, v, b)), T = w === y[0] || w === y[1] || w === y[2] ? g : g + m) : 1 === e && (w === y[0] || w === y[1] || w === y[2] ? T = 0 : 5 === w ? (m = ql(r, s, u, v, b),
|
|
20652
20654
|
T = m) : T = m);
|
|
20653
|
-
const
|
|
20654
|
-
let
|
|
20655
|
-
|
|
20656
|
-
i[2 * o] =
|
|
20655
|
+
const M = T / h * (1 / (100 * c)) / a;
|
|
20656
|
+
let S;
|
|
20657
|
+
S = 1 === t ? A === d ? 1 : 0 : "bottom" === n ? A === d ? f / 100 / l : 0 : A === d ? 0 : -f / 100 / l,
|
|
20658
|
+
i[2 * o] = M, i[2 * o + 1] = S, 0 === w && (g += m);
|
|
20657
20659
|
}
|
|
20658
20660
|
}(a, l, h, c, n, s, g, u[0], u[1], f, d, p);
|
|
20659
20661
|
}
|
|
20660
|
-
function
|
|
20662
|
+
function Sh(e) {
|
|
20661
20663
|
const t = [ e[0] ];
|
|
20662
20664
|
let n = e[0];
|
|
20663
20665
|
for (let i = 1; i < e.length; i++) Array.isArray(e[i]) ? e[i][0] === n[0] && e[i][1] === n[1] && e[i][2] === n[2] || t.push(e[i]) : e[i].x === n.x && e[i].y === n.y && e[i].z === n.z || t.push(e[i]),
|
|
@@ -20780,7 +20782,7 @@
|
|
|
20780
20782
|
const {StyleUtil: sc, PackUtil: oc, ArrayPool: ac} = h(), lc = ac.getInstance();
|
|
20781
20783
|
function hc(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g) {
|
|
20782
20784
|
void 0 === t.top && (t.top = !0), void 0 === t.side && (t.side = !0), lc.reset();
|
|
20783
|
-
const {altitudeScale: m, altitudeProperty: y, defaultAltitude: x, heightProperty: _, minHeightProperty: v, defaultHeight: b, tangent: A, uv: T, topUVMode: w, sideUVMode:
|
|
20785
|
+
const {altitudeScale: m, altitudeProperty: y, defaultAltitude: x, heightProperty: _, minHeightProperty: v, defaultHeight: b, tangent: A, uv: T, topUVMode: w, sideUVMode: M, sideVerticalUVMode: S, top: P, side: I, textureYOrigin: C, topThickness: k} = t, O = !!g, F = function(e, t, {altitudeScale: n, altitudeProperty: i, defaultAltitude: r, heightProperty: s, minHeightProperty: o, defaultHeight: a}, {center: l, side: h, top: c, topThickness: u, uvOrigin: f, uv: d, uvSize: p, topUVMode: g, sideUVMode: m, sideVerticalUVMode: y, textureYOrigin: x, tileRatio: _, centimeterToPoint: v, verticalCentimeterToPoint: b, positionType: A, res: T, glScale: w, projectionCode: M}, S, P) {
|
|
20784
20786
|
let I = t / e[0].extent;
|
|
20785
20787
|
t === 1 / 0 && (I = 1);
|
|
20786
20788
|
const C = t === 1 / 0, k = P.get(), O = P.get(), F = P.get(), R = P.getProxy(), E = P.get(), D = P.get(), L = P.get(), H = !!d, N = !!c, z = !!h, V = H ? P.get() : null;
|
|
@@ -20799,7 +20801,7 @@
|
|
|
20799
20801
|
}
|
|
20800
20802
|
c = h.length, d = D.currentIndex;
|
|
20801
20803
|
for (let e = 0; e < c; e++) D[d++] = h[e];
|
|
20802
|
-
D.currentIndex = d, H && Yl(g || 0, e, n, V, E, f, v, _, p[0], p[1], s, T, w,
|
|
20804
|
+
D.currentIndex = d, H && Yl(g || 0, e, n, V, E, f, v, _, p[0], p[1], s, T, w, M, l),
|
|
20803
20805
|
u > 0 && !z && (n = wh(E, R, i, D, n, V, 0, u, t, H, m || 0, y || 0, x, p, _, b, r < 0 ? !o : o)),
|
|
20804
20806
|
L.setLength(n / 3), L.fill(1, a / 3, n / 3);
|
|
20805
20807
|
}
|
|
@@ -20815,7 +20817,7 @@
|
|
|
20815
20817
|
let B = -1 / 0, G = 1 / 0, j = 0;
|
|
20816
20818
|
const W = [ -1, -1, t + 1, t + 1 ];
|
|
20817
20819
|
let X = 0, Y = e.length;
|
|
20818
|
-
Ee(
|
|
20820
|
+
Ee(S) && (X = S, Y = S + 1);
|
|
20819
20821
|
let Z = 0, q = !1;
|
|
20820
20822
|
const $ = P.getProxy();
|
|
20821
20823
|
let J = !1;
|
|
@@ -20833,7 +20835,7 @@
|
|
|
20833
20835
|
const x = Ah.calculateSignedArea(c[0]) < 0;
|
|
20834
20836
|
for (let e = 0, n = c.length; e < n; e++) {
|
|
20835
20837
|
let i = c[e];
|
|
20836
|
-
x && (i = i.reverse()), i =
|
|
20838
|
+
x && (i = i.reverse()), i = Sh(i);
|
|
20837
20839
|
const r = Ah.calculateSignedArea(i) < 0;
|
|
20838
20840
|
if (!r && e > 0 && (m++, f = u && u[m], j = U(y, j, $, p * I, f, C), R.setLength(0),
|
|
20839
20841
|
$.setLength(0), y = j), t !== 1 / 0 && (i = Ah.clipPolygon(i, W)), !i.length) {
|
|
@@ -20886,8 +20888,8 @@
|
|
|
20886
20888
|
uvSize: [ r, r ],
|
|
20887
20889
|
uvOrigin: i,
|
|
20888
20890
|
topUVMode: w,
|
|
20889
|
-
sideUVMode:
|
|
20890
|
-
sideVerticalUVMode:
|
|
20891
|
+
sideUVMode: M,
|
|
20892
|
+
sideVerticalUVMode: S,
|
|
20891
20893
|
textureYOrigin: C,
|
|
20892
20894
|
tileRatio: a,
|
|
20893
20895
|
centimeterToPoint: l,
|
|
@@ -20931,21 +20933,21 @@
|
|
|
20931
20933
|
function y(t, i, r) {
|
|
20932
20934
|
ic(h, e, 3 * t), ic(c, e, 3 * i), ic(u, e, 3 * r), rc(f, n, 2 * t), rc(d, n, 2 * i),
|
|
20933
20935
|
rc(p, n, 2 * r);
|
|
20934
|
-
const s = c[0] - h[0], o = u[0] - h[0], y = c[1] - h[1], x = u[1] - h[1], _ = c[2] - h[2], v = u[2] - h[2], b = d[0] - f[0], A = p[0] - f[0], T = d[1] - f[1], w = p[1] - f[1],
|
|
20935
|
-
Oh(g, (w * s - T * o) *
|
|
20936
|
+
const s = c[0] - h[0], o = u[0] - h[0], y = c[1] - h[1], x = u[1] - h[1], _ = c[2] - h[2], v = u[2] - h[2], b = d[0] - f[0], A = p[0] - f[0], T = d[1] - f[1], w = p[1] - f[1], M = 1 / (b * w - A * T);
|
|
20937
|
+
Oh(g, (w * s - T * o) * M, (w * y - T * x) * M, (w * _ - T * v) * M), Oh(m, (b * o - A * s) * M, (b * x - A * y) * M, (b * v - A * _) * M),
|
|
20936
20938
|
Fh(a[t], a[t], g), Fh(a[i], a[i], g), Fh(a[r], a[r], g), Fh(l[t], l[t], m), Fh(l[i], l[i], m),
|
|
20937
20939
|
Fh(l[r], l[r], m);
|
|
20938
20940
|
}
|
|
20939
20941
|
for (let e = 0, t = i.length; e < t; e += 3) y(i[e + 0], i[e + 1], i[e + 2]);
|
|
20940
20942
|
const x = [], _ = [], v = [], b = [];
|
|
20941
20943
|
let A, T, w;
|
|
20942
|
-
function
|
|
20944
|
+
function M(e) {
|
|
20943
20945
|
ic(v, t, 3 * e), kh(b, v), T = a[e], kh(x, T), Lh(x, x, function(e, t, n) {
|
|
20944
20946
|
return e[0] = t[0] * n, e[1] = t[1] * n, e[2] = t[2] * n, e;
|
|
20945
20947
|
}(v, v, Eh(v, T))), Rh(x, x), Dh(_, b, T), w = Eh(_, l[e]), A = w < 0 ? -1 : 1,
|
|
20946
20948
|
o[4 * e] = x[0], o[4 * e + 1] = x[1], o[4 * e + 2] = x[2], o[4 * e + 3] = A;
|
|
20947
20949
|
}
|
|
20948
|
-
for (let e = 0, t = i.length; e < t; e += 3)
|
|
20950
|
+
for (let e = 0, t = i.length; e < t; e += 3) M(i[e + 0]), M(i[e + 1]), M(i[e + 2]);
|
|
20949
20951
|
return o;
|
|
20950
20952
|
}(F.vertices, F.normals, F.uvs, L, e), e = function(e, t) {
|
|
20951
20953
|
const n = t.getLength(), i = new Float32Array(n), r = [], s = [], o = [];
|
|
@@ -20969,28 +20971,28 @@
|
|
|
20969
20971
|
const G = function(e, t, n, i) {
|
|
20970
20972
|
const r = {}, s = {}, o = i.getLength();
|
|
20971
20973
|
if (ze(t.polygonFill)) {
|
|
20972
|
-
let a =
|
|
20974
|
+
let a = Se(t.polygonFill);
|
|
20973
20975
|
const l = new Uint8Array(4 * o);
|
|
20974
20976
|
l.fill(255);
|
|
20975
20977
|
for (let t = 0; t < o; t++) {
|
|
20976
20978
|
const s = e[i[t]], o = s.properties || {};
|
|
20977
20979
|
o.$layer = s.layer, o.$type = s.type;
|
|
20978
20980
|
let h = a(n, o);
|
|
20979
|
-
we(h) && (r.aColor = 1, a =
|
|
20981
|
+
we(h) && (r.aColor = 1, a = Se(h), h = a(n, o)), delete o.$layer, delete o.$type,
|
|
20980
20982
|
sc.normalizeColor(cc, h), l[4 * t] = cc[0], l[4 * t + 1] = cc[1], l[4 * t + 2] = cc[2],
|
|
20981
20983
|
l[4 * t + 3] = cc[3];
|
|
20982
20984
|
}
|
|
20983
20985
|
s.aColor = l;
|
|
20984
20986
|
}
|
|
20985
20987
|
if (ze(t.polygonOpacity)) {
|
|
20986
|
-
let a =
|
|
20988
|
+
let a = Me(t.polygonOpacity);
|
|
20987
20989
|
const l = new Uint8Array(o);
|
|
20988
20990
|
l.fill(255);
|
|
20989
20991
|
for (let t = 0; t < o; t++) {
|
|
20990
20992
|
const s = e[i[t]], o = s.properties || {};
|
|
20991
20993
|
o.$layer = s.layer, o.$type = s.type;
|
|
20992
20994
|
let h = a(n, o);
|
|
20993
|
-
we(h) && (r.aOpacity = 1, a =
|
|
20995
|
+
we(h) && (r.aOpacity = 1, a = Se(h), h = a(n, o)), delete o.$layer, delete o.$type,
|
|
20994
20996
|
l[t] = 255 * h;
|
|
20995
20997
|
}
|
|
20996
20998
|
s.aOpacity = l;
|
|
@@ -20999,7 +21001,7 @@
|
|
|
20999
21001
|
}(e, c, u, F.featureIndexes), j = function(e, t, n, i, r) {
|
|
21000
21002
|
const s = [ [], [] ], o = ze(i.topPolygonFill), a = ze(i.bottomPolygonFill), l = [ 255, 255, 255, 255 ], h = t.getLength();
|
|
21001
21003
|
if (o || a) {
|
|
21002
|
-
let c = o &&
|
|
21004
|
+
let c = o && Se(i.topPolygonFill), u = a && Se(i.bottomPolygonFill), f = null, d = null, p = null, g = null;
|
|
21003
21005
|
for (let i = 0; i < h; i++) {
|
|
21004
21006
|
if (1 === e[i] && !o || 0 === e[i] && !a) continue;
|
|
21005
21007
|
const h = 1 === e[i];
|
|
@@ -21014,7 +21016,7 @@
|
|
|
21014
21016
|
const m = n[t[i]], y = m.properties || {};
|
|
21015
21017
|
y.$layer = m.layer, y.$type = m.type;
|
|
21016
21018
|
let x = h ? c : u, _ = x(r, y);
|
|
21017
|
-
we(_) && (x =
|
|
21019
|
+
we(_) && (x = Se(_), _ = x(r, y)), delete y.$layer, delete y.$type, sc.normalizeColor(cc, _),
|
|
21018
21020
|
Vl(cc, cc, l);
|
|
21019
21021
|
let v = uc(s, cc);
|
|
21020
21022
|
v < 0 && (v = s.length, s.push(Nl([], cc))), e[i] = v, h ? (f = t[i], p = v) : (d = t[i],
|
|
@@ -21096,7 +21098,7 @@
|
|
|
21096
21098
|
for (;t; ) {
|
|
21097
21099
|
for (let s = 0; s < t.children.length; s++) {
|
|
21098
21100
|
const o = t.children[s], a = t.leaf ? i(o) : o;
|
|
21099
|
-
Pc(e, a) && (t.leaf ? n.push(o) :
|
|
21101
|
+
Pc(e, a) && (t.leaf ? n.push(o) : Sc(e, a) ? this._all(o, n) : r.push(o));
|
|
21100
21102
|
}
|
|
21101
21103
|
t = r.pop();
|
|
21102
21104
|
}
|
|
@@ -21110,7 +21112,7 @@
|
|
|
21110
21112
|
for (let i = 0; i < t.children.length; i++) {
|
|
21111
21113
|
const r = t.children[i], s = t.leaf ? this.toBBox(r) : r;
|
|
21112
21114
|
if (Pc(e, s)) {
|
|
21113
|
-
if (t.leaf ||
|
|
21115
|
+
if (t.leaf || Sc(e, s)) return !0;
|
|
21114
21116
|
n.push(r);
|
|
21115
21117
|
}
|
|
21116
21118
|
}
|
|
@@ -21150,7 +21152,7 @@
|
|
|
21150
21152
|
const i = yc(e, n.children, t);
|
|
21151
21153
|
if (-1 !== i) return n.children.splice(i, 1), r.push(n), this._condense(r), this;
|
|
21152
21154
|
}
|
|
21153
|
-
l || n.leaf || !
|
|
21155
|
+
l || n.leaf || !Sc(n, i) ? a ? (o++, n = a.children[o], l = !1) : n = null : (r.push(n),
|
|
21154
21156
|
s.push(o), o = 0, a = n, n = n.children[0]);
|
|
21155
21157
|
}
|
|
21156
21158
|
return this;
|
|
@@ -21224,7 +21226,7 @@
|
|
|
21224
21226
|
_chooseSplitIndex(e, t, n) {
|
|
21225
21227
|
let i, r = 1 / 0, s = 1 / 0;
|
|
21226
21228
|
for (let o = t; o <= n - t; o++) {
|
|
21227
|
-
const t = _c(e, 0, o, this.toBBox), a = _c(e, o, n, this.toBBox), l =
|
|
21229
|
+
const t = _c(e, 0, o, this.toBBox), a = _c(e, o, n, this.toBBox), l = Mc(t, a), h = Tc(t) + Tc(a);
|
|
21228
21230
|
l < r ? (r = l, i = o, s = h < s ? h : s) : l === r && h < s && (s = h, i = o);
|
|
21229
21231
|
}
|
|
21230
21232
|
return i || n - t;
|
|
@@ -21287,11 +21289,11 @@
|
|
|
21287
21289
|
function wc(e) {
|
|
21288
21290
|
return e.maxX - e.minX + (e.maxY - e.minY);
|
|
21289
21291
|
}
|
|
21290
|
-
function
|
|
21292
|
+
function Mc(e, t) {
|
|
21291
21293
|
const n = Math.max(e.minX, t.minX), i = Math.max(e.minY, t.minY), r = Math.min(e.maxX, t.maxX), s = Math.min(e.maxY, t.maxY);
|
|
21292
21294
|
return Math.max(0, r - n) * Math.max(0, s - i);
|
|
21293
21295
|
}
|
|
21294
|
-
function
|
|
21296
|
+
function Sc(e, t) {
|
|
21295
21297
|
return e.minX <= t.minX && e.minY <= t.minY && t.maxX <= e.maxX && t.maxY <= e.maxY;
|
|
21296
21298
|
}
|
|
21297
21299
|
function Pc(e, t) {
|
|
@@ -21403,10 +21405,10 @@
|
|
|
21403
21405
|
const h = Math.abs(o + a);
|
|
21404
21406
|
return Math.abs(l) >= Uc * h ? l : -function(e, t, n, i, r, s, o) {
|
|
21405
21407
|
let a, l, h, c, u, f, d, p, g, m, y, x, _, v, b, A, T, w;
|
|
21406
|
-
const
|
|
21407
|
-
v =
|
|
21408
|
-
m = I - g, b = p * m - (v - d * g - p * g - d * m), A = P *
|
|
21409
|
-
p = P - d, f = Hc *
|
|
21408
|
+
const M = e - r, S = n - r, P = t - s, I = i - s;
|
|
21409
|
+
v = M * I, f = Hc * M, d = f - (f - M), p = M - d, f = Hc * I, g = f - (f - I),
|
|
21410
|
+
m = I - g, b = p * m - (v - d * g - p * g - d * m), A = P * S, f = Hc * P, d = f - (f - P),
|
|
21411
|
+
p = P - d, f = Hc * S, g = f - (f - S), m = S - g, T = p * m - (A - d * g - p * g - d * m),
|
|
21410
21412
|
y = b - T, u = b - y, jc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
|
|
21411
21413
|
y = _ - A, u = _ - y, jc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, jc[2] = x - (w - u) + (y - u),
|
|
21412
21414
|
jc[3] = w;
|
|
@@ -21416,17 +21418,17 @@
|
|
|
21416
21418
|
return n;
|
|
21417
21419
|
}(4, jc), k = Bc * o;
|
|
21418
21420
|
if (C >= k || -C >= k) return C;
|
|
21419
|
-
if (u = e -
|
|
21421
|
+
if (u = e - M, a = e - (M + u) + (u - r), u = n - S, h = n - (S + u) + (u - r),
|
|
21420
21422
|
u = t - P, l = t - (P + u) + (u - s), u = i - I, c = i - (I + u) + (u - s), 0 === a && 0 === l && 0 === h && 0 === c) return C;
|
|
21421
|
-
if (k = Gc * o + Nc * Math.abs(C), C +=
|
|
21423
|
+
if (k = Gc * o + Nc * Math.abs(C), C += M * c + I * a - (P * h + S * l), C >= k || -C >= k) return C;
|
|
21422
21424
|
v = a * I, f = Hc * a, d = f - (f - a), p = a - d, f = Hc * I, g = f - (f - I),
|
|
21423
|
-
m = I - g, b = p * m - (v - d * g - p * g - d * m), A = l *
|
|
21424
|
-
p = l - d, f = Hc *
|
|
21425
|
+
m = I - g, b = p * m - (v - d * g - p * g - d * m), A = l * S, f = Hc * l, d = f - (f - l),
|
|
21426
|
+
p = l - d, f = Hc * S, g = f - (f - S), m = S - g, T = p * m - (A - d * g - p * g - d * m),
|
|
21425
21427
|
y = b - T, u = b - y, Zc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
|
|
21426
21428
|
y = _ - A, u = _ - y, Zc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Zc[2] = x - (w - u) + (y - u),
|
|
21427
21429
|
Zc[3] = w;
|
|
21428
21430
|
const O = zc(4, jc, 4, Zc, Wc);
|
|
21429
|
-
v =
|
|
21431
|
+
v = M * c, f = Hc * M, d = f - (f - M), p = M - d, f = Hc * c, g = f - (f - c),
|
|
21430
21432
|
m = c - g, b = p * m - (v - d * g - p * g - d * m), A = P * h, f = Hc * P, d = f - (f - P),
|
|
21431
21433
|
p = P - d, f = Hc * h, g = f - (f - h), m = h - g, T = p * m - (A - d * g - p * g - d * m),
|
|
21432
21434
|
y = b - T, u = b - y, Zc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
|
|
@@ -21575,13 +21577,13 @@
|
|
|
21575
21577
|
return (s = e[0] - i) * s + (o = e[1] - r) * o;
|
|
21576
21578
|
}
|
|
21577
21579
|
function au(e, t, n, i, r, s, o, a) {
|
|
21578
|
-
var l, h, c, u, f = n - e, d = i - t, p = o - r, g = a - s, m = e - r, y = t - s, x = f * f + d * d, _ = f * p + d * g, v = p * p + g * g, b = f * m + d * y, A = p * m + g * y, T = x * v - _ * _, w = T,
|
|
21579
|
-
0 === T ? (h = 0, w = 1, u = A,
|
|
21580
|
-
u = A,
|
|
21581
|
-
w = x)) : u >
|
|
21580
|
+
var l, h, c, u, f = n - e, d = i - t, p = o - r, g = a - s, m = e - r, y = t - s, x = f * f + d * d, _ = f * p + d * g, v = p * p + g * g, b = f * m + d * y, A = p * m + g * y, T = x * v - _ * _, w = T, M = T;
|
|
21581
|
+
0 === T ? (h = 0, w = 1, u = A, M = v) : (u = x * A - _ * b, (h = _ * A - v * b) < 0 ? (h = 0,
|
|
21582
|
+
u = A, M = v) : h > w && (h = w, u = A + _, M = v)), u < 0 ? (u = 0, -b < 0 ? h = 0 : -b > x ? h = w : (h = -b,
|
|
21583
|
+
w = x)) : u > M && (u = M, -b + _ < 0 ? h = 0 : -b + _ > x ? h = w : (h = -b + _,
|
|
21582
21584
|
w = x));
|
|
21583
|
-
var
|
|
21584
|
-
return
|
|
21585
|
+
var S = (1 - (c = 0 === u ? 0 : u / M)) * r + c * o - ((1 - (l = 0 === h ? 0 : h / w)) * e + l * n), P = (1 - c) * s + c * a - ((1 - l) * t + l * i);
|
|
21586
|
+
return S * S + P * P;
|
|
21585
21587
|
}
|
|
21586
21588
|
function lu(e, t) {
|
|
21587
21589
|
return e[0] === t[0] ? e[1] - t[1] : e[0] - t[0];
|
|
@@ -21696,7 +21698,7 @@
|
|
|
21696
21698
|
const {DEFAULT_TEX_WIDTH: gu} = h();
|
|
21697
21699
|
class mu extends ln {
|
|
21698
21700
|
static fromJSON(e) {
|
|
21699
|
-
return
|
|
21701
|
+
return Ml(e, "ExtrudePolygonLayer", mu);
|
|
21700
21702
|
}
|
|
21701
21703
|
getPolygonOffsetCount() {
|
|
21702
21704
|
return 0;
|
|
@@ -21917,9 +21919,9 @@
|
|
|
21917
21919
|
e.LinePainter = $i, e.LinePlugin = Na, e.LineStringLayer = Il, e.LitPlugin = Wa,
|
|
21918
21920
|
e.MapboxVectorTileLayer = Ja, e.NativeLinePainter = jo, e.NativeLinePlugin = Ba,
|
|
21919
21921
|
e.NativePointPainter = Uo, e.PackUtil = vu, e.PhongPainter = ra, e.PhongPlugin = Ga,
|
|
21920
|
-
e.PointLayer =
|
|
21922
|
+
e.PointLayer = Sl, e.PolygonLayer = Ol, e.SYMBOLS_NEED_REBUILD_IN_VECTOR = Tu, e.SYMBOLS_NEED_REBUILD_IN_VT = Au,
|
|
21921
21923
|
e.TextPainter = Lo, e.TextPlugin = Ua, e.TubePlugin = Xa, e.Vector3DLayer = ln,
|
|
21922
21924
|
e.VectorTileLayer = en, e.VectorTileLayerRenderer = Ut, e.WaterPlugin = $a, e.WireframePainter = oa,
|
|
21923
|
-
e.WireframePlugin = ja, "undefined" != typeof console && console.log("@maptalks/vt v0.105.
|
|
21925
|
+
e.WireframePlugin = ja, "undefined" != typeof console && console.log("@maptalks/vt v0.105.2");
|
|
21924
21926
|
}));
|
|
21925
21927
|
//# sourceMappingURL=maptalks.vt.js.map
|