@antv/l7-layers 2.17.4 → 2.17.5
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 +9 -31
- package/es/Geometry/models/billboard.js +51 -89
- package/es/Geometry/models/plane.js +81 -143
- package/es/Geometry/models/sprite.js +60 -118
- package/es/canvas/index.js +10 -33
- package/es/canvas/models/canvas.js +41 -97
- package/es/citybuliding/building.js +8 -27
- package/es/citybuliding/models/build.js +57 -82
- package/es/core/BaseLayer.js +325 -483
- package/es/core/BaseModel.js +51 -80
- package/es/core/CommonStyleAttribute.js +2 -5
- package/es/core/LayerPickService.js +21 -32
- package/es/core/TextureService.js +0 -13
- package/es/core/interface.js +17 -24
- package/es/core/shape/Path.js +13 -20
- package/es/core/shape/extrude.js +27 -39
- package/es/core/triangulation.js +99 -136
- package/es/earth/index.js +9 -33
- package/es/earth/models/atmosphere.js +30 -54
- package/es/earth/models/base.js +47 -85
- package/es/earth/models/bloomsphere.js +30 -54
- package/es/earth/utils.js +9 -13
- package/es/heatmap/index.js +10 -40
- package/es/heatmap/models/grid.js +28 -52
- package/es/heatmap/models/grid3d.js +28 -52
- package/es/heatmap/models/heatmap.js +92 -149
- package/es/heatmap/models/hexagon.js +28 -52
- package/es/heatmap/triangulation.js +0 -4
- package/es/image/index.js +9 -28
- package/es/image/models/image.js +66 -100
- package/es/index.js +9 -17
- package/es/line/index.js +9 -35
- package/es/line/models/arc.js +63 -112
- package/es/line/models/arc_3d.js +58 -102
- package/es/line/models/earthArc_3d.js +60 -105
- package/es/line/models/flow.js +36 -60
- package/es/line/models/great_circle.js +53 -94
- package/es/line/models/line.js +92 -144
- package/es/line/models/linearline.js +42 -74
- package/es/line/models/simpleLine.js +38 -67
- package/es/line/models/wall.js +52 -92
- package/es/line/shaders/dash/line_dash_vert.glsl +1 -2
- package/es/line/shaders/line_frag.glsl +1 -3
- package/es/line/shaders/line_vert.glsl +2 -0
- package/es/line/shaders/linear/line_linear_frag.glsl +1 -1
- package/es/mask/index.js +9 -28
- package/es/mask/models/fill.js +29 -54
- package/es/plugins/DataMappingPlugin.js +78 -114
- package/es/plugins/DataSourcePlugin.js +45 -68
- package/es/plugins/FeatureScalePlugin.js +67 -122
- package/es/plugins/LayerAnimateStylePlugin.js +0 -5
- package/es/plugins/LayerMaskPlugin.js +3 -11
- package/es/plugins/LayerModelPlugin.js +69 -118
- package/es/plugins/LayerStylePlugin.js +4 -9
- package/es/plugins/LightingPlugin.js +12 -18
- package/es/plugins/MultiPassRendererPlugin.js +11 -16
- package/es/plugins/PixelPickingPlugin.js +12 -21
- package/es/plugins/RegisterStyleAttributePlugin.js +5 -12
- package/es/plugins/ShaderUniformPlugin.js +13 -27
- package/es/plugins/UpdateModelPlugin.js +0 -5
- package/es/plugins/UpdateStyleAttributePlugin.js +5 -11
- package/es/point/index.js +26 -78
- package/es/point/models/earthExtrude.js +58 -95
- package/es/point/models/earthFill.js +52 -80
- package/es/point/models/extrude.js +57 -94
- package/es/point/models/fill.js +56 -81
- package/es/point/models/fillmage.js +60 -100
- package/es/point/models/image.js +47 -83
- package/es/point/models/index.js +2 -2
- package/es/point/models/normal.js +30 -54
- package/es/point/models/radar.js +38 -63
- package/es/point/models/simplePoint.js +38 -62
- package/es/point/models/text.js +199 -296
- package/es/point/shape/extrude.js +4 -13
- package/es/polygon/index.js +11 -41
- package/es/polygon/models/extrude.js +87 -135
- package/es/polygon/models/fill.js +50 -79
- package/es/polygon/models/index.js +3 -2
- package/es/polygon/models/ocean.js +42 -76
- package/es/polygon/models/water.js +37 -71
- package/es/raster/buffers/triangulation.js +2 -4
- package/es/raster/index.js +9 -32
- package/es/raster/models/raster.js +80 -116
- package/es/raster/models/rasterRgb.js +84 -127
- package/es/raster/models/rasterTerrainRgb.js +56 -84
- package/es/tile/interaction/getRasterData.js +14 -20
- package/es/tile/interaction/utils.js +7 -9
- package/es/tile/manager/base.js +63 -96
- package/es/tile/service/TileLayerService.js +33 -55
- package/es/tile/service/TilePickService.js +26 -40
- package/es/tile/service/TileSourceService.js +3 -7
- package/es/tile/tileFactory/DebugTile.js +29 -46
- package/es/tile/tileFactory/ImageTile.js +20 -38
- package/es/tile/tileFactory/MaskTile.js +22 -43
- package/es/tile/tileFactory/RasterRGBTile.js +22 -42
- package/es/tile/tileFactory/RasterTerrainRGBTile.js +20 -38
- package/es/tile/tileFactory/RasterTile.js +30 -53
- package/es/tile/tileFactory/Tile.js +63 -97
- package/es/tile/tileFactory/VectorTile.js +41 -68
- package/es/tile/tileFactory/index.js +0 -11
- package/es/tile/tileFactory/layers/TileDebugLayer.js +6 -27
- package/es/tile/tileFactory/util.js +0 -3
- package/es/tile/tileLayer/BaseLayer.js +105 -146
- package/es/tile/utils.js +1 -1
- package/es/utils/blend.js +0 -2
- package/es/utils/collision-index.js +9 -16
- package/es/utils/extrude_polyline.js +101 -149
- package/es/utils/grid-index.js +2 -27
- package/es/utils/identityScale.js +0 -8
- package/es/utils/layerData.js +30 -44
- package/es/utils/multiPassRender.js +11 -13
- package/es/utils/polylineNormal.js +31 -37
- package/es/utils/simpleLine.js +2 -16
- package/es/utils/stencil.js +2 -3
- package/es/utils/symbol-layout.js +27 -53
- package/es/wind/index.js +9 -29
- package/es/wind/models/utils.js +26 -51
- package/es/wind/models/wind.js +101 -147
- package/es/wind/models/windRender.js +53 -66
- package/lib/Geometry/index.js +9 -38
- package/lib/Geometry/models/billboard.js +51 -97
- package/lib/Geometry/models/index.js +0 -5
- package/lib/Geometry/models/plane.js +79 -151
- package/lib/Geometry/models/sprite.js +60 -127
- package/lib/canvas/index.js +10 -40
- package/lib/canvas/models/canvas.js +41 -101
- package/lib/canvas/models/index.js +0 -3
- package/lib/citybuliding/building.js +8 -35
- package/lib/citybuliding/models/build.js +57 -92
- package/lib/core/BaseLayer.js +325 -474
- package/lib/core/BaseModel.js +51 -90
- package/lib/core/CommonStyleAttribute.js +2 -7
- package/lib/core/LayerPickService.js +21 -37
- package/lib/core/TextureService.js +0 -16
- package/lib/core/interface.js +21 -31
- package/lib/core/schema.js +0 -1
- package/lib/core/shape/Path.js +14 -31
- package/lib/core/shape/extrude.js +27 -62
- package/lib/core/triangulation.js +98 -177
- package/lib/earth/index.js +9 -43
- package/lib/earth/models/atmosphere.js +30 -63
- package/lib/earth/models/base.js +47 -90
- package/lib/earth/models/bloomsphere.js +30 -63
- package/lib/earth/utils.js +7 -31
- package/lib/heatmap/index.js +10 -48
- package/lib/heatmap/models/grid.js +28 -60
- package/lib/heatmap/models/grid3d.js +28 -60
- package/lib/heatmap/models/heatmap.js +92 -166
- package/lib/heatmap/models/hexagon.js +28 -60
- package/lib/heatmap/models/index.js +0 -6
- package/lib/heatmap/triangulation.js +0 -5
- package/lib/image/index.js +9 -36
- package/lib/image/models/image.js +66 -109
- package/lib/image/models/index.js +0 -3
- package/lib/index.js +7 -61
- package/lib/line/index.js +9 -40
- package/lib/line/models/arc.js +61 -122
- package/lib/line/models/arc_3d.js +56 -113
- package/lib/line/models/earthArc_3d.js +58 -115
- package/lib/line/models/flow.js +36 -70
- package/lib/line/models/great_circle.js +53 -104
- package/lib/line/models/index.js +0 -11
- package/lib/line/models/line.js +90 -152
- package/lib/line/models/linearline.js +42 -86
- package/lib/line/models/simpleLine.js +38 -77
- package/lib/line/models/wall.js +52 -103
- package/lib/line/shaders/dash/line_dash_vert.glsl +1 -2
- package/lib/line/shaders/line_frag.glsl +1 -3
- package/lib/line/shaders/line_vert.glsl +2 -0
- package/lib/line/shaders/linear/line_linear_frag.glsl +1 -1
- package/lib/mask/index.js +9 -36
- package/lib/mask/models/fill.js +29 -63
- package/lib/mask/models/index.js +0 -3
- package/lib/plugins/DataMappingPlugin.js +78 -125
- package/lib/plugins/DataSourcePlugin.js +45 -76
- package/lib/plugins/FeatureScalePlugin.js +67 -138
- package/lib/plugins/LayerAnimateStylePlugin.js +0 -10
- package/lib/plugins/LayerMaskPlugin.js +4 -17
- package/lib/plugins/LayerModelPlugin.js +70 -127
- package/lib/plugins/LayerStylePlugin.js +5 -14
- package/lib/plugins/LightingPlugin.js +12 -25
- package/lib/plugins/MultiPassRendererPlugin.js +11 -22
- package/lib/plugins/PixelPickingPlugin.js +12 -27
- package/lib/plugins/RegisterStyleAttributePlugin.js +5 -19
- package/lib/plugins/ShaderUniformPlugin.js +13 -34
- package/lib/plugins/UpdateModelPlugin.js +1 -10
- package/lib/plugins/UpdateStyleAttributePlugin.js +5 -16
- package/lib/point/index.js +26 -83
- package/lib/point/models/earthExtrude.js +58 -106
- package/lib/point/models/earthFill.js +52 -110
- package/lib/point/models/extrude.js +57 -103
- package/lib/point/models/fill.js +54 -90
- package/lib/point/models/fillmage.js +58 -107
- package/lib/point/models/image.js +47 -92
- package/lib/point/models/index.js +1 -12
- package/lib/point/models/normal.js +30 -64
- package/lib/point/models/radar.js +38 -72
- package/lib/point/models/simplePoint.js +38 -72
- package/lib/point/models/text.js +199 -305
- package/lib/point/shape/extrude.js +4 -20
- package/lib/polygon/index.js +11 -48
- package/lib/polygon/models/extrude.js +87 -146
- package/lib/polygon/models/fill.js +50 -89
- package/lib/polygon/models/index.js +2 -14
- package/lib/polygon/models/ocean.js +42 -88
- package/lib/polygon/models/water.js +37 -82
- package/lib/raster/buffers/triangulation.js +3 -7
- package/lib/raster/index.js +9 -40
- package/lib/raster/models/index.js +0 -5
- package/lib/raster/models/raster.js +80 -125
- package/lib/raster/models/rasterRgb.js +84 -139
- package/lib/raster/models/rasterTerrainRgb.js +56 -93
- package/lib/tile/interaction/getRasterData.js +14 -25
- package/lib/tile/interaction/utils.js +7 -19
- package/lib/tile/manager/base.js +63 -104
- package/lib/tile/service/TileLayerService.js +33 -60
- package/lib/tile/service/TilePickService.js +26 -48
- package/lib/tile/service/TileSourceService.js +2 -16
- package/lib/tile/style/utils.js +0 -3
- package/lib/tile/tileFactory/DebugTile.js +29 -54
- package/lib/tile/tileFactory/ImageTile.js +20 -46
- package/lib/tile/tileFactory/MaskTile.js +22 -51
- package/lib/tile/tileFactory/RasterRGBTile.js +22 -50
- package/lib/tile/tileFactory/RasterTerrainRGBTile.js +20 -46
- package/lib/tile/tileFactory/RasterTile.js +30 -63
- package/lib/tile/tileFactory/Tile.js +63 -102
- package/lib/tile/tileFactory/VectorTile.js +41 -76
- package/lib/tile/tileFactory/index.js +0 -25
- package/lib/tile/tileFactory/layers/TileDebugLayer.js +6 -32
- package/lib/tile/tileFactory/util.js +0 -9
- package/lib/tile/tileLayer/BaseLayer.js +105 -153
- package/lib/tile/utils.js +1 -5
- package/lib/utils/blend.js +0 -5
- package/lib/utils/collision-index.js +9 -25
- package/lib/utils/extrude_polyline.js +101 -181
- package/lib/utils/grid-index.js +2 -28
- package/lib/utils/identityScale.js +0 -9
- package/lib/utils/layerData.js +30 -49
- package/lib/utils/multiPassRender.js +11 -16
- package/lib/utils/polylineNormal.js +31 -66
- package/lib/utils/simpleLine.js +2 -21
- package/lib/utils/stencil.js +0 -4
- package/lib/utils/symbol-layout.js +27 -55
- package/lib/wind/index.js +9 -37
- package/lib/wind/models/index.js +0 -3
- package/lib/wind/models/utils.js +26 -62
- package/lib/wind/models/wind.js +101 -157
- package/lib/wind/models/windRender.js +53 -71
- package/lib/wind/models/windShader.js +0 -1
- package/package.json +7 -7
|
@@ -9,57 +9,42 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConst
|
|
|
9
9
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
11
11
|
var _excluded = ["data"],
|
|
12
|
-
|
|
12
|
+
_excluded2 = ["rasterData"];
|
|
13
13
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
14
|
-
|
|
15
14
|
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); }; }
|
|
16
|
-
|
|
17
15
|
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; } }
|
|
18
|
-
|
|
19
16
|
import { AttributeType, gl } from '@antv/l7-core';
|
|
20
17
|
import BaseModel from "../../core/BaseModel";
|
|
21
18
|
import { RasterImageTriangulation } from "../../core/triangulation";
|
|
22
|
-
|
|
23
19
|
/* babel-plugin-inline-import '../shaders/raster_2d_vert.glsl' */
|
|
24
20
|
var rasterVert = "precision highp float;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nattribute vec3 a_Position;\nattribute vec2 a_Uv;\nvarying vec2 v_texCoord;\n#pragma include \"projection\"\nvoid main() {\n v_texCoord = a_Uv;\n vec4 project_pos = project_position(vec4(a_Position, 1.0));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\n }\n}\n";
|
|
25
|
-
|
|
26
21
|
/* babel-plugin-inline-import '../shaders/raster_rgb_frag.glsl' */
|
|
27
22
|
var rasterFrag = "precision mediump float;\nuniform vec2 u_rminmax: vec2(0,255); \nuniform vec2 u_gminmax: vec2(0,255);\nuniform vec2 u_bminmax: vec2(0,255);\nuniform float u_opacity: 1.0;\nuniform sampler2D u_texture;\nuniform float u_noDataValue : 0.0;\nvarying vec2 v_texCoord;\n\nvoid main() {\n vec3 rgb = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y)).rgb;\n if(rgb == vec3(u_noDataValue)) {\n gl_FragColor = vec4(0.0, 0, 0, 0.0);\n } else {\n gl_FragColor = vec4(rgb.r / (u_rminmax.y -u_rminmax.x), rgb.g /(u_gminmax.y -u_gminmax.x), rgb.b/ (u_bminmax.y - u_bminmax.x), u_opacity);\n }\n if(gl_FragColor.a < 0.01)\n discard;\n \n}";
|
|
28
|
-
|
|
29
23
|
var RasterModel = /*#__PURE__*/function (_BaseModel) {
|
|
30
24
|
_inherits(RasterModel, _BaseModel);
|
|
31
|
-
|
|
32
25
|
var _super = _createSuper(RasterModel);
|
|
33
|
-
|
|
34
26
|
function RasterModel() {
|
|
35
27
|
var _this;
|
|
36
|
-
|
|
37
28
|
_classCallCheck(this, RasterModel);
|
|
38
|
-
|
|
39
29
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
40
30
|
args[_key] = arguments[_key];
|
|
41
31
|
}
|
|
42
|
-
|
|
43
32
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
44
|
-
|
|
45
33
|
_defineProperty(_assertThisInitialized(_this), "dataOption", {});
|
|
46
|
-
|
|
47
34
|
return _this;
|
|
48
35
|
}
|
|
49
|
-
|
|
50
36
|
_createClass(RasterModel, [{
|
|
51
37
|
key: "getUninforms",
|
|
52
38
|
value: function getUninforms() {
|
|
53
39
|
var _ref = this.layer.getLayerConfig(),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
_ref$opacity = _ref.opacity,
|
|
41
|
+
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity,
|
|
42
|
+
_ref$noDataValue = _ref.noDataValue,
|
|
43
|
+
noDataValue = _ref$noDataValue === void 0 ? 0 : _ref$noDataValue;
|
|
59
44
|
var _this$dataOption = this.dataOption,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
rMinMax = _this$dataOption.rMinMax,
|
|
46
|
+
gMinMax = _this$dataOption.gMinMax,
|
|
47
|
+
bMinMax = _this$dataOption.bMinMax;
|
|
63
48
|
return {
|
|
64
49
|
u_opacity: opacity || 1,
|
|
65
50
|
u_texture: this.texture,
|
|
@@ -74,58 +59,46 @@ var RasterModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
74
59
|
value: function () {
|
|
75
60
|
var _getRasterData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(parserDataItem) {
|
|
76
61
|
var data, rescfg, _yield$parserDataItem, rasterData, rest;
|
|
77
|
-
|
|
78
62
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
79
|
-
while (1) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
case 14:
|
|
113
|
-
return _context.abrupt("return", _objectSpread({
|
|
114
|
-
data: Array.from(rasterData)
|
|
115
|
-
}, rest));
|
|
116
|
-
|
|
117
|
-
case 15:
|
|
118
|
-
case "end":
|
|
119
|
-
return _context.stop();
|
|
120
|
-
}
|
|
63
|
+
while (1) switch (_context.prev = _context.next) {
|
|
64
|
+
case 0:
|
|
65
|
+
if (!Array.isArray(parserDataItem.data)) {
|
|
66
|
+
_context.next = 4;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
data = parserDataItem.data, rescfg = _objectWithoutProperties(parserDataItem, _excluded);
|
|
70
|
+
this.dataOption = rescfg;
|
|
71
|
+
return _context.abrupt("return", _objectSpread({
|
|
72
|
+
data: data
|
|
73
|
+
}, rescfg));
|
|
74
|
+
case 4:
|
|
75
|
+
_context.next = 6;
|
|
76
|
+
return parserDataItem.data;
|
|
77
|
+
case 6:
|
|
78
|
+
_yield$parserDataItem = _context.sent;
|
|
79
|
+
rasterData = _yield$parserDataItem.rasterData;
|
|
80
|
+
rest = _objectWithoutProperties(_yield$parserDataItem, _excluded2);
|
|
81
|
+
this.dataOption = rest;
|
|
82
|
+
if (!Array.isArray(rasterData)) {
|
|
83
|
+
_context.next = 14;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
return _context.abrupt("return", _objectSpread({
|
|
87
|
+
data: rasterData
|
|
88
|
+
}, rest));
|
|
89
|
+
case 14:
|
|
90
|
+
return _context.abrupt("return", _objectSpread({
|
|
91
|
+
data: Array.from(rasterData)
|
|
92
|
+
}, rest));
|
|
93
|
+
case 15:
|
|
94
|
+
case "end":
|
|
95
|
+
return _context.stop();
|
|
121
96
|
}
|
|
122
97
|
}, _callee, this);
|
|
123
98
|
}));
|
|
124
|
-
|
|
125
99
|
function getRasterData(_x) {
|
|
126
100
|
return _getRasterData.apply(this, arguments);
|
|
127
101
|
}
|
|
128
|
-
|
|
129
102
|
return getRasterData;
|
|
130
103
|
}()
|
|
131
104
|
}, {
|
|
@@ -133,58 +106,50 @@ var RasterModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
133
106
|
value: function () {
|
|
134
107
|
var _initModels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
135
108
|
var source, createTexture2D, parserDataItem, _yield$this$getRaster, data, width, height, model;
|
|
136
|
-
|
|
137
109
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
138
|
-
while (1) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
case 14:
|
|
177
|
-
case "end":
|
|
178
|
-
return _context2.stop();
|
|
179
|
-
}
|
|
110
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
111
|
+
case 0:
|
|
112
|
+
source = this.layer.getSource();
|
|
113
|
+
createTexture2D = this.rendererService.createTexture2D;
|
|
114
|
+
parserDataItem = source.data.dataArray[0];
|
|
115
|
+
_context2.next = 5;
|
|
116
|
+
return this.getRasterData(parserDataItem);
|
|
117
|
+
case 5:
|
|
118
|
+
_yield$this$getRaster = _context2.sent;
|
|
119
|
+
data = _yield$this$getRaster.data;
|
|
120
|
+
width = _yield$this$getRaster.width;
|
|
121
|
+
height = _yield$this$getRaster.height;
|
|
122
|
+
this.texture = createTexture2D({
|
|
123
|
+
// @ts-ignore
|
|
124
|
+
data: data,
|
|
125
|
+
width: width,
|
|
126
|
+
height: height,
|
|
127
|
+
format: gl.RGB,
|
|
128
|
+
type: gl.FLOAT
|
|
129
|
+
});
|
|
130
|
+
_context2.next = 12;
|
|
131
|
+
return this.layer.buildLayerModel({
|
|
132
|
+
moduleName: 'rasterImageDataRGBA',
|
|
133
|
+
vertexShader: rasterVert,
|
|
134
|
+
fragmentShader: rasterFrag,
|
|
135
|
+
triangulation: RasterImageTriangulation,
|
|
136
|
+
primitive: gl.TRIANGLES,
|
|
137
|
+
depth: {
|
|
138
|
+
enable: false
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
case 12:
|
|
142
|
+
model = _context2.sent;
|
|
143
|
+
return _context2.abrupt("return", [model]);
|
|
144
|
+
case 14:
|
|
145
|
+
case "end":
|
|
146
|
+
return _context2.stop();
|
|
180
147
|
}
|
|
181
148
|
}, _callee2, this);
|
|
182
149
|
}));
|
|
183
|
-
|
|
184
150
|
function initModels() {
|
|
185
151
|
return _initModels.apply(this, arguments);
|
|
186
152
|
}
|
|
187
|
-
|
|
188
153
|
return initModels;
|
|
189
154
|
}()
|
|
190
155
|
}, {
|
|
@@ -192,30 +157,24 @@ var RasterModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
192
157
|
value: function () {
|
|
193
158
|
var _buildModels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
194
159
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
195
|
-
while (1) {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
case "end":
|
|
202
|
-
return _context3.stop();
|
|
203
|
-
}
|
|
160
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
161
|
+
case 0:
|
|
162
|
+
return _context3.abrupt("return", this.initModels());
|
|
163
|
+
case 1:
|
|
164
|
+
case "end":
|
|
165
|
+
return _context3.stop();
|
|
204
166
|
}
|
|
205
167
|
}, _callee3, this);
|
|
206
168
|
}));
|
|
207
|
-
|
|
208
169
|
function buildModels() {
|
|
209
170
|
return _buildModels.apply(this, arguments);
|
|
210
171
|
}
|
|
211
|
-
|
|
212
172
|
return buildModels;
|
|
213
173
|
}()
|
|
214
174
|
}, {
|
|
215
175
|
key: "clearModels",
|
|
216
176
|
value: function clearModels() {
|
|
217
177
|
var _this$texture;
|
|
218
|
-
|
|
219
178
|
(_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
|
|
220
179
|
}
|
|
221
180
|
}, {
|
|
@@ -241,8 +200,6 @@ var RasterModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
241
200
|
});
|
|
242
201
|
}
|
|
243
202
|
}]);
|
|
244
|
-
|
|
245
203
|
return RasterModel;
|
|
246
204
|
}(BaseModel);
|
|
247
|
-
|
|
248
205
|
export { RasterModel as default };
|
|
@@ -5,65 +5,52 @@ 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
|
-
|
|
9
8
|
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
|
-
|
|
11
9
|
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
|
-
|
|
13
10
|
import { AttributeType, gl } from '@antv/l7-core';
|
|
14
11
|
import { getDefaultDomain } from '@antv/l7-utils';
|
|
15
12
|
import BaseModel from "../../core/BaseModel";
|
|
16
13
|
import { RasterImageTriangulation } from "../../core/triangulation";
|
|
17
|
-
|
|
18
14
|
/* babel-plugin-inline-import '../shaders/raster_terrain_rgb_frag.glsl' */
|
|
19
15
|
var Raster_terrainFrag = "precision mediump float;\nuniform float u_opacity: 1.0;\n\nuniform sampler2D u_texture;\nuniform sampler2D u_colorTexture;\n\nvarying vec2 v_texCoord;\n\nuniform vec2 u_domain;\nuniform float u_noDataValue;\nuniform bool u_clampLow: true;\nuniform bool u_clampHigh: true;\nuniform vec4 u_unpack;\n\nfloat getElevation(vec2 coord, float bias) {\n // Convert encoded elevation value to meters\n vec4 data = texture2D(u_texture, coord,bias) * 255.0;\n data.a = -1.0;\n return dot(data, u_unpack);\n}\n\nvec4 getColor(float value) {\n float normalisedValue =(value- u_domain[0]) / (u_domain[1] - u_domain[0]);\n vec2 coord = vec2(normalisedValue, 0);\n return texture2D(u_colorTexture, coord);\n}\n\nvoid main() {\n float value = getElevation(v_texCoord,0.0);\n if (value == u_noDataValue) {\n gl_FragColor = vec4(0.0, 0, 0, 0.0);\n } else if ((!u_clampLow && value < u_domain[0]) || (!u_clampHigh && value > u_domain[1])) {\n gl_FragColor = vec4(0.0, 0, 0, 0.0);\n } else {\n \n gl_FragColor = getColor(value);\n gl_FragColor.a = gl_FragColor.a * u_opacity ;\n if(gl_FragColor.a < 0.01)\n discard;\n }\n}\n";
|
|
20
|
-
|
|
21
16
|
/* babel-plugin-inline-import '../shaders/rater_terrain_rgb_vert.glsl' */
|
|
22
17
|
var Raster_terrainVert = "precision highp float;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nattribute vec3 a_Position;\nattribute vec2 a_Uv;\nvarying vec2 v_texCoord;\n#pragma include \"projection\"\nvoid main() {\n v_texCoord = a_Uv;\n vec4 project_pos = project_position(vec4(a_Position, 1.0));\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\n }\n}\n";
|
|
23
|
-
|
|
24
18
|
var RasterTerrainRGB = /*#__PURE__*/function (_BaseModel) {
|
|
25
19
|
_inherits(RasterTerrainRGB, _BaseModel);
|
|
26
|
-
|
|
27
20
|
var _super = _createSuper(RasterTerrainRGB);
|
|
28
|
-
|
|
29
21
|
function RasterTerrainRGB() {
|
|
30
22
|
_classCallCheck(this, RasterTerrainRGB);
|
|
31
|
-
|
|
32
23
|
return _super.apply(this, arguments);
|
|
33
24
|
}
|
|
34
|
-
|
|
35
25
|
_createClass(RasterTerrainRGB, [{
|
|
36
26
|
key: "getUninforms",
|
|
37
27
|
value: function getUninforms() {
|
|
38
28
|
var _ref = this.layer.getLayerConfig(),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
29
|
+
opacity = _ref.opacity,
|
|
30
|
+
_ref$clampLow = _ref.clampLow,
|
|
31
|
+
clampLow = _ref$clampLow === void 0 ? true : _ref$clampLow,
|
|
32
|
+
_ref$clampHigh = _ref.clampHigh,
|
|
33
|
+
clampHigh = _ref$clampHigh === void 0 ? true : _ref$clampHigh,
|
|
34
|
+
_ref$noDataValue = _ref.noDataValue,
|
|
35
|
+
noDataValue = _ref$noDataValue === void 0 ? -9999999 : _ref$noDataValue,
|
|
36
|
+
domain = _ref.domain,
|
|
37
|
+
rampColors = _ref.rampColors,
|
|
38
|
+
colorTexture = _ref.colorTexture,
|
|
39
|
+
_ref$rScaler = _ref.rScaler,
|
|
40
|
+
rScaler = _ref$rScaler === void 0 ? 6553.6 : _ref$rScaler,
|
|
41
|
+
_ref$gScaler = _ref.gScaler,
|
|
42
|
+
gScaler = _ref$gScaler === void 0 ? 25.6 : _ref$gScaler,
|
|
43
|
+
_ref$bScaler = _ref.bScaler,
|
|
44
|
+
bScaler = _ref$bScaler === void 0 ? 0.1 : _ref$bScaler,
|
|
45
|
+
_ref$offset = _ref.offset,
|
|
46
|
+
offset = _ref$offset === void 0 ? 10000 : _ref$offset;
|
|
58
47
|
var newdomain = domain || getDefaultDomain(rampColors);
|
|
59
48
|
var texture = colorTexture;
|
|
60
|
-
|
|
61
49
|
if (!colorTexture) {
|
|
62
50
|
texture = this.layer.textureService.getColorTexture(rampColors, newdomain);
|
|
63
51
|
} else {
|
|
64
52
|
this.layer.textureService.setColorTexture(colorTexture, rampColors, newdomain);
|
|
65
53
|
}
|
|
66
|
-
|
|
67
54
|
return {
|
|
68
55
|
u_opacity: opacity || 1,
|
|
69
56
|
u_texture: this.texture,
|
|
@@ -81,58 +68,50 @@ var RasterTerrainRGB = /*#__PURE__*/function (_BaseModel) {
|
|
|
81
68
|
var _initModels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
82
69
|
var source, createTexture2D, imageData, model;
|
|
83
70
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
84
|
-
while (1) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
imageData
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
case 10:
|
|
118
|
-
case "end":
|
|
119
|
-
return _context.stop();
|
|
120
|
-
}
|
|
71
|
+
while (1) switch (_context.prev = _context.next) {
|
|
72
|
+
case 0:
|
|
73
|
+
source = this.layer.getSource();
|
|
74
|
+
createTexture2D = this.rendererService.createTexture2D;
|
|
75
|
+
_context.next = 4;
|
|
76
|
+
return source.data.images;
|
|
77
|
+
case 4:
|
|
78
|
+
imageData = _context.sent;
|
|
79
|
+
this.texture = createTexture2D({
|
|
80
|
+
data: imageData[0],
|
|
81
|
+
width: imageData[0].width,
|
|
82
|
+
height: imageData[0].height,
|
|
83
|
+
min: gl.LINEAR,
|
|
84
|
+
mag: gl.LINEAR
|
|
85
|
+
});
|
|
86
|
+
_context.next = 8;
|
|
87
|
+
return this.layer.buildLayerModel({
|
|
88
|
+
moduleName: 'RasterTileDataImage',
|
|
89
|
+
vertexShader: Raster_terrainVert,
|
|
90
|
+
fragmentShader: Raster_terrainFrag,
|
|
91
|
+
triangulation: RasterImageTriangulation,
|
|
92
|
+
primitive: gl.TRIANGLES,
|
|
93
|
+
depth: {
|
|
94
|
+
enable: false
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
case 8:
|
|
98
|
+
model = _context.sent;
|
|
99
|
+
return _context.abrupt("return", [model]);
|
|
100
|
+
case 10:
|
|
101
|
+
case "end":
|
|
102
|
+
return _context.stop();
|
|
121
103
|
}
|
|
122
104
|
}, _callee, this);
|
|
123
105
|
}));
|
|
124
|
-
|
|
125
106
|
function initModels() {
|
|
126
107
|
return _initModels.apply(this, arguments);
|
|
127
108
|
}
|
|
128
|
-
|
|
129
109
|
return initModels;
|
|
130
110
|
}()
|
|
131
111
|
}, {
|
|
132
112
|
key: "clearModels",
|
|
133
113
|
value: function clearModels() {
|
|
134
114
|
var _this$texture;
|
|
135
|
-
|
|
136
115
|
(_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
|
|
137
116
|
}
|
|
138
117
|
}, {
|
|
@@ -140,23 +119,18 @@ var RasterTerrainRGB = /*#__PURE__*/function (_BaseModel) {
|
|
|
140
119
|
value: function () {
|
|
141
120
|
var _buildModels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
142
121
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
143
|
-
while (1) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
case "end":
|
|
150
|
-
return _context2.stop();
|
|
151
|
-
}
|
|
122
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
123
|
+
case 0:
|
|
124
|
+
return _context2.abrupt("return", this.initModels());
|
|
125
|
+
case 1:
|
|
126
|
+
case "end":
|
|
127
|
+
return _context2.stop();
|
|
152
128
|
}
|
|
153
129
|
}, _callee2, this);
|
|
154
130
|
}));
|
|
155
|
-
|
|
156
131
|
function buildModels() {
|
|
157
132
|
return _buildModels.apply(this, arguments);
|
|
158
133
|
}
|
|
159
|
-
|
|
160
134
|
return buildModels;
|
|
161
135
|
}()
|
|
162
136
|
}, {
|
|
@@ -180,8 +154,6 @@ var RasterTerrainRGB = /*#__PURE__*/function (_BaseModel) {
|
|
|
180
154
|
});
|
|
181
155
|
}
|
|
182
156
|
}]);
|
|
183
|
-
|
|
184
157
|
return RasterTerrainRGB;
|
|
185
158
|
}(BaseModel);
|
|
186
|
-
|
|
187
159
|
export { RasterTerrainRGB as default };
|
|
@@ -2,26 +2,25 @@ 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;
|
|
5
|
-
|
|
6
5
|
var bbox = (tile === null || tile === void 0 ? void 0 : (_tile$bboxPolygon = tile.bboxPolygon) === null || _tile$bboxPolygon === void 0 ? void 0 : _tile$bboxPolygon.bbox) || [0, 0, 10, -10];
|
|
7
|
-
|
|
8
6
|
var _bbox = _slicedToArray(bbox, 4),
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
_bbox$ = _bbox[0],
|
|
8
|
+
minLng = _bbox$ === void 0 ? 0 : _bbox$,
|
|
9
|
+
_bbox$2 = _bbox[1],
|
|
10
|
+
minLat = _bbox$2 === void 0 ? 0 : _bbox$2,
|
|
11
|
+
_bbox$3 = _bbox[2],
|
|
12
|
+
maxLng = _bbox$3 === void 0 ? 10 : _bbox$3,
|
|
13
|
+
_bbox$4 = _bbox[3],
|
|
14
|
+
maxLat = _bbox$4 === void 0 ? -10 : _bbox$4;
|
|
18
15
|
var tileXY = mapService.lngLatToContainer([minLng, minLat]);
|
|
19
16
|
var tileMaxXY = mapService.lngLatToContainer([maxLng, maxLat]);
|
|
20
17
|
var tilePixelWidth = tileMaxXY.x - tileXY.x;
|
|
21
18
|
var tilePixelHeight = tileXY.y - tileMaxXY.y;
|
|
22
|
-
var pos = [(x - tileXY.x) / tilePixelWidth,
|
|
19
|
+
var pos = [(x - tileXY.x) / tilePixelWidth,
|
|
20
|
+
// x
|
|
23
21
|
(y - tileMaxXY.y) / tilePixelHeight // y
|
|
24
22
|
];
|
|
23
|
+
|
|
25
24
|
var tileWidth = (tile === null || tile === void 0 ? void 0 : (_tile$data = tile.data) === null || _tile$data === void 0 ? void 0 : _tile$data.width) || 1;
|
|
26
25
|
var tileHeight = (tile === null || tile === void 0 ? void 0 : (_tile$data2 = tile.data) === null || _tile$data2 === void 0 ? void 0 : _tile$data2.height) || 1;
|
|
27
26
|
var indexX = Math.floor(pos[0] * tileWidth);
|
|
@@ -32,21 +31,17 @@ export function readRasterValue(tile, mapService, x, y) {
|
|
|
32
31
|
}
|
|
33
32
|
export function readPixel(x, y, rendererService) {
|
|
34
33
|
var readPixels = rendererService.readPixels,
|
|
35
|
-
|
|
34
|
+
getContainer = rendererService.getContainer;
|
|
36
35
|
var xInDevicePixel = x * DOM.DPR;
|
|
37
36
|
var yInDevicePixel = y * DOM.DPR;
|
|
38
|
-
|
|
39
37
|
var _getContainerSize = getContainerSize(getContainer()),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
width = _getContainerSize.width,
|
|
39
|
+
height = _getContainerSize.height;
|
|
43
40
|
width *= DOM.DPR;
|
|
44
41
|
height *= DOM.DPR;
|
|
45
|
-
|
|
46
42
|
if (xInDevicePixel > width - 1 * DOM.DPR || xInDevicePixel < 0 || yInDevicePixel > height - 1 * DOM.DPR || yInDevicePixel < 0) {
|
|
47
43
|
return false;
|
|
48
44
|
}
|
|
49
|
-
|
|
50
45
|
var pickedColors = readPixels({
|
|
51
46
|
x: Math.floor(xInDevicePixel),
|
|
52
47
|
// 视口坐标系原点在左上,而 WebGL 在左下,需要翻转 Y 轴
|
|
@@ -57,7 +52,6 @@ export function readPixel(x, y, rendererService) {
|
|
|
57
52
|
});
|
|
58
53
|
return pickedColors;
|
|
59
54
|
}
|
|
60
|
-
|
|
61
55
|
function getContainerSize(container) {
|
|
62
56
|
if (container.getContext) {
|
|
63
57
|
return {
|
|
@@ -20,12 +20,11 @@ export function setSelect(layers, pickedColors, renderList) {
|
|
|
20
20
|
pickColor = pickedColors;
|
|
21
21
|
} else {
|
|
22
22
|
selectFeature(layer, new Uint8Array([0, 0, 0, 0])); // toggle select
|
|
23
|
-
|
|
24
23
|
layer.setCurrentSelectedId(null);
|
|
25
24
|
pickColor = null;
|
|
26
25
|
}
|
|
27
|
-
});
|
|
28
|
-
|
|
26
|
+
});
|
|
27
|
+
// unselect normal layer
|
|
29
28
|
renderList.filter(function (layer) {
|
|
30
29
|
return layer.inited && layer.isVisible() && layer.needPick('click');
|
|
31
30
|
}).filter(function (layer) {
|
|
@@ -40,7 +39,8 @@ export function setHighlight(layers, pickedColors) {
|
|
|
40
39
|
var pickId = decodePickingColor(pickedColors);
|
|
41
40
|
layers.filter(function (layer) {
|
|
42
41
|
return layer.inited && layer.isVisible();
|
|
43
|
-
})
|
|
42
|
+
})
|
|
43
|
+
// @ts-ignore
|
|
44
44
|
.filter(function (layer) {
|
|
45
45
|
return layer.getPickID() !== pickId;
|
|
46
46
|
}).map(function (layer) {
|
|
@@ -55,7 +55,6 @@ export function setPickState(layers, pickColors) {
|
|
|
55
55
|
selectFeature(layer, pickColors.select);
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
|
|
59
58
|
if (pickColors.active) {
|
|
60
59
|
layers.filter(function (layer) {
|
|
61
60
|
return layer.inited && layer.isVisible();
|
|
@@ -67,10 +66,9 @@ export function setPickState(layers, pickColors) {
|
|
|
67
66
|
export function selectFeature(layer, pickedColors) {
|
|
68
67
|
// @ts-ignore
|
|
69
68
|
var _pickedColors = _slicedToArray(pickedColors, 3),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
r = _pickedColors[0],
|
|
70
|
+
g = _pickedColors[1],
|
|
71
|
+
b = _pickedColors[2];
|
|
74
72
|
layer.hooks.beforeSelect.call([r, g, b]);
|
|
75
73
|
}
|
|
76
74
|
export function setFeatureSelect(color, layers) {
|