@antv/l7-layers 2.17.7 → 2.17.8
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/es/core/BaseLayer.js
CHANGED
|
@@ -594,7 +594,7 @@ var BaseLayer = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
|
|
|
594
594
|
Object.keys(options).forEach(function (key) {
|
|
595
595
|
if (
|
|
596
596
|
// 需要数据映射
|
|
597
|
-
[
|
|
597
|
+
[].concat(_toConsumableArray(_this6.enableShaderEncodeStyles), _toConsumableArray(_this6.enableDataEncodeStyles)).includes(key) && isPlainObject(options[key]) && (options[key].field || options[key].value) && !isEqual(_this6.encodeStyleAttribute[key], options[key]) // 防止计算属性重复计算
|
|
598
598
|
) {
|
|
599
599
|
_this6.encodeStyleAttribute[key] = options[key];
|
|
600
600
|
_this6.updateStyleAttribute(key, options[key].field, options[key].value);
|
package/es/core/BaseModel.js
CHANGED
|
@@ -237,6 +237,7 @@ var BaseModel = (_dec = lazyInject(TYPES.IGlobalConfigService), (_class = /*#__P
|
|
|
237
237
|
};
|
|
238
238
|
this.layer.enableShaderEncodeStyles.forEach(function (key) {
|
|
239
239
|
if (!_this.layer.encodeStyleAttribute[key]) {
|
|
240
|
+
// 没有设置样式映射
|
|
240
241
|
// @ts-ignore
|
|
241
242
|
var keyValue = _this.layer.getLayerConfig()[key];
|
|
242
243
|
var value = typeof keyValue === 'undefined' ? defualtValue[key] : keyValue;
|
|
@@ -18,6 +18,10 @@ var BaseTileLayer = /*#__PURE__*/function () {
|
|
|
18
18
|
_defineProperty(this, "initedTileset", false);
|
|
19
19
|
_defineProperty(this, "mapchange", function () {
|
|
20
20
|
var _this$tilesetManager;
|
|
21
|
+
// 图层不可见时,不触发加载瓦片
|
|
22
|
+
if (_this.parent.isVisible() === false) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
21
25
|
var _this$getCurrentView = _this.getCurrentView(),
|
|
22
26
|
latLonBounds = _this$getCurrentView.latLonBounds,
|
|
23
27
|
zoom = _this$getCurrentView.zoom;
|
|
@@ -81,6 +85,11 @@ var BaseTileLayer = /*#__PURE__*/function () {
|
|
|
81
85
|
this.bindTilesetEvent();
|
|
82
86
|
this.initedTileset = true;
|
|
83
87
|
}
|
|
88
|
+
|
|
89
|
+
// 图层不可见时,不触发加载瓦片
|
|
90
|
+
if (this.parent.isVisible() === false) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
84
93
|
var _this$getCurrentView2 = this.getCurrentView(),
|
|
85
94
|
latLonBounds = _this$getCurrentView2.latLonBounds,
|
|
86
95
|
zoom = _this$getCurrentView2.zoom;
|
package/lib/core/BaseLayer.js
CHANGED
|
@@ -600,7 +600,7 @@ var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
600
600
|
Object.keys(options).forEach(function (key) {
|
|
601
601
|
if (
|
|
602
602
|
// 需要数据映射
|
|
603
|
-
[
|
|
603
|
+
[].concat((0, _toConsumableArray2.default)(_this6.enableShaderEncodeStyles), (0, _toConsumableArray2.default)(_this6.enableDataEncodeStyles)).includes(key) && (0, _lodash.isPlainObject)(options[key]) && (options[key].field || options[key].value) && !(0, _lodash.isEqual)(_this6.encodeStyleAttribute[key], options[key]) // 防止计算属性重复计算
|
|
604
604
|
) {
|
|
605
605
|
_this6.encodeStyleAttribute[key] = options[key];
|
|
606
606
|
_this6.updateStyleAttribute(key, options[key].field, options[key].value);
|
package/lib/core/BaseModel.js
CHANGED
|
@@ -244,6 +244,7 @@ var BaseModel = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigServi
|
|
|
244
244
|
};
|
|
245
245
|
this.layer.enableShaderEncodeStyles.forEach(function (key) {
|
|
246
246
|
if (!_this.layer.encodeStyleAttribute[key]) {
|
|
247
|
+
// 没有设置样式映射
|
|
247
248
|
// @ts-ignore
|
|
248
249
|
var keyValue = _this.layer.getLayerConfig()[key];
|
|
249
250
|
var value = typeof keyValue === 'undefined' ? defualtValue[key] : keyValue;
|
|
@@ -25,6 +25,10 @@ var BaseTileLayer = /*#__PURE__*/function () {
|
|
|
25
25
|
(0, _defineProperty2.default)(this, "initedTileset", false);
|
|
26
26
|
(0, _defineProperty2.default)(this, "mapchange", function () {
|
|
27
27
|
var _this$tilesetManager;
|
|
28
|
+
// 图层不可见时,不触发加载瓦片
|
|
29
|
+
if (_this.parent.isVisible() === false) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
28
32
|
var _this$getCurrentView = _this.getCurrentView(),
|
|
29
33
|
latLonBounds = _this$getCurrentView.latLonBounds,
|
|
30
34
|
zoom = _this$getCurrentView.zoom;
|
|
@@ -88,6 +92,11 @@ var BaseTileLayer = /*#__PURE__*/function () {
|
|
|
88
92
|
this.bindTilesetEvent();
|
|
89
93
|
this.initedTileset = true;
|
|
90
94
|
}
|
|
95
|
+
|
|
96
|
+
// 图层不可见时,不触发加载瓦片
|
|
97
|
+
if (this.parent.isVisible() === false) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
91
100
|
var _this$getCurrentView2 = this.getCurrentView(),
|
|
92
101
|
latLonBounds = _this$getCurrentView2.latLonBounds,
|
|
93
102
|
zoom = _this$getCurrentView2.zoom;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-layers",
|
|
3
|
-
"version": "2.17.
|
|
3
|
+
"version": "2.17.8",
|
|
4
4
|
"description": "L7's collection of built-in layers",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@antv/async-hook": "^2.2.9",
|
|
30
|
-
"@antv/l7-core": "2.17.
|
|
31
|
-
"@antv/l7-maps": "2.17.
|
|
32
|
-
"@antv/l7-source": "2.17.
|
|
33
|
-
"@antv/l7-utils": "2.17.
|
|
30
|
+
"@antv/l7-core": "2.17.8",
|
|
31
|
+
"@antv/l7-maps": "2.17.8",
|
|
32
|
+
"@antv/l7-source": "2.17.8",
|
|
33
|
+
"@antv/l7-utils": "2.17.8",
|
|
34
34
|
"@babel/runtime": "^7.7.7",
|
|
35
35
|
"@mapbox/martini": "^0.2.0",
|
|
36
36
|
"@turf/clone": "^6.5.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"reflect-metadata": "^0.1.13"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@antv/l7-test-utils": "2.17.
|
|
56
|
+
"@antv/l7-test-utils": "2.17.8",
|
|
57
57
|
"@types/d3-array": "^2.0.0",
|
|
58
58
|
"@types/d3-color": "^1.2.2",
|
|
59
59
|
"@types/d3-interpolate": "1.1.6",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@types/gl-matrix": "^2.4.5",
|
|
63
63
|
"@types/lodash": "^4.14.138"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "f14e94a0dd40cba30d7aa51eb05b5ba6449cf766",
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
}
|