@antv/l7-layers 2.9.36 → 2.9.37-alpha.2

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 (631) hide show
  1. package/package.json +6 -6
  2. package/es/Geometry/index.d.ts +0 -32
  3. package/es/Geometry/index.js +0 -118
  4. package/es/Geometry/models/billboard.d.ts +0 -26
  5. package/es/Geometry/models/billboard.js +0 -228
  6. package/es/Geometry/models/index.d.ts +0 -5
  7. package/es/Geometry/models/index.js +0 -9
  8. package/es/Geometry/models/plane.d.ts +0 -45
  9. package/es/Geometry/models/plane.js +0 -419
  10. package/es/Geometry/models/sprite.d.ts +0 -47
  11. package/es/Geometry/models/sprite.js +0 -301
  12. package/es/Geometry/shaders/billboard_frag.glsl +0 -13
  13. package/es/Geometry/shaders/billboard_vert.glsl +0 -50
  14. package/es/Geometry/shaders/plane_frag.glsl +0 -22
  15. package/es/Geometry/shaders/plane_vert.glsl +0 -53
  16. package/es/Geometry/shaders/sprite_frag.glsl +0 -21
  17. package/es/Geometry/shaders/sprite_vert.glsl +0 -28
  18. package/es/canvas/index.d.ts +0 -23
  19. package/es/canvas/index.js +0 -121
  20. package/es/canvas/models/canvas.d.ts +0 -18
  21. package/es/canvas/models/canvas.js +0 -212
  22. package/es/canvas/models/index.d.ts +0 -5
  23. package/es/canvas/models/index.js +0 -5
  24. package/es/citybuliding/building.d.ts +0 -17
  25. package/es/citybuliding/building.js +0 -86
  26. package/es/citybuliding/models/build.d.ts +0 -22
  27. package/es/citybuliding/models/build.js +0 -187
  28. package/es/citybuliding/shaders/build_frag.glsl +0 -117
  29. package/es/citybuliding/shaders/build_vert.glsl +0 -54
  30. package/es/core/BaseLayer.d.ts +0 -225
  31. package/es/core/BaseLayer.js +0 -1430
  32. package/es/core/BaseModel.d.ts +0 -140
  33. package/es/core/BaseModel.js +0 -489
  34. package/es/core/interface.d.ts +0 -225
  35. package/es/core/interface.js +0 -30
  36. package/es/core/schema.d.ts +0 -27
  37. package/es/core/schema.js +0 -25
  38. package/es/core/shape/Path.d.ts +0 -39
  39. package/es/core/shape/Path.js +0 -62
  40. package/es/core/shape/extrude.d.ts +0 -17
  41. package/es/core/shape/extrude.js +0 -148
  42. package/es/core/triangulation.d.ts +0 -128
  43. package/es/core/triangulation.js +0 -553
  44. package/es/earth/index.d.ts +0 -22
  45. package/es/earth/index.js +0 -98
  46. package/es/earth/models/atmosphere.d.ts +0 -9
  47. package/es/earth/models/atmosphere.js +0 -135
  48. package/es/earth/models/base.d.ts +0 -16
  49. package/es/earth/models/base.js +0 -206
  50. package/es/earth/models/bloomsphere.d.ts +0 -9
  51. package/es/earth/models/bloomsphere.js +0 -134
  52. package/es/earth/shaders/atmosphere_frag.glsl +0 -17
  53. package/es/earth/shaders/atmosphere_vert.glsl +0 -26
  54. package/es/earth/shaders/base_frag.glsl +0 -13
  55. package/es/earth/shaders/base_vert.glsl +0 -52
  56. package/es/earth/shaders/bloomsphere_frag.glsl +0 -15
  57. package/es/earth/shaders/bloomsphere_vert.glsl +0 -20
  58. package/es/earth/utils.d.ts +0 -26
  59. package/es/earth/utils.js +0 -104
  60. package/es/heatmap/index.d.ts +0 -21
  61. package/es/heatmap/index.js +0 -141
  62. package/es/heatmap/models/grid.d.ts +0 -8
  63. package/es/heatmap/models/grid.js +0 -106
  64. package/es/heatmap/models/grid3d.d.ts +0 -8
  65. package/es/heatmap/models/grid3d.js +0 -140
  66. package/es/heatmap/models/heatmap.d.ts +0 -24
  67. package/es/heatmap/models/heatmap.js +0 -463
  68. package/es/heatmap/models/hexagon.d.ts +0 -8
  69. package/es/heatmap/models/hexagon.js +0 -107
  70. package/es/heatmap/models/index.d.ts +0 -5
  71. package/es/heatmap/models/index.js +0 -12
  72. package/es/heatmap/shaders/grid_vert.glsl +0 -42
  73. package/es/heatmap/shaders/heatmap_3d_frag.glsl +0 -14
  74. package/es/heatmap/shaders/heatmap_3d_vert.glsl +0 -46
  75. package/es/heatmap/shaders/heatmap_frag.glsl +0 -47
  76. package/es/heatmap/shaders/heatmap_framebuffer_frag.glsl +0 -10
  77. package/es/heatmap/shaders/heatmap_framebuffer_vert.glsl +0 -35
  78. package/es/heatmap/shaders/heatmap_vert.glsl +0 -10
  79. package/es/heatmap/shaders/hexagon_3d_frag.glsl +0 -0
  80. package/es/heatmap/shaders/hexagon_3d_vert.glsl +0 -64
  81. package/es/heatmap/shaders/hexagon_frag.glsl +0 -12
  82. package/es/heatmap/shaders/hexagon_vert.glsl +0 -41
  83. package/es/heatmap/triangulation.d.ts +0 -5
  84. package/es/heatmap/triangulation.js +0 -37
  85. package/es/image/index.d.ts +0 -19
  86. package/es/image/index.js +0 -104
  87. package/es/image/models/dataImage.d.ts +0 -22
  88. package/es/image/models/dataImage.js +0 -200
  89. package/es/image/models/image.d.ts +0 -19
  90. package/es/image/models/image.js +0 -164
  91. package/es/image/models/index.d.ts +0 -5
  92. package/es/image/models/index.js +0 -9
  93. package/es/image/models/tileDataImage.d.ts +0 -19
  94. package/es/image/models/tileDataImage.js +0 -174
  95. package/es/image/shaders/dataImage_frag.glsl +0 -38
  96. package/es/image/shaders/image_frag.glsl +0 -9
  97. package/es/image/shaders/image_vert.glsl +0 -17
  98. package/es/index.d.ts +0 -17
  99. package/es/index.js +0 -107
  100. package/es/line/index.d.ts +0 -43
  101. package/es/line/index.js +0 -140
  102. package/es/line/models/arc.d.ts +0 -17
  103. package/es/line/models/arc.js +0 -356
  104. package/es/line/models/arc_3d.d.ts +0 -17
  105. package/es/line/models/arc_3d.js +0 -333
  106. package/es/line/models/earthArc_3d.d.ts +0 -17
  107. package/es/line/models/earthArc_3d.js +0 -336
  108. package/es/line/models/great_circle.d.ts +0 -12
  109. package/es/line/models/great_circle.js +0 -294
  110. package/es/line/models/half.d.ts +0 -18
  111. package/es/line/models/half.js +0 -281
  112. package/es/line/models/index.d.ts +0 -5
  113. package/es/line/models/index.js +0 -25
  114. package/es/line/models/line.d.ts +0 -21
  115. package/es/line/models/line.js +0 -443
  116. package/es/line/models/linearline.d.ts +0 -11
  117. package/es/line/models/linearline.js +0 -275
  118. package/es/line/models/simpleLine.d.ts +0 -14
  119. package/es/line/models/simpleLine.js +0 -234
  120. package/es/line/models/simpleTileLine.d.ts +0 -9
  121. package/es/line/models/simpleTileLine.js +0 -100
  122. package/es/line/models/tile.d.ts +0 -8
  123. package/es/line/models/tile.js +0 -178
  124. package/es/line/models/wall.d.ts +0 -12
  125. package/es/line/models/wall.js +0 -293
  126. package/es/line/shaders/arc_chunks.vert.glsl +0 -21
  127. package/es/line/shaders/dash/arc_dash_frag.glsl +0 -28
  128. package/es/line/shaders/dash/arc_dash_vert.glsl +0 -150
  129. package/es/line/shaders/dash/line_dash_frag.glsl +0 -31
  130. package/es/line/shaders/dash/line_dash_vert.glsl +0 -93
  131. package/es/line/shaders/half/line_half_frag.glsl +0 -53
  132. package/es/line/shaders/half/line_half_vert.glsl +0 -169
  133. package/es/line/shaders/line_arc2d_vert.glsl +0 -114
  134. package/es/line/shaders/line_arc_3d_frag.glsl +0 -103
  135. package/es/line/shaders/line_arc_3d_vert.glsl +0 -206
  136. package/es/line/shaders/line_arc_frag.glsl +0 -88
  137. package/es/line/shaders/line_arc_great_circle_frag.glsl +0 -101
  138. package/es/line/shaders/line_arc_great_circle_vert.glsl +0 -214
  139. package/es/line/shaders/line_arc_vert.glsl +0 -178
  140. package/es/line/shaders/line_bezier_vert.glsl +0 -85
  141. package/es/line/shaders/line_frag.glsl +0 -99
  142. package/es/line/shaders/line_vert.glsl +0 -192
  143. package/es/line/shaders/linear/arc3d_linear_frag.glsl +0 -46
  144. package/es/line/shaders/linear/arc3d_linear_vert.glsl +0 -206
  145. package/es/line/shaders/linear/arc_linear_frag.glsl +0 -38
  146. package/es/line/shaders/linear/arc_linear_vert.glsl +0 -138
  147. package/es/line/shaders/linear/line_linear_frag.glsl +0 -27
  148. package/es/line/shaders/linearLine/line_linear_frag.glsl +0 -20
  149. package/es/line/shaders/linearLine/line_linear_vert.glsl +0 -112
  150. package/es/line/shaders/simple/simpleline_frag.glsl +0 -10
  151. package/es/line/shaders/simple/simpleline_linear_frag.glsl +0 -11
  152. package/es/line/shaders/simple/simpleline_vert.glsl +0 -79
  153. package/es/line/shaders/tile/line_tile_map_vert.glsl +0 -25
  154. package/es/line/shaders/tile/line_tile_vert.glsl +0 -52
  155. package/es/line/shaders/tile/simpleline_map_vert.glsl +0 -15
  156. package/es/line/shaders/tile/simpleline_vert.glsl +0 -21
  157. package/es/line/shaders/wall/wall_frag.glsl +0 -89
  158. package/es/line/shaders/wall/wall_vert.glsl +0 -77
  159. package/es/mask/index.d.ts +0 -27
  160. package/es/mask/index.js +0 -160
  161. package/es/mask/models/fill.d.ts +0 -12
  162. package/es/mask/models/fill.js +0 -124
  163. package/es/mask/models/index.d.ts +0 -5
  164. package/es/mask/models/index.js +0 -7
  165. package/es/mask/shaders/mask_vert.glsl +0 -16
  166. package/es/plugins/DataMappingPlugin.d.ts +0 -18
  167. package/es/plugins/DataMappingPlugin.js +0 -413
  168. package/es/plugins/DataSourcePlugin.d.ts +0 -7
  169. package/es/plugins/DataSourcePlugin.js +0 -84
  170. package/es/plugins/FeatureScalePlugin.d.ts +0 -24
  171. package/es/plugins/FeatureScalePlugin.js +0 -340
  172. package/es/plugins/LayerAnimateStylePlugin.d.ts +0 -5
  173. package/es/plugins/LayerAnimateStylePlugin.js +0 -29
  174. package/es/plugins/LayerModelPlugin.d.ts +0 -10
  175. package/es/plugins/LayerModelPlugin.js +0 -72
  176. package/es/plugins/LayerStylePlugin.d.ts +0 -8
  177. package/es/plugins/LayerStylePlugin.js +0 -39
  178. package/es/plugins/LightingPlugin.d.ts +0 -36
  179. package/es/plugins/LightingPlugin.js +0 -104
  180. package/es/plugins/MultiPassRendererPlugin.d.ts +0 -23
  181. package/es/plugins/MultiPassRendererPlugin.js +0 -65
  182. package/es/plugins/PixelPickingPlugin.d.ts +0 -8
  183. package/es/plugins/PixelPickingPlugin.js +0 -126
  184. package/es/plugins/RegisterStyleAttributePlugin.d.ts +0 -15
  185. package/es/plugins/RegisterStyleAttributePlugin.js +0 -156
  186. package/es/plugins/ShaderUniformPlugin.d.ts +0 -21
  187. package/es/plugins/ShaderUniformPlugin.js +0 -106
  188. package/es/plugins/UpdateModelPlugin.d.ts +0 -8
  189. package/es/plugins/UpdateModelPlugin.js +0 -31
  190. package/es/plugins/UpdateStyleAttributePlugin.d.ts +0 -12
  191. package/es/plugins/UpdateStyleAttributePlugin.js +0 -83
  192. package/es/point/index.d.ts +0 -40
  193. package/es/point/index.js +0 -229
  194. package/es/point/models/earthExtrude.d.ts +0 -24
  195. package/es/point/models/earthExtrude.js +0 -274
  196. package/es/point/models/earthFill.d.ts +0 -11
  197. package/es/point/models/earthFill.js +0 -258
  198. package/es/point/models/extrude.d.ts +0 -24
  199. package/es/point/models/extrude.js +0 -295
  200. package/es/point/models/fill.d.ts +0 -40
  201. package/es/point/models/fill.js +0 -403
  202. package/es/point/models/fillmage.d.ts +0 -25
  203. package/es/point/models/fillmage.js +0 -366
  204. package/es/point/models/image.d.ts +0 -11
  205. package/es/point/models/image.js +0 -239
  206. package/es/point/models/index.d.ts +0 -5
  207. package/es/point/models/index.js +0 -30
  208. package/es/point/models/normal.d.ts +0 -16
  209. package/es/point/models/normal.js +0 -124
  210. package/es/point/models/radar.d.ts +0 -24
  211. package/es/point/models/radar.js +0 -232
  212. package/es/point/models/simplePoint.d.ts +0 -16
  213. package/es/point/models/simplePoint.js +0 -179
  214. package/es/point/models/text.d.ts +0 -57
  215. package/es/point/models/text.js +0 -619
  216. package/es/point/models/tile.d.ts +0 -15
  217. package/es/point/models/tile.js +0 -175
  218. package/es/point/models/tileText.d.ts +0 -52
  219. package/es/point/models/tileText.js +0 -509
  220. package/es/point/shaders/animate/wave_frag.glsl +0 -65
  221. package/es/point/shaders/earth/extrude_frag.glsl +0 -44
  222. package/es/point/shaders/earth/extrude_vert.glsl +0 -140
  223. package/es/point/shaders/earth/fill_frag.glsl +0 -86
  224. package/es/point/shaders/earth/fill_vert.glsl +0 -125
  225. package/es/point/shaders/extrude/extrude_frag.glsl +0 -44
  226. package/es/point/shaders/extrude/extrude_vert.glsl +0 -121
  227. package/es/point/shaders/fill_frag.glsl +0 -84
  228. package/es/point/shaders/fill_vert.glsl +0 -188
  229. package/es/point/shaders/image/fillImage_frag.glsl +0 -20
  230. package/es/point/shaders/image/fillImage_vert.glsl +0 -116
  231. package/es/point/shaders/image_frag.glsl +0 -39
  232. package/es/point/shaders/image_vert.glsl +0 -90
  233. package/es/point/shaders/normal_frag.glsl +0 -6
  234. package/es/point/shaders/normal_vert.glsl +0 -24
  235. package/es/point/shaders/radar/radar_frag.glsl +0 -53
  236. package/es/point/shaders/radar/radar_vert.glsl +0 -70
  237. package/es/point/shaders/simplePoint_frag.glsl +0 -53
  238. package/es/point/shaders/simplePoint_vert.glsl +0 -79
  239. package/es/point/shaders/text_frag.glsl +0 -48
  240. package/es/point/shaders/text_vert.glsl +0 -131
  241. package/es/point/shaders/tile/fill_tile_frag.glsl +0 -76
  242. package/es/point/shaders/tile/fill_tile_vert.glsl +0 -78
  243. package/es/point/shaders/tile/text_frag.glsl +0 -33
  244. package/es/point/shaders/tile/text_map_frag.glsl +0 -31
  245. package/es/point/shaders/tile/text_map_vert.glsl +0 -38
  246. package/es/point/shaders/tile/text_vert.glsl +0 -48
  247. package/es/point/shape/extrude.d.ts +0 -15
  248. package/es/point/shape/extrude.js +0 -63
  249. package/es/polygon/index.d.ts +0 -27
  250. package/es/polygon/index.js +0 -146
  251. package/es/polygon/models/extrude.d.ts +0 -28
  252. package/es/polygon/models/extrude.js +0 -302
  253. package/es/polygon/models/fill.d.ts +0 -17
  254. package/es/polygon/models/fill.js +0 -210
  255. package/es/polygon/models/index.d.ts +0 -5
  256. package/es/polygon/models/index.js +0 -28
  257. package/es/polygon/models/ocean.d.ts +0 -21
  258. package/es/polygon/models/ocean.js +0 -202
  259. package/es/polygon/models/tile.d.ts +0 -12
  260. package/es/polygon/models/tile.js +0 -101
  261. package/es/polygon/models/water.d.ts +0 -16
  262. package/es/polygon/models/water.js +0 -179
  263. package/es/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -44
  264. package/es/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -44
  265. package/es/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -85
  266. package/es/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -90
  267. package/es/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -48
  268. package/es/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -93
  269. package/es/polygon/shaders/polygon_frag.glsl +0 -12
  270. package/es/polygon/shaders/polygon_linear_frag.glsl +0 -22
  271. package/es/polygon/shaders/polygon_linear_vert.glsl +0 -74
  272. package/es/polygon/shaders/polygon_vert.glsl +0 -66
  273. package/es/polygon/shaders/tile/polygon_tile_map_vert.glsl +0 -16
  274. package/es/polygon/shaders/tile/polygon_tile_vert.glsl +0 -42
  275. package/es/polygon/shaders/water/polygon_ocean_frag.glsl +0 -247
  276. package/es/polygon/shaders/water/polygon_ocean_vert.glsl +0 -21
  277. package/es/polygon/shaders/water/polygon_water_frag.glsl +0 -71
  278. package/es/polygon/shaders/water/polygon_water_vert.glsl +0 -26
  279. package/es/raster/buffers/triangulation.d.ts +0 -6
  280. package/es/raster/buffers/triangulation.js +0 -25
  281. package/es/raster/index.d.ts +0 -19
  282. package/es/raster/index.js +0 -107
  283. package/es/raster/models/index.d.ts +0 -5
  284. package/es/raster/models/index.js +0 -10
  285. package/es/raster/models/raster.d.ts +0 -22
  286. package/es/raster/models/raster.js +0 -242
  287. package/es/raster/models/rasterRgb.d.ts +0 -20
  288. package/es/raster/models/rasterRgb.js +0 -226
  289. package/es/raster/models/rasterTile.d.ts +0 -18
  290. package/es/raster/models/rasterTile.js +0 -140
  291. package/es/raster/raster.d.ts +0 -30
  292. package/es/raster/raster.js +0 -174
  293. package/es/raster/shaders/raster_2d_frag.glsl +0 -64
  294. package/es/raster/shaders/raster_2d_vert.glsl +0 -17
  295. package/es/raster/shaders/raster_frag.glsl +0 -9
  296. package/es/raster/shaders/raster_rgb_frag.glsl +0 -12
  297. package/es/raster/shaders/raster_vert.glsl +0 -44
  298. package/es/shader/minify_frag.glsl +0 -7
  299. package/es/shader/minify_picking_frag.glsl +0 -10
  300. package/es/tile/interface.d.ts +0 -29
  301. package/es/tile/interface.js +0 -1
  302. package/es/tile/manager/baseMapTileLayerManager.d.ts +0 -7
  303. package/es/tile/manager/baseMapTileLayerManager.js +0 -119
  304. package/es/tile/manager/baseTileManager.d.ts +0 -27
  305. package/es/tile/manager/baseTileManager.js +0 -107
  306. package/es/tile/manager/tileConfigManager.d.ts +0 -17
  307. package/es/tile/manager/tileConfigManager.js +0 -121
  308. package/es/tile/manager/tileLayerManager.d.ts +0 -15
  309. package/es/tile/manager/tileLayerManager.js +0 -255
  310. package/es/tile/manager/tilePickerManager.d.ts +0 -21
  311. package/es/tile/manager/tilePickerManager.js +0 -194
  312. package/es/tile/models/tileModel.d.ts +0 -10
  313. package/es/tile/models/tileModel.js +0 -81
  314. package/es/tile/tileFactory/base.d.ts +0 -44
  315. package/es/tile/tileFactory/base.js +0 -474
  316. package/es/tile/tileFactory/index.d.ts +0 -5
  317. package/es/tile/tileFactory/index.js +0 -38
  318. package/es/tile/tileFactory/line.d.ts +0 -12
  319. package/es/tile/tileFactory/line.js +0 -62
  320. package/es/tile/tileFactory/mask.d.ts +0 -12
  321. package/es/tile/tileFactory/mask.js +0 -63
  322. package/es/tile/tileFactory/point.d.ts +0 -12
  323. package/es/tile/tileFactory/point.js +0 -63
  324. package/es/tile/tileFactory/polygon.d.ts +0 -12
  325. package/es/tile/tileFactory/polygon.js +0 -62
  326. package/es/tile/tileFactory/raster.d.ts +0 -12
  327. package/es/tile/tileFactory/raster.js +0 -58
  328. package/es/tile/tileFactory/rasterData.d.ts +0 -12
  329. package/es/tile/tileFactory/rasterData.js +0 -86
  330. package/es/tile/tileFactory/rasterDataLayer.d.ts +0 -20
  331. package/es/tile/tileFactory/rasterDataLayer.js +0 -90
  332. package/es/tile/tileFactory/test.d.ts +0 -12
  333. package/es/tile/tileFactory/test.js +0 -105
  334. package/es/tile/tileFactory/vectorLayer.d.ts +0 -38
  335. package/es/tile/tileFactory/vectorLayer.js +0 -264
  336. package/es/tile/tileLayer/baseMapTileLayer.d.ts +0 -30
  337. package/es/tile/tileLayer/baseMapTileLayer.js +0 -195
  338. package/es/tile/tileLayer/baseTileLayer.d.ts +0 -48
  339. package/es/tile/tileLayer/baseTileLayer.js +0 -420
  340. package/es/tile/tileTest.d.ts +0 -15
  341. package/es/tile/tileTest.js +0 -62
  342. package/es/tile/tmsMapTileLayer.d.ts +0 -7
  343. package/es/tile/tmsMapTileLayer.js +0 -97
  344. package/es/tile/tmsTileLayer.d.ts +0 -7
  345. package/es/tile/tmsTileLayer.js +0 -101
  346. package/es/tile/utils.d.ts +0 -19
  347. package/es/tile/utils.js +0 -209
  348. package/es/utils/blend.d.ts +0 -2
  349. package/es/utils/blend.js +0 -54
  350. package/es/utils/collision-index.d.ts +0 -47
  351. package/es/utils/collision-index.js +0 -102
  352. package/es/utils/dataMappingStyle.d.ts +0 -31
  353. package/es/utils/dataMappingStyle.js +0 -150
  354. package/es/utils/extrude_polyline.d.ts +0 -67
  355. package/es/utils/extrude_polyline.js +0 -611
  356. package/es/utils/grid-index.d.ts +0 -28
  357. package/es/utils/grid-index.js +0 -179
  358. package/es/utils/layerData.d.ts +0 -2
  359. package/es/utils/layerData.js +0 -179
  360. package/es/utils/multiPassRender.d.ts +0 -16
  361. package/es/utils/multiPassRender.js +0 -50
  362. package/es/utils/polylineNormal.d.ts +0 -9
  363. package/es/utils/polylineNormal.js +0 -191
  364. package/es/utils/simpleLine.d.ts +0 -23
  365. package/es/utils/simpleLine.js +0 -103
  366. package/es/utils/symbol-layout.d.ts +0 -43
  367. package/es/utils/symbol-layout.js +0 -299
  368. package/es/utils/updateShape.d.ts +0 -2
  369. package/es/utils/updateShape.js +0 -20
  370. package/es/wind/index.d.ts +0 -20
  371. package/es/wind/index.js +0 -98
  372. package/es/wind/models/index.d.ts +0 -5
  373. package/es/wind/models/index.js +0 -5
  374. package/es/wind/models/utils.d.ts +0 -19
  375. package/es/wind/models/utils.js +0 -226
  376. package/es/wind/models/wind.d.ts +0 -33
  377. package/es/wind/models/wind.js +0 -331
  378. package/es/wind/models/windRender.d.ts +0 -104
  379. package/es/wind/models/windRender.js +0 -357
  380. package/es/wind/models/windShader.d.ts +0 -12
  381. package/es/wind/models/windShader.js +0 -12
  382. package/es/wind/shaders/wind_frag.glsl +0 -9
  383. package/es/wind/shaders/wind_vert.glsl +0 -17
  384. package/lib/Geometry/index.js +0 -130
  385. package/lib/Geometry/models/billboard.js +0 -242
  386. package/lib/Geometry/models/index.js +0 -22
  387. package/lib/Geometry/models/plane.js +0 -434
  388. package/lib/Geometry/models/sprite.js +0 -315
  389. package/lib/Geometry/shaders/billboard_frag.glsl +0 -13
  390. package/lib/Geometry/shaders/billboard_vert.glsl +0 -50
  391. package/lib/Geometry/shaders/plane_frag.glsl +0 -22
  392. package/lib/Geometry/shaders/plane_vert.glsl +0 -53
  393. package/lib/Geometry/shaders/sprite_frag.glsl +0 -21
  394. package/lib/Geometry/shaders/sprite_vert.glsl +0 -28
  395. package/lib/canvas/index.js +0 -133
  396. package/lib/canvas/models/canvas.js +0 -221
  397. package/lib/canvas/models/index.js +0 -16
  398. package/lib/citybuliding/building.js +0 -99
  399. package/lib/citybuliding/models/build.js +0 -202
  400. package/lib/citybuliding/shaders/build_frag.glsl +0 -117
  401. package/lib/citybuliding/shaders/build_vert.glsl +0 -54
  402. package/lib/core/BaseLayer.js +0 -1425
  403. package/lib/core/BaseModel.js +0 -506
  404. package/lib/core/interface.js +0 -41
  405. package/lib/core/schema.js +0 -33
  406. package/lib/core/shape/Path.js +0 -88
  407. package/lib/core/shape/extrude.js +0 -180
  408. package/lib/core/triangulation.js +0 -619
  409. package/lib/earth/index.js +0 -113
  410. package/lib/earth/models/atmosphere.js +0 -149
  411. package/lib/earth/models/base.js +0 -216
  412. package/lib/earth/models/bloomsphere.js +0 -148
  413. package/lib/earth/shaders/atmosphere_frag.glsl +0 -17
  414. package/lib/earth/shaders/atmosphere_vert.glsl +0 -26
  415. package/lib/earth/shaders/base_frag.glsl +0 -13
  416. package/lib/earth/shaders/base_vert.glsl +0 -52
  417. package/lib/earth/shaders/bloomsphere_frag.glsl +0 -15
  418. package/lib/earth/shaders/bloomsphere_vert.glsl +0 -20
  419. package/lib/earth/utils.js +0 -136
  420. package/lib/heatmap/index.js +0 -154
  421. package/lib/heatmap/models/grid.js +0 -120
  422. package/lib/heatmap/models/grid3d.js +0 -154
  423. package/lib/heatmap/models/heatmap.js +0 -486
  424. package/lib/heatmap/models/hexagon.js +0 -121
  425. package/lib/heatmap/models/index.js +0 -26
  426. package/lib/heatmap/shaders/grid_vert.glsl +0 -42
  427. package/lib/heatmap/shaders/heatmap_3d_frag.glsl +0 -14
  428. package/lib/heatmap/shaders/heatmap_3d_vert.glsl +0 -46
  429. package/lib/heatmap/shaders/heatmap_frag.glsl +0 -47
  430. package/lib/heatmap/shaders/heatmap_framebuffer_frag.glsl +0 -10
  431. package/lib/heatmap/shaders/heatmap_framebuffer_vert.glsl +0 -35
  432. package/lib/heatmap/shaders/heatmap_vert.glsl +0 -10
  433. package/lib/heatmap/shaders/hexagon_3d_frag.glsl +0 -0
  434. package/lib/heatmap/shaders/hexagon_3d_vert.glsl +0 -64
  435. package/lib/heatmap/shaders/hexagon_frag.glsl +0 -12
  436. package/lib/heatmap/shaders/hexagon_vert.glsl +0 -41
  437. package/lib/heatmap/triangulation.js +0 -44
  438. package/lib/image/index.js +0 -117
  439. package/lib/image/models/dataImage.js +0 -215
  440. package/lib/image/models/image.js +0 -178
  441. package/lib/image/models/index.js +0 -22
  442. package/lib/image/models/tileDataImage.js +0 -188
  443. package/lib/image/shaders/dataImage_frag.glsl +0 -38
  444. package/lib/image/shaders/image_frag.glsl +0 -9
  445. package/lib/image/shaders/image_vert.glsl +0 -17
  446. package/lib/index.js +0 -275
  447. package/lib/line/index.js +0 -152
  448. package/lib/line/models/arc.js +0 -373
  449. package/lib/line/models/arc_3d.js +0 -351
  450. package/lib/line/models/earthArc_3d.js +0 -354
  451. package/lib/line/models/great_circle.js +0 -310
  452. package/lib/line/models/half.js +0 -298
  453. package/lib/line/models/index.js +0 -46
  454. package/lib/line/models/line.js +0 -460
  455. package/lib/line/models/linearline.js +0 -292
  456. package/lib/line/models/simpleLine.js +0 -249
  457. package/lib/line/models/simpleTileLine.js +0 -115
  458. package/lib/line/models/tile.js +0 -194
  459. package/lib/line/models/wall.js +0 -309
  460. package/lib/line/shaders/arc_chunks.vert.glsl +0 -21
  461. package/lib/line/shaders/dash/arc_dash_frag.glsl +0 -28
  462. package/lib/line/shaders/dash/arc_dash_vert.glsl +0 -150
  463. package/lib/line/shaders/dash/line_dash_frag.glsl +0 -31
  464. package/lib/line/shaders/dash/line_dash_vert.glsl +0 -93
  465. package/lib/line/shaders/half/line_half_frag.glsl +0 -53
  466. package/lib/line/shaders/half/line_half_vert.glsl +0 -169
  467. package/lib/line/shaders/line_arc2d_vert.glsl +0 -114
  468. package/lib/line/shaders/line_arc_3d_frag.glsl +0 -103
  469. package/lib/line/shaders/line_arc_3d_vert.glsl +0 -206
  470. package/lib/line/shaders/line_arc_frag.glsl +0 -88
  471. package/lib/line/shaders/line_arc_great_circle_frag.glsl +0 -101
  472. package/lib/line/shaders/line_arc_great_circle_vert.glsl +0 -214
  473. package/lib/line/shaders/line_arc_vert.glsl +0 -178
  474. package/lib/line/shaders/line_bezier_vert.glsl +0 -85
  475. package/lib/line/shaders/line_frag.glsl +0 -99
  476. package/lib/line/shaders/line_vert.glsl +0 -192
  477. package/lib/line/shaders/linear/arc3d_linear_frag.glsl +0 -46
  478. package/lib/line/shaders/linear/arc3d_linear_vert.glsl +0 -206
  479. package/lib/line/shaders/linear/arc_linear_frag.glsl +0 -38
  480. package/lib/line/shaders/linear/arc_linear_vert.glsl +0 -138
  481. package/lib/line/shaders/linear/line_linear_frag.glsl +0 -27
  482. package/lib/line/shaders/linearLine/line_linear_frag.glsl +0 -20
  483. package/lib/line/shaders/linearLine/line_linear_vert.glsl +0 -112
  484. package/lib/line/shaders/simple/simpleline_frag.glsl +0 -10
  485. package/lib/line/shaders/simple/simpleline_linear_frag.glsl +0 -11
  486. package/lib/line/shaders/simple/simpleline_vert.glsl +0 -79
  487. package/lib/line/shaders/tile/line_tile_map_vert.glsl +0 -25
  488. package/lib/line/shaders/tile/line_tile_vert.glsl +0 -52
  489. package/lib/line/shaders/tile/simpleline_map_vert.glsl +0 -15
  490. package/lib/line/shaders/tile/simpleline_vert.glsl +0 -21
  491. package/lib/line/shaders/wall/wall_frag.glsl +0 -89
  492. package/lib/line/shaders/wall/wall_vert.glsl +0 -77
  493. package/lib/mask/index.js +0 -176
  494. package/lib/mask/models/fill.js +0 -141
  495. package/lib/mask/models/index.js +0 -19
  496. package/lib/mask/shaders/mask_vert.glsl +0 -16
  497. package/lib/plugins/DataMappingPlugin.js +0 -427
  498. package/lib/plugins/DataSourcePlugin.js +0 -97
  499. package/lib/plugins/FeatureScalePlugin.js +0 -363
  500. package/lib/plugins/LayerAnimateStylePlugin.js +0 -41
  501. package/lib/plugins/LayerModelPlugin.js +0 -83
  502. package/lib/plugins/LayerStylePlugin.js +0 -50
  503. package/lib/plugins/LightingPlugin.js +0 -119
  504. package/lib/plugins/MultiPassRendererPlugin.js +0 -77
  505. package/lib/plugins/PixelPickingPlugin.js +0 -139
  506. package/lib/plugins/RegisterStyleAttributePlugin.js +0 -168
  507. package/lib/plugins/ShaderUniformPlugin.js +0 -119
  508. package/lib/plugins/UpdateModelPlugin.js +0 -42
  509. package/lib/plugins/UpdateStyleAttributePlugin.js +0 -94
  510. package/lib/point/index.js +0 -242
  511. package/lib/point/models/earthExtrude.js +0 -290
  512. package/lib/point/models/earthFill.js +0 -293
  513. package/lib/point/models/extrude.js +0 -312
  514. package/lib/point/models/fill.js +0 -419
  515. package/lib/point/models/fillmage.js +0 -382
  516. package/lib/point/models/image.js +0 -255
  517. package/lib/point/models/index.js +0 -53
  518. package/lib/point/models/normal.js +0 -141
  519. package/lib/point/models/radar.js +0 -249
  520. package/lib/point/models/simplePoint.js +0 -196
  521. package/lib/point/models/text.js +0 -634
  522. package/lib/point/models/tile.js +0 -189
  523. package/lib/point/models/tileText.js +0 -524
  524. package/lib/point/shaders/animate/wave_frag.glsl +0 -65
  525. package/lib/point/shaders/earth/extrude_frag.glsl +0 -44
  526. package/lib/point/shaders/earth/extrude_vert.glsl +0 -140
  527. package/lib/point/shaders/earth/fill_frag.glsl +0 -86
  528. package/lib/point/shaders/earth/fill_vert.glsl +0 -125
  529. package/lib/point/shaders/extrude/extrude_frag.glsl +0 -44
  530. package/lib/point/shaders/extrude/extrude_vert.glsl +0 -121
  531. package/lib/point/shaders/fill_frag.glsl +0 -84
  532. package/lib/point/shaders/fill_vert.glsl +0 -188
  533. package/lib/point/shaders/image/fillImage_frag.glsl +0 -20
  534. package/lib/point/shaders/image/fillImage_vert.glsl +0 -116
  535. package/lib/point/shaders/image_frag.glsl +0 -39
  536. package/lib/point/shaders/image_vert.glsl +0 -90
  537. package/lib/point/shaders/normal_frag.glsl +0 -6
  538. package/lib/point/shaders/normal_vert.glsl +0 -24
  539. package/lib/point/shaders/radar/radar_frag.glsl +0 -53
  540. package/lib/point/shaders/radar/radar_vert.glsl +0 -70
  541. package/lib/point/shaders/simplePoint_frag.glsl +0 -53
  542. package/lib/point/shaders/simplePoint_vert.glsl +0 -79
  543. package/lib/point/shaders/text_frag.glsl +0 -48
  544. package/lib/point/shaders/text_vert.glsl +0 -131
  545. package/lib/point/shaders/tile/fill_tile_frag.glsl +0 -76
  546. package/lib/point/shaders/tile/fill_tile_vert.glsl +0 -78
  547. package/lib/point/shaders/tile/text_frag.glsl +0 -33
  548. package/lib/point/shaders/tile/text_map_frag.glsl +0 -31
  549. package/lib/point/shaders/tile/text_map_vert.glsl +0 -38
  550. package/lib/point/shaders/tile/text_vert.glsl +0 -48
  551. package/lib/point/shape/extrude.js +0 -78
  552. package/lib/polygon/index.js +0 -160
  553. package/lib/polygon/models/extrude.js +0 -318
  554. package/lib/polygon/models/fill.js +0 -225
  555. package/lib/polygon/models/index.js +0 -50
  556. package/lib/polygon/models/ocean.js +0 -219
  557. package/lib/polygon/models/tile.js +0 -114
  558. package/lib/polygon/models/water.js +0 -196
  559. package/lib/polygon/shaders/extrude/polygon_extrude_frag.glsl +0 -44
  560. package/lib/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +0 -44
  561. package/lib/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +0 -85
  562. package/lib/polygon/shaders/extrude/polygon_extrude_vert.glsl +0 -90
  563. package/lib/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +0 -48
  564. package/lib/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +0 -93
  565. package/lib/polygon/shaders/polygon_frag.glsl +0 -12
  566. package/lib/polygon/shaders/polygon_linear_frag.glsl +0 -22
  567. package/lib/polygon/shaders/polygon_linear_vert.glsl +0 -74
  568. package/lib/polygon/shaders/polygon_vert.glsl +0 -66
  569. package/lib/polygon/shaders/tile/polygon_tile_map_vert.glsl +0 -16
  570. package/lib/polygon/shaders/tile/polygon_tile_vert.glsl +0 -42
  571. package/lib/polygon/shaders/water/polygon_ocean_frag.glsl +0 -247
  572. package/lib/polygon/shaders/water/polygon_ocean_vert.glsl +0 -21
  573. package/lib/polygon/shaders/water/polygon_water_frag.glsl +0 -71
  574. package/lib/polygon/shaders/water/polygon_water_vert.glsl +0 -26
  575. package/lib/raster/buffers/triangulation.js +0 -35
  576. package/lib/raster/index.js +0 -120
  577. package/lib/raster/models/index.js +0 -23
  578. package/lib/raster/models/raster.js +0 -259
  579. package/lib/raster/models/rasterRgb.js +0 -241
  580. package/lib/raster/models/rasterTile.js +0 -154
  581. package/lib/raster/raster.js +0 -191
  582. package/lib/raster/shaders/raster_2d_frag.glsl +0 -64
  583. package/lib/raster/shaders/raster_2d_vert.glsl +0 -17
  584. package/lib/raster/shaders/raster_frag.glsl +0 -9
  585. package/lib/raster/shaders/raster_rgb_frag.glsl +0 -12
  586. package/lib/raster/shaders/raster_vert.glsl +0 -44
  587. package/lib/shader/minify_frag.glsl +0 -7
  588. package/lib/shader/minify_picking_frag.glsl +0 -10
  589. package/lib/tile/interface.js +0 -5
  590. package/lib/tile/manager/baseMapTileLayerManager.js +0 -134
  591. package/lib/tile/manager/baseTileManager.js +0 -121
  592. package/lib/tile/manager/tileConfigManager.js +0 -133
  593. package/lib/tile/manager/tileLayerManager.js +0 -273
  594. package/lib/tile/manager/tilePickerManager.js +0 -205
  595. package/lib/tile/models/tileModel.js +0 -94
  596. package/lib/tile/tileFactory/base.js +0 -497
  597. package/lib/tile/tileFactory/index.js +0 -71
  598. package/lib/tile/tileFactory/line.js +0 -73
  599. package/lib/tile/tileFactory/mask.js +0 -74
  600. package/lib/tile/tileFactory/point.js +0 -74
  601. package/lib/tile/tileFactory/polygon.js +0 -73
  602. package/lib/tile/tileFactory/raster.js +0 -71
  603. package/lib/tile/tileFactory/rasterData.js +0 -99
  604. package/lib/tile/tileFactory/rasterDataLayer.js +0 -104
  605. package/lib/tile/tileFactory/test.js +0 -118
  606. package/lib/tile/tileFactory/vectorLayer.js +0 -280
  607. package/lib/tile/tileLayer/baseMapTileLayer.js +0 -202
  608. package/lib/tile/tileLayer/baseTileLayer.js +0 -429
  609. package/lib/tile/tileTest.js +0 -74
  610. package/lib/tile/tmsMapTileLayer.js +0 -114
  611. package/lib/tile/tmsTileLayer.js +0 -118
  612. package/lib/tile/utils.js +0 -248
  613. package/lib/utils/blend.js +0 -65
  614. package/lib/utils/collision-index.js +0 -118
  615. package/lib/utils/dataMappingStyle.js +0 -154
  616. package/lib/utils/extrude_polyline.js +0 -653
  617. package/lib/utils/grid-index.js +0 -188
  618. package/lib/utils/layerData.js +0 -191
  619. package/lib/utils/multiPassRender.js +0 -61
  620. package/lib/utils/polylineNormal.js +0 -230
  621. package/lib/utils/simpleLine.js +0 -116
  622. package/lib/utils/symbol-layout.js +0 -308
  623. package/lib/utils/updateShape.js +0 -27
  624. package/lib/wind/index.js +0 -111
  625. package/lib/wind/models/index.js +0 -16
  626. package/lib/wind/models/utils.js +0 -253
  627. package/lib/wind/models/wind.js +0 -346
  628. package/lib/wind/models/windRender.js +0 -373
  629. package/lib/wind/models/windShader.js +0 -25
  630. package/lib/wind/shaders/wind_frag.glsl +0 -9
  631. package/lib/wind/shaders/wind_vert.glsl +0 -17
@@ -1,1425 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
-
12
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
-
14
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
-
16
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
17
-
18
- var _initializerDefineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/initializerDefineProperty"));
19
-
20
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
21
-
22
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
23
-
24
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
25
-
26
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
27
-
28
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
29
-
30
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
31
-
32
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
33
-
34
- var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
35
-
36
- var _initializerWarningHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/initializerWarningHelper"));
37
-
38
- var _asyncHook = require("@antv/async-hook");
39
-
40
- var _l7Core = require("@antv/l7-core");
41
-
42
- var _l7Source = _interopRequireDefault(require("@antv/l7-source"));
43
-
44
- var _l7Utils = require("@antv/l7-utils");
45
-
46
- var _eventemitter = require("eventemitter3");
47
-
48
- var _lodash = require("lodash");
49
-
50
- var _blend = require("../utils/blend");
51
-
52
- var _dataMappingStyle = require("../utils/dataMappingStyle");
53
-
54
- var _layerData = require("../utils/layerData");
55
-
56
- var _multiPassRender = require("../utils/multiPassRender");
57
-
58
- var _updateShape = require("../utils/updateShape");
59
-
60
- var _excluded = ["passes"],
61
- _excluded2 = ["moduleName", "vertexShader", "fragmentShader", "triangulation", "segmentNumber", "workerEnabled", "workerOptions"];
62
-
63
- var _dec, _class, _descriptor;
64
-
65
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
66
-
67
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
68
-
69
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
70
-
71
- 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); }; }
72
-
73
- 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; } }
74
-
75
- /**
76
- * 分配 layer id
77
- */
78
- var layerIdCounter = 0;
79
- var BaseLayer = (_dec = (0, _l7Core.lazyInject)(_l7Core.TYPES.IGlobalConfigService), (_class = /*#__PURE__*/function (_ref) {
80
- (0, _inherits2.default)(BaseLayer, _ref);
81
-
82
- var _super = _createSuper(BaseLayer);
83
-
84
- // 生命周期钩子
85
- // 待渲染 model 列表
86
- // 用于保存子图层对象
87
- // Tip: 用于标识矢量图层
88
-
89
- /**
90
- * 待更新样式属性,在初始化阶段完成注册
91
- */
92
- // Tip: layer 保底颜色
93
- // private pickingPassRender: IPass<'pixelPicking'>;
94
- function BaseLayer() {
95
- var _this;
96
-
97
- var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
98
- (0, _classCallCheck2.default)(this, BaseLayer);
99
- _this = _super.call(this);
100
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "id", "".concat(layerIdCounter++));
101
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "name", "".concat(layerIdCounter));
102
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "visible", true);
103
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "zIndex", 0);
104
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "inited", false);
105
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "layerModelNeedUpdate", false);
106
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "pickedFeatureID", null);
107
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "selectedFeatureID", null);
108
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "styleNeedUpdate", false);
109
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "forceRender", false);
110
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "clusterZoom", 0);
111
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "defaultSourceConfig", {
112
- data: [],
113
- options: {
114
- parser: {
115
- type: 'json'
116
- }
117
- }
118
- });
119
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "dataState", {
120
- dataSourceNeedUpdate: false,
121
- dataMappingNeedUpdate: false,
122
- filterNeedUpdate: false,
123
- featureScaleNeedUpdate: false,
124
- StyleAttrNeedUpdate: false
125
- });
126
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hooks", {
127
- init: new _asyncHook.SyncBailHook(),
128
- afterInit: new _asyncHook.SyncBailHook(),
129
- beforeRender: new _asyncHook.SyncBailHook(),
130
- beforeRenderData: new _asyncHook.SyncWaterfallHook(),
131
- afterRender: new _asyncHook.SyncHook(),
132
- beforePickingEncode: new _asyncHook.SyncHook(),
133
- afterPickingEncode: new _asyncHook.SyncHook(),
134
- beforeHighlight: new _asyncHook.SyncHook(['pickedColor']),
135
- afterHighlight: new _asyncHook.SyncHook(),
136
- beforeSelect: new _asyncHook.SyncHook(['pickedColor']),
137
- afterSelect: new _asyncHook.SyncHook(),
138
- beforeDestroy: new _asyncHook.SyncHook(),
139
- afterDestroy: new _asyncHook.SyncHook()
140
- });
141
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "models", []);
142
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "modelLoaded", false);
143
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "layerChildren", []);
144
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "masks", []);
145
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isVector", false);
146
- (0, _initializerDefineProperty2.default)((0, _assertThisInitialized2.default)(_this), "configService", _descriptor, (0, _assertThisInitialized2.default)(_this));
147
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "animateOptions", {
148
- enable: false
149
- });
150
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "currentPickId", null);
151
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "pendingStyleAttributes", []);
152
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "scaleOptions", {});
153
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "animateStatus", false);
154
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "bottomColor", 'rgba(0, 0, 0, 0)');
155
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isDestroyed", false);
156
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "encodeDataLength", 0);
157
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sourceEvent", function () {
158
- _this.dataState.dataSourceNeedUpdate = true;
159
-
160
- var layerConfig = _this.getLayerConfig();
161
-
162
- if (layerConfig && layerConfig.autoFit) {
163
- _this.fitBounds(layerConfig.fitBoundsOptions);
164
- }
165
-
166
- _this.reRender();
167
- });
168
- _this.name = config.name || _this.id;
169
- _this.zIndex = config.zIndex || 0;
170
- _this.rawConfig = config;
171
- return _this;
172
- }
173
-
174
- (0, _createClass2.default)(BaseLayer, [{
175
- key: "addMaskLayer",
176
- value: function addMaskLayer(maskLayer) {
177
- this.masks.push(maskLayer);
178
- }
179
- }, {
180
- key: "removeMaskLayer",
181
- value: function removeMaskLayer(maskLayer) {
182
- var layerIndex = this.masks.indexOf(maskLayer);
183
-
184
- if (layerIndex > -1) {
185
- this.masks.splice(layerIndex, 1);
186
- }
187
-
188
- maskLayer.destroy();
189
- }
190
- }, {
191
- key: "getAttribute",
192
- value: function getAttribute(name) {
193
- return this.styleAttributeService.getLayerStyleAttribute(name);
194
- }
195
- }, {
196
- key: "getLayerConfig",
197
- value: function getLayerConfig() {
198
- return this.configService.getLayerConfig(this.id);
199
- }
200
- }, {
201
- key: "updateLayerConfig",
202
- value: function updateLayerConfig(configToUpdate) {
203
- var _this2 = this;
204
-
205
- // 同步 rawConfig
206
- Object.keys(configToUpdate).map(function (key) {
207
- if (key in _this2.rawConfig) {
208
- // @ts-ignore
209
- _this2.rawConfig[key] = configToUpdate[key];
210
- }
211
- });
212
-
213
- if (!this.inited) {
214
- this.needUpdateConfig = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.needUpdateConfig), configToUpdate);
215
- } else {
216
- var sceneId = this.container.get(_l7Core.TYPES.SceneID); // @ts-ignore
217
-
218
- (0, _dataMappingStyle.handleStyleDataMapping)(configToUpdate, this); // 处理 style 中进行数据映射的属性字段
219
-
220
- this.configService.setLayerConfig(sceneId, this.id, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.configService.getLayerConfig(this.id)), this.needUpdateConfig), configToUpdate));
221
- this.needUpdateConfig = {};
222
- }
223
- }
224
- /**
225
- * 注入图层容器,父容器为场景容器
226
- * RootContainer 1
227
- * -> SceneContainer 1.*
228
- * -> LayerContainer 1.*
229
- */
230
-
231
- }, {
232
- key: "setContainer",
233
- value: function setContainer(container, sceneContainer) {
234
- this.container = container;
235
- this.sceneContainer = sceneContainer;
236
- }
237
- }, {
238
- key: "getContainer",
239
- value: function getContainer() {
240
- return this.container;
241
- }
242
- }, {
243
- key: "setBottomColor",
244
- value: function setBottomColor(color) {
245
- this.bottomColor = color;
246
- }
247
- }, {
248
- key: "getBottomColor",
249
- value: function getBottomColor() {
250
- return this.bottomColor;
251
- }
252
- }, {
253
- key: "addPlugin",
254
- value: function addPlugin(plugin) {
255
- this.plugins.push(plugin);
256
- return this;
257
- }
258
- }, {
259
- key: "init",
260
- value: function init() {
261
- var _this3 = this;
262
-
263
- // 设置配置项
264
- var sceneId = this.container.get(_l7Core.TYPES.SceneID); // 初始化图层配置项
265
- // const { enableMultiPassRenderer = false } = this.rawConfig;
266
- // this.configService.setLayerConfig(sceneId, this.id, {
267
- // enableMultiPassRenderer,
268
- // });
269
-
270
- this.configService.setLayerConfig(sceneId, this.id, this.rawConfig);
271
- this.layerType = this.rawConfig.layerType; // 全局容器服务
272
- // 场景容器服务
273
-
274
- this.iconService = this.container.get(_l7Core.TYPES.IIconService);
275
- this.fontService = this.container.get(_l7Core.TYPES.IFontService);
276
- this.rendererService = this.container.get(_l7Core.TYPES.IRendererService);
277
- this.layerService = this.container.get(_l7Core.TYPES.ILayerService);
278
- this.interactionService = this.container.get(_l7Core.TYPES.IInteractionService);
279
- this.pickingService = this.container.get(_l7Core.TYPES.IPickingService);
280
- this.mapService = this.container.get(_l7Core.TYPES.IMapService);
281
-
282
- var _this$getLayerConfig = this.getLayerConfig(),
283
- enableMultiPassRenderer = _this$getLayerConfig.enableMultiPassRenderer,
284
- passes = _this$getLayerConfig.passes;
285
-
286
- if (enableMultiPassRenderer && passes !== null && passes !== void 0 && passes.length && passes.length > 0) {
287
- // Tip: 兼容 multiPassRender 在 amap1 时存在的图层不同步问题 zoom
288
- this.mapService.on('mapAfterFrameChange', function () {
289
- _this3.renderLayers();
290
- });
291
- }
292
-
293
- this.cameraService = this.container.get(_l7Core.TYPES.ICameraService);
294
- this.coordinateService = this.container.get(_l7Core.TYPES.ICoordinateSystemService);
295
- this.shaderModuleService = this.container.get(_l7Core.TYPES.IShaderModuleService);
296
- this.postProcessingPassFactory = this.container.get(_l7Core.TYPES.IFactoryPostProcessingPass);
297
- this.normalPassFactory = this.container.get(_l7Core.TYPES.IFactoryNormalPass); // 图层容器服务
298
-
299
- this.styleAttributeService = this.container.get(_l7Core.TYPES.IStyleAttributeService);
300
- this.multiPassRenderer = this.container.get(_l7Core.TYPES.IMultiPassRenderer);
301
- this.multiPassRenderer.setLayer(this); // 完成样式服务注册完成前添加的属性
302
-
303
- this.pendingStyleAttributes.forEach(function (_ref2) {
304
- var attributeName = _ref2.attributeName,
305
- attributeField = _ref2.attributeField,
306
- attributeValues = _ref2.attributeValues,
307
- updateOptions = _ref2.updateOptions;
308
-
309
- _this3.styleAttributeService.updateStyleAttribute(attributeName, {
310
- // @ts-ignore
311
- scale: (0, _objectSpread2.default)({
312
- field: attributeField
313
- }, _this3.splitValuesAndCallbackInAttribute( // @ts-ignore
314
- attributeValues, // @ts-ignore
315
- _this3.getLayerConfig()[attributeName]))
316
- }, // @ts-ignore
317
- updateOptions);
318
- });
319
- this.pendingStyleAttributes = []; // 获取插件集
320
-
321
- this.plugins = this.container.getAll(_l7Core.TYPES.ILayerPlugin); // 完成插件注册,传入场景和图层容器内的服务
322
-
323
- var _iterator = _createForOfIteratorHelper(this.plugins),
324
- _step;
325
-
326
- try {
327
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
328
- var plugin = _step.value;
329
- plugin.apply(this, {
330
- rendererService: this.rendererService,
331
- mapService: this.mapService,
332
- styleAttributeService: this.styleAttributeService,
333
- normalPassFactory: this.normalPassFactory,
334
- postProcessingPassFactory: this.postProcessingPassFactory
335
- });
336
- } // 触发 init 生命周期插件
337
-
338
- } catch (err) {
339
- _iterator.e(err);
340
- } finally {
341
- _iterator.f();
342
- }
343
-
344
- this.hooks.init.call(); // this.pickingPassRender = this.normalPassFactory('pixelPicking');
345
- // this.pickingPassRender.init(this);
346
-
347
- this.hooks.afterInit.call(); // 触发初始化完成事件;
348
-
349
- this.emit('inited', {
350
- target: this,
351
- type: 'inited'
352
- });
353
- this.emit('add', {
354
- target: this,
355
- type: 'add'
356
- });
357
- return this;
358
- }
359
- }, {
360
- key: "updateModelData",
361
- value: function updateModelData(data) {
362
- if (data.attributes && data.elements) {
363
- this.models.map(function (m) {
364
- m.updateAttributesAndElements(data.attributes, data.elements);
365
- });
366
- } else {
367
- console.warn('data error');
368
- }
369
- }
370
- }, {
371
- key: "createModelData",
372
- value: function createModelData(data, option) {
373
- var _this$layerModel;
374
-
375
- if ((_this$layerModel = this.layerModel) !== null && _this$layerModel !== void 0 && _this$layerModel.createModelData) {
376
- // 在某些特殊图层中单独构建 attribute & elements
377
- return this.layerModel.createModelData(option);
378
- }
379
-
380
- var calEncodeData = this.calculateEncodeData(data, option);
381
- var triangulation = this.triangulation;
382
-
383
- if (calEncodeData && triangulation) {
384
- return this.styleAttributeService.createAttributesAndIndices(calEncodeData, triangulation);
385
- } else {
386
- return {
387
- attributes: undefined,
388
- elements: undefined
389
- };
390
- }
391
- }
392
- }, {
393
- key: "calculateEncodeData",
394
- value: function calculateEncodeData(data, option) {
395
- if (this.inited) {
396
- return (0, _layerData.calculateData)(this, this.fontService, this.mapService, this.styleAttributeService, data, option);
397
- } else {
398
- console.warn('layer not inited!');
399
- return null;
400
- }
401
- }
402
- /**
403
- * Model初始化前需要更新Model样式
404
- */
405
-
406
- }, {
407
- key: "prepareBuildModel",
408
- value: function prepareBuildModel() {
409
- this.inited = true;
410
- this.updateLayerConfig((0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.getDefaultConfig()), this.rawConfig)); // 启动动画
411
-
412
- var _this$getLayerConfig2 = this.getLayerConfig(),
413
- animateOption = _this$getLayerConfig2.animateOption;
414
-
415
- if (animateOption !== null && animateOption !== void 0 && animateOption.enable) {
416
- this.layerService.startAnimate();
417
- this.animateStatus = true;
418
- }
419
- }
420
- }, {
421
- key: "color",
422
- value: function color(field, values, updateOptions) {
423
- this.updateStyleAttribute('color', field, values, updateOptions);
424
- return this;
425
- } // 为对应的图层传入纹理的编号名称(point/image 在 shape 方法中传入纹理名称的方法并不通用)
426
-
427
- }, {
428
- key: "texture",
429
- value: function texture(field, values, updateOptions) {
430
- this.updateStyleAttribute('texture', field, values, updateOptions);
431
- return this;
432
- }
433
- }, {
434
- key: "rotate",
435
- value: function rotate(field, values, updateOptions) {
436
- this.updateStyleAttribute('rotate', field, values, updateOptions);
437
- return this;
438
- }
439
- }, {
440
- key: "size",
441
- value: function size(field, values, updateOptions) {
442
- this.updateStyleAttribute('size', field, values, updateOptions);
443
- return this;
444
- } // 对mapping后的数据过滤,scale保持不变
445
-
446
- }, {
447
- key: "filter",
448
- value: function filter(field, values, updateOptions) {
449
- this.updateStyleAttribute('filter', field, values, updateOptions);
450
- return this;
451
- }
452
- }, {
453
- key: "shape",
454
- value: function shape(field, values, updateOptions) {
455
- var _this$styleAttributeS, _this$styleAttributeS2, _this$styleAttributeS3;
456
-
457
- var lastShape = (_this$styleAttributeS = this.styleAttributeService) === null || _this$styleAttributeS === void 0 ? void 0 : (_this$styleAttributeS2 = _this$styleAttributeS.getLayerStyleAttribute('shape')) === null || _this$styleAttributeS2 === void 0 ? void 0 : (_this$styleAttributeS3 = _this$styleAttributeS2.scale) === null || _this$styleAttributeS3 === void 0 ? void 0 : _this$styleAttributeS3.field;
458
- var currentShape = field;
459
- this.shapeOption = {
460
- field: field,
461
- values: values
462
- };
463
- this.updateStyleAttribute('shape', field, values, updateOptions); // Tip: 根据 shape 判断是否需要更新 model
464
-
465
- if (!this.tileLayer) {
466
- (0, _updateShape.updateShape)(this, lastShape, currentShape);
467
- }
468
-
469
- return this;
470
- }
471
- }, {
472
- key: "label",
473
- value: function label(field, values, updateOptions) {
474
- this.pendingStyleAttributes.push({
475
- attributeName: 'label',
476
- attributeField: field,
477
- attributeValues: values,
478
- updateOptions: updateOptions
479
- });
480
- return this;
481
- }
482
- }, {
483
- key: "animate",
484
- value: function animate(options) {
485
- var rawAnimate = {};
486
-
487
- if ((0, _lodash.isObject)(options)) {
488
- rawAnimate.enable = true;
489
- rawAnimate = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, rawAnimate), options);
490
- } else {
491
- rawAnimate.enable = options;
492
- }
493
-
494
- this.updateLayerConfig({
495
- animateOption: rawAnimate
496
- });
497
- return this;
498
- }
499
- }, {
500
- key: "source",
501
- value: function source(data, options) {
502
- if ((data === null || data === void 0 ? void 0 : data.type) === 'source') {
503
- // 判断是否为source
504
- this.setSource(data);
505
- return this;
506
- }
507
-
508
- this.sourceOption = {
509
- data: data,
510
- options: options
511
- };
512
- this.clusterZoom = 0;
513
- return this;
514
- }
515
- }, {
516
- key: "setData",
517
- value: function setData(data, options) {
518
- var _this4 = this;
519
-
520
- if (this.inited) {
521
- this.layerSource.setData(data, options);
522
- } else {
523
- this.on('inited', function () {
524
- var currentSource = _this4.getSource();
525
-
526
- if (!currentSource) {
527
- // 执行 setData 的时候 source 还不存在(还未执行 addLayer)
528
- _this4.source(new _l7Source.default(data, options));
529
-
530
- _this4.sourceEvent();
531
- } else {
532
- _this4.layerSource.setData(data, options);
533
- } // this.layerSource.setData(data, options);
534
-
535
- });
536
- }
537
-
538
- return this;
539
- }
540
- }, {
541
- key: "style",
542
- value: function style(options) {
543
- var _this5 = this;
544
-
545
- var lastConfig = this.getLayerConfig();
546
- var passes = options.passes,
547
- rest = (0, _objectWithoutProperties2.default)(options, _excluded); // passes 特殊处理
548
-
549
- if (passes) {
550
- (0, _multiPassRender.normalizePasses)(passes).forEach(function (pass) {
551
- var postProcessingPass = _this5.multiPassRenderer.getPostProcessor().getPostProcessingPassByName(pass[0]);
552
-
553
- if (postProcessingPass) {
554
- postProcessingPass.updateOptions(pass[1]);
555
- }
556
- });
557
- }
558
-
559
- this.rawConfig = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.rawConfig), rest);
560
-
561
- if (this.container) {
562
- this.updateLayerConfig(this.rawConfig);
563
- this.styleNeedUpdate = true;
564
- } // @ts-ignore
565
-
566
-
567
- if (lastConfig && lastConfig.mask === true && options.mask === false) {
568
- this.clearModels();
569
- this.layerModel.buildModels(function (models) {
570
- _this5.models = models;
571
- });
572
- }
573
-
574
- return this;
575
- }
576
- }, {
577
- key: "scale",
578
- value: function scale(field, cfg) {
579
- if ((0, _lodash.isObject)(field)) {
580
- this.scaleOptions = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.scaleOptions), field);
581
- } else {
582
- this.scaleOptions[field] = cfg;
583
- }
584
-
585
- return this;
586
- }
587
- /**
588
- * 渲染所有的图层
589
- */
590
-
591
- }, {
592
- key: "renderLayers",
593
- value: function renderLayers() {
594
- this.rendering = true;
595
- this.layerService.renderLayers();
596
- this.rendering = false;
597
- }
598
- }, {
599
- key: "render",
600
- value: function render() {
601
- if (this.tileLayer) {
602
- // 瓦片图层执行单独的 render 渲染队列
603
- this.tileLayer.render();
604
- return this;
605
- }
606
-
607
- if (this.encodeDataLength <= 0 && !this.forceRender) return this; // Tip: this.getEncodedData().length !== 0 这个判断是为了解决在 2.5.x 引入数据纹理后产生的 空数据渲染导致 texture 超出上限问题
608
-
609
- this.renderModels();
610
- return this;
611
- }
612
- /**
613
- * renderMultiPass 专门用于渲染支持 multipass 的 layer
614
- */
615
-
616
- }, {
617
- key: "renderMultiPass",
618
- value: function () {
619
- var _renderMultiPass = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
620
- return _regenerator.default.wrap(function _callee$(_context) {
621
- while (1) {
622
- switch (_context.prev = _context.next) {
623
- case 0:
624
- if (!(this.encodeDataLength <= 0 && !this.forceRender)) {
625
- _context.next = 2;
626
- break;
627
- }
628
-
629
- return _context.abrupt("return");
630
-
631
- case 2:
632
- if (!(this.multiPassRenderer && this.multiPassRenderer.getRenderFlag())) {
633
- _context.next = 7;
634
- break;
635
- }
636
-
637
- _context.next = 5;
638
- return this.multiPassRenderer.render();
639
-
640
- case 5:
641
- _context.next = 8;
642
- break;
643
-
644
- case 7:
645
- if (this.multiPassRenderer) {
646
- // renderPass 触发的渲染
647
- this.renderModels();
648
- } else {
649
- this.renderModels();
650
- }
651
-
652
- case 8:
653
- case "end":
654
- return _context.stop();
655
- }
656
- }
657
- }, _callee, this);
658
- }));
659
-
660
- function renderMultiPass() {
661
- return _renderMultiPass.apply(this, arguments);
662
- }
663
-
664
- return renderMultiPass;
665
- }()
666
- }, {
667
- key: "active",
668
- value: function active(options) {
669
- var activeOption = {};
670
- activeOption.enableHighlight = (0, _lodash.isObject)(options) ? true : options;
671
-
672
- if ((0, _lodash.isObject)(options)) {
673
- activeOption.enableHighlight = true;
674
-
675
- if (options.color) {
676
- activeOption.highlightColor = options.color;
677
- }
678
-
679
- if (options.mix) {
680
- activeOption.activeMix = options.mix;
681
- }
682
- } else {
683
- activeOption.enableHighlight = !!options;
684
- }
685
-
686
- this.updateLayerConfig(activeOption);
687
- return this;
688
- }
689
- }, {
690
- key: "setActive",
691
- value: function setActive(id, options) {
692
- var _this6 = this;
693
-
694
- if ((0, _lodash.isObject)(id)) {
695
- var _id$x = id.x,
696
- x = _id$x === void 0 ? 0 : _id$x,
697
- _id$y = id.y,
698
- y = _id$y === void 0 ? 0 : _id$y;
699
- this.updateLayerConfig({
700
- highlightColor: (0, _lodash.isObject)(options) ? options.color : this.getLayerConfig().highlightColor,
701
- activeMix: (0, _lodash.isObject)(options) ? options.mix : this.getLayerConfig().activeMix
702
- });
703
- this.pick({
704
- x: x,
705
- y: y
706
- });
707
- } else {
708
- this.updateLayerConfig({
709
- pickedFeatureID: id,
710
- highlightColor: (0, _lodash.isObject)(options) ? options.color : this.getLayerConfig().highlightColor,
711
- activeMix: (0, _lodash.isObject)(options) ? options.mix : this.getLayerConfig().activeMix
712
- });
713
- this.hooks.beforeSelect.call((0, _l7Utils.encodePickingColor)(id)) // @ts-ignore
714
- .then(function () {
715
- setTimeout(function () {
716
- _this6.reRender();
717
- }, 1);
718
- });
719
- }
720
- }
721
- }, {
722
- key: "select",
723
- value: function select(option) {
724
- var activeOption = {};
725
- activeOption.enableSelect = (0, _lodash.isObject)(option) ? true : option;
726
-
727
- if ((0, _lodash.isObject)(option)) {
728
- activeOption.enableSelect = true;
729
-
730
- if (option.color) {
731
- activeOption.selectColor = option.color;
732
- }
733
-
734
- if (option.mix) {
735
- activeOption.selectMix = option.mix;
736
- }
737
- } else {
738
- activeOption.enableSelect = !!option;
739
- }
740
-
741
- this.updateLayerConfig(activeOption);
742
- return this;
743
- }
744
- }, {
745
- key: "setSelect",
746
- value: function setSelect(id, options) {
747
- var _this7 = this;
748
-
749
- if ((0, _lodash.isObject)(id)) {
750
- var _id$x2 = id.x,
751
- x = _id$x2 === void 0 ? 0 : _id$x2,
752
- _id$y2 = id.y,
753
- y = _id$y2 === void 0 ? 0 : _id$y2;
754
- this.updateLayerConfig({
755
- selectColor: (0, _lodash.isObject)(options) ? options.color : this.getLayerConfig().selectColor,
756
- selectMix: (0, _lodash.isObject)(options) ? options.mix : this.getLayerConfig().selectMix
757
- });
758
- this.pick({
759
- x: x,
760
- y: y
761
- });
762
- } else {
763
- this.updateLayerConfig({
764
- pickedFeatureID: id,
765
- selectColor: (0, _lodash.isObject)(options) ? options.color : this.getLayerConfig().selectColor,
766
- selectMix: (0, _lodash.isObject)(options) ? options.mix : this.getLayerConfig().selectMix
767
- });
768
- this.hooks.beforeSelect.call((0, _l7Utils.encodePickingColor)(id)) // @ts-ignore
769
- .then(function () {
770
- setTimeout(function () {
771
- _this7.reRender();
772
- }, 1);
773
- });
774
- }
775
- }
776
- }, {
777
- key: "setBlend",
778
- value: function setBlend(type) {
779
- this.updateLayerConfig({
780
- blend: type
781
- });
782
- this.layerModelNeedUpdate = true;
783
- this.reRender();
784
- return this;
785
- }
786
- }, {
787
- key: "show",
788
- value: function show() {
789
- this.updateLayerConfig({
790
- visible: true
791
- });
792
- this.reRender();
793
- return this;
794
- }
795
- }, {
796
- key: "hide",
797
- value: function hide() {
798
- this.updateLayerConfig({
799
- visible: false
800
- });
801
- this.reRender();
802
- return this;
803
- }
804
- }, {
805
- key: "setIndex",
806
- value: function setIndex(index) {
807
- this.zIndex = index;
808
- this.layerService.updateLayerRenderList();
809
- this.layerService.renderLayers();
810
- return this;
811
- }
812
- }, {
813
- key: "setCurrentPickId",
814
- value: function setCurrentPickId(id) {
815
- this.currentPickId = id;
816
- }
817
- }, {
818
- key: "getCurrentPickId",
819
- value: function getCurrentPickId() {
820
- return this.currentPickId;
821
- }
822
- }, {
823
- key: "setCurrentSelectedId",
824
- value: function setCurrentSelectedId(id) {
825
- this.selectedFeatureID = id;
826
- }
827
- }, {
828
- key: "getCurrentSelectedId",
829
- value: function getCurrentSelectedId() {
830
- return this.selectedFeatureID;
831
- }
832
- }, {
833
- key: "isVisible",
834
- value: function isVisible() {
835
- var zoom = this.mapService.getZoom();
836
-
837
- var _this$getLayerConfig3 = this.getLayerConfig(),
838
- visible = _this$getLayerConfig3.visible,
839
- _this$getLayerConfig4 = _this$getLayerConfig3.minZoom,
840
- minZoom = _this$getLayerConfig4 === void 0 ? -Infinity : _this$getLayerConfig4,
841
- _this$getLayerConfig5 = _this$getLayerConfig3.maxZoom,
842
- maxZoom = _this$getLayerConfig5 === void 0 ? Infinity : _this$getLayerConfig5;
843
-
844
- return !!visible && zoom >= minZoom && zoom <= maxZoom;
845
- }
846
- }, {
847
- key: "setMultiPass",
848
- value: function setMultiPass(enableMultiPass, currentPasses) {
849
- this.updateLayerConfig({
850
- enableMultiPassRenderer: enableMultiPass
851
- });
852
-
853
- if (currentPasses) {
854
- this.updateLayerConfig({
855
- passes: currentPasses
856
- });
857
- }
858
-
859
- if (enableMultiPass) {
860
- var _this$getLayerConfig6 = this.getLayerConfig(),
861
- _this$getLayerConfig7 = _this$getLayerConfig6.passes,
862
- passes = _this$getLayerConfig7 === void 0 ? [] : _this$getLayerConfig7;
863
-
864
- this.multiPassRenderer = (0, _multiPassRender.createMultiPassRenderer)(this, passes, this.postProcessingPassFactory, this.normalPassFactory);
865
- this.multiPassRenderer.setRenderFlag(true);
866
-
867
- var _this$rendererService = this.rendererService.getViewportSize(),
868
- width = _this$rendererService.width,
869
- height = _this$rendererService.height;
870
-
871
- this.multiPassRenderer.resize(width, height);
872
- }
873
-
874
- return this;
875
- }
876
- }, {
877
- key: "setMinZoom",
878
- value: function setMinZoom(minZoom) {
879
- this.updateLayerConfig({
880
- minZoom: minZoom
881
- });
882
- return this;
883
- }
884
- }, {
885
- key: "getMinZoom",
886
- value: function getMinZoom() {
887
- var _this$getLayerConfig8 = this.getLayerConfig(),
888
- minZoom = _this$getLayerConfig8.minZoom;
889
-
890
- return minZoom;
891
- }
892
- }, {
893
- key: "getMaxZoom",
894
- value: function getMaxZoom() {
895
- var _this$getLayerConfig9 = this.getLayerConfig(),
896
- maxZoom = _this$getLayerConfig9.maxZoom;
897
-
898
- return maxZoom;
899
- }
900
- }, {
901
- key: "get",
902
- value: function get(name) {
903
- var cfg = this.getLayerConfig(); // @ts-ignore
904
-
905
- return cfg[name];
906
- }
907
- }, {
908
- key: "setMaxZoom",
909
- value: function setMaxZoom(maxZoom) {
910
- this.updateLayerConfig({
911
- maxZoom: maxZoom
912
- });
913
- return this;
914
- }
915
- }, {
916
- key: "setAutoFit",
917
- value: function setAutoFit(autoFit) {
918
- this.updateLayerConfig({
919
- autoFit: autoFit
920
- });
921
- return this;
922
- }
923
- /**
924
- * zoom to layer Bounds
925
- */
926
-
927
- }, {
928
- key: "fitBounds",
929
- value: function fitBounds(fitBoundsOptions) {
930
- if (!this.inited) {
931
- this.updateLayerConfig({
932
- autoFit: true
933
- });
934
- return this;
935
- }
936
-
937
- var source = this.getSource();
938
- var extent = source.extent;
939
- var isValid = extent.some(function (v) {
940
- return Math.abs(v) === Infinity;
941
- });
942
-
943
- if (isValid) {
944
- return this;
945
- }
946
-
947
- this.mapService.fitBounds([[extent[0], extent[1]], [extent[2], extent[3]]], fitBoundsOptions);
948
- return this;
949
- }
950
- }, {
951
- key: "destroy",
952
- value: function destroy() {
953
- var _this$multiPassRender, _this$layerModel2, _this$tileLayer;
954
-
955
- var refresh = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
956
-
957
- if (this.isDestroyed) {
958
- return;
959
- } // remove child layer
960
-
961
-
962
- this.layerChildren.map(function (child) {
963
- return child.destroy(false);
964
- });
965
- this.layerChildren = []; // remove mask list
966
-
967
- this.masks.map(function (mask) {
968
- return mask.destroy(false);
969
- });
970
- this.masks = [];
971
- this.hooks.beforeDestroy.call(); // 清除sources事件
972
-
973
- this.layerSource.off('sourceUpdate', this.sourceEvent);
974
- (_this$multiPassRender = this.multiPassRenderer) === null || _this$multiPassRender === void 0 ? void 0 : _this$multiPassRender.destroy(); // 清除所有属性以及关联的 vao == 销毁所有 => model this.models.forEach((model) => model.destroy());
975
-
976
- this.styleAttributeService.clearAllAttributes(); // 执行每个图层单独的 clearModels 方法 (清除一些额外的 texture、program、buffer 等)
977
-
978
- this.hooks.afterDestroy.call(); // Tip: 清除各个图层自定义的 models 资源
979
-
980
- (_this$layerModel2 = this.layerModel) === null || _this$layerModel2 === void 0 ? void 0 : _this$layerModel2.clearModels(refresh);
981
- (_this$tileLayer = this.tileLayer) === null || _this$tileLayer === void 0 ? void 0 : _this$tileLayer.destroy();
982
- this.models = [];
983
- this.layerService.cleanRemove(this, refresh);
984
- this.emit('remove', {
985
- target: this,
986
- type: 'remove'
987
- });
988
- this.emit('destroy', {
989
- target: this,
990
- type: 'destroy'
991
- });
992
- this.removeAllListeners(); // 解绑图层容器中的服务
993
- // this.container.unbind(TYPES.IStyleAttributeService);
994
-
995
- this.isDestroyed = true;
996
- }
997
- }, {
998
- key: "clear",
999
- value: function clear() {
1000
- this.styleAttributeService.clearAllAttributes(); // 销毁所有 model
1001
- }
1002
- }, {
1003
- key: "clearModels",
1004
- value: function clearModels() {
1005
- var _this$layerModel3;
1006
-
1007
- this.models.forEach(function (model) {
1008
- return model.destroy();
1009
- });
1010
- (_this$layerModel3 = this.layerModel) === null || _this$layerModel3 === void 0 ? void 0 : _this$layerModel3.clearModels();
1011
- this.models = [];
1012
- }
1013
- }, {
1014
- key: "isDirty",
1015
- value: function isDirty() {
1016
- return !!(this.styleAttributeService.getLayerStyleAttributes() || []).filter(function (attribute) {
1017
- return attribute.needRescale || attribute.needRemapping || attribute.needRegenerateVertices;
1018
- }).length;
1019
- }
1020
- }, {
1021
- key: "setSource",
1022
- value: function setSource(source) {
1023
- var _this8 = this;
1024
-
1025
- // 清除旧 sources 事件
1026
- if (this.layerSource) {
1027
- this.layerSource.off('sourceUpdate', this.sourceEvent);
1028
- }
1029
-
1030
- this.layerSource = source;
1031
- this.clusterZoom = 0; // 已 inited 且启用聚合进行更新聚合数据
1032
-
1033
- if (this.inited && this.layerSource.cluster) {
1034
- var zoom = this.mapService.getZoom();
1035
- this.layerSource.updateClusterData(zoom);
1036
- } // source 可能会复用,会在其它layer被修改
1037
-
1038
-
1039
- if (this.layerSource.inited) {
1040
- this.sourceEvent();
1041
- } // this.layerSource.inited 为 true 后,sourceUpdate 事件不会再触发
1042
-
1043
-
1044
- this.layerSource.on('sourceUpdate', function () {
1045
- if (_this8.coordCenter === undefined) {
1046
- var layerCenter = _this8.layerSource.center;
1047
- _this8.coordCenter = layerCenter;
1048
- _this8.mapService.setCoordCenter && _this8.mapService.setCoordCenter(layerCenter); // // @ts-ignore
1049
- // this.mapService.map.customCoords.setCenter(layerCenter);
1050
- // // @ts-ignore
1051
- // this.mapService.setCustomCoordCenter(layerCenter);
1052
- }
1053
-
1054
- _this8.sourceEvent();
1055
- });
1056
- }
1057
- }, {
1058
- key: "getSource",
1059
- value: function getSource() {
1060
- return this.layerSource;
1061
- }
1062
- }, {
1063
- key: "getScaleOptions",
1064
- value: function getScaleOptions() {
1065
- return this.scaleOptions;
1066
- }
1067
- }, {
1068
- key: "setEncodedData",
1069
- value: function setEncodedData(encodedData) {
1070
- this.encodedData = encodedData;
1071
- this.encodeDataLength = encodedData.length;
1072
- }
1073
- }, {
1074
- key: "getEncodedData",
1075
- value: function getEncodedData() {
1076
- return this.encodedData;
1077
- }
1078
- }, {
1079
- key: "getScale",
1080
- value: function getScale(name) {
1081
- return this.styleAttributeService.getLayerAttributeScale(name);
1082
- }
1083
- }, {
1084
- key: "getLegendItems",
1085
- value: function getLegendItems(name) {
1086
- var scale = this.styleAttributeService.getLayerAttributeScale(name); // 函数自定义映射,没有 scale 返回为空数组
1087
-
1088
- if (!scale) {
1089
- return [];
1090
- }
1091
-
1092
- if (scale.invertExtent) {
1093
- // 分段类型 Quantize、Quantile、Threshold
1094
- var items = scale.range().map(function (item) {
1095
- return (0, _defineProperty2.default)({
1096
- value: scale.invertExtent(item)
1097
- }, name, item);
1098
- });
1099
- return items;
1100
- } else if (scale.ticks) {
1101
- // 连续类型 Continuous (Linear, Power, Log, Identity, Time)
1102
- var _items = scale.ticks().map(function (item) {
1103
- return (0, _defineProperty2.default)({
1104
- value: item
1105
- }, name, scale(item));
1106
- });
1107
-
1108
- return _items;
1109
- } else if (scale !== null && scale !== void 0 && scale.domain) {
1110
- // 枚举类型 Cat
1111
- var _items2 = scale.domain().filter(function (item) {
1112
- return !(0, _lodash.isUndefined)(item);
1113
- }).map(function (item) {
1114
- return (0, _defineProperty2.default)({
1115
- value: item
1116
- }, name, scale(item));
1117
- });
1118
-
1119
- return _items2;
1120
- }
1121
-
1122
- return [];
1123
- }
1124
- }, {
1125
- key: "pick",
1126
- value: function pick(_ref6) {
1127
- var x = _ref6.x,
1128
- y = _ref6.y;
1129
- this.interactionService.triggerHover({
1130
- x: x,
1131
- y: y
1132
- });
1133
- }
1134
- }, {
1135
- key: "boxSelect",
1136
- value: function boxSelect(box, cb) {
1137
- this.pickingService.boxPickLayer(this, box, cb);
1138
- }
1139
- }, {
1140
- key: "buildLayerModel",
1141
- value: function buildLayerModel(options) {
1142
- var _this9 = this;
1143
-
1144
- var moduleName = options.moduleName,
1145
- vertexShader = options.vertexShader,
1146
- fragmentShader = options.fragmentShader,
1147
- triangulation = options.triangulation,
1148
- segmentNumber = options.segmentNumber,
1149
- _options$workerEnable = options.workerEnabled,
1150
- workerEnabled = _options$workerEnable === void 0 ? false : _options$workerEnable,
1151
- workerOptions = options.workerOptions,
1152
- rest = (0, _objectWithoutProperties2.default)(options, _excluded2);
1153
- this.shaderModuleService.registerModule(moduleName, {
1154
- vs: vertexShader,
1155
- fs: fragmentShader
1156
- });
1157
-
1158
- var _this$shaderModuleSer = this.shaderModuleService.getModule(moduleName),
1159
- vs = _this$shaderModuleSer.vs,
1160
- fs = _this$shaderModuleSer.fs,
1161
- uniforms = _this$shaderModuleSer.uniforms;
1162
-
1163
- var createModel = this.rendererService.createModel;
1164
- return new Promise(function (resolve, reject) {
1165
- setTimeout(function () {
1166
- // filter supported worker & worker enabled layer
1167
- if (workerOptions && workerOptions.modelType in _l7Utils.WorkerSourceMap && workerEnabled) {
1168
- _this9.styleAttributeService.createAttributesAndIndicesAscy(_this9.encodedData, segmentNumber, workerOptions).then(function (_ref7) {
1169
- var attributes = _ref7.attributes,
1170
- elements = _ref7.elements;
1171
- var m = createModel((0, _objectSpread2.default)({
1172
- attributes: attributes,
1173
- uniforms: uniforms,
1174
- fs: fs,
1175
- vs: vs,
1176
- elements: elements,
1177
- blend: _blend.BlendTypes[_l7Core.BlendType.normal]
1178
- }, rest));
1179
- resolve(m);
1180
- }).catch(function (err) {
1181
- return reject(err);
1182
- });
1183
- } else {
1184
- // console.log(this.encodedData[1].originCoordinates[0])
1185
- // console.log(this.encodedData[1].coordinates[0])
1186
- var _this9$styleAttribute = _this9.styleAttributeService.createAttributesAndIndices(_this9.encodedData, triangulation, segmentNumber),
1187
- attributes = _this9$styleAttribute.attributes,
1188
- elements = _this9$styleAttribute.elements,
1189
- count = _this9$styleAttribute.count;
1190
-
1191
- var modelOptions = (0, _objectSpread2.default)({
1192
- attributes: attributes,
1193
- uniforms: uniforms,
1194
- fs: fs,
1195
- vs: vs,
1196
- elements: elements,
1197
- blend: _blend.BlendTypes[_l7Core.BlendType.normal]
1198
- }, rest);
1199
-
1200
- if (count) {
1201
- modelOptions.count = count;
1202
- }
1203
-
1204
- var m = createModel(modelOptions);
1205
- resolve(m);
1206
- }
1207
- });
1208
- });
1209
- }
1210
- }, {
1211
- key: "createAttributes",
1212
- value: function createAttributes(options) {
1213
- var triangulation = options.triangulation; // @ts-ignore
1214
-
1215
- var _this$styleAttributeS4 = this.styleAttributeService.createAttributes(this.encodedData, triangulation),
1216
- attributes = _this$styleAttributeS4.attributes;
1217
-
1218
- return attributes;
1219
- }
1220
- }, {
1221
- key: "getTime",
1222
- value: function getTime() {
1223
- return this.layerService.clock.getDelta();
1224
- }
1225
- }, {
1226
- key: "setAnimateStartTime",
1227
- value: function setAnimateStartTime() {
1228
- this.animateStartTime = this.layerService.clock.getElapsedTime();
1229
- }
1230
- }, {
1231
- key: "stopAnimate",
1232
- value: function stopAnimate() {
1233
- if (this.animateStatus) {
1234
- this.layerService.stopAnimate();
1235
- this.animateStatus = false;
1236
- this.updateLayerConfig({
1237
- animateOption: {
1238
- enable: false
1239
- }
1240
- });
1241
- }
1242
- }
1243
- }, {
1244
- key: "getLayerAnimateTime",
1245
- value: function getLayerAnimateTime() {
1246
- return this.layerService.clock.getElapsedTime() - this.animateStartTime;
1247
- }
1248
- }, {
1249
- key: "needPick",
1250
- value: function needPick(type) {
1251
- // 地图图层的判断
1252
- if (this.rawConfig.usage === 'basemap') return false;
1253
-
1254
- var _this$getLayerConfig10 = this.getLayerConfig(),
1255
- _this$getLayerConfig11 = _this$getLayerConfig10.enableHighlight,
1256
- enableHighlight = _this$getLayerConfig11 === void 0 ? true : _this$getLayerConfig11,
1257
- _this$getLayerConfig12 = _this$getLayerConfig10.enableSelect,
1258
- enableSelect = _this$getLayerConfig12 === void 0 ? true : _this$getLayerConfig12; // 判断layer是否监听事件;
1259
-
1260
-
1261
- var isPick = this.eventNames().indexOf(type) !== -1 || this.eventNames().indexOf('un' + type) !== -1;
1262
-
1263
- if ((type === 'click' || type === 'dblclick') && enableSelect) {
1264
- isPick = true;
1265
- }
1266
-
1267
- if (type === 'mousemove' && (enableHighlight || this.eventNames().indexOf('mouseenter') !== -1 || this.eventNames().indexOf('unmousemove') !== -1 || this.eventNames().indexOf('mouseout') !== -1)) {
1268
- isPick = true;
1269
- }
1270
-
1271
- return this.isVisible() && isPick;
1272
- }
1273
- }, {
1274
- key: "buildModels",
1275
- value: function buildModels() {
1276
- throw new Error('Method not implemented.');
1277
- }
1278
- }, {
1279
- key: "rebuildModels",
1280
- value: function rebuildModels() {
1281
- throw new Error('Method not implemented.');
1282
- }
1283
- }, {
1284
- key: "renderMulPass",
1285
- value: function () {
1286
- var _renderMulPass = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(multiPassRenderer) {
1287
- return _regenerator.default.wrap(function _callee2$(_context2) {
1288
- while (1) {
1289
- switch (_context2.prev = _context2.next) {
1290
- case 0:
1291
- _context2.next = 2;
1292
- return multiPassRenderer.render();
1293
-
1294
- case 2:
1295
- case "end":
1296
- return _context2.stop();
1297
- }
1298
- }
1299
- }, _callee2);
1300
- }));
1301
-
1302
- function renderMulPass(_x) {
1303
- return _renderMulPass.apply(this, arguments);
1304
- }
1305
-
1306
- return renderMulPass;
1307
- }()
1308
- }, {
1309
- key: "renderModels",
1310
- value: function renderModels(isPicking) {
1311
- var _this10 = this;
1312
-
1313
- // TODO: this.getEncodedData().length > 0 这个判断是为了解决在 2.5.x 引入数据纹理后产生的 空数据渲染导致 texture 超出上限问题
1314
- if (this.encodeDataLength <= 0 && !this.forceRender) return this;
1315
-
1316
- if (this.layerModelNeedUpdate && this.layerModel) {
1317
- this.layerModel.buildModels(function (models) {
1318
- _this10.models = models;
1319
-
1320
- _this10.hooks.beforeRender.call();
1321
-
1322
- _this10.layerModelNeedUpdate = false;
1323
- });
1324
- }
1325
-
1326
- this.models.forEach(function (model) {
1327
- model.draw({
1328
- uniforms: _this10.layerModel.getUninforms()
1329
- }, isPicking);
1330
- });
1331
- return this;
1332
- }
1333
- }, {
1334
- key: "updateStyleAttribute",
1335
- value: function updateStyleAttribute(type, field, values, updateOptions) {
1336
- if (!this.inited) {
1337
- this.pendingStyleAttributes.push({
1338
- attributeName: type,
1339
- attributeField: field,
1340
- attributeValues: values,
1341
- updateOptions: updateOptions
1342
- });
1343
- } else {
1344
- this.styleAttributeService.updateStyleAttribute(type, {
1345
- // @ts-ignore
1346
- scale: (0, _objectSpread2.default)({
1347
- field: field
1348
- }, this.splitValuesAndCallbackInAttribute( // @ts-ignore
1349
- values, // @ts-ignore
1350
- this.getLayerConfig()[field]))
1351
- }, // @ts-ignore
1352
- updateOptions);
1353
- }
1354
- }
1355
- }, {
1356
- key: "getShaderPickStat",
1357
- value: function getShaderPickStat() {
1358
- return this.layerService.getShaderPickStat();
1359
- }
1360
- /**
1361
- * 继承空方法
1362
- * @param time
1363
- */
1364
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1365
-
1366
- }, {
1367
- key: "setEarthTime",
1368
- value: function setEarthTime(time) {
1369
- console.warn('empty fn');
1370
- }
1371
- }, {
1372
- key: "getConfigSchema",
1373
- value: function getConfigSchema() {
1374
- throw new Error('Method not implemented.');
1375
- }
1376
- }, {
1377
- key: "getModelType",
1378
- value: function getModelType() {
1379
- throw new Error('Method not implemented.');
1380
- }
1381
- }, {
1382
- key: "getDefaultConfig",
1383
- value: function getDefaultConfig() {
1384
- return {};
1385
- }
1386
- }, {
1387
- key: "dispatchModelLoad",
1388
- value: function dispatchModelLoad(models) {
1389
- var _this11 = this;
1390
-
1391
- this.models.forEach(function (model) {
1392
- return model.destroy();
1393
- });
1394
- this.models = [];
1395
- this.models = models;
1396
- this.emit('modelLoaded', null);
1397
- this.modelLoaded = true; // Tip: setTimeout 用于延迟绘制,可以让拖动图层时连续的 setData 更加平滑 - L7Draw
1398
-
1399
- setTimeout(function () {
1400
- // Tip: 使用 renderLayers 而不是 throttleRenderLayers,让图层之间的 setData 更新绘制不存在延迟
1401
- _this11.layerService.renderLayers();
1402
- }, 32);
1403
- }
1404
- }, {
1405
- key: "reRender",
1406
- value: function reRender() {
1407
- this.inited && this.layerService.reRender();
1408
- }
1409
- }, {
1410
- key: "splitValuesAndCallbackInAttribute",
1411
- value: function splitValuesAndCallbackInAttribute(valuesOrCallback, defaultValues) {
1412
- return {
1413
- values: (0, _lodash.isFunction)(valuesOrCallback) ? undefined : valuesOrCallback || defaultValues,
1414
- callback: (0, _lodash.isFunction)(valuesOrCallback) ? valuesOrCallback : undefined
1415
- };
1416
- }
1417
- }]);
1418
- return BaseLayer;
1419
- }(_eventemitter.EventEmitter), (_descriptor = (0, _applyDecoratedDescriptor2.default)(_class.prototype, "configService", [_dec], {
1420
- configurable: true,
1421
- enumerable: true,
1422
- writable: true,
1423
- initializer: null
1424
- })), _class));
1425
- exports.default = BaseLayer;