@maptalks/vt 0.50.2 → 0.51.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 +15 -14
- package/package.json +4 -4
package/dist/maptalks.vt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/vt v0.
|
|
2
|
+
* @maptalks/vt v0.51.0
|
|
3
3
|
* LICENSE : undefined
|
|
4
4
|
* (c) 2016-2021 maptalks.org
|
|
5
5
|
*/
|
|
@@ -10542,7 +10542,7 @@
|
|
|
10542
10542
|
this.Si !== t && (this.wi = !1, this.Oi());
|
|
10543
10543
|
const n = this.layer;
|
|
10544
10544
|
this.prepareCanvas(), this.ready && n.ready ? (this.plugins || this.Mi(), n.isDefaultRender() || this.plugins.length || this.featurePlugins.length ? (n.options.collision && (n.clearCollisionIndex(),
|
|
10545
|
-
n.clearBackgroundCollisionIndex()), this.Ii = t, this.Ci = this.Ti(this.getMap().
|
|
10545
|
+
n.clearBackgroundCollisionIndex()), this.Ii = t, this.Ci = this.Ti(this.getMap().getGLRes()),
|
|
10546
10546
|
this.Di = i || {}, this.Li(t), super.draw(t), this.Si !== t && this.Ui(t), this.Ei(t),
|
|
10547
10547
|
this.completeRender(), this.Si = t) : this.completeRender()) : this.completeRender();
|
|
10548
10548
|
}
|
|
@@ -10602,7 +10602,7 @@
|
|
|
10602
10602
|
}
|
|
10603
10603
|
getTileGLScale(t) {
|
|
10604
10604
|
const i = this.getMap();
|
|
10605
|
-
return this.layer.getSpatialReference().getResolution(t) / i.
|
|
10605
|
+
return this.layer.getSpatialReference().getResolution(t) / i.getGLRes();
|
|
10606
10606
|
}
|
|
10607
10607
|
Gi(t, i, n) {
|
|
10608
10608
|
if (!this.di[t]) return;
|
|
@@ -10964,7 +10964,7 @@
|
|
|
10964
10964
|
return e;
|
|
10965
10965
|
}
|
|
10966
10966
|
Ti(t) {
|
|
10967
|
-
return this.getMap().
|
|
10967
|
+
return this.getMap().distanceToPointAtRes(1e3, 0, t).x / 1e3 / 10;
|
|
10968
10968
|
}
|
|
10969
10969
|
debugFBO(t, i) {
|
|
10970
10970
|
const n = document.getElementById(t), e = i.width, r = i.height;
|
|
@@ -11342,7 +11342,7 @@
|
|
|
11342
11342
|
debugTile: this.options.debugTile,
|
|
11343
11343
|
altitudeProperty: this.options.altitudeProperty,
|
|
11344
11344
|
tileSize: this.options.tileSize,
|
|
11345
|
-
baseRes: t.
|
|
11345
|
+
baseRes: t.getGLRes(),
|
|
11346
11346
|
style: this.isDefaultRender() ? {
|
|
11347
11347
|
style: [],
|
|
11348
11348
|
featureStyle: []
|
|
@@ -11861,25 +11861,26 @@
|
|
|
11861
11861
|
});
|
|
11862
11862
|
const _r = new r.Point(0, 0), Pr = "_vector3dlayer_id";
|
|
11863
11863
|
function Sr(t, i, n) {
|
|
11864
|
-
const e = "__fea_idx".trim(), s = t.getMap(), o = s.
|
|
11864
|
+
const e = "__fea_idx".trim(), s = t.getMap(), o = s.getGLRes();
|
|
11865
11865
|
let h = t.getCoordinates();
|
|
11866
11866
|
const a = [];
|
|
11867
11867
|
let l = 1;
|
|
11868
11868
|
if (t instanceof r.Marker || t instanceof r.MultiPoint) {
|
|
11869
11869
|
t instanceof r.Marker && (h = [ h ]);
|
|
11870
|
-
for (let t = 0; t < h.length; t++) s.
|
|
11870
|
+
for (let t = 0; t < h.length; t++) s.coordToPointAtRes(h[t], o, _r), a.push([ _r.x, _r.y ]);
|
|
11871
11871
|
} else if (t instanceof r.LineString || t instanceof r.MultiLineString) {
|
|
11872
11872
|
l = 2, t instanceof r.LineString && (h = [ h ]);
|
|
11873
11873
|
for (let t = 0; t < h.length; t++) {
|
|
11874
11874
|
a[t] = [];
|
|
11875
|
-
for (let i = 0; i < h[t].length; i++) s.
|
|
11875
|
+
for (let i = 0; i < h[t].length; i++) s.coordToPointAtRes(h[t][i], o, _r), a[t].push([ _r.x, _r.y ]);
|
|
11876
11876
|
}
|
|
11877
11877
|
} else if (t instanceof r.Polygon || t instanceof r.MultiPolygon) {
|
|
11878
11878
|
l = 3, t instanceof r.Polygon && (h = [ h ]);
|
|
11879
11879
|
let i = 0;
|
|
11880
11880
|
for (let t = 0; t < h.length; t++) for (let n = 0; n < h[t].length; n++) {
|
|
11881
11881
|
a[i] = [];
|
|
11882
|
-
for (let e = 0; e < h[t][n].length; e++) s.
|
|
11882
|
+
for (let e = 0; e < h[t][n].length; e++) s.coordToPointAtRes(h[t][n][e], o, _r),
|
|
11883
|
+
a[i].push([ _r.x, _r.y ]);
|
|
11883
11884
|
i++;
|
|
11884
11885
|
}
|
|
11885
11886
|
}
|
|
@@ -12236,7 +12237,7 @@
|
|
|
12236
12237
|
}
|
|
12237
12238
|
draw(t, i) {
|
|
12238
12239
|
const n = this.layer;
|
|
12239
|
-
if (this.prepareCanvas(), this.Ci = this.Ti(this.getMap().
|
|
12240
|
+
if (this.prepareCanvas(), this.Ci = this.Ti(this.getMap().getGLRes()), this.Rn) this.buildMesh(),
|
|
12240
12241
|
this.Gn(), this.$n(), this.Wn = {}, this.Jn = !1, this.Rn = !1, this.qn = !1; else if (this.Jn) {
|
|
12241
12242
|
const t = this.atlas, i = this.Bn, n = this.Xn;
|
|
12242
12243
|
delete this.atlas, delete this.Bn, delete this.Xn, this.buildMesh(t), this.Gn(i),
|
|
@@ -12352,9 +12353,9 @@
|
|
|
12352
12353
|
Object.defineProperty(n, "tileResolution", {
|
|
12353
12354
|
enumerable: !0,
|
|
12354
12355
|
get: function() {
|
|
12355
|
-
return i.
|
|
12356
|
+
return i.getGLRes();
|
|
12356
12357
|
}
|
|
12357
|
-
}), n.tileRatio = 1, n.z =
|
|
12358
|
+
}), n.tileRatio = 1, n.z = 1, n.tileExtent = 1;
|
|
12358
12359
|
}
|
|
12359
12360
|
oe(t) {
|
|
12360
12361
|
return "win-intel-gpu-crash" === t && (this.layer.options.workarounds["win-intel-gpu-crash"] && Rr(this.gl));
|
|
@@ -12982,7 +12983,7 @@
|
|
|
12982
12983
|
updateMesh(t) {
|
|
12983
12984
|
return this.ge(t, this.meshes, this.atlas, this.Te, this.painter, De, Br, this.De);
|
|
12984
12985
|
}
|
|
12985
|
-
}), qr.registerRenderer("canvas", null), mr.VERSION = "0.
|
|
12986
|
+
}), qr.registerRenderer("canvas", null), mr.VERSION = "0.51.0", kr.VERSION = "0.51.0",
|
|
12986
12987
|
t.GeoJSONVectorTileLayer = Ar, t.LineStringLayer = Jr, t.MapboxVectorTileLayer = xr,
|
|
12987
12988
|
t.PackUtil = Ge, t.PointLayer = $r, t.PolygonLayer = qr, t.SYMBOLS_NEED_REBUILD_IN_VECTOR = qe,
|
|
12988
12989
|
t.SYMBOLS_NEED_REBUILD_IN_VT = Je, t.Vector3DLayer = kr, t.VectorTileLayer = mr,
|
|
@@ -12990,5 +12991,5 @@
|
|
|
12990
12991
|
value: !0
|
|
12991
12992
|
});
|
|
12992
12993
|
}));
|
|
12993
|
-
o.mat4.create(), "undefined" != typeof console && console.log("@maptalks/vt v0.
|
|
12994
|
+
o.mat4.create(), "undefined" != typeof console && console.log("@maptalks/vt v0.51.0");
|
|
12994
12995
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maptalks/vt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "The vector-tile plugin for maptalks.js",
|
|
5
5
|
"main": "dist/maptalks.vt.js",
|
|
6
6
|
"browser": "dist/maptalks.vt.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@maptalks/function-type": "^1.2.3",
|
|
26
26
|
"@maptalks/gl": "<2.0.0",
|
|
27
27
|
"@maptalks/tbn-packer": "^1.2.6",
|
|
28
|
-
"@maptalks/vector-packer": "^0.
|
|
29
|
-
"@maptalks/vt-plugin": "^0.
|
|
28
|
+
"@maptalks/vector-packer": "^0.51.0",
|
|
29
|
+
"@maptalks/vt-plugin": "^0.51.0",
|
|
30
30
|
"color": "^3.0.0",
|
|
31
31
|
"earcut": "^2.2.1",
|
|
32
32
|
"fast-deep-equal": "^2.0.1",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"electron-mocha": "^6.0.4",
|
|
49
49
|
"eslint": "^7.32.0",
|
|
50
50
|
"eslint-plugin-mocha": "^9.0.0",
|
|
51
|
-
"maptalks": "^1.0.0-
|
|
51
|
+
"maptalks": "^1.0.0-beta.1",
|
|
52
52
|
"mocha": "^9.0.3",
|
|
53
53
|
"rollup": "^2.56.2",
|
|
54
54
|
"rollup-plugin-terser": "^5.3.1"
|