@antv/l7-layers 2.17.3 → 2.17.4
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 +31 -9
- package/es/Geometry/models/billboard.js +89 -51
- package/es/Geometry/models/plane.js +143 -81
- package/es/Geometry/models/sprite.js +118 -60
- package/es/canvas/index.js +33 -10
- package/es/canvas/models/canvas.js +97 -41
- package/es/citybuliding/building.js +27 -8
- package/es/citybuliding/models/build.js +82 -57
- package/es/core/BaseLayer.js +478 -313
- package/es/core/BaseModel.js +80 -51
- package/es/core/CommonStyleAttribute.js +5 -2
- package/es/core/LayerPickService.js +32 -21
- package/es/core/TextureService.js +13 -0
- package/es/core/interface.js +24 -17
- package/es/core/shape/Path.js +20 -13
- package/es/core/shape/extrude.js +39 -27
- package/es/core/triangulation.js +136 -99
- package/es/earth/index.js +33 -9
- package/es/earth/models/atmosphere.js +54 -30
- package/es/earth/models/base.js +85 -47
- package/es/earth/models/bloomsphere.js +54 -30
- package/es/earth/utils.js +13 -9
- package/es/heatmap/index.js +40 -10
- package/es/heatmap/models/grid.js +52 -28
- package/es/heatmap/models/grid3d.js +52 -28
- package/es/heatmap/models/heatmap.js +149 -92
- package/es/heatmap/models/hexagon.js +52 -28
- package/es/heatmap/triangulation.js +4 -0
- package/es/image/index.js +28 -9
- package/es/image/models/image.js +100 -66
- package/es/index.js +17 -9
- package/es/line/index.js +35 -9
- package/es/line/models/arc.js +112 -63
- package/es/line/models/arc_3d.js +102 -58
- package/es/line/models/earthArc_3d.js +105 -60
- package/es/line/models/flow.js +60 -36
- package/es/line/models/great_circle.js +94 -53
- package/es/line/models/line.js +136 -85
- package/es/line/models/linearline.js +74 -42
- package/es/line/models/simpleLine.js +67 -38
- package/es/line/models/wall.js +92 -52
- package/es/mask/index.js +28 -9
- package/es/mask/models/fill.js +54 -29
- package/es/plugins/DataMappingPlugin.js +114 -78
- package/es/plugins/DataSourcePlugin.js +68 -45
- package/es/plugins/FeatureScalePlugin.js +122 -67
- package/es/plugins/LayerAnimateStylePlugin.js +5 -0
- package/es/plugins/LayerMaskPlugin.js +11 -3
- package/es/plugins/LayerModelPlugin.js +108 -69
- package/es/plugins/LayerStylePlugin.js +9 -3
- package/es/plugins/LightingPlugin.js +18 -12
- package/es/plugins/MultiPassRendererPlugin.js +16 -11
- package/es/plugins/PixelPickingPlugin.js +21 -12
- package/es/plugins/RegisterStyleAttributePlugin.js +12 -5
- package/es/plugins/ShaderUniformPlugin.js +27 -13
- package/es/plugins/UpdateModelPlugin.js +5 -0
- package/es/plugins/UpdateStyleAttributePlugin.js +11 -5
- package/es/point/index.js +78 -26
- package/es/point/models/earthExtrude.js +95 -58
- package/es/point/models/earthFill.js +80 -52
- package/es/point/models/extrude.js +94 -57
- package/es/point/models/fill.js +81 -56
- package/es/point/models/fillmage.js +100 -60
- package/es/point/models/image.js +83 -47
- package/es/point/models/index.js +2 -2
- package/es/point/models/normal.js +54 -30
- package/es/point/models/radar.js +63 -38
- package/es/point/models/simplePoint.js +62 -38
- package/es/point/models/text.js +296 -199
- package/es/point/shape/extrude.js +13 -4
- package/es/polygon/index.js +41 -11
- package/es/polygon/models/extrude.js +135 -87
- package/es/polygon/models/fill.js +79 -50
- package/es/polygon/models/index.js +2 -3
- package/es/polygon/models/ocean.js +76 -42
- package/es/polygon/models/water.js +71 -37
- package/es/raster/buffers/triangulation.js +4 -2
- package/es/raster/index.js +32 -9
- package/es/raster/models/raster.js +116 -80
- package/es/raster/models/rasterRgb.js +127 -84
- package/es/raster/models/rasterTerrainRgb.js +84 -56
- package/es/tile/interaction/getRasterData.js +20 -14
- package/es/tile/interaction/utils.js +9 -7
- package/es/tile/manager/base.js +96 -63
- package/es/tile/service/TileLayerService.js +55 -33
- package/es/tile/service/TilePickService.js +40 -26
- package/es/tile/service/TileSourceService.js +7 -3
- package/es/tile/tileFactory/DebugTile.js +46 -29
- package/es/tile/tileFactory/ImageTile.js +38 -20
- package/es/tile/tileFactory/MaskTile.js +43 -22
- package/es/tile/tileFactory/RasterRGBTile.js +42 -22
- package/es/tile/tileFactory/RasterTerrainRGBTile.js +38 -20
- package/es/tile/tileFactory/RasterTile.js +53 -30
- package/es/tile/tileFactory/Tile.js +97 -63
- package/es/tile/tileFactory/VectorTile.js +68 -41
- package/es/tile/tileFactory/index.js +11 -0
- package/es/tile/tileFactory/layers/TileDebugLayer.js +27 -6
- package/es/tile/tileFactory/util.js +3 -0
- package/es/tile/tileLayer/BaseLayer.js +146 -105
- package/es/tile/utils.js +1 -1
- package/es/utils/blend.js +2 -0
- package/es/utils/collision-index.js +16 -9
- package/es/utils/extrude_polyline.js +149 -101
- package/es/utils/grid-index.js +27 -2
- package/es/utils/identityScale.js +8 -0
- package/es/utils/layerData.js +44 -30
- package/es/utils/multiPassRender.js +13 -11
- package/es/utils/polylineNormal.js +37 -31
- package/es/utils/simpleLine.js +16 -2
- package/es/utils/stencil.js +3 -2
- package/es/utils/symbol-layout.js +53 -27
- package/es/wind/index.js +29 -9
- package/es/wind/models/utils.js +51 -26
- package/es/wind/models/wind.js +147 -101
- package/es/wind/models/windRender.js +66 -53
- package/lib/Geometry/index.js +38 -9
- package/lib/Geometry/models/billboard.js +97 -51
- package/lib/Geometry/models/index.js +5 -0
- package/lib/Geometry/models/plane.js +151 -79
- package/lib/Geometry/models/sprite.js +127 -60
- package/lib/canvas/index.js +40 -10
- package/lib/canvas/models/canvas.js +101 -41
- package/lib/canvas/models/index.js +3 -0
- package/lib/citybuliding/building.js +35 -8
- package/lib/citybuliding/models/build.js +92 -57
- package/lib/core/BaseLayer.js +469 -313
- package/lib/core/BaseModel.js +90 -51
- package/lib/core/CommonStyleAttribute.js +7 -2
- package/lib/core/LayerPickService.js +37 -21
- package/lib/core/TextureService.js +16 -0
- package/lib/core/interface.js +31 -21
- package/lib/core/schema.js +1 -0
- package/lib/core/shape/Path.js +31 -14
- package/lib/core/shape/extrude.js +62 -27
- package/lib/core/triangulation.js +177 -98
- package/lib/earth/index.js +43 -9
- package/lib/earth/models/atmosphere.js +63 -30
- package/lib/earth/models/base.js +90 -47
- package/lib/earth/models/bloomsphere.js +63 -30
- package/lib/earth/utils.js +31 -7
- package/lib/heatmap/index.js +48 -10
- package/lib/heatmap/models/grid.js +60 -28
- package/lib/heatmap/models/grid3d.js +60 -28
- package/lib/heatmap/models/heatmap.js +166 -92
- package/lib/heatmap/models/hexagon.js +60 -28
- package/lib/heatmap/models/index.js +6 -0
- package/lib/heatmap/triangulation.js +5 -0
- package/lib/image/index.js +36 -9
- package/lib/image/models/image.js +109 -66
- package/lib/image/models/index.js +3 -0
- package/lib/index.js +61 -7
- package/lib/line/index.js +40 -9
- package/lib/line/models/arc.js +122 -61
- package/lib/line/models/arc_3d.js +113 -56
- package/lib/line/models/earthArc_3d.js +115 -58
- package/lib/line/models/flow.js +70 -36
- package/lib/line/models/great_circle.js +104 -53
- package/lib/line/models/index.js +11 -0
- package/lib/line/models/line.js +144 -83
- package/lib/line/models/linearline.js +86 -42
- package/lib/line/models/simpleLine.js +77 -38
- package/lib/line/models/wall.js +103 -52
- package/lib/mask/index.js +36 -9
- package/lib/mask/models/fill.js +63 -29
- package/lib/mask/models/index.js +3 -0
- package/lib/plugins/DataMappingPlugin.js +125 -78
- package/lib/plugins/DataSourcePlugin.js +76 -45
- package/lib/plugins/FeatureScalePlugin.js +138 -67
- package/lib/plugins/LayerAnimateStylePlugin.js +10 -0
- package/lib/plugins/LayerMaskPlugin.js +17 -4
- package/lib/plugins/LayerModelPlugin.js +117 -70
- package/lib/plugins/LayerStylePlugin.js +14 -4
- package/lib/plugins/LightingPlugin.js +25 -12
- package/lib/plugins/MultiPassRendererPlugin.js +22 -11
- package/lib/plugins/PixelPickingPlugin.js +27 -12
- package/lib/plugins/RegisterStyleAttributePlugin.js +19 -5
- package/lib/plugins/ShaderUniformPlugin.js +34 -13
- package/lib/plugins/UpdateModelPlugin.js +10 -1
- package/lib/plugins/UpdateStyleAttributePlugin.js +16 -5
- package/lib/point/index.js +83 -26
- package/lib/point/models/earthExtrude.js +106 -58
- package/lib/point/models/earthFill.js +110 -52
- package/lib/point/models/extrude.js +103 -57
- package/lib/point/models/fill.js +90 -54
- package/lib/point/models/fillmage.js +107 -58
- package/lib/point/models/image.js +92 -47
- package/lib/point/models/index.js +12 -1
- package/lib/point/models/normal.js +64 -30
- package/lib/point/models/radar.js +72 -38
- package/lib/point/models/simplePoint.js +72 -38
- package/lib/point/models/text.js +305 -199
- package/lib/point/shape/extrude.js +20 -4
- package/lib/polygon/index.js +48 -11
- package/lib/polygon/models/extrude.js +146 -87
- package/lib/polygon/models/fill.js +89 -50
- package/lib/polygon/models/index.js +14 -2
- package/lib/polygon/models/ocean.js +88 -42
- package/lib/polygon/models/water.js +82 -37
- package/lib/raster/buffers/triangulation.js +7 -3
- package/lib/raster/index.js +40 -9
- package/lib/raster/models/index.js +5 -0
- package/lib/raster/models/raster.js +125 -80
- package/lib/raster/models/rasterRgb.js +139 -84
- package/lib/raster/models/rasterTerrainRgb.js +93 -56
- package/lib/tile/interaction/getRasterData.js +25 -14
- package/lib/tile/interaction/utils.js +19 -7
- package/lib/tile/manager/base.js +104 -63
- package/lib/tile/service/TileLayerService.js +60 -33
- package/lib/tile/service/TilePickService.js +48 -26
- package/lib/tile/service/TileSourceService.js +16 -2
- package/lib/tile/style/utils.js +3 -0
- package/lib/tile/tileFactory/DebugTile.js +54 -29
- package/lib/tile/tileFactory/ImageTile.js +46 -20
- package/lib/tile/tileFactory/MaskTile.js +51 -22
- package/lib/tile/tileFactory/RasterRGBTile.js +50 -22
- package/lib/tile/tileFactory/RasterTerrainRGBTile.js +46 -20
- package/lib/tile/tileFactory/RasterTile.js +63 -30
- package/lib/tile/tileFactory/Tile.js +102 -63
- package/lib/tile/tileFactory/VectorTile.js +76 -41
- package/lib/tile/tileFactory/index.js +25 -0
- package/lib/tile/tileFactory/layers/TileDebugLayer.js +32 -6
- package/lib/tile/tileFactory/util.js +9 -0
- package/lib/tile/tileLayer/BaseLayer.js +153 -105
- package/lib/tile/utils.js +5 -1
- package/lib/utils/blend.js +5 -0
- package/lib/utils/collision-index.js +25 -9
- package/lib/utils/extrude_polyline.js +181 -101
- package/lib/utils/grid-index.js +28 -2
- package/lib/utils/identityScale.js +9 -0
- package/lib/utils/layerData.js +49 -30
- package/lib/utils/multiPassRender.js +16 -11
- package/lib/utils/polylineNormal.js +66 -31
- package/lib/utils/simpleLine.js +21 -2
- package/lib/utils/stencil.js +4 -0
- package/lib/utils/symbol-layout.js +55 -27
- package/lib/wind/index.js +37 -9
- package/lib/wind/models/index.js +3 -0
- package/lib/wind/models/utils.js +62 -26
- package/lib/wind/models/wind.js +157 -101
- package/lib/wind/models/windRender.js +71 -53
- package/lib/wind/models/windShader.js +1 -0
- package/package.json +7 -7
|
@@ -5,59 +5,74 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
+
|
|
8
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); }; }
|
|
10
|
+
|
|
9
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
|
+
|
|
10
13
|
import LineLayer from "../../line";
|
|
11
14
|
import PointLayer from "../../point";
|
|
12
15
|
import Tile from "./Tile";
|
|
16
|
+
|
|
13
17
|
var DebugTile = /*#__PURE__*/function (_Tile) {
|
|
14
18
|
_inherits(DebugTile, _Tile);
|
|
19
|
+
|
|
15
20
|
var _super = _createSuper(DebugTile);
|
|
21
|
+
|
|
16
22
|
function DebugTile() {
|
|
17
23
|
_classCallCheck(this, DebugTile);
|
|
24
|
+
|
|
18
25
|
return _super.apply(this, arguments);
|
|
19
26
|
}
|
|
27
|
+
|
|
20
28
|
_createClass(DebugTile, [{
|
|
21
29
|
key: "initTileLayer",
|
|
22
30
|
value: function () {
|
|
23
31
|
var _initTileLayer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
24
32
|
var sourceOptions, pointData, lineLayer, pointLayer;
|
|
25
33
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
26
|
-
while (1)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
34
|
+
while (1) {
|
|
35
|
+
switch (_context.prev = _context.next) {
|
|
36
|
+
case 0:
|
|
37
|
+
sourceOptions = this.getSourceOption();
|
|
38
|
+
pointData = sourceOptions.data.features[0].properties;
|
|
39
|
+
lineLayer = new LineLayer().source(sourceOptions.data, sourceOptions.options).size(1).shape('line').color('red');
|
|
40
|
+
pointLayer = new PointLayer({
|
|
41
|
+
minZoom: this.z - 1,
|
|
42
|
+
maxZoom: this.z + 1,
|
|
43
|
+
textAllowOverlap: true
|
|
44
|
+
}).source([pointData], {
|
|
45
|
+
parser: {
|
|
46
|
+
type: 'json',
|
|
47
|
+
x: 'x',
|
|
48
|
+
y: 'y'
|
|
49
|
+
}
|
|
50
|
+
}).size(20).color('red').shape(this.key).style({
|
|
51
|
+
stroke: '#fff',
|
|
52
|
+
strokeWidth: 2
|
|
53
|
+
});
|
|
54
|
+
_context.next = 6;
|
|
55
|
+
return this.addLayer(lineLayer);
|
|
56
|
+
|
|
57
|
+
case 6:
|
|
58
|
+
_context.next = 8;
|
|
59
|
+
return this.addLayer(pointLayer);
|
|
60
|
+
|
|
61
|
+
case 8:
|
|
62
|
+
this.isLoaded = true;
|
|
63
|
+
|
|
64
|
+
case 9:
|
|
65
|
+
case "end":
|
|
66
|
+
return _context.stop();
|
|
67
|
+
}
|
|
55
68
|
}
|
|
56
69
|
}, _callee, this);
|
|
57
70
|
}));
|
|
71
|
+
|
|
58
72
|
function initTileLayer() {
|
|
59
73
|
return _initTileLayer.apply(this, arguments);
|
|
60
74
|
}
|
|
75
|
+
|
|
61
76
|
return initTileLayer;
|
|
62
77
|
}()
|
|
63
78
|
}, {
|
|
@@ -79,6 +94,8 @@ var DebugTile = /*#__PURE__*/function (_Tile) {
|
|
|
79
94
|
};
|
|
80
95
|
}
|
|
81
96
|
}]);
|
|
97
|
+
|
|
82
98
|
return DebugTile;
|
|
83
99
|
}(Tile);
|
|
100
|
+
|
|
84
101
|
export { DebugTile as default };
|
|
@@ -6,49 +6,65 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
8
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
|
+
|
|
9
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); }; }
|
|
11
|
+
|
|
10
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
|
+
|
|
11
14
|
import ImageLayer from "../../image";
|
|
12
15
|
import Tile from "./Tile";
|
|
16
|
+
|
|
13
17
|
var ImageTile = /*#__PURE__*/function (_Tile) {
|
|
14
18
|
_inherits(ImageTile, _Tile);
|
|
19
|
+
|
|
15
20
|
var _super = _createSuper(ImageTile);
|
|
21
|
+
|
|
16
22
|
function ImageTile() {
|
|
17
23
|
_classCallCheck(this, ImageTile);
|
|
24
|
+
|
|
18
25
|
return _super.apply(this, arguments);
|
|
19
26
|
}
|
|
27
|
+
|
|
20
28
|
_createClass(ImageTile, [{
|
|
21
29
|
key: "initTileLayer",
|
|
22
30
|
value: function () {
|
|
23
31
|
var _initTileLayer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
24
32
|
var attributes, layerOptions, sourceOptions, layer;
|
|
25
33
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
26
|
-
while (1)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
while (1) {
|
|
35
|
+
switch (_context.prev = _context.next) {
|
|
36
|
+
case 0:
|
|
37
|
+
attributes = this.parent.getLayerAttributeConfig();
|
|
38
|
+
layerOptions = this.getLayerOptions();
|
|
39
|
+
sourceOptions = this.getSourceOption();
|
|
40
|
+
layer = new ImageLayer(_objectSpread({}, layerOptions)).source(sourceOptions.data, sourceOptions.options); // 初始化数据映射
|
|
41
|
+
// tslint:disable-next-line: no-unused-expression
|
|
42
|
+
|
|
43
|
+
attributes && Object.keys(attributes).forEach(function (type) {
|
|
44
|
+
var _attributes$attr, _attributes$attr2;
|
|
45
|
+
|
|
46
|
+
var attr = type; // @ts-ignore
|
|
47
|
+
|
|
48
|
+
layer[attr]((_attributes$attr = attributes[attr]) === null || _attributes$attr === void 0 ? void 0 : _attributes$attr.field, (_attributes$attr2 = attributes[attr]) === null || _attributes$attr2 === void 0 ? void 0 : _attributes$attr2.values);
|
|
49
|
+
});
|
|
50
|
+
_context.next = 7;
|
|
51
|
+
return this.addLayer(layer);
|
|
52
|
+
|
|
53
|
+
case 7:
|
|
54
|
+
this.isLoaded = true;
|
|
55
|
+
|
|
56
|
+
case 8:
|
|
57
|
+
case "end":
|
|
58
|
+
return _context.stop();
|
|
59
|
+
}
|
|
46
60
|
}
|
|
47
61
|
}, _callee, this);
|
|
48
62
|
}));
|
|
63
|
+
|
|
49
64
|
function initTileLayer() {
|
|
50
65
|
return _initTileLayer.apply(this, arguments);
|
|
51
66
|
}
|
|
67
|
+
|
|
52
68
|
return initTileLayer;
|
|
53
69
|
}()
|
|
54
70
|
}, {
|
|
@@ -67,6 +83,8 @@ var ImageTile = /*#__PURE__*/function (_Tile) {
|
|
|
67
83
|
};
|
|
68
84
|
}
|
|
69
85
|
}]);
|
|
86
|
+
|
|
70
87
|
return ImageTile;
|
|
71
88
|
}(Tile);
|
|
89
|
+
|
|
72
90
|
export { ImageTile as default };
|
|
@@ -6,49 +6,65 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
8
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
|
+
|
|
9
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); }; }
|
|
11
|
+
|
|
10
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
|
+
|
|
11
14
|
import MaskLayer from "../../mask";
|
|
12
15
|
import Tile from "./Tile";
|
|
16
|
+
|
|
13
17
|
var MaskTile = /*#__PURE__*/function (_Tile) {
|
|
14
18
|
_inherits(MaskTile, _Tile);
|
|
19
|
+
|
|
15
20
|
var _super = _createSuper(MaskTile);
|
|
21
|
+
|
|
16
22
|
function MaskTile() {
|
|
17
23
|
_classCallCheck(this, MaskTile);
|
|
24
|
+
|
|
18
25
|
return _super.apply(this, arguments);
|
|
19
26
|
}
|
|
27
|
+
|
|
20
28
|
_createClass(MaskTile, [{
|
|
21
29
|
key: "initTileLayer",
|
|
22
30
|
value: function () {
|
|
23
31
|
var _initTileLayer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
24
32
|
var attributes, layerOptions, sourceOptions, layer;
|
|
25
33
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
26
|
-
while (1)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
while (1) {
|
|
35
|
+
switch (_context.prev = _context.next) {
|
|
36
|
+
case 0:
|
|
37
|
+
attributes = this.parent.getLayerAttributeConfig();
|
|
38
|
+
layerOptions = this.getLayerOptions();
|
|
39
|
+
sourceOptions = this.getSourceOption();
|
|
40
|
+
layer = new MaskLayer(_objectSpread({}, layerOptions)).source(sourceOptions.data, sourceOptions.options); // 初始化数据映射
|
|
41
|
+
// tslint:disable-next-line: no-unused-expression
|
|
42
|
+
|
|
43
|
+
attributes && Object.keys(attributes).forEach(function (type) {
|
|
44
|
+
var _attributes$attr, _attributes$attr2;
|
|
45
|
+
|
|
46
|
+
var attr = type; // @ts-ignore
|
|
47
|
+
|
|
48
|
+
layer[attr]((_attributes$attr = attributes[attr]) === null || _attributes$attr === void 0 ? void 0 : _attributes$attr.field, (_attributes$attr2 = attributes[attr]) === null || _attributes$attr2 === void 0 ? void 0 : _attributes$attr2.values);
|
|
49
|
+
});
|
|
50
|
+
_context.next = 7;
|
|
51
|
+
return this.addLayer(layer);
|
|
52
|
+
|
|
53
|
+
case 7:
|
|
54
|
+
this.isLoaded = true;
|
|
55
|
+
|
|
56
|
+
case 8:
|
|
57
|
+
case "end":
|
|
58
|
+
return _context.stop();
|
|
59
|
+
}
|
|
46
60
|
}
|
|
47
61
|
}, _callee, this);
|
|
48
62
|
}));
|
|
63
|
+
|
|
49
64
|
function initTileLayer() {
|
|
50
65
|
return _initTileLayer.apply(this, arguments);
|
|
51
66
|
}
|
|
67
|
+
|
|
52
68
|
return initTileLayer;
|
|
53
69
|
}()
|
|
54
70
|
}, {
|
|
@@ -57,6 +73,7 @@ var MaskTile = /*#__PURE__*/function (_Tile) {
|
|
|
57
73
|
if (!sourceLayer) {
|
|
58
74
|
return [];
|
|
59
75
|
}
|
|
76
|
+
|
|
60
77
|
var source = this.sourceTile.data;
|
|
61
78
|
return source.getTileData(sourceLayer);
|
|
62
79
|
}
|
|
@@ -64,9 +81,11 @@ var MaskTile = /*#__PURE__*/function (_Tile) {
|
|
|
64
81
|
key: "getSourceOption",
|
|
65
82
|
value: function getSourceOption() {
|
|
66
83
|
var rawSource = this.parent.getSource();
|
|
84
|
+
|
|
67
85
|
var _this$parent$getLayer = this.parent.getLayerConfig(),
|
|
68
|
-
|
|
69
|
-
|
|
86
|
+
sourceLayer = _this$parent$getLayer.sourceLayer,
|
|
87
|
+
featureId = _this$parent$getLayer.featureId;
|
|
88
|
+
|
|
70
89
|
var features = this.getFeatures(sourceLayer);
|
|
71
90
|
return {
|
|
72
91
|
data: {
|
|
@@ -83,6 +102,8 @@ var MaskTile = /*#__PURE__*/function (_Tile) {
|
|
|
83
102
|
};
|
|
84
103
|
}
|
|
85
104
|
}]);
|
|
105
|
+
|
|
86
106
|
return MaskTile;
|
|
87
107
|
}(Tile);
|
|
108
|
+
|
|
88
109
|
export { MaskTile as default };
|
|
@@ -8,58 +8,76 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConst
|
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
9
9
|
var _excluded = ["rasterData"];
|
|
10
10
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
|
+
|
|
11
12
|
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); }; }
|
|
13
|
+
|
|
12
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
|
+
|
|
13
16
|
import RasterLayer from "../../raster";
|
|
14
17
|
import Tile from "./Tile";
|
|
18
|
+
|
|
15
19
|
var RasterTile = /*#__PURE__*/function (_Tile) {
|
|
16
20
|
_inherits(RasterTile, _Tile);
|
|
21
|
+
|
|
17
22
|
var _super = _createSuper(RasterTile);
|
|
23
|
+
|
|
18
24
|
function RasterTile() {
|
|
19
25
|
_classCallCheck(this, RasterTile);
|
|
26
|
+
|
|
20
27
|
return _super.apply(this, arguments);
|
|
21
28
|
}
|
|
29
|
+
|
|
22
30
|
_createClass(RasterTile, [{
|
|
23
31
|
key: "initTileLayer",
|
|
24
32
|
value: function () {
|
|
25
33
|
var _initTileLayer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
26
34
|
var attributes, layerOptions, sourceOptions, layer;
|
|
27
35
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
28
|
-
while (1)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
while (1) {
|
|
37
|
+
switch (_context.prev = _context.next) {
|
|
38
|
+
case 0:
|
|
39
|
+
attributes = this.parent.getLayerAttributeConfig();
|
|
40
|
+
layerOptions = this.getLayerOptions();
|
|
41
|
+
sourceOptions = this.getSourceOption();
|
|
42
|
+
layer = new RasterLayer(_objectSpread({}, layerOptions)).source(sourceOptions.data, sourceOptions.options); // 初始化数据映射
|
|
43
|
+
// tslint:disable-next-line: no-unused-expression
|
|
44
|
+
|
|
45
|
+
attributes && Object.keys(attributes).forEach(function (type) {
|
|
46
|
+
var _attributes$attr, _attributes$attr2;
|
|
47
|
+
|
|
48
|
+
var attr = type; // @ts-ignore
|
|
49
|
+
|
|
50
|
+
layer[attr]((_attributes$attr = attributes[attr]) === null || _attributes$attr === void 0 ? void 0 : _attributes$attr.field, (_attributes$attr2 = attributes[attr]) === null || _attributes$attr2 === void 0 ? void 0 : _attributes$attr2.values);
|
|
51
|
+
});
|
|
52
|
+
_context.next = 7;
|
|
53
|
+
return this.addLayer(layer);
|
|
54
|
+
|
|
55
|
+
case 7:
|
|
56
|
+
this.isLoaded = true;
|
|
57
|
+
|
|
58
|
+
case 8:
|
|
59
|
+
case "end":
|
|
60
|
+
return _context.stop();
|
|
61
|
+
}
|
|
48
62
|
}
|
|
49
63
|
}, _callee, this);
|
|
50
64
|
}));
|
|
65
|
+
|
|
51
66
|
function initTileLayer() {
|
|
52
67
|
return _initTileLayer.apply(this, arguments);
|
|
53
68
|
}
|
|
69
|
+
|
|
54
70
|
return initTileLayer;
|
|
55
71
|
}()
|
|
56
72
|
}, {
|
|
57
73
|
key: "getSourceOption",
|
|
58
74
|
value: function getSourceOption() {
|
|
59
75
|
var rawSource = this.parent.getSource();
|
|
76
|
+
|
|
60
77
|
var _this$sourceTile$data = this.sourceTile.data.data,
|
|
61
|
-
|
|
62
|
-
|
|
78
|
+
rasterData = _this$sourceTile$data.rasterData,
|
|
79
|
+
res = _objectWithoutProperties(_this$sourceTile$data, _excluded);
|
|
80
|
+
|
|
63
81
|
return {
|
|
64
82
|
data: rasterData,
|
|
65
83
|
// 栅格数
|
|
@@ -73,6 +91,8 @@ var RasterTile = /*#__PURE__*/function (_Tile) {
|
|
|
73
91
|
};
|
|
74
92
|
}
|
|
75
93
|
}]);
|
|
94
|
+
|
|
76
95
|
return RasterTile;
|
|
77
96
|
}(Tile);
|
|
97
|
+
|
|
78
98
|
export { RasterTile as default };
|
|
@@ -6,49 +6,65 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
8
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
|
+
|
|
9
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); }; }
|
|
11
|
+
|
|
10
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
|
+
|
|
11
14
|
import RasterLayer from "../../raster";
|
|
12
15
|
import Tile from "./Tile";
|
|
16
|
+
|
|
13
17
|
var RasterTerrainRGBTile = /*#__PURE__*/function (_Tile) {
|
|
14
18
|
_inherits(RasterTerrainRGBTile, _Tile);
|
|
19
|
+
|
|
15
20
|
var _super = _createSuper(RasterTerrainRGBTile);
|
|
21
|
+
|
|
16
22
|
function RasterTerrainRGBTile() {
|
|
17
23
|
_classCallCheck(this, RasterTerrainRGBTile);
|
|
24
|
+
|
|
18
25
|
return _super.apply(this, arguments);
|
|
19
26
|
}
|
|
27
|
+
|
|
20
28
|
_createClass(RasterTerrainRGBTile, [{
|
|
21
29
|
key: "initTileLayer",
|
|
22
30
|
value: function () {
|
|
23
31
|
var _initTileLayer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
24
32
|
var attributes, layerOptions, sourceOptions, layer;
|
|
25
33
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
26
|
-
while (1)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
while (1) {
|
|
35
|
+
switch (_context.prev = _context.next) {
|
|
36
|
+
case 0:
|
|
37
|
+
attributes = this.parent.getLayerAttributeConfig();
|
|
38
|
+
layerOptions = this.getLayerOptions();
|
|
39
|
+
sourceOptions = this.getSourceOption();
|
|
40
|
+
layer = new RasterLayer(_objectSpread({}, layerOptions)).source(sourceOptions.data, sourceOptions.options); // 初始化数据映射
|
|
41
|
+
// tslint:disable-next-line: no-unused-expression
|
|
42
|
+
|
|
43
|
+
attributes && Object.keys(attributes).forEach(function (type) {
|
|
44
|
+
var _attributes$attr, _attributes$attr2;
|
|
45
|
+
|
|
46
|
+
var attr = type; // @ts-ignore
|
|
47
|
+
|
|
48
|
+
layer[attr]((_attributes$attr = attributes[attr]) === null || _attributes$attr === void 0 ? void 0 : _attributes$attr.field, (_attributes$attr2 = attributes[attr]) === null || _attributes$attr2 === void 0 ? void 0 : _attributes$attr2.values);
|
|
49
|
+
});
|
|
50
|
+
_context.next = 7;
|
|
51
|
+
return this.addLayer(layer);
|
|
52
|
+
|
|
53
|
+
case 7:
|
|
54
|
+
this.isLoaded = true;
|
|
55
|
+
|
|
56
|
+
case 8:
|
|
57
|
+
case "end":
|
|
58
|
+
return _context.stop();
|
|
59
|
+
}
|
|
46
60
|
}
|
|
47
61
|
}, _callee, this);
|
|
48
62
|
}));
|
|
63
|
+
|
|
49
64
|
function initTileLayer() {
|
|
50
65
|
return _initTileLayer.apply(this, arguments);
|
|
51
66
|
}
|
|
67
|
+
|
|
52
68
|
return initTileLayer;
|
|
53
69
|
}()
|
|
54
70
|
}, {
|
|
@@ -67,6 +83,8 @@ var RasterTerrainRGBTile = /*#__PURE__*/function (_Tile) {
|
|
|
67
83
|
};
|
|
68
84
|
}
|
|
69
85
|
}]);
|
|
86
|
+
|
|
70
87
|
return RasterTerrainRGBTile;
|
|
71
88
|
}(Tile);
|
|
89
|
+
|
|
72
90
|
export { RasterTerrainRGBTile as default };
|