@antv/l7-layers 2.13.5 → 2.13.7

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.
Files changed (125) hide show
  1. package/es/Geometry/models/billboard.js +2 -6
  2. package/es/Geometry/models/plane.js +2 -6
  3. package/es/Geometry/models/sprite.js +2 -6
  4. package/es/citybuliding/models/build.js +2 -6
  5. package/es/core/BaseLayer.d.ts +3 -1
  6. package/es/core/BaseLayer.js +37 -6
  7. package/es/earth/models/atmosphere.js +2 -6
  8. package/es/earth/models/base.js +2 -6
  9. package/es/earth/models/bloomsphere.js +2 -6
  10. package/es/heatmap/models/grid.js +2 -6
  11. package/es/heatmap/models/grid3d.js +2 -6
  12. package/es/heatmap/models/heatmap.js +2 -6
  13. package/es/heatmap/models/hexagon.js +2 -6
  14. package/es/image/models/image.js +2 -6
  15. package/es/index.d.ts +1 -1
  16. package/es/index.js +2 -2
  17. package/es/line/models/arc.js +2 -6
  18. package/es/line/models/arc_3d.js +2 -6
  19. package/es/line/models/earthArc_3d.js +2 -6
  20. package/es/line/models/great_circle.js +2 -6
  21. package/es/line/models/half.js +2 -6
  22. package/es/line/models/line.d.ts +1 -0
  23. package/es/line/models/line.js +13 -7
  24. package/es/line/models/linearline.js +2 -6
  25. package/es/line/models/simpleLine.js +2 -6
  26. package/es/line/models/wall.js +2 -6
  27. package/es/mask/models/fill.js +6 -7
  28. package/es/plugins/DataMappingPlugin.js +13 -6
  29. package/es/plugins/DataSourcePlugin.js +14 -9
  30. package/es/plugins/FeatureScalePlugin.js +13 -7
  31. package/es/plugins/LayerModelPlugin.d.ts +1 -0
  32. package/es/plugins/LayerModelPlugin.js +68 -40
  33. package/es/point/models/earthExtrude.js +2 -6
  34. package/es/point/models/earthFill.js +2 -6
  35. package/es/point/models/extrude.js +2 -6
  36. package/es/point/models/normal.js +5 -7
  37. package/es/point/models/radar.js +3 -7
  38. package/es/point/models/simplePoint.js +2 -6
  39. package/es/polygon/models/extrude.js +4 -8
  40. package/es/polygon/models/fill.js +2 -6
  41. package/es/polygon/models/ocean.js +2 -6
  42. package/es/polygon/models/water.js +2 -6
  43. package/es/raster/models/raster.js +3 -7
  44. package/es/raster/models/rasterRgb.js +5 -9
  45. package/es/raster/models/rasterTerrainRgb.js +3 -7
  46. package/es/tile/manager/base.d.ts +1 -1
  47. package/es/tile/manager/base.js +16 -4
  48. package/es/tile/service/TileLayerService.d.ts +3 -3
  49. package/es/tile/service/TileLayerService.js +16 -18
  50. package/es/tile/service/TilePickService.d.ts +2 -2
  51. package/es/tile/service/TileSourceService.js +1 -1
  52. package/es/tile/tileFactory/DebugTile.js +3 -3
  53. package/es/tile/tileFactory/ImageTile.js +1 -0
  54. package/es/tile/tileFactory/MaskTile.js +5 -1
  55. package/es/tile/tileFactory/RasterRGBTile.js +1 -0
  56. package/es/tile/tileFactory/RasterTerrainRGBTile.js +1 -0
  57. package/es/tile/tileFactory/RasterTile.js +3 -2
  58. package/es/tile/tileFactory/Tile.d.ts +1 -0
  59. package/es/tile/tileFactory/Tile.js +5 -3
  60. package/es/tile/tileFactory/VectorTile.js +4 -4
  61. package/es/tile/tileFactory/index.d.ts +4 -4
  62. package/es/tile/tileFactory/index.js +4 -4
  63. package/es/tile/tileFactory/layers/TileDebugLayer.js +3 -0
  64. package/es/tile/tileFactory/util.d.ts +1 -1
  65. package/es/tile/tileFactory/util.js +1 -1
  66. package/es/tile/tileLayer/BaseLayer.d.ts +1 -1
  67. package/es/tile/tileLayer/BaseLayer.js +6 -4
  68. package/es/wind/models/wind.js +2 -6
  69. package/lib/Geometry/models/billboard.js +2 -6
  70. package/lib/Geometry/models/plane.js +2 -6
  71. package/lib/Geometry/models/sprite.js +2 -6
  72. package/lib/citybuliding/models/build.js +2 -6
  73. package/lib/core/BaseLayer.js +36 -5
  74. package/lib/earth/models/atmosphere.js +2 -6
  75. package/lib/earth/models/base.js +2 -6
  76. package/lib/earth/models/bloomsphere.js +2 -6
  77. package/lib/heatmap/models/grid.js +2 -6
  78. package/lib/heatmap/models/grid3d.js +2 -6
  79. package/lib/heatmap/models/heatmap.js +2 -6
  80. package/lib/heatmap/models/hexagon.js +2 -6
  81. package/lib/image/models/image.js +2 -6
  82. package/lib/line/models/arc.js +2 -6
  83. package/lib/line/models/arc_3d.js +2 -6
  84. package/lib/line/models/earthArc_3d.js +2 -6
  85. package/lib/line/models/great_circle.js +2 -6
  86. package/lib/line/models/half.js +2 -6
  87. package/lib/line/models/line.js +12 -7
  88. package/lib/line/models/linearline.js +2 -6
  89. package/lib/line/models/simpleLine.js +2 -6
  90. package/lib/line/models/wall.js +2 -6
  91. package/lib/mask/models/fill.js +6 -7
  92. package/lib/plugins/DataMappingPlugin.js +12 -5
  93. package/lib/plugins/DataSourcePlugin.js +13 -8
  94. package/lib/plugins/FeatureScalePlugin.js +12 -6
  95. package/lib/plugins/LayerModelPlugin.js +69 -40
  96. package/lib/point/models/earthExtrude.js +2 -6
  97. package/lib/point/models/earthFill.js +2 -6
  98. package/lib/point/models/extrude.js +2 -6
  99. package/lib/point/models/normal.js +5 -7
  100. package/lib/point/models/radar.js +4 -8
  101. package/lib/point/models/simplePoint.js +2 -6
  102. package/lib/polygon/models/extrude.js +4 -8
  103. package/lib/polygon/models/fill.js +2 -6
  104. package/lib/polygon/models/ocean.js +2 -6
  105. package/lib/polygon/models/water.js +2 -6
  106. package/lib/raster/models/raster.js +2 -6
  107. package/lib/raster/models/rasterRgb.js +5 -9
  108. package/lib/raster/models/rasterTerrainRgb.js +2 -6
  109. package/lib/tile/manager/base.js +16 -4
  110. package/lib/tile/service/TileLayerService.js +16 -18
  111. package/lib/tile/service/TileSourceService.js +1 -1
  112. package/lib/tile/tileFactory/DebugTile.js +3 -3
  113. package/lib/tile/tileFactory/ImageTile.js +1 -0
  114. package/lib/tile/tileFactory/MaskTile.js +5 -1
  115. package/lib/tile/tileFactory/RasterRGBTile.js +1 -0
  116. package/lib/tile/tileFactory/RasterTerrainRGBTile.js +1 -0
  117. package/lib/tile/tileFactory/RasterTile.js +4 -3
  118. package/lib/tile/tileFactory/Tile.js +5 -3
  119. package/lib/tile/tileFactory/VectorTile.js +5 -5
  120. package/lib/tile/tileFactory/index.js +5 -5
  121. package/lib/tile/tileFactory/layers/TileDebugLayer.js +3 -0
  122. package/lib/tile/tileFactory/util.js +2 -2
  123. package/lib/tile/tileLayer/BaseLayer.js +7 -5
  124. package/lib/wind/models/wind.js +2 -6
  125. package/package.json +7 -6
@@ -11,7 +11,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
11
11
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
12
 
13
13
  import { AttributeType, gl } from '@antv/l7-core';
14
- import { getMask, getDefaultDomain } from '@antv/l7-utils';
14
+ import { getDefaultDomain, getMask } from '@antv/l7-utils';
15
15
  import BaseModel from "../../core/BaseModel";
16
16
  import { RasterImageTriangulation } from "../../core/triangulation";
17
17
 
@@ -136,13 +136,9 @@ var RasterTerrainRGB = /*#__PURE__*/function (_BaseModel) {
136
136
  while (1) {
137
137
  switch (_context2.prev = _context2.next) {
138
138
  case 0:
139
- _context2.next = 2;
140
- return this.initModels();
139
+ return _context2.abrupt("return", this.initModels());
141
140
 
142
- case 2:
143
- return _context2.abrupt("return", _context2.sent);
144
-
145
- case 3:
141
+ case 1:
146
142
  case "end":
147
143
  return _context2.stop();
148
144
  }
@@ -1,4 +1,4 @@
1
- import { ILayer, IRendererService, IMapService, ISubLayerInitOptions, ILayerService } from '@antv/l7-core';
1
+ import { ILayer, ILayerService, IMapService, IRendererService, ISubLayerInitOptions } from '@antv/l7-core';
2
2
  import { SourceTile } from '@antv/l7-utils';
3
3
  export declare class Base {
4
4
  sourceLayer: string;
@@ -177,7 +177,10 @@ export var Base = /*#__PURE__*/function () {
177
177
  }, {
178
178
  key: "getLayers",
179
179
  value: function getLayers(tile) {
180
- if (!tile) return [];
180
+ if (!tile) {
181
+ return [];
182
+ }
183
+
181
184
  return this.tileLayerCache.get(tile.key) || [];
182
185
  }
183
186
  }, {
@@ -223,7 +226,10 @@ export var Base = /*#__PURE__*/function () {
223
226
  key: "updateTileVisible",
224
227
  value: function updateTileVisible(tile, layerService) {
225
228
  var layers = this.getLayers(tile);
226
- if (layers.length === 0) return;
229
+
230
+ if (layers.length === 0) {
231
+ return;
232
+ }
227
233
 
228
234
  if (tile.isVisible) {
229
235
  // 如果可见直接进行渲染,父级发
@@ -262,7 +268,10 @@ export var Base = /*#__PURE__*/function () {
262
268
  }, {
263
269
  key: "isTileLoaded",
264
270
  value: function isTileLoaded(tile) {
265
- if (tile.isLoad) return true;
271
+ if (tile.isLoad) {
272
+ return true;
273
+ }
274
+
266
275
  var isLoad = this.getLayers(tile).length === tile.loadedLayers;
267
276
  tile.isLoad = isLoad;
268
277
  return isLoad;
@@ -272,7 +281,10 @@ export var Base = /*#__PURE__*/function () {
272
281
  value: function isTileChildLoaded(tile) {
273
282
  var _this2 = this;
274
283
 
275
- if (tile.isChildLoad) return true;
284
+ if (tile.isChildLoad) {
285
+ return true;
286
+ }
287
+
276
288
  var children = tile.children;
277
289
  var isLoad = children.filter(function (child) {
278
290
  return _this2.isTileLoaded(child);
@@ -1,7 +1,7 @@
1
1
  import { ILayer, ILayerService, ILngLat, IRendererService, ITile } from '@antv/l7-core';
2
2
  import { SourceTile } from '@antv/l7-utils';
3
3
  import 'reflect-metadata';
4
- interface TileLayerServiceOptions {
4
+ interface ITileLayerServiceOptions {
5
5
  rendererService: IRendererService;
6
6
  layerService: ILayerService;
7
7
  parent: ILayer;
@@ -14,8 +14,8 @@ export declare class TileLayerService {
14
14
  private rendererService;
15
15
  private layerService;
16
16
  private parent;
17
- private _tiles;
18
- constructor({ rendererService, layerService, parent }: TileLayerServiceOptions);
17
+ private layerTiles;
18
+ constructor({ rendererService, layerService, parent, }: ITileLayerServiceOptions);
19
19
  get tiles(): ITile[];
20
20
  hasTile(tileKey: string): boolean;
21
21
  addTile(tile: ITile): void;
@@ -18,7 +18,7 @@ export var TileLayerService = /*#__PURE__*/function () {
18
18
 
19
19
  _defineProperty(this, "tileResource", new Map());
20
20
 
21
- _defineProperty(this, "_tiles", []);
21
+ _defineProperty(this, "layerTiles", []);
22
22
 
23
23
  this.rendererService = rendererService;
24
24
  this.layerService = layerService;
@@ -28,24 +28,24 @@ export var TileLayerService = /*#__PURE__*/function () {
28
28
  _createClass(TileLayerService, [{
29
29
  key: "tiles",
30
30
  get: function get() {
31
- return this._tiles;
31
+ return this.layerTiles;
32
32
  }
33
33
  }, {
34
34
  key: "hasTile",
35
35
  value: function hasTile(tileKey) {
36
- return this._tiles.some(function (tile) {
36
+ return this.layerTiles.some(function (tile) {
37
37
  return tile.key === tileKey;
38
38
  });
39
39
  }
40
40
  }, {
41
41
  key: "addTile",
42
42
  value: function addTile(tile) {
43
- this._tiles.push(tile);
43
+ this.layerTiles.push(tile);
44
44
  }
45
45
  }, {
46
46
  key: "getTile",
47
47
  value: function getTile(tileKey) {
48
- return this._tiles.find(function (tile) {
48
+ return this.layerTiles.find(function (tile) {
49
49
  return tile.key === tileKey;
50
50
  });
51
51
  }
@@ -53,20 +53,21 @@ export var TileLayerService = /*#__PURE__*/function () {
53
53
  key: "getVisibleTileBylngLat",
54
54
  value: function getVisibleTileBylngLat(lngLat) {
55
55
  // 加载完成 & 可见 & 鼠标选中
56
- return this._tiles.find(function (tile) {
56
+ return this.layerTiles.find(function (tile) {
57
57
  return tile.isLoaded && tile.visible && tile.lnglatInBounds(lngLat);
58
58
  });
59
59
  }
60
60
  }, {
61
61
  key: "removeTile",
62
62
  value: function removeTile(tileKey) {
63
- var index = this._tiles.findIndex(function (tile) {
64
- return tile.key === tileKey;
63
+ var index = this.layerTiles.findIndex(function (t) {
64
+ return t.key === tileKey;
65
65
  });
66
+ var tile = this.layerTiles.splice(index, 1);
66
67
 
67
- var tile = this._tiles.splice(index, 1);
68
-
69
- tile[0] && tile[0].destroy();
68
+ if (tile[0]) {
69
+ tile[0].destroy();
70
+ }
70
71
  }
71
72
  }, {
72
73
  key: "updateTileVisible",
@@ -177,10 +178,9 @@ export var TileLayerService = /*#__PURE__*/function () {
177
178
  }, {
178
179
  key: "getRenderLayers",
179
180
  value: function getRenderLayers() {
180
- var tileList = this._tiles.filter(function (t) {
181
+ var tileList = this.layerTiles.filter(function (t) {
181
182
  return t.visible && t.isLoaded;
182
183
  });
183
-
184
184
  var layers = [];
185
185
  tileList.map(function (tile) {
186
186
  return layers.push.apply(layers, _toConsumableArray(tile.getLayers()));
@@ -190,10 +190,9 @@ export var TileLayerService = /*#__PURE__*/function () {
190
190
  }, {
191
191
  key: "getLayers",
192
192
  value: function getLayers() {
193
- var tileList = this._tiles.filter(function (t) {
193
+ var tileList = this.layerTiles.filter(function (t) {
194
194
  return t.isLoaded;
195
195
  });
196
-
197
196
  var layers = [];
198
197
  tileList.map(function (tile) {
199
198
  return layers.push.apply(layers, _toConsumableArray(tile.getLayers()));
@@ -203,15 +202,14 @@ export var TileLayerService = /*#__PURE__*/function () {
203
202
  }, {
204
203
  key: "getTiles",
205
204
  value: function getTiles() {
206
- return this._tiles;
205
+ return this.layerTiles;
207
206
  }
208
207
  }, {
209
208
  key: "destroy",
210
209
  value: function destroy() {
211
- this._tiles.forEach(function (t) {
210
+ this.layerTiles.forEach(function (t) {
212
211
  return t.destroy();
213
212
  });
214
-
215
213
  this.tileResource.clear();
216
214
  }
217
215
  }]);
@@ -1,4 +1,4 @@
1
- import { ILayerService, ITilePickService, IInteractionTarget, ILayer } from '@antv/l7-core';
1
+ import { IInteractionTarget, ILayer, ILayerService, ITilePickService } from '@antv/l7-core';
2
2
  import { TileLayerService } from './TileLayerService';
3
3
  export interface ITilePickServiceOptions {
4
4
  layerService: ILayerService;
@@ -11,7 +11,7 @@ export declare class TilePickService implements ITilePickService {
11
11
  private tileSourceService;
12
12
  private parent;
13
13
  private tilePickID;
14
- constructor({ layerService, tileLayerService, parent }: ITilePickServiceOptions);
14
+ constructor({ layerService, tileLayerService, parent, }: ITilePickServiceOptions);
15
15
  pickRender(target: IInteractionTarget): void;
16
16
  pick(layer: ILayer, target: IInteractionTarget): boolean;
17
17
  selectFeature(pickedColors: Uint8Array | undefined): void;
@@ -18,7 +18,7 @@ export var TileSourceService = /*#__PURE__*/function () {
18
18
  var p = null;
19
19
  var properties = features[0];
20
20
  features.map(function (feature) {
21
- var polygon = turf.polygon(feature.coordinates);
21
+ var polygon = turf.polygon(feature.coordinates); // tslint:disable-next-line: prefer-conditional-expression
22
22
 
23
23
  if (p === null) {
24
24
  p = polygon;
@@ -10,9 +10,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
10
10
 
11
11
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
12
 
13
- import Tile from "./Tile";
14
- import PointLayer from "../../point";
15
13
  import LineLayer from "../../line";
14
+ import PointLayer from "../../point";
15
+ import Tile from "./Tile";
16
16
 
17
17
  var DebugTile = /*#__PURE__*/function (_Tile) {
18
18
  _inherits(DebugTile, _Tile);
@@ -78,7 +78,7 @@ var DebugTile = /*#__PURE__*/function (_Tile) {
78
78
  key: "getSourceOption",
79
79
  value: function getSourceOption() {
80
80
  var rawSource = this.parent.getSource();
81
- var features = this.sourceTile.data.layers['testTile'].features;
81
+ var features = this.sourceTile.data.layers.testTile.features;
82
82
  return {
83
83
  data: {
84
84
  type: 'FeatureCollection',
@@ -38,6 +38,7 @@ var ImageTile = /*#__PURE__*/function (_Tile) {
38
38
  layerOptions = this.getLayerOptions();
39
39
  sourceOptions = this.getSourceOption();
40
40
  layer = new ImageLayer(_objectSpread({}, layerOptions)).source(sourceOptions.data, sourceOptions.options); // 初始化数据映射
41
+ // tslint:disable-next-line: no-unused-expression
41
42
 
42
43
  attributes && Object.keys(attributes).forEach(function (type) {
43
44
  var _attributes$attr, _attributes$attr2;
@@ -38,6 +38,7 @@ var MaskTile = /*#__PURE__*/function (_Tile) {
38
38
  layerOptions = this.getLayerOptions();
39
39
  sourceOptions = this.getSourceOption();
40
40
  layer = new MaskLayer(_objectSpread({}, layerOptions)).source(sourceOptions.data, sourceOptions.options); // 初始化数据映射
41
+ // tslint:disable-next-line: no-unused-expression
41
42
 
42
43
  attributes && Object.keys(attributes).forEach(function (type) {
43
44
  var _attributes$attr, _attributes$attr2;
@@ -69,7 +70,10 @@ var MaskTile = /*#__PURE__*/function (_Tile) {
69
70
  }, {
70
71
  key: "getFeatures",
71
72
  value: function getFeatures(sourceLayer) {
72
- if (!sourceLayer) return [];
73
+ if (!sourceLayer) {
74
+ return [];
75
+ }
76
+
73
77
  var source = this.sourceTile.data;
74
78
  return source.getTileData(sourceLayer);
75
79
  }
@@ -40,6 +40,7 @@ var RasterTile = /*#__PURE__*/function (_Tile) {
40
40
  layerOptions = this.getLayerOptions();
41
41
  sourceOptions = this.getSourceOption();
42
42
  layer = new RasterLayer(_objectSpread({}, layerOptions)).source(sourceOptions.data, sourceOptions.options); // 初始化数据映射
43
+ // tslint:disable-next-line: no-unused-expression
43
44
 
44
45
  attributes && Object.keys(attributes).forEach(function (type) {
45
46
  var _attributes$attr, _attributes$attr2;
@@ -38,6 +38,7 @@ var RasterTerrainRGBTile = /*#__PURE__*/function (_Tile) {
38
38
  layerOptions = this.getLayerOptions();
39
39
  sourceOptions = this.getSourceOption();
40
40
  layer = new RasterLayer(_objectSpread({}, layerOptions)).source(sourceOptions.data, sourceOptions.options); // 初始化数据映射
41
+ // tslint:disable-next-line: no-unused-expression
41
42
 
42
43
  attributes && Object.keys(attributes).forEach(function (type) {
43
44
  var _attributes$attr, _attributes$attr2;
@@ -13,9 +13,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
13
13
 
14
14
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
15
15
 
16
+ import { getDefaultDomain } from '@antv/l7-utils';
16
17
  import RasterLayer from "../../raster";
17
18
  import Tile from "./Tile";
18
- import { getDefaultDomain } from '@antv/l7-utils';
19
19
  var DEFAULT_COLOR_TEXTURE_OPTION = {
20
20
  positions: [0, 1],
21
21
  colors: ['#000', '#fff']
@@ -50,6 +50,7 @@ var RasterTile = /*#__PURE__*/function (_Tile) {
50
50
  layer = new RasterLayer(_objectSpread(_objectSpread({}, layerOptions), {}, {
51
51
  colorTexture: this.colorTexture
52
52
  })).source(sourceOptions.data, sourceOptions.options); // 初始化数据映射
53
+ // tslint:disable-next-line: no-unused-expression
53
54
 
54
55
  attributes && Object.keys(attributes).forEach(function (type) {
55
56
  var _attributes$attr, _attributes$attr2;
@@ -100,7 +101,7 @@ var RasterTile = /*#__PURE__*/function (_Tile) {
100
101
  }
101
102
  /**
102
103
  * 用于 style 更新 colorTexture 的优化
103
- * @param arg
104
+ * @param arg
104
105
  */
105
106
 
106
107
  }, {
@@ -80,6 +80,7 @@ export default abstract class Tile implements ITile {
80
80
  animate?: boolean | undefined;
81
81
  pickBufferScale?: number | undefined;
82
82
  stencil?: boolean | undefined;
83
+ debug?: boolean | undefined;
83
84
  antialias?: boolean | undefined;
84
85
  preserveDrawingBuffer?: boolean | undefined;
85
86
  };
@@ -34,7 +34,9 @@ var Tile = /*#__PURE__*/function () {
34
34
 
35
35
  }, {
36
36
  key: "styleUpdate",
37
- value: function styleUpdate() {}
37
+ value: function styleUpdate() {
38
+ return;
39
+ }
38
40
  }, {
39
41
  key: "lnglatInBounds",
40
42
  value: function lnglatInBounds(lnglat) {
@@ -148,8 +150,8 @@ var Tile = /*#__PURE__*/function () {
148
150
  }
149
151
  /**
150
152
  * 在一个 Tile 中可能存在一个相同 ID 的 feature
151
- * @param id
152
- * @returns
153
+ * @param id
154
+ * @returns
153
155
  */
154
156
 
155
157
  }, {
@@ -11,9 +11,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
11
11
 
12
12
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
13
 
14
+ import MaskLayer from "../../mask";
14
15
  import Tile from "./Tile";
15
16
  import { getTileLayer } from "./util";
16
- import MaskLayer from "../../mask";
17
17
 
18
18
  var VectorTile = /*#__PURE__*/function (_Tile) {
19
19
  _inherits(VectorTile, _Tile);
@@ -100,7 +100,7 @@ var VectorTile = /*#__PURE__*/function (_Tile) {
100
100
  switch (_context2.prev = _context2.next) {
101
101
  case 0:
102
102
  mask = new MaskLayer({
103
- layerType: "MaskLayer"
103
+ layerType: 'MaskLayer'
104
104
  }).source({
105
105
  type: 'FeatureCollection',
106
106
  features: [this.sourceTile.bboxPolygon]
@@ -173,8 +173,8 @@ var VectorTile = /*#__PURE__*/function (_Tile) {
173
173
  }
174
174
  /**
175
175
  * 在一个 Tile 中可能存在一个相同 ID 的 feature
176
- * @param id
177
- * @returns
176
+ * @param id
177
+ * @returns
178
178
  */
179
179
 
180
180
  }, {
@@ -1,12 +1,12 @@
1
1
  import { ILayer } from '@antv/l7-core';
2
- import VectorTile from './VectorTile';
3
2
  import DebugTile from './DebugTile';
4
3
  import ImageTile from './ImageTile';
5
- import RasterTile from './RasterTile';
4
+ import MaskLayer from './MaskTile';
6
5
  import RasterRGBTile from './RasterRGBTile';
7
6
  import RasterTerrainRGBTile from './RasterTerrainRGBTile';
8
- import MaskLayer from './MaskTile';
7
+ import RasterTile from './RasterTile';
8
+ import VectorTile from './VectorTile';
9
9
  export type TileType = 'VectorTile' | 'DebugTile' | 'PolygonLayer' | 'PointLayer' | 'LineLayer' | 'RasterLayer' | 'image' | 'MaskLayer' | 'TileDebugLayer';
10
- export declare function getTileFactory(layer: ILayer): typeof VectorTile | typeof DebugTile | typeof ImageTile | typeof RasterTile | typeof RasterRGBTile | typeof RasterTerrainRGBTile | typeof MaskLayer;
10
+ export declare function getTileFactory(layer: ILayer): typeof DebugTile | typeof ImageTile | typeof MaskLayer | typeof RasterRGBTile | typeof RasterTerrainRGBTile | typeof RasterTile | typeof VectorTile;
11
11
  export * from '../interface';
12
12
  export * from './Tile';
@@ -1,10 +1,10 @@
1
- import VectorTile from "./VectorTile";
2
1
  import DebugTile from "./DebugTile";
3
2
  import ImageTile from "./ImageTile";
4
- import RasterTile from "./RasterTile";
3
+ import MaskLayer from "./MaskTile";
5
4
  import RasterRGBTile from "./RasterRGBTile";
6
5
  import RasterTerrainRGBTile from "./RasterTerrainRGBTile";
7
- import MaskLayer from "./MaskTile";
6
+ import RasterTile from "./RasterTile";
7
+ import VectorTile from "./VectorTile";
8
8
  export function getTileFactory(layer) {
9
9
  var tileType = layer.type;
10
10
 
@@ -36,7 +36,7 @@ export function getTileFactory(layer) {
36
36
  case 'customArrayBuffer':
37
37
  return RasterTile;
38
38
 
39
- case "terrainRGB":
39
+ case 'terrainRGB':
40
40
  return RasterTerrainRGBTile;
41
41
 
42
42
  default:
@@ -54,6 +54,9 @@ var TileDebugLayer = /*#__PURE__*/function (_BaseLayer) {
54
54
  while (1) {
55
55
  switch (_context.prev = _context.next) {
56
56
  case 0:
57
+ return _context.abrupt("return");
58
+
59
+ case 1:
57
60
  case "end":
58
61
  return _context.stop();
59
62
  }
@@ -1,5 +1,5 @@
1
- import PointLayer from '../../point/index';
2
1
  import LineLayer from '../../line';
2
+ import PointLayer from '../../point/index';
3
3
  import PolygonLayer from '../../polygon';
4
4
  export declare function getTileLayer(type: string): typeof LineLayer | typeof PointLayer | typeof PolygonLayer;
5
5
  export declare function isNeedMask(type: string): boolean;
@@ -1,5 +1,5 @@
1
- import PointLayer from "../../point/index";
2
1
  import LineLayer from "../../line";
2
+ import PointLayer from "../../point/index";
3
3
  import PolygonLayer from "../../polygon";
4
4
  export function getTileLayer(type) {
5
5
  if (type === 'PolygonLayer') {
@@ -1,4 +1,4 @@
1
- import { ILayer, IMapService, ILayerService, IRendererService, IPickingService, IInteractionTarget } from '@antv/l7-core';
1
+ import { IInteractionTarget, ILayer, ILayerService, IMapService, IPickingService, IRendererService } from '@antv/l7-core';
2
2
  import { SourceTile, TilesetManager } from '@antv/l7-utils';
3
3
  import { TileLayerService } from '../service/TileLayerService';
4
4
  import { TilePickService } from '../service/TilePickService';
@@ -4,11 +4,11 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
4
4
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  import { TYPES } from '@antv/l7-core';
7
+ import { debounce } from 'lodash';
7
8
  import { TileLayerService } from "../service/TileLayerService";
8
9
  import { TilePickService } from "../service/TilePickService";
9
- import { debounce } from 'lodash';
10
- import { getTileFactory } from "../tileFactory";
11
10
  import { ProxyFuncs } from "../style/constants";
11
+ import { getTileFactory } from "../tileFactory";
12
12
 
13
13
  var BaseTileLayer = /*#__PURE__*/function () {
14
14
  // 瓦片数据管理器
@@ -287,7 +287,9 @@ var BaseTileLayer = /*#__PURE__*/function () {
287
287
 
288
288
  }, {
289
289
  key: "setPickState",
290
- value: function setPickState(layers) {}
290
+ value: function setPickState(layers) {
291
+ return;
292
+ }
291
293
  }, {
292
294
  key: "pickRender",
293
295
  value: function pickRender(target) {
@@ -305,7 +307,7 @@ var BaseTileLayer = /*#__PURE__*/function () {
305
307
  }
306
308
  /**
307
309
  * 实现 TileLayer 对子图层方法的代理
308
- * @param parent
310
+ * @param parent
309
311
  */
310
312
 
311
313
  }, {
@@ -188,13 +188,9 @@ var WindModel = /*#__PURE__*/function (_BaseModel) {
188
188
  while (1) {
189
189
  switch (_context2.prev = _context2.next) {
190
190
  case 0:
191
- _context2.next = 2;
192
- return this.initModels();
191
+ return _context2.abrupt("return", this.initModels());
193
192
 
194
- case 2:
195
- return _context2.abrupt("return", _context2.sent);
196
-
197
- case 3:
193
+ case 1:
198
194
  case "end":
199
195
  return _context2.stop();
200
196
  }
@@ -178,13 +178,9 @@ var BillBoardModel = /*#__PURE__*/function (_BaseModel) {
178
178
  while (1) {
179
179
  switch (_context2.prev = _context2.next) {
180
180
  case 0:
181
- _context2.next = 2;
182
- return this.initModels();
181
+ return _context2.abrupt("return", this.initModels());
183
182
 
184
- case 2:
185
- return _context2.abrupt("return", _context2.sent);
186
-
187
- case 3:
183
+ case 1:
188
184
  case "end":
189
185
  return _context2.stop();
190
186
  }
@@ -256,13 +256,9 @@ var PlaneModel = /*#__PURE__*/function (_BaseModel) {
256
256
  while (1) {
257
257
  switch (_context2.prev = _context2.next) {
258
258
  case 0:
259
- _context2.next = 2;
260
- return this.initModels();
259
+ return _context2.abrupt("return", this.initModels());
261
260
 
262
- case 2:
263
- return _context2.abrupt("return", _context2.sent);
264
-
265
- case 3:
261
+ case 1:
266
262
  case "end":
267
263
  return _context2.stop();
268
264
  }
@@ -279,13 +279,9 @@ var SpriteModel = /*#__PURE__*/function (_BaseModel) {
279
279
  while (1) {
280
280
  switch (_context2.prev = _context2.next) {
281
281
  case 0:
282
- _context2.next = 2;
283
- return this.initModels();
282
+ return _context2.abrupt("return", this.initModels());
284
283
 
285
- case 2:
286
- return _context2.abrupt("return", _context2.sent);
287
-
288
- case 3:
284
+ case 1:
289
285
  case "end":
290
286
  return _context2.stop();
291
287
  }
@@ -122,13 +122,9 @@ var CityBuildModel = /*#__PURE__*/function (_BaseModel) {
122
122
  case 0:
123
123
  this.calCityGeo();
124
124
  this.startModelAnimate();
125
- _context.next = 4;
126
- return this.buildModels();
125
+ return _context.abrupt("return", this.buildModels());
127
126
 
128
- case 4:
129
- return _context.abrupt("return", _context.sent);
130
-
131
- case 5:
127
+ case 3:
132
128
  case "end":
133
129
  return _context.stop();
134
130
  }