@antv/l7-layers 2.10.2 → 2.10.3
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/Geometry/index.js +8 -8
- package/es/Geometry/models/billboard.js +9 -9
- package/es/Geometry/models/plane.js +10 -10
- package/es/Geometry/models/sprite.js +10 -10
- package/es/canvas/index.js +8 -8
- package/es/canvas/models/canvas.js +9 -9
- package/es/citybuliding/building.js +8 -8
- package/es/citybuliding/models/build.js +7 -7
- package/es/core/BaseLayer.js +37 -46
- package/es/core/BaseModel.js +8 -8
- package/es/core/LayerPickService.js +4 -4
- package/es/core/shape/Path.js +1 -1
- package/es/core/shape/extrude.js +1 -1
- package/es/core/triangulation.js +2 -2
- package/es/earth/index.js +8 -8
- package/es/earth/models/atmosphere.js +6 -6
- package/es/earth/models/base.js +8 -8
- package/es/earth/models/bloomsphere.js +6 -6
- package/es/earth/utils.js +1 -1
- package/es/heatmap/index.js +8 -8
- package/es/heatmap/models/grid.js +6 -6
- package/es/heatmap/models/grid3d.js +6 -6
- package/es/heatmap/models/heatmap.js +8 -8
- package/es/heatmap/models/hexagon.js +6 -6
- package/es/image/index.js +8 -8
- package/es/image/models/dataImage.js +6 -6
- package/es/image/models/image.js +6 -6
- package/es/image/models/tileDataImage.js +6 -6
- package/es/line/index.js +9 -9
- package/es/line/models/arc.js +8 -8
- package/es/line/models/arc_3d.js +8 -8
- package/es/line/models/earthArc_3d.js +8 -8
- package/es/line/models/great_circle.js +8 -8
- package/es/line/models/half.js +6 -6
- package/es/line/models/line.js +8 -8
- package/es/line/models/linearline.js +8 -8
- package/es/line/models/simpleLine.js +6 -6
- package/es/line/models/simpleTileLine.js +6 -6
- package/es/line/models/tile.js +6 -6
- package/es/line/models/wall.js +8 -8
- package/es/mask/index.js +8 -8
- package/es/mask/models/fill.js +6 -6
- package/es/plugins/DataMappingPlugin.d.ts +0 -2
- package/es/plugins/DataMappingPlugin.js +24 -97
- package/es/plugins/DataSourcePlugin.js +27 -19
- package/es/plugins/FeatureScalePlugin.d.ts +0 -1
- package/es/plugins/FeatureScalePlugin.js +7 -23
- package/es/plugins/LayerAnimateStylePlugin.js +3 -3
- package/es/plugins/LayerModelPlugin.js +4 -7
- package/es/plugins/LayerStylePlugin.js +2 -2
- package/es/plugins/LightingPlugin.js +4 -4
- package/es/plugins/MultiPassRendererPlugin.js +2 -2
- package/es/plugins/PixelPickingPlugin.js +2 -2
- package/es/plugins/RegisterStyleAttributePlugin.js +2 -2
- package/es/plugins/ShaderUniformPlugin.js +6 -6
- package/es/plugins/UpdateModelPlugin.js +5 -2
- package/es/plugins/UpdateStyleAttributePlugin.js +3 -7
- package/es/point/index.js +8 -8
- package/es/point/models/earthExtrude.js +8 -8
- package/es/point/models/earthFill.js +8 -8
- package/es/point/models/extrude.js +8 -8
- package/es/point/models/fill.js +9 -9
- package/es/point/models/fillmage.js +9 -9
- package/es/point/models/image.js +8 -8
- package/es/point/models/normal.js +7 -7
- package/es/point/models/radar.js +9 -9
- package/es/point/models/simplePoint.js +7 -7
- package/es/point/models/text.js +45 -29
- package/es/point/models/tile.js +6 -6
- package/es/point/models/tileText.js +9 -9
- package/es/point/shape/extrude.js +1 -1
- package/es/polygon/index.js +8 -8
- package/es/polygon/models/extrude.js +7 -7
- package/es/polygon/models/fill.js +6 -6
- package/es/polygon/models/ocean.js +7 -7
- package/es/polygon/models/tile.js +6 -6
- package/es/polygon/models/water.js +7 -7
- package/es/raster/index.js +8 -8
- package/es/raster/models/raster.js +6 -6
- package/es/raster/models/rasterRgb.js +8 -8
- package/es/raster/models/rasterTile.js +6 -6
- package/es/raster/raster.js +10 -10
- package/es/tile/interaction/getRasterData.js +1 -1
- package/es/tile/interaction/utils.js +1 -1
- package/es/tile/manager/base.js +5 -5
- package/es/tile/service/TileLayerService.js +5 -5
- package/es/tile/service/TilePickService.d.ts +3 -3
- package/es/tile/service/TilePickService.js +31 -7
- package/es/tile/service/TileSourceService.d.ts +7 -0
- package/es/tile/service/TileSourceService.js +39 -0
- package/es/tile/style/utils.js +1 -1
- package/es/tile/tileFactory/DebugTile.js +6 -6
- package/es/tile/tileFactory/ImageTile.js +7 -7
- package/es/tile/tileFactory/MaskTile.js +8 -8
- package/es/tile/tileFactory/RasterRGBTile.js +7 -7
- package/es/tile/tileFactory/RasterTile.js +7 -7
- package/es/tile/tileFactory/Tile.d.ts +11 -0
- package/es/tile/tileFactory/Tile.js +68 -5
- package/es/tile/tileFactory/VectorTile.d.ts +1 -1
- package/es/tile/tileFactory/VectorTile.js +8 -14
- package/es/tile/tileFactory/layers/RasterDataLayer.js +8 -8
- package/es/tile/tileFactory/layers/TileDebugLayer.js +8 -8
- package/es/tile/tileLayer/BaseLayer.js +4 -4
- package/es/utils/blend.js +1 -1
- package/es/utils/collision-index.js +4 -4
- package/es/utils/extrude_polyline.js +5 -5
- package/es/utils/grid-index.js +3 -3
- package/es/utils/multiPassRender.js +1 -1
- package/es/utils/polylineNormal.js +1 -1
- package/es/utils/simpleLine.js +3 -3
- package/es/wind/index.js +8 -8
- package/es/wind/models/wind.js +11 -8
- package/es/wind/models/windRender.js +3 -3
- package/lib/core/BaseLayer.js +24 -33
- package/lib/plugins/DataMappingPlugin.js +16 -87
- package/lib/plugins/DataSourcePlugin.js +24 -16
- package/lib/plugins/FeatureScalePlugin.js +2 -18
- package/lib/plugins/LayerModelPlugin.js +1 -4
- package/lib/plugins/UpdateModelPlugin.js +3 -0
- package/lib/plugins/UpdateStyleAttributePlugin.js +1 -5
- package/lib/point/models/text.js +36 -20
- package/lib/tile/service/TilePickService.js +29 -3
- package/lib/tile/service/TileSourceService.js +59 -0
- package/lib/tile/tileFactory/MaskTile.js +1 -1
- package/lib/tile/tileFactory/Tile.js +64 -0
- package/lib/tile/tileFactory/VectorTile.js +1 -7
- package/lib/wind/models/wind.js +3 -0
- package/package.json +6 -6
package/es/point/models/text.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
10
10
|
|
|
11
11
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
12
12
|
|
|
@@ -94,16 +94,15 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
94
94
|
while (1) {
|
|
95
95
|
switch (_context.prev = _context.next) {
|
|
96
96
|
case 0:
|
|
97
|
-
_this.initGlyph();
|
|
97
|
+
_this.initGlyph(); //
|
|
98
98
|
|
|
99
|
-
_this.updateTexture();
|
|
100
99
|
|
|
101
|
-
_this.
|
|
100
|
+
_this.updateTexture();
|
|
102
101
|
|
|
103
|
-
_context.next =
|
|
102
|
+
_context.next = 4;
|
|
104
103
|
return _this.reBuildModel();
|
|
105
104
|
|
|
106
|
-
case
|
|
105
|
+
case 4:
|
|
107
106
|
case "end":
|
|
108
107
|
return _context.stop();
|
|
109
108
|
}
|
|
@@ -210,7 +209,10 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
210
209
|
switch (_context2.prev = _context2.next) {
|
|
211
210
|
case 0:
|
|
212
211
|
// 绑定事件
|
|
213
|
-
this.
|
|
212
|
+
if (!this.layer.inited) {
|
|
213
|
+
this.bindEvent();
|
|
214
|
+
}
|
|
215
|
+
|
|
214
216
|
this.extent = this.textExtent();
|
|
215
217
|
_ref3 = this.layer.getLayerConfig(), _ref3$textAnchor = _ref3.textAnchor, textAnchor = _ref3$textAnchor === void 0 ? 'center' : _ref3$textAnchor, _ref3$textAllowOverla = _ref3.textAllowOverlap, textAllowOverlap = _ref3$textAllowOverla === void 0 ? true : _ref3$textAllowOverla;
|
|
216
218
|
this.preTextStyle = {
|
|
@@ -241,15 +243,23 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
241
243
|
key: "buildModels",
|
|
242
244
|
value: function () {
|
|
243
245
|
var _buildModels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
244
|
-
var _ref4, _ref4$mask, mask, _ref4$maskInside, maskInside, model;
|
|
246
|
+
var _ref4, _ref4$mask, mask, _ref4$maskInside, maskInside, _ref4$textAllowOverla, textAllowOverlap, model;
|
|
245
247
|
|
|
246
248
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
247
249
|
while (1) {
|
|
248
250
|
switch (_context3.prev = _context3.next) {
|
|
249
251
|
case 0:
|
|
250
|
-
_ref4 = this.layer.getLayerConfig(), _ref4$mask = _ref4.mask, mask = _ref4$mask === void 0 ? false : _ref4$mask, _ref4$maskInside = _ref4.maskInside, maskInside = _ref4$maskInside === void 0 ? true : _ref4$maskInside;
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
_ref4 = this.layer.getLayerConfig(), _ref4$mask = _ref4.mask, mask = _ref4$mask === void 0 ? false : _ref4$mask, _ref4$maskInside = _ref4.maskInside, maskInside = _ref4$maskInside === void 0 ? true : _ref4$maskInside, _ref4$textAllowOverla = _ref4.textAllowOverlap, textAllowOverlap = _ref4$textAllowOverla === void 0 ? false : _ref4$textAllowOverla; // this.mapping(); 重复调用
|
|
253
|
+
|
|
254
|
+
this.initGlyph(); //
|
|
255
|
+
|
|
256
|
+
this.updateTexture();
|
|
257
|
+
|
|
258
|
+
if (!textAllowOverlap) {
|
|
259
|
+
this.filterGlyphs();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
_context3.next = 6;
|
|
253
263
|
return this.layer.buildLayerModel({
|
|
254
264
|
moduleName: 'pointText',
|
|
255
265
|
vertexShader: textVert,
|
|
@@ -262,11 +272,11 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
262
272
|
stencil: getMask(mask, maskInside)
|
|
263
273
|
});
|
|
264
274
|
|
|
265
|
-
case
|
|
275
|
+
case 6:
|
|
266
276
|
model = _context3.sent;
|
|
267
277
|
return _context3.abrupt("return", [model]);
|
|
268
278
|
|
|
269
|
-
case
|
|
279
|
+
case 8:
|
|
270
280
|
case "end":
|
|
271
281
|
return _context3.stop();
|
|
272
282
|
}
|
|
@@ -285,15 +295,22 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
285
295
|
value: function needUpdate() {
|
|
286
296
|
var _ref5 = this.layer.getLayerConfig(),
|
|
287
297
|
_ref5$textAllowOverla = _ref5.textAllowOverlap,
|
|
288
|
-
textAllowOverlap = _ref5$textAllowOverla === void 0 ? false : _ref5$textAllowOverla;
|
|
298
|
+
textAllowOverlap = _ref5$textAllowOverla === void 0 ? false : _ref5$textAllowOverla;
|
|
299
|
+
|
|
300
|
+
var data = this.layer.getEncodedData();
|
|
301
|
+
|
|
302
|
+
if (data.length < 5 || textAllowOverlap) {
|
|
303
|
+
// 小于不做避让
|
|
304
|
+
return false;
|
|
305
|
+
} // textAllowOverlap 发生改变
|
|
289
306
|
|
|
290
307
|
|
|
291
308
|
var zoom = this.mapService.getZoom();
|
|
292
309
|
var extent = this.mapService.getBounds();
|
|
293
310
|
var flag = boundsContains(this.extent, extent); // 文本不能压盖则进行过滤
|
|
294
311
|
|
|
295
|
-
if (
|
|
296
|
-
// TODO this.mapping
|
|
312
|
+
if (Math.abs(this.currentZoom - zoom) > 1 || !flag || textAllowOverlap !== this.preTextStyle.textAllowOverlap) {
|
|
313
|
+
// TODO this.mapping 数据未变化,避让
|
|
297
314
|
this.reBuildModel();
|
|
298
315
|
return true;
|
|
299
316
|
}
|
|
@@ -389,7 +406,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
389
406
|
key: "bindEvent",
|
|
390
407
|
value: function bindEvent() {
|
|
391
408
|
if (!this.layer.isTileLayer) {
|
|
392
|
-
//
|
|
409
|
+
// 重新绑定
|
|
393
410
|
this.layer.on('remapping', this.mapping);
|
|
394
411
|
}
|
|
395
412
|
}
|
|
@@ -557,7 +574,7 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
557
574
|
|
|
558
575
|
var centroid = feature.version === 'GAODE2.x' ? feature.originCentroid : feature.centroid;
|
|
559
576
|
var size = feature.size;
|
|
560
|
-
var fontScale = size /
|
|
577
|
+
var fontScale = size / 16;
|
|
561
578
|
|
|
562
579
|
var pixels = _this3.mapService.lngLatToContainer(centroid);
|
|
563
580
|
|
|
@@ -651,10 +668,9 @@ var TextModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
651
668
|
case 4:
|
|
652
669
|
model = _context4.sent;
|
|
653
670
|
// TODO 渲染流程待修改
|
|
654
|
-
this.layer.models = [model];
|
|
655
|
-
this.layerService.throttleRenderLayers();
|
|
671
|
+
this.layer.models = [model]; // this.layerService.throttleRenderLayers();
|
|
656
672
|
|
|
657
|
-
case
|
|
673
|
+
case 6:
|
|
658
674
|
case "end":
|
|
659
675
|
return _context4.stop();
|
|
660
676
|
}
|
package/es/point/models/tile.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
8
|
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
10
10
|
|
|
11
11
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
12
12
|
|
package/es/polygon/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
9
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
|
|
11
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
8
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
9
|
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
8
|
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
8
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
9
|
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
8
|
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
8
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
9
|
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
package/es/raster/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
9
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
|
|
11
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
8
|
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
9
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
|
|
11
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
8
|
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
package/es/raster/raster.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
7
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
9
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
10
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
9
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
10
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
11
11
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
12
12
|
|
|
13
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import { DOM } from '@antv/l7-utils';
|
|
3
3
|
export function readRasterValue(tile, mapService, x, y) {
|
|
4
4
|
var _tile$bboxPolygon, _tile$data, _tile$data2, _tile$data3;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import { decodePickingColor } from '@antv/l7-utils';
|
|
3
3
|
export function clearPickState(layers) {
|
|
4
4
|
layers.filter(function (layer) {
|
package/es/tile/manager/base.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import { createLayerContainer } from '@antv/l7-core';
|
|
8
8
|
import { updateLayersConfig } from "../style/utils";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import 'reflect-metadata';
|
|
8
8
|
export var TileLayerService = /*#__PURE__*/function () {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ILayerService, ITilePickService } from '@antv/l7-core';
|
|
1
|
+
import { ILayerService, ITilePickService, IInteractionTarget } from '@antv/l7-core';
|
|
2
2
|
import { TileLayerService } from './TileLayerService';
|
|
3
|
-
import { IInteractionTarget } from '@antv/l7-core';
|
|
4
3
|
export interface ITilePickServiceOptions {
|
|
5
4
|
layerService: ILayerService;
|
|
6
5
|
tileLayerService: TileLayerService;
|
|
@@ -8,6 +7,7 @@ export interface ITilePickServiceOptions {
|
|
|
8
7
|
export declare class TilePickService implements ITilePickService {
|
|
9
8
|
private layerService;
|
|
10
9
|
private tileLayerService;
|
|
10
|
+
private tileSourceService;
|
|
11
11
|
private tilePickID;
|
|
12
12
|
constructor({ layerService, tileLayerService }: ITilePickServiceOptions);
|
|
13
13
|
pickRender(target: IInteractionTarget): void;
|
|
@@ -18,5 +18,5 @@ export declare class TilePickService implements ITilePickService {
|
|
|
18
18
|
private clor2PickId;
|
|
19
19
|
private pickId2Color;
|
|
20
20
|
/** 从瓦片中根据数据 */
|
|
21
|
-
getFeatureById():
|
|
21
|
+
getFeatureById(pickedFeatureIdx: number): any;
|
|
22
22
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
+
import { TileSourceService } from "./TileSourceService";
|
|
5
7
|
var SELECT = 'select';
|
|
6
8
|
var ACTIVE = 'active';
|
|
7
9
|
export var TilePickService = /*#__PURE__*/function () {
|
|
@@ -15,6 +17,7 @@ export var TilePickService = /*#__PURE__*/function () {
|
|
|
15
17
|
|
|
16
18
|
this.layerService = layerService;
|
|
17
19
|
this.tileLayerService = tileLayerService;
|
|
20
|
+
this.tileSourceService = new TileSourceService();
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
_createClass(TilePickService, [{
|
|
@@ -25,8 +28,11 @@ export var TilePickService = /*#__PURE__*/function () {
|
|
|
25
28
|
|
|
26
29
|
if (tile) {
|
|
27
30
|
// TODO 多图层拾取
|
|
28
|
-
var pickLayer = tile.
|
|
29
|
-
|
|
31
|
+
var pickLayer = tile.getMainLayer();
|
|
32
|
+
|
|
33
|
+
if (pickLayer) {
|
|
34
|
+
pickLayer.layerPickService.pickRender(target);
|
|
35
|
+
}
|
|
30
36
|
}
|
|
31
37
|
}
|
|
32
38
|
}, {
|
|
@@ -117,7 +123,25 @@ export var TilePickService = /*#__PURE__*/function () {
|
|
|
117
123
|
|
|
118
124
|
}, {
|
|
119
125
|
key: "getFeatureById",
|
|
120
|
-
value: function getFeatureById() {
|
|
126
|
+
value: function getFeatureById(pickedFeatureIdx) {
|
|
127
|
+
// 提取当前可见瓦片
|
|
128
|
+
var tiles = this.tileLayerService.getTiles().filter(function (tile) {
|
|
129
|
+
return tile.visible;
|
|
130
|
+
}); // 提取当前可见瓦片中匹配 ID 的 feature 列表
|
|
131
|
+
|
|
132
|
+
var features = [];
|
|
133
|
+
tiles.map(function (tile) {
|
|
134
|
+
features.push.apply(features, _toConsumableArray(tile.getFeatureById(pickedFeatureIdx)));
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
if (features.length <= 0) {
|
|
138
|
+
return null;
|
|
139
|
+
} // 将 feature 列表合并后返回
|
|
140
|
+
// 统一返回成 polygon 的格式 点、线、面可以通用
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
return this.tileSourceService.getCombineFeature(features);
|
|
144
|
+
}
|
|
121
145
|
}]);
|
|
122
146
|
|
|
123
147
|
return TilePickService;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import * as turf from '@turf/helpers';
|
|
5
|
+
import union from '@turf/union';
|
|
6
|
+
/**
|
|
7
|
+
* 专门处理 Tile 数据相关
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export var TileSourceService = /*#__PURE__*/function () {
|
|
11
|
+
function TileSourceService() {
|
|
12
|
+
_classCallCheck(this, TileSourceService);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
_createClass(TileSourceService, [{
|
|
16
|
+
key: "getCombineFeature",
|
|
17
|
+
value: function getCombineFeature(features) {
|
|
18
|
+
var p = null;
|
|
19
|
+
var properties = features[0];
|
|
20
|
+
features.map(function (feature) {
|
|
21
|
+
var polygon = turf.polygon(feature.coordinates);
|
|
22
|
+
|
|
23
|
+
if (p === null) {
|
|
24
|
+
p = polygon;
|
|
25
|
+
} else {
|
|
26
|
+
p = union(p, polygon);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
if (properties) {
|
|
31
|
+
p.properties = _objectSpread({}, properties);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return p;
|
|
35
|
+
}
|
|
36
|
+
}]);
|
|
37
|
+
|
|
38
|
+
return TileSourceService;
|
|
39
|
+
}();
|
package/es/tile/style/utils.js
CHANGED