@maptalks/vt 0.72.1 → 0.72.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.js +6 -8
- package/dist/maptalks.vt.mjs +6 -8
- package/package.json +1 -1
package/dist/maptalks.vt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/vt v0.72.
|
|
2
|
+
* @maptalks/vt v0.72.2
|
|
3
3
|
* LICENSE : undefined
|
|
4
4
|
* (c) 2016-2022 maptalks.org
|
|
5
5
|
*/
|
|
@@ -14738,19 +14738,17 @@
|
|
|
14738
14738
|
return this.removeRenderStyle(e);
|
|
14739
14739
|
}
|
|
14740
14740
|
addFeatureStyle(t) {
|
|
14741
|
-
|
|
14742
|
-
const e = t.id;
|
|
14743
|
-
return this.updateFeatureStyleById(e, t.style), this;
|
|
14741
|
+
return t ? (this.updateFeatureStyleById(t), this) : this;
|
|
14744
14742
|
}
|
|
14745
14743
|
updateFeatureStyleById(t) {
|
|
14746
14744
|
if (!t) return this;
|
|
14747
14745
|
const e = t.id;
|
|
14748
14746
|
if (_(e)) return this;
|
|
14749
|
-
const i = this.getFeatureStyleIndex(e), n = this.ui;
|
|
14747
|
+
const i = this.getFeatureStyleIndex(e), n = this.ui || [];
|
|
14750
14748
|
return i < 0 ? n.push(t) : n[i] = t, this.ai({
|
|
14751
14749
|
$root: this.li,
|
|
14752
14750
|
style: this.di,
|
|
14753
|
-
featureStyle:
|
|
14751
|
+
featureStyle: n
|
|
14754
14752
|
}), this;
|
|
14755
14753
|
}
|
|
14756
14754
|
removeFeatureStyleById(t) {
|
|
@@ -21762,7 +21760,7 @@
|
|
|
21762
21760
|
gd.registerAt(ga), Ia.registerPainter("lit", Dh), Ia.registerPainter("icon", Dc),
|
|
21763
21761
|
Ia.registerPainter("fill", fu), Ia.registerPainter("line", mu), Ia.registerPainter("line-gradient", yu),
|
|
21764
21762
|
Ia.registerPainter("water", id), Ia.registerPainter("tube", Hh), i.reshader.ShaderLib.register("vt_position_vert", "#ifdef HAS_ALTITUDE\n vec3 unpackVTPosition() {\n return vec3(aPosition, aAltitude);\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 return vec3(pos, altitude);\n }\n#endif"),
|
|
21765
|
-
ga.VERSION = "0.72.
|
|
21763
|
+
ga.VERSION = "0.72.2", Ia.VERSION = "0.72.2";
|
|
21766
21764
|
if (o.mat4.create(), o.transcoders) {
|
|
21767
21765
|
const t = r.Map.VERSION;
|
|
21768
21766
|
if (t.indexOf("1.0.0-beta") >= 0 || t.indexOf("1.0.0-alpha") >= 0) {
|
|
@@ -21783,5 +21781,5 @@
|
|
|
21783
21781
|
t.VectorTileLayerRenderer = na, t.WaterPlugin = gd, t.WireframePainter = Eh, t.WireframePlugin = hd,
|
|
21784
21782
|
Object.defineProperty(t, "t", {
|
|
21785
21783
|
value: !0
|
|
21786
|
-
}), "undefined" != typeof console && console.log("@maptalks/vt v0.72.
|
|
21784
|
+
}), "undefined" != typeof console && console.log("@maptalks/vt v0.72.2");
|
|
21787
21785
|
}));
|
package/dist/maptalks.vt.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/vt v0.72.
|
|
2
|
+
* @maptalks/vt v0.72.2
|
|
3
3
|
* LICENSE : undefined
|
|
4
4
|
* (c) 2016-2022 maptalks.org
|
|
5
5
|
*/
|
|
@@ -1630,19 +1630,17 @@ class vt extends t.TileLayer {
|
|
|
1630
1630
|
return this.removeRenderStyle(e);
|
|
1631
1631
|
}
|
|
1632
1632
|
addFeatureStyle(t) {
|
|
1633
|
-
|
|
1634
|
-
const e = t.id;
|
|
1635
|
-
return this.updateFeatureStyleById(e, t.style), this;
|
|
1633
|
+
return t ? (this.updateFeatureStyleById(t), this) : this;
|
|
1636
1634
|
}
|
|
1637
1635
|
updateFeatureStyleById(t) {
|
|
1638
1636
|
if (!t) return this;
|
|
1639
1637
|
const e = t.id;
|
|
1640
1638
|
if (G(e)) return this;
|
|
1641
|
-
const i = this.getFeatureStyleIndex(e), n = this.Bt;
|
|
1639
|
+
const i = this.getFeatureStyleIndex(e), n = this.Bt || [];
|
|
1642
1640
|
return i < 0 ? n.push(t) : n[i] = t, this.qt({
|
|
1643
1641
|
$root: this.Gt,
|
|
1644
1642
|
style: this.Yt,
|
|
1645
|
-
featureStyle:
|
|
1643
|
+
featureStyle: n
|
|
1646
1644
|
}), this;
|
|
1647
1645
|
}
|
|
1648
1646
|
removeFeatureStyleById(t) {
|
|
@@ -8719,7 +8717,7 @@ const ro = ae("water", qr);
|
|
|
8719
8717
|
ro.registerAt(vt), It.registerPainter("lit", kr), It.registerPainter("icon", An),
|
|
8720
8718
|
It.registerPainter("fill", Ze), It.registerPainter("line", Qe), It.registerPainter("line-gradient", ti),
|
|
8721
8719
|
It.registerPainter("water", qr), It.registerPainter("tube", Mr), i.ShaderLib.register("vt_position_vert", "#ifdef HAS_ALTITUDE\n vec3 unpackVTPosition() {\n return vec3(aPosition, aAltitude);\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 return vec3(pos, altitude);\n }\n#endif"),
|
|
8722
|
-
vt.VERSION = "0.72.
|
|
8720
|
+
vt.VERSION = "0.72.2", It.VERSION = "0.72.2";
|
|
8723
8721
|
|
|
8724
8722
|
if (e.mat4.create(), e.transcoders) {
|
|
8725
8723
|
const i = t.Map.VERSION;
|
|
@@ -8733,4 +8731,4 @@ if (e.mat4.create(), e.transcoders) {
|
|
|
8733
8731
|
|
|
8734
8732
|
export { Ze as FillPainter, Wr as FillPlugin, eo as GLTFPhongPlugin, io as GLTFStandardPlugin, Tt as GeoJSONVectorTileLayer, no as HeatmapPlugin, An as IconPainter, Xr as IconPlugin, $r as LineGradientPlugin, Qe as LinePainter, Br as LinePlugin, te as LineStringLayer, Qr as LitPlugin, kt as MapboxVectorTileLayer, fr as NativeLinePainter, Jr as NativeLinePlugin, ur as NativePointPainter, xr as PhongPainter, Zr as PhongPlugin, Qt as PointLayer, ie as PolygonLayer, sr as TextPainter, Yr as TextPlugin, to as TubePlugin, It as Vector3DLayer, vt as VectorTileLayer, lt as VectorTileLayerRenderer, ro as WaterPlugin, Ar as WireframePainter, Kr as WireframePlugin };
|
|
8735
8733
|
|
|
8736
|
-
"undefined" != typeof console && console.log("@maptalks/vt v0.72.
|
|
8734
|
+
"undefined" != typeof console && console.log("@maptalks/vt v0.72.2");
|