@maptalks/vt 0.55.0 → 0.56.0
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.js +563 -544
- package/package.json +3 -3
package/dist/maptalks.vt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/vt v0.
|
|
2
|
+
* @maptalks/vt v0.56.0
|
|
3
3
|
* LICENSE : undefined
|
|
4
4
|
* (c) 2016-2021 maptalks.org
|
|
5
5
|
*/
|
|
@@ -208,21 +208,21 @@
|
|
|
208
208
|
return t;
|
|
209
209
|
}
|
|
210
210
|
function _(t) {
|
|
211
|
-
return !
|
|
211
|
+
return !C(t) && ("string" == typeof t || null !== t.constructor && t.constructor === String);
|
|
212
212
|
}
|
|
213
213
|
function P(t) {
|
|
214
214
|
return "number" == typeof t && !isNaN(t);
|
|
215
215
|
}
|
|
216
216
|
function S(t) {
|
|
217
|
-
return !
|
|
217
|
+
return !C(t) && ("function" == typeof t || null !== t.constructor && t.constructor === Function);
|
|
218
218
|
}
|
|
219
219
|
function O(t) {
|
|
220
220
|
return !Array.isArray(t) && "object" == typeof t && !!t;
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function C(t) {
|
|
223
223
|
return null == t;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function I(t) {
|
|
226
226
|
for (let i = 1; i < arguments.length; i++) {
|
|
227
227
|
const n = arguments[i];
|
|
228
228
|
if (n) for (let i = 0, e = n.length; i < e; i++) t.push(n[i]);
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
function L(t) {
|
|
239
239
|
return (t = Math.abs(t)) < 128 ? Int8Array : t < 32768 ? Int16Array : Float32Array;
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function U(t) {
|
|
242
242
|
return function t(i) {
|
|
243
243
|
if (!Array.isArray(i)) return t([ i ]);
|
|
244
244
|
const n = [];
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
return i.filter && i.filter.value && (i.filter = i.filter.value), i;
|
|
257
257
|
}));
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function E(t, i) {
|
|
260
260
|
return g(i[t]) && i[t].property;
|
|
261
261
|
}
|
|
262
262
|
const j = "function" == typeof fetch && "function" == typeof AbortController, R = {
|
|
@@ -281,8 +281,8 @@
|
|
|
281
281
|
method: i.method || "GET",
|
|
282
282
|
referrerPolicy: "origin"
|
|
283
283
|
};
|
|
284
|
-
return e && (
|
|
285
|
-
|
|
284
|
+
return e && (C(i.body) || (s.body = JSON.stringify(i.body))), C(i.headers) || (s.headers = i.headers),
|
|
285
|
+
C(i.credentials) || (s.credentials = i.credentials), fetch(t, s).then(t => {
|
|
286
286
|
const e = this.s(t, i.returnJSON, i.responseType);
|
|
287
287
|
e.message ? n(e) : e.then(e => {
|
|
288
288
|
"arraybuffer" === i.responseType ? n(null, {
|
|
@@ -387,13 +387,13 @@
|
|
|
387
387
|
if (i.geometry) {
|
|
388
388
|
var r = i.geometry.coordinates, s = i.geometry.type, o = Math.pow(n.tolerance / ((1 << n.maxZoom) * n.extent), 2), h = [], a = i.id;
|
|
389
389
|
if (n.promoteId ? a = i.properties[n.promoteId] : n.generateId && (a = e || 0),
|
|
390
|
-
"Point" === s) V(r, h); else if ("MultiPoint" === s) for (var l = 0; l < r.length; l++) V(r[l], h); else if ("LineString" === s)
|
|
390
|
+
"Point" === s) V(r, h); else if ("MultiPoint" === s) for (var l = 0; l < r.length; l++) V(r[l], h); else if ("LineString" === s) $(r, h, o, !1); else if ("MultiLineString" === s) {
|
|
391
391
|
if (n.lineMetrics) {
|
|
392
|
-
for (l = 0; l < r.length; l++) h = [],
|
|
392
|
+
for (l = 0; l < r.length; l++) h = [], $(r[l], h, o, !1), t.push(z(a, "LineString", h, i.properties));
|
|
393
393
|
return;
|
|
394
394
|
}
|
|
395
|
-
|
|
396
|
-
} else if ("Polygon" === s)
|
|
395
|
+
G(r, h, o, !1);
|
|
396
|
+
} else if ("Polygon" === s) G(r, h, o, !0); else {
|
|
397
397
|
if ("MultiPolygon" !== s) {
|
|
398
398
|
if ("GeometryCollection" === s) {
|
|
399
399
|
for (l = 0; l < i.geometry.geometries.length; l++) H(t, {
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
}
|
|
408
408
|
for (l = 0; l < r.length; l++) {
|
|
409
409
|
var u = [];
|
|
410
|
-
|
|
410
|
+
G(r[l], u, o, !0), h.push(u);
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
t.push(z(a, s, h, i.properties));
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
function V(t, i) {
|
|
417
417
|
i.push(J(t[0])), i.push(q(t[1])), i.push(0);
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function $(t, i, n, e) {
|
|
420
420
|
for (var r, s, o = 0, h = 0; h < t.length; h++) {
|
|
421
421
|
var a = J(t[h][0]), l = q(t[h][1]);
|
|
422
422
|
i.push(a), i.push(l), i.push(0), h > 0 && (o += e ? (r * l - a * s) / 2 : Math.sqrt(Math.pow(a - r, 2) + Math.pow(l - s, 2))),
|
|
@@ -434,10 +434,10 @@
|
|
|
434
434
|
o > r && (s - n > 3 && t(i, n, s, r), i[s + 2] = o, e - s > 3 && t(i, s, e, r));
|
|
435
435
|
}(i, 0, u, n), i[u + 2] = 1, i.size = Math.abs(o), i.start = 0, i.end = i.size;
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function G(t, i, n, e) {
|
|
438
438
|
for (var r = 0; r < t.length; r++) {
|
|
439
439
|
var s = [];
|
|
440
|
-
|
|
440
|
+
$(t[r], s, n, e), i.push(s);
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
function J(t) {
|
|
@@ -868,13 +868,13 @@
|
|
|
868
868
|
var l, u, c, f;
|
|
869
869
|
}
|
|
870
870
|
"undefined" != typeof undefinedThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof self && self;
|
|
871
|
-
var Ot =
|
|
872
|
-
function
|
|
871
|
+
var Ot = Ct;
|
|
872
|
+
function Ct(t, i) {
|
|
873
873
|
this.x = t, this.y = i;
|
|
874
874
|
}
|
|
875
|
-
|
|
875
|
+
Ct.prototype = {
|
|
876
876
|
clone: function() {
|
|
877
|
-
return new
|
|
877
|
+
return new Ct(this.x, this.y);
|
|
878
878
|
},
|
|
879
879
|
add: function(t) {
|
|
880
880
|
return this.clone().m(t);
|
|
@@ -901,10 +901,10 @@
|
|
|
901
901
|
return this.clone().O(t, i);
|
|
902
902
|
},
|
|
903
903
|
matMult: function(t) {
|
|
904
|
-
return this.clone().
|
|
904
|
+
return this.clone().C(t);
|
|
905
905
|
},
|
|
906
906
|
unit: function() {
|
|
907
|
-
return this.clone().
|
|
907
|
+
return this.clone().I();
|
|
908
908
|
},
|
|
909
909
|
perp: function() {
|
|
910
910
|
return this.clone().T();
|
|
@@ -937,7 +937,7 @@
|
|
|
937
937
|
angleWithSep: function(t, i) {
|
|
938
938
|
return Math.atan2(this.x * i - this.y * t, this.x * t + this.y * i);
|
|
939
939
|
},
|
|
940
|
-
|
|
940
|
+
C: function(t) {
|
|
941
941
|
var i = t[0] * this.x + t[1] * this.y, n = t[2] * this.x + t[3] * this.y;
|
|
942
942
|
return this.x = i, this.y = n, this;
|
|
943
943
|
},
|
|
@@ -959,7 +959,7 @@
|
|
|
959
959
|
A: function(t) {
|
|
960
960
|
return this.x /= t.x, this.y /= t.y, this;
|
|
961
961
|
},
|
|
962
|
-
|
|
962
|
+
I: function() {
|
|
963
963
|
return this.P(this.mag()), this;
|
|
964
964
|
},
|
|
965
965
|
T: function() {
|
|
@@ -977,10 +977,10 @@
|
|
|
977
977
|
D: function() {
|
|
978
978
|
return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
|
|
979
979
|
}
|
|
980
|
-
},
|
|
981
|
-
return t instanceof
|
|
980
|
+
}, Ct.convert = function(t) {
|
|
981
|
+
return t instanceof Ct ? t : Array.isArray(t) ? new Ct(t[0], t[1]) : t;
|
|
982
982
|
};
|
|
983
|
-
const
|
|
983
|
+
const It = {
|
|
984
984
|
Point: 1,
|
|
985
985
|
LineString: 2,
|
|
986
986
|
Polygon: 3,
|
|
@@ -999,13 +999,13 @@
|
|
|
999
999
|
if (i.geometry && i.geometry.geometry) {
|
|
1000
1000
|
var r = i.geometry.coordinates, s = i.geometry.type, o = [], h = i.id;
|
|
1001
1001
|
if (n.promoteId ? h = i.properties[n.promoteId] : n.generateId && (h = e || 0),
|
|
1002
|
-
"Point" === s) Lt(r, o); else if ("MultiPoint" === s) for (var a = 0; a < r.length; a++) Lt(r[a], o); else if ("LineString" === s)
|
|
1002
|
+
"Point" === s) Lt(r, o); else if ("MultiPoint" === s) for (var a = 0; a < r.length; a++) Lt(r[a], o); else if ("LineString" === s) Et([ r ], o); else if ("MultiLineString" === s) {
|
|
1003
1003
|
if (n.lineMetrics) {
|
|
1004
|
-
for (a = 0; a < r.length; a++) o = [],
|
|
1004
|
+
for (a = 0; a < r.length; a++) o = [], Ut(r[a], o), t.push(jt(h, "LineString", o, i.properties));
|
|
1005
1005
|
return;
|
|
1006
1006
|
}
|
|
1007
|
-
|
|
1008
|
-
} else if ("Polygon" === s)
|
|
1007
|
+
Et(r, o);
|
|
1008
|
+
} else if ("Polygon" === s) Et(r, o); else {
|
|
1009
1009
|
if ("MultiPolygon" !== s) {
|
|
1010
1010
|
if ("GeometryCollection" === s) {
|
|
1011
1011
|
for (a = 0; a < i.geometry.geometries.length; a++) Dt(t, {
|
|
@@ -1019,7 +1019,7 @@
|
|
|
1019
1019
|
}
|
|
1020
1020
|
for (a = 0; a < r.length; a++) {
|
|
1021
1021
|
var l = [];
|
|
1022
|
-
|
|
1022
|
+
Et(r[a], l), o.push(l);
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
1025
|
t.push(jt(h, s, o, i.properties));
|
|
@@ -1028,22 +1028,22 @@
|
|
|
1028
1028
|
function Lt(t, i) {
|
|
1029
1029
|
i.push([ new Ot(t[0], t[1]) ]);
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function Ut(t, i) {
|
|
1032
1032
|
for (var n = 0; n < t.length; n++) {
|
|
1033
1033
|
var e = t[n][0], r = t[n][1];
|
|
1034
1034
|
i.push(new Ot(e, r));
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function Et(t, i, n, e) {
|
|
1038
1038
|
for (var r = 0; r < t.length; r++) {
|
|
1039
1039
|
var s = [];
|
|
1040
|
-
|
|
1040
|
+
Ut(t[r], s), i.push(s);
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
1043
|
function jt(t, i, n, e) {
|
|
1044
1044
|
return {
|
|
1045
1045
|
id: void 0 === t ? null : t,
|
|
1046
|
-
type:
|
|
1046
|
+
type: It[i],
|
|
1047
1047
|
geometry: n,
|
|
1048
1048
|
properties: e
|
|
1049
1049
|
};
|
|
@@ -1169,7 +1169,7 @@
|
|
|
1169
1169
|
}, Nt.prototype.resize = function(t) {
|
|
1170
1170
|
return this.free += t - this.w, this.w = t, !0;
|
|
1171
1171
|
};
|
|
1172
|
-
class
|
|
1172
|
+
class $t {
|
|
1173
1173
|
constructor(t, i) {
|
|
1174
1174
|
Wt(this, t, 1, i);
|
|
1175
1175
|
}
|
|
@@ -1177,7 +1177,7 @@
|
|
|
1177
1177
|
Ht(this, t, 1);
|
|
1178
1178
|
}
|
|
1179
1179
|
clone() {
|
|
1180
|
-
return new
|
|
1180
|
+
return new $t({
|
|
1181
1181
|
width: this.width,
|
|
1182
1182
|
height: this.height
|
|
1183
1183
|
}, new Uint8Array(this.data));
|
|
@@ -1186,7 +1186,7 @@
|
|
|
1186
1186
|
Vt(t, i, n, e, r, 1);
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
|
-
class
|
|
1189
|
+
class Gt {
|
|
1190
1190
|
constructor(t, i) {
|
|
1191
1191
|
Wt(this, t, 4, i);
|
|
1192
1192
|
}
|
|
@@ -1194,7 +1194,7 @@
|
|
|
1194
1194
|
Ht(this, t, 4);
|
|
1195
1195
|
}
|
|
1196
1196
|
clone() {
|
|
1197
|
-
return new
|
|
1197
|
+
return new Gt({
|
|
1198
1198
|
width: this.width,
|
|
1199
1199
|
height: this.height
|
|
1200
1200
|
}, new Uint8Array(this.data));
|
|
@@ -1244,13 +1244,13 @@
|
|
|
1244
1244
|
const t = Xt(n.w), i = Xt(n.h);
|
|
1245
1245
|
n.resize(t, i);
|
|
1246
1246
|
}
|
|
1247
|
-
const r = new
|
|
1247
|
+
const r = new Gt({
|
|
1248
1248
|
width: n.w,
|
|
1249
1249
|
height: n.h
|
|
1250
1250
|
});
|
|
1251
1251
|
for (const n in t) {
|
|
1252
1252
|
const e = t[n], s = i[n].paddedRect;
|
|
1253
|
-
|
|
1253
|
+
Gt.copy(e.data, r, {
|
|
1254
1254
|
x: 0,
|
|
1255
1255
|
y: 0
|
|
1256
1256
|
}, {
|
|
@@ -1300,7 +1300,7 @@
|
|
|
1300
1300
|
n.pack(e, {
|
|
1301
1301
|
inPlace: !0
|
|
1302
1302
|
});
|
|
1303
|
-
const r = new
|
|
1303
|
+
const r = new $t({
|
|
1304
1304
|
width: n.w,
|
|
1305
1305
|
height: n.h
|
|
1306
1306
|
});
|
|
@@ -1310,7 +1310,7 @@
|
|
|
1310
1310
|
const s = e[+t];
|
|
1311
1311
|
if (!s || 0 === s.bitmap.width || 0 === s.bitmap.height) continue;
|
|
1312
1312
|
const o = i[n][t].rect;
|
|
1313
|
-
|
|
1313
|
+
$t.copy(s.bitmap, r, {
|
|
1314
1314
|
x: 0,
|
|
1315
1315
|
y: 0
|
|
1316
1316
|
}, {
|
|
@@ -1333,9 +1333,9 @@
|
|
|
1333
1333
|
}
|
|
1334
1334
|
function ti(t) {
|
|
1335
1335
|
const i = t.type, n = [];
|
|
1336
|
-
if (1 === i || 4 === i) for (let i = 0; i < t.geometry.length; i++) Lt(t.geometry[i], n); else if (2 === i)
|
|
1336
|
+
if (1 === i || 4 === i) for (let i = 0; i < t.geometry.length; i++) Lt(t.geometry[i], n); else if (2 === i) Et(t.geometry, n); else if (3 === i) Et(t.geometry, n); else if (5 === i) Et(t.geometry, n); else if (6 === i) for (let i = 0; i < t.geometry.length; i++) {
|
|
1337
1337
|
const e = [];
|
|
1338
|
-
|
|
1338
|
+
Et(t.geometry[i], e), n.push(e);
|
|
1339
1339
|
}
|
|
1340
1340
|
return t.geometry = n, t;
|
|
1341
1341
|
}
|
|
@@ -1421,7 +1421,7 @@
|
|
|
1421
1421
|
}
|
|
1422
1422
|
const mi = {
|
|
1423
1423
|
lineWidth: 1,
|
|
1424
|
-
|
|
1424
|
+
lineStrokeWidth: 1,
|
|
1425
1425
|
lineDx: 1,
|
|
1426
1426
|
lineDy: 1,
|
|
1427
1427
|
lineOpacity: 1,
|
|
@@ -1521,7 +1521,7 @@
|
|
|
1521
1521
|
if (t && Object.keys(t).length) {
|
|
1522
1522
|
for (const i in t) {
|
|
1523
1523
|
const n = t[i], {width: e, height: r, data: s} = n.data;
|
|
1524
|
-
n.data = new
|
|
1524
|
+
n.data = new Gt({
|
|
1525
1525
|
width: e,
|
|
1526
1526
|
height: r
|
|
1527
1527
|
}, s);
|
|
@@ -1533,7 +1533,7 @@
|
|
|
1533
1533
|
const i = n[t];
|
|
1534
1534
|
for (const t in i) {
|
|
1535
1535
|
const n = i[t], {width: e, height: r, data: s} = n.bitmap;
|
|
1536
|
-
n.bitmap = new
|
|
1536
|
+
n.bitmap = new $t({
|
|
1537
1537
|
width: e,
|
|
1538
1538
|
height: r
|
|
1539
1539
|
}, s);
|
|
@@ -1691,16 +1691,16 @@
|
|
|
1691
1691
|
};
|
|
1692
1692
|
}
|
|
1693
1693
|
const wi = /\{([\w_]+)\}/g;
|
|
1694
|
-
const bi = t => t >= 128 && t <= 255, Mi = t => t >= 1536 && t <= 1791, xi = t => t >= 1872 && t <= 1919, Fi = t => t >= 2208 && t <= 2303, Ai = t => t >= 4352 && t <= 4607, ki = t => t >= 5120 && t <= 5759, _i = t => t >= 6320 && t <= 6399, Pi = t => t >= 8192 && t <= 8303, Si = t => t >= 8448 && t <= 8527, Oi = t => t >= 8528 && t <= 8591,
|
|
1694
|
+
const bi = t => t >= 128 && t <= 255, Mi = t => t >= 1536 && t <= 1791, xi = t => t >= 1872 && t <= 1919, Fi = t => t >= 2208 && t <= 2303, Ai = t => t >= 4352 && t <= 4607, ki = t => t >= 5120 && t <= 5759, _i = t => t >= 6320 && t <= 6399, Pi = t => t >= 8192 && t <= 8303, Si = t => t >= 8448 && t <= 8527, Oi = t => t >= 8528 && t <= 8591, Ci = t => t >= 8960 && t <= 9215, Ii = t => t >= 9216 && t <= 9279, Ti = t => t >= 9280 && t <= 9311, Di = t => t >= 9312 && t <= 9471, Li = t => t >= 9632 && t <= 9727, Ui = t => t >= 9728 && t <= 9983, Ei = t => t >= 11008 && t <= 11263, ji = t => t >= 11904 && t <= 12031, Ri = t => t >= 12032 && t <= 12255, Ni = t => t >= 12272 && t <= 12287, zi = t => t >= 12288 && t <= 12351, Wi = t => t >= 12352 && t <= 12447, Hi = t => t >= 12448 && t <= 12543, Vi = t => t >= 12544 && t <= 12591, $i = t => t >= 12592 && t <= 12687, Gi = t => t >= 12688 && t <= 12703, Ji = t => t >= 12704 && t <= 12735, qi = t => t >= 12736 && t <= 12783, Bi = t => t >= 12784 && t <= 12799, Xi = t => t >= 12800 && t <= 13055, Zi = t => t >= 13056 && t <= 13311, Yi = t => t >= 13312 && t <= 19903, Ki = t => t >= 19904 && t <= 19967, Qi = t => t >= 19968 && t <= 40959, tn = t => t >= 40960 && t <= 42127, nn = t => t >= 42128 && t <= 42191, en = t => t >= 43360 && t <= 43391, rn = t => t >= 44032 && t <= 55215, sn = t => t >= 55216 && t <= 55295, on = t => t >= 57344 && t <= 63743, hn = t => t >= 63744 && t <= 64255, an = t => t >= 64336 && t <= 65023, ln = t => t >= 65040 && t <= 65055, un = t => t >= 65072 && t <= 65103, cn = t => t >= 65104 && t <= 65135, fn = t => t >= 65136 && t <= 65279, dn = t => t >= 65280 && t <= 65519;
|
|
1695
1695
|
function yn(t) {
|
|
1696
1696
|
return !Mi(t) && (!xi(t) && (!Fi(t) && (!an(t) && !fn(t))));
|
|
1697
1697
|
}
|
|
1698
1698
|
function pn(t) {
|
|
1699
|
-
return 746 === t || 747 === t || !(t < 4352) && (!!Ji(t) || (!!Vi(t) || (!(!un(t) || t >= 65097 && t <= 65103) || (!!hn(t) || (!!Zi(t) || (!!ji(t) || (!!qi(t) || (!(!zi(t) || t >= 12296 && t <= 12305 || t >= 12308 && t <= 12319 || 12336 === t) || (!!Yi(t) || (!!Qi(t) || (!!Xi(t) || (
|
|
1699
|
+
return 746 === t || 747 === t || !(t < 4352) && (!!Ji(t) || (!!Vi(t) || (!(!un(t) || t >= 65097 && t <= 65103) || (!!hn(t) || (!!Zi(t) || (!!ji(t) || (!!qi(t) || (!(!zi(t) || t >= 12296 && t <= 12305 || t >= 12308 && t <= 12319 || 12336 === t) || (!!Yi(t) || (!!Qi(t) || (!!Xi(t) || (!!$i(t) || (!!en(t) || (!!sn(t) || (!!Ai(t) || (!!rn(t) || (!!Wi(t) || (!!Ni(t) || (!!Gi(t) || (!!Ri(t) || (!!Bi(t) || (!(!Hi(t) || 12540 === t) || (!(!dn(t) || 65288 === t || 65289 === t || 65293 === t || t >= 65306 && t <= 65310 || 65339 === t || 65341 === t || 65343 === t || t >= 65371 && t <= 65503 || 65507 === t || t >= 65512 && t <= 65519) || (!(!cn(t) || t >= 65112 && t <= 65118 || t >= 65123 && t <= 65126) || (!!ki(t) || (!!_i(t) || (!!ln(t) || (!!Ki(t) || (!!tn(t) || !!nn(t))))))))))))))))))))))))))))));
|
|
1700
1700
|
}
|
|
1701
1701
|
function mn(t) {
|
|
1702
1702
|
return !(pn(t) || function(t) {
|
|
1703
|
-
return !(!bi(t) || 167 !== t && 169 !== t && 174 !== t && 177 !== t && 188 !== t && 189 !== t && 190 !== t && 215 !== t && 247 !== t) || (!(!Pi(t) || 8214 !== t && 8224 !== t && 8225 !== t && 8240 !== t && 8241 !== t && 8251 !== t && 8252 !== t && 8258 !== t && 8263 !== t && 8264 !== t && 8265 !== t && 8273 !== t) || (!!Si(t) || (!!Oi(t) || (!(!
|
|
1703
|
+
return !(!bi(t) || 167 !== t && 169 !== t && 174 !== t && 177 !== t && 188 !== t && 189 !== t && 190 !== t && 215 !== t && 247 !== t) || (!(!Pi(t) || 8214 !== t && 8224 !== t && 8225 !== t && 8240 !== t && 8241 !== t && 8251 !== t && 8252 !== t && 8258 !== t && 8263 !== t && 8264 !== t && 8265 !== t && 8273 !== t) || (!!Si(t) || (!!Oi(t) || (!(!Ci(t) || !(t >= 8960 && t <= 8967 || t >= 8972 && t <= 8991 || t >= 8996 && t <= 9e3 || 9003 === t || t >= 9085 && t <= 9114 || t >= 9150 && t <= 9165 || 9167 === t || t >= 9169 && t <= 9179 || t >= 9186 && t <= 9215)) || (!(!Ii(t) || 9251 === t) || (!!Ti(t) || (!!Di(t) || (!!Li(t) || (!(!Ui(t) || t >= 9754 && t <= 9759) || (!(!Ei(t) || !(t >= 11026 && t <= 11055 || t >= 11088 && t <= 11097 || t >= 11192 && t <= 11243)) || (!!zi(t) || (!!Hi(t) || (!!on(t) || (!!un(t) || (!!cn(t) || (!!dn(t) || (8734 === t || 8756 === t || 8757 === t || t >= 9984 && t <= 10087 || t >= 10102 && t <= 10131 || 65532 === t || 65533 === t)))))))))))))))));
|
|
1704
1704
|
}(t));
|
|
1705
1705
|
}
|
|
1706
1706
|
function vn(t) {
|
|
@@ -1873,7 +1873,7 @@
|
|
|
1873
1873
|
}
|
|
1874
1874
|
if (f.length !== s) {
|
|
1875
1875
|
const t = l - h;
|
|
1876
|
-
c = Math.max(t, c),
|
|
1876
|
+
c = Math.max(t, c), Cn(f, i, s, f.length - 1, d);
|
|
1877
1877
|
}
|
|
1878
1878
|
l = 0, u -= e;
|
|
1879
1879
|
}
|
|
@@ -1963,7 +1963,7 @@
|
|
|
1963
1963
|
verticalAlign: n
|
|
1964
1964
|
};
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1966
|
+
function Cn(t, i, n, e, r) {
|
|
1967
1967
|
if (!r) return;
|
|
1968
1968
|
const s = i[t[e].glyph];
|
|
1969
1969
|
if (s) {
|
|
@@ -1972,7 +1972,7 @@
|
|
|
1972
1972
|
for (let i = n; i <= e; i++) t[i].x -= o;
|
|
1973
1973
|
}
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1975
|
+
function In(t) {
|
|
1976
1976
|
if (!function(t) {
|
|
1977
1977
|
for (const i of t) if (vn(i.charCodeAt(0))) return !0;
|
|
1978
1978
|
return !1;
|
|
@@ -2151,7 +2151,7 @@
|
|
|
2151
2151
|
const n = _[i];
|
|
2152
2152
|
return ni(n) ? "" : Array.isArray(n) ? n.join() : n;
|
|
2153
2153
|
})) : k);
|
|
2154
|
-
n && n.length && (n =
|
|
2154
|
+
n && n.length && (n = In(n), v.glyph = {
|
|
2155
2155
|
font: i,
|
|
2156
2156
|
text: n
|
|
2157
2157
|
});
|
|
@@ -2170,7 +2170,7 @@
|
|
|
2170
2170
|
* From mapbox-gl-js
|
|
2171
2171
|
* MIT License
|
|
2172
2172
|
* https://github.com/mapbox/mapbox-gl-js
|
|
2173
|
-
*/ function
|
|
2173
|
+
*/ function Un(t, i, n, e, r) {
|
|
2174
2174
|
const s = [];
|
|
2175
2175
|
for (let o = 0; o < t.length; o++) {
|
|
2176
2176
|
const h = t[o];
|
|
@@ -2186,12 +2186,12 @@
|
|
|
2186
2186
|
}
|
|
2187
2187
|
return s;
|
|
2188
2188
|
}
|
|
2189
|
-
class
|
|
2189
|
+
class En extends Ot {
|
|
2190
2190
|
constructor(t, i, n, e) {
|
|
2191
2191
|
super(t, i), this.angle = n, void 0 !== e && (this.segment = e);
|
|
2192
2192
|
}
|
|
2193
2193
|
clone() {
|
|
2194
|
-
return new
|
|
2194
|
+
return new En(this.x, this.y, this.angle, this.segment);
|
|
2195
2195
|
}
|
|
2196
2196
|
}
|
|
2197
2197
|
/*!
|
|
@@ -2241,7 +2241,7 @@
|
|
|
2241
2241
|
d += e;
|
|
2242
2242
|
const m = (d - f) / a, v = Nn(n.x, h.x, m), g = Nn(n.y, h.y, m);
|
|
2243
2243
|
if (v >= 0 && v < l && g >= 0 && g < l && d - u >= 0 && d + u <= c) {
|
|
2244
|
-
const n = new
|
|
2244
|
+
const n = new En(v, g, p, t);
|
|
2245
2245
|
n.line = i, n.D(), r && !jn(i, n, o, r, s) || y.push(n);
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
@@ -2302,18 +2302,18 @@
|
|
|
2302
2302
|
function Vn(t, i) {
|
|
2303
2303
|
return i.area - t.area;
|
|
2304
2304
|
}
|
|
2305
|
-
var
|
|
2305
|
+
var $n = {
|
|
2306
2306
|
exports: {}
|
|
2307
2307
|
};
|
|
2308
|
-
function
|
|
2309
|
-
if (!(this instanceof
|
|
2308
|
+
function Gn(t, i) {
|
|
2309
|
+
if (!(this instanceof Gn)) return new Gn(t, i);
|
|
2310
2310
|
if (this.data = t || [], this.length = this.data.length, this.compare = i || Jn,
|
|
2311
2311
|
this.length > 0) for (var n = (this.length >> 1) - 1; n >= 0; n--) this.G(n);
|
|
2312
2312
|
}
|
|
2313
2313
|
function Jn(t, i) {
|
|
2314
2314
|
return t < i ? -1 : t > i ? 1 : 0;
|
|
2315
2315
|
}
|
|
2316
|
-
|
|
2316
|
+
$n.exports = Gn, $n.exports.default = Gn, Gn.prototype = {
|
|
2317
2317
|
push: function(t) {
|
|
2318
2318
|
this.data.push(t), this.length++, this.J(this.length - 1);
|
|
2319
2319
|
},
|
|
@@ -2344,7 +2344,7 @@
|
|
|
2344
2344
|
i[t] = r;
|
|
2345
2345
|
}
|
|
2346
2346
|
};
|
|
2347
|
-
var qn =
|
|
2347
|
+
var qn = $n.exports;
|
|
2348
2348
|
function Bn(t, i, n) {
|
|
2349
2349
|
const e = i.distSqr(n);
|
|
2350
2350
|
if (0 === e) return t.distSqr(i);
|
|
@@ -3021,24 +3021,24 @@
|
|
|
3021
3021
|
}(e);
|
|
3022
3022
|
}));
|
|
3023
3023
|
}));
|
|
3024
|
-
var Se = Pe, Oe = Qn.exports,
|
|
3025
|
-
Object.keys(
|
|
3026
|
-
De[
|
|
3024
|
+
var Se = Pe, Oe = Qn.exports, Ce = Se, Ie = [].slice, Te = [ "keyword", "gray", "hex" ], De = {};
|
|
3025
|
+
Object.keys(Ce).forEach((function(t) {
|
|
3026
|
+
De[Ie.call(Ce[t].labels).sort().join("")] = t;
|
|
3027
3027
|
}));
|
|
3028
3028
|
var Le = {};
|
|
3029
|
-
function
|
|
3030
|
-
if (!(this instanceof
|
|
3031
|
-
if (i && i in Te && (i = null), i && !(i in
|
|
3029
|
+
function Ue(t, i) {
|
|
3030
|
+
if (!(this instanceof Ue)) return new Ue(t, i);
|
|
3031
|
+
if (i && i in Te && (i = null), i && !(i in Ce)) throw new Error("Unknown model: " + i);
|
|
3032
3032
|
var n, e;
|
|
3033
|
-
if (null == t) this.model = "rgb", this.color = [ 0, 0, 0 ], this.valpha = 1; else if (t instanceof
|
|
3033
|
+
if (null == t) this.model = "rgb", this.color = [ 0, 0, 0 ], this.valpha = 1; else if (t instanceof Ue) this.model = t.model,
|
|
3034
3034
|
this.color = t.color.slice(), this.valpha = t.valpha; else if ("string" == typeof t) {
|
|
3035
3035
|
var r = Oe.get(t);
|
|
3036
3036
|
if (null === r) throw new Error("Unable to parse color from string: " + t);
|
|
3037
|
-
this.model = r.model, e =
|
|
3037
|
+
this.model = r.model, e = Ce[this.model].channels, this.color = r.value.slice(0, e),
|
|
3038
3038
|
this.valpha = "number" == typeof r.value[e] ? r.value[e] : 1;
|
|
3039
3039
|
} else if (t.length) {
|
|
3040
|
-
this.model = i || "rgb", e =
|
|
3041
|
-
var s =
|
|
3040
|
+
this.model = i || "rgb", e = Ce[this.model].channels;
|
|
3041
|
+
var s = Ie.call(t, 0, e);
|
|
3042
3042
|
this.color = Ne(s, e), this.valpha = "number" == typeof t[e] ? t[e] : 1;
|
|
3043
3043
|
} else if ("number" == typeof t) t &= 16777215, this.model = "rgb", this.color = [ t >> 16 & 255, t >> 8 & 255, 255 & t ],
|
|
3044
3044
|
this.valpha = 1; else {
|
|
@@ -3048,17 +3048,17 @@
|
|
|
3048
3048
|
var h = o.sort().join("");
|
|
3049
3049
|
if (!(h in De)) throw new Error("Unable to parse color from object: " + JSON.stringify(t));
|
|
3050
3050
|
this.model = De[h];
|
|
3051
|
-
var a =
|
|
3051
|
+
var a = Ce[this.model].labels, l = [];
|
|
3052
3052
|
for (n = 0; n < a.length; n++) l.push(t[a[n]]);
|
|
3053
3053
|
this.color = Ne(l);
|
|
3054
3054
|
}
|
|
3055
|
-
if (Le[this.model]) for (e =
|
|
3055
|
+
if (Le[this.model]) for (e = Ce[this.model].channels, n = 0; n < e; n++) {
|
|
3056
3056
|
var u = Le[this.model][n];
|
|
3057
3057
|
u && (this.color[n] = u(this.color[n]));
|
|
3058
3058
|
}
|
|
3059
3059
|
this.valpha = Math.max(0, Math.min(1, this.valpha)), Object.freeze && Object.freeze(this);
|
|
3060
3060
|
}
|
|
3061
|
-
function
|
|
3061
|
+
function Ee(t, i, n) {
|
|
3062
3062
|
return (t = Array.isArray(t) ? t : [ t ]).forEach((function(t) {
|
|
3063
3063
|
(Le[t] || (Le[t] = []))[i] = n;
|
|
3064
3064
|
})), t = t[0], function(e) {
|
|
@@ -3079,7 +3079,7 @@
|
|
|
3079
3079
|
for (var n = 0; n < i; n++) "number" != typeof t[n] && (t[n] = 0);
|
|
3080
3080
|
return t;
|
|
3081
3081
|
}
|
|
3082
|
-
|
|
3082
|
+
Ue.prototype = {
|
|
3083
3083
|
toString: function() {
|
|
3084
3084
|
return this.string();
|
|
3085
3085
|
},
|
|
@@ -3098,7 +3098,7 @@
|
|
|
3098
3098
|
return 1 === this.valpha ? this.color.slice() : this.color.concat(this.valpha);
|
|
3099
3099
|
},
|
|
3100
3100
|
object: function() {
|
|
3101
|
-
for (var t = {}, i =
|
|
3101
|
+
for (var t = {}, i = Ce[this.model].channels, n = Ce[this.model].labels, e = 0; e < i; e++) t[n[e]] = this.color[e];
|
|
3102
3102
|
return 1 !== this.valpha && (t.alpha = this.valpha), t;
|
|
3103
3103
|
},
|
|
3104
3104
|
unitArray: function() {
|
|
@@ -3112,7 +3112,7 @@
|
|
|
3112
3112
|
t;
|
|
3113
3113
|
},
|
|
3114
3114
|
round: function(t) {
|
|
3115
|
-
return t = Math.max(t || 0, 0), new
|
|
3115
|
+
return t = Math.max(t || 0, 0), new Ue(this.color.map(function(t) {
|
|
3116
3116
|
return function(i) {
|
|
3117
3117
|
return function(t, i) {
|
|
3118
3118
|
return Number(t.toFixed(i));
|
|
@@ -3121,37 +3121,37 @@
|
|
|
3121
3121
|
}(t)).concat(this.valpha), this.model);
|
|
3122
3122
|
},
|
|
3123
3123
|
alpha: function(t) {
|
|
3124
|
-
return arguments.length ? new
|
|
3124
|
+
return arguments.length ? new Ue(this.color.concat(Math.max(0, Math.min(1, t))), this.model) : this.valpha;
|
|
3125
3125
|
},
|
|
3126
|
-
red:
|
|
3127
|
-
green:
|
|
3128
|
-
blue:
|
|
3129
|
-
hue:
|
|
3126
|
+
red: Ee("rgb", 0, je(255)),
|
|
3127
|
+
green: Ee("rgb", 1, je(255)),
|
|
3128
|
+
blue: Ee("rgb", 2, je(255)),
|
|
3129
|
+
hue: Ee([ "hsl", "hsv", "hsl", "hwb", "hcg" ], 0, (function(t) {
|
|
3130
3130
|
return (t % 360 + 360) % 360;
|
|
3131
3131
|
})),
|
|
3132
|
-
saturationl:
|
|
3133
|
-
lightness:
|
|
3134
|
-
saturationv:
|
|
3135
|
-
value:
|
|
3136
|
-
chroma:
|
|
3137
|
-
gray:
|
|
3138
|
-
white:
|
|
3139
|
-
wblack:
|
|
3140
|
-
cyan:
|
|
3141
|
-
magenta:
|
|
3142
|
-
yellow:
|
|
3143
|
-
black:
|
|
3144
|
-
x:
|
|
3145
|
-
y:
|
|
3146
|
-
z:
|
|
3147
|
-
l:
|
|
3148
|
-
a:
|
|
3149
|
-
b:
|
|
3132
|
+
saturationl: Ee("hsl", 1, je(100)),
|
|
3133
|
+
lightness: Ee("hsl", 2, je(100)),
|
|
3134
|
+
saturationv: Ee("hsv", 1, je(100)),
|
|
3135
|
+
value: Ee("hsv", 2, je(100)),
|
|
3136
|
+
chroma: Ee("hcg", 1, je(100)),
|
|
3137
|
+
gray: Ee("hcg", 2, je(100)),
|
|
3138
|
+
white: Ee("hwb", 1, je(100)),
|
|
3139
|
+
wblack: Ee("hwb", 2, je(100)),
|
|
3140
|
+
cyan: Ee("cmyk", 0, je(100)),
|
|
3141
|
+
magenta: Ee("cmyk", 1, je(100)),
|
|
3142
|
+
yellow: Ee("cmyk", 2, je(100)),
|
|
3143
|
+
black: Ee("cmyk", 3, je(100)),
|
|
3144
|
+
x: Ee("xyz", 0, je(100)),
|
|
3145
|
+
y: Ee("xyz", 1, je(100)),
|
|
3146
|
+
z: Ee("xyz", 2, je(100)),
|
|
3147
|
+
l: Ee("lab", 0, je(100)),
|
|
3148
|
+
a: Ee("lab", 1),
|
|
3149
|
+
b: Ee("lab", 2),
|
|
3150
3150
|
keyword: function(t) {
|
|
3151
|
-
return arguments.length ? new
|
|
3151
|
+
return arguments.length ? new Ue(t) : Ce[this.model].keyword(this.color);
|
|
3152
3152
|
},
|
|
3153
3153
|
hex: function(t) {
|
|
3154
|
-
return arguments.length ? new
|
|
3154
|
+
return arguments.length ? new Ue(t) : Oe.to.hex(this.rgb().round().color);
|
|
3155
3155
|
},
|
|
3156
3156
|
rgbNumber: function() {
|
|
3157
3157
|
var t = this.rgb().color;
|
|
@@ -3209,7 +3209,7 @@
|
|
|
3209
3209
|
},
|
|
3210
3210
|
grayscale: function() {
|
|
3211
3211
|
var t = this.rgb().color, i = .3 * t[0] + .59 * t[1] + .11 * t[2];
|
|
3212
|
-
return
|
|
3212
|
+
return Ue.rgb(i, i, i);
|
|
3213
3213
|
},
|
|
3214
3214
|
fade: function(t) {
|
|
3215
3215
|
return this.alpha(this.valpha - this.valpha * t);
|
|
@@ -3224,22 +3224,22 @@
|
|
|
3224
3224
|
mix: function(t, i) {
|
|
3225
3225
|
if (!t || !t.rgb) throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof t);
|
|
3226
3226
|
var n = t.rgb(), e = this.rgb(), r = void 0 === i ? .5 : i, s = 2 * r - 1, o = n.alpha() - e.alpha(), h = ((s * o == -1 ? s : (s + o) / (1 + s * o)) + 1) / 2, a = 1 - h;
|
|
3227
|
-
return
|
|
3227
|
+
return Ue.rgb(h * n.red() + a * e.red(), h * n.green() + a * e.green(), h * n.blue() + a * e.blue(), n.alpha() * r + e.alpha() * (1 - r));
|
|
3228
3228
|
}
|
|
3229
|
-
}, Object.keys(
|
|
3229
|
+
}, Object.keys(Ce).forEach((function(t) {
|
|
3230
3230
|
if (-1 === Te.indexOf(t)) {
|
|
3231
|
-
var i =
|
|
3232
|
-
|
|
3233
|
-
if (this.model === t) return new
|
|
3234
|
-
if (arguments.length) return new
|
|
3231
|
+
var i = Ce[t].channels;
|
|
3232
|
+
Ue.prototype[t] = function() {
|
|
3233
|
+
if (this.model === t) return new Ue(this);
|
|
3234
|
+
if (arguments.length) return new Ue(arguments, t);
|
|
3235
3235
|
var n = "number" == typeof arguments[i] ? i : this.valpha;
|
|
3236
|
-
return new
|
|
3237
|
-
},
|
|
3238
|
-
return "number" == typeof n && (n = Ne(
|
|
3236
|
+
return new Ue(Re(Ce[this.model][t].raw(this.color)).concat(n), t);
|
|
3237
|
+
}, Ue[t] = function(n) {
|
|
3238
|
+
return "number" == typeof n && (n = Ne(Ie.call(arguments), i)), new Ue(n, t);
|
|
3239
3239
|
};
|
|
3240
3240
|
}
|
|
3241
3241
|
}));
|
|
3242
|
-
var ze =
|
|
3242
|
+
var ze = Ue;
|
|
3243
3243
|
const We = 14;
|
|
3244
3244
|
class He extends vi {
|
|
3245
3245
|
static splitPointSymbol(t, i = 0) {
|
|
@@ -3488,11 +3488,11 @@
|
|
|
3488
3488
|
if (pn(t.charAt(n).charCodeAt(0))) i = 0; else if (i++, i >= 1) return !1;
|
|
3489
3489
|
}
|
|
3490
3490
|
return !0;
|
|
3491
|
-
}(t.getIconAndGlyph().glyph.text) ? 1 : 0, {textFillFn: c, textSizeFn: f, textHaloFillFn: d, textHaloRadiusFn: y, textHaloOpacityFn: p, textDxFn: m, textDyFn: v, textPitchAlignmentFn: w, textRotationAlignmentFn: b, textRotationFn: M, textAllowOverlapFn: x, textIgnorePlacementFn: F, textOpacityFn: A, markerWidthFn: k, markerHeightFn: _, markerDxFn: P, markerDyFn: S, markerPitchAlignmentFn: O, markerRotationAlignmentFn:
|
|
3492
|
-
let
|
|
3491
|
+
}(t.getIconAndGlyph().glyph.text) ? 1 : 0, {textFillFn: c, textSizeFn: f, textHaloFillFn: d, textHaloRadiusFn: y, textHaloOpacityFn: p, textDxFn: m, textDyFn: v, textPitchAlignmentFn: w, textRotationAlignmentFn: b, textRotationFn: M, textAllowOverlapFn: x, textIgnorePlacementFn: F, textOpacityFn: A, markerWidthFn: k, markerHeightFn: _, markerDxFn: P, markerDyFn: S, markerPitchAlignmentFn: O, markerRotationAlignmentFn: C, markerRotationFn: I, markerAllowOverlapFn: T, markerIgnorePlacementFn: D, markerOpacityFn: L} = this.j;
|
|
3492
|
+
let U, E, j, R, N, z, W, H, V, $, G, J, q, B, X, Z, Y;
|
|
3493
3493
|
if (l) {
|
|
3494
3494
|
const i = t.getIconAndGlyph().glyph.font;
|
|
3495
|
-
|
|
3495
|
+
U = function(t, i, n) {
|
|
3496
3496
|
const e = t.positionedGlyphs, r = [];
|
|
3497
3497
|
for (let s = 0; s < e.length; s++) {
|
|
3498
3498
|
const o = e[s], h = n[o.glyph];
|
|
@@ -3515,13 +3515,13 @@
|
|
|
3515
3515
|
});
|
|
3516
3516
|
}
|
|
3517
3517
|
return r;
|
|
3518
|
-
}(n.horizontal, a, this.glyphAtlas.positions[i]), c && (
|
|
3519
|
-
3 ===
|
|
3518
|
+
}(n.horizontal, a, this.glyphAtlas.positions[i]), c && (E = c(null, h), g(E) ? E = [ 0, 0, 0, 0 ] : (E = Array.isArray(E) ? E.map(t => 255 * t) : ze(E).array(),
|
|
3519
|
+
3 === E.length && E.push(255))), f && (j = f(this.options.zoom, h), null == j && (j = We)),
|
|
3520
3520
|
d && (R = d(null, h), R = Array.isArray(R) ? R.map(t => 255 * t) : ze(R).array(),
|
|
3521
3521
|
3 === R.length && R.push(255)), y && (N = y(null, h)), p && (z = 255 * p(null, h)),
|
|
3522
3522
|
m && (W = m(null, h) || 0), v && (H = v(null, h) || 0), w && (q = +("map" === w(null, h))),
|
|
3523
3523
|
b && (B = +("map" === b(null, h))), M && (X = yi(M(null, h), 0, 360) * Math.PI / 180);
|
|
3524
|
-
} else
|
|
3524
|
+
} else U = n ? function(t) {
|
|
3525
3525
|
const i = t.image, n = t.top - 1 / i.pixelRatio, e = t.left - 1 / i.pixelRatio, r = t.bottom + 1 / i.pixelRatio, s = t.right + 1 / i.pixelRatio;
|
|
3526
3526
|
let o, h, a, l;
|
|
3527
3527
|
return o = new Ot(e, n), h = new Ot(s, n), a = new Ot(s, r), l = new Ot(e, r), [ {
|
|
@@ -3554,8 +3554,8 @@
|
|
|
3554
3554
|
writingMode: void 0,
|
|
3555
3555
|
glyphOffset: [ 0, 0 ]
|
|
3556
3556
|
} ];
|
|
3557
|
-
}(), k && (V = k(null, h)), _ && (
|
|
3558
|
-
O && (q = +("map" === O(null, h))),
|
|
3557
|
+
}(), k && (V = k(null, h)), _ && ($ = _(null, h)), P && (G = P(null, h)), S && (J = S(null, h)),
|
|
3558
|
+
O && (q = +("map" === O(null, h))), C && (B = +("map" === C(null, h))), I && (X = yi(I(null, h), 0, 360) * Math.PI / 180);
|
|
3559
3559
|
const K = T || x;
|
|
3560
3560
|
K && (Z = K(null, h) || 0);
|
|
3561
3561
|
const Q = D || F;
|
|
@@ -3563,19 +3563,19 @@
|
|
|
3563
3563
|
Q && (Y = Q(null, h) || 0);
|
|
3564
3564
|
const it = A || L;
|
|
3565
3565
|
it && (tt = 255 * it(this.options.zoom, h));
|
|
3566
|
-
const nt = this.options.EXTENT, et =
|
|
3566
|
+
const nt = this.options.EXTENT, et = U.length, rt = this.getAltitude(t.feature.properties);
|
|
3567
3567
|
for (let t = 0; t < e.length; t++) {
|
|
3568
3568
|
const i = e[t];
|
|
3569
3569
|
if (nt !== 1 / 0 && di(i, nt)) continue;
|
|
3570
|
-
const n = i.x, o = i.y, h =
|
|
3570
|
+
const n = i.x, o = i.y, h = U.length;
|
|
3571
3571
|
for (let t = 0; t < h; t++) {
|
|
3572
|
-
const e =
|
|
3572
|
+
const e = U[t], {tl: h, tr: c, bl: f, br: d, tex: y} = e;
|
|
3573
3573
|
this.K(r, n, o, rt, 10 * h.x, 10 * h.y, y.x, y.y + y.h), l && this.tt(r, a, et, e.glyphOffset, i, u),
|
|
3574
|
-
this.it(r,
|
|
3575
|
-
l && this.tt(r, a, et, e.glyphOffset, i, u), this.it(r,
|
|
3574
|
+
this.it(r, E, j, R, N, z, W, H, V, $, G, J, tt, q, B, X, Z, Y), this.K(r, n, o, rt, 10 * c.x, 10 * c.y, y.x + y.w, y.y + y.h),
|
|
3575
|
+
l && this.tt(r, a, et, e.glyphOffset, i, u), this.it(r, E, j, R, N, z, W, H, V, $, G, J, tt, q, B, X, Z, Y),
|
|
3576
3576
|
this.K(r, n, o, rt, 10 * f.x, 10 * f.y, y.x, y.y), l && this.tt(r, a, et, e.glyphOffset, i, u),
|
|
3577
|
-
this.it(r,
|
|
3578
|
-
l && this.tt(r, a, et, e.glyphOffset, i, u), this.it(r,
|
|
3577
|
+
this.it(r, E, j, R, N, z, W, H, V, $, G, J, tt, q, B, X, Z, Y), this.K(r, n, o, rt, 10 * d.x, 10 * d.y, y.x + y.w, y.y),
|
|
3578
|
+
l && this.tt(r, a, et, e.glyphOffset, i, u), this.it(r, E, j, R, N, z, W, H, V, $, G, J, tt, q, B, X, Z, Y),
|
|
3579
3579
|
this.addElements(s, s + 1, s + 2), this.addElements(s + 1, s + 2, s + 3), s += 4;
|
|
3580
3580
|
const p = Math.max(Math.abs(n), Math.abs(o), Math.abs(rt));
|
|
3581
3581
|
p > this.maxPos && (this.maxPos = p);
|
|
@@ -3593,12 +3593,12 @@
|
|
|
3593
3593
|
}
|
|
3594
3594
|
}
|
|
3595
3595
|
it(t, i, n, e, r, s, o, h, a, l, u, c, f, d, y, p, m, v) {
|
|
3596
|
-
const {textFillFn: g, textSizeFn: w, textHaloFillFn: b, textHaloRadiusFn: M, textHaloOpacityFn: x, textDxFn: F, textDyFn: A, textPitchAlignmentFn: k, textRotationAlignmentFn: _, textRotationFn: P, textAllowOverlapFn: S, textIgnorePlacementFn: O, textOpacityFn:
|
|
3596
|
+
const {textFillFn: g, textSizeFn: w, textHaloFillFn: b, textHaloRadiusFn: M, textHaloOpacityFn: x, textDxFn: F, textDyFn: A, textPitchAlignmentFn: k, textRotationAlignmentFn: _, textRotationFn: P, textAllowOverlapFn: S, textIgnorePlacementFn: O, textOpacityFn: C, markerWidthFn: I, markerHeightFn: T, markerDxFn: D, markerDyFn: L, markerPitchAlignmentFn: U, markerRotationAlignmentFn: E, markerRotationFn: j, markerAllowOverlapFn: R, markerIgnorePlacementFn: N, markerOpacityFn: z} = this.j;
|
|
3597
3597
|
g && t.aTextFill.push(...i), w && t.aTextSize.push(n), b && t.aTextHaloFill.push(...e),
|
|
3598
3598
|
M && t.aTextHaloRadius.push(r), x && t.aTextHaloOpacity.push(s), F && t.aTextDx.push(o),
|
|
3599
|
-
A && t.aTextDy.push(h),
|
|
3599
|
+
A && t.aTextDy.push(h), I && t.aMarkerWidth.push(a), T && t.aMarkerHeight.push(l),
|
|
3600
3600
|
D && t.aMarkerDx.push(u), L && t.aMarkerDy.push(c);
|
|
3601
|
-
(z ||
|
|
3601
|
+
(z || C) && t.aColorOpacity.push(f), (k || U) && t.aPitchAlign.push(d), (E || _) && t.aRotationAlign.push(y),
|
|
3602
3602
|
(j || P) && t.aRotation.push(9362 * p);
|
|
3603
3603
|
const W = R || S, H = N || O;
|
|
3604
3604
|
if (W || H) {
|
|
@@ -3613,7 +3613,7 @@
|
|
|
3613
3613
|
const {feature: h, size: a, symbol: l} = t, u = a ? 24 : 0, c = e * (a ? a[0] / u : 1), f = [];
|
|
3614
3614
|
if ("line" === s) {
|
|
3615
3615
|
let t = h.geometry;
|
|
3616
|
-
r && (t =
|
|
3616
|
+
r && (t = Un(h.geometry, 0, 0, r, r));
|
|
3617
3617
|
for (let e = 0; e < t.length; e++) {
|
|
3618
3618
|
const s = Rn(t[e], o, Kn, l.isIconText ? null : n.vertical || n.horizontal || n, null, u, l.isIconText ? 1 : c, 1, r || 1 / 0);
|
|
3619
3619
|
if (l.textPlacement && !l.isIconText) for (let t = 0; t < s.length; t++) s[t].startIndex = i.length / 3;
|
|
@@ -3647,8 +3647,8 @@
|
|
|
3647
3647
|
return n ? n(null, i.feature && i.feature.properties) : e ? e(null, i.feature && i.feature.properties) : t.markerPlacement || t.textPlacement;
|
|
3648
3648
|
}
|
|
3649
3649
|
}
|
|
3650
|
-
const Ve = Math.cos(Math.PI / 180 * 37.5),
|
|
3651
|
-
class
|
|
3650
|
+
const Ve = Math.cos(Math.PI / 180 * 37.5), $e = Math.pow(2, 16) / 1;
|
|
3651
|
+
class Ge extends vi {
|
|
3652
3652
|
constructor(t, i, n) {
|
|
3653
3653
|
super(t, i, n);
|
|
3654
3654
|
let e = !1;
|
|
@@ -3663,98 +3663,104 @@
|
|
|
3663
3663
|
return !this.options.atlas && o && (r[o] = 1), s;
|
|
3664
3664
|
}
|
|
3665
3665
|
getFormat() {
|
|
3666
|
-
const {lineWidthFn: t,
|
|
3666
|
+
const {lineWidthFn: t, lineStrokeWidthFn: i, lineStrokeColorFn: n, lineColorFn: e, lineOpacityFn: r, lineDxFn: s, lineDyFn: o, linePatternAnimSpeedFn: h, linePatternGapFn: a} = this.j, l = [ {
|
|
3667
3667
|
type: Int16Array,
|
|
3668
3668
|
width: 3,
|
|
3669
3669
|
name: "aPosition"
|
|
3670
3670
|
} ];
|
|
3671
|
-
if (this.options.center || this.iconAtlas ?
|
|
3671
|
+
if (this.options.center || this.iconAtlas ? l.push({
|
|
3672
3672
|
type: Int8Array,
|
|
3673
3673
|
width: 3,
|
|
3674
3674
|
name: "aExtrude"
|
|
3675
|
-
}) :
|
|
3675
|
+
}) : l.push({
|
|
3676
3676
|
type: Int8Array,
|
|
3677
3677
|
width: 2,
|
|
3678
3678
|
name: "aExtrude"
|
|
3679
|
-
}),
|
|
3679
|
+
}), l.push({
|
|
3680
3680
|
type: Uint16Array,
|
|
3681
3681
|
width: 1,
|
|
3682
3682
|
name: "aLinesofar"
|
|
3683
|
-
}), t &&
|
|
3683
|
+
}), t && l.push({
|
|
3684
3684
|
type: Uint8Array,
|
|
3685
3685
|
width: 1,
|
|
3686
3686
|
name: "aLineWidth"
|
|
3687
|
-
}), i &&
|
|
3687
|
+
}), i && l.push({
|
|
3688
3688
|
type: Uint8Array,
|
|
3689
3689
|
width: 1,
|
|
3690
|
-
name: "
|
|
3691
|
-
}),
|
|
3690
|
+
name: "aLineStrokeWidth"
|
|
3691
|
+
}), e && l.push({
|
|
3692
3692
|
type: Uint8Array,
|
|
3693
3693
|
width: 4,
|
|
3694
3694
|
name: "aColor"
|
|
3695
|
-
}),
|
|
3695
|
+
}), n && l.push({
|
|
3696
|
+
type: Uint8Array,
|
|
3697
|
+
width: 4,
|
|
3698
|
+
name: "aStrokeColor"
|
|
3699
|
+
}), r && l.push({
|
|
3696
3700
|
type: Uint8Array,
|
|
3697
3701
|
width: 1,
|
|
3698
3702
|
name: "aOpacity"
|
|
3699
|
-
}), this.symbol.lineOffset &&
|
|
3703
|
+
}), this.symbol.lineOffset && l.push({
|
|
3700
3704
|
type: Int8Array,
|
|
3701
3705
|
width: 2,
|
|
3702
3706
|
name: "aExtrudeOffset"
|
|
3703
|
-
}), this.dasharrayFn &&
|
|
3707
|
+
}), this.dasharrayFn && l.push({
|
|
3704
3708
|
type: Uint8Array,
|
|
3705
3709
|
width: 4,
|
|
3706
3710
|
name: "aDasharray"
|
|
3707
|
-
}), this.dashColorFn &&
|
|
3711
|
+
}), this.dashColorFn && l.push({
|
|
3708
3712
|
type: Uint8Array,
|
|
3709
3713
|
width: 4,
|
|
3710
3714
|
name: "aDashColor"
|
|
3711
3715
|
}), this.iconAtlas) {
|
|
3712
3716
|
const t = this.getIconAtlasMaxValue();
|
|
3713
|
-
|
|
3717
|
+
l.push({
|
|
3714
3718
|
type: t > 255 ? Uint16Array : Uint8Array,
|
|
3715
3719
|
width: 4,
|
|
3716
3720
|
name: "aTexInfo"
|
|
3717
3721
|
});
|
|
3718
3722
|
}
|
|
3719
|
-
return
|
|
3723
|
+
return s && l.push({
|
|
3720
3724
|
type: Int8Array,
|
|
3721
3725
|
width: 1,
|
|
3722
3726
|
name: "aLineDx"
|
|
3723
|
-
}),
|
|
3727
|
+
}), o && l.push({
|
|
3724
3728
|
type: Int8Array,
|
|
3725
3729
|
width: 1,
|
|
3726
3730
|
name: "aLineDy"
|
|
3727
|
-
}),
|
|
3731
|
+
}), h && l.push({
|
|
3728
3732
|
type: Int8Array,
|
|
3729
3733
|
width: 1,
|
|
3730
3734
|
name: "aLinePatternAnimSpeed"
|
|
3731
|
-
}),
|
|
3735
|
+
}), a && l.push({
|
|
3732
3736
|
type: Uint8Array,
|
|
3733
3737
|
width: 1,
|
|
3734
3738
|
name: "aLinePatternGap"
|
|
3735
|
-
}),
|
|
3739
|
+
}), l;
|
|
3736
3740
|
}
|
|
3737
3741
|
placeVector(t) {
|
|
3738
|
-
const {lineJoinFn: i, lineCapFn: n, lineWidthFn: e,
|
|
3739
|
-
|
|
3740
|
-
let
|
|
3741
|
-
if (i && (
|
|
3742
|
+
const {lineJoinFn: i, lineCapFn: n, lineWidthFn: e, lineStrokeWidthFn: r, lineStrokeColorFn: s, lineColorFn: o, lineOpacityFn: h, lineJoinPatternModeFn: a, lineDxFn: l, lineDyFn: u, linePatternAnimSpeedFn: c, linePatternGapFn: f} = this.j, d = this.symbol, y = t.feature, p = 3 === y.type, m = this.elements;
|
|
3743
|
+
p && (this.elements = []);
|
|
3744
|
+
let v = d.lineJoin || "miter", w = d.lineCap || "butt";
|
|
3745
|
+
if (i && (v = i(this.options.zoom, y.properties) || "miter"), n && (w = n(this.options.zoom, y.properties) || "butt"),
|
|
3742
3746
|
e) {
|
|
3743
|
-
let t = e(this.options.zoom,
|
|
3747
|
+
let t = e(this.options.zoom, y.properties);
|
|
3744
3748
|
ni(t) && (t = 4), this.feaLineWidth = t;
|
|
3745
|
-
} else this.feaLineWidth =
|
|
3749
|
+
} else this.feaLineWidth = d.lineWidth;
|
|
3746
3750
|
if (r) {
|
|
3747
|
-
let t = r(this.options.zoom,
|
|
3748
|
-
ni(t) && (t = 0), this.
|
|
3749
|
-
} else this.
|
|
3750
|
-
if (
|
|
3751
|
+
let t = r(this.options.zoom, y.properties);
|
|
3752
|
+
ni(t) && (t = 0), this.feaLineStrokeWidth = t;
|
|
3753
|
+
} else this.feaLineStrokeWidth = d.lineStrokeWidth || 0;
|
|
3754
|
+
if (o && (this.feaColor = o(this.options.zoom, y.properties) || [ 0, 0, 0, 255 ],
|
|
3751
3755
|
g(this.feaColor) ? this.feaColor = [ 0, 0, 0, 0 ] : (Array.isArray(this.feaColor) ? this.feaColor = this.feaColor.map(t => 255 * t) : this.feaColor = ze(this.feaColor).array(),
|
|
3752
|
-
3 === this.feaColor.length && this.feaColor.push(255))),
|
|
3753
|
-
|
|
3756
|
+
3 === this.feaColor.length && this.feaColor.push(255))), s && (this.feaStrokeColor = s(this.options.zoom, y.properties) || [ 0, 0, 0, 255 ],
|
|
3757
|
+
g(this.feaStrokeColor) ? this.feaStrokeColor = [ 0, 0, 0, 0 ] : (Array.isArray(this.feaStrokeColor) ? this.feaStrokeColor = this.feaStrokeColor.map(t => 255 * t) : this.feaStrokeColor = ze(this.feaStrokeColor).array(),
|
|
3758
|
+
3 === this.feaStrokeColor.length && this.feaStrokeColor.push(255))), h) {
|
|
3759
|
+
let t = h(this.options.zoom, y.properties);
|
|
3754
3760
|
ni(t) && (t = 1), this.feaOpacity = 255 * t;
|
|
3755
3761
|
}
|
|
3756
3762
|
if (this.dasharrayFn) {
|
|
3757
|
-
let t = this.dasharrayFn(this.options.zoom,
|
|
3763
|
+
let t = this.dasharrayFn(this.options.zoom, y.properties) || [ 0, 0, 0, 0 ];
|
|
3758
3764
|
if (t.length < 4) {
|
|
3759
3765
|
const i = t;
|
|
3760
3766
|
1 === t.length ? t = [ i[0], i[0], i[0], i[0] ] : 2 === t.length ? t = [ i[0], i[1], i[0], i[1] ] : 3 === t.length && (t = [ i[0], i[1], i[2], i[2] ]);
|
|
@@ -3762,7 +3768,7 @@
|
|
|
3762
3768
|
this.feaDash = t;
|
|
3763
3769
|
}
|
|
3764
3770
|
if (this.dashColorFn) {
|
|
3765
|
-
let t = (this.dashColorFn ? this.dashColorFn(this.options.zoom,
|
|
3771
|
+
let t = (this.dashColorFn ? this.dashColorFn(this.options.zoom, y.properties) : this.symbol.lineDashColor) || [ 0, 0, 0, 0 ];
|
|
3766
3772
|
t = Array.isArray(t) ? t.map(t => 255 * t) : ze(t).array(), 3 === t.length && t.push(255),
|
|
3767
3773
|
this.feaDashColor = t;
|
|
3768
3774
|
}
|
|
@@ -3773,33 +3779,33 @@
|
|
|
3773
3779
|
this.feaTexInfo[0] = t[0], this.feaTexInfo[1] = t[1], this.feaTexInfo[2] = n[0] - 1,
|
|
3774
3780
|
this.feaTexInfo[3] = n[1] - 1;
|
|
3775
3781
|
} else this.feaTexInfo[0] = this.feaTexInfo[1] = this.feaTexInfo[2] = this.feaTexInfo[3] = 0;
|
|
3776
|
-
this.feaJoinPatternMode =
|
|
3782
|
+
this.feaJoinPatternMode = a ? a(this.options.zoom, y.properties) || 0 : d.lineJoinPatternMode || 0;
|
|
3777
3783
|
}
|
|
3778
|
-
if (
|
|
3779
|
-
let t =
|
|
3784
|
+
if (l) {
|
|
3785
|
+
let t = l(this.options.zoom, y.properties);
|
|
3780
3786
|
ni(t) && (t = 0), this.feaLineDx = t;
|
|
3781
3787
|
}
|
|
3782
|
-
if (
|
|
3783
|
-
let t =
|
|
3788
|
+
if (u) {
|
|
3789
|
+
let t = u(this.options.zoom, y.properties);
|
|
3784
3790
|
ni(t) && (t = 0), this.feaLineDy = t;
|
|
3785
3791
|
}
|
|
3786
|
-
if (
|
|
3787
|
-
let t =
|
|
3792
|
+
if (c) {
|
|
3793
|
+
let t = c(this.options.zoom, y.properties);
|
|
3788
3794
|
ni(t) && (t = 0), 0 !== t && (this.properties.hasPatternAnim = 1), this.feaPatternAnimSpeed = t;
|
|
3789
3795
|
}
|
|
3790
|
-
if (
|
|
3791
|
-
let t =
|
|
3796
|
+
if (f) {
|
|
3797
|
+
let t = f(this.options.zoom, y.properties);
|
|
3792
3798
|
ni(t) && (t = 0), this.feaLinePatternGap = t;
|
|
3793
3799
|
}
|
|
3794
|
-
const
|
|
3795
|
-
let
|
|
3796
|
-
|
|
3797
|
-
for (let t = 0; t <
|
|
3800
|
+
const b = this.options.EXTENT;
|
|
3801
|
+
let M = y.geometry;
|
|
3802
|
+
b !== 1 / 0 && 3 !== y.type && (M = Un(y.geometry, -1, -1, b + 1, b + 1));
|
|
3803
|
+
for (let t = 0; t < M.length; t++) {
|
|
3798
3804
|
this.offset = this.data.aPosition.length / 3;
|
|
3799
|
-
const i =
|
|
3800
|
-
this.et(i,
|
|
3805
|
+
const i = M[t];
|
|
3806
|
+
this.et(i, y, v, w, 2, 1.05), p && (this.rt(m), this.elements = []);
|
|
3801
3807
|
}
|
|
3802
|
-
|
|
3808
|
+
p && (this.elements = m);
|
|
3803
3809
|
}
|
|
3804
3810
|
st() {
|
|
3805
3811
|
return this.iconAtlas && this.feaTexInfo[2] && this.feaTexInfo[3];
|
|
@@ -3825,12 +3831,12 @@
|
|
|
3825
3831
|
primitiveLength: 0
|
|
3826
3832
|
};
|
|
3827
3833
|
let d, y, p, m, v;
|
|
3828
|
-
this.e1 = this.e2 = -1, a && (d = t[l - 2], v = t[u].sub(d).
|
|
3834
|
+
this.e1 = this.e2 = -1, a && (d = t[l - 2], v = t[u].sub(d).I().T());
|
|
3829
3835
|
for (let i = u; i < l; i++) {
|
|
3830
3836
|
if (p = i === l - 1 ? a ? t[u + 1] : void 0 : t[i + 1], p && t[i].equals(p)) continue;
|
|
3831
|
-
v && (m = v), d && (y = d), d = t[i], v = p ? p.sub(d).
|
|
3837
|
+
v && (m = v), d && (y = d), d = t[i], v = p ? p.sub(d).I().T() : m, m = m || v;
|
|
3832
3838
|
let h = m.add(v);
|
|
3833
|
-
0 === h.x && 0 === h.y || h.
|
|
3839
|
+
0 === h.x && 0 === h.y || h.I();
|
|
3834
3840
|
const g = m.x * v.x + m.y * v.y, w = h.x * v.x + h.y * v.y, b = 0 !== w ? 1 / w : 1 / 0, M = 2 * Math.sqrt(2 - 2 * w), x = w < Ve && y && p, F = m.x * v.y - m.y * v.x > 0;
|
|
3835
3841
|
if (!o && x && i > u) {
|
|
3836
3842
|
const t = d.dist(y);
|
|
@@ -3863,7 +3869,7 @@
|
|
|
3863
3869
|
const t = n - .5;
|
|
3864
3870
|
n += n * t * (n - 1) * ((1.0904 + g * (g * (3.55645 - 1.43519 * g) - 3.2452)) * t * t + (.848013 + g * (.215638 * g - 1.06021)));
|
|
3865
3871
|
}
|
|
3866
|
-
const e = v.sub(m).k(n).m(m).
|
|
3872
|
+
const e = v.sub(m).k(n).m(m).I().k(F ? -1 : 1);
|
|
3867
3873
|
this.addHalfVertex(d, e.x, e.y, !1, F, 0, f);
|
|
3868
3874
|
}
|
|
3869
3875
|
}
|
|
@@ -3890,7 +3896,7 @@
|
|
|
3890
3896
|
addCurrentVertex(t, i, n, e, r, s = !1) {
|
|
3891
3897
|
const o = i.x + i.y * n, h = i.y - i.x * n, a = -i.x + i.y * e, l = -i.y - i.x * e;
|
|
3892
3898
|
this.addHalfVertex(t, o, h, s, !1, n, r), this.addHalfVertex(t, a, l, s, !0, -e, r),
|
|
3893
|
-
this.distance >
|
|
3899
|
+
this.distance > $e / 2 && 0 === this.totalDistance && (this.distance = 0, this.updateScaledDistance(),
|
|
3894
3900
|
this.addCurrentVertex(t, i, n, e, r, s));
|
|
3895
3901
|
}
|
|
3896
3902
|
addHalfVertex({x: t, y: i}, n, e, r, s, o, h) {
|
|
@@ -3901,7 +3907,7 @@
|
|
|
3901
3907
|
s ? this.e2 = l : this.e1 = l;
|
|
3902
3908
|
}
|
|
3903
3909
|
fillData(t, i, n, e, r, s, o, h) {
|
|
3904
|
-
const {lineWidthFn: a,
|
|
3910
|
+
const {lineWidthFn: a, lineStrokeWidthFn: l, lineStrokeColorFn: u, lineColorFn: c, lineOpacityFn: f, lineDxFn: d, lineDyFn: y, linePatternAnimSpeedFn: p, linePatternGapFn: m} = this.j;
|
|
3905
3911
|
if (this.options.center || (i = (i << 1) + (s ? 1 : 0), n = (n << 1) + (o ? 1 : 0)),
|
|
3906
3912
|
t.aPosition.push(i, n, 0), t.aExtrude.push(63 * e, 63 * r), this.options.center || this.iconAtlas) {
|
|
3907
3913
|
let i = 0;
|
|
@@ -3909,11 +3915,12 @@
|
|
|
3909
3915
|
t.aExtrude.push(i);
|
|
3910
3916
|
}
|
|
3911
3917
|
t.aLinesofar.push(h), a && t.aLineWidth.push(Math.round(2 * this.feaLineWidth)),
|
|
3912
|
-
l && t.
|
|
3913
|
-
|
|
3914
|
-
this.
|
|
3915
|
-
|
|
3916
|
-
|
|
3918
|
+
l && t.aLineStrokeWidth.push(Math.round(2 * this.feaLineStrokeWidth)), c && t.aColor.push(...this.feaColor),
|
|
3919
|
+
u && t.aStrokeColor.push(...this.feaStrokeColor), f && t.aOpacity.push(this.feaOpacity),
|
|
3920
|
+
this.dasharrayFn && t.aDasharray.push(...this.feaDash), this.dashColorFn && t.aDashColor.push(...this.feaDashColor),
|
|
3921
|
+
this.iconAtlas && t.aTexInfo.push(...this.feaTexInfo), d && t.aLineDx.push(this.feaLineDx),
|
|
3922
|
+
y && t.aLineDy.push(this.feaLineDy), p && t.aLinePatternAnimSpeed.push(127 * this.feaPatternAnimSpeed),
|
|
3923
|
+
m && t.aLinePatternGap.push(10 * this.feaLinePatternGap), this.maxPos = Math.max(this.maxPos, Math.abs(i) + 1, Math.abs(n) + 1);
|
|
3917
3924
|
}
|
|
3918
3925
|
addElements(t, i, n) {
|
|
3919
3926
|
super.addElements(this.offset + t, this.offset + i, this.offset + n);
|
|
@@ -3936,7 +3943,7 @@
|
|
|
3936
3943
|
this.distance += t.dist(i), this.updateScaledDistance();
|
|
3937
3944
|
}
|
|
3938
3945
|
updateScaledDistance() {
|
|
3939
|
-
this.scaledDistance = this.totalDistance > 0 ? (this.clipStart + (this.clipEnd - this.clipStart) * this.distance / this.totalDistance) * (
|
|
3946
|
+
this.scaledDistance = this.totalDistance > 0 ? (this.clipStart + (this.clipEnd - this.clipStart) * this.distance / this.totalDistance) * ($e - 1) : this.distance;
|
|
3940
3947
|
}
|
|
3941
3948
|
}
|
|
3942
3949
|
function Je(t, i, n) {
|
|
@@ -4115,7 +4122,7 @@
|
|
|
4115
4122
|
function wr(t, i, n) {
|
|
4116
4123
|
return t[0] = i[n], t[1] = i[n + 1], t;
|
|
4117
4124
|
}
|
|
4118
|
-
class br extends
|
|
4125
|
+
class br extends Ge {
|
|
4119
4126
|
constructor(t, i, n) {
|
|
4120
4127
|
super(t, i, n), this.at = n.altitudeProperty;
|
|
4121
4128
|
}
|
|
@@ -4336,7 +4343,7 @@
|
|
|
4336
4343
|
const e = t.feature, r = t.feature.type, s = this.options.EXTENT, o = [];
|
|
4337
4344
|
if ("line" === n) {
|
|
4338
4345
|
let t = e.geometry;
|
|
4339
|
-
s && (t =
|
|
4346
|
+
s && (t = Un(e.geometry, 0, 0, s, s));
|
|
4340
4347
|
for (let n = 0; n < t.length; n++) {
|
|
4341
4348
|
const e = Rn(t[n], i, Fr, null, null, 24, 1, 1, s || 1 / 0);
|
|
4342
4349
|
o.push.apply(o, e);
|
|
@@ -4374,7 +4381,7 @@
|
|
|
4374
4381
|
var r, s, o, h, a, l = [];
|
|
4375
4382
|
for (r = 0, s = i.length; r < s; r++) o = i[r] * e, h = r < s - 1 ? i[r + 1] * e : t.length,
|
|
4376
4383
|
(a = Pr(t, o, h, e, !1)) === a.next && (a.steiner = !0), l.push(Rr(a));
|
|
4377
|
-
for (l.sort(Lr), r = 0; r < l.length; r++)
|
|
4384
|
+
for (l.sort(Lr), r = 0; r < l.length; r++) Ur(l[r], n), n = Sr(n, n.next);
|
|
4378
4385
|
return n;
|
|
4379
4386
|
}(t, i, f, n)), t.length > 80 * n) {
|
|
4380
4387
|
e = s = t[0], r = o = t[1];
|
|
@@ -4423,14 +4430,14 @@
|
|
|
4423
4430
|
} while (o > 1);
|
|
4424
4431
|
}(r);
|
|
4425
4432
|
}(t, e, r, s);
|
|
4426
|
-
for (var h, a, l = t; t.prev !== t.next; ) if (h = t.prev, a = t.next, s ?
|
|
4433
|
+
for (var h, a, l = t; t.prev !== t.next; ) if (h = t.prev, a = t.next, s ? Ir(t, e, r, s) : Cr(t)) i.push(h.i / n),
|
|
4427
4434
|
i.push(t.i / n), i.push(a.i / n), Xr(t), t = a.next, l = a.next; else if ((t = a) === l) {
|
|
4428
4435
|
o ? 1 === o ? Or(t = Tr(Sr(t), i, n), i, n, e, r, s, 2) : 2 === o && Dr(t, i, n, e, r, s) : Or(Sr(t), i, n, e, r, s, 1);
|
|
4429
4436
|
break;
|
|
4430
4437
|
}
|
|
4431
4438
|
}
|
|
4432
4439
|
}
|
|
4433
|
-
function
|
|
4440
|
+
function Cr(t) {
|
|
4434
4441
|
var i = t.prev, n = t, e = t.next;
|
|
4435
4442
|
if (Wr(i, n, e) >= 0) return !1;
|
|
4436
4443
|
for (var r = t.next.next; r !== t.prev; ) {
|
|
@@ -4439,7 +4446,7 @@
|
|
|
4439
4446
|
}
|
|
4440
4447
|
return !0;
|
|
4441
4448
|
}
|
|
4442
|
-
function
|
|
4449
|
+
function Ir(t, i, n, e) {
|
|
4443
4450
|
var r = t.prev, s = t, o = t.next;
|
|
4444
4451
|
if (Wr(r, s, o) >= 0) return !1;
|
|
4445
4452
|
for (var h = r.x < s.x ? r.x < o.x ? r.x : o.x : s.x < o.x ? s.x : o.x, a = r.y < s.y ? r.y < o.y ? r.y : o.y : s.y < o.y ? s.y : o.y, l = r.x > s.x ? r.x > o.x ? r.x : o.x : s.x > o.x ? s.x : o.x, u = r.y > s.y ? r.y > o.y ? r.y : o.y : s.y > o.y ? s.y : o.y, c = jr(h, a, i, n, e), f = jr(l, u, i, n, e), d = t.prevZ, y = t.nextZ; d && d.z >= c && y && y.z <= f; ) {
|
|
@@ -4482,7 +4489,7 @@
|
|
|
4482
4489
|
function Lr(t, i) {
|
|
4483
4490
|
return t.x - i.x;
|
|
4484
4491
|
}
|
|
4485
|
-
function
|
|
4492
|
+
function Ur(t, i) {
|
|
4486
4493
|
if (i = function(t, i) {
|
|
4487
4494
|
var n, e = i, r = t.x, s = t.y, o = -1 / 0;
|
|
4488
4495
|
do {
|
|
@@ -4504,7 +4511,7 @@
|
|
|
4504
4511
|
e = n;
|
|
4505
4512
|
do {
|
|
4506
4513
|
r >= e.x && e.x >= u && r !== e.x && Nr(s < c ? r : o, s, u, c, s < c ? o : r, s, e.x, e.y) && (a = Math.abs(s - e.y) / (r - e.x),
|
|
4507
|
-
Jr(e, t) && (a < f || a === f && (e.x > n.x || e.x === n.x &&
|
|
4514
|
+
Jr(e, t) && (a < f || a === f && (e.x > n.x || e.x === n.x && Er(n, e))) && (n = e,
|
|
4508
4515
|
f = a)), e = e.next;
|
|
4509
4516
|
} while (e !== l);
|
|
4510
4517
|
return n;
|
|
@@ -4513,7 +4520,7 @@
|
|
|
4513
4520
|
Sr(i, i.next), Sr(n, n.next);
|
|
4514
4521
|
}
|
|
4515
4522
|
}
|
|
4516
|
-
function
|
|
4523
|
+
function Er(t, i) {
|
|
4517
4524
|
return Wr(t.prev, t, i.prev) < 0 && Wr(i.next, t, t.next) < 0;
|
|
4518
4525
|
}
|
|
4519
4526
|
function jr(t, i, n, e, r) {
|
|
@@ -4553,13 +4560,13 @@
|
|
|
4553
4560
|
return t.x === i.x && t.y === i.y;
|
|
4554
4561
|
}
|
|
4555
4562
|
function Vr(t, i, n, e) {
|
|
4556
|
-
var r =
|
|
4557
|
-
return r !== s && o !== h || (!(0 !== r ||
|
|
4563
|
+
var r = Gr(Wr(t, i, n)), s = Gr(Wr(t, i, e)), o = Gr(Wr(n, e, t)), h = Gr(Wr(n, e, i));
|
|
4564
|
+
return r !== s && o !== h || (!(0 !== r || !$r(t, n, i)) || (!(0 !== s || !$r(t, e, i)) || (!(0 !== o || !$r(n, t, e)) || !(0 !== h || !$r(n, i, e)))));
|
|
4558
4565
|
}
|
|
4559
|
-
function
|
|
4566
|
+
function $r(t, i, n) {
|
|
4560
4567
|
return i.x <= Math.max(t.x, n.x) && i.x >= Math.min(t.x, n.x) && i.y <= Math.max(t.y, n.y) && i.y >= Math.min(t.y, n.y);
|
|
4561
4568
|
}
|
|
4562
|
-
function
|
|
4569
|
+
function Gr(t) {
|
|
4563
4570
|
return t > 0 ? 1 : t < 0 ? -1 : 0;
|
|
4564
4571
|
}
|
|
4565
4572
|
function Jr(t, i) {
|
|
@@ -4804,21 +4811,21 @@
|
|
|
4804
4811
|
function as(t, i, n, e, r, s, o, h, a, l) {
|
|
4805
4812
|
void 0 === i.top && (i.top = !0), void 0 === i.side && (i.side = !0);
|
|
4806
4813
|
const {altitudeScale: u, altitudeProperty: c, defaultAltitude: f, heightProperty: d, minHeightProperty: y, defaultHeight: p, tangent: m, uv: v, uvScale: g, topUVMode: M, sideUVMode: x, top: F, side: A, topThickness: k} = i, _ = function(t, i, {altitudeScale: n, altitudeProperty: e, defaultAltitude: r, heightProperty: s, minHeightProperty: o, defaultHeight: h}, {side: a, top: l, topThickness: u, uvOrigin: c, uv: f, uvSize: d, topUVMode: y, sideUVMode: p, glScale: m, localScale: v, vScale: g}, w) {
|
|
4807
|
-
const b = i / t[0].extent, M = [], x = [], F = [], A = [], k = [], _ = [], S = !!f, O = !!l,
|
|
4808
|
-
function
|
|
4814
|
+
const b = i / t[0].extent, M = [], x = [], F = [], A = [], k = [], _ = [], S = !!f, O = !!l, C = !!a, T = S ? [] : null;
|
|
4815
|
+
function U(t, n, e, r) {
|
|
4809
4816
|
if (O) {
|
|
4810
4817
|
const r = Kr(A, e, 3);
|
|
4811
4818
|
if (0 === r.length) return n;
|
|
4812
4819
|
let s;
|
|
4813
|
-
|
|
4820
|
+
I(k, A), n += A.length;
|
|
4814
4821
|
for (let i = 2, n = r.length; i < n; i += 3) s = r[i - 1], r[i - 1] = r[i] + t / 3,
|
|
4815
4822
|
r[i] = s + t / 3, r[i - 2] += t / 3;
|
|
4816
|
-
|
|
4823
|
+
I(_, r), S && kt(y || 0, t, n, T, k, 0, m, v, d[0], d[1]), u > 0 && !C && (n = os(k, A, e, _, n, 0, u, i, S, p || 0, T, d, m, v, g));
|
|
4817
4824
|
}
|
|
4818
|
-
return
|
|
4825
|
+
return C && (O && (u = 0), n = os(k, A, e, _, n, u, r, i, S, p || 0, T, d, m, v, g)),
|
|
4819
4826
|
n;
|
|
4820
4827
|
}
|
|
4821
|
-
let
|
|
4828
|
+
let E = 0, j = 0;
|
|
4822
4829
|
const R = [ -1, -1, i + 1, i + 1 ];
|
|
4823
4830
|
let N = 0, z = t.length;
|
|
4824
4831
|
void 0 !== w && (N = w, z = w + 1);
|
|
@@ -4827,37 +4834,37 @@
|
|
|
4827
4834
|
const a = t[N], l = a.id;
|
|
4828
4835
|
P(l) && (Math.abs(l) > W && (W = Math.abs(l)), l < 0 && (H = !0));
|
|
4829
4836
|
const u = a.geometry, {altitude: c, height: f} = fi(a, n, e, r, s, h, o);
|
|
4830
|
-
|
|
4837
|
+
E = Math.max(Math.abs(c), E);
|
|
4831
4838
|
const d = k.length;
|
|
4832
4839
|
let y = j, p = [];
|
|
4833
4840
|
A.length = 0;
|
|
4834
4841
|
for (let t = 0, n = u.length; t < n; t++) {
|
|
4835
4842
|
const e = li(u[t]) < 0;
|
|
4836
|
-
!e && t > 0 && (j =
|
|
4843
|
+
!e && t > 0 && (j = U(y, j, p, f * b), A.length = 0, p = [], y = j);
|
|
4837
4844
|
let r = u[t];
|
|
4838
4845
|
if (i !== 1 / 0 && (r = is(r, R)), !r.length) {
|
|
4839
|
-
t === n - 1 && (j =
|
|
4846
|
+
t === n - 1 && (j = U(y, j, p, f * b));
|
|
4840
4847
|
continue;
|
|
4841
4848
|
}
|
|
4842
4849
|
const s = r.length;
|
|
4843
4850
|
Array.isArray(r[0]) ? r[0][0] === r[s - 1][0] && r[0][1] === r[s - 1][1] || r.push([ r[0][0], r[0][1] ]) : r[0].x === r[s - 1].x && r[0].y === r[s - 1].y || r.push(r[0]),
|
|
4844
|
-
e && p.push(A.length / 3), ft(A, A.length, r, b, c), t === n - 1 && (j =
|
|
4851
|
+
e && p.push(A.length / 3), ft(A, A.length, r, b, c), t === n - 1 && (j = U(y, j, p, f * b));
|
|
4845
4852
|
}
|
|
4846
4853
|
const m = k.length - d, v = "__fea_idx".trim();
|
|
4847
4854
|
for (let t = 0; t < m / 3; t++) x.push(void 0 === a[v] ? N : a[v]), M.push(N), P(l) && F.push(l);
|
|
4848
4855
|
}
|
|
4849
|
-
const V = D(x.length ? x[x.length - 1] : 0),
|
|
4850
|
-
maxAltitude:
|
|
4851
|
-
vertices: new (L(Math.max(512,
|
|
4856
|
+
const V = D(x.length ? x[x.length - 1] : 0), $ = {
|
|
4857
|
+
maxAltitude: E,
|
|
4858
|
+
vertices: new (L(Math.max(512, E)))(k),
|
|
4852
4859
|
indices: _,
|
|
4853
4860
|
pickingIds: new V(x),
|
|
4854
4861
|
featureIndexes: M
|
|
4855
4862
|
};
|
|
4856
4863
|
if (F.length) {
|
|
4857
4864
|
const t = H ? L(W) : D(W);
|
|
4858
|
-
|
|
4859
|
-
} else
|
|
4860
|
-
return T && (T.length = k.length / 3 * 2,
|
|
4865
|
+
$.featureIds = new t(F);
|
|
4866
|
+
} else $.featureIds = [];
|
|
4867
|
+
return T && (T.length = k.length / 3 * 2, $.uvs = T), $;
|
|
4861
4868
|
}(t, n, {
|
|
4862
4869
|
altitudeScale: u,
|
|
4863
4870
|
altitudeProperty: c,
|
|
@@ -4879,10 +4886,10 @@
|
|
|
4879
4886
|
vScale: s
|
|
4880
4887
|
}, l), S = [], O = new (T(_.vertices.length / 3))(_.indices);
|
|
4881
4888
|
delete _.indices, S.push(O.buffer, _.vertices.buffer, _.pickingIds.buffer);
|
|
4882
|
-
const
|
|
4883
|
-
let
|
|
4884
|
-
for (let t = 0; t <
|
|
4885
|
-
if (_.normals =
|
|
4889
|
+
const C = vr(_.vertices, O);
|
|
4890
|
+
let U = !0;
|
|
4891
|
+
for (let t = 0; t < C.length; t++) C[t] = -C[t], C[t] % 1 != 0 && (U = !1);
|
|
4892
|
+
if (_.normals = C, m) {
|
|
4886
4893
|
let t = function(t, i, n, e) {
|
|
4887
4894
|
const r = t.length / 3, s = new Array(4 * r), o = [], h = [];
|
|
4888
4895
|
for (let t = 0; t < r; t++) o[t] = [ 0, 0, 0 ], h[t] = [ 0, 0, 0 ];
|
|
@@ -4917,14 +4924,14 @@
|
|
|
4917
4924
|
return n;
|
|
4918
4925
|
}(_.normals, t), _.tangents = t, S.push(t.buffer), delete _.normals;
|
|
4919
4926
|
}
|
|
4920
|
-
if (_.normals && (_.normals =
|
|
4927
|
+
if (_.normals && (_.normals = U ? new Int8Array(_.normals) : new Float32Array(_.normals),
|
|
4921
4928
|
S.push(_.normals.buffer)), _.uvs) {
|
|
4922
4929
|
const t = _.uvs;
|
|
4923
4930
|
_.uvs = new Float32Array(t), S.push(_.uvs.buffer);
|
|
4924
4931
|
}
|
|
4925
4932
|
const j = function(t, i, n, e) {
|
|
4926
4933
|
const r = {};
|
|
4927
|
-
if (
|
|
4934
|
+
if (E("polygonFill", i)) {
|
|
4928
4935
|
const s = {}, o = b(i.polygonFill), h = new Uint8Array(4 * e.length);
|
|
4929
4936
|
for (let i = 0; i < e.length; i++) {
|
|
4930
4937
|
const r = t[e[i]];
|
|
@@ -4937,7 +4944,7 @@
|
|
|
4937
4944
|
}
|
|
4938
4945
|
r.aColor = h;
|
|
4939
4946
|
}
|
|
4940
|
-
if (
|
|
4947
|
+
if (E("polygonOpacity", i)) {
|
|
4941
4948
|
const s = w(i.polygonOpacity), o = new Uint8Array(e.length);
|
|
4942
4949
|
for (let i = 0; i < e.length; i++) {
|
|
4943
4950
|
const r = t[e[i]], h = s(n, r.properties);
|
|
@@ -5115,7 +5122,7 @@
|
|
|
5115
5122
|
});
|
|
5116
5123
|
const s = !this.options.style.style.length && !this.options.style.featureStyle.length;
|
|
5117
5124
|
let o = this.pluginConfig.slice(0);
|
|
5118
|
-
s && (o = this.bt(t)), this.featurePlugins &&
|
|
5125
|
+
s && (o = this.bt(t)), this.featurePlugins && I(o, this.featurePlugins);
|
|
5119
5126
|
const h = i[0].extent, a = r.z, l = {
|
|
5120
5127
|
x: r.extent2d.xmin * n,
|
|
5121
5128
|
y: r.extent2d.ymax * n
|
|
@@ -5225,7 +5232,7 @@
|
|
|
5225
5232
|
zoom: l,
|
|
5226
5233
|
debugIndex: d
|
|
5227
5234
|
});
|
|
5228
|
-
return gs(t, r, i,
|
|
5235
|
+
return gs(t, r, i, Ge);
|
|
5229
5236
|
}
|
|
5230
5237
|
if ("native-line" === f) {
|
|
5231
5238
|
const i = k({}, e, {
|
|
@@ -5287,10 +5294,10 @@
|
|
|
5287
5294
|
e[t] = 1;
|
|
5288
5295
|
}), t.filter = [ "in", "$id", ...t.id ]) : (e[t.id] = 1, t.filter = [ "==", "$id", t.id ]);
|
|
5289
5296
|
});
|
|
5290
|
-
const r =
|
|
5297
|
+
const r = U(i);
|
|
5291
5298
|
for (let t = 0; t < i.length; t++) r[t].filter && (r[t].filter.def = i[t].filter ? i[t].filter.value || i[t].filter : void 0),
|
|
5292
5299
|
r[t].type = 0;
|
|
5293
|
-
const s = [], o =
|
|
5300
|
+
const s = [], o = U(n);
|
|
5294
5301
|
for (let t = 0; t < n.length; t++) o[t].type = 1, o[t].filter.def = n[t].filter ? n[t].filter.value || n[t].filter : void 0,
|
|
5295
5302
|
o[t].renderPlugin && s.push(o[t]);
|
|
5296
5303
|
this.pluginConfig = r, this.featurePlugins = s, this.styledFeatures = e;
|
|
@@ -5411,7 +5418,7 @@
|
|
|
5411
5418
|
}
|
|
5412
5419
|
function ws(t) {
|
|
5413
5420
|
if (!t) return 0;
|
|
5414
|
-
for (const i in t) if (
|
|
5421
|
+
for (const i in t) if (E(i, t)) return 1;
|
|
5415
5422
|
return 0;
|
|
5416
5423
|
}
|
|
5417
5424
|
var bs = function(t) {
|
|
@@ -5576,10 +5583,10 @@
|
|
|
5576
5583
|
n.realloc(e);
|
|
5577
5584
|
for (var r = n.pos - 1; r >= t; r--) n.buf[r + e] = n.buf[r];
|
|
5578
5585
|
}
|
|
5579
|
-
function
|
|
5586
|
+
function Cs(t, i) {
|
|
5580
5587
|
for (var n = 0; n < t.length; n++) i.writeVarint(t[n]);
|
|
5581
5588
|
}
|
|
5582
|
-
function
|
|
5589
|
+
function Is(t, i) {
|
|
5583
5590
|
for (var n = 0; n < t.length; n++) i.writeSVarint(t[n]);
|
|
5584
5591
|
}
|
|
5585
5592
|
function Ts(t, i) {
|
|
@@ -5591,10 +5598,10 @@
|
|
|
5591
5598
|
function Ls(t, i) {
|
|
5592
5599
|
for (var n = 0; n < t.length; n++) i.writeBoolean(t[n]);
|
|
5593
5600
|
}
|
|
5594
|
-
function
|
|
5601
|
+
function Us(t, i) {
|
|
5595
5602
|
for (var n = 0; n < t.length; n++) i.writeFixed32(t[n]);
|
|
5596
5603
|
}
|
|
5597
|
-
function
|
|
5604
|
+
function Es(t, i) {
|
|
5598
5605
|
for (var n = 0; n < t.length; n++) i.writeSFixed32(t[n]);
|
|
5599
5606
|
}
|
|
5600
5607
|
function js(t, i) {
|
|
@@ -5860,10 +5867,10 @@
|
|
|
5860
5867
|
this.writeTag(t, ks.Bytes), this.writeRawMessage(i, n);
|
|
5861
5868
|
},
|
|
5862
5869
|
writePackedVarint: function(t, i) {
|
|
5863
|
-
i.length && this.writeMessage(t,
|
|
5870
|
+
i.length && this.writeMessage(t, Cs, i);
|
|
5864
5871
|
},
|
|
5865
5872
|
writePackedSVarint: function(t, i) {
|
|
5866
|
-
i.length && this.writeMessage(t,
|
|
5873
|
+
i.length && this.writeMessage(t, Is, i);
|
|
5867
5874
|
},
|
|
5868
5875
|
writePackedBoolean: function(t, i) {
|
|
5869
5876
|
i.length && this.writeMessage(t, Ls, i);
|
|
@@ -5875,10 +5882,10 @@
|
|
|
5875
5882
|
i.length && this.writeMessage(t, Ds, i);
|
|
5876
5883
|
},
|
|
5877
5884
|
writePackedFixed32: function(t, i) {
|
|
5878
|
-
i.length && this.writeMessage(t,
|
|
5885
|
+
i.length && this.writeMessage(t, Us, i);
|
|
5879
5886
|
},
|
|
5880
5887
|
writePackedSFixed32: function(t, i) {
|
|
5881
|
-
i.length && this.writeMessage(t,
|
|
5888
|
+
i.length && this.writeMessage(t, Es, i);
|
|
5882
5889
|
},
|
|
5883
5890
|
writePackedFixed64: function(t, i) {
|
|
5884
5891
|
i.length && this.writeMessage(t, js, i);
|
|
@@ -5920,12 +5927,12 @@
|
|
|
5920
5927
|
this.writeVarintField(t, Boolean(i));
|
|
5921
5928
|
}
|
|
5922
5929
|
};
|
|
5923
|
-
var Hs = Ot, Vs =
|
|
5924
|
-
function
|
|
5930
|
+
var Hs = Ot, Vs = $s;
|
|
5931
|
+
function $s(t, i, n, e, r) {
|
|
5925
5932
|
this.properties = {}, this.extent = n, this.type = 0, this.kt = t, this._t = -1,
|
|
5926
|
-
this.Pt = e, this.St = r, t.readFields(
|
|
5933
|
+
this.Pt = e, this.St = r, t.readFields(Gs, this, i);
|
|
5927
5934
|
}
|
|
5928
|
-
function
|
|
5935
|
+
function Gs(t, i, n) {
|
|
5929
5936
|
1 == t ? i.id = n.readVarint() : 2 == t ? function(t, i) {
|
|
5930
5937
|
var n = t.readVarint() + t.pos;
|
|
5931
5938
|
for (;t.pos < n; ) {
|
|
@@ -5939,7 +5946,7 @@
|
|
|
5939
5946
|
e += ((n = t[o]).x - i.x) * (i.y + n.y);
|
|
5940
5947
|
return e;
|
|
5941
5948
|
}
|
|
5942
|
-
|
|
5949
|
+
$s.types = [ "Unknown", "Point", "LineString", "Polygon" ], $s.prototype.loadGeometry = function() {
|
|
5943
5950
|
var t = this.kt;
|
|
5944
5951
|
t.pos = this._t;
|
|
5945
5952
|
for (var i, n = t.readVarint() + t.pos, e = 1, r = 0, s = 0, o = 0, h = []; t.pos < n; ) {
|
|
@@ -5954,7 +5961,7 @@
|
|
|
5954
5961
|
}
|
|
5955
5962
|
}
|
|
5956
5963
|
return i && h.push(i), h;
|
|
5957
|
-
},
|
|
5964
|
+
}, $s.prototype.bbox = function() {
|
|
5958
5965
|
var t = this.kt;
|
|
5959
5966
|
t.pos = this._t;
|
|
5960
5967
|
for (var i = t.readVarint() + t.pos, n = 1, e = 0, r = 0, s = 0, o = 1 / 0, h = -1 / 0, a = 1 / 0, l = -1 / 0; t.pos < i; ) {
|
|
@@ -5966,8 +5973,8 @@
|
|
|
5966
5973
|
(s += t.readSVarint()) < a && (a = s), s > l && (l = s); else if (7 !== n) throw new Error("unknown command " + n);
|
|
5967
5974
|
}
|
|
5968
5975
|
return [ o, a, h, l ];
|
|
5969
|
-
},
|
|
5970
|
-
var e, r, s = this.extent * Math.pow(2, n), o = this.extent * t, h = this.extent * i, a = this.loadGeometry(), l =
|
|
5976
|
+
}, $s.prototype.toGeoJSON = function(t, i, n) {
|
|
5977
|
+
var e, r, s = this.extent * Math.pow(2, n), o = this.extent * t, h = this.extent * i, a = this.loadGeometry(), l = $s.types[this.type];
|
|
5971
5978
|
function u(t) {
|
|
5972
5979
|
for (var i = 0; i < t.length; i++) {
|
|
5973
5980
|
var n = t[i], e = 180 - 360 * (n.y + h) / s;
|
|
@@ -6123,16 +6130,16 @@
|
|
|
6123
6130
|
}(128), eo = {};
|
|
6124
6131
|
class ro {
|
|
6125
6132
|
constructor(t) {
|
|
6126
|
-
this.
|
|
6133
|
+
this.Ct = {}, this.It = {}, this.workerId = t;
|
|
6127
6134
|
}
|
|
6128
6135
|
addLayer({actorId: t, mapId: i, layerId: n, params: e}, r) {
|
|
6129
6136
|
if (this.Tt(i, n)) return;
|
|
6130
6137
|
const s = this.Dt(i, n), o = e.type, h = e.options, a = this.send.bind(this, t);
|
|
6131
|
-
this.
|
|
6138
|
+
this.Ct[s] = "GeoJSONVectorTileLayer" === o ? new Ms(n, h, a, no, eo, r) : new to(n, h, a, no, eo, r);
|
|
6132
6139
|
}
|
|
6133
6140
|
removeLayer({mapId: t, layerId: i}, n) {
|
|
6134
6141
|
const e = this.Tt(t, i), r = this.Dt(t, i);
|
|
6135
|
-
delete this.
|
|
6142
|
+
delete this.Ct[r], e && (e.onRemove(n), this.Lt());
|
|
6136
6143
|
}
|
|
6137
6144
|
loadTile({mapId: t, layerId: i, params: n}, e) {
|
|
6138
6145
|
const r = this.Tt(t, i);
|
|
@@ -6159,12 +6166,12 @@
|
|
|
6159
6166
|
r && (r.setData(n.data, e), this.Lt());
|
|
6160
6167
|
}
|
|
6161
6168
|
receive(t) {
|
|
6162
|
-
const i = t.callback, n = this.
|
|
6163
|
-
delete this.
|
|
6169
|
+
const i = t.callback, n = this.It[i];
|
|
6170
|
+
delete this.It[i], n && t.error ? n(new Error(t.error)) : n && n(null, t.data);
|
|
6164
6171
|
}
|
|
6165
6172
|
send(t, i, n, e, r) {
|
|
6166
6173
|
const s = r ? `${t}-${io++}` : null;
|
|
6167
|
-
r && (this.
|
|
6174
|
+
r && (this.It[s] = r), postMessage({
|
|
6168
6175
|
type: "<request>",
|
|
6169
6176
|
workerId: this.workerId,
|
|
6170
6177
|
actorId: t,
|
|
@@ -6178,7 +6185,7 @@
|
|
|
6178
6185
|
}
|
|
6179
6186
|
Tt(t, i) {
|
|
6180
6187
|
const n = this.Dt(t, i);
|
|
6181
|
-
return this.
|
|
6188
|
+
return this.Ct[n];
|
|
6182
6189
|
}
|
|
6183
6190
|
Lt() {
|
|
6184
6191
|
const t = Object.keys(eo);
|
|
@@ -6391,15 +6398,15 @@
|
|
|
6391
6398
|
return t;
|
|
6392
6399
|
}
|
|
6393
6400
|
function S(t) {
|
|
6394
|
-
return !
|
|
6401
|
+
return !I(t) && ("string" == typeof t || null !== t.constructor && t.constructor === String);
|
|
6395
6402
|
}
|
|
6396
6403
|
function O(t) {
|
|
6397
6404
|
return "number" == typeof t && !isNaN(t);
|
|
6398
6405
|
}
|
|
6399
|
-
function I(t) {
|
|
6400
|
-
return !C(t) && ("function" == typeof t || null !== t.constructor && t.constructor === Function);
|
|
6401
|
-
}
|
|
6402
6406
|
function C(t) {
|
|
6407
|
+
return !I(t) && ("function" == typeof t || null !== t.constructor && t.constructor === Function);
|
|
6408
|
+
}
|
|
6409
|
+
function I(t) {
|
|
6403
6410
|
return null == t;
|
|
6404
6411
|
}
|
|
6405
6412
|
function T(t) {
|
|
@@ -6432,11 +6439,11 @@
|
|
|
6432
6439
|
return i.filter && i.filter.value && (i.filter = i.filter.value), i;
|
|
6433
6440
|
}));
|
|
6434
6441
|
}
|
|
6435
|
-
function
|
|
6442
|
+
function U(t, i) {
|
|
6436
6443
|
return Object.prototype.hasOwnProperty.call(t, i);
|
|
6437
6444
|
}
|
|
6438
6445
|
"undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
|
|
6439
|
-
var
|
|
6446
|
+
var E = j;
|
|
6440
6447
|
function j(t, i) {
|
|
6441
6448
|
this.x = t, this.y = i;
|
|
6442
6449
|
}
|
|
@@ -6469,10 +6476,10 @@
|
|
|
6469
6476
|
return this.clone().O(t, i);
|
|
6470
6477
|
},
|
|
6471
6478
|
matMult: function(t) {
|
|
6472
|
-
return this.clone().
|
|
6479
|
+
return this.clone().C(t);
|
|
6473
6480
|
},
|
|
6474
6481
|
unit: function() {
|
|
6475
|
-
return this.clone().
|
|
6482
|
+
return this.clone().I();
|
|
6476
6483
|
},
|
|
6477
6484
|
perp: function() {
|
|
6478
6485
|
return this.clone().T();
|
|
@@ -6505,7 +6512,7 @@
|
|
|
6505
6512
|
angleWithSep: function(t, i) {
|
|
6506
6513
|
return Math.atan2(this.x * i - this.y * t, this.x * t + this.y * i);
|
|
6507
6514
|
},
|
|
6508
|
-
|
|
6515
|
+
C: function(t) {
|
|
6509
6516
|
var i = t[0] * this.x + t[1] * this.y, n = t[2] * this.x + t[3] * this.y;
|
|
6510
6517
|
return this.x = i, this.y = n, this;
|
|
6511
6518
|
},
|
|
@@ -6527,7 +6534,7 @@
|
|
|
6527
6534
|
A: function(t) {
|
|
6528
6535
|
return this.x /= t.x, this.y /= t.y, this;
|
|
6529
6536
|
},
|
|
6530
|
-
|
|
6537
|
+
I: function() {
|
|
6531
6538
|
return this.P(this.mag()), this;
|
|
6532
6539
|
},
|
|
6533
6540
|
T: function() {
|
|
@@ -6569,7 +6576,7 @@
|
|
|
6569
6576
|
if (n.promoteId ? h = i.properties[n.promoteId] : n.generateId && (h = e || 0),
|
|
6570
6577
|
"Point" === s) W(r, o); else if ("MultiPoint" === s) for (var a = 0; a < r.length; a++) W(r[a], o); else if ("LineString" === s) V([ r ], o); else if ("MultiLineString" === s) {
|
|
6571
6578
|
if (n.lineMetrics) {
|
|
6572
|
-
for (a = 0; a < r.length; a++) o = [], H(r[a], o), t.push(
|
|
6579
|
+
for (a = 0; a < r.length; a++) o = [], H(r[a], o), t.push($(h, "LineString", o, i.properties));
|
|
6573
6580
|
return;
|
|
6574
6581
|
}
|
|
6575
6582
|
V(r, o);
|
|
@@ -6590,16 +6597,16 @@
|
|
|
6590
6597
|
V(r[a], l), o.push(l);
|
|
6591
6598
|
}
|
|
6592
6599
|
}
|
|
6593
|
-
t.push(
|
|
6600
|
+
t.push($(h, s, o, i.properties));
|
|
6594
6601
|
}
|
|
6595
6602
|
}
|
|
6596
6603
|
function W(t, i) {
|
|
6597
|
-
i.push([ new
|
|
6604
|
+
i.push([ new E(t[0], t[1]) ]);
|
|
6598
6605
|
}
|
|
6599
6606
|
function H(t, i) {
|
|
6600
6607
|
for (var n = 0; n < t.length; n++) {
|
|
6601
6608
|
var e = t[n][0], r = t[n][1];
|
|
6602
|
-
i.push(new
|
|
6609
|
+
i.push(new E(e, r));
|
|
6603
6610
|
}
|
|
6604
6611
|
}
|
|
6605
6612
|
function V(t, i, n, e) {
|
|
@@ -6608,7 +6615,7 @@
|
|
|
6608
6615
|
H(t[r], s), i.push(s);
|
|
6609
6616
|
}
|
|
6610
6617
|
}
|
|
6611
|
-
function
|
|
6618
|
+
function $(t, i, n, e) {
|
|
6612
6619
|
return {
|
|
6613
6620
|
id: void 0 === t ? null : t,
|
|
6614
6621
|
type: R[i],
|
|
@@ -6616,7 +6623,7 @@
|
|
|
6616
6623
|
properties: e
|
|
6617
6624
|
};
|
|
6618
6625
|
}
|
|
6619
|
-
function
|
|
6626
|
+
function G(t, i, n) {
|
|
6620
6627
|
n = n || {}, this.w = t || 64, this.h = i || 64, this.autoResize = !!n.autoResize,
|
|
6621
6628
|
this.shelves = [], this.freebins = [], this.stats = {}, this.bins = {}, this.maxId = 0;
|
|
6622
6629
|
}
|
|
@@ -6666,7 +6673,7 @@
|
|
|
6666
6673
|
}
|
|
6667
6674
|
return i;
|
|
6668
6675
|
}
|
|
6669
|
-
|
|
6676
|
+
G.prototype.pack = function(t, i) {
|
|
6670
6677
|
t = [].concat(t), i = i || {};
|
|
6671
6678
|
for (var n, e, r, s, o = [], h = 0; h < t.length; h++) if (n = t[h].w || t[h].width,
|
|
6672
6679
|
e = t[h].h || t[h].height, r = t[h].id, n && e) {
|
|
@@ -6674,7 +6681,7 @@
|
|
|
6674
6681
|
i.inPlace && (t[h].x = s.x, t[h].y = s.y, t[h].id = s.id), o.push(s);
|
|
6675
6682
|
}
|
|
6676
6683
|
return this.shrink(), o;
|
|
6677
|
-
},
|
|
6684
|
+
}, G.prototype.packOne = function(t, i, n) {
|
|
6678
6685
|
var e, r, s, o, h, a, l, u, c = {
|
|
6679
6686
|
freebin: -1,
|
|
6680
6687
|
shelf: -1,
|
|
@@ -6698,14 +6705,14 @@
|
|
|
6698
6705
|
this.allocShelf(this.shelves.push(r) - 1, t, i, n)) : this.autoResize ? (h = a = this.h,
|
|
6699
6706
|
((l = u = this.w) <= h || t > l) && (u = 2 * Math.max(t, l)), (h < l || i > h) && (a = 2 * Math.max(i, h)),
|
|
6700
6707
|
this.resize(u, a), this.packOne(t, i, n)) : null;
|
|
6701
|
-
},
|
|
6708
|
+
}, G.prototype.allocFreebin = function(t, i, n, e) {
|
|
6702
6709
|
var r = this.freebins.splice(t, 1)[0];
|
|
6703
6710
|
return r.id = e, r.w = i, r.h = n, r.refcount = 0, this.bins[e] = r, this.ref(r),
|
|
6704
6711
|
r;
|
|
6705
|
-
},
|
|
6712
|
+
}, G.prototype.allocShelf = function(t, i, n, e) {
|
|
6706
6713
|
var r = this.shelves[t].alloc(i, n, e);
|
|
6707
6714
|
return this.bins[e] = r, this.ref(r), r;
|
|
6708
|
-
},
|
|
6715
|
+
}, G.prototype.shrink = function() {
|
|
6709
6716
|
if (this.shelves.length > 0) {
|
|
6710
6717
|
for (var t = 0, i = 0, n = 0; n < this.shelves.length; n++) {
|
|
6711
6718
|
var e = this.shelves[n];
|
|
@@ -6713,20 +6720,20 @@
|
|
|
6713
6720
|
}
|
|
6714
6721
|
this.resize(t, i);
|
|
6715
6722
|
}
|
|
6716
|
-
},
|
|
6723
|
+
}, G.prototype.getBin = function(t) {
|
|
6717
6724
|
return this.bins[t];
|
|
6718
|
-
},
|
|
6725
|
+
}, G.prototype.ref = function(t) {
|
|
6719
6726
|
if (1 == ++t.refcount) {
|
|
6720
6727
|
var i = t.h;
|
|
6721
6728
|
this.stats[i] = 1 + (0 | this.stats[i]);
|
|
6722
6729
|
}
|
|
6723
6730
|
return t.refcount;
|
|
6724
|
-
},
|
|
6731
|
+
}, G.prototype.unref = function(t) {
|
|
6725
6732
|
return 0 === t.refcount ? 0 : (0 == --t.refcount && (this.stats[t.h]--, delete this.bins[t.id],
|
|
6726
6733
|
this.freebins.push(t)), t.refcount);
|
|
6727
|
-
},
|
|
6734
|
+
}, G.prototype.clear = function() {
|
|
6728
6735
|
this.shelves = [], this.freebins = [], this.stats = {}, this.bins = {}, this.maxId = 0;
|
|
6729
|
-
},
|
|
6736
|
+
}, G.prototype.resize = function(t, i) {
|
|
6730
6737
|
this.w = t, this.h = i;
|
|
6731
6738
|
for (var n = 0; n < this.shelves.length; n++) this.shelves[n].resize(t);
|
|
6732
6739
|
return !0;
|
|
@@ -6794,7 +6801,7 @@
|
|
|
6794
6801
|
this.glyphMap = t, this.build();
|
|
6795
6802
|
}
|
|
6796
6803
|
build() {
|
|
6797
|
-
const t = this.glyphMap, i = {}, n = new
|
|
6804
|
+
const t = this.glyphMap, i = {}, n = new G(0, 0, {
|
|
6798
6805
|
autoResize: !0
|
|
6799
6806
|
}), e = [];
|
|
6800
6807
|
for (const n in t) {
|
|
@@ -6845,7 +6852,7 @@
|
|
|
6845
6852
|
this.glyphMap = t, this.build();
|
|
6846
6853
|
}
|
|
6847
6854
|
build() {
|
|
6848
|
-
const t = this.glyphMap, i = {}, n = new
|
|
6855
|
+
const t = this.glyphMap, i = {}, n = new G(0, 0, {
|
|
6849
6856
|
autoResize: !0
|
|
6850
6857
|
}), e = [];
|
|
6851
6858
|
for (const n in t) {
|
|
@@ -6976,7 +6983,7 @@
|
|
|
6976
6983
|
}
|
|
6977
6984
|
const Mt = {
|
|
6978
6985
|
lineWidth: 1,
|
|
6979
|
-
|
|
6986
|
+
lineStrokeWidth: 1,
|
|
6980
6987
|
lineDx: 1,
|
|
6981
6988
|
lineDy: 1,
|
|
6982
6989
|
lineOpacity: 1,
|
|
@@ -7023,7 +7030,7 @@
|
|
|
7023
7030
|
if (Array.isArray(r.geometry) && r.properties) {
|
|
7024
7031
|
let i = r.geometry[0];
|
|
7025
7032
|
for (;Array.isArray(i); ) i = i[0];
|
|
7026
|
-
i instanceof
|
|
7033
|
+
i instanceof E && (n = t);
|
|
7027
7034
|
}
|
|
7028
7035
|
if (!n) if (n = [], Array.isArray(r.geometry)) for (let i = 0; i < t.length; i++) {
|
|
7029
7036
|
const e = at({}, t[i]);
|
|
@@ -7246,16 +7253,16 @@
|
|
|
7246
7253
|
};
|
|
7247
7254
|
}
|
|
7248
7255
|
const At = /\{([\w_]+)\}/g;
|
|
7249
|
-
const kt = t => t >= 128 && t <= 255, _t = t => t >= 1536 && t <= 1791, Pt = t => t >= 1872 && t <= 1919, St = t => t >= 2208 && t <= 2303, Ot = t => t >= 4352 && t <= 4607,
|
|
7256
|
+
const kt = t => t >= 128 && t <= 255, _t = t => t >= 1536 && t <= 1791, Pt = t => t >= 1872 && t <= 1919, St = t => t >= 2208 && t <= 2303, Ot = t => t >= 4352 && t <= 4607, Ct = t => t >= 5120 && t <= 5759, It = t => t >= 6320 && t <= 6399, Tt = t => t >= 8192 && t <= 8303, Dt = t => t >= 8448 && t <= 8527, Lt = t => t >= 8528 && t <= 8591, Ut = t => t >= 8960 && t <= 9215, Et = t => t >= 9216 && t <= 9279, jt = t => t >= 9280 && t <= 9311, Rt = t => t >= 9312 && t <= 9471, Nt = t => t >= 9632 && t <= 9727, zt = t => t >= 9728 && t <= 9983, Wt = t => t >= 11008 && t <= 11263, Ht = t => t >= 11904 && t <= 12031, Vt = t => t >= 12032 && t <= 12255, $t = t => t >= 12272 && t <= 12287, Gt = t => t >= 12288 && t <= 12351, Jt = t => t >= 12352 && t <= 12447, qt = t => t >= 12448 && t <= 12543, Bt = t => t >= 12544 && t <= 12591, Xt = t => t >= 12592 && t <= 12687, Zt = t => t >= 12688 && t <= 12703, Yt = t => t >= 12704 && t <= 12735, Kt = t => t >= 12736 && t <= 12783, Qt = t => t >= 12784 && t <= 12799, ti = t => t >= 12800 && t <= 13055, ii = t => t >= 13056 && t <= 13311, ni = t => t >= 13312 && t <= 19903, ei = t => t >= 19904 && t <= 19967, ri = t => t >= 19968 && t <= 40959, si = t => t >= 40960 && t <= 42127, oi = t => t >= 42128 && t <= 42191, hi = t => t >= 43360 && t <= 43391, ai = t => t >= 44032 && t <= 55215, li = t => t >= 55216 && t <= 55295, ui = t => t >= 57344 && t <= 63743, ci = t => t >= 63744 && t <= 64255, fi = t => t >= 64336 && t <= 65023, di = t => t >= 65040 && t <= 65055, yi = t => t >= 65072 && t <= 65103, pi = t => t >= 65104 && t <= 65135, mi = t => t >= 65136 && t <= 65279, vi = t => t >= 65280 && t <= 65519;
|
|
7250
7257
|
function gi(t) {
|
|
7251
7258
|
return !_t(t) && (!Pt(t) && (!St(t) && (!fi(t) && !mi(t))));
|
|
7252
7259
|
}
|
|
7253
7260
|
function wi(t) {
|
|
7254
|
-
return 746 === t || 747 === t || !(t < 4352) && (!!Yt(t) || (!!Bt(t) || (!(!yi(t) || t >= 65097 && t <= 65103) || (!!ci(t) || (!!ii(t) || (!!Ht(t) || (!!Kt(t) || (!(
|
|
7261
|
+
return 746 === t || 747 === t || !(t < 4352) && (!!Yt(t) || (!!Bt(t) || (!(!yi(t) || t >= 65097 && t <= 65103) || (!!ci(t) || (!!ii(t) || (!!Ht(t) || (!!Kt(t) || (!(!Gt(t) || t >= 12296 && t <= 12305 || t >= 12308 && t <= 12319 || 12336 === t) || (!!ni(t) || (!!ri(t) || (!!ti(t) || (!!Xt(t) || (!!hi(t) || (!!li(t) || (!!Ot(t) || (!!ai(t) || (!!Jt(t) || (!!$t(t) || (!!Zt(t) || (!!Vt(t) || (!!Qt(t) || (!(!qt(t) || 12540 === t) || (!(!vi(t) || 65288 === t || 65289 === t || 65293 === t || t >= 65306 && t <= 65310 || 65339 === t || 65341 === t || 65343 === t || t >= 65371 && t <= 65503 || 65507 === t || t >= 65512 && t <= 65519) || (!(!pi(t) || t >= 65112 && t <= 65118 || t >= 65123 && t <= 65126) || (!!Ct(t) || (!!It(t) || (!!di(t) || (!!ei(t) || (!!si(t) || !!oi(t))))))))))))))))))))))))))))));
|
|
7255
7262
|
}
|
|
7256
7263
|
function bi(t) {
|
|
7257
7264
|
return !(wi(t) || function(t) {
|
|
7258
|
-
return !(!kt(t) || 167 !== t && 169 !== t && 174 !== t && 177 !== t && 188 !== t && 189 !== t && 190 !== t && 215 !== t && 247 !== t) || (!(!Tt(t) || 8214 !== t && 8224 !== t && 8225 !== t && 8240 !== t && 8241 !== t && 8251 !== t && 8252 !== t && 8258 !== t && 8263 !== t && 8264 !== t && 8265 !== t && 8273 !== t) || (!!Dt(t) || (!!Lt(t) || (!(!
|
|
7265
|
+
return !(!kt(t) || 167 !== t && 169 !== t && 174 !== t && 177 !== t && 188 !== t && 189 !== t && 190 !== t && 215 !== t && 247 !== t) || (!(!Tt(t) || 8214 !== t && 8224 !== t && 8225 !== t && 8240 !== t && 8241 !== t && 8251 !== t && 8252 !== t && 8258 !== t && 8263 !== t && 8264 !== t && 8265 !== t && 8273 !== t) || (!!Dt(t) || (!!Lt(t) || (!(!Ut(t) || !(t >= 8960 && t <= 8967 || t >= 8972 && t <= 8991 || t >= 8996 && t <= 9e3 || 9003 === t || t >= 9085 && t <= 9114 || t >= 9150 && t <= 9165 || 9167 === t || t >= 9169 && t <= 9179 || t >= 9186 && t <= 9215)) || (!(!Et(t) || 9251 === t) || (!!jt(t) || (!!Rt(t) || (!!Nt(t) || (!(!zt(t) || t >= 9754 && t <= 9759) || (!(!Wt(t) || !(t >= 11026 && t <= 11055 || t >= 11088 && t <= 11097 || t >= 11192 && t <= 11243)) || (!!Gt(t) || (!!qt(t) || (!!ui(t) || (!!yi(t) || (!!pi(t) || (!!vi(t) || (8734 === t || 8756 === t || 8757 === t || t >= 9984 && t <= 10087 || t >= 10102 && t <= 10131 || 65532 === t || 65533 === t)))))))))))))))));
|
|
7259
7266
|
}(t));
|
|
7260
7267
|
}
|
|
7261
7268
|
function Mi(t) {
|
|
@@ -7395,7 +7402,7 @@
|
|
|
7395
7402
|
let o = 0;
|
|
7396
7403
|
for (let n = 0; n < t.length; n++) {
|
|
7397
7404
|
const a = t.charCodeAt(n), l = e[a];
|
|
7398
|
-
l && !Si[a] && (o += l.metrics.advance + i), n < t.length - 1 && (Oi[a] || !((h = a) < 11904) && (Yt(h) || Bt(h) || yi(h) || ci(h) || ii(h) || Ht(h) || Kt(h) ||
|
|
7405
|
+
l && !Si[a] && (o += l.metrics.advance + i), n < t.length - 1 && (Oi[a] || !((h = a) < 11904) && (Yt(h) || Bt(h) || yi(h) || ci(h) || ii(h) || Ht(h) || Kt(h) || Gt(h) || ni(h) || ri(h) || ti(h) || vi(h) || Jt(h) || $t(h) || Vt(h) || Qt(h) || qt(h) || di(h) || oi(h) || si(h))) && r.push(Ti(n + 1, o, s, r, Ii(a, t.charCodeAt(n + 1)), !1));
|
|
7399
7406
|
}
|
|
7400
7407
|
var h;
|
|
7401
7408
|
return function t(i) {
|
|
@@ -7465,19 +7472,19 @@
|
|
|
7465
7472
|
8211: !0,
|
|
7466
7473
|
8231: !0
|
|
7467
7474
|
};
|
|
7468
|
-
function
|
|
7475
|
+
function Ci(t, i, n, e) {
|
|
7469
7476
|
const r = Math.pow(t - i, 2);
|
|
7470
7477
|
return e ? t < i ? r / 2 : 2 * r : r + Math.abs(n) * n;
|
|
7471
7478
|
}
|
|
7472
|
-
function
|
|
7479
|
+
function Ii(t, i) {
|
|
7473
7480
|
let n = 0;
|
|
7474
7481
|
return 10 === t && (n -= 1e4), 40 !== t && 65288 !== t || (n += 50), 41 !== i && 65289 !== i || (n += 50),
|
|
7475
7482
|
n;
|
|
7476
7483
|
}
|
|
7477
7484
|
function Ti(t, i, n, e, r, s) {
|
|
7478
|
-
let o = null, h =
|
|
7485
|
+
let o = null, h = Ci(i, n, r, s);
|
|
7479
7486
|
for (let t = 0; t < e.length; t++) {
|
|
7480
|
-
const a = e[t], l =
|
|
7487
|
+
const a = e[t], l = Ci(i - a.x, n, r, s) + a.badness;
|
|
7481
7488
|
l <= h && (o = a, h = l);
|
|
7482
7489
|
}
|
|
7483
7490
|
return {
|
|
@@ -7527,7 +7534,7 @@
|
|
|
7527
7534
|
for (let i = n; i <= e; i++) t[i].x -= o;
|
|
7528
7535
|
}
|
|
7529
7536
|
}
|
|
7530
|
-
function
|
|
7537
|
+
function Ui(t) {
|
|
7531
7538
|
if (!function(t) {
|
|
7532
7539
|
for (const i of t) if (Mi(i.charCodeAt(0))) return !0;
|
|
7533
7540
|
return !1;
|
|
@@ -7543,7 +7550,7 @@
|
|
|
7543
7550
|
return e.length && n.push(...e), n.length && (h > 0 && n.reverse(), i.push(...n)),
|
|
7544
7551
|
i.reverse().join("");
|
|
7545
7552
|
}
|
|
7546
|
-
const
|
|
7553
|
+
const Ei = /\{ *([\w_]+) *\}/g;
|
|
7547
7554
|
class ji {
|
|
7548
7555
|
constructor(t, i, n, e, r) {
|
|
7549
7556
|
this.feature = t, this.symbolDef = i, this.symbol = n, this.options = r, this.W = this.H.bind(this),
|
|
@@ -7649,7 +7656,7 @@
|
|
|
7649
7656
|
lt(t) || (i.markerLinePatternFile = t);
|
|
7650
7657
|
} else g.markerLinePatternFile && (i.markerLinePatternFile = g.markerLinePatternFile);
|
|
7651
7658
|
t = "vector://" + JSON.stringify(i);
|
|
7652
|
-
} else t = b ? b.replace(
|
|
7659
|
+
} else t = b ? b.replace(Ei, this.W) : g.markerPath ? function(t, i, n) {
|
|
7653
7660
|
if (!t.markerPath) return null;
|
|
7654
7661
|
let e = 1;
|
|
7655
7662
|
const r = function(t) {
|
|
@@ -7706,7 +7713,7 @@
|
|
|
7706
7713
|
const n = _[i];
|
|
7707
7714
|
return lt(n) ? "" : Array.isArray(n) ? n.join() : n;
|
|
7708
7715
|
})) : k);
|
|
7709
|
-
n && n.length && (n =
|
|
7716
|
+
n && n.length && (n = Ui(n), v.glyph = {
|
|
7710
7717
|
font: i,
|
|
7711
7718
|
text: n
|
|
7712
7719
|
});
|
|
@@ -7732,16 +7739,16 @@
|
|
|
7732
7739
|
let a;
|
|
7733
7740
|
for (let t = 0; t < h.length - 1; t++) {
|
|
7734
7741
|
let o = h[t], l = h[t + 1];
|
|
7735
|
-
o.x < i && l.x < i || (o.x < i ? o = new
|
|
7736
|
-
o.y < n && l.y < n || (o.y < n ? o = new
|
|
7737
|
-
o.x >= e && l.x >= e || (o.x >= e ? o = new
|
|
7738
|
-
o.y >= r && l.y >= r || (o.y >= r ? o = new
|
|
7742
|
+
o.x < i && l.x < i || (o.x < i ? o = new E(i, o.y + (l.y - o.y) * ((i - o.x) / (l.x - o.x))).D() : l.x < i && (l = new E(i, o.y + (l.y - o.y) * ((i - o.x) / (l.x - o.x))).D()),
|
|
7743
|
+
o.y < n && l.y < n || (o.y < n ? o = new E(o.x + (l.x - o.x) * ((n - o.y) / (l.y - o.y)), n).D() : l.y < n && (l = new E(o.x + (l.x - o.x) * ((n - o.y) / (l.y - o.y)), n).D()),
|
|
7744
|
+
o.x >= e && l.x >= e || (o.x >= e ? o = new E(e, o.y + (l.y - o.y) * ((e - o.x) / (l.x - o.x))).D() : l.x >= e && (l = new E(e, o.y + (l.y - o.y) * ((e - o.x) / (l.x - o.x))).D()),
|
|
7745
|
+
o.y >= r && l.y >= r || (o.y >= r ? o = new E(o.x + (l.x - o.x) * ((r - o.y) / (l.y - o.y)), r).D() : l.y >= r && (l = new E(o.x + (l.x - o.x) * ((r - o.y) / (l.y - o.y)), r).D()),
|
|
7739
7746
|
a && o.equals(a[a.length - 1]) || (a = [ o ], s.push(a)), a.push(l)))));
|
|
7740
7747
|
}
|
|
7741
7748
|
}
|
|
7742
7749
|
return s;
|
|
7743
7750
|
}
|
|
7744
|
-
class zi extends
|
|
7751
|
+
class zi extends E {
|
|
7745
7752
|
constructor(t, i, n, e) {
|
|
7746
7753
|
super(t, i), this.angle = n, void 0 !== e && (this.segment = e);
|
|
7747
7754
|
}
|
|
@@ -7809,7 +7816,7 @@
|
|
|
7809
7816
|
function Vi(t, i, n) {
|
|
7810
7817
|
return t * (1 - n) + i * n;
|
|
7811
7818
|
}
|
|
7812
|
-
var
|
|
7819
|
+
var $i = {
|
|
7813
7820
|
exports: {}
|
|
7814
7821
|
};
|
|
7815
7822
|
!function(t, i) {
|
|
@@ -7838,8 +7845,8 @@
|
|
|
7838
7845
|
}(n, e, r || 0, s || n.length - 1, o || i);
|
|
7839
7846
|
};
|
|
7840
7847
|
}();
|
|
7841
|
-
}(
|
|
7842
|
-
var
|
|
7848
|
+
}($i);
|
|
7849
|
+
var Gi = $i.exports;
|
|
7843
7850
|
function Ji(t, i) {
|
|
7844
7851
|
const n = t.length;
|
|
7845
7852
|
if (n <= 1) return [ t ];
|
|
@@ -7850,7 +7857,7 @@
|
|
|
7850
7857
|
0 !== n && (t[i].area = Math.abs(n), void 0 === s && (s = n < 0), s === n < 0 ? (r && e.push(r),
|
|
7851
7858
|
r = [ t[i] ]) : r.push(t[i]));
|
|
7852
7859
|
}
|
|
7853
|
-
if (r && e.push(r), i > 1) for (let t = 0; t < e.length; t++) e[t].length <= i || (
|
|
7860
|
+
if (r && e.push(r), i > 1) for (let t = 0; t < e.length; t++) e[t].length <= i || (Gi(e[t], i, 1, e[t].length - 1, qi),
|
|
7854
7861
|
e[t] = e[t].slice(0, i));
|
|
7855
7862
|
return e;
|
|
7856
7863
|
}
|
|
@@ -7917,7 +7924,7 @@
|
|
|
7917
7924
|
const a = s - e, l = o - r, u = Math.min(a, l);
|
|
7918
7925
|
let c = u / 2;
|
|
7919
7926
|
const f = new Yi(null, tn);
|
|
7920
|
-
if (0 === u) return new
|
|
7927
|
+
if (0 === u) return new E(e, r);
|
|
7921
7928
|
for (let i = e; i < s; i += u) for (let n = r; n < o; n += u) f.push(new nn(i + c, n + c, c, t));
|
|
7922
7929
|
let d = function(t) {
|
|
7923
7930
|
let i = 0, n = 0, e = 0;
|
|
@@ -7942,7 +7949,7 @@
|
|
|
7942
7949
|
return i.max - t.max;
|
|
7943
7950
|
}
|
|
7944
7951
|
function nn(t, i, n, e) {
|
|
7945
|
-
this.p = new
|
|
7952
|
+
this.p = new E(t, i), this.h = n, this.d = function(t, i) {
|
|
7946
7953
|
let n = !1, e = 1 / 0;
|
|
7947
7954
|
for (let r = 0; r < i.length; r++) {
|
|
7948
7955
|
const s = i[r];
|
|
@@ -8542,20 +8549,20 @@
|
|
|
8542
8549
|
e = Sn(_n[i[r].parent][r], e), r = i[r].parent;
|
|
8543
8550
|
return e.conversion = n, e;
|
|
8544
8551
|
}
|
|
8545
|
-
var
|
|
8552
|
+
var Cn = gn.exports, In = function(t) {
|
|
8546
8553
|
for (var i = Pn(t), n = {}, e = Object.keys(i), r = e.length, s = 0; s < r; s++) {
|
|
8547
8554
|
var o = e[s];
|
|
8548
8555
|
null !== i[o].parent && (n[o] = On(o, i));
|
|
8549
8556
|
}
|
|
8550
8557
|
return n;
|
|
8551
8558
|
}, Tn = {};
|
|
8552
|
-
Object.keys(
|
|
8559
|
+
Object.keys(Cn).forEach((function(t) {
|
|
8553
8560
|
Tn[t] = {}, Object.defineProperty(Tn[t], "channels", {
|
|
8554
|
-
value:
|
|
8561
|
+
value: Cn[t].channels
|
|
8555
8562
|
}), Object.defineProperty(Tn[t], "labels", {
|
|
8556
|
-
value:
|
|
8563
|
+
value: Cn[t].labels
|
|
8557
8564
|
});
|
|
8558
|
-
var i =
|
|
8565
|
+
var i = In(t);
|
|
8559
8566
|
Object.keys(i).forEach((function(n) {
|
|
8560
8567
|
var e = i[n];
|
|
8561
8568
|
Tn[t][n] = function(t) {
|
|
@@ -8576,25 +8583,25 @@
|
|
|
8576
8583
|
}(e);
|
|
8577
8584
|
}));
|
|
8578
8585
|
}));
|
|
8579
|
-
var Dn = Tn, Ln = rn.exports,
|
|
8580
|
-
Object.keys(
|
|
8581
|
-
Rn[
|
|
8586
|
+
var Dn = Tn, Ln = rn.exports, Un = Dn, En = [].slice, jn = [ "keyword", "gray", "hex" ], Rn = {};
|
|
8587
|
+
Object.keys(Un).forEach((function(t) {
|
|
8588
|
+
Rn[En.call(Un[t].labels).sort().join("")] = t;
|
|
8582
8589
|
}));
|
|
8583
8590
|
var Nn = {};
|
|
8584
8591
|
function zn(t, i) {
|
|
8585
8592
|
if (!(this instanceof zn)) return new zn(t, i);
|
|
8586
|
-
if (i && i in jn && (i = null), i && !(i in
|
|
8593
|
+
if (i && i in jn && (i = null), i && !(i in Un)) throw new Error("Unknown model: " + i);
|
|
8587
8594
|
var n, e;
|
|
8588
8595
|
if (null == t) this.model = "rgb", this.color = [ 0, 0, 0 ], this.valpha = 1; else if (t instanceof zn) this.model = t.model,
|
|
8589
8596
|
this.color = t.color.slice(), this.valpha = t.valpha; else if ("string" == typeof t) {
|
|
8590
8597
|
var r = Ln.get(t);
|
|
8591
8598
|
if (null === r) throw new Error("Unable to parse color from string: " + t);
|
|
8592
|
-
this.model = r.model, e =
|
|
8599
|
+
this.model = r.model, e = Un[this.model].channels, this.color = r.value.slice(0, e),
|
|
8593
8600
|
this.valpha = "number" == typeof r.value[e] ? r.value[e] : 1;
|
|
8594
8601
|
} else if (t.length) {
|
|
8595
|
-
this.model = i || "rgb", e =
|
|
8596
|
-
var s =
|
|
8597
|
-
this.color =
|
|
8602
|
+
this.model = i || "rgb", e = Un[this.model].channels;
|
|
8603
|
+
var s = En.call(t, 0, e);
|
|
8604
|
+
this.color = $n(s, e), this.valpha = "number" == typeof t[e] ? t[e] : 1;
|
|
8598
8605
|
} else if ("number" == typeof t) t &= 16777215, this.model = "rgb", this.color = [ t >> 16 & 255, t >> 8 & 255, 255 & t ],
|
|
8599
8606
|
this.valpha = 1; else {
|
|
8600
8607
|
this.valpha = 1;
|
|
@@ -8603,11 +8610,11 @@
|
|
|
8603
8610
|
var h = o.sort().join("");
|
|
8604
8611
|
if (!(h in Rn)) throw new Error("Unable to parse color from object: " + JSON.stringify(t));
|
|
8605
8612
|
this.model = Rn[h];
|
|
8606
|
-
var a =
|
|
8613
|
+
var a = Un[this.model].labels, l = [];
|
|
8607
8614
|
for (n = 0; n < a.length; n++) l.push(t[a[n]]);
|
|
8608
|
-
this.color =
|
|
8615
|
+
this.color = $n(l);
|
|
8609
8616
|
}
|
|
8610
|
-
if (Nn[this.model]) for (e =
|
|
8617
|
+
if (Nn[this.model]) for (e = Un[this.model].channels, n = 0; n < e; n++) {
|
|
8611
8618
|
var u = Nn[this.model][n];
|
|
8612
8619
|
u && (this.color[n] = u(this.color[n]));
|
|
8613
8620
|
}
|
|
@@ -8630,7 +8637,7 @@
|
|
|
8630
8637
|
function Vn(t) {
|
|
8631
8638
|
return Array.isArray(t) ? t : [ t ];
|
|
8632
8639
|
}
|
|
8633
|
-
function
|
|
8640
|
+
function $n(t, i) {
|
|
8634
8641
|
for (var n = 0; n < i; n++) "number" != typeof t[n] && (t[n] = 0);
|
|
8635
8642
|
return t;
|
|
8636
8643
|
}
|
|
@@ -8653,7 +8660,7 @@
|
|
|
8653
8660
|
return 1 === this.valpha ? this.color.slice() : this.color.concat(this.valpha);
|
|
8654
8661
|
},
|
|
8655
8662
|
object: function() {
|
|
8656
|
-
for (var t = {}, i =
|
|
8663
|
+
for (var t = {}, i = Un[this.model].channels, n = Un[this.model].labels, e = 0; e < i; e++) t[n[e]] = this.color[e];
|
|
8657
8664
|
return 1 !== this.valpha && (t.alpha = this.valpha), t;
|
|
8658
8665
|
},
|
|
8659
8666
|
unitArray: function() {
|
|
@@ -8703,7 +8710,7 @@
|
|
|
8703
8710
|
a: Wn("lab", 1),
|
|
8704
8711
|
b: Wn("lab", 2),
|
|
8705
8712
|
keyword: function(t) {
|
|
8706
|
-
return arguments.length ? new zn(t) :
|
|
8713
|
+
return arguments.length ? new zn(t) : Un[this.model].keyword(this.color);
|
|
8707
8714
|
},
|
|
8708
8715
|
hex: function(t) {
|
|
8709
8716
|
return arguments.length ? new zn(t) : Ln.to.hex(this.rgb().round().color);
|
|
@@ -8781,20 +8788,20 @@
|
|
|
8781
8788
|
var n = t.rgb(), e = this.rgb(), r = void 0 === i ? .5 : i, s = 2 * r - 1, o = n.alpha() - e.alpha(), h = ((s * o == -1 ? s : (s + o) / (1 + s * o)) + 1) / 2, a = 1 - h;
|
|
8782
8789
|
return zn.rgb(h * n.red() + a * e.red(), h * n.green() + a * e.green(), h * n.blue() + a * e.blue(), n.alpha() * r + e.alpha() * (1 - r));
|
|
8783
8790
|
}
|
|
8784
|
-
}, Object.keys(
|
|
8791
|
+
}, Object.keys(Un).forEach((function(t) {
|
|
8785
8792
|
if (-1 === jn.indexOf(t)) {
|
|
8786
|
-
var i =
|
|
8793
|
+
var i = Un[t].channels;
|
|
8787
8794
|
zn.prototype[t] = function() {
|
|
8788
8795
|
if (this.model === t) return new zn(this);
|
|
8789
8796
|
if (arguments.length) return new zn(arguments, t);
|
|
8790
8797
|
var n = "number" == typeof arguments[i] ? i : this.valpha;
|
|
8791
|
-
return new zn(Vn(
|
|
8798
|
+
return new zn(Vn(Un[this.model][t].raw(this.color)).concat(n), t);
|
|
8792
8799
|
}, zn[t] = function(n) {
|
|
8793
|
-
return "number" == typeof n && (n =
|
|
8800
|
+
return "number" == typeof n && (n = $n(En.call(arguments), i)), new zn(n, t);
|
|
8794
8801
|
};
|
|
8795
8802
|
}
|
|
8796
8803
|
}));
|
|
8797
|
-
var
|
|
8804
|
+
var Gn = zn;
|
|
8798
8805
|
const Jn = 14;
|
|
8799
8806
|
class qn extends xt {
|
|
8800
8807
|
static splitPointSymbol(t, i = 0) {
|
|
@@ -9043,20 +9050,20 @@
|
|
|
9043
9050
|
if (wi(t.charAt(n).charCodeAt(0))) i = 0; else if (i++, i >= 1) return !1;
|
|
9044
9051
|
}
|
|
9045
9052
|
return !0;
|
|
9046
|
-
}(t.getIconAndGlyph().glyph.text) ? 1 : 0, {textFillFn: c, textSizeFn: f, textHaloFillFn: d, textHaloRadiusFn: y, textHaloOpacityFn: p, textDxFn: m, textDyFn: v, textPitchAlignmentFn: g, textRotationAlignmentFn: w, textRotationFn: b, textAllowOverlapFn: x, textIgnorePlacementFn: F, textOpacityFn: A, markerWidthFn: k, markerHeightFn: _, markerDxFn: P, markerDyFn: S, markerPitchAlignmentFn: O, markerRotationAlignmentFn:
|
|
9047
|
-
let
|
|
9053
|
+
}(t.getIconAndGlyph().glyph.text) ? 1 : 0, {textFillFn: c, textSizeFn: f, textHaloFillFn: d, textHaloRadiusFn: y, textHaloOpacityFn: p, textDxFn: m, textDyFn: v, textPitchAlignmentFn: g, textRotationAlignmentFn: w, textRotationFn: b, textAllowOverlapFn: x, textIgnorePlacementFn: F, textOpacityFn: A, markerWidthFn: k, markerHeightFn: _, markerDxFn: P, markerDyFn: S, markerPitchAlignmentFn: O, markerRotationAlignmentFn: C, markerRotationFn: I, markerAllowOverlapFn: T, markerIgnorePlacementFn: D, markerOpacityFn: L} = this.j;
|
|
9054
|
+
let U, j, R, N, z, W, H, V, $, G, J, q, B, X, Z, Y, K;
|
|
9048
9055
|
if (l) {
|
|
9049
9056
|
const i = t.getIconAndGlyph().glyph.font;
|
|
9050
|
-
|
|
9057
|
+
U = function(t, i, n) {
|
|
9051
9058
|
const e = t.positionedGlyphs, r = [];
|
|
9052
9059
|
for (let s = 0; s < e.length; s++) {
|
|
9053
9060
|
const o = e[s], h = n[o.glyph];
|
|
9054
9061
|
if (!h) continue;
|
|
9055
9062
|
const a = h.rect;
|
|
9056
9063
|
if (!a) continue;
|
|
9057
|
-
const l = 4, u = h.metrics.advance / 2, c = h.metrics.height / 2, f = i ? [ o.x + u, 0 ] : [ 0, 0 ], d = i ? [ 0, o.y - c ] : [ o.x + u, o.y - c ], y = h.metrics.left - l - u + d[0], p = h.metrics.top - l + d[1], m = y + a.w, v = p + a.h, g = new
|
|
9064
|
+
const l = 4, u = h.metrics.advance / 2, c = h.metrics.height / 2, f = i ? [ o.x + u, 0 ] : [ 0, 0 ], d = i ? [ 0, o.y - c ] : [ o.x + u, o.y - c ], y = h.metrics.left - l - u + d[0], p = h.metrics.top - l + d[1], m = y + a.w, v = p + a.h, g = new E(y, p), w = new E(m, p), b = new E(y, v), M = new E(m, v);
|
|
9058
9065
|
if (i && o.vertical) {
|
|
9059
|
-
const t = new
|
|
9066
|
+
const t = new E(-u, u), i = -Math.PI / 2, n = new E(5, 0);
|
|
9060
9067
|
g.O(i, t).m(n), w.O(i, t).m(n), b.O(i, t).m(n), M.O(i, t).m(n);
|
|
9061
9068
|
}
|
|
9062
9069
|
r.push({
|
|
@@ -9070,16 +9077,16 @@
|
|
|
9070
9077
|
});
|
|
9071
9078
|
}
|
|
9072
9079
|
return r;
|
|
9073
|
-
}(n.horizontal, a, this.glyphAtlas.positions[i]), c && (j = c(null, h), M(j) ? j = [ 0, 0, 0, 0 ] : (j = Array.isArray(j) ? j.map(t => 255 * t) :
|
|
9080
|
+
}(n.horizontal, a, this.glyphAtlas.positions[i]), c && (j = c(null, h), M(j) ? j = [ 0, 0, 0, 0 ] : (j = Array.isArray(j) ? j.map(t => 255 * t) : Gn(j).array(),
|
|
9074
9081
|
3 === j.length && j.push(255))), f && (R = f(this.options.zoom, h), null == R && (R = Jn)),
|
|
9075
|
-
d && (N = d(null, h), N = Array.isArray(N) ? N.map(t => 255 * t) :
|
|
9082
|
+
d && (N = d(null, h), N = Array.isArray(N) ? N.map(t => 255 * t) : Gn(N).array(),
|
|
9076
9083
|
3 === N.length && N.push(255)), y && (z = y(null, h)), p && (W = 255 * p(null, h)),
|
|
9077
9084
|
m && (H = m(null, h) || 0), v && (V = v(null, h) || 0), g && (B = +("map" === g(null, h))),
|
|
9078
9085
|
w && (X = +("map" === w(null, h))), b && (Z = wt(b(null, h), 0, 360) * Math.PI / 180);
|
|
9079
|
-
} else
|
|
9086
|
+
} else U = n ? function(t) {
|
|
9080
9087
|
const i = t.image, n = t.top - 1 / i.pixelRatio, e = t.left - 1 / i.pixelRatio, r = t.bottom + 1 / i.pixelRatio, s = t.right + 1 / i.pixelRatio;
|
|
9081
9088
|
let o, h, a, l;
|
|
9082
|
-
return o = new
|
|
9089
|
+
return o = new E(e, n), h = new E(s, n), a = new E(s, r), l = new E(e, r), [ {
|
|
9083
9090
|
tl: o,
|
|
9084
9091
|
tr: h,
|
|
9085
9092
|
bl: l,
|
|
@@ -9094,11 +9101,11 @@
|
|
|
9094
9101
|
glyphOffset: [ 0, 0 ]
|
|
9095
9102
|
} ];
|
|
9096
9103
|
}(n) : function() {
|
|
9097
|
-
const t = new
|
|
9104
|
+
const t = new E(0, 0), i = new E(0, 0), n = new E(0, 0);
|
|
9098
9105
|
return [ {
|
|
9099
9106
|
tl: t,
|
|
9100
9107
|
tr: i,
|
|
9101
|
-
bl: new
|
|
9108
|
+
bl: new E(0, 0),
|
|
9102
9109
|
br: n,
|
|
9103
9110
|
tex: {
|
|
9104
9111
|
x: 0,
|
|
@@ -9109,8 +9116,8 @@
|
|
|
9109
9116
|
writingMode: void 0,
|
|
9110
9117
|
glyphOffset: [ 0, 0 ]
|
|
9111
9118
|
} ];
|
|
9112
|
-
}(), k && (
|
|
9113
|
-
O && (B = +("map" === O(null, h))),
|
|
9119
|
+
}(), k && ($ = k(null, h)), _ && (G = _(null, h)), P && (J = P(null, h)), S && (q = S(null, h)),
|
|
9120
|
+
O && (B = +("map" === O(null, h))), C && (X = +("map" === C(null, h))), I && (Z = wt(I(null, h), 0, 360) * Math.PI / 180);
|
|
9114
9121
|
const Q = T || x;
|
|
9115
9122
|
Q && (Y = Q(null, h) || 0);
|
|
9116
9123
|
const tt = D || F;
|
|
@@ -9118,19 +9125,19 @@
|
|
|
9118
9125
|
tt && (K = tt(null, h) || 0);
|
|
9119
9126
|
const nt = A || L;
|
|
9120
9127
|
nt && (it = 255 * nt(this.options.zoom, h));
|
|
9121
|
-
const et = this.options.EXTENT, rt =
|
|
9128
|
+
const et = this.options.EXTENT, rt = U.length, st = this.getAltitude(t.feature.properties);
|
|
9122
9129
|
for (let t = 0; t < e.length; t++) {
|
|
9123
9130
|
const i = e[t];
|
|
9124
9131
|
if (et !== 1 / 0 && gt(i, et)) continue;
|
|
9125
|
-
const n = i.x, o = i.y, h =
|
|
9132
|
+
const n = i.x, o = i.y, h = U.length;
|
|
9126
9133
|
for (let t = 0; t < h; t++) {
|
|
9127
|
-
const e =
|
|
9134
|
+
const e = U[t], {tl: h, tr: c, bl: f, br: d, tex: y} = e;
|
|
9128
9135
|
this.K(r, n, o, st, 10 * h.x, 10 * h.y, y.x, y.y + y.h), l && this.tt(r, a, rt, e.glyphOffset, i, u),
|
|
9129
|
-
this.it(r, j, R, N, z, W, H, V, G,
|
|
9130
|
-
l && this.tt(r, a, rt, e.glyphOffset, i, u), this.it(r, j, R, N, z, W, H, V, G,
|
|
9136
|
+
this.it(r, j, R, N, z, W, H, V, $, G, J, q, it, B, X, Z, Y, K), this.K(r, n, o, st, 10 * c.x, 10 * c.y, y.x + y.w, y.y + y.h),
|
|
9137
|
+
l && this.tt(r, a, rt, e.glyphOffset, i, u), this.it(r, j, R, N, z, W, H, V, $, G, J, q, it, B, X, Z, Y, K),
|
|
9131
9138
|
this.K(r, n, o, st, 10 * f.x, 10 * f.y, y.x, y.y), l && this.tt(r, a, rt, e.glyphOffset, i, u),
|
|
9132
|
-
this.it(r, j, R, N, z, W, H, V, G,
|
|
9133
|
-
l && this.tt(r, a, rt, e.glyphOffset, i, u), this.it(r, j, R, N, z, W, H, V, G,
|
|
9139
|
+
this.it(r, j, R, N, z, W, H, V, $, G, J, q, it, B, X, Z, Y, K), this.K(r, n, o, st, 10 * d.x, 10 * d.y, y.x + y.w, y.y),
|
|
9140
|
+
l && this.tt(r, a, rt, e.glyphOffset, i, u), this.it(r, j, R, N, z, W, H, V, $, G, J, q, it, B, X, Z, Y, K),
|
|
9134
9141
|
this.addElements(s, s + 1, s + 2), this.addElements(s + 1, s + 2, s + 3), s += 4;
|
|
9135
9142
|
const p = Math.max(Math.abs(n), Math.abs(o), Math.abs(st));
|
|
9136
9143
|
p > this.maxPos && (this.maxPos = p);
|
|
@@ -9148,12 +9155,12 @@
|
|
|
9148
9155
|
}
|
|
9149
9156
|
}
|
|
9150
9157
|
it(t, i, n, e, r, s, o, h, a, l, u, c, f, d, y, p, m, v) {
|
|
9151
|
-
const {textFillFn: g, textSizeFn: w, textHaloFillFn: b, textHaloRadiusFn: M, textHaloOpacityFn: x, textDxFn: F, textDyFn: A, textPitchAlignmentFn: k, textRotationAlignmentFn: _, textRotationFn: P, textAllowOverlapFn: S, textIgnorePlacementFn: O, textOpacityFn:
|
|
9158
|
+
const {textFillFn: g, textSizeFn: w, textHaloFillFn: b, textHaloRadiusFn: M, textHaloOpacityFn: x, textDxFn: F, textDyFn: A, textPitchAlignmentFn: k, textRotationAlignmentFn: _, textRotationFn: P, textAllowOverlapFn: S, textIgnorePlacementFn: O, textOpacityFn: C, markerWidthFn: I, markerHeightFn: T, markerDxFn: D, markerDyFn: L, markerPitchAlignmentFn: U, markerRotationAlignmentFn: E, markerRotationFn: j, markerAllowOverlapFn: R, markerIgnorePlacementFn: N, markerOpacityFn: z} = this.j;
|
|
9152
9159
|
g && t.aTextFill.push(...i), w && t.aTextSize.push(n), b && t.aTextHaloFill.push(...e),
|
|
9153
9160
|
M && t.aTextHaloRadius.push(r), x && t.aTextHaloOpacity.push(s), F && t.aTextDx.push(o),
|
|
9154
|
-
A && t.aTextDy.push(h),
|
|
9161
|
+
A && t.aTextDy.push(h), I && t.aMarkerWidth.push(a), T && t.aMarkerHeight.push(l),
|
|
9155
9162
|
D && t.aMarkerDx.push(u), L && t.aMarkerDy.push(c);
|
|
9156
|
-
(z ||
|
|
9163
|
+
(z || C) && t.aColorOpacity.push(f), (k || U) && t.aPitchAlign.push(d), (E || _) && t.aRotationAlign.push(y),
|
|
9157
9164
|
(j || P) && t.aRotation.push(9362 * p);
|
|
9158
9165
|
const W = R || S, H = N || O;
|
|
9159
9166
|
if (W || H) {
|
|
@@ -9218,98 +9225,104 @@
|
|
|
9218
9225
|
return !this.options.atlas && o && (r[o] = 1), s;
|
|
9219
9226
|
}
|
|
9220
9227
|
getFormat() {
|
|
9221
|
-
const {lineWidthFn: t,
|
|
9228
|
+
const {lineWidthFn: t, lineStrokeWidthFn: i, lineStrokeColorFn: n, lineColorFn: e, lineOpacityFn: r, lineDxFn: s, lineDyFn: o, linePatternAnimSpeedFn: h, linePatternGapFn: a} = this.j, l = [ {
|
|
9222
9229
|
type: Int16Array,
|
|
9223
9230
|
width: 3,
|
|
9224
9231
|
name: "aPosition"
|
|
9225
9232
|
} ];
|
|
9226
|
-
if (this.options.center || this.iconAtlas ?
|
|
9233
|
+
if (this.options.center || this.iconAtlas ? l.push({
|
|
9227
9234
|
type: Int8Array,
|
|
9228
9235
|
width: 3,
|
|
9229
9236
|
name: "aExtrude"
|
|
9230
|
-
}) :
|
|
9237
|
+
}) : l.push({
|
|
9231
9238
|
type: Int8Array,
|
|
9232
9239
|
width: 2,
|
|
9233
9240
|
name: "aExtrude"
|
|
9234
|
-
}),
|
|
9241
|
+
}), l.push({
|
|
9235
9242
|
type: Uint16Array,
|
|
9236
9243
|
width: 1,
|
|
9237
9244
|
name: "aLinesofar"
|
|
9238
|
-
}), t &&
|
|
9245
|
+
}), t && l.push({
|
|
9239
9246
|
type: Uint8Array,
|
|
9240
9247
|
width: 1,
|
|
9241
9248
|
name: "aLineWidth"
|
|
9242
|
-
}), i &&
|
|
9249
|
+
}), i && l.push({
|
|
9243
9250
|
type: Uint8Array,
|
|
9244
9251
|
width: 1,
|
|
9245
|
-
name: "
|
|
9246
|
-
}),
|
|
9252
|
+
name: "aLineStrokeWidth"
|
|
9253
|
+
}), e && l.push({
|
|
9247
9254
|
type: Uint8Array,
|
|
9248
9255
|
width: 4,
|
|
9249
9256
|
name: "aColor"
|
|
9250
|
-
}),
|
|
9257
|
+
}), n && l.push({
|
|
9258
|
+
type: Uint8Array,
|
|
9259
|
+
width: 4,
|
|
9260
|
+
name: "aStrokeColor"
|
|
9261
|
+
}), r && l.push({
|
|
9251
9262
|
type: Uint8Array,
|
|
9252
9263
|
width: 1,
|
|
9253
9264
|
name: "aOpacity"
|
|
9254
|
-
}), this.symbol.lineOffset &&
|
|
9265
|
+
}), this.symbol.lineOffset && l.push({
|
|
9255
9266
|
type: Int8Array,
|
|
9256
9267
|
width: 2,
|
|
9257
9268
|
name: "aExtrudeOffset"
|
|
9258
|
-
}), this.dasharrayFn &&
|
|
9269
|
+
}), this.dasharrayFn && l.push({
|
|
9259
9270
|
type: Uint8Array,
|
|
9260
9271
|
width: 4,
|
|
9261
9272
|
name: "aDasharray"
|
|
9262
|
-
}), this.dashColorFn &&
|
|
9273
|
+
}), this.dashColorFn && l.push({
|
|
9263
9274
|
type: Uint8Array,
|
|
9264
9275
|
width: 4,
|
|
9265
9276
|
name: "aDashColor"
|
|
9266
9277
|
}), this.iconAtlas) {
|
|
9267
9278
|
const t = this.getIconAtlasMaxValue();
|
|
9268
|
-
|
|
9279
|
+
l.push({
|
|
9269
9280
|
type: t > 255 ? Uint16Array : Uint8Array,
|
|
9270
9281
|
width: 4,
|
|
9271
9282
|
name: "aTexInfo"
|
|
9272
9283
|
});
|
|
9273
9284
|
}
|
|
9274
|
-
return
|
|
9285
|
+
return s && l.push({
|
|
9275
9286
|
type: Int8Array,
|
|
9276
9287
|
width: 1,
|
|
9277
9288
|
name: "aLineDx"
|
|
9278
|
-
}),
|
|
9289
|
+
}), o && l.push({
|
|
9279
9290
|
type: Int8Array,
|
|
9280
9291
|
width: 1,
|
|
9281
9292
|
name: "aLineDy"
|
|
9282
|
-
}),
|
|
9293
|
+
}), h && l.push({
|
|
9283
9294
|
type: Int8Array,
|
|
9284
9295
|
width: 1,
|
|
9285
9296
|
name: "aLinePatternAnimSpeed"
|
|
9286
|
-
}),
|
|
9297
|
+
}), a && l.push({
|
|
9287
9298
|
type: Uint8Array,
|
|
9288
9299
|
width: 1,
|
|
9289
9300
|
name: "aLinePatternGap"
|
|
9290
|
-
}),
|
|
9301
|
+
}), l;
|
|
9291
9302
|
}
|
|
9292
9303
|
placeVector(t) {
|
|
9293
|
-
const {lineJoinFn: i, lineCapFn: n, lineWidthFn: e,
|
|
9294
|
-
|
|
9295
|
-
let
|
|
9296
|
-
if (i && (
|
|
9304
|
+
const {lineJoinFn: i, lineCapFn: n, lineWidthFn: e, lineStrokeWidthFn: r, lineStrokeColorFn: s, lineColorFn: o, lineOpacityFn: h, lineJoinPatternModeFn: a, lineDxFn: l, lineDyFn: u, linePatternAnimSpeedFn: c, linePatternGapFn: f} = this.j, d = this.symbol, y = t.feature, p = 3 === y.type, m = this.elements;
|
|
9305
|
+
p && (this.elements = []);
|
|
9306
|
+
let v = d.lineJoin || "miter", g = d.lineCap || "butt";
|
|
9307
|
+
if (i && (v = i(this.options.zoom, y.properties) || "miter"), n && (g = n(this.options.zoom, y.properties) || "butt"),
|
|
9297
9308
|
e) {
|
|
9298
|
-
let t = e(this.options.zoom,
|
|
9309
|
+
let t = e(this.options.zoom, y.properties);
|
|
9299
9310
|
lt(t) && (t = 4), this.feaLineWidth = t;
|
|
9300
|
-
} else this.feaLineWidth =
|
|
9311
|
+
} else this.feaLineWidth = d.lineWidth;
|
|
9301
9312
|
if (r) {
|
|
9302
|
-
let t = r(this.options.zoom,
|
|
9303
|
-
lt(t) && (t = 0), this.
|
|
9304
|
-
} else this.
|
|
9305
|
-
if (
|
|
9306
|
-
M(this.feaColor) ? this.feaColor = [ 0, 0, 0, 0 ] : (Array.isArray(this.feaColor) ? this.feaColor = this.feaColor.map(t => 255 * t) : this.feaColor =
|
|
9307
|
-
3 === this.feaColor.length && this.feaColor.push(255))),
|
|
9308
|
-
|
|
9313
|
+
let t = r(this.options.zoom, y.properties);
|
|
9314
|
+
lt(t) && (t = 0), this.feaLineStrokeWidth = t;
|
|
9315
|
+
} else this.feaLineStrokeWidth = d.lineStrokeWidth || 0;
|
|
9316
|
+
if (o && (this.feaColor = o(this.options.zoom, y.properties) || [ 0, 0, 0, 255 ],
|
|
9317
|
+
M(this.feaColor) ? this.feaColor = [ 0, 0, 0, 0 ] : (Array.isArray(this.feaColor) ? this.feaColor = this.feaColor.map(t => 255 * t) : this.feaColor = Gn(this.feaColor).array(),
|
|
9318
|
+
3 === this.feaColor.length && this.feaColor.push(255))), s && (this.feaStrokeColor = s(this.options.zoom, y.properties) || [ 0, 0, 0, 255 ],
|
|
9319
|
+
M(this.feaStrokeColor) ? this.feaStrokeColor = [ 0, 0, 0, 0 ] : (Array.isArray(this.feaStrokeColor) ? this.feaStrokeColor = this.feaStrokeColor.map(t => 255 * t) : this.feaStrokeColor = Gn(this.feaStrokeColor).array(),
|
|
9320
|
+
3 === this.feaStrokeColor.length && this.feaStrokeColor.push(255))), h) {
|
|
9321
|
+
let t = h(this.options.zoom, y.properties);
|
|
9309
9322
|
lt(t) && (t = 1), this.feaOpacity = 255 * t;
|
|
9310
9323
|
}
|
|
9311
9324
|
if (this.dasharrayFn) {
|
|
9312
|
-
let t = this.dasharrayFn(this.options.zoom,
|
|
9325
|
+
let t = this.dasharrayFn(this.options.zoom, y.properties) || [ 0, 0, 0, 0 ];
|
|
9313
9326
|
if (t.length < 4) {
|
|
9314
9327
|
const i = t;
|
|
9315
9328
|
1 === t.length ? t = [ i[0], i[0], i[0], i[0] ] : 2 === t.length ? t = [ i[0], i[1], i[0], i[1] ] : 3 === t.length && (t = [ i[0], i[1], i[2], i[2] ]);
|
|
@@ -9317,8 +9330,8 @@
|
|
|
9317
9330
|
this.feaDash = t;
|
|
9318
9331
|
}
|
|
9319
9332
|
if (this.dashColorFn) {
|
|
9320
|
-
let t = (this.dashColorFn ? this.dashColorFn(this.options.zoom,
|
|
9321
|
-
t = Array.isArray(t) ? t.map(t => 255 * t) :
|
|
9333
|
+
let t = (this.dashColorFn ? this.dashColorFn(this.options.zoom, y.properties) : this.symbol.lineDashColor) || [ 0, 0, 0, 0 ];
|
|
9334
|
+
t = Array.isArray(t) ? t.map(t => 255 * t) : Gn(t).array(), 3 === t.length && t.push(255),
|
|
9322
9335
|
this.feaDashColor = t;
|
|
9323
9336
|
}
|
|
9324
9337
|
if (this.iconAtlas) {
|
|
@@ -9328,33 +9341,33 @@
|
|
|
9328
9341
|
this.feaTexInfo[0] = t[0], this.feaTexInfo[1] = t[1], this.feaTexInfo[2] = n[0] - 1,
|
|
9329
9342
|
this.feaTexInfo[3] = n[1] - 1;
|
|
9330
9343
|
} else this.feaTexInfo[0] = this.feaTexInfo[1] = this.feaTexInfo[2] = this.feaTexInfo[3] = 0;
|
|
9331
|
-
this.feaJoinPatternMode =
|
|
9344
|
+
this.feaJoinPatternMode = a ? a(this.options.zoom, y.properties) || 0 : d.lineJoinPatternMode || 0;
|
|
9332
9345
|
}
|
|
9333
|
-
if (
|
|
9334
|
-
let t =
|
|
9346
|
+
if (l) {
|
|
9347
|
+
let t = l(this.options.zoom, y.properties);
|
|
9335
9348
|
lt(t) && (t = 0), this.feaLineDx = t;
|
|
9336
9349
|
}
|
|
9337
|
-
if (
|
|
9338
|
-
let t =
|
|
9350
|
+
if (u) {
|
|
9351
|
+
let t = u(this.options.zoom, y.properties);
|
|
9339
9352
|
lt(t) && (t = 0), this.feaLineDy = t;
|
|
9340
9353
|
}
|
|
9341
|
-
if (
|
|
9342
|
-
let t =
|
|
9354
|
+
if (c) {
|
|
9355
|
+
let t = c(this.options.zoom, y.properties);
|
|
9343
9356
|
lt(t) && (t = 0), 0 !== t && (this.properties.hasPatternAnim = 1), this.feaPatternAnimSpeed = t;
|
|
9344
9357
|
}
|
|
9345
|
-
if (
|
|
9346
|
-
let t =
|
|
9358
|
+
if (f) {
|
|
9359
|
+
let t = f(this.options.zoom, y.properties);
|
|
9347
9360
|
lt(t) && (t = 0), this.feaLinePatternGap = t;
|
|
9348
9361
|
}
|
|
9349
|
-
const
|
|
9350
|
-
let
|
|
9351
|
-
|
|
9352
|
-
for (let t = 0; t <
|
|
9362
|
+
const w = this.options.EXTENT;
|
|
9363
|
+
let b = y.geometry;
|
|
9364
|
+
w !== 1 / 0 && 3 !== y.type && (b = Ni(y.geometry, -1, -1, w + 1, w + 1));
|
|
9365
|
+
for (let t = 0; t < b.length; t++) {
|
|
9353
9366
|
this.offset = this.data.aPosition.length / 3;
|
|
9354
|
-
const i =
|
|
9355
|
-
this.et(i,
|
|
9367
|
+
const i = b[t];
|
|
9368
|
+
this.et(i, y, v, g, 2, 1.05), p && (this.rt(m), this.elements = []);
|
|
9356
9369
|
}
|
|
9357
|
-
|
|
9370
|
+
p && (this.elements = m);
|
|
9358
9371
|
}
|
|
9359
9372
|
st() {
|
|
9360
9373
|
return this.iconAtlas && this.feaTexInfo[2] && this.feaTexInfo[3];
|
|
@@ -9380,12 +9393,12 @@
|
|
|
9380
9393
|
primitiveLength: 0
|
|
9381
9394
|
};
|
|
9382
9395
|
let d, y, p, m, v;
|
|
9383
|
-
this.e1 = this.e2 = -1, a && (d = t[l - 2], v = t[u].sub(d).
|
|
9396
|
+
this.e1 = this.e2 = -1, a && (d = t[l - 2], v = t[u].sub(d).I().T());
|
|
9384
9397
|
for (let i = u; i < l; i++) {
|
|
9385
9398
|
if (p = i === l - 1 ? a ? t[u + 1] : void 0 : t[i + 1], p && t[i].equals(p)) continue;
|
|
9386
|
-
v && (m = v), d && (y = d), d = t[i], v = p ? p.sub(d).
|
|
9399
|
+
v && (m = v), d && (y = d), d = t[i], v = p ? p.sub(d).I().T() : m, m = m || v;
|
|
9387
9400
|
let h = m.add(v);
|
|
9388
|
-
0 === h.x && 0 === h.y || h.
|
|
9401
|
+
0 === h.x && 0 === h.y || h.I();
|
|
9389
9402
|
const g = m.x * v.x + m.y * v.y, w = h.x * v.x + h.y * v.y, b = 0 !== w ? 1 / w : 1 / 0, M = 2 * Math.sqrt(2 - 2 * w), x = w < Bn && y && p, F = m.x * v.y - m.y * v.x > 0;
|
|
9390
9403
|
if (!o && x && i > u) {
|
|
9391
9404
|
const t = d.dist(y);
|
|
@@ -9418,7 +9431,7 @@
|
|
|
9418
9431
|
const t = n - .5;
|
|
9419
9432
|
n += n * t * (n - 1) * ((1.0904 + g * (g * (3.55645 - 1.43519 * g) - 3.2452)) * t * t + (.848013 + g * (.215638 * g - 1.06021)));
|
|
9420
9433
|
}
|
|
9421
|
-
const e = v.sub(m).k(n).m(m).
|
|
9434
|
+
const e = v.sub(m).k(n).m(m).I().k(F ? -1 : 1);
|
|
9422
9435
|
this.addHalfVertex(d, e.x, e.y, !1, F, 0, f);
|
|
9423
9436
|
}
|
|
9424
9437
|
}
|
|
@@ -9456,7 +9469,7 @@
|
|
|
9456
9469
|
s ? this.e2 = l : this.e1 = l;
|
|
9457
9470
|
}
|
|
9458
9471
|
fillData(t, i, n, e, r, s, o, h) {
|
|
9459
|
-
const {lineWidthFn: a,
|
|
9472
|
+
const {lineWidthFn: a, lineStrokeWidthFn: l, lineStrokeColorFn: u, lineColorFn: c, lineOpacityFn: f, lineDxFn: d, lineDyFn: y, linePatternAnimSpeedFn: p, linePatternGapFn: m} = this.j;
|
|
9460
9473
|
if (this.options.center || (i = (i << 1) + (s ? 1 : 0), n = (n << 1) + (o ? 1 : 0)),
|
|
9461
9474
|
t.aPosition.push(i, n, 0), t.aExtrude.push(63 * e, 63 * r), this.options.center || this.iconAtlas) {
|
|
9462
9475
|
let i = 0;
|
|
@@ -9464,11 +9477,12 @@
|
|
|
9464
9477
|
t.aExtrude.push(i);
|
|
9465
9478
|
}
|
|
9466
9479
|
t.aLinesofar.push(h), a && t.aLineWidth.push(Math.round(2 * this.feaLineWidth)),
|
|
9467
|
-
l && t.
|
|
9468
|
-
|
|
9469
|
-
this.
|
|
9470
|
-
|
|
9471
|
-
|
|
9480
|
+
l && t.aLineStrokeWidth.push(Math.round(2 * this.feaLineStrokeWidth)), c && t.aColor.push(...this.feaColor),
|
|
9481
|
+
u && t.aStrokeColor.push(...this.feaStrokeColor), f && t.aOpacity.push(this.feaOpacity),
|
|
9482
|
+
this.dasharrayFn && t.aDasharray.push(...this.feaDash), this.dashColorFn && t.aDashColor.push(...this.feaDashColor),
|
|
9483
|
+
this.iconAtlas && t.aTexInfo.push(...this.feaTexInfo), d && t.aLineDx.push(this.feaLineDx),
|
|
9484
|
+
y && t.aLineDy.push(this.feaLineDy), p && t.aLinePatternAnimSpeed.push(127 * this.feaPatternAnimSpeed),
|
|
9485
|
+
m && t.aLinePatternGap.push(10 * this.feaLinePatternGap), this.maxPos = Math.max(this.maxPos, Math.abs(i) + 1, Math.abs(n) + 1);
|
|
9472
9486
|
}
|
|
9473
9487
|
addElements(t, i, n) {
|
|
9474
9488
|
super.addElements(this.offset + t, this.offset + i, this.offset + n);
|
|
@@ -9761,13 +9775,13 @@
|
|
|
9761
9775
|
* https://github.com/Turfjs/turf
|
|
9762
9776
|
* MIT LICENSE
|
|
9763
9777
|
*/ const Se = [], Oe = [];
|
|
9764
|
-
function
|
|
9778
|
+
function Ce(t, i) {
|
|
9765
9779
|
var n, e, r, s, o, h, a;
|
|
9766
9780
|
for (e = 1; e <= 8; e *= 2) {
|
|
9767
9781
|
for (n = [], s = !(Te(r = t[t.length - 1], i) & e), o = 0; o < t.length; o++) {
|
|
9768
9782
|
if ((a = !(Te(h = t[o], i) & e)) !== s) {
|
|
9769
|
-
const t =
|
|
9770
|
-
void 0 !== h.x ? n.push(new
|
|
9783
|
+
const t = Ie(r, h, e, i);
|
|
9784
|
+
void 0 !== h.x ? n.push(new E(t[0], t[1])) : n.push(t);
|
|
9771
9785
|
}
|
|
9772
9786
|
a && n.push(h), r = h, s = a;
|
|
9773
9787
|
}
|
|
@@ -9775,7 +9789,7 @@
|
|
|
9775
9789
|
}
|
|
9776
9790
|
return n;
|
|
9777
9791
|
}
|
|
9778
|
-
function
|
|
9792
|
+
function Ie(t, i, n, e) {
|
|
9779
9793
|
return Se[0] = void 0 === t.x ? t[0] : t.x, Se[1] = void 0 === t.y ? t[1] : t.y,
|
|
9780
9794
|
t = Se, Oe[0] = void 0 === i.x ? i[0] : i.x, Oe[1] = void 0 === i.y ? i[1] : i.y,
|
|
9781
9795
|
i = Oe, 8 & n ? [ t[0] + (i[0] - t[0]) * (e[3] - t[1]) / (i[1] - t[1]), e[3] ] : 4 & n ? [ t[0] + (i[0] - t[0]) * (e[1] - t[1]) / (i[1] - t[1]), e[1] ] : 2 & n ? [ e[2], t[1] + (i[1] - t[1]) * (e[2] - t[0]) / (i[0] - t[0]) ] : 1 & n ? [ e[0], t[1] + (i[1] - t[1]) * (e[0] - t[0]) / (i[0] - t[0]) ] : null;
|
|
@@ -9841,7 +9855,7 @@
|
|
|
9841
9855
|
ct(t, i) {
|
|
9842
9856
|
let n, e, r, s;
|
|
9843
9857
|
const {polygonFillFn: o, polygonOpacityFn: h, uvScaleFn: a, uvOffsetFn: l} = this.j;
|
|
9844
|
-
o && (n = o(this.options.zoom, i.properties) || [ 255, 255, 255, 255 ], M(n) ? n = [ 0, 0, 0, 0 ] : (n = Array.isArray(n) ? n.map(t => 255 * t) :
|
|
9858
|
+
o && (n = o(this.options.zoom, i.properties) || [ 255, 255, 255, 255 ], M(n) ? n = [ 0, 0, 0, 0 ] : (n = Array.isArray(n) ? n.map(t => 255 * t) : Gn(n).array(),
|
|
9845
9859
|
3 === n.length && n.push(255))), h && (e = h(this.options.zoom, i.properties), lt(e) && (e = 1),
|
|
9846
9860
|
e *= 255), a && (r = a(this.options.zoom, i.properties), lt(r) && (r = [ 1, 1 ]),
|
|
9847
9861
|
r = [ 255 * r[0], 255 * r[1] ]), l && (s = l(this.options.zoom, i.properties), lt(s) && (s = [ 0, 0 ]),
|
|
@@ -9859,7 +9873,7 @@
|
|
|
9859
9873
|
const i = c[t], o = this.data.aPosition.length / 3, h = [], a = [];
|
|
9860
9874
|
for (let t = 0; t < i.length; t++) {
|
|
9861
9875
|
let o = i[t];
|
|
9862
|
-
if (this.options.EXTENT !== 1 / 0 && (o =
|
|
9876
|
+
if (this.options.EXTENT !== 1 / 0 && (o = Ce(o, p)), 0 === o.length) continue;
|
|
9863
9877
|
0 !== t && a.push(h.length / 2);
|
|
9864
9878
|
const l = this.lineElements.length;
|
|
9865
9879
|
this.data.aPosition.push(o[0].x, o[0].y, f), u && this.data.aTexInfo.push(...d, ...y),
|
|
@@ -9924,8 +9938,8 @@
|
|
|
9924
9938
|
* based on @mapbox/tiny-sdf
|
|
9925
9939
|
* https://github.com/mapbox/tiny-sdf
|
|
9926
9940
|
* @License BSD 2-Clause
|
|
9927
|
-
*/ var
|
|
9928
|
-
function
|
|
9941
|
+
*/ var Ue = 1e20;
|
|
9942
|
+
function Ee(t, i, n, e, r, s, o) {
|
|
9929
9943
|
this.fontSize = t || 24, this.buffer = void 0 === i ? 3 : i, this.cutoff = e || .25,
|
|
9930
9944
|
this.fontFamily = r || "sans-serif", this.fontWeight = s || "normal", this.fontStyle = o || "normal",
|
|
9931
9945
|
this.radius = n || 8;
|
|
@@ -9943,25 +9957,25 @@
|
|
|
9943
9957
|
}
|
|
9944
9958
|
function Re(t, i, n, e, r, s, o) {
|
|
9945
9959
|
var h, a, l, u;
|
|
9946
|
-
for (s[0] = 0, o[0] = -
|
|
9960
|
+
for (s[0] = 0, o[0] = -Ue, o[1] = Ue, h = 0; h < e; h++) r[h] = t[i + h * n];
|
|
9947
9961
|
for (h = 1, a = 0, l = 0; h < e; h++) {
|
|
9948
9962
|
do {
|
|
9949
9963
|
u = s[a], l = (r[h] - r[u] + h * h - u * u) / (h - u) / 2;
|
|
9950
9964
|
} while (l <= o[a] && --a > -1);
|
|
9951
|
-
s[++a] = h, o[a] = l, o[a + 1] =
|
|
9965
|
+
s[++a] = h, o[a] = l, o[a + 1] = Ue;
|
|
9952
9966
|
}
|
|
9953
9967
|
for (h = 0, a = 0; h < e; h++) {
|
|
9954
9968
|
for (;o[a + 1] < h; ) a++;
|
|
9955
9969
|
u = s[a], t[i + h * n] = r[u] + (h - u) * (h - u);
|
|
9956
9970
|
}
|
|
9957
9971
|
}
|
|
9958
|
-
|
|
9972
|
+
Ee.prototype.draw = function(t, i, n) {
|
|
9959
9973
|
this.ctx.clearRect(0, 0, this.size, this.size), this.ctx.textBaseline = "bottom",
|
|
9960
9974
|
this.ctx.fillText(t, this.buffer, n - this.buffer + 1);
|
|
9961
9975
|
for (var e = this.ctx.getImageData(0, 0, i, n), r = new Uint8ClampedArray(i * n), s = 0; s < i * n; s++) {
|
|
9962
9976
|
var o = e.data[4 * s + 3] / 255;
|
|
9963
|
-
this.gridOuter[s] = 1 === o ? 0 : 0 === o ?
|
|
9964
|
-
this.gridInner[s] = 1 === o ?
|
|
9977
|
+
this.gridOuter[s] = 1 === o ? 0 : 0 === o ? Ue : Math.pow(Math.max(0, .5 - o), 2),
|
|
9978
|
+
this.gridInner[s] = 1 === o ? Ue : 0 === o ? 0 : Math.pow(Math.max(0, o - .5), 2);
|
|
9965
9979
|
}
|
|
9966
9980
|
for (je(this.gridOuter, i, n, this.f, this.v, this.z), je(this.gridInner, i, n, this.f, this.v, this.z),
|
|
9967
9981
|
s = 0; s < i * n; s++) {
|
|
@@ -9973,7 +9987,7 @@
|
|
|
9973
9987
|
let Ne = 0;
|
|
9974
9988
|
class ze {
|
|
9975
9989
|
constructor(t, i = 15, n) {
|
|
9976
|
-
this.entries = {}, this.
|
|
9990
|
+
this.entries = {}, this.Ut = {}, this.yt = new Le(2048, (function() {})), this.Et = t,
|
|
9977
9991
|
this.jt = i, this.Rt = n;
|
|
9978
9992
|
}
|
|
9979
9993
|
getGlyphs(t, i) {
|
|
@@ -9992,7 +10006,7 @@
|
|
|
9992
10006
|
const t = i.split(" "), c = r && "normal" === t[0] && !wi(+u), f = i + ":" + u + ":" + c;
|
|
9993
10007
|
let d;
|
|
9994
10008
|
if (this.yt.has(f) ? d = this.yt.get(f) : (d = this.Nt(n[i], t, u, c), this.yt.add(f, d),
|
|
9995
|
-
a++), d = We(d), s[i][u] = d, h.push(d.bitmap.data.buffer), a > this.jt) return void this.
|
|
10009
|
+
a++), d = We(d), s[i][u] = d, h.push(d.bitmap.data.buffer), a > this.jt) return void this.Et(o(l, s, h));
|
|
9996
10010
|
}
|
|
9997
10011
|
}
|
|
9998
10012
|
i(null, {
|
|
@@ -10014,7 +10028,7 @@
|
|
|
10014
10028
|
if (!h) {
|
|
10015
10029
|
let i = "400";
|
|
10016
10030
|
/bolder/i.test(s) ? i = "1000" : /bold/i.test(s) ? i = "900" : /medium/i.test(s) ? i = "500" : /light/i.test(s) && (i = "200"),
|
|
10017
|
-
h = t.tinySDF = new
|
|
10031
|
+
h = t.tinySDF = new Ee(24, a, 8, .25, o, i, r);
|
|
10018
10032
|
}
|
|
10019
10033
|
const u = String.fromCharCode(n), c = h.ctx.measureText(u), f = Math.round(c.width), d = h.draw(String.fromCharCode(n), f + 2 * a, 24 + 2 * a);
|
|
10020
10034
|
if (Ne < 4) {
|
|
@@ -10162,9 +10176,9 @@
|
|
|
10162
10176
|
function Ve(t) {
|
|
10163
10177
|
return 3 === t.length && t.push(1), t.reduce((t, i, n) => t += n < 3 ? 255 * i + "," : i + ")", "rgba(");
|
|
10164
10178
|
}
|
|
10165
|
-
var
|
|
10179
|
+
var $e = Object.freeze({
|
|
10166
10180
|
__proto__: null,
|
|
10167
|
-
clipPolygon:
|
|
10181
|
+
clipPolygon: Ce,
|
|
10168
10182
|
calculateSignedArea: mt,
|
|
10169
10183
|
getFeaAltitudeAndHeight: function(t, i, n, e, r, s, o) {
|
|
10170
10184
|
const h = vt(t.properties, n, e), a = h * i;
|
|
@@ -10175,9 +10189,9 @@
|
|
|
10175
10189
|
height: l
|
|
10176
10190
|
};
|
|
10177
10191
|
},
|
|
10178
|
-
convertRTLText:
|
|
10192
|
+
convertRTLText: Ui
|
|
10179
10193
|
});
|
|
10180
|
-
const
|
|
10194
|
+
const Ge = {
|
|
10181
10195
|
polygonPatternFile: 1,
|
|
10182
10196
|
markerFile: 1,
|
|
10183
10197
|
markerPlacement: 1,
|
|
@@ -10201,13 +10215,13 @@
|
|
|
10201
10215
|
}, qe = {
|
|
10202
10216
|
lineDasharray: 1
|
|
10203
10217
|
};
|
|
10204
|
-
Object.assign(Je,
|
|
10218
|
+
Object.assign(Je, Ge), Object.assign(qe, Ge);
|
|
10205
10219
|
const Be = [ "GeoJSONVectorTileLayer" ];
|
|
10206
10220
|
class Xe extends r.worker.Actor {
|
|
10207
10221
|
constructor(t, i) {
|
|
10208
10222
|
super(t);
|
|
10209
10223
|
const n = i.getMap().id;
|
|
10210
|
-
this
|
|
10224
|
+
this.$t = i, this.Gt = n, this.Jt = "vt_" + r.Util.UID();
|
|
10211
10225
|
const e = i.getJSONType();
|
|
10212
10226
|
this.qt = Be.indexOf(e) >= 0, this.Bt = {}, this.Xt = new He({
|
|
10213
10227
|
iconErrorUrl: i.options.iconErrorUrl,
|
|
@@ -10222,8 +10236,8 @@
|
|
|
10222
10236
|
t(null);
|
|
10223
10237
|
}
|
|
10224
10238
|
addLayer(t) {
|
|
10225
|
-
const i = this
|
|
10226
|
-
mapId: this
|
|
10239
|
+
const i = this.$t, n = i.getWorkerOptions() || {}, e = this.Jt, r = i.getJSONType(), s = {
|
|
10240
|
+
mapId: this.Gt,
|
|
10227
10241
|
layerId: e,
|
|
10228
10242
|
command: "addLayer",
|
|
10229
10243
|
params: {
|
|
@@ -10235,7 +10249,7 @@
|
|
|
10235
10249
|
}
|
|
10236
10250
|
abortTile(t, i) {
|
|
10237
10251
|
const n = this.Jt, e = {
|
|
10238
|
-
mapId: this
|
|
10252
|
+
mapId: this.Gt,
|
|
10239
10253
|
layerId: n,
|
|
10240
10254
|
command: "abortTile",
|
|
10241
10255
|
params: {
|
|
@@ -10246,7 +10260,7 @@
|
|
|
10246
10260
|
}
|
|
10247
10261
|
removeLayer(t) {
|
|
10248
10262
|
const i = this.Jt, n = {
|
|
10249
|
-
mapId: this
|
|
10263
|
+
mapId: this.Gt,
|
|
10250
10264
|
layerId: i,
|
|
10251
10265
|
command: "removeLayer"
|
|
10252
10266
|
};
|
|
@@ -10254,7 +10268,7 @@
|
|
|
10254
10268
|
}
|
|
10255
10269
|
updateStyle(t, i) {
|
|
10256
10270
|
const n = this.Jt, e = {
|
|
10257
|
-
mapId: this
|
|
10271
|
+
mapId: this.Gt,
|
|
10258
10272
|
layerId: n,
|
|
10259
10273
|
command: "updateStyle",
|
|
10260
10274
|
params: t
|
|
@@ -10263,7 +10277,7 @@
|
|
|
10263
10277
|
}
|
|
10264
10278
|
updateOptions(t, i) {
|
|
10265
10279
|
const n = this.Jt, e = {
|
|
10266
|
-
mapId: this
|
|
10280
|
+
mapId: this.Gt,
|
|
10267
10281
|
layerId: n,
|
|
10268
10282
|
command: "updateOptions",
|
|
10269
10283
|
params: t
|
|
@@ -10272,7 +10286,7 @@
|
|
|
10272
10286
|
}
|
|
10273
10287
|
loadTile(t, i) {
|
|
10274
10288
|
const n = this.Jt, e = {
|
|
10275
|
-
mapId: this
|
|
10289
|
+
mapId: this.Gt,
|
|
10276
10290
|
layerId: n,
|
|
10277
10291
|
command: "loadTile",
|
|
10278
10292
|
params: {
|
|
@@ -10301,7 +10315,7 @@
|
|
|
10301
10315
|
}
|
|
10302
10316
|
setData(t, i) {
|
|
10303
10317
|
const n = this.Jt, e = {
|
|
10304
|
-
mapId: this
|
|
10318
|
+
mapId: this.Gt,
|
|
10305
10319
|
layerId: n,
|
|
10306
10320
|
command: "setData",
|
|
10307
10321
|
params: {
|
|
@@ -10599,14 +10613,14 @@
|
|
|
10599
10613
|
return ir;
|
|
10600
10614
|
}
|
|
10601
10615
|
draw(t, i) {
|
|
10602
|
-
this.
|
|
10616
|
+
this.Ci !== t && (this.Mi = !1, this.Ii());
|
|
10603
10617
|
const n = this.layer;
|
|
10604
10618
|
this.prepareCanvas(), this.ready && n.ready ? (this.plugins || this.Fi(), n.isDefaultRender() || this.plugins.length || this.featurePlugins.length ? (n.options.collision && (n.clearCollisionIndex(),
|
|
10605
10619
|
n.clearBackgroundCollisionIndex()), this.Ti = t, this.Di = this.Li(this.getMap().getGLRes()),
|
|
10606
|
-
this.
|
|
10607
|
-
this.completeRender(), this.
|
|
10620
|
+
this.Ui = i || {}, this.Ei(t), super.draw(t), this.Ci !== t && this.ji(t), this.Ri(t),
|
|
10621
|
+
this.completeRender(), this.Ci = t) : this.completeRender()) : this.completeRender();
|
|
10608
10622
|
}
|
|
10609
|
-
|
|
10623
|
+
Ii() {
|
|
10610
10624
|
this.ki().forEach((t, i) => {
|
|
10611
10625
|
t.renderIndex = i;
|
|
10612
10626
|
});
|
|
@@ -10640,10 +10654,10 @@
|
|
|
10640
10654
|
}), t;
|
|
10641
10655
|
}
|
|
10642
10656
|
isForeground(t) {
|
|
10643
|
-
return !(!this
|
|
10657
|
+
return !(!this.$i || !this.$i[t.properties.tile.id]);
|
|
10644
10658
|
}
|
|
10645
10659
|
isBackTile(t) {
|
|
10646
|
-
return !(!this
|
|
10660
|
+
return !(!this.Gi || !this.Gi[t]);
|
|
10647
10661
|
}
|
|
10648
10662
|
loadTile(t) {
|
|
10649
10663
|
const {url: i} = t, n = this.pi[i];
|
|
@@ -10786,8 +10800,8 @@
|
|
|
10786
10800
|
}
|
|
10787
10801
|
return this.plugins;
|
|
10788
10802
|
}
|
|
10789
|
-
|
|
10790
|
-
const i = this.layer.isDefaultRender() && this.Ft, n = this.
|
|
10803
|
+
Ei(t) {
|
|
10804
|
+
const i = this.layer.isDefaultRender() && this.Ft, n = this.Ui;
|
|
10791
10805
|
this.ki().forEach((e, r) => {
|
|
10792
10806
|
if (!e) return;
|
|
10793
10807
|
if (!this.Vi(r)) return;
|
|
@@ -10805,7 +10819,7 @@
|
|
|
10805
10819
|
});
|
|
10806
10820
|
}
|
|
10807
10821
|
Ri(t) {
|
|
10808
|
-
const i = this.
|
|
10822
|
+
const i = this.Ui, n = i.renderMode, e = i && i.renderTarget && i.renderTarget.fbo, r = this.getMap().cameraPosition, s = this.ki();
|
|
10809
10823
|
this.layer.options.collision ? s.forEach(i => {
|
|
10810
10824
|
if (!hr(i)) return;
|
|
10811
10825
|
if (n && "default" !== n && !i.supportRenderMode(n)) return;
|
|
@@ -10817,7 +10831,7 @@
|
|
|
10817
10831
|
const e = this.Qi(i, 0, r, t);
|
|
10818
10832
|
i.prepareRender(e);
|
|
10819
10833
|
});
|
|
10820
|
-
const o = !i.timestamp || i.isFinalRender, h = this.
|
|
10834
|
+
const o = !i.timestamp || i.isFinalRender, h = this.Ci !== i.timestamp;
|
|
10821
10835
|
let a = !1;
|
|
10822
10836
|
if (h) {
|
|
10823
10837
|
const i = -this.layer.getPolygonOffset(), n = this.Qi(null, i, r, t);
|
|
@@ -10839,7 +10853,7 @@
|
|
|
10839
10853
|
}
|
|
10840
10854
|
nn() {
|
|
10841
10855
|
if (this.layer.options.debug) {
|
|
10842
|
-
const t = this.
|
|
10856
|
+
const t = this.Ui, i = [], e = this.getMap().projViewMatrix;
|
|
10843
10857
|
for (const r in this.tilesInView) {
|
|
10844
10858
|
const s = this.tilesInView[r].info, o = s.transform, h = this.tilesInView[r].image.extent, a = t && t.renderTarget;
|
|
10845
10859
|
o && h && this.Pi.draw(this.getDebugInfo(s.id), n.mat4.multiply(i, e, o), this.layer.getTileSize().width, h, a && a.fbo);
|
|
@@ -10848,7 +10862,7 @@
|
|
|
10848
10862
|
}
|
|
10849
10863
|
tn(t) {
|
|
10850
10864
|
if (!t) return !0;
|
|
10851
|
-
const i = t.renderIndex, n = this.
|
|
10865
|
+
const i = t.renderIndex, n = this.Ui, e = this.Vi(i), r = n && n.states && n.states.includesChanged, s = this.en(t.painter.scene.getMeshes());
|
|
10852
10866
|
return !e || !r && !s ? 0 : s ? 2 : 1;
|
|
10853
10867
|
}
|
|
10854
10868
|
Qi(t, i, n, e) {
|
|
@@ -10861,12 +10875,12 @@
|
|
|
10861
10875
|
polygonOffsetIndex: i,
|
|
10862
10876
|
cameraPosition: n,
|
|
10863
10877
|
timestamp: e
|
|
10864
|
-
}, s = this.
|
|
10878
|
+
}, s = this.Ui;
|
|
10865
10879
|
return s && P(r, s), r;
|
|
10866
10880
|
}
|
|
10867
10881
|
en(t) {
|
|
10868
10882
|
if (!t) return !1;
|
|
10869
|
-
const i = this.
|
|
10883
|
+
const i = this.Ui && this.Ui.sceneFilter;
|
|
10870
10884
|
return i ? t.filter(i).length > 0 : t.length > 0;
|
|
10871
10885
|
}
|
|
10872
10886
|
in(t) {
|
|
@@ -10893,10 +10907,10 @@
|
|
|
10893
10907
|
onDrawTileStart(t) {
|
|
10894
10908
|
super.onDrawTileStart(t);
|
|
10895
10909
|
const {tiles: i, childTiles: n, parentTiles: e} = t;
|
|
10896
|
-
this
|
|
10897
|
-
for (let t = 0; t < i.length; t++) this
|
|
10898
|
-
for (let t = 0; t < n.length; t++) this
|
|
10899
|
-
for (let t = 0; t < e.length; t++) this
|
|
10910
|
+
this.$i = {}, this.Gi = {};
|
|
10911
|
+
for (let t = 0; t < i.length; t++) this.$i[i[t].info.id] = 1;
|
|
10912
|
+
for (let t = 0; t < n.length; t++) this.Gi[n[t].info.id] = 1;
|
|
10913
|
+
for (let t = 0; t < e.length; t++) this.Gi[e[t].info.id] = 1;
|
|
10900
10914
|
this.sn = t;
|
|
10901
10915
|
}
|
|
10902
10916
|
isEnableTileStencil() {
|
|
@@ -10927,7 +10941,7 @@
|
|
|
10927
10941
|
timestamp: this.Ti,
|
|
10928
10942
|
tileInfo: t,
|
|
10929
10943
|
tileZoom: this._tileZoom,
|
|
10930
|
-
bloom: this.
|
|
10944
|
+
bloom: this.Ui && this.Ui.bloom
|
|
10931
10945
|
}, u = e.paintTile(l);
|
|
10932
10946
|
n[h].geometry && (o[h] = 1), !this.Mi && (u.retire || u.redraw) && e.supportRenderMode("taa") && (this.Mi = !0),
|
|
10933
10947
|
u.redraw && this.setToRedraw();
|
|
@@ -11248,7 +11262,7 @@
|
|
|
11248
11262
|
}, document.getElementsByTagName("head")[0].appendChild(e), this;
|
|
11249
11263
|
},
|
|
11250
11264
|
get: function(t, i, n) {
|
|
11251
|
-
if (
|
|
11265
|
+
if (C(i)) {
|
|
11252
11266
|
const t = n;
|
|
11253
11267
|
n = i, i = t;
|
|
11254
11268
|
}
|
|
@@ -11260,8 +11274,8 @@
|
|
|
11260
11274
|
method: i.method || "GET",
|
|
11261
11275
|
referrerPolicy: "origin"
|
|
11262
11276
|
};
|
|
11263
|
-
return e && (
|
|
11264
|
-
|
|
11277
|
+
return e && (I(i.body) || (s.body = JSON.stringify(i.body))), I(i.headers) || (s.headers = i.headers),
|
|
11278
|
+
I(i.credentials) || (s.credentials = i.credentials), fetch(t, s).then(t => {
|
|
11265
11279
|
const e = this.s(t, i.returnJSON, i.responseType);
|
|
11266
11280
|
e.message ? n(e) : e.then(e => {
|
|
11267
11281
|
"arraybuffer" === i.responseType ? n(null, {
|
|
@@ -11327,14 +11341,14 @@
|
|
|
11327
11341
|
return i.onreadystatechange = yr.u(i, t), i;
|
|
11328
11342
|
},
|
|
11329
11343
|
getArrayBuffer(t, i, n) {
|
|
11330
|
-
if (
|
|
11344
|
+
if (C(i)) {
|
|
11331
11345
|
const t = n;
|
|
11332
11346
|
n = i, i = t;
|
|
11333
11347
|
}
|
|
11334
11348
|
return i || (i = {}), i.responseType = "arraybuffer", yr.get(t, i, n);
|
|
11335
11349
|
},
|
|
11336
11350
|
getJSON: function(t, i, n) {
|
|
11337
|
-
if (
|
|
11351
|
+
if (C(i)) {
|
|
11338
11352
|
const t = n;
|
|
11339
11353
|
n = i, i = t;
|
|
11340
11354
|
}
|
|
@@ -11595,7 +11609,7 @@
|
|
|
11595
11609
|
break;
|
|
11596
11610
|
}
|
|
11597
11611
|
}
|
|
11598
|
-
for (const t in n)
|
|
11612
|
+
for (const t in n) U(n, t) && (!r.Util.isObject(n[t]) || Array.isArray(n[t]) || n[t].stops ? s[t] = n[t] : (s[t] || (s[t] = {}),
|
|
11599
11613
|
P(s[t], n[t])));
|
|
11600
11614
|
let c = a.options.style;
|
|
11601
11615
|
Array.isArray(c) || (c = a.Ai(t, a.options.style));
|
|
@@ -11698,7 +11712,7 @@
|
|
|
11698
11712
|
return this.Pn && this.Pn.clear(), this;
|
|
11699
11713
|
}
|
|
11700
11714
|
getDataSchema(t) {
|
|
11701
|
-
return this.Sn || (this.Sn = {}),
|
|
11715
|
+
return this.Sn || (this.Sn = {}), I(t) || this.Sn[t] || (this.Sn[t] = {}), I(t) ? this.Sn : this.Sn[t];
|
|
11702
11716
|
}
|
|
11703
11717
|
onRemove() {
|
|
11704
11718
|
super.onRemove();
|
|
@@ -11739,7 +11753,7 @@
|
|
|
11739
11753
|
return !(!t || !t.properties);
|
|
11740
11754
|
}
|
|
11741
11755
|
function gr(t) {
|
|
11742
|
-
return t ? (Array.isArray(t) || (t =
|
|
11756
|
+
return t ? (Array.isArray(t) || (t = Gn(t).unitArray()), 3 === t.length && t.push(1),
|
|
11743
11757
|
t) : null;
|
|
11744
11758
|
}
|
|
11745
11759
|
function wr(t, i) {
|
|
@@ -11782,13 +11796,13 @@
|
|
|
11782
11796
|
if (this.options.data = t, t && (S(t) || t.url)) {
|
|
11783
11797
|
return !!this.getRenderer() && this.On(), this;
|
|
11784
11798
|
}
|
|
11785
|
-
return this.
|
|
11799
|
+
return this.Cn(t), this.On(), this;
|
|
11786
11800
|
}
|
|
11787
|
-
|
|
11801
|
+
Cn(t) {
|
|
11788
11802
|
if (this.options.convertFn) {
|
|
11789
11803
|
t = new Function("data", this.options.convertFn + "\nreturn convert(data)")(t);
|
|
11790
11804
|
}
|
|
11791
|
-
return this.features = t, this.
|
|
11805
|
+
return this.features = t, this.In(), this;
|
|
11792
11806
|
}
|
|
11793
11807
|
On() {
|
|
11794
11808
|
const t = this.getRenderer();
|
|
@@ -11811,7 +11825,7 @@
|
|
|
11811
11825
|
Dn(t) {
|
|
11812
11826
|
this.Tn = new r.Extent(...t);
|
|
11813
11827
|
}
|
|
11814
|
-
|
|
11828
|
+
Un(t, i) {
|
|
11815
11829
|
S(t) ? yr.getJSON(t, i) : yr.getJSON(t.url, t, i);
|
|
11816
11830
|
}
|
|
11817
11831
|
getData() {
|
|
@@ -11826,7 +11840,7 @@
|
|
|
11826
11840
|
static fromJSON(t) {
|
|
11827
11841
|
return t && "GeoJSONVectorTileLayer" === t.type ? new Ar(t.id, t.options) : null;
|
|
11828
11842
|
}
|
|
11829
|
-
|
|
11843
|
+
In() {
|
|
11830
11844
|
if (!this.features) return;
|
|
11831
11845
|
if (this.features = JSON.parse(JSON.stringify(this.features)), !this.features) return;
|
|
11832
11846
|
let t = 0;
|
|
@@ -11939,7 +11953,7 @@
|
|
|
11939
11953
|
}
|
|
11940
11954
|
});
|
|
11941
11955
|
const Sr = new r.Point(0, 0), Or = "_vector3dlayer_id";
|
|
11942
|
-
function
|
|
11956
|
+
function Cr(t, i, n) {
|
|
11943
11957
|
const e = "__fea_idx".trim(), s = t.getMap(), o = s.getGLRes();
|
|
11944
11958
|
let h = t.getCoordinates();
|
|
11945
11959
|
const a = [];
|
|
@@ -11968,7 +11982,7 @@
|
|
|
11968
11982
|
const r = [], s = c.length;
|
|
11969
11983
|
for (let o = 0; o < s; o++) {
|
|
11970
11984
|
const h = o === s - 1 ? u : P({}, u);
|
|
11971
|
-
for (const t in c[o])
|
|
11985
|
+
for (const t in c[o]) U(c[o], t) && (h["_symbol_" + t] = c[o][t]);
|
|
11972
11986
|
const d = n && n[o] ? n[o].id : i.pickingId++, y = {
|
|
11973
11987
|
type: l,
|
|
11974
11988
|
id: f,
|
|
@@ -11981,7 +11995,7 @@
|
|
|
11981
11995
|
}
|
|
11982
11996
|
return r;
|
|
11983
11997
|
}
|
|
11984
|
-
for (const t in c)
|
|
11998
|
+
for (const t in c) U(c, t) && (u["_symbol_" + t] = c[t]);
|
|
11985
11999
|
const d = n ? n.id : i.pickingId++, y = {
|
|
11986
12000
|
type: l,
|
|
11987
12001
|
id: f,
|
|
@@ -11992,7 +12006,7 @@
|
|
|
11992
12006
|
};
|
|
11993
12007
|
return y[e] = d, y;
|
|
11994
12008
|
}
|
|
11995
|
-
const
|
|
12009
|
+
const Ir = {
|
|
11996
12010
|
markerFile: {
|
|
11997
12011
|
type: "identity",
|
|
11998
12012
|
default: void 0,
|
|
@@ -12230,16 +12244,21 @@
|
|
|
12230
12244
|
default: 2,
|
|
12231
12245
|
property: "_symbol_lineWidth"
|
|
12232
12246
|
},
|
|
12233
|
-
|
|
12247
|
+
lineStrokeWidth: {
|
|
12234
12248
|
type: "identity",
|
|
12235
12249
|
default: 0,
|
|
12236
|
-
property: "
|
|
12250
|
+
property: "_symbol_lineStrokeWidth"
|
|
12237
12251
|
},
|
|
12238
12252
|
lineColor: {
|
|
12239
12253
|
type: "identity",
|
|
12240
|
-
default:
|
|
12254
|
+
default: [ 1, 0, 0, 1 ],
|
|
12241
12255
|
property: "_symbol_lineColor"
|
|
12242
12256
|
},
|
|
12257
|
+
lineStrokeColor: {
|
|
12258
|
+
type: "identity",
|
|
12259
|
+
default: [ 0, 0, 0, 0 ],
|
|
12260
|
+
property: "_symbol_lineStrokeColor"
|
|
12261
|
+
},
|
|
12243
12262
|
lineDx: {
|
|
12244
12263
|
type: "identity",
|
|
12245
12264
|
default: 0,
|
|
@@ -12297,15 +12316,15 @@
|
|
|
12297
12316
|
}
|
|
12298
12317
|
};
|
|
12299
12318
|
let Lr = 1;
|
|
12300
|
-
const
|
|
12319
|
+
const Ur = "_symbol_", Er = "__fea_idx".trim();
|
|
12301
12320
|
let jr = new Float32Array(1);
|
|
12302
12321
|
class Rr extends r.renderer.CanvasRenderer {
|
|
12303
12322
|
constructor(...t) {
|
|
12304
|
-
super(...t), this.features = {}, this.
|
|
12323
|
+
super(...t), this.features = {}, this.En = {}, this.ui = 1, this.jn = {}, this.Rn = {},
|
|
12305
12324
|
this.Nn = {}, this.zn = {}, this.Wn = {}, this.Hn = !0, this.Vn = {
|
|
12306
12325
|
id: 0,
|
|
12307
12326
|
pickingId: 0
|
|
12308
|
-
}, this
|
|
12327
|
+
}, this.$n = P({}, Ir, Tr), this.Gn = {};
|
|
12309
12328
|
}
|
|
12310
12329
|
hasNoAARendering() {
|
|
12311
12330
|
return !0;
|
|
@@ -12317,7 +12336,7 @@
|
|
|
12317
12336
|
draw(t, i) {
|
|
12318
12337
|
const n = this.layer;
|
|
12319
12338
|
if (this.prepareCanvas(), this.Di = this.Li(this.getMap().getGLRes()), this.Hn) this.buildMesh(),
|
|
12320
|
-
this.Bn(), this.Xn(), this
|
|
12339
|
+
this.Bn(), this.Xn(), this.Gn = {}, this.Zn = !1, this.Hn = !1, this.Yn = !1; else if (this.Zn) {
|
|
12321
12340
|
const t = this.atlas, i = this.Kn, n = this.Qn;
|
|
12322
12341
|
delete this.atlas, delete this.Kn, delete this.Qn, this.buildMesh(t), this.Bn(i),
|
|
12323
12342
|
this.Xn(n), this.Zn = !1, this.Yn = !1;
|
|
@@ -12327,7 +12346,7 @@
|
|
|
12327
12346
|
}
|
|
12328
12347
|
if (!this.meshes && !this.te && !this.ie) return void this.completeRender();
|
|
12329
12348
|
this.ne && (this.ee(), this.ne = !1), this.re(), n.options.collision && n.clearCollisionIndex(),
|
|
12330
|
-
this.Ti = t, this.
|
|
12349
|
+
this.Ti = t, this.Ui = i || {};
|
|
12331
12350
|
const e = this.se();
|
|
12332
12351
|
let r = 0;
|
|
12333
12352
|
this.painter && this.meshes && (this.painter.startFrame(e), this.painter.addMesh(this.meshes, null, {
|
|
@@ -12358,7 +12377,7 @@
|
|
|
12358
12377
|
cameraPosition: this.getMap().cameraPosition,
|
|
12359
12378
|
timestamp: this.getFrameTimestamp()
|
|
12360
12379
|
};
|
|
12361
|
-
return this.
|
|
12380
|
+
return this.Ui && P(t, this.Ui), t;
|
|
12362
12381
|
}
|
|
12363
12382
|
drawOnInteracting(t, i, n) {
|
|
12364
12383
|
this.draw(i, n);
|
|
@@ -12482,7 +12501,7 @@
|
|
|
12482
12501
|
delete this.te));
|
|
12483
12502
|
const {features: r, center: s} = this.he(), o = [], h = [];
|
|
12484
12503
|
for (let t = 0; t < r.length; t++) {
|
|
12485
|
-
const i = r[t][
|
|
12504
|
+
const i = r[t][Er];
|
|
12486
12505
|
this.Nn[i] && o.push(r[t]), this.zn[i] && h.push(r[t]);
|
|
12487
12506
|
}
|
|
12488
12507
|
if (!o.length && !h.length) return void (this.te && (this.Jn.deleteMesh(this.te),
|
|
@@ -12532,7 +12551,7 @@
|
|
|
12532
12551
|
defaultAltitude: 0
|
|
12533
12552
|
}, s = P({}, r);
|
|
12534
12553
|
r.allowEmptyPack = 1;
|
|
12535
|
-
return qn.splitPointSymbol(this
|
|
12554
|
+
return qn.splitPointSymbol(this.$n).map((n, e) => new qn(0 === e ? t : i, n, 0 === e ? r : s).load());
|
|
12536
12555
|
}
|
|
12537
12556
|
updateMesh() {}
|
|
12538
12557
|
ge(t) {
|
|
@@ -12552,7 +12571,7 @@
|
|
|
12552
12571
|
!1;
|
|
12553
12572
|
}
|
|
12554
12573
|
for (let t = 0; t < r.length; t++) {
|
|
12555
|
-
const i = r[t][
|
|
12574
|
+
const i = r[t][Er];
|
|
12556
12575
|
this.Nn[i] && s.push(r[t]), this.zn[i] && o.push(r[t]);
|
|
12557
12576
|
}
|
|
12558
12577
|
const u = r[0].id, c = this.pe(s, o, this.Kn, this.ye), f = this.te;
|
|
@@ -12612,7 +12631,7 @@
|
|
|
12612
12631
|
if (!(s < 0)) {
|
|
12613
12632
|
if (t[n]) {
|
|
12614
12633
|
const i = t[n].data.featureIds.length, r = t[n].data.data;
|
|
12615
|
-
for (const t in r) if (
|
|
12634
|
+
for (const t in r) if (U(r, t)) {
|
|
12616
12635
|
const n = r[t];
|
|
12617
12636
|
e.geometry.updateSubData(t, n, s * n.length / i);
|
|
12618
12637
|
}
|
|
@@ -12654,8 +12673,8 @@
|
|
|
12654
12673
|
Ae(t) {
|
|
12655
12674
|
const i = [], n = [], e = [];
|
|
12656
12675
|
for (let r = 0; r < t.length; r++) {
|
|
12657
|
-
const s = t[r], o = s.properties && s.properties[
|
|
12658
|
-
o &&
|
|
12676
|
+
const s = t[r], o = s.properties && s.properties[Ur + "lineDasharray"];
|
|
12677
|
+
o && $r(o) ? e.push(s) : s.properties && s.properties[Ur + "linePatternFile"] ? n.push(s) : i.push(s);
|
|
12659
12678
|
}
|
|
12660
12679
|
return [ n, e, i ];
|
|
12661
12680
|
}
|
|
@@ -12681,15 +12700,15 @@
|
|
|
12681
12700
|
we(t) {
|
|
12682
12701
|
t[Or] || (t[Or] = this.ui++);
|
|
12683
12702
|
const i = t[Or];
|
|
12684
|
-
this.features[i] && this.Se(i), this.features[i] =
|
|
12703
|
+
this.features[i] && this.Se(i), this.features[i] = Cr(t, this.Vn, this.features[i]);
|
|
12685
12704
|
const n = this.features[i];
|
|
12686
|
-
return this.Oe(n), this.features[i][Or] = i, this.
|
|
12705
|
+
return this.Oe(n), this.features[i][Or] = i, this.En[i] = t, i;
|
|
12687
12706
|
}
|
|
12688
12707
|
Oe(t) {
|
|
12689
12708
|
if (!t) return;
|
|
12690
12709
|
const i = Array.isArray(t) ? t[0].id : t.id;
|
|
12691
12710
|
if (this.Rn[i] = t, Array.isArray(t)) for (let i = 0; i < t.length; i++) {
|
|
12692
|
-
const n = t[i][
|
|
12711
|
+
const n = t[i][Er];
|
|
12693
12712
|
this.jn[n] = {
|
|
12694
12713
|
feature: t[i]
|
|
12695
12714
|
};
|
|
@@ -12700,7 +12719,7 @@
|
|
|
12700
12719
|
} else {
|
|
12701
12720
|
const i = {
|
|
12702
12721
|
feature: t
|
|
12703
|
-
}, n = t[
|
|
12722
|
+
}, n = t[Er];
|
|
12704
12723
|
Wr(t) && (this.Nn[n] = i), Hr(t) && (this.zn[n] = i), Vr(t) && (this.Wn[n] = i),
|
|
12705
12724
|
this.jn[n] = i;
|
|
12706
12725
|
}
|
|
@@ -12708,10 +12727,10 @@
|
|
|
12708
12727
|
Se(t) {
|
|
12709
12728
|
const i = this.features[t];
|
|
12710
12729
|
if (Array.isArray(i)) for (let t = 0; t < i.length; t++) {
|
|
12711
|
-
const n = i[t][
|
|
12730
|
+
const n = i[t][Er], e = i[t].id;
|
|
12712
12731
|
delete this.Rn[e], delete this.jn[n], delete this.Nn[n], delete this.zn[n], delete this.Wn[n];
|
|
12713
12732
|
} else {
|
|
12714
|
-
const t = i[
|
|
12733
|
+
const t = i[Er], n = i.id;
|
|
12715
12734
|
delete this.Rn[n], delete this.jn[t], delete this.Nn[t], delete this.zn[t], delete this.Wn[t];
|
|
12716
12735
|
}
|
|
12717
12736
|
}
|
|
@@ -12722,18 +12741,18 @@
|
|
|
12722
12741
|
const s = r.pick(t, i, n.tolerance);
|
|
12723
12742
|
if (s && s.data && s.data.feature) {
|
|
12724
12743
|
const t = s.data.feature;
|
|
12725
|
-
e.push(this.
|
|
12744
|
+
e.push(this.En[t[Or]]);
|
|
12726
12745
|
}
|
|
12727
12746
|
}), e;
|
|
12728
12747
|
}
|
|
12729
|
-
|
|
12748
|
+
Ce(t) {
|
|
12730
12749
|
const i = t[Or], n = this.features[i];
|
|
12731
|
-
return Array.isArray(n) ? n[0][
|
|
12750
|
+
return Array.isArray(n) ? n[0][Er] : n[Er];
|
|
12732
12751
|
}
|
|
12733
12752
|
re() {
|
|
12734
12753
|
let t = !1;
|
|
12735
|
-
for (const i in this
|
|
12736
|
-
const n = this
|
|
12754
|
+
for (const i in this.Gn) {
|
|
12755
|
+
const n = this.Gn[i], e = this.Ce(n);
|
|
12737
12756
|
if (!this.me && (this.Nn[e] || this.zn[e])) {
|
|
12738
12757
|
const i = this.ge(n);
|
|
12739
12758
|
t = t || i;
|
|
@@ -12742,12 +12761,12 @@
|
|
|
12742
12761
|
const i = this.Me(n);
|
|
12743
12762
|
t = t || i;
|
|
12744
12763
|
}
|
|
12745
|
-
if (!this.
|
|
12764
|
+
if (!this.Ie) {
|
|
12746
12765
|
const i = this.updateMesh(n);
|
|
12747
12766
|
t = t || i;
|
|
12748
12767
|
}
|
|
12749
12768
|
}
|
|
12750
|
-
this
|
|
12769
|
+
this.Gn = {}, t && (Nr(this), this.layer.fire("partialupdate"));
|
|
12751
12770
|
}
|
|
12752
12771
|
Te(t) {
|
|
12753
12772
|
this.we(t), this.be(), Nr(this);
|
|
@@ -12759,26 +12778,26 @@
|
|
|
12759
12778
|
if (t && t.length) {
|
|
12760
12779
|
for (let i = 0; i < t.length; i++) {
|
|
12761
12780
|
const n = t[i][Or];
|
|
12762
|
-
void 0 !== n && (delete this.
|
|
12781
|
+
void 0 !== n && (delete this.En[n], this.Se(n), delete this.features[n]);
|
|
12763
12782
|
}
|
|
12764
12783
|
this.be(), Nr(this);
|
|
12765
12784
|
}
|
|
12766
12785
|
}
|
|
12767
12786
|
onGeometrySymbolChange(t) {
|
|
12768
12787
|
const i = t.target._getParent() || t.target, n = t.properties;
|
|
12769
|
-
for (const t in n) if (
|
|
12788
|
+
for (const t in n) if (U(n, t) && qe[t]) return void this.Te(i);
|
|
12770
12789
|
const e = i[Or], r = i._getInternalSymbol(), s = this.features[e];
|
|
12771
12790
|
if (this.we(i), s) if (function(t, i) {
|
|
12772
12791
|
return Array.isArray(t) ? !!Array.isArray(i) && t.length === i.length : !Array.isArray(i);
|
|
12773
12792
|
}(r, s)) {
|
|
12774
12793
|
if (Array.isArray(r)) for (let t = 0; t < r.length; t++) {
|
|
12775
|
-
if (
|
|
12776
|
-
} else if (
|
|
12794
|
+
if (!Gr(r[t], s[t])) return void this.Te(i);
|
|
12795
|
+
} else if (!Gr(r, s)) return void this.Te(i);
|
|
12777
12796
|
this.onGeometryPositionChange(t);
|
|
12778
12797
|
} else this.Te(i); else this.Te(i);
|
|
12779
12798
|
}
|
|
12780
12799
|
onGeometryShapeChange(t) {
|
|
12781
|
-
const i = t.target._getParent() || t.target, n =
|
|
12800
|
+
const i = t.target._getParent() || t.target, n = Cr(i, {
|
|
12782
12801
|
id: 0
|
|
12783
12802
|
}).geometry, e = i[Or], r = this.features[e];
|
|
12784
12803
|
if (function t(i, n) {
|
|
@@ -12793,7 +12812,7 @@
|
|
|
12793
12812
|
}
|
|
12794
12813
|
onGeometryPositionChange(t) {
|
|
12795
12814
|
const i = t.target._getParent() || t.target, n = i[Or];
|
|
12796
|
-
this.Pe([ i ]), this
|
|
12815
|
+
this.Pe([ i ]), this.Gn[n] = i, Nr(this);
|
|
12797
12816
|
}
|
|
12798
12817
|
onGeometryZIndexChange() {
|
|
12799
12818
|
this.be();
|
|
@@ -12823,7 +12842,7 @@
|
|
|
12823
12842
|
}
|
|
12824
12843
|
onGeometryPropertiesChange(t) {
|
|
12825
12844
|
const i = t.target, n = i[Or];
|
|
12826
|
-
if (this.features[n] =
|
|
12845
|
+
if (this.features[n] = Cr(i, this.Vn), Array.isArray(this.features[n])) {
|
|
12827
12846
|
const t = this.features[n];
|
|
12828
12847
|
for (let i = 0; i < t.length; i++) t[i][Or] = n;
|
|
12829
12848
|
} else this.features[n][Or] = n;
|
|
@@ -12835,7 +12854,7 @@
|
|
|
12835
12854
|
t && (this.canvas.pickingFBO = this.canvas.pickingFBO || this.regl.framebuffer(this.canvas.width, this.canvas.height)),
|
|
12836
12855
|
this.prepareRequestors(), this.pickingFBO = this.canvas.pickingFBO || this.regl.framebuffer(this.canvas.width, this.canvas.height),
|
|
12837
12856
|
this.painter = this.createPainter();
|
|
12838
|
-
const i = Pr.get3DPainterClass("icon"), n = P({},
|
|
12857
|
+
const i = Pr.get3DPainterClass("icon"), n = P({}, Ir, Tr);
|
|
12839
12858
|
this.Jn = new i(this.regl, this.layer, n, this.layer.options.sceneConfig, 0);
|
|
12840
12859
|
const e = Pr.get3DPainterClass("line"), r = P({}, Dr);
|
|
12841
12860
|
this.qn = new e(this.regl, this.layer, r, this.layer.options.sceneConfig, 0), this.layer.getGeometries() && this.onGeometryAdd(this.layer.getGeometries());
|
|
@@ -12885,14 +12904,14 @@
|
|
|
12885
12904
|
}
|
|
12886
12905
|
drawOutline(t) {
|
|
12887
12906
|
if (this.Hi && (this.painter && this.painter.outlineAll(t), this.Jn.outlineAll(t),
|
|
12888
|
-
this.qn.outlineAll(t)), this.
|
|
12889
|
-
this.Jn.outline(t, this.
|
|
12907
|
+
this.qn.outlineAll(t)), this.Ue) for (let i = 0; i < this.Ue.length; i++) this.painter && this.painter.outline(t, this.Ue[i]),
|
|
12908
|
+
this.Jn.outline(t, this.Ue[i]), this.qn.outline(t, this.Ue[i]);
|
|
12890
12909
|
}
|
|
12891
12910
|
outlineAll() {
|
|
12892
12911
|
this.Hi = !0, this.setToRedraw();
|
|
12893
12912
|
}
|
|
12894
12913
|
outline(t) {
|
|
12895
|
-
this.
|
|
12914
|
+
this.Ue || (this.Ue = []);
|
|
12896
12915
|
const i = [];
|
|
12897
12916
|
for (let n = 0; n < t.length; n++) {
|
|
12898
12917
|
const e = this.layer.getGeometryById(t[n]);
|
|
@@ -12901,10 +12920,10 @@
|
|
|
12901
12920
|
if (Array.isArray(t)) for (let n = 0; n < t.length; n++) i.push(t[n].id); else i.push(t.id);
|
|
12902
12921
|
}
|
|
12903
12922
|
}
|
|
12904
|
-
this.
|
|
12923
|
+
this.Ue.push(i), this.setToRedraw();
|
|
12905
12924
|
}
|
|
12906
12925
|
cancelOutline() {
|
|
12907
|
-
delete this.Hi, delete this.
|
|
12926
|
+
delete this.Hi, delete this.Ue, this.setToRedraw();
|
|
12908
12927
|
}
|
|
12909
12928
|
isEnableWorkAround(t) {
|
|
12910
12929
|
return "win-intel-gpu-crash" === t && (this.layer.options.workarounds["win-intel-gpu-crash"] && zr(this.gl));
|
|
@@ -12925,23 +12944,23 @@
|
|
|
12925
12944
|
return !1;
|
|
12926
12945
|
}
|
|
12927
12946
|
function Wr({properties: t}) {
|
|
12928
|
-
return t[
|
|
12947
|
+
return t[Ur + "markerFile"] || t[Ur + "markerType"];
|
|
12929
12948
|
}
|
|
12930
12949
|
function Hr({properties: t}) {
|
|
12931
|
-
return t[
|
|
12950
|
+
return t[Ur + "textName"];
|
|
12932
12951
|
}
|
|
12933
12952
|
function Vr(t) {
|
|
12934
|
-
return 2 === t.type || 3 === t.type && !!t.properties[
|
|
12953
|
+
return 2 === t.type || 3 === t.type && !!t.properties[Ur + "lineWidth"];
|
|
12935
12954
|
}
|
|
12936
|
-
function
|
|
12955
|
+
function $r(t) {
|
|
12937
12956
|
if (!Array.isArray(t)) return 0;
|
|
12938
12957
|
let i = 0;
|
|
12939
12958
|
for (let n = 0; n < t.length; n++) i += t[n];
|
|
12940
12959
|
return i;
|
|
12941
12960
|
}
|
|
12942
|
-
function
|
|
12943
|
-
if (Object.keys(t).sort().join() !== Object.keys(i.properties || {}).filter(t => 0 === t.indexOf(
|
|
12944
|
-
for (const n in t) if (
|
|
12961
|
+
function Gr(t, i) {
|
|
12962
|
+
if (Object.keys(t).sort().join() !== Object.keys(i.properties || {}).filter(t => 0 === t.indexOf(Ur)).map(t => t.substring(Ur.length)).sort().join()) return !1;
|
|
12963
|
+
for (const n in t) if (U(t, n) && M(t[n]) !== M(i.properties[Ur + n])) return !1;
|
|
12945
12964
|
return !0;
|
|
12946
12965
|
}
|
|
12947
12966
|
function Jr(t, i, n) {
|
|
@@ -13038,9 +13057,9 @@
|
|
|
13038
13057
|
const {features: i, center: n} = this.he();
|
|
13039
13058
|
if (!i.length) return;
|
|
13040
13059
|
const e = this.ne;
|
|
13041
|
-
this.
|
|
13060
|
+
this.Ee = n;
|
|
13042
13061
|
const r = this.je(i), s = P({}, Zr), o = r.map((i, e) => this.createMesh(this.painter, De, s, i, t && t[e], n));
|
|
13043
|
-
this.
|
|
13062
|
+
this.Ie = !0, Promise.all(o).then(t => {
|
|
13044
13063
|
this.meshes && this.painter.deleteMesh(this.meshes);
|
|
13045
13064
|
const i = [], n = [];
|
|
13046
13065
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -13052,7 +13071,7 @@
|
|
|
13052
13071
|
n[e] = t[e].atlas;
|
|
13053
13072
|
}
|
|
13054
13073
|
}
|
|
13055
|
-
this.meshes = i, this.atlas = n, e && (this.ne = e), this.
|
|
13074
|
+
this.meshes = i, this.atlas = n, e && (this.ne = e), this.Ie = !1, this.setToRedraw();
|
|
13056
13075
|
});
|
|
13057
13076
|
}
|
|
13058
13077
|
je(t) {
|
|
@@ -13069,15 +13088,15 @@
|
|
|
13069
13088
|
return new t(this.regl, this.layer, this.painterSymbol, this.layer.options.sceneConfig, 0);
|
|
13070
13089
|
}
|
|
13071
13090
|
updateMesh(t) {
|
|
13072
|
-
return this.xe(t, this.meshes, this.atlas, this.
|
|
13091
|
+
return this.xe(t, this.meshes, this.atlas, this.Ee, this.painter, De, Zr, this.je);
|
|
13073
13092
|
}
|
|
13074
|
-
}), Xr.registerRenderer("canvas", null), mr.VERSION = "0.
|
|
13093
|
+
}), Xr.registerRenderer("canvas", null), mr.VERSION = "0.56.0", Pr.VERSION = "0.56.0",
|
|
13075
13094
|
t.GeoJSONVectorTileLayer = Ar, t.LineStringLayer = Br, t.MapboxVectorTileLayer = xr,
|
|
13076
|
-
t.PackUtil =
|
|
13095
|
+
t.PackUtil = $e, t.PointLayer = qr, t.PolygonLayer = Xr, t.SYMBOLS_NEED_REBUILD_IN_VECTOR = qe,
|
|
13077
13096
|
t.SYMBOLS_NEED_REBUILD_IN_VT = Je, t.Vector3DLayer = Pr, t.VectorTileLayer = mr,
|
|
13078
13097
|
t.VectorTileLayerRenderer = rr, Object.defineProperty(t, "t", {
|
|
13079
13098
|
value: !0
|
|
13080
13099
|
});
|
|
13081
13100
|
}));
|
|
13082
|
-
o.mat4.create(), "undefined" != typeof console && console.log("@maptalks/vt v0.
|
|
13101
|
+
o.mat4.create(), "undefined" != typeof console && console.log("@maptalks/vt v0.56.0");
|
|
13083
13102
|
}));
|