@maptalks/vt 0.82.1 → 0.82.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/maptalks.vt.es.js +351 -351
- package/dist/maptalks.vt.js +349 -349
- package/package.json +3 -3
package/dist/maptalks.vt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/vt v0.82.
|
|
2
|
+
* @maptalks/vt v0.82.2
|
|
3
3
|
* LICENSE : undefined
|
|
4
4
|
* (c) 2016-2023 maptalks.org
|
|
5
5
|
*/
|
|
@@ -14211,31 +14211,31 @@
|
|
|
14211
14211
|
let i = this.fe[this.he];
|
|
14212
14212
|
i || (this.xe(), i = this.Ae());
|
|
14213
14213
|
const r = this._e();
|
|
14214
|
-
n.isDefaultRender() || i.length || r.length ? (
|
|
14215
|
-
this.
|
|
14216
|
-
super.draw(t), this.Oe !== t && this.
|
|
14214
|
+
n.isDefaultRender() || i.length || r.length ? (n.options.collision && n.clearCollisionIndex(),
|
|
14215
|
+
this.Ce = t, this.Ee = this.Re(this.getMap().getGLRes()), this.De = e || {}, this.Ne(t),
|
|
14216
|
+
super.draw(t), this.Oe !== t && this.Le(t), this.He(t), this.completeRender(), this.Oe = t) : this.completeRender();
|
|
14217
14217
|
}
|
|
14218
14218
|
ze() {
|
|
14219
14219
|
this.Me().forEach((t, e) => {
|
|
14220
14220
|
t.renderIndex = e;
|
|
14221
14221
|
});
|
|
14222
14222
|
}
|
|
14223
|
-
|
|
14223
|
+
Le() {
|
|
14224
14224
|
const t = this.Me();
|
|
14225
|
-
this.
|
|
14225
|
+
this.Ue = [];
|
|
14226
14226
|
let e = +!!this.layer.getGroundConfig().enable;
|
|
14227
14227
|
t.forEach((t, n) => {
|
|
14228
|
-
t.isVisible() && gl(t) && (this.
|
|
14229
|
-
}), this.
|
|
14228
|
+
t.isVisible() && gl(t) && (this.Ue[n] = e, t.needPolygonOffset() && e++);
|
|
14229
|
+
}), this.Ve = e;
|
|
14230
14230
|
}
|
|
14231
14231
|
getFrameTimestamp() {
|
|
14232
|
-
return this.
|
|
14232
|
+
return this.Ce;
|
|
14233
14233
|
}
|
|
14234
14234
|
drawOnInteracting(t, e, n) {
|
|
14235
14235
|
this.draw(e, n);
|
|
14236
14236
|
}
|
|
14237
14237
|
drawOutline(t) {
|
|
14238
|
-
(this.
|
|
14238
|
+
(this.qe || this.We) && (this.We ? this.paintOutlineAll(t) : this.qe.forEach(e => {
|
|
14239
14239
|
this[e[0]](t, ...e[1]);
|
|
14240
14240
|
}));
|
|
14241
14241
|
}
|
|
@@ -14244,15 +14244,15 @@
|
|
|
14244
14244
|
}
|
|
14245
14245
|
getShadowMeshes() {
|
|
14246
14246
|
const t = [];
|
|
14247
|
-
return this
|
|
14247
|
+
return this.Ge().forEach(e => {
|
|
14248
14248
|
if (!e) return;
|
|
14249
|
-
if (!this
|
|
14249
|
+
if (!this.$e(e)) return;
|
|
14250
14250
|
const n = e.getShadowMeshes();
|
|
14251
14251
|
if (Array.isArray(n)) for (let e = 0; e < n.length; e++) t.push(n[e]);
|
|
14252
14252
|
}), t;
|
|
14253
14253
|
}
|
|
14254
14254
|
isForeground(t) {
|
|
14255
|
-
return !(!this.
|
|
14255
|
+
return !(!this.Je || !this.Je[t.properties.tile.id]);
|
|
14256
14256
|
}
|
|
14257
14257
|
isTileNearCamera(t) {
|
|
14258
14258
|
const e = this.layer;
|
|
@@ -14262,7 +14262,7 @@
|
|
|
14262
14262
|
return n - t.properties.tile.z <= 1;
|
|
14263
14263
|
}
|
|
14264
14264
|
isBackTile(t) {
|
|
14265
|
-
return !(!this.
|
|
14265
|
+
return !(!this.Be || !this.Be[t]);
|
|
14266
14266
|
}
|
|
14267
14267
|
loadTile(t) {
|
|
14268
14268
|
const {url: e} = t, n = this.de[e];
|
|
@@ -14283,11 +14283,11 @@
|
|
|
14283
14283
|
extent2d: t.extent2d
|
|
14284
14284
|
},
|
|
14285
14285
|
glScale: i,
|
|
14286
|
-
zScale: this.
|
|
14286
|
+
zScale: this.Ee,
|
|
14287
14287
|
centimeterToPoint: n,
|
|
14288
14288
|
fetchOptions: r,
|
|
14289
14289
|
styleCounter: this.he
|
|
14290
|
-
}, this.
|
|
14290
|
+
}, this.Xe.bind(this, e));
|
|
14291
14291
|
}
|
|
14292
14292
|
return {};
|
|
14293
14293
|
}
|
|
@@ -14299,7 +14299,7 @@
|
|
|
14299
14299
|
const e = this.getMap();
|
|
14300
14300
|
return E(this.layer.getSpatialReference().getResolution(t), e);
|
|
14301
14301
|
}
|
|
14302
|
-
|
|
14302
|
+
Xe(t, e, n) {
|
|
14303
14303
|
if (!this.de[t]) return;
|
|
14304
14304
|
if (n && n.canceled) return;
|
|
14305
14305
|
const i = this.layer, r = i.isDefaultRender(), {tiles: o} = this.de[t];
|
|
@@ -14314,7 +14314,7 @@
|
|
|
14314
14314
|
for (let t = 0; t < o.length; t++) {
|
|
14315
14315
|
const e = o[t];
|
|
14316
14316
|
this.consumeTile({
|
|
14317
|
-
|
|
14317
|
+
Ze: !0
|
|
14318
14318
|
}, e);
|
|
14319
14319
|
}
|
|
14320
14320
|
return;
|
|
@@ -14325,16 +14325,16 @@
|
|
|
14325
14325
|
for (let t = 0; t < n.data.length; t++) {
|
|
14326
14326
|
const e = n.data[t];
|
|
14327
14327
|
if (!e || !e.data || !e.styledFeatures.length) continue;
|
|
14328
|
-
const {isUpdated: i, layer: r} = this.
|
|
14328
|
+
const {isUpdated: i, layer: r} = this.Ye(0, t, e, a, l);
|
|
14329
14329
|
l.push(r), i && (s = i);
|
|
14330
14330
|
}
|
|
14331
14331
|
for (let t = 0; t < n.featureData.length; t++) {
|
|
14332
14332
|
const e = n.featureData[t];
|
|
14333
|
-
e && e.data && e.styledFeatures.length && this.
|
|
14333
|
+
e && e.data && e.styledFeatures.length && this.Ye(1, t, e, a);
|
|
14334
14334
|
}
|
|
14335
|
-
s && i.
|
|
14335
|
+
s && i.Ke();
|
|
14336
14336
|
const u = o[0].z, c = this.layer.getDataSchema(u);
|
|
14337
|
-
if (this.
|
|
14337
|
+
if (this.Qe(c, n.schema), delete n.features, r && n.data.length !== l.length) {
|
|
14338
14338
|
const t = n.data;
|
|
14339
14339
|
n.data = [];
|
|
14340
14340
|
for (let e = 0; e < t.length; e++) t[e] && t[e].features && n.data.push(t[e]);
|
|
@@ -14366,8 +14366,8 @@
|
|
|
14366
14366
|
url: t
|
|
14367
14367
|
});
|
|
14368
14368
|
}
|
|
14369
|
-
|
|
14370
|
-
const {style: r, isUpdated: o} = this.
|
|
14369
|
+
Ye(t, e, n, i) {
|
|
14370
|
+
const {style: r, isUpdated: o} = this.tn(t, e, n.data), s = this.layer, a = s.isDefaultRender(), l = r.symbol, u = il(i, n.styledFeatures, e, l, s);
|
|
14371
14371
|
delete n.styledFeatures, n.features = u;
|
|
14372
14372
|
let c = n.data;
|
|
14373
14373
|
return Array.isArray(c) && (c = c[0]), {
|
|
@@ -14378,7 +14378,7 @@
|
|
|
14378
14378
|
} : null
|
|
14379
14379
|
};
|
|
14380
14380
|
}
|
|
14381
|
-
|
|
14381
|
+
Qe(t, e) {
|
|
14382
14382
|
for (const n in e) {
|
|
14383
14383
|
t[n] || (t[n] = {
|
|
14384
14384
|
types: e[n].types,
|
|
@@ -14388,23 +14388,23 @@
|
|
|
14388
14388
|
for (const t in i) (!r[t] || r[t] && "object" !== i[t] && "object" === r[t]) && (r[t] = i[t]);
|
|
14389
14389
|
}
|
|
14390
14390
|
}
|
|
14391
|
-
|
|
14391
|
+
tn(t, e, n) {
|
|
14392
14392
|
Array.isArray(n) && (n = n[0]);
|
|
14393
14393
|
const i = this.layer;
|
|
14394
14394
|
let r, o = !1;
|
|
14395
14395
|
if (i.isDefaultRender() && 0 === t) {
|
|
14396
|
-
let t = this.
|
|
14397
|
-
t || (t = this.
|
|
14396
|
+
let t = this.en;
|
|
14397
|
+
t || (t = this.en = {});
|
|
14398
14398
|
const e = n.layer, i = n.type;
|
|
14399
14399
|
t[e] || (t[e] = []);
|
|
14400
14400
|
const s = ("plugin_" + i).trim();
|
|
14401
|
-
t[e][s] ? r = t[e][s] : (r = this.
|
|
14401
|
+
t[e][s] ? r = t[e][s] : (r = this.nn(i), r.filter = n.filter, t[e].push(r), t[e][s] = r,
|
|
14402
14402
|
o = !0);
|
|
14403
14403
|
} else {
|
|
14404
14404
|
const s = i.be(), a = i.Te(t, s), l = this.Ae();
|
|
14405
14405
|
if (r = a[e], !r.renderPlugin) {
|
|
14406
14406
|
o = !0;
|
|
14407
|
-
const {plugin: t, symbol: i, renderPlugin: s} = this.
|
|
14407
|
+
const {plugin: t, symbol: i, renderPlugin: s} = this.nn(n.type);
|
|
14408
14408
|
l[e] = t, r.symbol = i, r.renderPlugin = s;
|
|
14409
14409
|
}
|
|
14410
14410
|
}
|
|
@@ -14416,20 +14416,20 @@
|
|
|
14416
14416
|
Me(t) {
|
|
14417
14417
|
const e = t && t.style;
|
|
14418
14418
|
let n = this.Ae(e) || [];
|
|
14419
|
-
this.layer.isDefaultRender() && this.
|
|
14419
|
+
this.layer.isDefaultRender() && this.en && (n = [], t ? t.layers && t.layers.forEach(t => {
|
|
14420
14420
|
const e = ("plugin_" + t.type).trim();
|
|
14421
|
-
n.push(this.
|
|
14422
|
-
}) : Object.keys(this.
|
|
14423
|
-
for (let e = 0; e < this.
|
|
14421
|
+
n.push(this.en[t.layer][e].plugin);
|
|
14422
|
+
}) : Object.keys(this.en).forEach(t => {
|
|
14423
|
+
for (let e = 0; e < this.en[t].length; e++) n.push(this.en[t][e].plugin);
|
|
14424
14424
|
}));
|
|
14425
14425
|
const i = this._e(e);
|
|
14426
14426
|
return i && i.length && (n = n.slice(), O(n, i)), n;
|
|
14427
14427
|
}
|
|
14428
|
-
|
|
14429
|
-
if (this.layer.isDefaultRender() && this.
|
|
14428
|
+
Ge() {
|
|
14429
|
+
if (this.layer.isDefaultRender() && this.en) {
|
|
14430
14430
|
const t = [];
|
|
14431
|
-
return Object.keys(this.
|
|
14432
|
-
for (let n = 0; n < this.
|
|
14431
|
+
return Object.keys(this.en).forEach(e => {
|
|
14432
|
+
for (let n = 0; n < this.en[e].length; n++) t.push(this.en[e][n].plugin);
|
|
14433
14433
|
}), t;
|
|
14434
14434
|
}
|
|
14435
14435
|
const t = [];
|
|
@@ -14443,11 +14443,11 @@
|
|
|
14443
14443
|
_e(t) {
|
|
14444
14444
|
return F(t) && (t = this.he), this.pe[t] || ll;
|
|
14445
14445
|
}
|
|
14446
|
-
|
|
14447
|
-
const n = !!this.
|
|
14448
|
-
this
|
|
14446
|
+
Ne(t, e) {
|
|
14447
|
+
const n = !!this.rn, i = this.layer.isDefaultRender() && this.en, r = this.De;
|
|
14448
|
+
this.Ge().forEach((o, s) => {
|
|
14449
14449
|
if (!o || e && !e(o)) return;
|
|
14450
|
-
if (!this
|
|
14450
|
+
if (!this.$e(s)) return;
|
|
14451
14451
|
const a = this.regl, l = this.gl, u = i ? o.defaultSymbol : o.style && o.style.symbol, c = {
|
|
14452
14452
|
regl: a,
|
|
14453
14453
|
layer: this.layer,
|
|
@@ -14462,45 +14462,45 @@
|
|
|
14462
14462
|
r && S(c, r), o.startFrame(c);
|
|
14463
14463
|
});
|
|
14464
14464
|
}
|
|
14465
|
-
|
|
14466
|
-
const e = this.
|
|
14467
|
-
|
|
14468
|
-
if (!this
|
|
14465
|
+
He(t) {
|
|
14466
|
+
const e = this.De, n = e.renderMode, i = e && e.renderTarget && e.renderTarget.fbo, r = this.getMap().cameraPosition, o = this.Ge(), s = !!this.rn, a = !e.timestamp || e.isFinalRender;
|
|
14467
|
+
this.layer.options.collision && !e.isPostProcess ? o.forEach(e => {
|
|
14468
|
+
if (!this.$e(e) || !gl(e)) return;
|
|
14469
14469
|
if (n && "default" !== n && !e.supportRenderMode(n)) return;
|
|
14470
14470
|
if (s && !fl(e)) return;
|
|
14471
|
-
const i = this.
|
|
14472
|
-
e.prepareRender(i);
|
|
14471
|
+
const i = this.sn(e, 0, r, t);
|
|
14472
|
+
e.prepareRender(i), e.updateCollision(i);
|
|
14473
14473
|
}) : o.forEach(e => {
|
|
14474
|
-
if (!this
|
|
14474
|
+
if (!this.$e(e) || !gl(e)) return;
|
|
14475
14475
|
if (n && "default" !== n && !e.supportRenderMode(n)) return;
|
|
14476
14476
|
if (s && !fl(e)) return;
|
|
14477
|
-
const i = this.
|
|
14478
|
-
e.prepareRender(i)
|
|
14477
|
+
const i = this.sn(e, 0, r, t);
|
|
14478
|
+
e.prepareRender(i);
|
|
14479
14479
|
});
|
|
14480
14480
|
const l = this.Oe !== e.timestamp;
|
|
14481
14481
|
let u = !1;
|
|
14482
14482
|
if (l && !s) {
|
|
14483
|
-
const e = -this.layer.getPolygonOffset(), n = this.
|
|
14483
|
+
const e = -this.layer.getPolygonOffset(), n = this.sn(null, e, r, t);
|
|
14484
14484
|
n.offsetFactor = n.offsetUnits = e, this.ye.paint(n);
|
|
14485
14485
|
}
|
|
14486
14486
|
o.forEach((e, o) => {
|
|
14487
|
-
if (!this.
|
|
14487
|
+
if (!this.an(e)) return;
|
|
14488
14488
|
if (n && "default" !== n && !e.supportRenderMode(n)) return;
|
|
14489
14489
|
if (s && !fl(e)) return;
|
|
14490
14490
|
this.regl.clear({
|
|
14491
14491
|
stencil: 255,
|
|
14492
14492
|
framebuffer: i
|
|
14493
|
-
}), this.isEnableTileStencil() && e.painter && !e.painter.needClearStencil() && this.
|
|
14494
|
-
const a = this.
|
|
14493
|
+
}), this.isEnableTileStencil() && e.painter && !e.painter.needClearStencil() && this.un(i);
|
|
14494
|
+
const a = this.Ue[o] || 0, l = this.sn(e, a, r, t), c = e.endFrame(l);
|
|
14495
14495
|
c && c.redraw && this.setToRedraw(), u = !0;
|
|
14496
|
-
}), u && this.layer.fire("canvasisdirty"), a && this.
|
|
14496
|
+
}), u && this.layer.fire("canvasisdirty"), a && this.cn();
|
|
14497
14497
|
}
|
|
14498
14498
|
getPolygonOffsetCount() {
|
|
14499
|
-
return this.
|
|
14499
|
+
return this.Ve || 0;
|
|
14500
14500
|
}
|
|
14501
|
-
|
|
14501
|
+
cn() {
|
|
14502
14502
|
if (this.layer.options.debug) {
|
|
14503
|
-
const t = this.
|
|
14503
|
+
const t = this.De, e = [], i = this.getMap().projViewMatrix;
|
|
14504
14504
|
for (const r in this.tilesInView) {
|
|
14505
14505
|
const o = this.tilesInView[r].info, s = o.transform, a = this.tilesInView[r].image.extent, l = t && t.renderTarget;
|
|
14506
14506
|
if (s && a) {
|
|
@@ -14510,13 +14510,13 @@
|
|
|
14510
14510
|
}
|
|
14511
14511
|
}
|
|
14512
14512
|
}
|
|
14513
|
-
|
|
14513
|
+
an(t) {
|
|
14514
14514
|
if (!t) return !0;
|
|
14515
|
-
const e = this.
|
|
14515
|
+
const e = this.De, n = this.$e(t), i = e && e.states && e.states.includesChanged, r = this.hn(t.painter.scene.getMeshes());
|
|
14516
14516
|
return !n || !i && !r ? 0 : r ? 2 : 1;
|
|
14517
14517
|
}
|
|
14518
|
-
|
|
14519
|
-
const r = !!this.
|
|
14518
|
+
sn(t, e, n, i) {
|
|
14519
|
+
const r = !!this.rn, o = r && t && dl(t), s = this.regl, a = this.gl, l = {
|
|
14520
14520
|
regl: s,
|
|
14521
14521
|
layer: this.layer,
|
|
14522
14522
|
gl: a,
|
|
@@ -14527,43 +14527,43 @@
|
|
|
14527
14527
|
polygonOffsetIndex: e,
|
|
14528
14528
|
cameraPosition: n,
|
|
14529
14529
|
timestamp: i
|
|
14530
|
-
}, u = this.
|
|
14530
|
+
}, u = this.De;
|
|
14531
14531
|
return u && S(l, u), l;
|
|
14532
14532
|
}
|
|
14533
|
-
|
|
14533
|
+
hn(t) {
|
|
14534
14534
|
if (!t) return !1;
|
|
14535
|
-
const e = this.
|
|
14535
|
+
const e = this.De && this.De.sceneFilter;
|
|
14536
14536
|
return e ? t.filter(t => e(t) || t.properties.hlBloomMesh && e(t.properties.hlBloomMesh)).length > 0 : t.length > 0;
|
|
14537
14537
|
}
|
|
14538
|
-
|
|
14538
|
+
un(t) {
|
|
14539
14539
|
const e = this.isEnableTileStencil(), n = this.getCurrentTileZoom();
|
|
14540
|
-
let i = this.
|
|
14541
|
-
i || (i = this.
|
|
14542
|
-
const {tiles: r} = this.
|
|
14543
|
-
let {parentTiles: o, childTiles: s} = this.
|
|
14540
|
+
let i = this.dn;
|
|
14541
|
+
i || (i = this.dn = new tl(this.regl, this.canvas, this.getMap())), i.start();
|
|
14542
|
+
const {tiles: r} = this.pn;
|
|
14543
|
+
let {parentTiles: o, childTiles: s} = this.pn, a = 1;
|
|
14544
14544
|
s = s.sort(yl);
|
|
14545
|
-
for (let t = 0; t < s.length; t++) this.
|
|
14545
|
+
for (let t = 0; t < s.length; t++) this.mn(s[t].info, e ? a : this.getTileLevelValue(s[t].info.z, n)),
|
|
14546
14546
|
a++;
|
|
14547
14547
|
o = o.sort(yl);
|
|
14548
|
-
for (let t = 0; t < o.length; t++) this.
|
|
14548
|
+
for (let t = 0; t < o.length; t++) this.mn(o[t].info, e ? a : this.getTileLevelValue(o[t].info.z, n)),
|
|
14549
14549
|
a++;
|
|
14550
14550
|
const l = r.sort(yl);
|
|
14551
|
-
for (let t = l.length - 1; t >= 0; t--) this.
|
|
14551
|
+
for (let t = l.length - 1; t >= 0; t--) this.mn(l[t].info, e ? a : this.getTileLevelValue(l[t].info.z, n)),
|
|
14552
14552
|
a++;
|
|
14553
14553
|
i.render(t);
|
|
14554
14554
|
}
|
|
14555
|
-
|
|
14555
|
+
mn(t, e) {
|
|
14556
14556
|
const n = cl.set(t.extent2d.xmin, t.extent2d.ymax), i = t.transform = t.transform || this.calculateTileMatrix(n, t.z, t.extent);
|
|
14557
|
-
t.stencilRef = e, this.
|
|
14557
|
+
t.stencilRef = e, this.dn.add(e, t.extent, i);
|
|
14558
14558
|
}
|
|
14559
14559
|
onDrawTileStart(t) {
|
|
14560
14560
|
super.onDrawTileStart(t);
|
|
14561
14561
|
const {tiles: e, childTiles: n, parentTiles: i} = t;
|
|
14562
|
-
this.
|
|
14563
|
-
for (let t = 0; t < e.length; t++) this.
|
|
14564
|
-
for (let t = 0; t < n.length; t++) this.
|
|
14565
|
-
for (let t = 0; t < i.length; t++) this.
|
|
14566
|
-
this.
|
|
14562
|
+
this.Je = {}, this.Be = {};
|
|
14563
|
+
for (let t = 0; t < e.length; t++) this.Je[e[t].info.id] = 1;
|
|
14564
|
+
for (let t = 0; t < n.length; t++) this.Be[n[t].info.id] = 1;
|
|
14565
|
+
for (let t = 0; t < i.length; t++) this.Be[i[t].info.id] = 1;
|
|
14566
|
+
this.pn = t;
|
|
14567
14567
|
}
|
|
14568
14568
|
isEnableTileStencil() {
|
|
14569
14569
|
const t = this.Me();
|
|
@@ -14571,10 +14571,10 @@
|
|
|
14571
14571
|
return !0;
|
|
14572
14572
|
}
|
|
14573
14573
|
setTerrainHelper(t) {
|
|
14574
|
-
this.
|
|
14574
|
+
this.rn = t;
|
|
14575
14575
|
}
|
|
14576
14576
|
getTerrainHelper() {
|
|
14577
|
-
return this.
|
|
14577
|
+
return this.rn;
|
|
14578
14578
|
}
|
|
14579
14579
|
drawTileOnTerrain(...t) {
|
|
14580
14580
|
pl.prototype.drawTile.call(this, ...t);
|
|
@@ -14587,7 +14587,7 @@
|
|
|
14587
14587
|
width: n,
|
|
14588
14588
|
height: i
|
|
14589
14589
|
});
|
|
14590
|
-
this.
|
|
14590
|
+
this.yn || (this.yn = t.renderbuffer({
|
|
14591
14591
|
width: n,
|
|
14592
14592
|
height: i,
|
|
14593
14593
|
format: "depth24 stencil8"
|
|
@@ -14599,7 +14599,7 @@
|
|
|
14599
14599
|
colorFormat: "rgba",
|
|
14600
14600
|
ignoreStatusCheck: !0
|
|
14601
14601
|
};
|
|
14602
|
-
o.depthStencil = this.
|
|
14602
|
+
o.depthStencil = this.yn;
|
|
14603
14603
|
const s = t.framebuffer(o);
|
|
14604
14604
|
return s.colorTex = r, s;
|
|
14605
14605
|
}
|
|
@@ -14607,36 +14607,36 @@
|
|
|
14607
14607
|
t.destroy(), t.colorTex && (t.colorTex.destroy(), delete t.colorTex);
|
|
14608
14608
|
}
|
|
14609
14609
|
renderTerrainSkin(t, e, n) {
|
|
14610
|
-
const i = this.Oe, r = this.
|
|
14611
|
-
this.
|
|
14610
|
+
const i = this.Oe, r = this.De, o = this.layer.getTileSize().width;
|
|
14611
|
+
this.Ne(i);
|
|
14612
14612
|
for (let e = 0; e < n.length; e++) {
|
|
14613
14613
|
const i = n[e].texture;
|
|
14614
|
-
this.
|
|
14614
|
+
this.De = {
|
|
14615
14615
|
renderTarget: {
|
|
14616
14616
|
fbo: i
|
|
14617
14617
|
}
|
|
14618
|
-
}, hl.framebuffer = i, t.clear(hl), this.
|
|
14618
|
+
}, hl.framebuffer = i, t.clear(hl), this.De.viewport = vl(o), this.gn(n[e].tile, i);
|
|
14619
14619
|
}
|
|
14620
|
-
this.
|
|
14620
|
+
this.bn(n), this.De = r;
|
|
14621
14621
|
}
|
|
14622
|
-
|
|
14622
|
+
gn(t) {
|
|
14623
14623
|
const {info: e, image: n} = t;
|
|
14624
14624
|
this.drawTile(e, n, dl);
|
|
14625
14625
|
}
|
|
14626
|
-
|
|
14627
|
-
const e = this
|
|
14626
|
+
bn(t) {
|
|
14627
|
+
const e = this.Ge(), n = this.getMap().cameraPosition, i = this.Oe || 0;
|
|
14628
14628
|
this.layer.options.collision ? e.forEach(t => {
|
|
14629
|
-
if (!this
|
|
14629
|
+
if (!this.$e(t) || !gl(t)) return;
|
|
14630
14630
|
if (!dl(t) || !this.layer.options.awareOfTerrain) return;
|
|
14631
|
-
const e = this.
|
|
14631
|
+
const e = this.sn(t, 0, n, i);
|
|
14632
14632
|
e.isRenderingTerrainSkin = !0, t.prepareRender(e), t.updateCollision(e);
|
|
14633
14633
|
}) : e.forEach(t => {
|
|
14634
|
-
if (!this
|
|
14634
|
+
if (!this.$e(t) || !gl(t)) return;
|
|
14635
14635
|
if (!dl(t) || !this.layer.options.awareOfTerrain) return;
|
|
14636
|
-
const e = this.
|
|
14636
|
+
const e = this.sn(t, 0, n, i);
|
|
14637
14637
|
e.isRenderingTerrainSkin = !0, t.prepareRender(e);
|
|
14638
14638
|
}), e.forEach((e, n) => {
|
|
14639
|
-
if (!this.
|
|
14639
|
+
if (!this.an(e) || !dl(e)) return;
|
|
14640
14640
|
for (let e = 0; e < t.length; e++) {
|
|
14641
14641
|
const n = t[e].texture;
|
|
14642
14642
|
this.regl.clear({
|
|
@@ -14644,13 +14644,13 @@
|
|
|
14644
14644
|
framebuffer: n
|
|
14645
14645
|
});
|
|
14646
14646
|
}
|
|
14647
|
-
const i = this.
|
|
14647
|
+
const i = this.Ue[n] || 0, r = this.sn(e, i, [ 0, 0, 0 ], this.Oe);
|
|
14648
14648
|
r.isRenderingTerrainSkin = !0, e.endFrame(r);
|
|
14649
14649
|
});
|
|
14650
14650
|
}
|
|
14651
14651
|
drawTile(t, e, n) {
|
|
14652
14652
|
if (!e.cache) return;
|
|
14653
|
-
const i = !!this.
|
|
14653
|
+
const i = !!this.rn, r = e.cache, o = cl.set(t.extent2d.xmin, t.extent2d.ymax), s = t.transform = t.transform || this.calculateTileMatrix(o, t.z, t.extent), a = t.tileTranslationMatrix = t.tileTranslationMatrix || this.calculateTileTranslationMatrix(o, t.z), l = t.terrainTransform = t.terrainTransform || this.calculateTerrainTileMatrix(o, t.z, t.extent), u = this.De, c = [];
|
|
14654
14654
|
O(c, e.data), O(c, e.featureData);
|
|
14655
14655
|
this.Me(e).forEach((o, h) => {
|
|
14656
14656
|
if (!o || n && !n(o)) return;
|
|
@@ -14668,10 +14668,10 @@
|
|
|
14668
14668
|
tileVectorTransform: s,
|
|
14669
14669
|
tileTranslationMatrix: a,
|
|
14670
14670
|
tileExtent: e.extent,
|
|
14671
|
-
timestamp: this.
|
|
14671
|
+
timestamp: this.Ce,
|
|
14672
14672
|
tileInfo: t,
|
|
14673
14673
|
tileZoom: this._tileZoom,
|
|
14674
|
-
bloom: this.
|
|
14674
|
+
bloom: this.De && this.De.bloom,
|
|
14675
14675
|
isRenderingTerrain: i,
|
|
14676
14676
|
isRenderingTerrainSkin: d
|
|
14677
14677
|
};
|
|
@@ -14679,13 +14679,13 @@
|
|
|
14679
14679
|
const y = o.paintTile(m);
|
|
14680
14680
|
!this.ve && (y.retire || y.redraw) && o.supportRenderMode("taa") && (this.ve = !0),
|
|
14681
14681
|
y.redraw && this.setToRedraw();
|
|
14682
|
-
}), e && e.style === this.he && this.
|
|
14682
|
+
}), e && e.style === this.he && this.vn(t), this.setCanvasUpdated();
|
|
14683
14683
|
}
|
|
14684
|
-
|
|
14685
|
-
if (!e.loadTime || e.
|
|
14684
|
+
xn(t, e) {
|
|
14685
|
+
if (!e.loadTime || e.Ze) return;
|
|
14686
14686
|
let n = e.cache;
|
|
14687
14687
|
n || (n = e.cache = {});
|
|
14688
|
-
const i = !!this.
|
|
14688
|
+
const i = !!this.rn, r = cl.set(t.extent2d.xmin, t.extent2d.ymax), o = t.transform = t.transform || this.calculateTileMatrix(r, t.z, e.extent), s = t.tileTranslationMatrix = t.tileTranslationMatrix || this.calculateTileTranslationMatrix(r, t.z), a = t.terrainTransform = t.terrainTransform || this.calculateTerrainTileMatrix(r, t.z, t.extent), l = [];
|
|
14689
14689
|
O(l, e.data), O(l, e.featureData);
|
|
14690
14690
|
this.Me(e).forEach((r, u) => {
|
|
14691
14691
|
if (!r) return;
|
|
@@ -14706,7 +14706,7 @@
|
|
|
14706
14706
|
isRenderingTerrainSkin: c,
|
|
14707
14707
|
tileTranslationMatrix: s,
|
|
14708
14708
|
tileExtent: e.extent,
|
|
14709
|
-
timestamp: this.
|
|
14709
|
+
timestamp: this.Ce,
|
|
14710
14710
|
tileInfo: t,
|
|
14711
14711
|
tileZoom: this._tileZoom
|
|
14712
14712
|
}, p = r.createTile(f);
|
|
@@ -14721,14 +14721,14 @@
|
|
|
14721
14721
|
if (!this.layer.isVisible()) return i;
|
|
14722
14722
|
return this.Me().forEach(r => {
|
|
14723
14723
|
if (!r) return;
|
|
14724
|
-
if (!this
|
|
14724
|
+
if (!this.$e(r)) return;
|
|
14725
14725
|
const o = r.pick(t, e, n.tolerance);
|
|
14726
14726
|
o && (o.type = r.getType(), i.push(o));
|
|
14727
14727
|
}), i;
|
|
14728
14728
|
}
|
|
14729
14729
|
deleteTile(t) {
|
|
14730
14730
|
if (t) {
|
|
14731
|
-
if (t.image && !t.image.
|
|
14731
|
+
if (t.image && !t.image.Ze) {
|
|
14732
14732
|
const e = t.image && t.image.style, n = this.Ae(e);
|
|
14733
14733
|
n && n.forEach((e, n) => {
|
|
14734
14734
|
e && e.deleteTile({
|
|
@@ -14758,15 +14758,15 @@
|
|
|
14758
14758
|
})));
|
|
14759
14759
|
}
|
|
14760
14760
|
onRemove() {
|
|
14761
|
-
this.
|
|
14761
|
+
this.dn && this.dn.remove(), this.me && (this.me.removeLayer(t => {
|
|
14762
14762
|
if (t) throw t;
|
|
14763
14763
|
}), this.me.remove(), delete this.me), this.pickingFBO && (this.canvas.pickingFBO || this.pickingFBO.destroy(),
|
|
14764
|
-
delete this.pickingFBO), this.Pe && (this.Pe.delete(), delete this.Pe), this.
|
|
14765
|
-
delete this.
|
|
14764
|
+
delete this.pickingFBO), this.Pe && (this.Pe.delete(), delete this.Pe), this.yn && (this.yn.destroy(),
|
|
14765
|
+
delete this.yn), this.ye && (this.ye.dispose(), delete this.ye), super.onRemove && super.onRemove(),
|
|
14766
14766
|
this.ke();
|
|
14767
14767
|
}
|
|
14768
14768
|
ke() {
|
|
14769
|
-
this
|
|
14769
|
+
this.Ge().forEach(t => {
|
|
14770
14770
|
t.remove();
|
|
14771
14771
|
}), this.plugins = {};
|
|
14772
14772
|
}
|
|
@@ -14780,28 +14780,28 @@
|
|
|
14780
14780
|
const n = t.renderPlugin;
|
|
14781
14781
|
if (!n) return null;
|
|
14782
14782
|
if (!n.type) throw new Error("invalid plugin type for style at " + e);
|
|
14783
|
-
const i = this.
|
|
14783
|
+
const i = this.wn(n);
|
|
14784
14784
|
return i.styleCounter = this.he, i.style = t, i;
|
|
14785
14785
|
}), i = [];
|
|
14786
14786
|
e.forEach((t, e) => {
|
|
14787
14787
|
const n = t.renderPlugin;
|
|
14788
14788
|
if (!n) return null;
|
|
14789
14789
|
if (!n.type) throw new Error("invalid plugin type for features at " + e);
|
|
14790
|
-
const r = this.
|
|
14790
|
+
const r = this.wn(n);
|
|
14791
14791
|
return r.style = t, r.styleCounter = this.he, i.push(r), r;
|
|
14792
14792
|
});
|
|
14793
14793
|
const r = this.he;
|
|
14794
|
-
if (this.fe[r] = n, this.pe[r] = i, this.layer.fire("pluginsinited"), this.
|
|
14795
|
-
this.layer.
|
|
14794
|
+
if (this.fe[r] = n, this.pe[r] = i, this.layer.fire("pluginsinited"), this.kn && this.kn.size || this.layer.kn) {
|
|
14795
|
+
this.layer.kn && this.layer.An();
|
|
14796
14796
|
this.getMap().getRenderer().callInNextFrame(() => {
|
|
14797
14797
|
this.Me().forEach(t => {
|
|
14798
|
-
t.highlight(this.
|
|
14798
|
+
t.highlight(this.kn);
|
|
14799
14799
|
});
|
|
14800
14800
|
});
|
|
14801
14801
|
}
|
|
14802
14802
|
return n;
|
|
14803
14803
|
}
|
|
14804
|
-
|
|
14804
|
+
wn(t) {
|
|
14805
14805
|
const e = this.layer.constructor.getPlugins()[t.type];
|
|
14806
14806
|
if (!e) throw new Error(`Plugin for (${t.type}) is not loaded.`);
|
|
14807
14807
|
const n = new e;
|
|
@@ -14818,7 +14818,7 @@
|
|
|
14818
14818
|
}
|
|
14819
14819
|
return i;
|
|
14820
14820
|
}
|
|
14821
|
-
|
|
14821
|
+
Re(t) {
|
|
14822
14822
|
return E(t, this.getMap());
|
|
14823
14823
|
}
|
|
14824
14824
|
debugFBO(t, e) {
|
|
@@ -14836,7 +14836,7 @@
|
|
|
14836
14836
|
const c = new ImageData(i, r);
|
|
14837
14837
|
c.data.set(s), o.putImageData(c, 0, 0);
|
|
14838
14838
|
}
|
|
14839
|
-
|
|
14839
|
+
nn(t) {
|
|
14840
14840
|
let e;
|
|
14841
14841
|
switch (t) {
|
|
14842
14842
|
case "native-line":
|
|
@@ -14897,14 +14897,14 @@
|
|
|
14897
14897
|
};
|
|
14898
14898
|
}
|
|
14899
14899
|
return null;
|
|
14900
|
-
}(t), i = this.
|
|
14900
|
+
}(t), i = this.wn(e);
|
|
14901
14901
|
return i.defaultSymbol = n, {
|
|
14902
14902
|
plugin: i,
|
|
14903
14903
|
symbol: n,
|
|
14904
14904
|
renderPlugin: e
|
|
14905
14905
|
};
|
|
14906
14906
|
}
|
|
14907
|
-
|
|
14907
|
+
$e() {
|
|
14908
14908
|
return !0;
|
|
14909
14909
|
}
|
|
14910
14910
|
isEnableWorkAround(t) {
|
|
@@ -14918,21 +14918,21 @@
|
|
|
14918
14918
|
}(this.gl));
|
|
14919
14919
|
}
|
|
14920
14920
|
getZScale() {
|
|
14921
|
-
return this.
|
|
14921
|
+
return this.Ee;
|
|
14922
14922
|
}
|
|
14923
14923
|
outline(t, e) {
|
|
14924
|
-
e && (Array.isArray(e) || (e = [ e ]), this.
|
|
14924
|
+
e && (Array.isArray(e) || (e = [ e ]), this.qe || (this.qe = []), this.qe.push([ "paintOutline", [ t, e ] ]),
|
|
14925
14925
|
this.setToRedraw());
|
|
14926
14926
|
}
|
|
14927
14927
|
outlineFeatures(t) {
|
|
14928
|
-
t && (Array.isArray(t) || (t = [ t ]), this.
|
|
14928
|
+
t && (Array.isArray(t) || (t = [ t ]), this.qe || (this.qe = []), this.qe.push([ "paintOutline", [ null, t ] ]),
|
|
14929
14929
|
this.setToRedraw());
|
|
14930
14930
|
}
|
|
14931
14931
|
outlineBatch(t) {
|
|
14932
|
-
this.
|
|
14932
|
+
this.qe || (this.qe = []), this.qe.push([ "paintBatchOutline", [ t ] ]), this.setToRedraw();
|
|
14933
14933
|
}
|
|
14934
14934
|
outlineAll() {
|
|
14935
|
-
this.
|
|
14935
|
+
this.We = !0, this.setToRedraw();
|
|
14936
14936
|
}
|
|
14937
14937
|
paintOutlineAll(t) {
|
|
14938
14938
|
const e = this.Me();
|
|
@@ -14955,18 +14955,18 @@
|
|
|
14955
14955
|
!n[e] || n[e].painter && !n[e].painter.isVisible() || n[e].outlineAll(t);
|
|
14956
14956
|
}
|
|
14957
14957
|
cancelOutline() {
|
|
14958
|
-
delete this.
|
|
14958
|
+
delete this.qe, delete this.We, this.setToRedraw();
|
|
14959
14959
|
}
|
|
14960
14960
|
setZIndex() {
|
|
14961
14961
|
return this.setToRedraw(), this.ve = !0, super.setZIndex.apply(this, arguments);
|
|
14962
14962
|
}
|
|
14963
14963
|
consumeTile(t, e) {
|
|
14964
|
-
t.
|
|
14964
|
+
t.Ze && this.vn(e), super.consumeTile(t, e), this.xn(e, t);
|
|
14965
14965
|
}
|
|
14966
14966
|
onTileError(t, e) {
|
|
14967
|
-
this.
|
|
14967
|
+
this.vn(e), super.onTileError(t, e);
|
|
14968
14968
|
}
|
|
14969
|
-
|
|
14969
|
+
vn(t) {
|
|
14970
14970
|
const {id: e} = t;
|
|
14971
14971
|
if (this.we && this.we[e]) {
|
|
14972
14972
|
const t = this.we[e];
|
|
@@ -14974,22 +14974,22 @@
|
|
|
14974
14974
|
}
|
|
14975
14975
|
}
|
|
14976
14976
|
highlight(t) {
|
|
14977
|
-
if (this.
|
|
14978
|
-
t[e].name = t[e].id), this.
|
|
14979
|
-
this.
|
|
14977
|
+
if (this.kn || (this.kn = new Map), Array.isArray(t)) for (let e = 0; e < t.length; e++) F(t[e].name) && !F(t[e].id) && (t[e] = S({}, t[e]),
|
|
14978
|
+
t[e].name = t[e].id), this.kn.set(t[e].name, t[e]); else F(t.name) && !F(t.id) && ((t = S({}, t)).name = t.id),
|
|
14979
|
+
this.kn.set(t.name, t);
|
|
14980
14980
|
this.Me().forEach(t => {
|
|
14981
|
-
t.highlight(this.
|
|
14981
|
+
t.highlight(this.kn);
|
|
14982
14982
|
});
|
|
14983
14983
|
}
|
|
14984
14984
|
cancelHighlight(t) {
|
|
14985
|
-
if (!this.
|
|
14986
|
-
if (Array.isArray(t)) for (let e = 0; e < t.length; e++) this.
|
|
14985
|
+
if (!this.kn) return;
|
|
14986
|
+
if (Array.isArray(t)) for (let e = 0; e < t.length; e++) this.kn.delete(t[e]); else this.kn.delete(t);
|
|
14987
14987
|
this.Me().forEach(t => {
|
|
14988
|
-
t.highlight(this.
|
|
14988
|
+
t.highlight(this.kn);
|
|
14989
14989
|
});
|
|
14990
14990
|
}
|
|
14991
14991
|
cancelAllHighlight() {
|
|
14992
|
-
delete this.
|
|
14992
|
+
delete this.kn;
|
|
14993
14993
|
this.Me().forEach(t => {
|
|
14994
14994
|
t.cancelAllHighlight();
|
|
14995
14995
|
});
|
|
@@ -15029,7 +15029,7 @@
|
|
|
15029
15029
|
const t = new Array(3), e = new Array(3), i = new Array(3);
|
|
15030
15030
|
return function(r, o, s) {
|
|
15031
15031
|
const a = this.getTileGLScale(o), l = r, u = this.layer.getTileSize().width, c = n.mat4.identity([]);
|
|
15032
|
-
return n.mat4.scale(c, c, n.vec3.set(t, a, a, this.
|
|
15032
|
+
return n.mat4.scale(c, c, n.vec3.set(t, a, a, this.Ee)), n.mat4.translate(c, c, n.vec3.set(e, l.x, l.y, 0)),
|
|
15033
15033
|
n.mat4.scale(c, c, n.vec3.set(i, u / s, -u / s, 1)), c;
|
|
15034
15034
|
};
|
|
15035
15035
|
}(),
|
|
@@ -15105,7 +15105,7 @@
|
|
|
15105
15105
|
const i = new AbortController, r = e;
|
|
15106
15106
|
return r.signal = i.signal, r.referrerPolicy = r.referrerPolicy || "origin", r.method = r.method || "GET",
|
|
15107
15107
|
fetch(t, r).then(i => {
|
|
15108
|
-
const r = this.
|
|
15108
|
+
const r = this._n(i, e.returnJSON, e.responseType);
|
|
15109
15109
|
r.message ? (r.url = t, n(r)) : r.then(t => {
|
|
15110
15110
|
"arraybuffer" === e.responseType ? n(null, {
|
|
15111
15111
|
data: t,
|
|
@@ -15123,7 +15123,7 @@
|
|
|
15123
15123
|
}), i;
|
|
15124
15124
|
}
|
|
15125
15125
|
{
|
|
15126
|
-
const r = Ml.
|
|
15126
|
+
const r = Ml.Tn(n);
|
|
15127
15127
|
if (r.open(e.method || "GET", t, !0), e) {
|
|
15128
15128
|
for (const t in e.headers) r.setRequestHeader(t, e.headers[t]);
|
|
15129
15129
|
r.withCredentials = "include" === e.credentials, e.responseType && (r.responseType = e.responseType);
|
|
@@ -15131,12 +15131,12 @@
|
|
|
15131
15131
|
return r.send(i ? e.body : null), r;
|
|
15132
15132
|
}
|
|
15133
15133
|
},
|
|
15134
|
-
|
|
15134
|
+
_n: (t, e, n) => 200 !== t.status ? {
|
|
15135
15135
|
status: t.status,
|
|
15136
15136
|
statusText: t.statusText,
|
|
15137
15137
|
message: `incorrect http request with status code(${t.status}): ${t.statusText}`
|
|
15138
15138
|
} : "arraybuffer" === n ? t.arrayBuffer() : e ? t.json() : t.text(),
|
|
15139
|
-
|
|
15139
|
+
Mn: function(t, e) {
|
|
15140
15140
|
return function() {
|
|
15141
15141
|
if (4 === t.readyState) if (200 === t.status) if ("arraybuffer" === t.responseType) {
|
|
15142
15142
|
0 === t.response.byteLength ? e({
|
|
@@ -15156,7 +15156,7 @@
|
|
|
15156
15156
|
});
|
|
15157
15157
|
};
|
|
15158
15158
|
},
|
|
15159
|
-
|
|
15159
|
+
Tn: function(t) {
|
|
15160
15160
|
let e;
|
|
15161
15161
|
try {
|
|
15162
15162
|
e = new XMLHttpRequest;
|
|
@@ -15169,7 +15169,7 @@
|
|
|
15169
15169
|
} catch (t) {}
|
|
15170
15170
|
}
|
|
15171
15171
|
}
|
|
15172
|
-
return e.onreadystatechange = Ml.
|
|
15172
|
+
return e.onreadystatechange = Ml.Mn(e, t), e;
|
|
15173
15173
|
},
|
|
15174
15174
|
getArrayBuffer(t, e, n) {
|
|
15175
15175
|
if (j(e)) {
|
|
@@ -15267,19 +15267,19 @@
|
|
|
15267
15267
|
n.style ? (r = n, r.$root || (r.$root = i)) : r = {
|
|
15268
15268
|
$root: i,
|
|
15269
15269
|
style: n
|
|
15270
|
-
}, this.options.style = e, this.
|
|
15270
|
+
}, this.options.style = e, this.Sn(r);
|
|
15271
15271
|
}), this;
|
|
15272
15272
|
}
|
|
15273
|
-
return this.options.style = t, this.
|
|
15273
|
+
return this.options.style = t, this.Sn(t), this;
|
|
15274
15274
|
}
|
|
15275
|
-
|
|
15275
|
+
Pn(t, e, n, i) {
|
|
15276
15276
|
const r = i / this.getTileSize().width;
|
|
15277
15277
|
return t.set(n.x + e.x / r, n.y - e.y / r);
|
|
15278
15278
|
}
|
|
15279
15279
|
queryTilePointTerrain(t, e, n, i, r) {
|
|
15280
15280
|
const o = this.getRenderer(), s = o && o.getTerrainHelper();
|
|
15281
15281
|
if (!o || !s) return Il[0] = null, Il[1] = 0, Il;
|
|
15282
|
-
const a = this.
|
|
15282
|
+
const a = this.Pn(Sl, t, n, i);
|
|
15283
15283
|
return e && s.queryTileTerrainByPointAtRes ? s.queryTileTerrainByPointAtRes(a, r, e.id, e) : (Il[0] = null,
|
|
15284
15284
|
Il[1] = 0, Il);
|
|
15285
15285
|
}
|
|
@@ -15287,10 +15287,10 @@
|
|
|
15287
15287
|
const e = this.getRenderer(), n = e && e.getTerrainHelper();
|
|
15288
15288
|
return e && n ? n.getTerrainTiles(t) : null;
|
|
15289
15289
|
}
|
|
15290
|
-
|
|
15291
|
-
if (this.
|
|
15290
|
+
Sn(t) {
|
|
15291
|
+
if (this.In = null, t && t.$root) {
|
|
15292
15292
|
let e = t.$root;
|
|
15293
|
-
e && "/" === e[e.length - 1] && (e = e.substring(0, e.length - 1)), this.
|
|
15293
|
+
e && "/" === e[e.length - 1] && (e = e.substring(0, e.length - 1)), this.In = e,
|
|
15294
15294
|
this.ct = function(t) {
|
|
15295
15295
|
return "{$root}" === t ? e : null;
|
|
15296
15296
|
};
|
|
@@ -15313,26 +15313,26 @@
|
|
|
15313
15313
|
featureStyle: s
|
|
15314
15314
|
};
|
|
15315
15315
|
return t.$root && (a.$root = t.$root), a;
|
|
15316
|
-
}(t = JSON.parse(JSON.stringify(t))), this.
|
|
15316
|
+
}(t = JSON.parse(JSON.stringify(t))), this.jn = t.featureStyle || [], this.Fn = function(t) {
|
|
15317
15317
|
if (!t || !Array.isArray(t)) return [];
|
|
15318
15318
|
const e = [];
|
|
15319
15319
|
for (let n = 0; n < t.length; n++) {
|
|
15320
15320
|
const i = t[n].style;
|
|
15321
15321
|
if (i && Array.isArray(i) && i.length) for (let r = 0; r < i.length; r++) {
|
|
15322
15322
|
const o = S({}, t[n], i[r]);
|
|
15323
|
-
i[r].
|
|
15323
|
+
i[r].On = e.length, delete o.style, e.push(o);
|
|
15324
15324
|
} else e.push(S({}, t[n]));
|
|
15325
15325
|
}
|
|
15326
15326
|
return e;
|
|
15327
|
-
}(t.featureStyle), this.
|
|
15327
|
+
}(t.featureStyle), this.zn = t.style || [];
|
|
15328
15328
|
const e = t.background || {};
|
|
15329
|
-
this.
|
|
15329
|
+
this.Cn = {
|
|
15330
15330
|
enable: e.enable || !1,
|
|
15331
15331
|
color: zl(e.color) || [ 0, 0, 0, 0 ],
|
|
15332
15332
|
opacity: Cl(e.opacity, 1),
|
|
15333
15333
|
patternFile: e.patternFile,
|
|
15334
15334
|
depthRange: e.depthRange
|
|
15335
|
-
}, this.validateStyle(), this.ct && this.
|
|
15335
|
+
}, this.validateStyle(), this.ct && this.En(), this.Ke();
|
|
15336
15336
|
const n = this.getRenderer();
|
|
15337
15337
|
n && n.setStyle(), this.fire("setstyle", {
|
|
15338
15338
|
style: this.getStyle(),
|
|
@@ -15344,13 +15344,13 @@
|
|
|
15344
15344
|
return t ? t.getPolygonOffsetCount() : 0;
|
|
15345
15345
|
}
|
|
15346
15346
|
getPolygonOffset() {
|
|
15347
|
-
return this.
|
|
15347
|
+
return this.Rn || 0;
|
|
15348
15348
|
}
|
|
15349
15349
|
setPolygonOffset(t, e) {
|
|
15350
|
-
return this.
|
|
15350
|
+
return this.Rn = t, this.Dn = e, this;
|
|
15351
15351
|
}
|
|
15352
15352
|
getTotalPolygonOffset() {
|
|
15353
|
-
return this.
|
|
15353
|
+
return this.Dn;
|
|
15354
15354
|
}
|
|
15355
15355
|
outlineAll() {
|
|
15356
15356
|
const t = this.getRenderer();
|
|
@@ -15373,13 +15373,13 @@
|
|
|
15373
15373
|
return t ? (t.cancelOutline(), this) : this;
|
|
15374
15374
|
}
|
|
15375
15375
|
highlight(t) {
|
|
15376
|
-
this.
|
|
15376
|
+
this.Nn(t);
|
|
15377
15377
|
const e = this.getRenderer();
|
|
15378
|
-
return e ? (e.highlight(t), this) : (this.
|
|
15378
|
+
return e ? (e.highlight(t), this) : (this.kn || (this.kn = []), this.kn.push(t),
|
|
15379
15379
|
this);
|
|
15380
15380
|
}
|
|
15381
|
-
|
|
15382
|
-
if (Array.isArray(t)) for (let e = 0; e < t.length; e++) this.
|
|
15381
|
+
Nn(t) {
|
|
15382
|
+
if (Array.isArray(t)) for (let e = 0; e < t.length; e++) this.Nn(t[e]); else {
|
|
15383
15383
|
if (t.filter) {
|
|
15384
15384
|
if (!this.options.features) throw new Error("options.features must be turned on to support filter in highlight");
|
|
15385
15385
|
if (!t.name) throw new Error("A name is required for highlight with filter");
|
|
@@ -15387,10 +15387,10 @@
|
|
|
15387
15387
|
if (F(t.filter) && F(t.id)) throw new Error("id or filter must be provided for highlight");
|
|
15388
15388
|
}
|
|
15389
15389
|
}
|
|
15390
|
-
|
|
15391
|
-
if (this.
|
|
15392
|
-
for (let t = 0; t < this.
|
|
15393
|
-
delete this.
|
|
15390
|
+
An() {
|
|
15391
|
+
if (this.kn) {
|
|
15392
|
+
for (let t = 0; t < this.kn.length; t++) this.highlight(this.kn[t]);
|
|
15393
|
+
delete this.kn;
|
|
15394
15394
|
}
|
|
15395
15395
|
}
|
|
15396
15396
|
cancelHighlight(t) {
|
|
@@ -15401,22 +15401,22 @@
|
|
|
15401
15401
|
const t = this.getRenderer();
|
|
15402
15402
|
return t ? (t.cancelAllHighlight(), this) : this;
|
|
15403
15403
|
}
|
|
15404
|
-
|
|
15405
|
-
r.Util.convertStylePath(this.
|
|
15404
|
+
En() {
|
|
15405
|
+
r.Util.convertStylePath(this.zn, this.ct), r.Util.convertStylePath(this.Fn, this.ct);
|
|
15406
15406
|
}
|
|
15407
15407
|
updateSceneConfig(t, e) {
|
|
15408
|
-
return P(t) && (t = this.
|
|
15408
|
+
return P(t) && (t = this.Ln(t)), this.Hn(0, t, e);
|
|
15409
15409
|
}
|
|
15410
15410
|
updateFeatureSceneConfig(t, e, n) {
|
|
15411
|
-
return this.
|
|
15411
|
+
return this.Hn(1, t, n, e);
|
|
15412
15412
|
}
|
|
15413
|
-
|
|
15413
|
+
Hn(t, e, n, i) {
|
|
15414
15414
|
const r = this.Te(t);
|
|
15415
15415
|
if (!r) return this;
|
|
15416
15416
|
let o, s = e;
|
|
15417
15417
|
if (r[e].renderPlugin.sceneConfig || (r[e].renderPlugin.sceneConfig = {}), S(r[e].renderPlugin.sceneConfig, n),
|
|
15418
15418
|
void 0 !== i) {
|
|
15419
|
-
El(this.
|
|
15419
|
+
El(this.jn, e, i), s = this.jn[e].style[i].On;
|
|
15420
15420
|
const t = r[s].renderPlugin;
|
|
15421
15421
|
t.sceneConfig || (t.sceneConfig = {}), o = t.sceneConfig;
|
|
15422
15422
|
} else Rl(r, e), o = r[e].renderPlugin.sceneConfig;
|
|
@@ -15440,16 +15440,16 @@
|
|
|
15440
15440
|
}), this;
|
|
15441
15441
|
}
|
|
15442
15442
|
updateDataConfig(t, e) {
|
|
15443
|
-
return P(t) && (t = this.
|
|
15443
|
+
return P(t) && (t = this.Ln(t)), this.Un(0, t, e);
|
|
15444
15444
|
}
|
|
15445
15445
|
updateFeatureDataConfig(t, e, n) {
|
|
15446
|
-
return this.
|
|
15446
|
+
return this.Un(1, t, n, e);
|
|
15447
15447
|
}
|
|
15448
|
-
|
|
15448
|
+
Un(t, e, n, i) {
|
|
15449
15449
|
const r = this.Te(t);
|
|
15450
15450
|
if (!r) return this;
|
|
15451
15451
|
let o, s = e;
|
|
15452
|
-
void 0 !== i ? (El(this.
|
|
15452
|
+
void 0 !== i ? (El(this.jn, e, i), s = this.jn[e].style[i].On, o = r[s].renderPlugin.dataConfig) : (Rl(r, e),
|
|
15453
15453
|
o = r[e].renderPlugin.dataConfig);
|
|
15454
15454
|
const a = S({}, o);
|
|
15455
15455
|
if (S(o, n), Array.isArray(this.options.style)) S(this.options.style[e].renderPlugin.dataConfig, n); else {
|
|
@@ -15469,16 +15469,16 @@
|
|
|
15469
15469
|
}), this;
|
|
15470
15470
|
}
|
|
15471
15471
|
updateSymbol(t, e) {
|
|
15472
|
-
return P(t) && (t = this.
|
|
15472
|
+
return P(t) && (t = this.Ln(t)), this.Vn(0, t, e);
|
|
15473
15473
|
}
|
|
15474
15474
|
updateFeatureSymbol(t, e, n) {
|
|
15475
|
-
return this.
|
|
15475
|
+
return this.Vn(1, t, n, e);
|
|
15476
15476
|
}
|
|
15477
|
-
|
|
15477
|
+
Vn(t, e, n, i) {
|
|
15478
15478
|
const o = this.Te(t);
|
|
15479
15479
|
if (!o) return this;
|
|
15480
15480
|
let s = e;
|
|
15481
|
-
void 0 !== i && (El(this.
|
|
15481
|
+
void 0 !== i && (El(this.jn, e, i), s = this.jn[e].style[i].On);
|
|
15482
15482
|
const a = o[s];
|
|
15483
15483
|
if (!a) throw new Error("No style defined at " + e);
|
|
15484
15484
|
const l = this, u = this.ct;
|
|
@@ -15504,14 +15504,14 @@
|
|
|
15504
15504
|
void 0 === s ? h[e].symbol = d : h[e].symbol[s] = d), c;
|
|
15505
15505
|
}
|
|
15506
15506
|
const h = this.getRenderer();
|
|
15507
|
-
if (!h) return c(), this.
|
|
15507
|
+
if (!h) return c(), this.Ke(), this;
|
|
15508
15508
|
let d = !1;
|
|
15509
15509
|
const f = a.symbol;
|
|
15510
15510
|
if (Array.isArray(n)) for (let t = 0; t < n.length; t++) {
|
|
15511
15511
|
const e = c(n[t], f[t], t);
|
|
15512
15512
|
e && (d = e);
|
|
15513
15513
|
} else c(n, f);
|
|
15514
|
-
return this.
|
|
15514
|
+
return this.Ke(), d ? h.setStyle() : (d = h.updateSymbol(t, s, n), d && h.setStyle()),
|
|
15515
15515
|
0 === t ? this.fire("updatesymbol", {
|
|
15516
15516
|
index: e,
|
|
15517
15517
|
symbol: n
|
|
@@ -15525,15 +15525,15 @@
|
|
|
15525
15525
|
if (e) {
|
|
15526
15526
|
return 0 === t ? e.style : e.featureStyle;
|
|
15527
15527
|
}
|
|
15528
|
-
return 0 === t ? this.
|
|
15528
|
+
return 0 === t ? this.zn : this.Fn;
|
|
15529
15529
|
}
|
|
15530
15530
|
isDefaultRender() {
|
|
15531
|
-
return !!this.
|
|
15531
|
+
return !!this.qn && this.options.defaultRendering;
|
|
15532
15532
|
}
|
|
15533
15533
|
validateStyle() {
|
|
15534
|
-
this.
|
|
15535
|
-
let t = this.
|
|
15536
|
-
this.options.style || (this.
|
|
15534
|
+
this.qn = !1;
|
|
15535
|
+
let t = this.zn;
|
|
15536
|
+
this.options.style || (this.qn = !0, t = this.zn = []), Array.isArray(t) || (t = this.zn = [ t ]);
|
|
15537
15537
|
for (let e = 0; e < t.length; e++) {
|
|
15538
15538
|
let n = t[e].filter;
|
|
15539
15539
|
if (n && n.value && (n = n.value), n || console.warn(`render plugin at ${e} doesn't define filter, its filter will be set to 'default' by default.`),
|
|
@@ -15543,14 +15543,14 @@
|
|
|
15543
15543
|
getStyle() {
|
|
15544
15544
|
return this.options.style ? JSON.parse(JSON.stringify(this.options.style)) : null;
|
|
15545
15545
|
}
|
|
15546
|
-
|
|
15547
|
-
const e = this.
|
|
15546
|
+
Ln(t) {
|
|
15547
|
+
const e = this.zn;
|
|
15548
15548
|
if (!e) return -1;
|
|
15549
15549
|
for (let n = 0; n < e.length; n++) if (e[n].name === t) return n;
|
|
15550
15550
|
throw new Error("No style defined with name: " + t);
|
|
15551
15551
|
}
|
|
15552
15552
|
getGroundConfig() {
|
|
15553
|
-
this.
|
|
15553
|
+
this.Wn || (this.Wn = {
|
|
15554
15554
|
enable: !0,
|
|
15555
15555
|
renderPlugin: {
|
|
15556
15556
|
type: "fill",
|
|
@@ -15562,18 +15562,18 @@
|
|
|
15562
15562
|
}
|
|
15563
15563
|
});
|
|
15564
15564
|
const t = this.be().background || {};
|
|
15565
|
-
return this.
|
|
15566
|
-
this.
|
|
15567
|
-
this.
|
|
15565
|
+
return this.Wn.enable = t.enable, this.Wn.symbol.polygonFill = t.color, this.Wn.symbol.polygonOpacity = t.opacity,
|
|
15566
|
+
this.Wn.symbol.polygonPatternFile = t.patternFile, this.Wn.renderPlugin.sceneConfig.depthRange = t.depthRange,
|
|
15567
|
+
this.Wn;
|
|
15568
15568
|
}
|
|
15569
15569
|
getComputedStyle() {
|
|
15570
15570
|
return JSON.parse(JSON.stringify(this.be()));
|
|
15571
15571
|
}
|
|
15572
15572
|
be() {
|
|
15573
15573
|
return {
|
|
15574
|
-
background: this.
|
|
15575
|
-
style: this.
|
|
15576
|
-
featureStyle: this.
|
|
15574
|
+
background: this.Cn,
|
|
15575
|
+
style: this.zn || [],
|
|
15576
|
+
featureStyle: this.Fn || []
|
|
15577
15577
|
};
|
|
15578
15578
|
}
|
|
15579
15579
|
identify(t, e = {}) {
|
|
@@ -15586,9 +15586,9 @@
|
|
|
15586
15586
|
const n = this.getMap(), i = this.getRenderer();
|
|
15587
15587
|
if (!n || !i) return [];
|
|
15588
15588
|
const r = n.getDevicePixelRatio(), o = i.pick(t.x * r, t.y * r, e);
|
|
15589
|
-
return this.options.features && "id" !== this.options.features ? this
|
|
15589
|
+
return this.options.features && "id" !== this.options.features ? this.Gn(o) : o;
|
|
15590
15590
|
}
|
|
15591
|
-
|
|
15591
|
+
Gn(t) {
|
|
15592
15592
|
if (!this.getRenderer()) return t;
|
|
15593
15593
|
const e = this._getTileConfig(), n = this.getSpatialReference();
|
|
15594
15594
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -15598,21 +15598,21 @@
|
|
|
15598
15598
|
if (d) {
|
|
15599
15599
|
r.data = S({}, r.data), r.data.feature = S({}, r.data.feature);
|
|
15600
15600
|
const t = r.data.feature.type;
|
|
15601
|
-
r.data.feature.type = "Feature", r.data.feature.geometry = this
|
|
15601
|
+
r.data.feature.type = "Feature", r.data.feature.geometry = this.$n(t, d, h, u, c);
|
|
15602
15602
|
}
|
|
15603
15603
|
}
|
|
15604
15604
|
return t;
|
|
15605
15605
|
}
|
|
15606
|
-
|
|
15606
|
+
$n(t, e, n, i, r) {
|
|
15607
15607
|
let o, s;
|
|
15608
|
-
if (1 === t) e.length <= 1 ? (o = "Point", s = this.
|
|
15609
|
-
s = this.
|
|
15610
|
-
s = this.
|
|
15608
|
+
if (1 === t) e.length <= 1 ? (o = "Point", s = this.Jn(e, n, i, r)[0] || []) : (o = "MultiPoint",
|
|
15609
|
+
s = this.Jn(e, n, i, r)); else if (2 === t) e.length <= 1 ? (o = "LineString", s = this.Jn(e, n, i, r)[0] || []) : (o = "MultiLineString",
|
|
15610
|
+
s = this.Jn(e, n, i, r)); else if (3 === t) {
|
|
15611
15611
|
let t;
|
|
15612
15612
|
s = [];
|
|
15613
15613
|
let a = 0;
|
|
15614
15614
|
for (let o = 0; o < e.length; o++) {
|
|
15615
|
-
Da.calculateSignedArea(e[o]) > 0 && (a++, t && t.length && s.push(t), t = []), t.push(this.
|
|
15615
|
+
Da.calculateSignedArea(e[o]) > 0 && (a++, t && t.length && s.push(t), t = []), t.push(this.Jn(e[o], n, i, r));
|
|
15616
15616
|
}
|
|
15617
15617
|
t.length && s.push(t), a <= 1 ? (o = "Polygon", s = s[0]) : o = "MultiPolygon";
|
|
15618
15618
|
}
|
|
@@ -15621,14 +15621,14 @@
|
|
|
15621
15621
|
coordinates: s
|
|
15622
15622
|
};
|
|
15623
15623
|
}
|
|
15624
|
-
|
|
15624
|
+
Jn(t, e, n, i) {
|
|
15625
15625
|
const r = n / this.getTileSize().width, o = this.getMap(), s = [];
|
|
15626
|
-
for (let a = 0; a < t.length; a++) Array.isArray(t[a]) ? s.push(this.
|
|
15626
|
+
for (let a = 0; a < t.length; a++) Array.isArray(t[a]) ? s.push(this.Jn(t[a], e, n, i)) : (Sl.x = e.x + t[a].x / r,
|
|
15627
15627
|
Sl.y = e.y - t[a].y / r, o.pointAtResToCoord(Sl, i, Pl), s.push(Pl.toArray()));
|
|
15628
15628
|
return s;
|
|
15629
15629
|
}
|
|
15630
15630
|
getDataSchema(t) {
|
|
15631
|
-
return this.
|
|
15631
|
+
return this.Bn || (this.Bn = {}), F(t) || this.Bn[t] || (this.Bn[t] = {}), F(t) ? this.Bn : this.Bn[t];
|
|
15632
15632
|
}
|
|
15633
15633
|
onRemove() {
|
|
15634
15634
|
super.onRemove();
|
|
@@ -15636,7 +15636,7 @@
|
|
|
15636
15636
|
static fromJSON(t) {
|
|
15637
15637
|
return t && "VectorTileLayer" === t.type ? new Fl(t.id, t.options) : null;
|
|
15638
15638
|
}
|
|
15639
|
-
|
|
15639
|
+
Ke() {}
|
|
15640
15640
|
static registerPlugin(t) {
|
|
15641
15641
|
Fl.plugins || (Fl.plugins = {}), Fl.plugins[t.type] = t;
|
|
15642
15642
|
}
|
|
@@ -15728,17 +15728,17 @@
|
|
|
15728
15728
|
}
|
|
15729
15729
|
setData(t) {
|
|
15730
15730
|
if (this.options.data = t, t && (P(t) || t.url)) {
|
|
15731
|
-
return !!this.getRenderer() && this.
|
|
15731
|
+
return !!this.getRenderer() && this.Xn(), this;
|
|
15732
15732
|
}
|
|
15733
|
-
return this.
|
|
15733
|
+
return this.Zn(t), this.Xn(), this;
|
|
15734
15734
|
}
|
|
15735
|
-
|
|
15735
|
+
Zn(t) {
|
|
15736
15736
|
if (this.options.convertFn) {
|
|
15737
15737
|
t = new Function("data", this.options.convertFn + "\nreturn convert(data)")(t);
|
|
15738
15738
|
}
|
|
15739
|
-
return this.features = t, this.
|
|
15739
|
+
return this.features = t, this.Yn(), this;
|
|
15740
15740
|
}
|
|
15741
|
-
|
|
15741
|
+
Xn() {
|
|
15742
15742
|
const t = this.getRenderer();
|
|
15743
15743
|
if (t) {
|
|
15744
15744
|
const e = t.getWorkerConnection();
|
|
@@ -15751,19 +15751,19 @@
|
|
|
15751
15751
|
}
|
|
15752
15752
|
}
|
|
15753
15753
|
getExtent() {
|
|
15754
|
-
return this.
|
|
15754
|
+
return this.Kn;
|
|
15755
15755
|
}
|
|
15756
15756
|
onWorkerReady(t, e) {
|
|
15757
15757
|
t ? this.fire("dataerror", {
|
|
15758
15758
|
error: t
|
|
15759
|
-
}) : (e && (e.extent && this.
|
|
15759
|
+
}) : (e && (e.extent && this.Qn(e.extent), e.idMap && (this.ti = e.idMap)), this.fire("dataload", {
|
|
15760
15760
|
extent: e && e.extent
|
|
15761
15761
|
}));
|
|
15762
15762
|
}
|
|
15763
|
-
|
|
15764
|
-
this.
|
|
15763
|
+
Qn(t) {
|
|
15764
|
+
this.Kn = new r.Extent(...t);
|
|
15765
15765
|
}
|
|
15766
|
-
|
|
15766
|
+
ei(t, e) {
|
|
15767
15767
|
P(t) ? Ml.getJSON(t, e) : Ml.getJSON(t.url, t, e);
|
|
15768
15768
|
}
|
|
15769
15769
|
getData() {
|
|
@@ -15773,21 +15773,21 @@
|
|
|
15773
15773
|
return this.getId() + "," + t + "," + e + "," + n;
|
|
15774
15774
|
}
|
|
15775
15775
|
getFeature(t) {
|
|
15776
|
-
return this.
|
|
15776
|
+
return this.ti[t];
|
|
15777
15777
|
}
|
|
15778
15778
|
static fromJSON(t) {
|
|
15779
15779
|
return t && "GeoJSONVectorTileLayer" === t.type ? new Hl(t.id, t.options) : null;
|
|
15780
15780
|
}
|
|
15781
|
-
|
|
15781
|
+
Yn() {
|
|
15782
15782
|
if (!this.features) return;
|
|
15783
15783
|
if (this.features = JSON.parse(JSON.stringify(this.features)), !this.features) return;
|
|
15784
15784
|
let t = 0;
|
|
15785
|
-
this.
|
|
15785
|
+
this.ti = {};
|
|
15786
15786
|
const e = this.features;
|
|
15787
15787
|
Array.isArray(e) ? e.forEach(e => {
|
|
15788
|
-
e && (I(e.id) || (e.id = t++), this.
|
|
15788
|
+
e && (I(e.id) || (e.id = t++), this.ti[e.id] = e);
|
|
15789
15789
|
}) : e.features && e.features.forEach(e => {
|
|
15790
|
-
e && (I(e.id) || (e.id = t++), this.
|
|
15790
|
+
e && (I(e.id) || (e.id = t++), this.ti[e.id] = e);
|
|
15791
15791
|
});
|
|
15792
15792
|
}
|
|
15793
15793
|
}
|
|
@@ -15824,13 +15824,13 @@
|
|
|
15824
15824
|
return 1;
|
|
15825
15825
|
}
|
|
15826
15826
|
getPolygonOffset() {
|
|
15827
|
-
return this.
|
|
15827
|
+
return this.Rn || 0;
|
|
15828
15828
|
}
|
|
15829
15829
|
setPolygonOffset(t, e) {
|
|
15830
|
-
return this.
|
|
15830
|
+
return this.Rn = t, this.Dn = e, this;
|
|
15831
15831
|
}
|
|
15832
15832
|
getTotalPolygonOffset() {
|
|
15833
|
-
return this.
|
|
15833
|
+
return this.Dn;
|
|
15834
15834
|
}
|
|
15835
15835
|
identify(t, e = {}) {
|
|
15836
15836
|
const n = this.getMap(), i = this.getRenderer();
|
|
@@ -16313,18 +16313,18 @@
|
|
|
16313
16313
|
const iu = [];
|
|
16314
16314
|
class ru extends r.renderer.CanvasRenderer {
|
|
16315
16315
|
constructor(...t) {
|
|
16316
|
-
super(...t), this.features = {}, this.
|
|
16317
|
-
this.
|
|
16316
|
+
super(...t), this.features = {}, this.ni = {}, this.se = 0, this.ii = {}, this.ri = {},
|
|
16317
|
+
this.oi = {}, this.si = {}, this.ai = {}, this.li = !0, this.ui = {
|
|
16318
16318
|
id: 0,
|
|
16319
16319
|
pickingId: 0
|
|
16320
|
-
}, this.
|
|
16320
|
+
}, this.ci = S({}, Gl, $l), this.hi = {};
|
|
16321
16321
|
}
|
|
16322
16322
|
hasNoAARendering() {
|
|
16323
16323
|
return !0;
|
|
16324
16324
|
}
|
|
16325
16325
|
needToRedraw() {
|
|
16326
16326
|
const t = super.needToRedraw();
|
|
16327
|
-
return t || (this.painter && this.painter.needToRedraw() || this.
|
|
16327
|
+
return t || (this.painter && this.painter.needToRedraw() || this.di && this.di.needToRedraw() || this.fi && this.fi.needToRedraw());
|
|
16328
16328
|
}
|
|
16329
16329
|
getAnalysisMeshes() {
|
|
16330
16330
|
return iu;
|
|
@@ -16333,44 +16333,44 @@
|
|
|
16333
16333
|
return null;
|
|
16334
16334
|
}
|
|
16335
16335
|
draw(t, e) {
|
|
16336
|
-
this.
|
|
16336
|
+
this.Ce = t;
|
|
16337
16337
|
const n = this.layer;
|
|
16338
|
-
this.prepareCanvas(), this.
|
|
16339
|
-
const i = this.
|
|
16340
|
-
if (this.
|
|
16341
|
-
this.
|
|
16342
|
-
const t = this.atlas, e = this.
|
|
16343
|
-
delete this.atlas, delete this.
|
|
16344
|
-
this.
|
|
16345
|
-
} else if (this.
|
|
16346
|
-
const t = this.
|
|
16347
|
-
delete this.
|
|
16348
|
-
}
|
|
16349
|
-
if (!this.meshes && !this.
|
|
16350
|
-
this.
|
|
16338
|
+
this.prepareCanvas(), this.Ee = this.Re(this.getMap().getGLRes()), this.De = e || {};
|
|
16339
|
+
const i = this.De.renderMode, r = this.mi();
|
|
16340
|
+
if (this.Ne(r, i), this.li) this.buildMesh(), this.yi(), this.gi(), this.hi = {},
|
|
16341
|
+
this.bi = !1, this.li = !1, this.vi = !1; else if (this.bi) {
|
|
16342
|
+
const t = this.atlas, e = this.xi, n = this.wi;
|
|
16343
|
+
delete this.atlas, delete this.xi, delete this.wi, this.buildMesh(t), this.yi(e),
|
|
16344
|
+
this.gi(n), this.bi = !1, this.vi = !1;
|
|
16345
|
+
} else if (this.vi) {
|
|
16346
|
+
const t = this.wi;
|
|
16347
|
+
delete this.wi, this.gi(t), this.vi = !1;
|
|
16348
|
+
}
|
|
16349
|
+
if (!this.meshes && !this.ki && !this.Ai) return void this.completeRender();
|
|
16350
|
+
this._i && (this.Ti(), this._i = !1), this.Mi();
|
|
16351
16351
|
const o = !i || "default" === i;
|
|
16352
16352
|
let s = 0;
|
|
16353
|
-
if (0 === this.layer.options.meshRenderOrder && this.
|
|
16354
|
-
this.
|
|
16355
|
-
bloom: this.
|
|
16356
|
-
}), this.
|
|
16357
|
-
this.
|
|
16358
|
-
const e = !this.
|
|
16353
|
+
if (0 === this.layer.options.meshRenderOrder && this.Si(r, s++, i), this.Ai && (o || this.fi.supportRenderMode(i)) && (this.fi.startFrame(r),
|
|
16354
|
+
this.fi.addMesh(this.Ai, null, {
|
|
16355
|
+
bloom: this.De.bloom
|
|
16356
|
+
}), this.fi.prepareRender(r), r.polygonOffsetIndex = s++, this.fi.render(r)), 1 === this.layer.options.meshRenderOrder && this.Si(r, s++, i),
|
|
16357
|
+
this.ki && (o || this.di.supportRenderMode(i))) {
|
|
16358
|
+
const e = !this.De.timestamp || this.De.isFinalRender, i = !this.Pi || this.Pi !== t;
|
|
16359
16359
|
n.options.collision && i && n.clearCollisionIndex();
|
|
16360
16360
|
const o = this.layer.options.sceneConfig;
|
|
16361
|
-
this.
|
|
16362
|
-
this.
|
|
16363
|
-
bloom: this.
|
|
16364
|
-
}), this.
|
|
16365
|
-
e && (this.
|
|
16361
|
+
this.di.sceneConfig.collision = !o || (!!F(o.collision) || o.collision), this.di.startFrame(r),
|
|
16362
|
+
this.di.addMesh(this.ki, null, {
|
|
16363
|
+
bloom: this.De.bloom
|
|
16364
|
+
}), this.di.prepareRender(r), n.options.collision && i && (this.di.updateCollision(r),
|
|
16365
|
+
e && (this.Pi = t)), this.di.render(r);
|
|
16366
16366
|
}
|
|
16367
16367
|
(o || e && e.isFinalRender) && (this.completeRender(), this.layer.fire("canvasisdirty"));
|
|
16368
16368
|
}
|
|
16369
|
-
|
|
16369
|
+
Ne(t, e) {
|
|
16370
16370
|
const n = !e || "default" === e;
|
|
16371
16371
|
this.painter && (n || this.painter.supportRenderMode(e)) && this.painter.startFrame(t);
|
|
16372
16372
|
}
|
|
16373
|
-
|
|
16373
|
+
Si(t, e, n) {
|
|
16374
16374
|
const i = !n || "default" === n;
|
|
16375
16375
|
this.painter && this.meshes && (i || this.painter.supportRenderMode(n)) && (this.painter.addMesh(this.meshes, null, {
|
|
16376
16376
|
bloom: t && t.bloom
|
|
@@ -16382,7 +16382,7 @@
|
|
|
16382
16382
|
isForeground() {
|
|
16383
16383
|
return !0;
|
|
16384
16384
|
}
|
|
16385
|
-
|
|
16385
|
+
mi() {
|
|
16386
16386
|
const t = {
|
|
16387
16387
|
regl: this.regl,
|
|
16388
16388
|
layer: this.layer,
|
|
@@ -16393,13 +16393,13 @@
|
|
|
16393
16393
|
cameraPosition: this.getMap().cameraPosition,
|
|
16394
16394
|
timestamp: this.getFrameTimestamp()
|
|
16395
16395
|
};
|
|
16396
|
-
return this.
|
|
16396
|
+
return this.De && S(t, this.De), t;
|
|
16397
16397
|
}
|
|
16398
16398
|
drawOnInteracting(t, e, n) {
|
|
16399
16399
|
this.draw(e, n);
|
|
16400
16400
|
}
|
|
16401
16401
|
getFrameTimestamp() {
|
|
16402
|
-
return this.
|
|
16402
|
+
return this.Ce;
|
|
16403
16403
|
}
|
|
16404
16404
|
ji(t, e) {
|
|
16405
16405
|
(t = t || e) === e && (e = null);
|
|
@@ -16412,18 +16412,18 @@
|
|
|
16412
16412
|
const a = this.features[s];
|
|
16413
16413
|
if (Array.isArray(a)) for (let r = 0; r < a.length; r++) {
|
|
16414
16414
|
const o = a[r], s = o[eu];
|
|
16415
|
-
(!t || t[s] || e && (!e || e[s])) && (o.visible || (this.
|
|
16415
|
+
(!t || t[s] || e && (!e || e[s])) && (o.visible || (this._i = !0), this.Fi(o.geometry, i),
|
|
16416
16416
|
n.push(o));
|
|
16417
16417
|
} else {
|
|
16418
|
-
a.visible || (this.
|
|
16418
|
+
a.visible || (this._i = !0);
|
|
16419
16419
|
const r = a[eu];
|
|
16420
16420
|
if (t && !t[r] && (!e || e && !e[r])) continue;
|
|
16421
16421
|
this.Fi(a.geometry, i), n.push(a);
|
|
16422
16422
|
}
|
|
16423
16423
|
}
|
|
16424
16424
|
if (n.length || (this.meshes && this.painter && (this.painter.deleteMesh(this.meshes),
|
|
16425
|
-
delete this.meshes), this.
|
|
16426
|
-
delete this.
|
|
16425
|
+
delete this.meshes), this.ki && (this.di.deleteMesh(this.ki), delete this.ki), this.Ai && (this.fi.deleteMesh(this.Ai),
|
|
16426
|
+
delete this.Ai)), i[3] && (i[0] /= i[3], i[1] /= i[3]), isNaN(i[0]) || isNaN(i[1])) throw new Error("invalid geometry coordinates for " + this.layer.getJSONType());
|
|
16427
16427
|
return {
|
|
16428
16428
|
features: n,
|
|
16429
16429
|
center: i
|
|
@@ -16449,7 +16449,7 @@
|
|
|
16449
16449
|
const l = e.createGeometries([ t.data ], il(o, null, 0, r, this.layer));
|
|
16450
16450
|
for (let t = 0; t < l.length; t++) l[t] && this.zi(l[t].geometry);
|
|
16451
16451
|
const u = n.mat4.identity([]);
|
|
16452
|
-
n.mat4.translate(u, u, n.vec3.set([], a[0], a[1], 0)), n.mat4.scale(u, u, n.vec3.set([], 1, 1, this.
|
|
16452
|
+
n.mat4.translate(u, u, n.vec3.set([], a[0], a[1], 0)), n.mat4.scale(u, u, n.vec3.set([], 1, 1, this.Ee));
|
|
16453
16453
|
const c = e.createMeshes(l, u, {
|
|
16454
16454
|
tilePoint: [ a[0], a[1] ]
|
|
16455
16455
|
});
|
|
@@ -16517,40 +16517,40 @@
|
|
|
16517
16517
|
});
|
|
16518
16518
|
});
|
|
16519
16519
|
}
|
|
16520
|
-
|
|
16521
|
-
const e = Object.keys(this.
|
|
16522
|
-
if (!e.length && !i.length) return void (this.
|
|
16523
|
-
delete this.
|
|
16524
|
-
const {features: r, center: o} = this.ji(this.
|
|
16520
|
+
yi(t) {
|
|
16521
|
+
const e = Object.keys(this.oi), i = Object.keys(this.si);
|
|
16522
|
+
if (!e.length && !i.length) return void (this.ki && (this.di.deleteMesh(this.ki),
|
|
16523
|
+
delete this.ki));
|
|
16524
|
+
const {features: r, center: o} = this.ji(this.oi, this.si), s = [], a = [];
|
|
16525
16525
|
for (let t = 0; t < r.length; t++) {
|
|
16526
16526
|
const e = r[t][eu];
|
|
16527
|
-
this.
|
|
16527
|
+
this.oi[e] && s.push(r[t]), this.si[e] && a.push(r[t]);
|
|
16528
16528
|
}
|
|
16529
|
-
if (!s.length && !a.length) return void (this.
|
|
16530
|
-
delete this.
|
|
16531
|
-
const l = this.
|
|
16529
|
+
if (!s.length && !a.length) return void (this.ki && (this.di.deleteMesh(this.ki),
|
|
16530
|
+
delete this.ki));
|
|
16531
|
+
const l = this._i;
|
|
16532
16532
|
this.Ni = o;
|
|
16533
16533
|
const u = this.Li(s, a, t, o);
|
|
16534
|
-
this.
|
|
16534
|
+
this.xi = {};
|
|
16535
16535
|
const c = [], h = [];
|
|
16536
16536
|
this.Hi = !0, Promise.all(u).then(t => {
|
|
16537
|
-
if (this.
|
|
16538
|
-
const e = this.
|
|
16539
|
-
t && t.data)), this.
|
|
16537
|
+
if (this.ki && (this.di.deleteMesh(this.ki), delete this.ki), !t || !t.length) return void this.setToRedraw();
|
|
16538
|
+
const e = this.di.createGeometries(t.map(t => (t && t.data && (t.data.isIdUnique = !0),
|
|
16539
|
+
t && t.data)), this.ii);
|
|
16540
16540
|
for (let n = 0; n < e.length; n++) this.zi(e[n].geometry, t[n] && t[n].data);
|
|
16541
16541
|
const i = t[0] && t[0].data.iconAtlas, r = t[0] && t[0].data.glyphAtlas || t[1] && t[1].data.glyphAtlas;
|
|
16542
|
-
i && (this.
|
|
16542
|
+
i && (this.xi.iconAtlas = i), r && (this.xi.glyphAtlas = r);
|
|
16543
16543
|
const s = n.mat4.identity([]);
|
|
16544
|
-
n.mat4.translate(s, s, n.vec3.set(h, o[0], o[1], 0)), n.mat4.scale(s, s, n.vec3.set(c, 1, 1, this.
|
|
16545
|
-
const a = this.
|
|
16544
|
+
n.mat4.translate(s, s, n.vec3.set(h, o[0], o[1], 0)), n.mat4.scale(s, s, n.vec3.set(c, 1, 1, this.Ee));
|
|
16545
|
+
const a = this.di.createMeshes(e, s);
|
|
16546
16546
|
for (let t = 0; t < a.length; t++) a[t].geometry.properties.originElements = a[t].geometry.properties.elements.slice(),
|
|
16547
16547
|
a[t].properties.level = 0, a[t].material.set("flipY", 1), a[t].properties.meshKey = Ql++;
|
|
16548
|
-
this.
|
|
16548
|
+
this.ki = a, l && (this._i = !0), this.Hi = !1, this.setToRedraw(), this.layer.fire("buildmarkermesh");
|
|
16549
16549
|
});
|
|
16550
16550
|
}
|
|
16551
|
-
|
|
16552
|
-
if (this.
|
|
16553
|
-
if (this.meshes) for (let t = 0; t < this.meshes.length; t++) this.Ui(this.meshes[t], this.
|
|
16551
|
+
Ti() {
|
|
16552
|
+
if (this.ki && (this.Ui(this.ki[0], this.oi), this.Ui(this.ki[1], this.si)), this.Ai) for (let t = 0; t < this.Ai.length; t++) this.Ui(this.Ai[t], this.ai);
|
|
16553
|
+
if (this.meshes) for (let t = 0; t < this.meshes.length; t++) this.Ui(this.meshes[t], this.ii);
|
|
16554
16554
|
}
|
|
16555
16555
|
Ui(t, e) {
|
|
16556
16556
|
if (!t) return;
|
|
@@ -16576,14 +16576,14 @@
|
|
|
16576
16576
|
markerHeightType: Uint16Array
|
|
16577
16577
|
}, o = S({}, r);
|
|
16578
16578
|
r.allowEmptyPack = 1;
|
|
16579
|
-
return oa.splitPointSymbol(this.
|
|
16579
|
+
return oa.splitPointSymbol(this.ci).map((n, i) => new oa(0 === i ? t : e, n, 0 === i ? r : o).load());
|
|
16580
16580
|
}
|
|
16581
16581
|
updateMesh() {}
|
|
16582
16582
|
Vi(t) {
|
|
16583
16583
|
const e = t._getInternalSymbol(), n = {
|
|
16584
16584
|
zoom: this.getMap().getZoom()
|
|
16585
16585
|
}, i = this.qi(t);
|
|
16586
|
-
if (!this.
|
|
16586
|
+
if (!this.ki) return !1;
|
|
16587
16587
|
let r = this.features[i];
|
|
16588
16588
|
Array.isArray(r) || (r = [ r ]);
|
|
16589
16589
|
const o = [], s = [], a = [], l = this.getMap().getZoom();
|
|
@@ -16593,14 +16593,14 @@
|
|
|
16593
16593
|
for (let t = 0; t < r.length; t++) {
|
|
16594
16594
|
if (!r[t]) continue;
|
|
16595
16595
|
const i = Array.isArray(e) ? e[t] : e, o = Array.isArray(u) ? u[t] : u, s = Array.isArray(c) ? c[t] : c, a = new Vs(r, i, o, s, n).getIconAndGlyph();
|
|
16596
|
-
if (!this.
|
|
16596
|
+
if (!this.xi || !oa.isAtlasLoaded(a, this.xi)) return this.Wi(), this.setToRedraw(),
|
|
16597
16597
|
!1;
|
|
16598
16598
|
}
|
|
16599
16599
|
for (let t = 0; t < r.length; t++) {
|
|
16600
16600
|
const e = r[t][eu];
|
|
16601
|
-
this.
|
|
16601
|
+
this.oi[e] && s.push(r[t]), this.si[e] && a.push(r[t]);
|
|
16602
16602
|
}
|
|
16603
|
-
const h = r[0].id, d = this.Li(s, a, this.
|
|
16603
|
+
const h = r[0].id, d = this.Li(s, a, this.xi, this.Ni), f = this.ki;
|
|
16604
16604
|
return Promise.all(d).then(t => {
|
|
16605
16605
|
for (let e = 0; e < t.length; e++) {
|
|
16606
16606
|
if (!t[e]) continue;
|
|
@@ -16619,7 +16619,7 @@
|
|
|
16619
16619
|
}), !0;
|
|
16620
16620
|
}
|
|
16621
16621
|
Gi(t) {
|
|
16622
|
-
return this.$i(t, this.
|
|
16622
|
+
return this.$i(t, this.Ai, this.wi, this.Ji, this.fi, da, Jl, this.Bi);
|
|
16623
16623
|
}
|
|
16624
16624
|
$i(t, e, n, i, r, o, s, a) {
|
|
16625
16625
|
if (!e) return !1;
|
|
@@ -16676,16 +16676,16 @@
|
|
|
16676
16676
|
this.layer.fire("updatemesh"), this.setToRedraw();
|
|
16677
16677
|
}
|
|
16678
16678
|
}
|
|
16679
|
-
|
|
16680
|
-
if (!Object.keys(this.
|
|
16681
|
-
delete this.
|
|
16682
|
-
const {features: e, center: n} = this.ji(this.
|
|
16679
|
+
gi(t) {
|
|
16680
|
+
if (!Object.keys(this.ai).length) return void (this.Ai && (this.fi.deleteMesh(this.Ai),
|
|
16681
|
+
delete this.Ai));
|
|
16682
|
+
const {features: e, center: n} = this.ji(this.ai);
|
|
16683
16683
|
if (!e.length) return;
|
|
16684
|
-
const i = this.
|
|
16684
|
+
const i = this._i;
|
|
16685
16685
|
this.Ji = n;
|
|
16686
|
-
const r = this.Bi(e), o = S({}, Jl), s = r.map((e, i) => this.createMesh(this.
|
|
16686
|
+
const r = this.Bi(e), o = S({}, Jl), s = r.map((e, i) => this.createMesh(this.fi, da, o, e, t && t[i], n));
|
|
16687
16687
|
this.Zi = !0, Promise.all(s).then(t => {
|
|
16688
|
-
this.
|
|
16688
|
+
this.Ai && this.fi.deleteMesh(this.Ai);
|
|
16689
16689
|
const e = [], n = [];
|
|
16690
16690
|
for (let i = 0; i < t.length; i++) {
|
|
16691
16691
|
const r = t[i] && t[i].meshes;
|
|
@@ -16697,7 +16697,7 @@
|
|
|
16697
16697
|
n[i] = t[i].atlas;
|
|
16698
16698
|
}
|
|
16699
16699
|
}
|
|
16700
|
-
this.
|
|
16700
|
+
this.Ai = e, this.wi = n, i && (this._i = i), this.Zi = !1, this.setToRedraw(),
|
|
16701
16701
|
this.layer.fire("buildlinemesh");
|
|
16702
16702
|
});
|
|
16703
16703
|
}
|
|
@@ -16710,10 +16710,10 @@
|
|
|
16710
16710
|
return [ i, r, o ];
|
|
16711
16711
|
}
|
|
16712
16712
|
Yi() {
|
|
16713
|
-
this.
|
|
16713
|
+
this.bi = !0, this.setToRedraw();
|
|
16714
16714
|
}
|
|
16715
16715
|
Wi() {
|
|
16716
|
-
this.
|
|
16716
|
+
this.li = !0, this.setToRedraw();
|
|
16717
16717
|
}
|
|
16718
16718
|
Ki(t) {
|
|
16719
16719
|
const e = this.layer.getId();
|
|
@@ -16731,29 +16731,29 @@
|
|
|
16731
16731
|
qi(t) {
|
|
16732
16732
|
void 0 === t[Xl] && (t[Xl] = this.se++);
|
|
16733
16733
|
const e = t[Xl];
|
|
16734
|
-
this.features[e] && this.Qi(e), this.features[e] = Yl(t, this.
|
|
16734
|
+
this.features[e] && this.Qi(e), this.features[e] = Yl(t, this.ui, this.features[e]);
|
|
16735
16735
|
const n = this.features[e];
|
|
16736
|
-
return this.er(n, e), this.
|
|
16736
|
+
return this.er(n, e), this.ni[e] = t, e;
|
|
16737
16737
|
}
|
|
16738
16738
|
er(t, e) {
|
|
16739
16739
|
if (!t) return;
|
|
16740
16740
|
const n = Array.isArray(t) ? t[0].id : t.id;
|
|
16741
|
-
if (this.
|
|
16741
|
+
if (this.ri[n] = t, Array.isArray(t)) for (let n = 0; n < t.length; n++) {
|
|
16742
16742
|
const i = t[n][eu];
|
|
16743
|
-
if (t[n][Xl] = e, this.
|
|
16743
|
+
if (t[n][Xl] = e, this.ii[i] = {
|
|
16744
16744
|
feature: t[n]
|
|
16745
|
-
}, this.
|
|
16745
|
+
}, this.ii[i][Xl] = e, !this.needCheckPointLineSymbols()) continue;
|
|
16746
16746
|
const r = {
|
|
16747
16747
|
feature: t[n]
|
|
16748
16748
|
};
|
|
16749
|
-
au(t[n]) && (this.
|
|
16749
|
+
au(t[n]) && (this.oi[i] = r), lu(t[n]) && (this.si[i] = r), hu(t[n]) && (this.ai[i] = r);
|
|
16750
16750
|
} else {
|
|
16751
16751
|
t[Xl] = e;
|
|
16752
16752
|
const n = {
|
|
16753
16753
|
feature: t
|
|
16754
16754
|
}, i = t[eu];
|
|
16755
|
-
if (this.
|
|
16756
|
-
au(t) && (this.
|
|
16755
|
+
if (this.ii[i] = n, !this.needCheckPointLineSymbols()) return;
|
|
16756
|
+
au(t) && (this.oi[i] = n), lu(t) && (this.si[i] = n), hu(t) && (this.ai[i] = n);
|
|
16757
16757
|
}
|
|
16758
16758
|
}
|
|
16759
16759
|
needCheckPointLineSymbols() {
|
|
@@ -16763,21 +16763,21 @@
|
|
|
16763
16763
|
const e = this.features[t];
|
|
16764
16764
|
if (e) if (Array.isArray(e)) for (let t = 0; t < e.length; t++) {
|
|
16765
16765
|
const n = e[t][eu], i = e[t].id;
|
|
16766
|
-
delete this.
|
|
16766
|
+
delete this.ri[i], delete this.ii[n], delete this.oi[n], delete this.si[n], delete this.ai[n];
|
|
16767
16767
|
} else {
|
|
16768
16768
|
const t = e[eu], n = e.id;
|
|
16769
|
-
delete this.
|
|
16769
|
+
delete this.ri[n], delete this.ii[t], delete this.oi[t], delete this.si[t], delete this.ai[t];
|
|
16770
16770
|
}
|
|
16771
16771
|
}
|
|
16772
16772
|
pick(t, e, n) {
|
|
16773
16773
|
const i = [];
|
|
16774
16774
|
if (!this.layer.isVisible()) return i;
|
|
16775
|
-
return [ this.painter, this.
|
|
16775
|
+
return [ this.painter, this.di, this.fi ].forEach(r => {
|
|
16776
16776
|
if (!r) return;
|
|
16777
16777
|
const o = r.pick(t, e, n.tolerance);
|
|
16778
16778
|
if (o && o.data && o.data.feature) {
|
|
16779
16779
|
const t = o.data.feature;
|
|
16780
|
-
i.push(this.
|
|
16780
|
+
i.push(this.ni[t[Xl]]);
|
|
16781
16781
|
}
|
|
16782
16782
|
}), i;
|
|
16783
16783
|
}
|
|
@@ -16785,15 +16785,15 @@
|
|
|
16785
16785
|
const e = t[Xl], n = this.features[e];
|
|
16786
16786
|
return Array.isArray(n) ? n[0][eu] : n[eu];
|
|
16787
16787
|
}
|
|
16788
|
-
|
|
16788
|
+
Mi() {
|
|
16789
16789
|
let t = !1;
|
|
16790
|
-
for (const e in this.
|
|
16791
|
-
const n = this.
|
|
16792
|
-
if (!this.Hi && (this.
|
|
16790
|
+
for (const e in this.hi) {
|
|
16791
|
+
const n = this.hi[e], i = this.nr(n);
|
|
16792
|
+
if (!this.Hi && (this.oi[i] || this.si[i])) {
|
|
16793
16793
|
const e = this.Vi(n);
|
|
16794
16794
|
t = t || e;
|
|
16795
16795
|
}
|
|
16796
|
-
if (!this.Zi && this.
|
|
16796
|
+
if (!this.Zi && this.ai[i]) {
|
|
16797
16797
|
const e = this.Gi(n);
|
|
16798
16798
|
t = t || e;
|
|
16799
16799
|
}
|
|
@@ -16802,7 +16802,7 @@
|
|
|
16802
16802
|
t = t || e;
|
|
16803
16803
|
}
|
|
16804
16804
|
}
|
|
16805
|
-
this.
|
|
16805
|
+
this.hi = {}, t && (ou(this), this.layer.fire("partialupdate"));
|
|
16806
16806
|
}
|
|
16807
16807
|
rr(t) {
|
|
16808
16808
|
this.qi(t), this.Wi(), ou(this);
|
|
@@ -16814,7 +16814,7 @@
|
|
|
16814
16814
|
if (t && t.length) {
|
|
16815
16815
|
for (let e = 0; e < t.length; e++) {
|
|
16816
16816
|
const n = t[e][Xl];
|
|
16817
|
-
void 0 !== n && (delete this.
|
|
16817
|
+
void 0 !== n && (delete this.ni[n], this.Qi(n), delete this.features[n]);
|
|
16818
16818
|
}
|
|
16819
16819
|
this.Wi(), ou(this);
|
|
16820
16820
|
}
|
|
@@ -16848,7 +16848,7 @@
|
|
|
16848
16848
|
}
|
|
16849
16849
|
onGeometryPositionChange(t) {
|
|
16850
16850
|
const e = t.target._getParent() || t.target, n = e[Xl];
|
|
16851
|
-
this.Ki([ e ]), this.
|
|
16851
|
+
this.Ki([ e ]), this.hi[n] = e, ou(this);
|
|
16852
16852
|
}
|
|
16853
16853
|
onGeometryZIndexChange() {
|
|
16854
16854
|
this.Wi();
|
|
@@ -16874,11 +16874,11 @@
|
|
|
16874
16874
|
}
|
|
16875
16875
|
}
|
|
16876
16876
|
sr() {
|
|
16877
|
-
this.
|
|
16877
|
+
this._i = !0;
|
|
16878
16878
|
}
|
|
16879
16879
|
onGeometryPropertiesChange(t) {
|
|
16880
16880
|
const e = t.target, n = e[Xl];
|
|
16881
|
-
this.features[n] = Yl(e, this.
|
|
16881
|
+
this.features[n] = Yl(e, this.ui), this.er(this.features[n], n), this.Wi(), ou(this);
|
|
16882
16882
|
}
|
|
16883
16883
|
createContext() {
|
|
16884
16884
|
const t = this.canvas.gl && this.canvas.gl.wrap;
|
|
@@ -16890,13 +16890,13 @@
|
|
|
16890
16890
|
n.markerPerspectiveRatio = this.layer.options.markerPerspectiveRatio || 0, this.ar(n, "markerBloom"),
|
|
16891
16891
|
this.ar(n, "textBloom");
|
|
16892
16892
|
const i = S({}, Ba, this.layer.options.sceneConfig || {});
|
|
16893
|
-
this.
|
|
16893
|
+
this.di = new e(this.regl, this.layer, n, i, 0), this.di.setTextShaderDefines({
|
|
16894
16894
|
REVERSE_MAP_ROTATION_ON_PITCH: 1
|
|
16895
16895
|
});
|
|
16896
16896
|
const r = Wl.get3DPainterClass("line"), o = S({}, Jl);
|
|
16897
16897
|
this.ar(o, "lineBloom");
|
|
16898
16898
|
const s = S({}, this.layer.options.sceneConfig || {});
|
|
16899
|
-
void 0 === s.depthMask && (s.depthMask = !0), this.
|
|
16899
|
+
void 0 === s.depthMask && (s.depthMask = !0), this.fi = new r(this.regl, this.layer, o, s, 0),
|
|
16900
16900
|
this.layer.getGeometries() && this.onGeometryAdd(this.layer.getGeometries());
|
|
16901
16901
|
}
|
|
16902
16902
|
ar(t, e) {
|
|
@@ -16949,16 +16949,16 @@
|
|
|
16949
16949
|
this.painter && this.painter.resize(e.width, e.height));
|
|
16950
16950
|
}
|
|
16951
16951
|
onRemove() {
|
|
16952
|
-
super.onRemove(), this.painter && this.painter.delete(), this.
|
|
16953
|
-
this.
|
|
16952
|
+
super.onRemove(), this.painter && this.painter.delete(), this.di && this.di.delete(),
|
|
16953
|
+
this.fi && this.fi.delete();
|
|
16954
16954
|
}
|
|
16955
16955
|
drawOutline(t) {
|
|
16956
|
-
if (this.
|
|
16957
|
-
this.
|
|
16958
|
-
this.
|
|
16956
|
+
if (this.We && (this.painter && this.painter.outlineAll(t), this.di.outlineAll(t),
|
|
16957
|
+
this.fi.outlineAll(t)), this.lr) for (let e = 0; e < this.lr.length; e++) this.painter && this.painter.outline(t, this.lr[e]),
|
|
16958
|
+
this.di.outline(t, this.lr[e]), this.fi.outline(t, this.lr[e]);
|
|
16959
16959
|
}
|
|
16960
16960
|
outlineAll() {
|
|
16961
|
-
this.
|
|
16961
|
+
this.We = !0, this.setToRedraw();
|
|
16962
16962
|
}
|
|
16963
16963
|
outline(t) {
|
|
16964
16964
|
this.lr || (this.lr = []);
|
|
@@ -16973,12 +16973,12 @@
|
|
|
16973
16973
|
this.lr.push(e), this.setToRedraw();
|
|
16974
16974
|
}
|
|
16975
16975
|
cancelOutline() {
|
|
16976
|
-
delete this.
|
|
16976
|
+
delete this.We, delete this.lr, this.setToRedraw();
|
|
16977
16977
|
}
|
|
16978
16978
|
isEnableWorkAround(t) {
|
|
16979
16979
|
return "win-intel-gpu-crash" === t && (this.layer.options.workarounds["win-intel-gpu-crash"] && su(this.gl));
|
|
16980
16980
|
}
|
|
16981
|
-
|
|
16981
|
+
Re(t) {
|
|
16982
16982
|
return E(t, this.getMap());
|
|
16983
16983
|
}
|
|
16984
16984
|
}
|
|
@@ -17079,7 +17079,7 @@
|
|
|
17079
17079
|
buildMesh() {
|
|
17080
17080
|
let {features: t, center: e} = this.ji();
|
|
17081
17081
|
if (t = t.filter(t => !!t.properties[gu]), !t.length) return;
|
|
17082
|
-
const n = this.
|
|
17082
|
+
const n = this._i;
|
|
17083
17083
|
this.ur = e;
|
|
17084
17084
|
const i = S({}, this.painterSymbol), r = this.createMesh(this.painter, da, i, t, null, e);
|
|
17085
17085
|
this.ir = !0, r.then(t => {
|
|
@@ -17089,7 +17089,7 @@
|
|
|
17089
17089
|
e.push(...i);
|
|
17090
17090
|
for (let t = 0; t < i.length; t++) i[t].feaGroupIndex = 0, i[t].geometry.properties.originElements = i[t].geometry.properties.elements.slice();
|
|
17091
17091
|
}
|
|
17092
|
-
this.meshes = e, n && (this.
|
|
17092
|
+
this.meshes = e, n && (this._i = n), this.ir = !1, this.setToRedraw();
|
|
17093
17093
|
});
|
|
17094
17094
|
}
|
|
17095
17095
|
}), yu.registerRenderer("canvas", null);
|
|
@@ -17133,7 +17133,7 @@
|
|
|
17133
17133
|
buildMesh(t) {
|
|
17134
17134
|
const {features: e, center: n} = this.ji();
|
|
17135
17135
|
if (!e.length) return;
|
|
17136
|
-
const i = this.
|
|
17136
|
+
const i = this._i;
|
|
17137
17137
|
this.ur = n;
|
|
17138
17138
|
const r = this.cr(e), o = S({}, vu), s = r.map((e, i) => this.createMesh(this.painter, Ma, o, e, t && t[i], n));
|
|
17139
17139
|
this.ir = !0, Promise.all(s).then(t => {
|
|
@@ -17148,7 +17148,7 @@
|
|
|
17148
17148
|
n[i] = t[i].atlas;
|
|
17149
17149
|
}
|
|
17150
17150
|
}
|
|
17151
|
-
this.meshes = e, this.atlas = n, i && (this.
|
|
17151
|
+
this.meshes = e, this.atlas = n, i && (this._i = i), this.ir = !1, this.setToRedraw(),
|
|
17152
17152
|
this.layer.fire("buildmesh");
|
|
17153
17153
|
});
|
|
17154
17154
|
}
|
|
@@ -17159,7 +17159,7 @@
|
|
|
17159
17159
|
const n = this.painter.getRayCastData(t, e);
|
|
17160
17160
|
if (!n || !n.feature) return null;
|
|
17161
17161
|
const i = n.feature[Xl];
|
|
17162
|
-
return this.
|
|
17162
|
+
return this.ni[i];
|
|
17163
17163
|
}
|
|
17164
17164
|
cr(t) {
|
|
17165
17165
|
const e = [], n = [];
|
|
@@ -17746,7 +17746,7 @@
|
|
|
17746
17746
|
}(this.layer.options.material);
|
|
17747
17747
|
s && (o.uv = 1, 2 === s && (o.tangent = 1));
|
|
17748
17748
|
if (!t.length) return Promise.resolve([]);
|
|
17749
|
-
const a = Eu(t, o, 1 / 0, r, 1, this.
|
|
17749
|
+
const a = Eu(t, o, 1 / 0, r, 1, this.Ee, e, i, void 0, Float32Array), l = a.data.data.aPosition;
|
|
17750
17750
|
for (let t = 0; t < l.length; t += 3) l[t] -= n[0], l[t + 1] -= n[1];
|
|
17751
17751
|
return a;
|
|
17752
17752
|
}
|
|
@@ -19066,17 +19066,17 @@
|
|
|
19066
19066
|
return a || (a = o[s] = r ? w(t) : x(t)), a(n.getZoom(), i);
|
|
19067
19067
|
}
|
|
19068
19068
|
highlight(t) {
|
|
19069
|
-
this.
|
|
19069
|
+
this.kn = t, this.oo = this.layer.getRenderer().getFrameTimestamp(), this.setToRedraw(!0);
|
|
19070
19070
|
}
|
|
19071
19071
|
cancelAllHighlight() {
|
|
19072
|
-
this.
|
|
19072
|
+
this.kn = null, this.oo = this.layer.getRenderer().getFrameTimestamp(), this.setToRedraw(!0);
|
|
19073
19073
|
}
|
|
19074
19074
|
so(t, e) {
|
|
19075
19075
|
const {featureIds: n, pickingIdIndiceMap: i} = e;
|
|
19076
19076
|
t.properties.aFeaIds = n, t.properties.pickingIdIndiceMap = i;
|
|
19077
19077
|
}
|
|
19078
19078
|
Nr(t) {
|
|
19079
|
-
const {pickingIdIndiceMap: e} = t.geometry.properties, i = this.
|
|
19079
|
+
const {pickingIdIndiceMap: e} = t.geometry.properties, i = this.kn ? function(t, e, n) {
|
|
19080
19080
|
const {aPickingId: i, feaIdPickingMap: r, features: o} = t.geometry.properties, s = new Map, a = n.keys();
|
|
19081
19081
|
for (const t of a) {
|
|
19082
19082
|
const a = n.get(t);
|
|
@@ -19096,7 +19096,7 @@
|
|
|
19096
19096
|
}
|
|
19097
19097
|
}
|
|
19098
19098
|
return s;
|
|
19099
|
-
}(t, this.layer, this.
|
|
19099
|
+
}(t, this.layer, this.kn) : null;
|
|
19100
19100
|
n.HighlightUtil.highlightMesh(this.regl, t, i, this.oo, e);
|
|
19101
19101
|
}
|
|
19102
19102
|
Dr(t, e, n, i, r) {
|
|
@@ -23684,7 +23684,7 @@
|
|
|
23684
23684
|
Ep.registerAt(Fl), Wl.registerPainter("lit", Zf), Wl.registerPainter("icon", Wd),
|
|
23685
23685
|
Wl.registerPainter("fill", mh), Wl.registerPainter("line", vh), Wl.registerPainter("line-gradient", xh),
|
|
23686
23686
|
Wl.registerPainter("water", xp), Wl.registerPainter("tube", Qf), n.reshader.ShaderLib.register("vt_position_vert", "#ifdef HAS_TERRAIN_ALTITUDE\n attribute float aTerrainAltitude;\n#endif\n#ifdef HAS_ALTITUDE\n vec3 unpackVTPosition() {\n float altitude = aAltitude;\n #ifdef HAS_TERRAIN_ALTITUDE\n altitude += aTerrainAltitude * 100.0;\n #endif\n return vec3(aPosition, altitude);\n }\n#else\n float position_modValue = 16384.0;\n float position_delta = 0.00001;\n vec3 unpackVTPosition() {\n float z = aPosition.z;\n vec2 pos = sign(aPosition.xy + position_delta) * mod(abs(aPosition.xy), position_modValue);\n vec2 highs = floor(abs(aPosition.xy) / position_modValue);\n float altitude = sign(z + position_delta) * (highs.x * 2.0 + highs.y) * pow(2.0, 15.0) + z;\n #ifdef HAS_TERRAIN_ALTITUDE\n altitude += aTerrainAltitude * 100.0;\n #endif\n return vec3(pos, altitude);\n }\n#endif"),
|
|
23687
|
-
Fl.VERSION = "0.82.
|
|
23687
|
+
Fl.VERSION = "0.82.2", Wl.VERSION = "0.82.2";
|
|
23688
23688
|
if (o.mat4.create(), o.transcoders) {
|
|
23689
23689
|
const t = r.Map.VERSION;
|
|
23690
23690
|
if (t.indexOf("1.0.0-beta") >= 0 || t.indexOf("1.0.0-alpha") >= 0) {
|
|
@@ -23705,5 +23705,5 @@
|
|
|
23705
23705
|
t.VectorTileLayer = Fl, t.VectorTileLayerRenderer = pl, t.WaterPlugin = Ep, t.WireframePainter = Bf,
|
|
23706
23706
|
t.WireframePlugin = Ip, Object.defineProperty(t, "t", {
|
|
23707
23707
|
value: !0
|
|
23708
|
-
}), "undefined" != typeof console && console.log("@maptalks/vt v0.82.
|
|
23708
|
+
}), "undefined" != typeof console && console.log("@maptalks/vt v0.82.2");
|
|
23709
23709
|
}));
|