@maptalks/vt 0.105.1 → 0.105.3
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 +215 -205
- package/dist/maptalks.vt.es.js.map +1 -1
- package/dist/maptalks.vt.js +287 -277
- 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.3
|
|
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]));
|
|
@@ -6295,12 +6295,16 @@
|
|
|
6295
6295
|
name: "aMarkerDy"
|
|
6296
6296
|
}), o;
|
|
6297
6297
|
}
|
|
6298
|
+
_prepareFnTypes() {
|
|
6299
|
+
this.iconAtlas || (this._fnTypes.markerWidthFn = this._fnTypes.markerHeightFn = this._fnTypes.markerDxFn = this._fnTypes.markerDyFn = this._fnTypes.markerPitchAlignmentFn = this._fnTypes.markerRotationAlignmentFn = this._fnTypes.markerRotationFn = this._fnTypes.markerAllowOverlapFn = this._fnTypes.markerIgnorePlacementFn = this._fnTypes.markerOpacityFn = null),
|
|
6300
|
+
this.glyphAtlas || (this._fnTypes.textFillFn = this._fnTypes.textSizeFn = this._fnTypes.textHaloFillFn = this._fnTypes.textHaloRadiusFn = this._fnTypes.textHaloOpacityFn = this._fnTypes.textDxFn = this._fnTypes.textDyFn = this._fnTypes.textPitchAlignmentFn = this._fnTypes.textRotationAlignmentFn = this._fnTypes.textRotationFn = this._fnTypes.textAllowOverlapFn = this._fnTypes.textIgnorePlacementFn = this._fnTypes.textOpacityFn = null);
|
|
6301
|
+
}
|
|
6298
6302
|
createDataPack() {
|
|
6299
6303
|
if (!this.iconAtlas && !this.glyphAtlas) {
|
|
6300
6304
|
if (!this.options.allowEmptyPack) return null;
|
|
6301
6305
|
this.empty = !0;
|
|
6302
6306
|
}
|
|
6303
|
-
this.countOutOfAngle = 0, this.lineVertex = [];
|
|
6307
|
+
this._prepareFnTypes(), this.countOutOfAngle = 0, this.lineVertex = [];
|
|
6304
6308
|
const e = super.createDataPack.apply(this, arguments);
|
|
6305
6309
|
return e ? (e.lineVertex = new Int16Array(this.lineVertex), e.buffers.push(e.lineVertex.buffer),
|
|
6306
6310
|
e) : null;
|
|
@@ -6348,7 +6352,7 @@
|
|
|
6348
6352
|
}
|
|
6349
6353
|
return r;
|
|
6350
6354
|
}(r.horizontal, p, this.glyphAtlas.positions[t]), x && ($ = x(null, d), ie($) ? this.dynamicAttrs.aTextFill = 1 : $ = ht([], $)),
|
|
6351
|
-
_ && (J = _(this.options.zoom, d),
|
|
6355
|
+
_ && (J = _(this.options.zoom, d), S(J) && (J = 14)), v && (K = v(null, d), ie(K) ? this.dynamicAttrs.aTextHaloFill = 1 : K = ht([], K)),
|
|
6352
6356
|
b && (Q = b(null, d)), A && (ee = 255 * A(null, d)), T && (te = T(null, d) || 0),
|
|
6353
6357
|
I && (ne = I(null, d) || 0), C && (he = +("map" === C(null, d))), k && (ue = +("map" === k(null, d))),
|
|
6354
6358
|
O && (de = P(O(null, d), 0, 360) * Math.PI / 180);
|
|
@@ -6386,8 +6390,8 @@
|
|
|
6386
6390
|
writingMode: void 0,
|
|
6387
6391
|
glyphOffset: [ 0, 0 ]
|
|
6388
6392
|
} ];
|
|
6389
|
-
}(), D && (re = D(null, d)),
|
|
6390
|
-
|
|
6393
|
+
}(), D && (re = D(null, d)), S(re) && (re = Z[0].tex.w), L && (se = L(null, d)),
|
|
6394
|
+
S(se) && (se = Z[0].tex.h), H && (oe = H(null, d)), N && (ae = N(null, d)), z && (le = +("map" === z(null, d))),
|
|
6391
6395
|
V && (ce = +("map" === V(null, d))), U && (fe = P(U(null, d), 0, 360) * Math.PI / 180)),
|
|
6392
6396
|
ie(J) && (this.dynamicAttrs.aTextSize = 1), (ie(Q) || ie(ee)) && (this.dynamicAttrs.aTextHalo = 1),
|
|
6393
6397
|
ie(re) && (this.dynamicAttrs.aMarkerWidth = 1), ie(se) && (this.dynamicAttrs.aMarkerHeight = 1),
|
|
@@ -6400,11 +6404,12 @@
|
|
|
6400
6404
|
E && (pe = 255 * (E(this.options.zoom, d) || 0));
|
|
6401
6405
|
const ge = Y && Y.length || 0;
|
|
6402
6406
|
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) => {
|
|
6407
|
+
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
6408
|
if (!t) return;
|
|
6405
6409
|
const a = e ? ge : 1;
|
|
6406
6410
|
for (let l = 0; l < t.length; l++) {
|
|
6407
6411
|
const c = t[l], {tl: f, tr: d, bl: g, br: m, tex: x} = c;
|
|
6412
|
+
let _;
|
|
6408
6413
|
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
6414
|
this._fillFnTypeData(h, $, J, K, Q, ee, te, ne, re, se, oe, ae, q, pe, le, he, ce, ue, fe, de, W, X),
|
|
6410
6415
|
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 +6418,16 @@
|
|
|
6413
6418
|
this._fillFnTypeData(h, $, J, K, Q, ee, te, ne, re, se, oe, ae, q, pe, le, he, ce, ue, fe, de, W, X),
|
|
6414
6419
|
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
6420
|
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
|
-
|
|
6421
|
+
this.addElements(u, u + 1, u + 2), this.addElements(u + 1, u + 2, u + 3), u += 4,
|
|
6422
|
+
_ = be ? Math.max(Math.abs(n), Math.abs(i)) : Math.max(Math.abs(n), Math.abs(i), Math.abs(r)),
|
|
6418
6423
|
_ > this.maxPos && (this.maxPos = _);
|
|
6419
6424
|
}
|
|
6420
|
-
},
|
|
6425
|
+
}, Te = "text" === this.options.pluginType;
|
|
6421
6426
|
for (let e = 0; e < l.length; e++) {
|
|
6422
6427
|
const t = l[e], n = t.z || ve || 0;
|
|
6423
|
-
if (me !== 1 / 0 &&
|
|
6428
|
+
if (me !== 1 / 0 && M(t, me)) continue;
|
|
6424
6429
|
const i = t.x, r = t.y;
|
|
6425
|
-
m &&
|
|
6430
|
+
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
6431
|
}
|
|
6427
6432
|
}
|
|
6428
6433
|
_fillPos(e, t, n, i, r, s, o, a, l, h) {
|
|
@@ -6446,7 +6451,7 @@
|
|
|
6446
6451
|
}
|
|
6447
6452
|
}
|
|
6448
6453
|
_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:
|
|
6454
|
+
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
6455
|
if (A) {
|
|
6451
6456
|
let n = e.aTextFill.currentIndex;
|
|
6452
6457
|
e.aTextFill[n++] = t[0], e.aTextFill[n++] = t[1], e.aTextFill[n++] = t[2], e.aTextFill[n++] = t[3],
|
|
@@ -6461,10 +6466,10 @@
|
|
|
6461
6466
|
e.aTextHaloFill[t++] = i[0], e.aTextHaloFill[t++] = i[1], e.aTextHaloFill[t++] = i[2],
|
|
6462
6467
|
e.aTextHaloFill[t++] = i[3], e.aTextHaloFill.currentIndex = t;
|
|
6463
6468
|
}
|
|
6464
|
-
if (
|
|
6469
|
+
if (M || D) {
|
|
6465
6470
|
let t = e.aTextHalo.currentIndex;
|
|
6466
6471
|
e.aTextHalo[t++] = r || 0, e.aTextHalo.currentIndex = t, t = e.aTextHalo.currentIndex,
|
|
6467
|
-
e.aTextHalo[t++] = 255 * (
|
|
6472
|
+
e.aTextHalo[t++] = 255 * (S(s) ? 1 : s), e.aTextHalo.currentIndex = t;
|
|
6468
6473
|
}
|
|
6469
6474
|
if (P) {
|
|
6470
6475
|
let t = e.aTextDx.currentIndex;
|
|
@@ -6536,7 +6541,7 @@
|
|
|
6536
6541
|
_getAnchors(e, t, n) {
|
|
6537
6542
|
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
6543
|
let u = h ? h(this.options.zoom, o) : r.textMaxAngle;
|
|
6539
|
-
|
|
6544
|
+
S(u) && (u = 80), u *= Math.PI / 180;
|
|
6540
6545
|
const f = this.options.EXTENT, d = this.options.altitudeToTileScale, p = this._is3DPitchText();
|
|
6541
6546
|
return mo(e, this.lineVertex, u, t, n, f, s, c, p, d);
|
|
6542
6547
|
}
|
|
@@ -6662,8 +6667,8 @@
|
|
|
6662
6667
|
return Math.atan2(this.y - e.y, this.x - e.x);
|
|
6663
6668
|
}
|
|
6664
6669
|
}
|
|
6665
|
-
var wo,
|
|
6666
|
-
function
|
|
6670
|
+
var wo, Mo = "undefined" != typeof Float32Array ? Float32Array : Array;
|
|
6671
|
+
function So(e, t, n, i) {
|
|
6667
6672
|
return e[0] = t, e[1] = n, e[2] = i, e;
|
|
6668
6673
|
}
|
|
6669
6674
|
function Po(e, t) {
|
|
@@ -6687,13 +6692,13 @@
|
|
|
6687
6692
|
Math.hypot || (Math.hypot = function() {
|
|
6688
6693
|
for (var e = 0, t = arguments.length; t--; ) e += arguments[t] * arguments[t];
|
|
6689
6694
|
return Math.sqrt(e);
|
|
6690
|
-
}), wo = new
|
|
6691
|
-
var e = new
|
|
6692
|
-
|
|
6695
|
+
}), wo = new Mo(3), Mo != Float32Array && (wo[0] = 0, wo[1] = 0, wo[2] = 0), function() {
|
|
6696
|
+
var e = new Mo(4);
|
|
6697
|
+
Mo != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0, e[3] = 0);
|
|
6693
6698
|
}();
|
|
6694
6699
|
!function() {
|
|
6695
|
-
var e = new
|
|
6696
|
-
|
|
6700
|
+
var e = new Mo(2);
|
|
6701
|
+
Mo != Float32Array && (e[0] = 0, e[1] = 0);
|
|
6697
6702
|
}();
|
|
6698
6703
|
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
6704
|
class No extends gs {
|
|
@@ -6901,22 +6906,22 @@
|
|
|
6901
6906
|
t.z = p.z, this.updateDistance(g, t), this.addCurrentVertex(t, y, 0, 0, d), g = t;
|
|
6902
6907
|
}
|
|
6903
6908
|
}
|
|
6904
|
-
const
|
|
6905
|
-
d.middleVertex =
|
|
6906
|
-
let
|
|
6907
|
-
if (
|
|
6908
|
-
"bevel" ===
|
|
6909
|
-
"miter" ===
|
|
6909
|
+
const M = g && m;
|
|
6910
|
+
d.middleVertex = M;
|
|
6911
|
+
let S = M ? n : h ? "butt" : i;
|
|
6912
|
+
if (M && "round" === S && (b < s ? S = "miter" : b <= 2 && (S = "fakeround")), "miter" === S && b > r && !a && (S = "bevel"),
|
|
6913
|
+
"bevel" === S && (b > 2 && (S = "flipbevel"), b < r && (S = "miter")), g && this.updateDistance(g, p),
|
|
6914
|
+
"miter" === S) a ? (this.addCurrentVertex(p, y, 0, 0, d), d.dir = m.sub(p)._unit(),
|
|
6910
6915
|
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" ===
|
|
6916
|
+
o && (d.currentNormal = x, d.dir = m.sub(p)._unit(), this.addCurrentVertex(p, l, 0, 0, d))); else if ("flipbevel" === S) {
|
|
6912
6917
|
if (b > 100) l = x.mult(-1); else {
|
|
6913
6918
|
const e = b * y.add(x).mag() / y.sub(x).mag();
|
|
6914
6919
|
l._perp()._mult(e * (w ? -1 : 1));
|
|
6915
6920
|
}
|
|
6916
6921
|
this.addCurrentVertex(p, l, 0, 0, d), this.addCurrentVertex(p, l.mult(-1), 0, 0, d);
|
|
6917
|
-
} else if ("bevel" ===
|
|
6922
|
+
} else if ("bevel" === S || "fakeround" === S) {
|
|
6918
6923
|
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" ===
|
|
6924
|
+
if (g && this.addCurrentVertex(p, y, t, n, d), "fakeround" === S) {
|
|
6920
6925
|
const e = Math.round(180 * A / Math.PI / 20);
|
|
6921
6926
|
for (let t = 1; t < e; t++) {
|
|
6922
6927
|
let n = t / e;
|
|
@@ -6929,10 +6934,10 @@
|
|
|
6929
6934
|
}
|
|
6930
6935
|
}
|
|
6931
6936
|
m && (d.currentNormal = x, d.dir = m.sub(p)._unit(), this.addCurrentVertex(p, x, -t, -n, d));
|
|
6932
|
-
} else if ("butt" ===
|
|
6937
|
+
} else if ("butt" === S) this.addCurrentVertex(p, l, 0, 0, d); else if ("square" === S) {
|
|
6933
6938
|
const e = g ? 1 : -1;
|
|
6934
6939
|
this.addCurrentVertex(p, l, e, e, d);
|
|
6935
|
-
} else "round" ===
|
|
6940
|
+
} else "round" === S && (g && (this.addCurrentVertex(p, y, 0, 0, d), this.addCurrentVertex(p, y, 1, 1, d, !0)),
|
|
6936
6941
|
m && (this.addCurrentVertex(p, x, -1, -1, d, !0), this.addCurrentVertex(p, x, 0, 0, d)));
|
|
6937
6942
|
if (!a && T && t < c - 1) {
|
|
6938
6943
|
const e = p.dist(m);
|
|
@@ -7310,13 +7315,13 @@
|
|
|
7310
7315
|
return e.x === t.x && e.y === t.y;
|
|
7311
7316
|
}
|
|
7312
7317
|
function wa(e, t, n, i) {
|
|
7313
|
-
const r =
|
|
7314
|
-
return r !== s && o !== a || !(0 !== r || !
|
|
7318
|
+
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));
|
|
7319
|
+
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
7320
|
}
|
|
7316
|
-
function
|
|
7321
|
+
function Ma(e, t, n) {
|
|
7317
7322
|
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
7323
|
}
|
|
7319
|
-
function
|
|
7324
|
+
function Sa(e) {
|
|
7320
7325
|
return e > 0 ? 1 : e < 0 ? -1 : 0;
|
|
7321
7326
|
}
|
|
7322
7327
|
function Pa(e, t) {
|
|
@@ -7435,7 +7440,7 @@
|
|
|
7435
7440
|
}
|
|
7436
7441
|
addHalfVertex(e, t, n, i, r, s, o, a) {
|
|
7437
7442
|
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
|
-
|
|
7443
|
+
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
7444
|
const l = ja[t];
|
|
7440
7445
|
for (var h = 0; h < t; h++) {
|
|
7441
7446
|
const e = Math.PI * h / t, n = 0, i = 1 - Math.abs(e - n) / (Math.PI / 2);
|
|
@@ -7492,7 +7497,7 @@
|
|
|
7492
7497
|
}
|
|
7493
7498
|
const Xa = [], Ya = [], Za = [], qa = [], $a = [];
|
|
7494
7499
|
function Ja(e, t, n, i, r, s, o, a) {
|
|
7495
|
-
|
|
7500
|
+
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
7501
|
const l = function(e) {
|
|
7497
7502
|
var t = e[0], n = e[1];
|
|
7498
7503
|
return Math.hypot(t, n);
|
|
@@ -8070,7 +8075,7 @@
|
|
|
8070
8075
|
let i;
|
|
8071
8076
|
n && (i = n(this.options.zoom, t) || [ 255, 255, 255, 255 ], ie(i) ? (this.dynamicAttrs.aColor = 1,
|
|
8072
8077
|
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);
|
|
8078
|
+
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
8079
|
for (let e = 0; e < l.length; e++) {
|
|
8075
8080
|
const t = l[e];
|
|
8076
8081
|
if (this.fillPosition(this.data, t.x, t.y, t.z), a) {
|
|
@@ -8083,7 +8088,8 @@
|
|
|
8083
8088
|
r.aColor[e++] = i[0], r.aColor[e++] = i[1], r.aColor[e++] = i[2], r.aColor[e++] = i[3],
|
|
8084
8089
|
r.aColor.currentIndex = e;
|
|
8085
8090
|
}
|
|
8086
|
-
|
|
8091
|
+
let n;
|
|
8092
|
+
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 || 0)),
|
|
8087
8093
|
n > this.maxPos && (this.maxPos = n);
|
|
8088
8094
|
}
|
|
8089
8095
|
}
|
|
@@ -8430,7 +8436,7 @@
|
|
|
8430
8436
|
function w(e, t, n) {
|
|
8431
8437
|
return Math.min(Math.max(t, e), n);
|
|
8432
8438
|
}
|
|
8433
|
-
function
|
|
8439
|
+
function M(e) {
|
|
8434
8440
|
var t = Math.round(e).toString(16).toUpperCase();
|
|
8435
8441
|
return t.length < 2 ? "0" + t : t;
|
|
8436
8442
|
}
|
|
@@ -8493,7 +8499,7 @@
|
|
|
8493
8499
|
return null;
|
|
8494
8500
|
}, T.to.hex = function() {
|
|
8495
8501
|
var e = _(arguments);
|
|
8496
|
-
return "#" +
|
|
8502
|
+
return "#" + M(e[0]) + M(e[1]) + M(e[2]) + (e[3] < 1 ? M(Math.round(255 * e[3])) : "");
|
|
8497
8503
|
}, T.to.rgb = function() {
|
|
8498
8504
|
var e = _(arguments);
|
|
8499
8505
|
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 +8515,7 @@
|
|
|
8509
8515
|
}, T.to.keyword = function(e) {
|
|
8510
8516
|
return b[e.slice(0, 3)];
|
|
8511
8517
|
};
|
|
8512
|
-
var
|
|
8518
|
+
var S = u.exports, P = {
|
|
8513
8519
|
exports: {}
|
|
8514
8520
|
}, I = {
|
|
8515
8521
|
aliceblue: [ 240, 248, 255 ],
|
|
@@ -9025,7 +9031,7 @@
|
|
|
9025
9031
|
}(i);
|
|
9026
9032
|
}));
|
|
9027
9033
|
}));
|
|
9028
|
-
var G =
|
|
9034
|
+
var G = S, j = B, W = [].slice, X = [ "keyword", "gray", "hex" ], Y = {};
|
|
9029
9035
|
Object.keys(j).forEach((function(e) {
|
|
9030
9036
|
Y[W.call(j[e].labels).sort().join("")] = e;
|
|
9031
9037
|
}));
|
|
@@ -9466,10 +9472,10 @@
|
|
|
9466
9472
|
function we(e) {
|
|
9467
9473
|
return e && "object" == typeof e && (e.stops || e.property && "identity" === e.type || e.expression && "calculate-expression" === e.type);
|
|
9468
9474
|
}
|
|
9469
|
-
function
|
|
9475
|
+
function Me(e) {
|
|
9470
9476
|
return Ie(e, "exponential");
|
|
9471
9477
|
}
|
|
9472
|
-
function
|
|
9478
|
+
function Se(e) {
|
|
9473
9479
|
return Ie(e, "interval");
|
|
9474
9480
|
}
|
|
9475
9481
|
function Pe(e, t) {
|
|
@@ -9487,7 +9493,7 @@
|
|
|
9487
9493
|
const l = function(e) {
|
|
9488
9494
|
Object.defineProperty(o, e, {
|
|
9489
9495
|
get: function() {
|
|
9490
|
-
return this["__fn_" + e] || (this["__fn_" + e] =
|
|
9496
|
+
return this["__fn_" + e] || (this["__fn_" + e] = Me(this["_" + e])), this["__fn_" + e].apply(this, t());
|
|
9491
9497
|
},
|
|
9492
9498
|
set: function(t) {
|
|
9493
9499
|
this["_" + e] = t;
|
|
@@ -10246,9 +10252,9 @@
|
|
|
10246
10252
|
return 3 === e.length && (At[3] = 255), At;
|
|
10247
10253
|
}
|
|
10248
10254
|
function wt(e, t = 4) {
|
|
10249
|
-
return
|
|
10255
|
+
return Mt.bind(this, e, t);
|
|
10250
10256
|
}
|
|
10251
|
-
function
|
|
10257
|
+
function Mt(e, t, n) {
|
|
10252
10258
|
if (Array.isArray(n)) return 3 === n.length && 4 === t && n.push(1), n;
|
|
10253
10259
|
if (e && e[n]) return e[n];
|
|
10254
10260
|
if (void 0 !== n.r && void 0 !== n.g && void 0 !== n.b && void 0 !== n.a) {
|
|
@@ -10257,7 +10263,7 @@
|
|
|
10257
10263
|
const i = Q(n).unitArray();
|
|
10258
10264
|
return 3 === i.length && 4 === t && i.push(1), e && (e[n] = i), i;
|
|
10259
10265
|
}
|
|
10260
|
-
function
|
|
10266
|
+
function St(e, t, n, i) {
|
|
10261
10267
|
if (e.fill) e.fill(t, n, i); else for (let r = n; r < i; r++) e[r] = t;
|
|
10262
10268
|
}
|
|
10263
10269
|
function Pt(e) {
|
|
@@ -12371,7 +12377,7 @@
|
|
|
12371
12377
|
if (!e) return "true";
|
|
12372
12378
|
const t = e[0];
|
|
12373
12379
|
if (e.length <= 1) return "any" === t ? "false" : "true";
|
|
12374
|
-
return `(${"==" === t ?
|
|
12380
|
+
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
12381
|
const i = wn(e);
|
|
12376
12382
|
return void 0 !== n ? `(${i} + '').indexOf("${t}") === ${n}` : `(${i} + '').indexOf("${t}") >= 0`;
|
|
12377
12383
|
}(e[1], e[2], e[3]) : "true"})`;
|
|
@@ -12379,17 +12385,17 @@
|
|
|
12379
12385
|
function wn(e) {
|
|
12380
12386
|
return "$" === e[0] ? "f." + e.substring(1) : "p[" + JSON.stringify(e) + "]";
|
|
12381
12387
|
}
|
|
12382
|
-
function
|
|
12388
|
+
function Mn(e, t, n, i) {
|
|
12383
12389
|
if ("object" == typeof (r = e) && r && e.op) return function(e, t, n, i) {
|
|
12384
12390
|
const r = e.property, s = e.op;
|
|
12385
12391
|
let o = wn(r);
|
|
12386
12392
|
return "length" !== s ? (console.error(`not support ${s} op`), "false") : (o = `((${o}+='').length)`,
|
|
12387
|
-
|
|
12393
|
+
Sn(o, r, t, n, i));
|
|
12388
12394
|
}(e, t, n, i);
|
|
12389
12395
|
var r;
|
|
12390
|
-
return
|
|
12396
|
+
return Sn(wn(e), e, t, n, i);
|
|
12391
12397
|
}
|
|
12392
|
-
function
|
|
12398
|
+
function Sn(e, t, n, i, r) {
|
|
12393
12399
|
const s = "$type" === t ? An.indexOf(n) : JSON.stringify(n);
|
|
12394
12400
|
return (r ? `typeof ${e}=== typeof ${s}&&` : "") + e + i + s;
|
|
12395
12401
|
}
|
|
@@ -12781,7 +12787,11 @@
|
|
|
12781
12787
|
for (let n = 0; n < e.length; n++) if (ti(t[e[n]])) return !0;
|
|
12782
12788
|
return !1;
|
|
12783
12789
|
}(a, t) ? (ti(t[o]) && Xn(e, t, n), l) : (void 0 === n.index && (e.deleteData(s),
|
|
12784
|
-
Yn(e, s)), null) : ti(t[o])
|
|
12790
|
+
Yn(e, s)), null) : ti(t[o]) && function(e, t) {
|
|
12791
|
+
if (e.startsWith("marker") && !t.properties.iconAtlas) return !1;
|
|
12792
|
+
if (e.startsWith("text") && !t.properties.glyphAtlas) return !1;
|
|
12793
|
+
return !0;
|
|
12794
|
+
}(o, e) ? (l = e.data[s] = new n.type(n.width * r.length), function(e, t, n, i, r) {
|
|
12785
12795
|
const {attrName: s} = i, o = (Bn + s + "Index").trim();
|
|
12786
12796
|
Xn(t, n, i);
|
|
12787
12797
|
const a = t.properties[o];
|
|
@@ -12794,7 +12804,7 @@
|
|
|
12794
12804
|
const l = function(e) {
|
|
12795
12805
|
if (!e) return Jn;
|
|
12796
12806
|
const t = [];
|
|
12797
|
-
for (let n = 0; n < e.length; n++) we(e[n][1]) && !
|
|
12807
|
+
for (let n = 0; n < e.length; n++) we(e[n][1]) && !Me(e[n][1]).isZoomConstant && t.push(e[n][0]);
|
|
12798
12808
|
return t;
|
|
12799
12809
|
}(t[r].stops), h = "identity" === t[r].type && Un.checkIfIdentityZoomDependent(r, t[r].property, s.features);
|
|
12800
12810
|
if (!h && !l.length) return void (void 0 === n.index && Yn(e, i));
|
|
@@ -12829,7 +12839,7 @@
|
|
|
12829
12839
|
Kn(o, i, l, t);
|
|
12830
12840
|
continue;
|
|
12831
12841
|
}
|
|
12832
|
-
const c = Wn(o, n, l), u = l.define;
|
|
12842
|
+
const c = Wn(o, n, l, t), u = l.define;
|
|
12833
12843
|
if (c) {
|
|
12834
12844
|
const n = (Bn + h + "Index").trim();
|
|
12835
12845
|
if (Kn(o, o.properties[n], l, t), t._getFeatureStateStamp && (o._featureTimestamp = t._getFeatureStateStamp()),
|
|
@@ -12906,7 +12916,7 @@
|
|
|
12906
12916
|
e.dirty = !0;
|
|
12907
12917
|
}
|
|
12908
12918
|
} 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 && (
|
|
12919
|
+
e.dirty = !0); else e[i] !== c && (St(e, c, i, r), e.dirty = !0);
|
|
12910
12920
|
}
|
|
12911
12921
|
function ti(e) {
|
|
12912
12922
|
return Un.isFnTypeSymbol(e);
|
|
@@ -13051,7 +13061,7 @@
|
|
|
13051
13061
|
const r = ui.set(t, n)._multi(i / e.res);
|
|
13052
13062
|
return e.extent2d.contains(r);
|
|
13053
13063
|
}
|
|
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),
|
|
13064
|
+
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
13065
|
class Ci {
|
|
13056
13066
|
static getBloomSymbol() {
|
|
13057
13067
|
return [ "bloom" ];
|
|
@@ -13080,7 +13090,7 @@
|
|
|
13080
13090
|
return n.getTileLevelValue && n.getTileLevelValue(e, t) || 0;
|
|
13081
13091
|
}
|
|
13082
13092
|
getAnalysisMeshes() {
|
|
13083
|
-
return this.getShadowMeshes ? this.getShadowMeshes() :
|
|
13093
|
+
return this.getShadowMeshes ? this.getShadowMeshes() : Si;
|
|
13084
13094
|
}
|
|
13085
13095
|
isVisible() {
|
|
13086
13096
|
const {minZoom: e, maxZoom: t} = this.sceneConfig, n = this.getMap().getZoom();
|
|
@@ -13144,7 +13154,7 @@
|
|
|
13144
13154
|
if (n) for (const i in n) n[i] && t[i].renderUniforms && mt(e, t[i].renderUniforms);
|
|
13145
13155
|
}
|
|
13146
13156
|
createGeometries(e, t) {
|
|
13147
|
-
if (!e.length) return
|
|
13157
|
+
if (!e.length) return Si;
|
|
13148
13158
|
const n = [];
|
|
13149
13159
|
for (let i = 0; i < e.length; i++) if (e[i]) if (void 0 !== e[i].ref) n[e[i].ref] ? n.push({
|
|
13150
13160
|
geometry: n[e[i].ref].geometry,
|
|
@@ -13424,7 +13434,7 @@
|
|
|
13424
13434
|
enumerable: !0
|
|
13425
13435
|
}) : r[e] = a[e];
|
|
13426
13436
|
}
|
|
13427
|
-
return we(n.visible) && (this._visibleFn[e] =
|
|
13437
|
+
return we(n.visible) && (this._visibleFn[e] = Me(n.visible)), i;
|
|
13428
13438
|
}
|
|
13429
13439
|
getSymbolDef(e) {
|
|
13430
13440
|
return this.symbolDef[e.index];
|
|
@@ -13440,7 +13450,7 @@
|
|
|
13440
13450
|
const e = this.getMap(), t = [], n = () => (t[0] = e.getZoom(), t);
|
|
13441
13451
|
this._symbol = [], this._visibleFn = [];
|
|
13442
13452
|
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] =
|
|
13453
|
+
this.symbolDef[e] && we(this.symbolDef[e].visible) && (this._visibleFn[e] = Me(this.symbolDef[e].visible));
|
|
13444
13454
|
}
|
|
13445
13455
|
getFnTypeConfig(e) {
|
|
13446
13456
|
this._fnTypeConfigs || (this._fnTypeConfigs = []);
|
|
@@ -13615,7 +13625,7 @@
|
|
|
13615
13625
|
return t;
|
|
13616
13626
|
}(JSON.stringify(e));
|
|
13617
13627
|
let a = s[o];
|
|
13618
|
-
return a || (a = s[o] = r ?
|
|
13628
|
+
return a || (a = s[o] = r ? Se(e) : Me(e)), a(n.getZoom(), i);
|
|
13619
13629
|
}
|
|
13620
13630
|
highlight(e) {
|
|
13621
13631
|
this._highlighted = e, this._highlightTimestamp = this.layer.getRenderer().getFrameTimestamp(),
|
|
@@ -13695,25 +13705,25 @@
|
|
|
13695
13705
|
}
|
|
13696
13706
|
const v = performance.now();
|
|
13697
13707
|
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
|
-
|
|
13708
|
+
const {xmin: b, ymax: A} = l, T = Ti.set(b, A), w = this.layer.getTileSize().width / n.extent, M = t.length / e.length;
|
|
13709
|
+
let S = e.queryResult;
|
|
13710
|
+
S || (S = e.queryResult = new Map);
|
|
13701
13711
|
let P = !0;
|
|
13702
13712
|
for (let n = i; n <= s; n++) {
|
|
13703
|
-
let i = t[n *
|
|
13713
|
+
let i = t[n * M];
|
|
13704
13714
|
i < 0 ? i = 0 : i > a && (i = a);
|
|
13705
|
-
let r = t[n *
|
|
13715
|
+
let r = t[n * M + 1];
|
|
13706
13716
|
r < 0 ? r = 0 : r > a && (r = a);
|
|
13707
13717
|
const s = i + r * a;
|
|
13708
|
-
let l, h, c =
|
|
13718
|
+
let l, h, c = S.get(s);
|
|
13709
13719
|
if (c || 0 === c) e[n] !== c && (e[n] = c, e.dirty = !0); else {
|
|
13710
13720
|
for (let e = 0; e < m.length; e++) if (pi(m[e], b + w * i, A - w * r, o)) {
|
|
13711
13721
|
l = m[e];
|
|
13712
13722
|
break;
|
|
13713
13723
|
}
|
|
13714
13724
|
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] ?
|
|
13725
|
+
c = e[n], h && (c = null === h[0] ? at : h[0], Mi[0] = c, c = Mi[0]), e[n] !== c && (e[n] = c,
|
|
13726
|
+
e.dirty = !0), h && h[1] ? S.set(s, c) : P = !1;
|
|
13717
13727
|
}
|
|
13718
13728
|
}
|
|
13719
13729
|
_.altitudeQueryFrameTime = (_.altitudeQueryFrameTime || 0) + (performance.now() - v),
|
|
@@ -13923,9 +13933,9 @@
|
|
|
13923
13933
|
if (!(t = t && t.geometry)) return;
|
|
13924
13934
|
const s = t.properties.features;
|
|
13925
13935
|
if (Vn(s)) return;
|
|
13926
|
-
const o = e.polygonPatternFileWidth, a = e.polygonPatternFileHeight, l =
|
|
13936
|
+
const o = e.polygonPatternFileWidth, a = e.polygonPatternFileHeight, l = Me(e.polygonPatternFileOrigin);
|
|
13927
13937
|
let h, c;
|
|
13928
|
-
we(o) && (h =
|
|
13938
|
+
we(o) && (h = Me(o)), we(a) && (c = Me(a));
|
|
13929
13939
|
const {aPickingId: u, aPatternOrigin: f} = t.data, d = u.length, p = new Float32Array(2 * d);
|
|
13930
13940
|
let g, m, y;
|
|
13931
13941
|
for (let e = 0, t = u.length; e < t; e++) {
|
|
@@ -13953,8 +13963,8 @@
|
|
|
13953
13963
|
const r = t.properties.features;
|
|
13954
13964
|
if (Vn(r)) return;
|
|
13955
13965
|
const s = this.getMap();
|
|
13956
|
-
let o = we(e.uvOffsetInMeter) &&
|
|
13957
|
-
const a =
|
|
13966
|
+
let o = we(e.uvOffsetInMeter) && Se(e.uvOffsetInMeter);
|
|
13967
|
+
const a = Me(e.uvOffset), l = Me(e.polygonPatternFileOrigin), {aPickingId: h, aPatternOrigin: c} = t.data, u = h.length, f = new Float32Array(2 * u);
|
|
13958
13968
|
let d, p, g;
|
|
13959
13969
|
for (let e = 0, t = h.length; e < t; e++) {
|
|
13960
13970
|
if (h[e] === d) {
|
|
@@ -13979,7 +13989,7 @@
|
|
|
13979
13989
|
if (!(t = t && t.geometry)) return;
|
|
13980
13990
|
const r = t.properties.features;
|
|
13981
13991
|
if (Vn(r)) return;
|
|
13982
|
-
const s = this.getMap(), o =
|
|
13992
|
+
const s = this.getMap(), o = Me(e.polygonPatternFileOrigin), a = t.data.aPickingId, l = a.length, h = new Float32Array(2 * l);
|
|
13983
13993
|
let c, u, f;
|
|
13984
13994
|
for (let e = 0, t = a.length; e < t; e++) {
|
|
13985
13995
|
if (a[e] === c) {
|
|
@@ -13994,7 +14004,7 @@
|
|
|
13994
14004
|
t.data.aPatternOrigin = h;
|
|
13995
14005
|
}
|
|
13996
14006
|
createFnTypeConfig(e, t) {
|
|
13997
|
-
const n =
|
|
14007
|
+
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
14008
|
return [ {
|
|
13999
14009
|
attrName: "aColor",
|
|
14000
14010
|
symbolName: "polygonFill",
|
|
@@ -14250,7 +14260,7 @@
|
|
|
14250
14260
|
super.paint(e);
|
|
14251
14261
|
}
|
|
14252
14262
|
createFnTypeConfig(e, t) {
|
|
14253
|
-
const n =
|
|
14263
|
+
const n = Se(t.lineColor), i = Se(t.aLinePatternAnimSpeed), r = Se(t.aLinePatternGap), s = this.createShapeFnTypeConfigs(e, t), o = new Int8Array(2);
|
|
14254
14264
|
return [ {
|
|
14255
14265
|
attrName: "aColor",
|
|
14256
14266
|
symbolName: "lineColor",
|
|
@@ -14288,7 +14298,7 @@
|
|
|
14288
14298
|
} ].concat(s);
|
|
14289
14299
|
}
|
|
14290
14300
|
createShapeFnTypeConfigs(e, t) {
|
|
14291
|
-
const n =
|
|
14301
|
+
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
14302
|
return [ {
|
|
14293
14303
|
attrName: "aLineWidth",
|
|
14294
14304
|
symbolName: "lineWidth",
|
|
@@ -15505,14 +15515,14 @@
|
|
|
15505
15515
|
return e[0] = t[0] - n, e[1] = t[1] - n, e[2] = t[2] + n, e[3] = t[3] + n, e;
|
|
15506
15516
|
}
|
|
15507
15517
|
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 = [],
|
|
15518
|
+
const wr = [], Mr = [], Sr = [], Pr = [], Ir = [], Cr = [];
|
|
15509
15519
|
function kr(e, t, i, r, s, o, a, l, h, c, u, f, d, p) {
|
|
15510
15520
|
const {tileRatio: g, tileResolution: m} = h, y = g / (m / c.getResolution()) * (u / c.cameraToCenterDistance) * f;
|
|
15511
15521
|
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,
|
|
15522
|
+
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),
|
|
15523
|
+
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),
|
|
15524
|
+
n.vec3.add(wr, wr, t), n.vec3.add(Mr, Mr, t), n.vec3.add(Sr, Sr, t), n.vec3.add(Pr, Pr, t),
|
|
15525
|
+
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
15526
|
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
15527
|
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
15528
|
n.vec4.set(e, Ir[0] + l[0], Ir[1] + l[1], Cr[0] + l[0], Cr[1] + l[1]);
|
|
@@ -15541,7 +15551,7 @@
|
|
|
15541
15551
|
if (o.markerPerspectiveRatio) {
|
|
15542
15552
|
m = yt(.5 + .5 * (1 - (1 - a / g) * o.markerPerspectiveRatio), 0, 4);
|
|
15543
15553
|
}
|
|
15544
|
-
const {aShape: y, aMarkerDx: x, aMarkerDy: _, aMarkerWidth: v, aMarkerHeight: b, aPitchAlign: A, aRotationAlign: T, aRotation: w} = l,
|
|
15554
|
+
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
15555
|
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
15556
|
0 === o.flipY && 1 === P && (n.vec2.multiply(k, k, Xr), n.vec2.multiply(O, O, Xr),
|
|
15547
15557
|
n.vec2.multiply(F, F, Xr), n.vec2.multiply(R, R, Xr));
|
|
@@ -15573,13 +15583,13 @@
|
|
|
15573
15583
|
y = yt(.5 + .5 * (1 - (1 - u / m) * c.textPerspectiveRatio), 0, 4);
|
|
15574
15584
|
}
|
|
15575
15585
|
const {aTextDx: x, aTextDy: _, aPitchAlign: v, aRotationAlign: b, aRotation: A, aType: T, aDxDy: w} = r.geometry.properties;
|
|
15576
|
-
let
|
|
15577
|
-
w ? (
|
|
15586
|
+
let M, S, P;
|
|
15587
|
+
w ? (M = w[4 * a + 2], S = w[4 * a + 3]) : (M = x ? x[a] : d.textDx, S = _ ? _[a] : d.textDy),
|
|
15578
15588
|
v && (P = T ? v[2 * a + 1] : v[a]);
|
|
15579
15589
|
const I = v ? P : c.textPitchWithMap;
|
|
15580
15590
|
let C;
|
|
15581
15591
|
b && (C = T ? b[2 * a + 1] : b[a]);
|
|
15582
|
-
const k = b ? C : c.textRotateWithMap, O = n.vec2.set(ns,
|
|
15592
|
+
const k = b ? C : c.textRotateWithMap, O = n.vec2.set(ns, M || 0, -(S || 0));
|
|
15583
15593
|
if (p) {
|
|
15584
15594
|
const {aOffset: r, aShape: s} = f, o = r.length !== s.length;
|
|
15585
15595
|
let u, d, p, g;
|
|
@@ -15846,7 +15856,7 @@
|
|
|
15846
15856
|
};
|
|
15847
15857
|
}
|
|
15848
15858
|
function gs(e, t) {
|
|
15849
|
-
const n =
|
|
15859
|
+
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
15860
|
return [ {
|
|
15851
15861
|
attrName: "aTextFill",
|
|
15852
15862
|
symbolName: "textFill",
|
|
@@ -16027,7 +16037,7 @@
|
|
|
16027
16037
|
}(e, t, i) : null;
|
|
16028
16038
|
}
|
|
16029
16039
|
const As = [], Ts = [];
|
|
16030
|
-
const ws = 6,
|
|
16040
|
+
const ws = 6, Ms = 4, Ss = new Uint16Array(1), Ps = new Int8Array(1);
|
|
16031
16041
|
function Is(e, t, i, r, s, o, a, l, h) {
|
|
16032
16042
|
if (t.isDisposed() || 0 === t.data.aPosition.length) return null;
|
|
16033
16043
|
const c = !!t.properties.iconAtlas, u = !!t.properties.glyphAtlas;
|
|
@@ -16148,7 +16158,7 @@
|
|
|
16148
16158
|
}(e);
|
|
16149
16159
|
}
|
|
16150
16160
|
function Rs(e, t) {
|
|
16151
|
-
const n =
|
|
16161
|
+
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
16162
|
return [ {
|
|
16153
16163
|
attrName: "aMarkerWidth",
|
|
16154
16164
|
symbolName: "markerWidth",
|
|
@@ -16338,7 +16348,7 @@
|
|
|
16338
16348
|
}(t);
|
|
16339
16349
|
const s = function(e, t) {
|
|
16340
16350
|
let n = e.properties.textFitFn;
|
|
16341
|
-
we(t) && (n = e.properties.textFitFn =
|
|
16351
|
+
we(t) && (n = e.properties.textFitFn = Se(t));
|
|
16342
16352
|
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
16353
|
let u, f = a[0];
|
|
16344
16354
|
u = {
|
|
@@ -16405,14 +16415,14 @@
|
|
|
16405
16415
|
let s = "both" === i || "width" === i, o = "both" === i || "height" === i;
|
|
16406
16416
|
if (we(n.markerTextFit)) {
|
|
16407
16417
|
let e = t.properties.textFitFn;
|
|
16408
|
-
e || (e = t.properties.textFitFn =
|
|
16418
|
+
e || (e = t.properties.textFitFn = Me(n.markerTextFit));
|
|
16409
16419
|
const {features: i} = t.properties, a = t.properties.iconElements, {aPickingId: l} = t.data, h = [], c = [];
|
|
16410
16420
|
let u = !0;
|
|
16411
16421
|
for (let t = 0; t < a.length; t += ws) {
|
|
16412
16422
|
const n = i[l[a[t]]], r = (n && n.feature || {}).properties || {};
|
|
16413
16423
|
let s = e(null, r);
|
|
16414
16424
|
if (we(s)) {
|
|
16415
|
-
s = (r.textFitFn = r.textFitFn ||
|
|
16425
|
+
s = (r.textFitFn = r.textFitFn || Me(s))(null, r);
|
|
16416
16426
|
}
|
|
16417
16427
|
"both" === s ? (h.push(t / ws), c.push(t / ws)) : "width" === s ? (u = !1, h.push(t / ws)) : "height" === s && (u = !1,
|
|
16418
16428
|
c.push(t / ws));
|
|
@@ -16442,7 +16452,7 @@
|
|
|
16442
16452
|
r.aMarkerHeight = new Uint16Array(c), r.aMarkerHeight.fill(e), e && (r.aMarkerHeight.dirty = !0),
|
|
16443
16453
|
t.data.aMarkerHeight = new Uint16Array(c);
|
|
16444
16454
|
}
|
|
16445
|
-
const u = this.getSymbolDef(t.properties.symbolIndex), f =
|
|
16455
|
+
const u = this.getSymbolDef(t.properties.symbolIndex), f = Me(u.textSize);
|
|
16446
16456
|
Hs.call(this, e, t), (!we(u.textSize) || f.isZoomConstant && f.isFeatureConstant) && (r.isFitConstant = !0);
|
|
16447
16457
|
}
|
|
16448
16458
|
const Ls = [ 0, 0, 0, 0 ];
|
|
@@ -16453,40 +16463,40 @@
|
|
|
16453
16463
|
if (i.isFitConstant || !i.labelShape || !i.labelShape.length) return;
|
|
16454
16464
|
const r = this.getSymbolDef(t.properties.symbolIndex), s = r.textSize;
|
|
16455
16465
|
let o;
|
|
16456
|
-
we(s) && (o = n._textSizeFn ? n._textSizeFn : n._textSizeFn =
|
|
16466
|
+
we(s) && (o = n._textSizeFn ? n._textSizeFn : n._textSizeFn = Me(s));
|
|
16457
16467
|
const a = r.markerTextFitPadding || Ls;
|
|
16458
16468
|
let l;
|
|
16459
|
-
we(a) && (l = i._paddingFn ? i._paddingFn : i._paddingFn =
|
|
16469
|
+
we(a) && (l = i._paddingFn ? i._paddingFn : i._paddingFn = Se(a));
|
|
16460
16470
|
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
16471
|
const c = g[4 * t], u = g[4 * t + 1], f = g[4 * t + 2], m = g[4 * t + 3];
|
|
16462
16472
|
if (!(c || u || f || m)) return;
|
|
16463
16473
|
const _ = x[e], v = y[_] && y[_].feature, b = v && v.properties || {};
|
|
16464
16474
|
let A = o ? o(h, b) : s;
|
|
16465
16475
|
if (we(A)) {
|
|
16466
|
-
A = (b.textSizeFn = b.textSizeFn ||
|
|
16476
|
+
A = (b.textSizeFn = b.textSizeFn || Me(A))(h, b);
|
|
16467
16477
|
}
|
|
16468
16478
|
A /= Lr;
|
|
16469
16479
|
let T, w = l && l(h, b) || a;
|
|
16470
16480
|
if (we(w)) {
|
|
16471
|
-
w = (b.fitPaddingFn = b.fitPaddingFn ||
|
|
16481
|
+
w = (b.fitPaddingFn = b.fitPaddingFn || Se(w))(h, b);
|
|
16472
16482
|
}
|
|
16473
16483
|
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
16484
|
d && n) {
|
|
16475
16485
|
const t = Math.abs((f - c) / 10 * A) + (w[1] + w[3] || 0);
|
|
16476
|
-
if (
|
|
16486
|
+
if (Ss[0] = t, d[e] !== Ss[0] && (St(d, Ss[0], e, e + Ms), d.dirty = !0), T) {
|
|
16477
16487
|
const t = (w[1] + w[3]) / 2 - w[3];
|
|
16478
16488
|
if (Ps[0] = t, T[2 * e] !== Ps[0]) {
|
|
16479
|
-
for (let n = e; n < e +
|
|
16489
|
+
for (let n = e; n < e + Ms; n++) T[2 * n] = t;
|
|
16480
16490
|
T.dirty = !0;
|
|
16481
16491
|
}
|
|
16482
16492
|
}
|
|
16483
16493
|
}
|
|
16484
16494
|
if (p && r) {
|
|
16485
16495
|
const t = Math.abs((m - u) / 10 * A) + (w[0] + w[2] || 0);
|
|
16486
|
-
if (
|
|
16496
|
+
if (Ss[0] = t, p[e] !== Ss[0] && (St(p, Ss[0], e, e + Ms), p.dirty = !0), T) {
|
|
16487
16497
|
const t = w[0] - (w[0] + w[2]) / 2;
|
|
16488
16498
|
if (Ps[0] = t, T[2 * e + 1] !== Ps[0]) {
|
|
16489
|
-
for (let n = e; n < e +
|
|
16499
|
+
for (let n = e; n < e + Ms; n++) T[2 * n + 1] = t;
|
|
16490
16500
|
T.dirty = !0;
|
|
16491
16501
|
}
|
|
16492
16502
|
}
|
|
@@ -16620,7 +16630,7 @@
|
|
|
16620
16630
|
i < n.length && o.fill(e++, i, n.length);
|
|
16621
16631
|
} else {
|
|
16622
16632
|
let e = 0;
|
|
16623
|
-
for (let t = 0; t < n.length; t +=
|
|
16633
|
+
for (let t = 0; t < n.length; t += Ms) o.fill(e++, t, t + Ms);
|
|
16624
16634
|
}
|
|
16625
16635
|
e.properties.collideIds = o, e.properties.uniqueCollideIds = kt(o, !t);
|
|
16626
16636
|
} else if (a) {
|
|
@@ -16628,8 +16638,8 @@
|
|
|
16628
16638
|
if (!i) return;
|
|
16629
16639
|
let r = 0, s = i[0];
|
|
16630
16640
|
for (let e = 0; e < n.length; ) {
|
|
16631
|
-
const t = e + s *
|
|
16632
|
-
n.fill(r++, e, t), e += s *
|
|
16641
|
+
const t = e + s * Ms;
|
|
16642
|
+
n.fill(r++, e, t), e += s * Ms, t < n.length && (s = i[t]);
|
|
16633
16643
|
}
|
|
16634
16644
|
e.properties.uniqueCollideIds = kt(n, !t);
|
|
16635
16645
|
}
|
|
@@ -16919,32 +16929,32 @@
|
|
|
16919
16929
|
}
|
|
16920
16930
|
const Xs = [], Ys = [], Zs = [];
|
|
16921
16931
|
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]),
|
|
16932
|
+
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
16933
|
p || (p = i);
|
|
16924
16934
|
const x = t.geometry.properties.line, _ = s[0] * u, v = f ? _ - o : _ + o;
|
|
16925
16935
|
let b = v > 0 ? 1 : -1, A = 0;
|
|
16926
16936
|
f && (b *= -1, A = Math.PI), b < 0 && (A += Math.PI);
|
|
16927
16937
|
const T = h + c, w = Math.abs(v);
|
|
16928
|
-
let
|
|
16938
|
+
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
16939
|
for (;k + O <= w; ) {
|
|
16930
|
-
if (
|
|
16931
|
-
P.x =
|
|
16932
|
-
I.x = x[3 *
|
|
16940
|
+
if (M += b, M < h || M >= T) return null;
|
|
16941
|
+
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],
|
|
16942
|
+
I.x = x[3 * M], I.y = x[3 * M + 1], k += O, O = P.dist(S) / d;
|
|
16933
16943
|
}
|
|
16934
16944
|
const F = (w - k) / O, R = g && g.getRenderer(), E = R && R.getTerrainHelper(), D = t.properties.tile.terrainTileInfos;
|
|
16935
16945
|
if (!y && E) {
|
|
16936
16946
|
const {extent: n} = t.properties.tile, i = g.getTileSize().width / n, r = g.getMap();
|
|
16937
16947
|
let s = I.sub(C).mult(F)._add(C);
|
|
16938
|
-
|
|
16939
|
-
const o = A + Math.atan2(
|
|
16948
|
+
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);
|
|
16949
|
+
const o = A + Math.atan2(S[1] - P[1], S[0] - P[0]);
|
|
16940
16950
|
return e[0] = (s[0] - p[0]) / d, e[1] = (s[1] - p[1]) / d, e[2] = o, e;
|
|
16941
16951
|
}
|
|
16942
|
-
const L =
|
|
16952
|
+
const L = S.sub(P), H = L.mult(F)._add(P);
|
|
16943
16953
|
H._add(L._unit()._perp()._mult(a * b));
|
|
16944
|
-
const N = A + Math.atan2(
|
|
16954
|
+
const N = A + Math.atan2(S.y - P.y, S.x - P.x);
|
|
16945
16955
|
return e[0] = (H.x - i[0]) / d, e[1] = (H.y - i[1]) / d, e[2] = N, e;
|
|
16946
16956
|
}(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
|
|
16957
|
+
return M;
|
|
16948
16958
|
}
|
|
16949
16959
|
const $s = [], Js = [];
|
|
16950
16960
|
function Ks(e, t, i, r, s, o, a, l, h, c, u, f, d) {
|
|
@@ -16973,7 +16983,7 @@
|
|
|
16973
16983
|
}, ho = function(e) {
|
|
16974
16984
|
const t = this.layer.getRenderer(), n = e.properties.tile.z, i = t.getCurrentTileZoom();
|
|
16975
16985
|
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 = [],
|
|
16986
|
+
}, 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
16987
|
class Lo extends xr {
|
|
16978
16988
|
static getBloomSymbol() {
|
|
16979
16989
|
return [ "textBloom" ];
|
|
@@ -17033,7 +17043,7 @@
|
|
|
17033
17043
|
}
|
|
17034
17044
|
return i;
|
|
17035
17045
|
};
|
|
17036
|
-
} else we(t.textName) && (this._textNameFn[e] =
|
|
17046
|
+
} else we(t.textName) && (this._textNameFn[e] = Me(t.textName));
|
|
17037
17047
|
}
|
|
17038
17048
|
}
|
|
17039
17049
|
shouldDeleteMeshOnUpdateSymbol(e) {
|
|
@@ -17195,29 +17205,29 @@
|
|
|
17195
17205
|
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
17206
|
let {aProjectedAnchor: b} = p.properties;
|
|
17197
17207
|
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,
|
|
17208
|
+
const A = p.properties.aTextSize, T = !a, w = t[i], M = w * g;
|
|
17209
|
+
let S;
|
|
17210
|
+
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]);
|
|
17211
|
+
const P = oi(mo, S, o, d.width, d.height), I = p.properties.aTerrainAltitude;
|
|
17202
17212
|
let C;
|
|
17203
17213
|
if (I) {
|
|
17204
17214
|
const e = I[w];
|
|
17205
17215
|
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, ...
|
|
17216
|
+
e ? (C = n.vec3.set(Ro, ...S), C[2] = 100 * e, C = oi(C, C, o, d.width, d.height)) : C = P;
|
|
17207
17217
|
} else C = P;
|
|
17208
17218
|
const k = d.getDevicePixelRatio();
|
|
17209
17219
|
if (n.vec4.scale(Do, C, 1 / k), d.isOffscreen(Do)) return f || Ho(y, t, i, r), b[3 * w] = ot,
|
|
17210
17220
|
b[3 * w + 1] = ot, b[3 * w + 2] = ot, !1;
|
|
17211
|
-
T && (
|
|
17221
|
+
T && (S = P), b[3 * w] = C[0], b[3 * w + 1] = C[1], b[3 * w + 2] = C[2];
|
|
17212
17222
|
const O = T ? 1 : p.properties.tileExtent / this.layer.getTileSize().width;
|
|
17213
17223
|
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,
|
|
17224
|
+
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
17225
|
if (null === L) return Ho(y, t, i, r), !1;
|
|
17216
17226
|
const H = E - R <= 3, N = Math.floor(L / 2), z = L % 2;
|
|
17217
17227
|
for (let a = i; a < r; a += 6) {
|
|
17218
17228
|
const l = t[a];
|
|
17219
17229
|
let d;
|
|
17220
|
-
if (d = N || a !== i || H || u ? N || a !== r - 6 || H || u ? qs.call(this, fo, e, D, s, l,
|
|
17230
|
+
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
17231
|
!d) {
|
|
17222
17232
|
F = !1, f || Ho(y, t, i, r);
|
|
17223
17233
|
break;
|
|
@@ -17227,8 +17237,8 @@
|
|
|
17227
17237
|
const g = Fr(yo, p, 0, h.textRotateWithMap, h.textPitchWithMap), x = y.length > m.length;
|
|
17228
17238
|
let _;
|
|
17229
17239
|
if (x) {
|
|
17230
|
-
n.vec3.set(
|
|
17231
|
-
const e = n.vec3.normalize(
|
|
17240
|
+
n.vec3.set(Mo, v[3 * l], v[3 * l + 1], 0);
|
|
17241
|
+
const e = n.vec3.normalize(Mo, Mo), t = -v[3 * l + 2];
|
|
17232
17242
|
if (t) {
|
|
17233
17243
|
const i = n.quat.setAxisAngle(Ao, e, t);
|
|
17234
17244
|
n.mat4.fromTranslation(To, co), n.mat4.fromQuat(wo, i), _ = n.mat4.multiply(wo, wo, To);
|
|
@@ -17314,7 +17324,7 @@
|
|
|
17314
17324
|
}
|
|
17315
17325
|
}
|
|
17316
17326
|
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(
|
|
17327
|
+
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
17328
|
i && n.vec2.set(a, r, r);
|
|
17319
17329
|
const l = Ue(e.getResolution(), e);
|
|
17320
17330
|
return {
|
|
@@ -17389,7 +17399,7 @@
|
|
|
17389
17399
|
h.properties.symbolIndex = r, h;
|
|
17390
17400
|
}
|
|
17391
17401
|
createFnTypeConfig(e, t) {
|
|
17392
|
-
const n =
|
|
17402
|
+
const n = Se(t.markerFill);
|
|
17393
17403
|
return [ {
|
|
17394
17404
|
attrName: "aColor",
|
|
17395
17405
|
symbolName: "markerFill",
|
|
@@ -17465,7 +17475,7 @@
|
|
|
17465
17475
|
class jo extends Fi {
|
|
17466
17476
|
constructor(e, t, n, i, r, s) {
|
|
17467
17477
|
if (super(e, t, n, i, r, s), this.primitive = "lines", we(this.symbolDef.lineColor)) {
|
|
17468
|
-
const e = t.getMap(), n =
|
|
17478
|
+
const e = t.getMap(), n = Se(this.symbolDef.lineColor);
|
|
17469
17479
|
this.colorSymbol = t => n(e.getZoom(), t);
|
|
17470
17480
|
}
|
|
17471
17481
|
}
|
|
@@ -17737,7 +17747,7 @@
|
|
|
17737
17747
|
return !("line-extrusion" === this.dataConfig.type && !e.altitudeProperty && !t.altitudeProperty);
|
|
17738
17748
|
}
|
|
17739
17749
|
createFnTypeConfig(e, t) {
|
|
17740
|
-
const n =
|
|
17750
|
+
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
17751
|
return [ {
|
|
17742
17752
|
attrName: "aColor",
|
|
17743
17753
|
type: Uint8Array,
|
|
@@ -18350,7 +18360,7 @@
|
|
|
18350
18360
|
r;
|
|
18351
18361
|
}
|
|
18352
18362
|
createFnTypeConfig(e, t) {
|
|
18353
|
-
const n =
|
|
18363
|
+
const n = Se(t.lineColor), i = Se(t.aLinePatternAnimSpeed), r = Se(t.aLinePatternGap), s = this.createShapeFnTypeConfigs(e, t), o = new Int8Array(2);
|
|
18354
18364
|
return [ {
|
|
18355
18365
|
attrName: "aColor",
|
|
18356
18366
|
symbolName: "lineColor",
|
|
@@ -18388,7 +18398,7 @@
|
|
|
18388
18398
|
} ].concat(s);
|
|
18389
18399
|
}
|
|
18390
18400
|
createShapeFnTypeConfigs(e, t) {
|
|
18391
|
-
const n =
|
|
18401
|
+
const n = Me(t.lineWidth), i = Me(t.lineOpacity), r = new Uint16Array(1);
|
|
18392
18402
|
return [ {
|
|
18393
18403
|
attrName: "aLineWidth",
|
|
18394
18404
|
symbolName: "lineWidth",
|
|
@@ -18425,7 +18435,7 @@
|
|
|
18425
18435
|
delete this.shader);
|
|
18426
18436
|
}
|
|
18427
18437
|
}
|
|
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 = [],
|
|
18438
|
+
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
18439
|
constructor(e, t, i, r, s, o) {
|
|
18430
18440
|
super(e, t, i, r, s, o), this._ready = !1, this.scene.sortFunction = this.sortByCommandKey;
|
|
18431
18441
|
const a = r.fetchOptions || {};
|
|
@@ -18491,9 +18501,9 @@
|
|
|
18491
18501
|
};
|
|
18492
18502
|
const b = this._hasFuncType(), A = this._getMeterScale(), T = n.mat4.identity([]);
|
|
18493
18503
|
n.mat4.scale(T, T, [ A, A, A ]);
|
|
18494
|
-
const w = [],
|
|
18495
|
-
for (let e = 0; e <
|
|
18496
|
-
const t =
|
|
18504
|
+
const w = [], M = this.getSymbols();
|
|
18505
|
+
for (let e = 0; e < M.length; e++) {
|
|
18506
|
+
const t = M[e], r = this._gltfMeshInfos[e];
|
|
18497
18507
|
if (!r) continue;
|
|
18498
18508
|
const l = this._gltfPack[e][0], {fixSizeOnZoom: h} = t;
|
|
18499
18509
|
let c = n.mat4.identity([]);
|
|
@@ -18501,21 +18511,21 @@
|
|
|
18501
18511
|
let u = 0;
|
|
18502
18512
|
r.forEach((e => {
|
|
18503
18513
|
const {geometry: i, nodeMatrix: r} = e;
|
|
18504
|
-
n.mat4.multiply(wa,
|
|
18514
|
+
n.mat4.multiply(wa, Ma, r), n.mat4.multiply(wa, c, wa);
|
|
18505
18515
|
const s = n.mat4.multiply(wa, T, wa), o = i.boundingBox.copy();
|
|
18506
18516
|
o.transform(s);
|
|
18507
18517
|
const a = this._calAnchorTranslation(o, t);
|
|
18508
18518
|
Math.abs(a) > Math.abs(u) && (u = a);
|
|
18509
18519
|
}));
|
|
18510
18520
|
const f = [ 0, 0, u ], d = r.map(((r, d) => {
|
|
18511
|
-
const {geometry: p, materialInfo: b, morphWeights: A, extraInfo: w, nodeIndex:
|
|
18521
|
+
const {geometry: p, materialInfo: b, morphWeights: A, extraInfo: w, nodeIndex: M} = r;
|
|
18512
18522
|
t.alphaTest && (b.alphaTest = t.alphaTest);
|
|
18513
|
-
const
|
|
18523
|
+
const S = new (this.getMaterialClazz(b))(b), P = {}, I = new n.reshader.InstancedMesh(x, g, p, S, {
|
|
18514
18524
|
transparent: !1,
|
|
18515
18525
|
picking: !0
|
|
18516
18526
|
});
|
|
18517
18527
|
if (l.hasSkinAnimation()) {
|
|
18518
|
-
const t = this._updateAnimation(I, e, 0)[
|
|
18528
|
+
const t = this._updateAnimation(I, e, 0)[M];
|
|
18519
18529
|
I.setUniform("jointTexture", t.jointTexture), I.setUniform("jointTextureSize", t.jointTextureSize),
|
|
18520
18530
|
I.setUniform("numJoints", t.numJoints), I.setUniform("skinAnimation", +this._isSkinAnimating(e)),
|
|
18521
18531
|
I.properties.startTime = s, P.HAS_SKIN = 1;
|
|
@@ -18524,8 +18534,8 @@
|
|
|
18524
18534
|
bt(I.uniforms, "polygonFill", t, "markerFill", Ta, wt(this.colorCache)), bt(I.uniforms, "polygonOpacity", t, "markerOpacity", 1);
|
|
18525
18535
|
const C = [];
|
|
18526
18536
|
I.setPositionMatrix((() => {
|
|
18527
|
-
const t = this._getMeshNodeMatrix(e, d,
|
|
18528
|
-
n.mat4.multiply(C,
|
|
18537
|
+
const t = this._getMeshNodeMatrix(e, d, M);
|
|
18538
|
+
n.mat4.multiply(C, Ma, t), n.mat4.multiply(C, c, C), n.mat4.multiply(C, T, C);
|
|
18529
18539
|
const i = n.mat4.identity(wa);
|
|
18530
18540
|
if (0 !== u && (n.mat4.fromTranslation(i, f), n.mat4.multiply(C, i, C)), Pt(h)) {
|
|
18531
18541
|
const e = o.getGLScale() / o.getGLScale(h);
|
|
@@ -18542,7 +18552,7 @@
|
|
|
18542
18552
|
}), m.instance_color && (P.HAS_INSTANCE_COLOR = 1), m.aTerrainAltitude && (P.HAS_INSTANCE_TERRAIN_ALTITUDE = 1,
|
|
18543
18553
|
I.setUniform("terrainAltitudeScale", 100 * this.layer.getRenderer().getZScale())),
|
|
18544
18554
|
P.HAS_LAYER_OPACITY = 1, mt(I.properties, a.properties), I.properties.aPickingId = _,
|
|
18545
|
-
I.properties.nodeIndex =
|
|
18555
|
+
I.properties.nodeIndex = M, I.properties.pickingIdIndiceMap = v, I.setDefines(P),
|
|
18546
18556
|
I.properties.symbolIndex = {
|
|
18547
18557
|
index: e
|
|
18548
18558
|
}, I;
|
|
@@ -18624,10 +18634,10 @@
|
|
|
18624
18634
|
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
18635
|
t[2] < _ && (_ = t[2]), t[2] > A && (A = t[2]);
|
|
18626
18636
|
}
|
|
18627
|
-
const
|
|
18637
|
+
const M = (y + v) / 2, S = (x + b) / 2, P = (_ + A) / 2, I = [], C = this._hasFuncType(), k = [ 0, 0, 1 ];
|
|
18628
18638
|
for (let t = 0; t < d; t++) {
|
|
18629
18639
|
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 -
|
|
18640
|
+
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
18641
|
if (y || x) {
|
|
18632
18642
|
n.mat4.fromRotation(I, x, k);
|
|
18633
18643
|
const e = n.vec3.set(pa, i, r, 0), t = n.vec3.normalize(e, n.vec3.cross(e, e, k));
|
|
@@ -18642,7 +18652,7 @@
|
|
|
18642
18652
|
f("instance_vectorA", t, I, 0), f("instance_vectorB", t, I, 1), f("instance_vectorC", t, I, 2),
|
|
18643
18653
|
e.aPickingId[t] = c[t];
|
|
18644
18654
|
}
|
|
18645
|
-
return n.vec3.set(T,
|
|
18655
|
+
return n.vec3.set(T, M, S, P), T;
|
|
18646
18656
|
}
|
|
18647
18657
|
_getMeterScale() {
|
|
18648
18658
|
if (!this._meterScale) {
|
|
@@ -18679,11 +18689,11 @@
|
|
|
18679
18689
|
}
|
|
18680
18690
|
_initTRSFuncType() {
|
|
18681
18691
|
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 =
|
|
18692
|
+
we(e.modelHeight) && (this._modelHeightFn = Me(e.modelHeight)), we(e.translationX) && (this._txFn = Me(e.translationX)),
|
|
18693
|
+
we(e.translationY) && (this._tyFn = Me(e.translationY)), we(e.translationZ) && (this._tzFn = Me(e.translationZ)),
|
|
18694
|
+
we(e.rotationX) && (this._rxFn = Me(e.rotationX)), we(e.rotationY) && (this._ryFn = Me(e.rotationY)),
|
|
18695
|
+
we(e.rotationZ) && (this._rzFn = Me(e.rotationZ)), we(e.scaleX) && (this._sxFn = Me(e.scaleX)),
|
|
18696
|
+
we(e.scaleY) && (this._syFn = Me(e.scaleY)), we(e.scaleZ) && (this._szFn = Me(e.scaleZ));
|
|
18687
18697
|
}
|
|
18688
18698
|
_hasFuncType() {
|
|
18689
18699
|
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 +18759,12 @@
|
|
|
18749
18759
|
return n.mat4.fromRotationTranslationScale(e, l, s, a);
|
|
18750
18760
|
}
|
|
18751
18761
|
};
|
|
18752
|
-
class Pa extends(
|
|
18762
|
+
class Pa extends(Sa(ra)){
|
|
18753
18763
|
getMaterialClazz(e) {
|
|
18754
18764
|
return e.diffuseFactor ? n.reshader.PhongSpecularGlossinessMaterial : n.reshader.PhongMaterial;
|
|
18755
18765
|
}
|
|
18756
18766
|
}
|
|
18757
|
-
class Ia extends(
|
|
18767
|
+
class Ia extends(Sa(la)){
|
|
18758
18768
|
getMaterialClazz(e) {
|
|
18759
18769
|
return e.specularGlossinessTexture || e.diffuseTexture ? n.reshader.pbr.StandardSpecularGlossinessMaterial : n.reshader.pbr.StandardMaterial;
|
|
18760
18770
|
}
|
|
@@ -19061,7 +19071,7 @@
|
|
|
19061
19071
|
Za.registerAt(en);
|
|
19062
19072
|
const qa = zn("heatmap", class extends Fi {
|
|
19063
19073
|
createFnTypeConfig(e, t) {
|
|
19064
|
-
const n =
|
|
19074
|
+
const n = Me(t.heatmapWeight), i = new Int16Array(1);
|
|
19065
19075
|
return [ {
|
|
19066
19076
|
attrName: "aWeight",
|
|
19067
19077
|
symbolName: "heatmapWeight",
|
|
@@ -20064,7 +20074,7 @@
|
|
|
20064
20074
|
}
|
|
20065
20075
|
return !0;
|
|
20066
20076
|
}
|
|
20067
|
-
function
|
|
20077
|
+
function Ml(e, t, n) {
|
|
20068
20078
|
if (!e || e.type !== t) return null;
|
|
20069
20079
|
const i = new n(e.id, e.options), s = e.geometries, o = [];
|
|
20070
20080
|
for (let e = 0; e < s.length; e++) {
|
|
@@ -20073,9 +20083,9 @@
|
|
|
20073
20083
|
}
|
|
20074
20084
|
return i.addGeometry(o), i;
|
|
20075
20085
|
}
|
|
20076
|
-
class
|
|
20086
|
+
class Sl extends ln {
|
|
20077
20087
|
static fromJSON(e) {
|
|
20078
|
-
return
|
|
20088
|
+
return Ml(e, "PointLayer", Sl);
|
|
20079
20089
|
}
|
|
20080
20090
|
constructor(...e) {
|
|
20081
20091
|
super(...e), this.options.sceneConfig || (this.options.sceneConfig = Fe({}, Ke));
|
|
@@ -20087,7 +20097,7 @@
|
|
|
20087
20097
|
return 0;
|
|
20088
20098
|
}
|
|
20089
20099
|
}
|
|
20090
|
-
|
|
20100
|
+
Sl.mergeOptions({
|
|
20091
20101
|
glyphSdfLimitPerFrame: 15,
|
|
20092
20102
|
iconErrorUrl: null,
|
|
20093
20103
|
workarounds: {
|
|
@@ -20095,8 +20105,8 @@
|
|
|
20095
20105
|
},
|
|
20096
20106
|
collision: !1,
|
|
20097
20107
|
collisionFrameLimit: 1
|
|
20098
|
-
}),
|
|
20099
|
-
|
|
20108
|
+
}), Sl.registerJSONType("PointLayer"), Sl.registerRenderer("canvas", null);
|
|
20109
|
+
Sl.registerRenderer("gl", class extends gl {
|
|
20100
20110
|
constructor(...e) {
|
|
20101
20111
|
super(...e), this.GeometryTypes = [ r.Marker, r.MultiPoint ];
|
|
20102
20112
|
}
|
|
@@ -20109,7 +20119,7 @@
|
|
|
20109
20119
|
const {LinePack: Pl} = h();
|
|
20110
20120
|
class Il extends ln {
|
|
20111
20121
|
static fromJSON(e) {
|
|
20112
|
-
return
|
|
20122
|
+
return Ml(e, "LineStringLayer", Il);
|
|
20113
20123
|
}
|
|
20114
20124
|
}
|
|
20115
20125
|
Il.mergeOptions({
|
|
@@ -20149,7 +20159,7 @@
|
|
|
20149
20159
|
const {PolygonPack: kl} = h();
|
|
20150
20160
|
class Ol extends ln {
|
|
20151
20161
|
static fromJSON(e) {
|
|
20152
|
-
return
|
|
20162
|
+
return Ml(e, "PolygonLayer", Ol);
|
|
20153
20163
|
}
|
|
20154
20164
|
}
|
|
20155
20165
|
Ol.registerJSONType("PolygonLayer");
|
|
@@ -20622,11 +20632,11 @@
|
|
|
20622
20632
|
e.copyWithin(r, r - 2 * y, r - y), r += y, (n = n || []).push(y / 3);
|
|
20623
20633
|
const _ = n.getLength();
|
|
20624
20634
|
for (let t = 0; t < _; t++) {
|
|
20625
|
-
|
|
20635
|
+
Mh(x + (n[t - 1] || 0), x + n[t], e, y / 3, l, i, h, c, u, f, s, d, p, g, m);
|
|
20626
20636
|
}
|
|
20627
20637
|
return r;
|
|
20628
20638
|
}
|
|
20629
|
-
function
|
|
20639
|
+
function Mh(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p) {
|
|
20630
20640
|
const g = s.getLength();
|
|
20631
20641
|
let m, y;
|
|
20632
20642
|
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 +20660,14 @@
|
|
|
20650
20660
|
const w = u % 6;
|
|
20651
20661
|
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
20662
|
T = m) : T = m);
|
|
20653
|
-
const
|
|
20654
|
-
let
|
|
20655
|
-
|
|
20656
|
-
i[2 * o] =
|
|
20663
|
+
const M = T / h * (1 / (100 * c)) / a;
|
|
20664
|
+
let S;
|
|
20665
|
+
S = 1 === t ? A === d ? 1 : 0 : "bottom" === n ? A === d ? f / 100 / l : 0 : A === d ? 0 : -f / 100 / l,
|
|
20666
|
+
i[2 * o] = M, i[2 * o + 1] = S, 0 === w && (g += m);
|
|
20657
20667
|
}
|
|
20658
20668
|
}(a, l, h, c, n, s, g, u[0], u[1], f, d, p);
|
|
20659
20669
|
}
|
|
20660
|
-
function
|
|
20670
|
+
function Sh(e) {
|
|
20661
20671
|
const t = [ e[0] ];
|
|
20662
20672
|
let n = e[0];
|
|
20663
20673
|
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 +20790,7 @@
|
|
|
20780
20790
|
const {StyleUtil: sc, PackUtil: oc, ArrayPool: ac} = h(), lc = ac.getInstance();
|
|
20781
20791
|
function hc(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g) {
|
|
20782
20792
|
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:
|
|
20793
|
+
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
20794
|
let I = t / e[0].extent;
|
|
20785
20795
|
t === 1 / 0 && (I = 1);
|
|
20786
20796
|
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 +20809,7 @@
|
|
|
20799
20809
|
}
|
|
20800
20810
|
c = h.length, d = D.currentIndex;
|
|
20801
20811
|
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,
|
|
20812
|
+
D.currentIndex = d, H && Yl(g || 0, e, n, V, E, f, v, _, p[0], p[1], s, T, w, M, l),
|
|
20803
20813
|
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
20814
|
L.setLength(n / 3), L.fill(1, a / 3, n / 3);
|
|
20805
20815
|
}
|
|
@@ -20815,7 +20825,7 @@
|
|
|
20815
20825
|
let B = -1 / 0, G = 1 / 0, j = 0;
|
|
20816
20826
|
const W = [ -1, -1, t + 1, t + 1 ];
|
|
20817
20827
|
let X = 0, Y = e.length;
|
|
20818
|
-
Ee(
|
|
20828
|
+
Ee(S) && (X = S, Y = S + 1);
|
|
20819
20829
|
let Z = 0, q = !1;
|
|
20820
20830
|
const $ = P.getProxy();
|
|
20821
20831
|
let J = !1;
|
|
@@ -20833,7 +20843,7 @@
|
|
|
20833
20843
|
const x = Ah.calculateSignedArea(c[0]) < 0;
|
|
20834
20844
|
for (let e = 0, n = c.length; e < n; e++) {
|
|
20835
20845
|
let i = c[e];
|
|
20836
|
-
x && (i = i.reverse()), i =
|
|
20846
|
+
x && (i = i.reverse()), i = Sh(i);
|
|
20837
20847
|
const r = Ah.calculateSignedArea(i) < 0;
|
|
20838
20848
|
if (!r && e > 0 && (m++, f = u && u[m], j = U(y, j, $, p * I, f, C), R.setLength(0),
|
|
20839
20849
|
$.setLength(0), y = j), t !== 1 / 0 && (i = Ah.clipPolygon(i, W)), !i.length) {
|
|
@@ -20886,8 +20896,8 @@
|
|
|
20886
20896
|
uvSize: [ r, r ],
|
|
20887
20897
|
uvOrigin: i,
|
|
20888
20898
|
topUVMode: w,
|
|
20889
|
-
sideUVMode:
|
|
20890
|
-
sideVerticalUVMode:
|
|
20899
|
+
sideUVMode: M,
|
|
20900
|
+
sideVerticalUVMode: S,
|
|
20891
20901
|
textureYOrigin: C,
|
|
20892
20902
|
tileRatio: a,
|
|
20893
20903
|
centimeterToPoint: l,
|
|
@@ -20931,21 +20941,21 @@
|
|
|
20931
20941
|
function y(t, i, r) {
|
|
20932
20942
|
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
20943
|
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) *
|
|
20944
|
+
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);
|
|
20945
|
+
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
20946
|
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
20947
|
Fh(l[r], l[r], m);
|
|
20938
20948
|
}
|
|
20939
20949
|
for (let e = 0, t = i.length; e < t; e += 3) y(i[e + 0], i[e + 1], i[e + 2]);
|
|
20940
20950
|
const x = [], _ = [], v = [], b = [];
|
|
20941
20951
|
let A, T, w;
|
|
20942
|
-
function
|
|
20952
|
+
function M(e) {
|
|
20943
20953
|
ic(v, t, 3 * e), kh(b, v), T = a[e], kh(x, T), Lh(x, x, function(e, t, n) {
|
|
20944
20954
|
return e[0] = t[0] * n, e[1] = t[1] * n, e[2] = t[2] * n, e;
|
|
20945
20955
|
}(v, v, Eh(v, T))), Rh(x, x), Dh(_, b, T), w = Eh(_, l[e]), A = w < 0 ? -1 : 1,
|
|
20946
20956
|
o[4 * e] = x[0], o[4 * e + 1] = x[1], o[4 * e + 2] = x[2], o[4 * e + 3] = A;
|
|
20947
20957
|
}
|
|
20948
|
-
for (let e = 0, t = i.length; e < t; e += 3)
|
|
20958
|
+
for (let e = 0, t = i.length; e < t; e += 3) M(i[e + 0]), M(i[e + 1]), M(i[e + 2]);
|
|
20949
20959
|
return o;
|
|
20950
20960
|
}(F.vertices, F.normals, F.uvs, L, e), e = function(e, t) {
|
|
20951
20961
|
const n = t.getLength(), i = new Float32Array(n), r = [], s = [], o = [];
|
|
@@ -20969,28 +20979,28 @@
|
|
|
20969
20979
|
const G = function(e, t, n, i) {
|
|
20970
20980
|
const r = {}, s = {}, o = i.getLength();
|
|
20971
20981
|
if (ze(t.polygonFill)) {
|
|
20972
|
-
let a =
|
|
20982
|
+
let a = Se(t.polygonFill);
|
|
20973
20983
|
const l = new Uint8Array(4 * o);
|
|
20974
20984
|
l.fill(255);
|
|
20975
20985
|
for (let t = 0; t < o; t++) {
|
|
20976
20986
|
const s = e[i[t]], o = s.properties || {};
|
|
20977
20987
|
o.$layer = s.layer, o.$type = s.type;
|
|
20978
20988
|
let h = a(n, o);
|
|
20979
|
-
we(h) && (r.aColor = 1, a =
|
|
20989
|
+
we(h) && (r.aColor = 1, a = Se(h), h = a(n, o)), delete o.$layer, delete o.$type,
|
|
20980
20990
|
sc.normalizeColor(cc, h), l[4 * t] = cc[0], l[4 * t + 1] = cc[1], l[4 * t + 2] = cc[2],
|
|
20981
20991
|
l[4 * t + 3] = cc[3];
|
|
20982
20992
|
}
|
|
20983
20993
|
s.aColor = l;
|
|
20984
20994
|
}
|
|
20985
20995
|
if (ze(t.polygonOpacity)) {
|
|
20986
|
-
let a =
|
|
20996
|
+
let a = Me(t.polygonOpacity);
|
|
20987
20997
|
const l = new Uint8Array(o);
|
|
20988
20998
|
l.fill(255);
|
|
20989
20999
|
for (let t = 0; t < o; t++) {
|
|
20990
21000
|
const s = e[i[t]], o = s.properties || {};
|
|
20991
21001
|
o.$layer = s.layer, o.$type = s.type;
|
|
20992
21002
|
let h = a(n, o);
|
|
20993
|
-
we(h) && (r.aOpacity = 1, a =
|
|
21003
|
+
we(h) && (r.aOpacity = 1, a = Se(h), h = a(n, o)), delete o.$layer, delete o.$type,
|
|
20994
21004
|
l[t] = 255 * h;
|
|
20995
21005
|
}
|
|
20996
21006
|
s.aOpacity = l;
|
|
@@ -20999,7 +21009,7 @@
|
|
|
20999
21009
|
}(e, c, u, F.featureIndexes), j = function(e, t, n, i, r) {
|
|
21000
21010
|
const s = [ [], [] ], o = ze(i.topPolygonFill), a = ze(i.bottomPolygonFill), l = [ 255, 255, 255, 255 ], h = t.getLength();
|
|
21001
21011
|
if (o || a) {
|
|
21002
|
-
let c = o &&
|
|
21012
|
+
let c = o && Se(i.topPolygonFill), u = a && Se(i.bottomPolygonFill), f = null, d = null, p = null, g = null;
|
|
21003
21013
|
for (let i = 0; i < h; i++) {
|
|
21004
21014
|
if (1 === e[i] && !o || 0 === e[i] && !a) continue;
|
|
21005
21015
|
const h = 1 === e[i];
|
|
@@ -21014,7 +21024,7 @@
|
|
|
21014
21024
|
const m = n[t[i]], y = m.properties || {};
|
|
21015
21025
|
y.$layer = m.layer, y.$type = m.type;
|
|
21016
21026
|
let x = h ? c : u, _ = x(r, y);
|
|
21017
|
-
we(_) && (x =
|
|
21027
|
+
we(_) && (x = Se(_), _ = x(r, y)), delete y.$layer, delete y.$type, sc.normalizeColor(cc, _),
|
|
21018
21028
|
Vl(cc, cc, l);
|
|
21019
21029
|
let v = uc(s, cc);
|
|
21020
21030
|
v < 0 && (v = s.length, s.push(Nl([], cc))), e[i] = v, h ? (f = t[i], p = v) : (d = t[i],
|
|
@@ -21096,7 +21106,7 @@
|
|
|
21096
21106
|
for (;t; ) {
|
|
21097
21107
|
for (let s = 0; s < t.children.length; s++) {
|
|
21098
21108
|
const o = t.children[s], a = t.leaf ? i(o) : o;
|
|
21099
|
-
Pc(e, a) && (t.leaf ? n.push(o) :
|
|
21109
|
+
Pc(e, a) && (t.leaf ? n.push(o) : Sc(e, a) ? this._all(o, n) : r.push(o));
|
|
21100
21110
|
}
|
|
21101
21111
|
t = r.pop();
|
|
21102
21112
|
}
|
|
@@ -21110,7 +21120,7 @@
|
|
|
21110
21120
|
for (let i = 0; i < t.children.length; i++) {
|
|
21111
21121
|
const r = t.children[i], s = t.leaf ? this.toBBox(r) : r;
|
|
21112
21122
|
if (Pc(e, s)) {
|
|
21113
|
-
if (t.leaf ||
|
|
21123
|
+
if (t.leaf || Sc(e, s)) return !0;
|
|
21114
21124
|
n.push(r);
|
|
21115
21125
|
}
|
|
21116
21126
|
}
|
|
@@ -21150,7 +21160,7 @@
|
|
|
21150
21160
|
const i = yc(e, n.children, t);
|
|
21151
21161
|
if (-1 !== i) return n.children.splice(i, 1), r.push(n), this._condense(r), this;
|
|
21152
21162
|
}
|
|
21153
|
-
l || n.leaf || !
|
|
21163
|
+
l || n.leaf || !Sc(n, i) ? a ? (o++, n = a.children[o], l = !1) : n = null : (r.push(n),
|
|
21154
21164
|
s.push(o), o = 0, a = n, n = n.children[0]);
|
|
21155
21165
|
}
|
|
21156
21166
|
return this;
|
|
@@ -21224,7 +21234,7 @@
|
|
|
21224
21234
|
_chooseSplitIndex(e, t, n) {
|
|
21225
21235
|
let i, r = 1 / 0, s = 1 / 0;
|
|
21226
21236
|
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 =
|
|
21237
|
+
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
21238
|
l < r ? (r = l, i = o, s = h < s ? h : s) : l === r && h < s && (s = h, i = o);
|
|
21229
21239
|
}
|
|
21230
21240
|
return i || n - t;
|
|
@@ -21287,11 +21297,11 @@
|
|
|
21287
21297
|
function wc(e) {
|
|
21288
21298
|
return e.maxX - e.minX + (e.maxY - e.minY);
|
|
21289
21299
|
}
|
|
21290
|
-
function
|
|
21300
|
+
function Mc(e, t) {
|
|
21291
21301
|
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
21302
|
return Math.max(0, r - n) * Math.max(0, s - i);
|
|
21293
21303
|
}
|
|
21294
|
-
function
|
|
21304
|
+
function Sc(e, t) {
|
|
21295
21305
|
return e.minX <= t.minX && e.minY <= t.minY && t.maxX <= e.maxX && t.maxY <= e.maxY;
|
|
21296
21306
|
}
|
|
21297
21307
|
function Pc(e, t) {
|
|
@@ -21403,10 +21413,10 @@
|
|
|
21403
21413
|
const h = Math.abs(o + a);
|
|
21404
21414
|
return Math.abs(l) >= Uc * h ? l : -function(e, t, n, i, r, s, o) {
|
|
21405
21415
|
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 *
|
|
21416
|
+
const M = e - r, S = n - r, P = t - s, I = i - s;
|
|
21417
|
+
v = M * I, f = Hc * M, d = f - (f - M), p = M - d, f = Hc * I, g = f - (f - I),
|
|
21418
|
+
m = I - g, b = p * m - (v - d * g - p * g - d * m), A = P * S, f = Hc * P, d = f - (f - P),
|
|
21419
|
+
p = P - d, f = Hc * S, g = f - (f - S), m = S - g, T = p * m - (A - d * g - p * g - d * m),
|
|
21410
21420
|
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
21421
|
y = _ - A, u = _ - y, jc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, jc[2] = x - (w - u) + (y - u),
|
|
21412
21422
|
jc[3] = w;
|
|
@@ -21416,17 +21426,17 @@
|
|
|
21416
21426
|
return n;
|
|
21417
21427
|
}(4, jc), k = Bc * o;
|
|
21418
21428
|
if (C >= k || -C >= k) return C;
|
|
21419
|
-
if (u = e -
|
|
21429
|
+
if (u = e - M, a = e - (M + u) + (u - r), u = n - S, h = n - (S + u) + (u - r),
|
|
21420
21430
|
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 +=
|
|
21431
|
+
if (k = Gc * o + Nc * Math.abs(C), C += M * c + I * a - (P * h + S * l), C >= k || -C >= k) return C;
|
|
21422
21432
|
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 *
|
|
21433
|
+
m = I - g, b = p * m - (v - d * g - p * g - d * m), A = l * S, f = Hc * l, d = f - (f - l),
|
|
21434
|
+
p = l - d, f = Hc * S, g = f - (f - S), m = S - g, T = p * m - (A - d * g - p * g - d * m),
|
|
21425
21435
|
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
21436
|
y = _ - A, u = _ - y, Zc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Zc[2] = x - (w - u) + (y - u),
|
|
21427
21437
|
Zc[3] = w;
|
|
21428
21438
|
const O = zc(4, jc, 4, Zc, Wc);
|
|
21429
|
-
v =
|
|
21439
|
+
v = M * c, f = Hc * M, d = f - (f - M), p = M - d, f = Hc * c, g = f - (f - c),
|
|
21430
21440
|
m = c - g, b = p * m - (v - d * g - p * g - d * m), A = P * h, f = Hc * P, d = f - (f - P),
|
|
21431
21441
|
p = P - d, f = Hc * h, g = f - (f - h), m = h - g, T = p * m - (A - d * g - p * g - d * m),
|
|
21432
21442
|
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 +21585,13 @@
|
|
|
21575
21585
|
return (s = e[0] - i) * s + (o = e[1] - r) * o;
|
|
21576
21586
|
}
|
|
21577
21587
|
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 >
|
|
21588
|
+
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;
|
|
21589
|
+
0 === T ? (h = 0, w = 1, u = A, M = v) : (u = x * A - _ * b, (h = _ * A - v * b) < 0 ? (h = 0,
|
|
21590
|
+
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,
|
|
21591
|
+
w = x)) : u > M && (u = M, -b + _ < 0 ? h = 0 : -b + _ > x ? h = w : (h = -b + _,
|
|
21582
21592
|
w = x));
|
|
21583
|
-
var
|
|
21584
|
-
return
|
|
21593
|
+
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);
|
|
21594
|
+
return S * S + P * P;
|
|
21585
21595
|
}
|
|
21586
21596
|
function lu(e, t) {
|
|
21587
21597
|
return e[0] === t[0] ? e[1] - t[1] : e[0] - t[0];
|
|
@@ -21696,7 +21706,7 @@
|
|
|
21696
21706
|
const {DEFAULT_TEX_WIDTH: gu} = h();
|
|
21697
21707
|
class mu extends ln {
|
|
21698
21708
|
static fromJSON(e) {
|
|
21699
|
-
return
|
|
21709
|
+
return Ml(e, "ExtrudePolygonLayer", mu);
|
|
21700
21710
|
}
|
|
21701
21711
|
getPolygonOffsetCount() {
|
|
21702
21712
|
return 0;
|
|
@@ -21917,9 +21927,9 @@
|
|
|
21917
21927
|
e.LinePainter = $i, e.LinePlugin = Na, e.LineStringLayer = Il, e.LitPlugin = Wa,
|
|
21918
21928
|
e.MapboxVectorTileLayer = Ja, e.NativeLinePainter = jo, e.NativeLinePlugin = Ba,
|
|
21919
21929
|
e.NativePointPainter = Uo, e.PackUtil = vu, e.PhongPainter = ra, e.PhongPlugin = Ga,
|
|
21920
|
-
e.PointLayer =
|
|
21930
|
+
e.PointLayer = Sl, e.PolygonLayer = Ol, e.SYMBOLS_NEED_REBUILD_IN_VECTOR = Tu, e.SYMBOLS_NEED_REBUILD_IN_VT = Au,
|
|
21921
21931
|
e.TextPainter = Lo, e.TextPlugin = Ua, e.TubePlugin = Xa, e.Vector3DLayer = ln,
|
|
21922
21932
|
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.
|
|
21933
|
+
e.WireframePlugin = ja, "undefined" != typeof console && console.log("@maptalks/vt v0.105.3");
|
|
21924
21934
|
}));
|
|
21925
21935
|
//# sourceMappingURL=maptalks.vt.js.map
|