@antv/l7-layers 2.19.11 → 2.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/es/canvas/models/canvas.js +2 -2
  2. package/es/core/BaseLayer.d.ts +1 -1
  3. package/es/core/BaseLayer.js +18 -11
  4. package/es/core/BaseModel.d.ts +3 -1
  5. package/es/core/BaseModel.js +28 -4
  6. package/es/core/CommonStyleAttribute.d.ts +15 -0
  7. package/es/core/CommonStyleAttribute.js +21 -0
  8. package/es/core/TextureService.js +2 -2
  9. package/es/earth/index.js +1 -1
  10. package/es/geometry/index.js +1 -1
  11. package/es/geometry/models/billboard.js +1 -1
  12. package/es/geometry/models/plane.js +2 -2
  13. package/es/geometry/models/sprite.js +2 -2
  14. package/es/heatmap/index.js +1 -1
  15. package/es/heatmap/models/heatmap.js +4 -4
  16. package/es/image/models/image.js +1 -1
  17. package/es/line/index.js +1 -1
  18. package/es/line/models/arc.js +1 -1
  19. package/es/line/models/arc_3d.js +1 -1
  20. package/es/line/models/earthArc_3d.js +1 -1
  21. package/es/line/models/great_circle.js +1 -1
  22. package/es/line/models/line.js +1 -1
  23. package/es/line/models/linearline.js +1 -1
  24. package/es/line/models/wall.js +1 -1
  25. package/es/plugins/DataMappingPlugin.js +1 -1
  26. package/es/plugins/PixelPickingPlugin.d.ts +4 -1
  27. package/es/plugins/PixelPickingPlugin.js +91 -22
  28. package/es/plugins/RegisterStyleAttributePlugin.d.ts +0 -1
  29. package/es/plugins/RegisterStyleAttributePlugin.js +4 -22
  30. package/es/plugins/ShaderUniformPlugin.d.ts +2 -0
  31. package/es/plugins/ShaderUniformPlugin.js +74 -6
  32. package/es/point/index.js +1 -1
  33. package/es/point/models/fill.js +31 -7
  34. package/es/point/models/fillmage.js +1 -1
  35. package/es/point/models/image.js +1 -1
  36. package/es/point/models/normal.js +30 -12
  37. package/es/point/models/text.js +1 -1
  38. package/es/point/shaders/fill_frag.glsl +20 -14
  39. package/es/point/shaders/fill_vert.glsl +19 -18
  40. package/es/point/shaders/normal_frag.glsl +4 -3
  41. package/es/point/shaders/normal_vert.glsl +12 -11
  42. package/es/polygon/index.js +1 -1
  43. package/es/polygon/models/extrude.js +1 -1
  44. package/es/polygon/models/extrusion.js +1 -1
  45. package/es/polygon/models/ocean.js +3 -3
  46. package/es/polygon/models/water.js +1 -1
  47. package/es/raster/models/raster.js +2 -2
  48. package/es/raster/models/rasterRgb.js +1 -1
  49. package/es/raster/models/rasterTerrainRgb.js +1 -1
  50. package/es/tile/core/BaseLayer.js +4 -4
  51. package/es/tile/interaction/getRasterData.js +4 -4
  52. package/es/tile/service/TileLayerService.js +4 -4
  53. package/es/tile/service/TilePickService.js +3 -3
  54. package/es/tile/tile/Tile.d.ts +3 -0
  55. package/es/tile/tile/Tile.js +2 -2
  56. package/es/wind/models/wind.js +5 -6
  57. package/lib/canvas/index.js +2 -3
  58. package/lib/canvas/models/canvas.js +4 -5
  59. package/lib/canvas/models/index.js +1 -2
  60. package/lib/citybuliding/building.js +2 -3
  61. package/lib/citybuliding/models/build.js +2 -3
  62. package/lib/core/BaseLayer.js +19 -13
  63. package/lib/core/BaseModel.js +30 -7
  64. package/lib/core/CommonStyleAttribute.js +22 -0
  65. package/lib/core/LayerPickService.js +2 -3
  66. package/lib/core/TextureService.js +4 -5
  67. package/lib/core/constant.js +3 -5
  68. package/lib/core/interface.js +6 -11
  69. package/lib/core/schema.js +2 -3
  70. package/lib/core/shape/Path.js +3 -6
  71. package/lib/core/triangulation.js +2 -2
  72. package/lib/earth/index.js +3 -4
  73. package/lib/earth/models/atmosphere.js +2 -3
  74. package/lib/earth/models/base.js +2 -3
  75. package/lib/earth/models/bloomsphere.js +2 -3
  76. package/lib/earth/utils.js +3 -6
  77. package/lib/geometry/index.js +3 -4
  78. package/lib/geometry/models/billboard.js +3 -4
  79. package/lib/geometry/models/index.js +1 -2
  80. package/lib/geometry/models/plane.js +4 -5
  81. package/lib/geometry/models/sprite.js +4 -5
  82. package/lib/heatmap/index.js +3 -4
  83. package/lib/heatmap/models/grid.js +2 -3
  84. package/lib/heatmap/models/grid3d.js +2 -3
  85. package/lib/heatmap/models/heatmap.js +6 -7
  86. package/lib/heatmap/models/hexagon.js +2 -3
  87. package/lib/heatmap/models/index.js +1 -2
  88. package/lib/image/index.js +2 -3
  89. package/lib/image/models/image.js +3 -4
  90. package/lib/image/models/index.js +1 -2
  91. package/lib/line/index.js +3 -4
  92. package/lib/line/models/arc.js +3 -4
  93. package/lib/line/models/arc_3d.js +3 -4
  94. package/lib/line/models/earthArc_3d.js +3 -4
  95. package/lib/line/models/flow.js +2 -3
  96. package/lib/line/models/great_circle.js +3 -4
  97. package/lib/line/models/index.js +1 -2
  98. package/lib/line/models/line.js +3 -4
  99. package/lib/line/models/linearline.js +3 -4
  100. package/lib/line/models/simpleLine.js +2 -3
  101. package/lib/line/models/wall.js +3 -4
  102. package/lib/mask/index.js +2 -3
  103. package/lib/mask/models/fill.js +2 -3
  104. package/lib/mask/models/index.js +1 -2
  105. package/lib/plugins/DataMappingPlugin.js +3 -4
  106. package/lib/plugins/DataSourcePlugin.js +2 -3
  107. package/lib/plugins/FeatureScalePlugin.js +4 -5
  108. package/lib/plugins/LayerAnimateStylePlugin.js +2 -3
  109. package/lib/plugins/LayerMaskPlugin.js +2 -3
  110. package/lib/plugins/LayerModelPlugin.js +2 -3
  111. package/lib/plugins/LayerStylePlugin.js +2 -3
  112. package/lib/plugins/LightingPlugin.js +2 -3
  113. package/lib/plugins/MultiPassRendererPlugin.js +2 -3
  114. package/lib/plugins/PixelPickingPlugin.js +93 -25
  115. package/lib/plugins/RegisterStyleAttributePlugin.js +6 -25
  116. package/lib/plugins/ShaderUniformPlugin.js +75 -8
  117. package/lib/plugins/UpdateModelPlugin.js +2 -3
  118. package/lib/plugins/UpdateStyleAttributePlugin.js +2 -3
  119. package/lib/point/index.js +3 -4
  120. package/lib/point/models/billboard_point.js +2 -3
  121. package/lib/point/models/earthExtrude.js +2 -3
  122. package/lib/point/models/earthFill.js +2 -3
  123. package/lib/point/models/extrude.js +2 -3
  124. package/lib/point/models/fill.js +33 -10
  125. package/lib/point/models/fillmage.js +3 -4
  126. package/lib/point/models/image.js +3 -4
  127. package/lib/point/models/index.js +1 -2
  128. package/lib/point/models/normal.js +32 -15
  129. package/lib/point/models/radar.js +2 -3
  130. package/lib/point/models/text.js +3 -4
  131. package/lib/point/shaders/fill_frag.glsl +20 -14
  132. package/lib/point/shaders/fill_vert.glsl +19 -18
  133. package/lib/point/shaders/normal_frag.glsl +4 -3
  134. package/lib/point/shaders/normal_vert.glsl +12 -11
  135. package/lib/polygon/index.js +3 -4
  136. package/lib/polygon/models/extrude.js +3 -4
  137. package/lib/polygon/models/extrusion.js +3 -4
  138. package/lib/polygon/models/fill.js +2 -3
  139. package/lib/polygon/models/index.js +1 -2
  140. package/lib/polygon/models/ocean.js +5 -6
  141. package/lib/polygon/models/water.js +3 -4
  142. package/lib/raster/index.js +2 -3
  143. package/lib/raster/models/index.js +1 -2
  144. package/lib/raster/models/raster.js +4 -5
  145. package/lib/raster/models/rasterRgb.js +3 -4
  146. package/lib/raster/models/rasterTerrainRgb.js +3 -4
  147. package/lib/tile/core/BaseLayer.js +6 -7
  148. package/lib/tile/core/TileDebugLayer.js +2 -3
  149. package/lib/tile/interaction/getRasterData.js +4 -4
  150. package/lib/tile/service/TileLayerService.js +6 -7
  151. package/lib/tile/service/TilePickService.js +5 -6
  152. package/lib/tile/service/TileSourceService.js +4 -5
  153. package/lib/tile/tile/DebugTile.js +2 -3
  154. package/lib/tile/tile/ImageTile.js +2 -3
  155. package/lib/tile/tile/MaskTile.js +2 -3
  156. package/lib/tile/tile/RasterRGBTile.js +2 -3
  157. package/lib/tile/tile/RasterTerrainRGBTile.js +2 -3
  158. package/lib/tile/tile/RasterTile.js +2 -3
  159. package/lib/tile/tile/Tile.js +4 -5
  160. package/lib/tile/tile/VectorTile.js +2 -3
  161. package/lib/tile/utils/constants.js +2 -3
  162. package/lib/tile/utils/utils.js +1 -2
  163. package/lib/utils/blend.js +2 -3
  164. package/lib/utils/collision-index.js +2 -3
  165. package/lib/utils/extrude_polyline.js +2 -3
  166. package/lib/utils/grid-index.js +1 -2
  167. package/lib/utils/simpleLine.js +2 -3
  168. package/lib/wind/index.js +2 -3
  169. package/lib/wind/models/index.js +1 -2
  170. package/lib/wind/models/wind.js +7 -9
  171. package/lib/wind/models/windRender.js +4 -5
  172. package/lib/wind/models/windShader.js +6 -12
  173. package/package.json +7 -7
@@ -29,7 +29,7 @@ var SPRITE_ANIMATE_DIR = /*#__PURE__*/function (SPRITE_ANIMATE_DIR) {
29
29
  SPRITE_ANIMATE_DIR["DOWN"] = "down";
30
30
  return SPRITE_ANIMATE_DIR;
31
31
  }(SPRITE_ANIMATE_DIR || {});
32
- var SpriteModel = /*#__PURE__*/function (_BaseModel) {
32
+ var SpriteModel = exports.default = /*#__PURE__*/function (_BaseModel) {
33
33
  (0, _inherits2.default)(SpriteModel, _BaseModel);
34
34
  var _super = _createSuper(SpriteModel);
35
35
  function SpriteModel() {
@@ -148,7 +148,7 @@ var SpriteModel = /*#__PURE__*/function (_BaseModel) {
148
148
  if (this.mapTexture !== mapTexture) {
149
149
  var _this$texture;
150
150
  this.mapTexture = mapTexture;
151
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
151
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
152
152
  this.updateTexture(mapTexture);
153
153
  }
154
154
  return {
@@ -163,7 +163,7 @@ var SpriteModel = /*#__PURE__*/function (_BaseModel) {
163
163
  value: function clearModels() {
164
164
  var _this$texture2;
165
165
  cancelAnimationFrame(this.timer);
166
- (_this$texture2 = this.texture) === null || _this$texture2 === void 0 ? void 0 : _this$texture2.destroy();
166
+ (_this$texture2 = this.texture) === null || _this$texture2 === void 0 || _this$texture2.destroy();
167
167
  }
168
168
  }, {
169
169
  key: "initModels",
@@ -266,5 +266,4 @@ var SpriteModel = /*#__PURE__*/function (_BaseModel) {
266
266
  }
267
267
  }]);
268
268
  return SpriteModel;
269
- }(_BaseModel2.default);
270
- exports.default = SpriteModel;
269
+ }(_BaseModel2.default);
@@ -18,7 +18,7 @@ var _BaseLayer2 = _interopRequireDefault(require("../core/BaseLayer"));
18
18
  var _models = _interopRequireDefault(require("./models"));
19
19
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
20
20
  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; } }
21
- var HeatMapLayer = /*#__PURE__*/function (_BaseLayer) {
21
+ var HeatMapLayer = exports.default = /*#__PURE__*/function (_BaseLayer) {
22
22
  (0, _inherits2.default)(HeatMapLayer, _BaseLayer);
23
23
  var _super = _createSuper(HeatMapLayer);
24
24
  function HeatMapLayer() {
@@ -99,7 +99,7 @@ var HeatMapLayer = /*#__PURE__*/function (_BaseLayer) {
99
99
  shape3d = _this$getLayerConfig.shape3d;
100
100
  var source = this.getSource();
101
101
  var sourceType = source.data.type;
102
- var shape = (shapeAttribute === null || shapeAttribute === void 0 ? void 0 : (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field) || 'heatmap';
102
+ var shape = (shapeAttribute === null || shapeAttribute === void 0 || (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field) || 'heatmap';
103
103
  if (shape === 'heatmap' || shape === 'heatmap3d') {
104
104
  return 'heatmap';
105
105
  }
@@ -113,5 +113,4 @@ var HeatMapLayer = /*#__PURE__*/function (_BaseLayer) {
113
113
  }
114
114
  }]);
115
115
  return HeatMapLayer;
116
- }(_BaseLayer2.default);
117
- exports.default = HeatMapLayer;
116
+ }(_BaseLayer2.default);
@@ -21,7 +21,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
21
21
  var heatmapGridVert = "precision highp float;\r\n// \u591A\u8FB9\u5F62\u9876\u70B9\u5750\u6807\r\nattribute vec3 a_Position;\r\n// \u591A\u8FB9\u5F62\u7ECF\u7EAC\u5EA6\u5750\u6807\r\nattribute vec3 a_Pos;\r\nattribute float a_Size;\r\nattribute vec4 a_Color;\r\nuniform vec2 u_radius;\r\nuniform float u_coverage: 0.9;\r\nuniform float u_angle: 0;\r\nuniform mat4 u_ModelMatrix;\r\n\r\nvarying vec4 v_color;\r\n\r\nuniform vec2 u_sceneCenterMercator;\r\n\r\n#pragma include \"projection\"\r\n#pragma include \"project\"\r\n#pragma include \"picking\"\r\n\r\nvoid main() {\r\n v_color = a_Color;\r\n\r\n mat2 rotationMatrix = mat2(cos(u_angle), sin(u_angle), -sin(u_angle), cos(u_angle));\r\n vec2 offset = a_Position.xy * u_radius * rotationMatrix * u_coverage ;\r\n // vec2 lnglat = unProjectFlat(a_Pos.xy + offset);\r\n // vec4 project_pos = project_position(vec4(lnglat, 0, 1.0));\r\n // gl_Position = project_common_position_to_clipspace(project_pos);\r\n\r\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n vec2 lnglat = unProjectFlat(a_Pos.xy + offset);\r\n vec2 customLnglat = customProject(lnglat) - u_sceneCenterMercator; // \u5C06\u7ECF\u7EAC\u5EA6\u8F6C\u6362\u4E3A\u9AD8\u5FB72.0\u9700\u8981\u7684\u5E73\u9762\u5750\u6807\r\n vec4 project_pos = project_position(vec4(customLnglat, 0, 1.0));\r\n gl_Position = u_Mvp * (project_pos);\r\n } else {\r\n vec2 lnglat = unProjectFlat(a_Pos.xy + offset);\r\n vec4 project_pos = project_position(vec4(lnglat, 0, 1.0));\r\n gl_Position = project_common_position_to_clipspace(project_pos);\r\n }\r\n\r\n setPickingColor(a_PickingColor);\r\n}\r\n";
22
22
  /* babel-plugin-inline-import '../shaders/hexagon_frag.glsl' */
23
23
  var heatmapGridFrag = "precision highp float;\nvarying vec4 v_color;\nuniform float u_opacity: 1;\n\n#pragma include \"picking\"\n\nvoid main() {\n gl_FragColor = v_color;\n gl_FragColor.a *= u_opacity;\n\n gl_FragColor = filterColor(gl_FragColor);\n}\n";
24
- var GridModel = /*#__PURE__*/function (_BaseModel) {
24
+ var GridModel = exports.default = /*#__PURE__*/function (_BaseModel) {
25
25
  (0, _inherits2.default)(GridModel, _BaseModel);
26
26
  var _super = _createSuper(GridModel);
27
27
  function GridModel() {
@@ -118,5 +118,4 @@ var GridModel = /*#__PURE__*/function (_BaseModel) {
118
118
  }
119
119
  }]);
120
120
  return GridModel;
121
- }(_BaseModel2.default);
122
- exports.default = GridModel;
121
+ }(_BaseModel2.default);
@@ -21,7 +21,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
21
21
  var heatmapGrid3dVert = "precision highp float;\n// \u591A\u8FB9\u5F62\u9876\u70B9\u5750\u6807\nattribute vec3 a_Position;\n// \u591A\u8FB9\u5F62\u7ECF\u7EAC\u5EA6\u5750\u6807\nattribute vec3 a_Pos;\n\nattribute vec3 a_Normal;\nattribute float a_Size;\nattribute vec4 a_Color;\nuniform vec2 u_radius;\nuniform float u_coverage: 0.9;\nuniform float u_angle: 0;\nuniform mat4 u_ModelMatrix;\n\nvarying vec4 v_color;\n\nuniform vec2 u_sceneCenterMercator;\n\n#pragma include \"projection\"\n#pragma include \"project\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\n\nvoid main() {\n mat2 rotationMatrix = mat2(cos(u_angle), sin(u_angle), -sin(u_angle), cos(u_angle));\n vec2 offset =(vec2(a_Position.xy * u_radius * rotationMatrix * u_coverage));\n\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n \n vec2 lnglat = unProjectFlat(a_Pos.xy + offset); // \u7ECF\u7EAC\u5EA6\n vec2 customLnglat = customProject(lnglat) - u_sceneCenterMercator; // \u5C06\u7ECF\u7EAC\u5EA6\u8F6C\u6362\u4E3A\u9AD8\u5FB72.0\u9700\u8981\u7684\u5E73\u9762\u5750\u6807\n vec4 project_pos = project_position(vec4(customLnglat, a_Position.z * a_Size, 1.0));\n\n float lightWeight = calc_lighting(project_pos);\n v_color =vec4(a_Color.rgb*lightWeight, a_Color.w);\n \n gl_Position = u_Mvp * vec4(customLnglat , a_Position.z * a_Size, 1.0);\n } else {\n vec2 lnglat = unProjectFlat(a_Pos.xy + offset); // \u5B9E\u9645\u7684\u7ECF\u7EAC\u5EA6\n vec4 project_pos = project_position(vec4(lnglat, a_Position.z * a_Size, 1.0));\n \n float lightWeight = calc_lighting(project_pos);\n v_color =vec4(a_Color.rgb*lightWeight, a_Color.w);\n \n gl_Position = project_common_position_to_clipspace(project_pos);\n }\n\n\n\n setPickingColor(a_PickingColor);\n}\n";
22
22
  /* babel-plugin-inline-import '../shaders/hexagon_frag.glsl' */
23
23
  var heatmapGridFrag = "precision highp float;\nvarying vec4 v_color;\nuniform float u_opacity: 1;\n\n#pragma include \"picking\"\n\nvoid main() {\n gl_FragColor = v_color;\n gl_FragColor.a *= u_opacity;\n\n gl_FragColor = filterColor(gl_FragColor);\n}\n";
24
- var Grid3DModel = /*#__PURE__*/function (_BaseModel) {
24
+ var Grid3DModel = exports.default = /*#__PURE__*/function (_BaseModel) {
25
25
  (0, _inherits2.default)(Grid3DModel, _BaseModel);
26
26
  var _super = _createSuper(Grid3DModel);
27
27
  function Grid3DModel() {
@@ -151,5 +151,4 @@ var Grid3DModel = /*#__PURE__*/function (_BaseModel) {
151
151
  }
152
152
  }]);
153
153
  return Grid3DModel;
154
- }(_BaseModel2.default);
155
- exports.default = Grid3DModel;
154
+ }(_BaseModel2.default);
@@ -38,7 +38,7 @@ var heatmapFramebufferFrag = "precision highp float;\nuniform float u_intensity;
38
38
  /* babel-plugin-inline-import '../shaders/heatmap_framebuffer_vert.glsl' */
39
39
  var heatmapFramebufferVert = "precision highp float;\nattribute vec3 a_Position;\nattribute float a_Size;\nattribute vec2 a_Dir;\nuniform float u_intensity;\nuniform float u_radius;\nvarying vec2 v_extrude;\nvarying float v_weight;\nuniform mat4 u_ModelMatrix;\n\n\n#define GAUSS_COEF 0.3989422804014327\n\n#pragma include \"projection\"\n\nvoid main(){\n v_weight = a_Size;\n float ZERO = 1.0 / 255.0 / 16.0;\n float extrude_x = a_Dir.x * 2.0 -1.0;\n float extrude_y = a_Dir.y * 2.0 -1.0;\n vec2 extrude_dir = normalize(vec2(extrude_x,extrude_y));\n float S = sqrt(-2.0 * log(ZERO / a_Size / u_intensity / GAUSS_COEF)) / 2.5;\n v_extrude = extrude_dir * S;\n\n vec2 offset = project_pixel(v_extrude * u_radius);\n vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0));\n\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy + offset, 0.0, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));\n }\n}\n";
40
40
  var isEqual = _l7Utils.lodashUtil.isEqual;
41
- var HeatMapModel = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE__*/function (_BaseModel) {
41
+ var HeatMapModel = exports.default = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE__*/function (_BaseModel) {
42
42
  (0, _inherits2.default)(HeatMapModel, _BaseModel);
43
43
  var _super = _createSuper(HeatMapModel);
44
44
  function HeatMapModel() {
@@ -84,7 +84,7 @@ var HeatMapModel = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE
84
84
  case 0:
85
85
  _this$rendererService2 = this.rendererService, createFramebuffer = _this$rendererService2.createFramebuffer, getViewportSize = _this$rendererService2.getViewportSize, createTexture2D = _this$rendererService2.createTexture2D;
86
86
  shapeAttr = this.styleAttributeService.getLayerStyleAttribute('shape');
87
- shapeType = (shapeAttr === null || shapeAttr === void 0 ? void 0 : (_shapeAttr$scale = shapeAttr.scale) === null || _shapeAttr$scale === void 0 ? void 0 : _shapeAttr$scale.field) || 'heatmap';
87
+ shapeType = (shapeAttr === null || shapeAttr === void 0 || (_shapeAttr$scale = shapeAttr.scale) === null || _shapeAttr$scale === void 0 ? void 0 : _shapeAttr$scale.field) || 'heatmap';
88
88
  this.shapeType = shapeType;
89
89
  // 生成热力图密度图
90
90
  _context.next = 6;
@@ -273,7 +273,7 @@ var HeatMapModel = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE
273
273
  this.layerService.beforeRenderData(this.layer);
274
274
  this.layer.hooks.beforeRender.call();
275
275
  // 绘制密度图
276
- (_this$intensityModel = this.intensityModel) === null || _this$intensityModel === void 0 ? void 0 : _this$intensityModel.draw({
276
+ (_this$intensityModel = this.intensityModel) === null || _this$intensityModel === void 0 || _this$intensityModel.draw({
277
277
  uniforms: {
278
278
  u_opacity: opacity || 1.0,
279
279
  u_radius: radius,
@@ -307,7 +307,7 @@ var HeatMapModel = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE
307
307
  var _this$colorModel;
308
308
  var _ref3 = this.layer.getLayerConfig(),
309
309
  opacity = _ref3.opacity;
310
- (_this$colorModel = this.colorModel) === null || _this$colorModel === void 0 ? void 0 : _this$colorModel.draw({
310
+ (_this$colorModel = this.colorModel) === null || _this$colorModel === void 0 || _this$colorModel.draw({
311
311
  uniforms: {
312
312
  u_opacity: opacity || 1.0,
313
313
  u_colorTexture: this.colorTexture,
@@ -333,7 +333,7 @@ var HeatMapModel = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE
333
333
  // ) as mat4;
334
334
  var invert = _glMatrix.mat4.create();
335
335
  _glMatrix.mat4.invert(invert, this.cameraService.getViewProjectionMatrixUncentered());
336
- (_this$colorModel2 = this.colorModel) === null || _this$colorModel2 === void 0 ? void 0 : _this$colorModel2.draw({
336
+ (_this$colorModel2 = this.colorModel) === null || _this$colorModel2 === void 0 || _this$colorModel2.draw({
337
337
  uniforms: {
338
338
  u_opacity: opacity || 1.0,
339
339
  u_colorTexture: this.colorTexture,
@@ -443,5 +443,4 @@ var HeatMapModel = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE
443
443
  }
444
444
  }]);
445
445
  return HeatMapModel;
446
- }(_BaseModel2.default)) || _class);
447
- exports.default = HeatMapModel;
446
+ }(_BaseModel2.default)) || _class);
@@ -21,7 +21,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
21
21
  var heatmapGridFrag = "precision highp float;\nvarying vec4 v_color;\nuniform float u_opacity: 1;\n\n#pragma include \"picking\"\n\nvoid main() {\n gl_FragColor = v_color;\n gl_FragColor.a *= u_opacity;\n\n gl_FragColor = filterColor(gl_FragColor);\n}\n";
22
22
  /* babel-plugin-inline-import '../shaders/hexagon_vert.glsl' */
23
23
  var heatmapGridVert = "precision highp float;\n// \u591A\u8FB9\u5F62\u9876\u70B9\u5750\u6807\nattribute vec3 a_Position;\n// \u591A\u8FB9\u5F62\u7ECF\u7EAC\u5EA6\u5750\u6807\nattribute vec3 a_Pos;\nattribute float a_Size;\nattribute vec4 a_Color;\nuniform vec2 u_radius;\nuniform float u_coverage: 0.9;\nuniform float u_angle: 0;\nuniform mat4 u_ModelMatrix;\n\nvarying vec4 v_color;\n\nuniform vec2 u_sceneCenterMercator;\n\n#pragma include \"projection\"\n#pragma include \"project\"\n#pragma include \"picking\"\n\nvoid main() {\n v_color = a_Color;\n \n mat2 rotationMatrix = mat2(cos(u_angle), sin(u_angle), -sin(u_angle), cos(u_angle));\n vec2 offset =(vec2(a_Position.xy * u_radius * rotationMatrix * u_coverage));\n vec2 lnglat = unProjectFlat(a_Pos.xy + offset);\n \n // vec4 project_pos = project_position(vec4(lnglat, 0, 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 // gl_Position = u_Mvp * (vec4(a_Pos.xy + offset, 0., 1.0));\n vec2 customLnglat = customProject(lnglat) - u_sceneCenterMercator;\n vec4 project_pos = project_position(vec4(customLnglat, 0, 1.0));\n gl_Position = u_Mvp * vec4(project_pos.xy, 0.0, 1.0);\n } else {\n vec4 project_pos = project_position(vec4(lnglat, 0, 1.0));\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0., 1.0));\n }\n setPickingColor(a_PickingColor);\n}\n";
24
- var HexagonModel = /*#__PURE__*/function (_BaseModel) {
24
+ var HexagonModel = exports.default = /*#__PURE__*/function (_BaseModel) {
25
25
  (0, _inherits2.default)(HexagonModel, _BaseModel);
26
26
  var _super = _createSuper(HexagonModel);
27
27
  function HexagonModel() {
@@ -118,5 +118,4 @@ var HexagonModel = /*#__PURE__*/function (_BaseModel) {
118
118
  }
119
119
  }]);
120
120
  return HexagonModel;
121
- }(_BaseModel2.default);
122
- exports.default = HexagonModel;
121
+ }(_BaseModel2.default);
@@ -16,5 +16,4 @@ var HeatMapModels = {
16
16
  grid3d: _grid3d.default,
17
17
  hexagon: _hexagon.default
18
18
  };
19
- var _default = HeatMapModels;
20
- exports.default = _default;
19
+ var _default = exports.default = HeatMapModels;
@@ -18,7 +18,7 @@ var _BaseLayer2 = _interopRequireDefault(require("../core/BaseLayer"));
18
18
  var _index = _interopRequireDefault(require("./models/index"));
19
19
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
20
20
  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; } }
21
- var ImageLayer = /*#__PURE__*/function (_BaseLayer) {
21
+ var ImageLayer = exports.default = /*#__PURE__*/function (_BaseLayer) {
22
22
  (0, _inherits2.default)(ImageLayer, _BaseLayer);
23
23
  var _super = _createSuper(ImageLayer);
24
24
  function ImageLayer() {
@@ -70,5 +70,4 @@ var ImageLayer = /*#__PURE__*/function (_BaseLayer) {
70
70
  }
71
71
  }]);
72
72
  return ImageLayer;
73
- }(_BaseLayer2.default);
74
- exports.default = ImageLayer;
73
+ }(_BaseLayer2.default);
@@ -21,7 +21,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
21
21
  var ImageFrag = "precision mediump float;\nuniform float u_opacity: 1.0;\nuniform sampler2D u_texture;\nvarying vec2 v_texCoord;\nvoid main() {\n vec4 color = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y));\n gl_FragColor = color;\n gl_FragColor.a *= u_opacity;\n if(gl_FragColor.a < 0.01)\n discard;\n}\n";
22
22
  /* babel-plugin-inline-import '../shaders/image_vert.glsl' */
23
23
  var ImageVert = "precision highp float;\nuniform mat4 u_ModelMatrix;\n\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_v2(vec4(project_pos.xy,0., 1.0));\n \n}\n";
24
- var ImageModel = /*#__PURE__*/function (_BaseModel) {
24
+ var ImageModel = exports.default = /*#__PURE__*/function (_BaseModel) {
25
25
  (0, _inherits2.default)(ImageModel, _BaseModel);
26
26
  var _super = _createSuper(ImageModel);
27
27
  function ImageModel() {
@@ -96,7 +96,7 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
96
96
  key: "clearModels",
97
97
  value: function clearModels() {
98
98
  var _this$texture;
99
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
99
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
100
100
  }
101
101
  }, {
102
102
  key: "buildModels",
@@ -139,5 +139,4 @@ var ImageModel = /*#__PURE__*/function (_BaseModel) {
139
139
  }
140
140
  }]);
141
141
  return ImageModel;
142
- }(_BaseModel2.default);
143
- exports.default = ImageModel;
142
+ }(_BaseModel2.default);
@@ -9,5 +9,4 @@ var _image = _interopRequireDefault(require("./image"));
9
9
  var ImageModels = {
10
10
  image: _image.default
11
11
  };
12
- var _default = ImageModels;
13
- exports.default = _default;
12
+ var _default = exports.default = ImageModels;
package/lib/line/index.js CHANGED
@@ -19,7 +19,7 @@ var _BaseLayer2 = _interopRequireDefault(require("../core/BaseLayer"));
19
19
  var _models = _interopRequireDefault(require("./models"));
20
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
21
21
  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; } }
22
- var LineLayer = /*#__PURE__*/function (_BaseLayer) {
22
+ var LineLayer = exports.default = /*#__PURE__*/function (_BaseLayer) {
23
23
  (0, _inherits2.default)(LineLayer, _BaseLayer);
24
24
  var _super = _createSuper(LineLayer);
25
25
  function LineLayer() {
@@ -107,7 +107,7 @@ var LineLayer = /*#__PURE__*/function (_BaseLayer) {
107
107
  return this.layerType;
108
108
  }
109
109
  var shapeAttribute = this.styleAttributeService.getLayerStyleAttribute('shape');
110
- var shape = shapeAttribute === null || shapeAttribute === void 0 ? void 0 : (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field;
110
+ var shape = shapeAttribute === null || shapeAttribute === void 0 || (_shapeAttribute$scale = shapeAttribute.scale) === null || _shapeAttribute$scale === void 0 ? void 0 : _shapeAttribute$scale.field;
111
111
  return shape || 'line';
112
112
  }
113
113
  }, {
@@ -134,5 +134,4 @@ var LineLayer = /*#__PURE__*/function (_BaseLayer) {
134
134
  }
135
135
  }]);
136
136
  return LineLayer;
137
- }(_BaseLayer2.default);
138
- exports.default = LineLayer;
137
+ }(_BaseLayer2.default);
@@ -39,7 +39,7 @@ var lineStyleObj = {
39
39
  dash: 1.0
40
40
  };
41
41
  var isNumber = _l7Utils.lodashUtil.isNumber;
42
- var ArcModel = /*#__PURE__*/function (_BaseModel) {
42
+ var ArcModel = exports.default = /*#__PURE__*/function (_BaseModel) {
43
43
  (0, _inherits2.default)(ArcModel, _BaseModel);
44
44
  var _super = _createSuper(ArcModel);
45
45
  function ArcModel() {
@@ -162,7 +162,7 @@ var ArcModel = /*#__PURE__*/function (_BaseModel) {
162
162
  key: "clearModels",
163
163
  value: function clearModels() {
164
164
  var _this$texture;
165
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
165
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
166
166
  this.iconService.off('imageUpdate', this.updateTexture);
167
167
  }
168
168
  }, {
@@ -300,5 +300,4 @@ var ArcModel = /*#__PURE__*/function (_BaseModel) {
300
300
  }
301
301
  }]);
302
302
  return ArcModel;
303
- }(_BaseModel2.default);
304
- exports.default = ArcModel;
303
+ }(_BaseModel2.default);
@@ -35,7 +35,7 @@ var lineStyleObj = {
35
35
  solid: 0.0,
36
36
  dash: 1.0
37
37
  };
38
- var Arc3DModel = /*#__PURE__*/function (_BaseModel) {
38
+ var Arc3DModel = exports.default = /*#__PURE__*/function (_BaseModel) {
39
39
  (0, _inherits2.default)(Arc3DModel, _BaseModel);
40
40
  var _super = _createSuper(Arc3DModel);
41
41
  function Arc3DModel() {
@@ -160,7 +160,7 @@ var Arc3DModel = /*#__PURE__*/function (_BaseModel) {
160
160
  key: "clearModels",
161
161
  value: function clearModels() {
162
162
  var _this$texture;
163
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
163
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
164
164
  this.iconService.off('imageUpdate', this.updateTexture);
165
165
  }
166
166
  }, {
@@ -286,5 +286,4 @@ var Arc3DModel = /*#__PURE__*/function (_BaseModel) {
286
286
  }
287
287
  }]);
288
288
  return Arc3DModel;
289
- }(_BaseModel2.default);
290
- exports.default = Arc3DModel;
289
+ }(_BaseModel2.default);
@@ -34,7 +34,7 @@ var lineStyleObj = {
34
34
  solid: 0.0,
35
35
  dash: 1.0
36
36
  };
37
- var Arc3DModel = /*#__PURE__*/function (_BaseModel) {
37
+ var Arc3DModel = exports.default = /*#__PURE__*/function (_BaseModel) {
38
38
  (0, _inherits2.default)(Arc3DModel, _BaseModel);
39
39
  var _super = _createSuper(Arc3DModel);
40
40
  function Arc3DModel() {
@@ -160,7 +160,7 @@ var Arc3DModel = /*#__PURE__*/function (_BaseModel) {
160
160
  key: "clearModels",
161
161
  value: function clearModels() {
162
162
  var _this$texture;
163
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
163
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
164
164
  this.iconService.off('imageUpdate', this.updateTexture);
165
165
  }
166
166
  }, {
@@ -288,5 +288,4 @@ var Arc3DModel = /*#__PURE__*/function (_BaseModel) {
288
288
  }
289
289
  }]);
290
290
  return Arc3DModel;
291
- }(_BaseModel2.default);
292
- exports.default = Arc3DModel;
291
+ }(_BaseModel2.default);
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
23
23
  var flow_line_frag = "#extension GL_OES_standard_derivatives : enable\n\nvarying vec4 v_color;\n\n\n// line texture\n\n#pragma include \"picking\"\n\nvoid main() {\ngl_FragColor = v_color;\ngl_FragColor = filterColor(gl_FragColor);\n}\n"; // linear simple line shader
24
24
  /* babel-plugin-inline-import '../shaders/flow/flow_line_vert.glsl' */
25
25
  var flow_line_vert = "attribute vec4 a_Color;\nattribute vec2 a_Size;\nattribute vec4 a_Instance;\nattribute vec3 a_Normal;\nattribute vec3 a_Position;\n\nuniform mat4 u_ModelMatrix;\n\n\n#pragma include \"projection\"\n#pragma include \"project\"\n#pragma include \"picking\"\nvarying vec4 v_color;\nuniform float u_gap_width: 1.0;\nuniform float u_stroke_width: 1.0;\nuniform float u_stroke_opacity: 1.0;\n\nvec2 project_pixel_offset(vec2 offsets) {\n\n vec2 data = project_pixel(offsets);\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3\n return data;\n }\n\n return vec2(data.x, -data.y);;\n}\n\nvec2 line_dir(vec2 target, vec2 source) {\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3\n return normalize(target - source);\n }\n return normalize(ProjectFlat(target) - ProjectFlat(source));\n}\n\nfloat flag_gap() {\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3\n return 1.;\n }\n return -1.;\n\n}\n\n\nvoid main() {\n\n// \u900F\u660E\u5EA6\u8BA1\u7B97\n vec2 source = a_Instance.rg; // \u8D77\u59CB\u70B9\n vec2 target = a_Instance.ba; // \u7EC8\u70B9\n vec2 flowlineDir = line_dir(target,source);\n vec2 perpendicularDir = vec2(flowlineDir.y, flowlineDir.x); // mapbox || \u9AD8\u5FB7\n\n\n vec2 position = mix(source, target, a_Position.x);\n \n float lengthCommon = length(project_position(vec4(target,0,1)) - project_position(vec4(source,0,1))); // \n vec2 offsetDistances = a_Size.x * project_pixel_offset(vec2(a_Position.y, a_Position.z)); // Mapbox || \u9AD8\u5FB7\n vec2 limitedOffsetDistances = clamp( \n offsetDistances,\n project_pixel(-lengthCommon*.2), project_pixel(lengthCommon*.2)\n );\n\n\n float startOffsetCommon = project_pixel(offsets[0]);\n float endOffsetCommon = project_pixel(offsets[1]);\n float endpointOffset = mix(\n clamp(startOffsetCommon, 0.0, lengthCommon*.2),\n -clamp(endOffsetCommon, 0.0, lengthCommon*.2),\n a_Position.x\n );\n\n vec2 normalsCommon = u_stroke_width * project_pixel_offset(vec2(a_Normal.x, a_Normal.y)); // mapbox || \u9AD8\u5FB7\n\n float gapCommon = flag_gap() * project_pixel(u_gap_width);\n vec3 offsetCommon = vec3(\n flowlineDir * (limitedOffsetDistances[1] + normalsCommon.y + endpointOffset * 1.05) -\n perpendicularDir * (limitedOffsetDistances[0] + gapCommon + normalsCommon.x),\n 0.0\n );\n\n\n vec4 project_pos = project_position(vec4(position.xy, 0, 1.0));\n\n vec4 fillColor = vec4(a_Color.rgb, a_Color.a * opacity);\n v_color = mix(fillColor, vec4(u_stroke.xyz, u_stroke.w * fillColor.w * u_stroke_opacity), a_Normal.z);\n\n gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy + offsetCommon.xy, 0., 1.0));\n\n\n\n setPickingColor(a_PickingColor);\n}\n";
26
- var FlowLineModel = /*#__PURE__*/function (_BaseModel) {
26
+ var FlowLineModel = exports.default = /*#__PURE__*/function (_BaseModel) {
27
27
  (0, _inherits2.default)(FlowLineModel, _BaseModel);
28
28
  var _super = _createSuper(FlowLineModel);
29
29
  function FlowLineModel() {
@@ -165,5 +165,4 @@ var FlowLineModel = /*#__PURE__*/function (_BaseModel) {
165
165
  }
166
166
  }]);
167
167
  return FlowLineModel;
168
- }(_BaseModel2.default);
169
- exports.default = FlowLineModel;
168
+ }(_BaseModel2.default);
@@ -29,7 +29,7 @@ var lineStyleObj = {
29
29
  solid: 0.0,
30
30
  dash: 1.0
31
31
  };
32
- var GreatCircleModel = /*#__PURE__*/function (_BaseModel) {
32
+ var GreatCircleModel = exports.default = /*#__PURE__*/function (_BaseModel) {
33
33
  (0, _inherits2.default)(GreatCircleModel, _BaseModel);
34
34
  var _super = _createSuper(GreatCircleModel);
35
35
  function GreatCircleModel() {
@@ -146,7 +146,7 @@ var GreatCircleModel = /*#__PURE__*/function (_BaseModel) {
146
146
  key: "clearModels",
147
147
  value: function clearModels() {
148
148
  var _this$texture;
149
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
149
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
150
150
  this.iconService.off('imageUpdate', this.updateTexture);
151
151
  }
152
152
  }, {
@@ -251,5 +251,4 @@ var GreatCircleModel = /*#__PURE__*/function (_BaseModel) {
251
251
  }
252
252
  }]);
253
253
  return GreatCircleModel;
254
- }(_BaseModel2.default);
255
- exports.default = GreatCircleModel;
254
+ }(_BaseModel2.default);
@@ -25,5 +25,4 @@ var LineModels = {
25
25
  earthArc3d: _earthArc_3d.default,
26
26
  flowline: _flow.default
27
27
  };
28
- var _default = LineModels;
29
- exports.default = _default;
28
+ var _default = exports.default = LineModels;
@@ -37,7 +37,7 @@ var lineStyleObj = {
37
37
  solid: 0.0,
38
38
  dash: 1.0
39
39
  };
40
- var LineModel = /*#__PURE__*/function (_BaseModel) {
40
+ var LineModel = exports.default = /*#__PURE__*/function (_BaseModel) {
41
41
  (0, _inherits2.default)(LineModel, _BaseModel);
42
42
  var _super = _createSuper(LineModel);
43
43
  function LineModel() {
@@ -187,7 +187,7 @@ var LineModel = /*#__PURE__*/function (_BaseModel) {
187
187
  key: "clearModels",
188
188
  value: function clearModels() {
189
189
  var _this$texture;
190
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
190
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
191
191
  this.iconService.off('imageUpdate', this.updateTexture);
192
192
  }
193
193
  }, {
@@ -380,5 +380,4 @@ var LineModel = /*#__PURE__*/function (_BaseModel) {
380
380
  }
381
381
  }]);
382
382
  return LineModel;
383
- }(_BaseModel2.default);
384
- exports.default = LineModel;
383
+ }(_BaseModel2.default);
@@ -27,7 +27,7 @@ var linear_line_frag = "\nvarying vec4 v_Color;\n#pragma include \"picking\"\nvo
27
27
  /* babel-plugin-inline-import '../shaders/linearLine/line_linear_vert.glsl' */
28
28
  var linear_line_vert = "\nattribute float a_Miter;\nattribute vec2 a_Size;\nattribute vec3 a_Normal;\nattribute vec3 a_Position;\n\n// dash line\nattribute float a_Total_Distance;\nattribute vec2 a_DistanceAndIndex;\n\nuniform mat4 u_ModelMatrix;\n\n\nuniform float u_heightfixed: 0.0;\nuniform float u_vertexScale: 1.0;\nuniform float u_raisingHeight: 0.0;\nuniform sampler2D u_texture;\nuniform float u_linearDir: 1.0;\nvarying vec4 v_Color;\n\n\n#pragma include \"projection\"\n#pragma include \"picking\"\n\n\nvoid main() {\n\n\n vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal);\n \n vec2 offset = project_pixel(size.xy);\n\n float lineDistance = a_DistanceAndIndex.x;\n float currentLinePointRatio = lineDistance / a_Total_Distance;\n \n\n float lineOffsetWidth = length(offset + offset * sign(a_Miter)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB\uFF08\u5411\u4E24\u4FA7\u504F\u79FB\u7684\u548C\uFF09\n float linePixelSize = project_pixel(a_Size.x) * 2.0; // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB \u5355\u4FA7 * 2\n float texV = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C\n\n float linearRadio =currentLinePointRatio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B\n if(u_linearDir < 1.0) {\n linearRadio = texV;\n }\n\n v_Color = texture2D(u_texture, vec2(linearRadio, 0.5));\n\n v_Color.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6\n\n\n\n vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\n\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0));\n\n float h = float(a_Position.z) * u_vertexScale; // \u7EBF\u9876\u70B9\u7684\u9AD8\u5EA6 - \u517C\u5BB9\u4E0D\u5B58\u5728\u7B2C\u4E09\u4E2A\u6570\u503C\u7684\u60C5\u51B5 vertex height\n float lineHeight = a_Size.y; // size \u7B2C\u4E8C\u4E2A\u53C2\u6570\u4EE3\u8868\u7684\u9AD8\u5EA6 [linewidth, lineheight]\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n lineHeight *= 0.2; // \u4FDD\u6301\u548C amap/mapbox \u4E00\u81F4\u7684\u6548\u679C\n h *= 0.2;\n if(u_heightfixed < 1.0) {\n lineHeight = project_pixel(a_Size.y);\n }\n gl_Position = u_Mvp * (vec4(project_pos.xy + offset, lineHeight + h + u_raisingHeight, 1.0));\n } else {\n // mapbox - amap\n \n // \u517C\u5BB9 mapbox \u5728\u7EBF\u9AD8\u5EA6\u4E0A\u7684\u6548\u679C\u8868\u73B0\u57FA\u672C\u4E00\u81F4\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // mapbox\n // \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n h *= mapboxZoomScale;\n h += u_raisingHeight * mapboxZoomScale;\n if(u_heightfixed > 0.0) {\n lineHeight *= mapboxZoomScale;\n }\n \n } else {\n // amap\n h += u_raisingHeight;\n // lineHeight \u9876\u70B9\u504F\u79FB\u9AD8\u5EA6\n if(u_heightfixed < 1.0) {\n lineHeight *= pow(2.0, 20.0 - u_Zoom);\n }\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight + h, 1.0));\n }\n\n setPickingColor(a_PickingColor);\n}\n";
29
29
  var isNumber = _l7Utils.lodashUtil.isNumber;
30
- var LinearLineModel = /*#__PURE__*/function (_BaseModel) {
30
+ var LinearLineModel = exports.default = /*#__PURE__*/function (_BaseModel) {
31
31
  (0, _inherits2.default)(LinearLineModel, _BaseModel);
32
32
  var _super = _createSuper(LinearLineModel);
33
33
  function LinearLineModel() {
@@ -112,7 +112,7 @@ var LinearLineModel = /*#__PURE__*/function (_BaseModel) {
112
112
  key: "clearModels",
113
113
  value: function clearModels() {
114
114
  var _this$colorTexture;
115
- (_this$colorTexture = this.colorTexture) === null || _this$colorTexture === void 0 ? void 0 : _this$colorTexture.destroy();
115
+ (_this$colorTexture = this.colorTexture) === null || _this$colorTexture === void 0 || _this$colorTexture.destroy();
116
116
  }
117
117
  }, {
118
118
  key: "buildModels",
@@ -244,5 +244,4 @@ var LinearLineModel = /*#__PURE__*/function (_BaseModel) {
244
244
  }
245
245
  }]);
246
246
  return LinearLineModel;
247
- }(_BaseModel2.default);
248
- exports.default = LinearLineModel;
247
+ }(_BaseModel2.default);
@@ -26,7 +26,7 @@ var simle_linear_frag = "uniform vec4 u_sourceColor;\nuniform vec4 u_targetColor
26
26
  /* babel-plugin-inline-import '../shaders/simple/simpleline_vert.glsl' */
27
27
  var simple_line_vert = "attribute vec4 a_Color;\nattribute vec2 a_Size;\nattribute vec3 a_Position;\n\nattribute float a_Total_Distance;\nattribute float a_Distance;\n\nuniform mat4 u_ModelMatrix;\n\n\nuniform float u_vertexScale: 1.0;\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\n\n\n\n#pragma include \"projection\"\n\nvarying vec4 v_color;\nvarying float v_distanceScale;\n\nvoid main() {\n\n v_color = a_Color; \n v_distanceScale = a_Distance / a_Total_Distance;\n v_color.a = v_color.a * opacity;\n vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\n\n float h = float(a_Position.z) * u_vertexScale; // \u7EBF\u9876\u70B9\u7684\u9AD8\u5EA6 - \u517C\u5BB9\u4E0D\u5B58\u5728\u7B2C\u4E09\u4E2A\u6570\u503C\u7684\u60C5\u51B5\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy, project_pixel(a_Size.y) + h * 0.2, 1.0));\n } else {\n float lineHeight = a_Size.y;\n // \u517C\u5BB9 mapbox \u5728\u7EBF\u9AD8\u5EA6\u4E0A\u7684\u6548\u679C\u8868\u73B0\u57FA\u672C\u4E00\u81F4\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8\n h *= 2.0/pow(2.0, 20.0 - u_Zoom);\n }\n\n // amap1.x\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8\n lineHeight *= pow(2.0, 20.0 - u_Zoom);\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, lineHeight + h, 1.0));\n gl_PointSize = 10.0;\n }\n}\n";
28
28
  var isNumber = _l7Utils.lodashUtil.isNumber;
29
- var SimpleLineModel = /*#__PURE__*/function (_BaseModel) {
29
+ var SimpleLineModel = exports.default = /*#__PURE__*/function (_BaseModel) {
30
30
  (0, _inherits2.default)(SimpleLineModel, _BaseModel);
31
31
  var _super = _createSuper(SimpleLineModel);
32
32
  function SimpleLineModel() {
@@ -197,5 +197,4 @@ var SimpleLineModel = /*#__PURE__*/function (_BaseModel) {
197
197
  }
198
198
  }]);
199
199
  return SimpleLineModel;
200
- }(_BaseModel2.default);
201
- exports.default = SimpleLineModel;
200
+ }(_BaseModel2.default);
@@ -26,7 +26,7 @@ var line_frag = "#define Animate 0.0\n#define LineTexture 1.0\n\n// line texture
26
26
  /* babel-plugin-inline-import '../shaders/wall/wall_vert.glsl' */
27
27
  var line_vert = "#define Animate 0.0\n\nattribute float a_Miter;\nattribute vec4 a_Color;\nattribute vec2 a_Size;\nattribute vec3 a_Normal;\nattribute vec3 a_Position;\nattribute vec2 a_iconMapUV;\nattribute float a_Total_Distance;\nattribute float a_Distance;\n\nuniform mat4 u_ModelMatrix;\n\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\nuniform float u_icon_step: 100;\nuniform float u_heightfixed;\nuniform float u_linearColor: 0;\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\n// texV \u7EBF\u56FE\u5C42 - \u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\uFF08\u7EBF\u7684\u5BBD\u5EA6\u65B9\u5411\uFF09\nvarying vec2 v_iconMapUV;\nvarying vec4 v_color;\nvarying float v_blur;\nvarying float v_radio;\nvarying vec4 v_dataset;\n\nvoid main() {\n\n\n float d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B\n float d_texPixelLen; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E\n\n v_iconMapUV = a_iconMapUV;\n if(u_heightfixed < 1.0) { // \u9AD8\u5EA6\u968F zoom \u8C03\u6574\n d_texPixelLen = project_pixel(u_icon_step);\n } else {\n d_texPixelLen = u_icon_step;\n }\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n d_texPixelLen *= 10.0;\n }\n\n if(u_animate.x == Animate || u_linearColor == 1.0) {\n d_distance_ratio = a_Distance / a_Total_Distance;\n }\n\n float miter = (a_Miter + 1.0)/2.0;\n // \u8BBE\u7F6E\u6570\u636E\u96C6\u7684\u53C2\u6570\n v_dataset[0] = d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B\n v_dataset[1] = a_Distance; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB\n v_dataset[2] = d_texPixelLen; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E\n v_dataset[3] = miter; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C 0 - 1\n\n vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\n\n float originSize = a_Size.x; // \u56FA\u5B9A\u9AD8\u5EA6\n if(u_heightfixed < 1.0) { // \u9AD8\u5EA6\u968F zoom \u8C03\u6574\n originSize = project_float_pixel(a_Size.x);\n }\n\n float wallHeight = originSize * miter;\n float lightWeight = calc_lighting(vec4(project_pos.xy, wallHeight, 1.0));\n\n v_blur = min(project_float_pixel(2.0) / originSize, 0.05);\n v_color = vec4(a_Color.rgb * lightWeight, a_Color.w);\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy, wallHeight, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, wallHeight, 1.0));\n }\n\n setPickingColor(a_PickingColor);\n}\n";
28
28
  var isNumber = _l7Utils.lodashUtil.isNumber;
29
- var LineWallModel = /*#__PURE__*/function (_BaseModel) {
29
+ var LineWallModel = exports.default = /*#__PURE__*/function (_BaseModel) {
30
30
  (0, _inherits2.default)(LineWallModel, _BaseModel);
31
31
  var _super = _createSuper(LineWallModel);
32
32
  function LineWallModel() {
@@ -137,7 +137,7 @@ var LineWallModel = /*#__PURE__*/function (_BaseModel) {
137
137
  key: "clearModels",
138
138
  value: function clearModels() {
139
139
  var _this$texture;
140
- (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
140
+ (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
141
141
  this.iconService.off('imageUpdate', this.updateTexture);
142
142
  }
143
143
  }, {
@@ -296,5 +296,4 @@ var LineWallModel = /*#__PURE__*/function (_BaseModel) {
296
296
  }
297
297
  }]);
298
298
  return LineWallModel;
299
- }(_BaseModel2.default);
300
- exports.default = LineWallModel;
299
+ }(_BaseModel2.default);
package/lib/mask/index.js CHANGED
@@ -18,7 +18,7 @@ var _BaseLayer2 = _interopRequireDefault(require("../core/BaseLayer"));
18
18
  var _models = _interopRequireDefault(require("./models"));
19
19
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
20
20
  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; } }
21
- var MaskLayer = /*#__PURE__*/function (_BaseLayer) {
21
+ var MaskLayer = exports.default = /*#__PURE__*/function (_BaseLayer) {
22
22
  (0, _inherits2.default)(MaskLayer, _BaseLayer);
23
23
  var _super = _createSuper(MaskLayer);
24
24
  function MaskLayer() {
@@ -61,5 +61,4 @@ var MaskLayer = /*#__PURE__*/function (_BaseLayer) {
61
61
  }
62
62
  }]);
63
63
  return MaskLayer;
64
- }(_BaseLayer2.default);
65
- exports.default = MaskLayer;
64
+ }(_BaseLayer2.default);
@@ -22,7 +22,7 @@ var mask_frag = "uniform float u_opacity : 1.0;\nuniform vec4 u_color;\n\nvoid m
22
22
  /* babel-plugin-inline-import '../shaders/mask_vert.glsl' */
23
23
  var mask_vert = "attribute vec3 a_Position;\nuniform mat4 u_ModelMatrix;\n\n\n#pragma include \"projection\"\n\nvoid main() {\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.xyz, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n }\n}\n\n";
24
24
  var isNumber = _l7Utils.lodashUtil.isNumber;
25
- var MaskModel = /*#__PURE__*/function (_BaseModel) {
25
+ var MaskModel = exports.default = /*#__PURE__*/function (_BaseModel) {
26
26
  (0, _inherits2.default)(MaskModel, _BaseModel);
27
27
  var _super = _createSuper(MaskModel);
28
28
  function MaskModel() {
@@ -109,5 +109,4 @@ var MaskModel = /*#__PURE__*/function (_BaseModel) {
109
109
  }
110
110
  }]);
111
111
  return MaskModel;
112
- }(_BaseModel2.default);
113
- exports.default = MaskModel;
112
+ }(_BaseModel2.default);
@@ -9,5 +9,4 @@ var _fill = _interopRequireDefault(require("./fill"));
9
9
  var MaskModels = {
10
10
  fill: _fill.default
11
11
  };
12
- var _default = MaskModels;
13
- exports.default = _default;
12
+ var _default = exports.default = MaskModels;
@@ -20,7 +20,7 @@ var _inversify = require("inversify");
20
20
  require("reflect-metadata");
21
21
  var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
22
22
  var cloneDeep = _l7Utils.lodashUtil.cloneDeep;
23
- var DataMappingPlugin = (_dec = (0, _inversify.injectable)(), _dec2 = (0, _inversify.inject)(_l7Core.TYPES.IMapService), _dec3 = (0, _inversify.inject)(_l7Core.TYPES.IFontService), _dec(_class = (_class2 = /*#__PURE__*/function () {
23
+ var DataMappingPlugin = exports.default = (_dec = (0, _inversify.injectable)(), _dec2 = (0, _inversify.inject)(_l7Core.TYPES.IMapService), _dec3 = (0, _inversify.inject)(_l7Core.TYPES.IFontService), _dec(_class = (_class2 = /*#__PURE__*/function () {
24
24
  function DataMappingPlugin() {
25
25
  (0, _classCallCheck2.default)(this, DataMappingPlugin);
26
26
  (0, _initializerDefineProperty2.default)(this, "mapService", _descriptor, this);
@@ -261,7 +261,7 @@ var DataMappingPlugin = (_dec = (0, _inversify.injectable)(), _dec2 = (0, _inver
261
261
  if (!attribute.scale) {
262
262
  return [];
263
263
  }
264
- var scalers = (attribute === null || attribute === void 0 ? void 0 : (_attribute$scale = attribute.scale) === null || _attribute$scale === void 0 ? void 0 : _attribute$scale.scalers) || [];
264
+ var scalers = (attribute === null || attribute === void 0 || (_attribute$scale = attribute.scale) === null || _attribute$scale === void 0 ? void 0 : _attribute$scale.scalers) || [];
265
265
  var params = [];
266
266
  scalers.forEach(function (_ref5) {
267
267
  var _attribute$scale2;
@@ -295,5 +295,4 @@ var DataMappingPlugin = (_dec = (0, _inversify.injectable)(), _dec2 = (0, _inver
295
295
  enumerable: true,
296
296
  writable: true,
297
297
  initializer: null
298
- })), _class2)) || _class);
299
- exports.default = DataMappingPlugin;
298
+ })), _class2)) || _class);
@@ -14,7 +14,7 @@ var _l7Source = _interopRequireDefault(require("@antv/l7-source"));
14
14
  var _inversify = require("inversify");
15
15
  require("reflect-metadata");
16
16
  var _dec, _class;
17
- var DataSourcePlugin = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE__*/function () {
17
+ var DataSourcePlugin = exports.default = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE__*/function () {
18
18
  function DataSourcePlugin() {
19
19
  (0, _classCallCheck2.default)(this, DataSourcePlugin);
20
20
  }
@@ -109,5 +109,4 @@ var DataSourcePlugin = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__
109
109
  }
110
110
  }]);
111
111
  return DataSourcePlugin;
112
- }()) || _class);
113
- exports.default = DataSourcePlugin;
112
+ }()) || _class);
@@ -21,8 +21,8 @@ var _inversify = require("inversify");
21
21
  require("reflect-metadata");
22
22
  var _identityScale = _interopRequireDefault(require("../utils/identityScale"));
23
23
  var _scaleMap, _dec, _class;
24
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
25
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
26
  var isNil = _l7Utils.lodashUtil.isNil,
27
27
  isString = _l7Utils.lodashUtil.isString,
28
28
  uniq = _l7Utils.lodashUtil.uniq;
@@ -31,7 +31,7 @@ var scaleMap = (_scaleMap = {}, (0, _defineProperty2.default)(_scaleMap, _l7Core
31
31
  /**
32
32
  * 根据 Source 原始数据为指定字段创建 Scale,保存在 StyleAttribute 上,供下游插件使用
33
33
  */
34
- var FeatureScalePlugin = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE__*/function () {
34
+ var FeatureScalePlugin = exports.default = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#__PURE__*/function () {
35
35
  function FeatureScalePlugin() {
36
36
  (0, _classCallCheck2.default)(this, FeatureScalePlugin);
37
37
  (0, _defineProperty2.default)(this, "scaleOptions", {});
@@ -335,5 +335,4 @@ var FeatureScalePlugin = (_dec = (0, _inversify.injectable)(), _dec(_class = /*#
335
335
  }
336
336
  }]);
337
337
  return FeatureScalePlugin;
338
- }()) || _class);
339
- exports.default = FeatureScalePlugin;
338
+ }()) || _class);