@antv/l7-layers 2.9.19 → 2.9.22-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Geometry/index.js +4 -5
- package/es/Geometry/models/billboard.js +23 -9
- package/es/Geometry/models/index.js +4 -5
- package/es/Geometry/models/plane.js +25 -13
- package/es/Geometry/models/sprite.js +11 -21
- package/es/Geometry/shaders/billboard_frag.glsl +13 -0
- package/es/Geometry/shaders/billboard_vert.glsl +50 -0
- package/es/Geometry/shaders/plane_frag.glsl +22 -0
- package/es/Geometry/shaders/plane_vert.glsl +53 -0
- package/es/Geometry/shaders/sprite_frag.glsl +21 -0
- package/es/Geometry/shaders/sprite_vert.glsl +28 -0
- package/es/canvas/index.js +4 -5
- package/es/canvas/models/canvas.js +6 -12
- package/es/canvas/models/index.js +2 -3
- package/es/citybuliding/building.js +4 -5
- package/es/citybuliding/models/build.js +19 -22
- package/es/citybuliding/shaders/build_frag.glsl +117 -0
- package/es/citybuliding/shaders/build_vert.glsl +54 -0
- package/es/core/BaseLayer.js +205 -157
- package/es/core/BaseModel.js +135 -76
- package/es/core/interface.d.ts +11 -1
- package/es/core/interface.js +15 -2
- package/es/core/schema.js +4 -2
- package/es/core/shape/Path.js +8 -3
- package/es/core/shape/extrude.js +9 -4
- package/es/core/triangulation.d.ts +1 -0
- package/es/core/triangulation.js +123 -24
- package/es/earth/index.js +11 -7
- package/es/earth/models/atmosphere.js +15 -7
- package/es/earth/models/base.js +19 -7
- package/es/earth/models/bloomsphere.js +15 -7
- package/es/earth/shaders/atmosphere_frag.glsl +17 -0
- package/es/earth/shaders/atmosphere_vert.glsl +26 -0
- package/es/earth/shaders/base_frag.glsl +13 -0
- package/es/earth/shaders/base_vert.glsl +52 -0
- package/es/earth/shaders/bloomsphere_frag.glsl +15 -0
- package/es/earth/shaders/bloomsphere_vert.glsl +20 -0
- package/es/earth/utils.js +28 -5
- package/es/heatmap/index.js +8 -7
- package/es/heatmap/models/grid.js +11 -5
- package/es/heatmap/models/grid3d.js +18 -7
- package/es/heatmap/models/heatmap.js +45 -44
- package/es/heatmap/models/hexagon.js +14 -6
- package/es/heatmap/models/index.js +5 -6
- package/es/heatmap/shaders/grid_vert.glsl +42 -0
- package/es/heatmap/shaders/heatmap_3d_frag.glsl +14 -0
- package/es/heatmap/shaders/heatmap_3d_vert.glsl +46 -0
- package/es/heatmap/shaders/heatmap_frag.glsl +47 -0
- package/es/heatmap/shaders/heatmap_framebuffer_frag.glsl +10 -0
- package/es/heatmap/shaders/heatmap_framebuffer_vert.glsl +35 -0
- package/es/heatmap/shaders/heatmap_vert.glsl +10 -0
- package/es/heatmap/shaders/hexagon_3d_frag.glsl +0 -0
- package/es/heatmap/shaders/hexagon_3d_vert.glsl +64 -0
- package/es/heatmap/shaders/hexagon_frag.glsl +12 -0
- package/es/heatmap/shaders/hexagon_vert.glsl +41 -0
- package/es/heatmap/triangulation.js +2 -2
- package/es/image/index.js +4 -5
- package/es/image/models/dataImage.js +21 -31
- package/es/image/models/image.js +19 -25
- package/es/image/models/index.js +3 -4
- package/es/image/shaders/dataImage_frag.glsl +38 -0
- package/es/image/shaders/image_frag.glsl +9 -0
- package/es/image/shaders/image_vert.glsl +17 -0
- package/es/index.d.ts +2 -2
- package/es/index.js +92 -30
- package/es/line/index.js +4 -5
- package/es/line/models/arc.js +38 -15
- package/es/line/models/arc_3d.js +33 -14
- package/es/line/models/earthArc_3d.js +33 -14
- package/es/line/models/great_circle.js +25 -13
- package/es/line/models/half.js +33 -12
- package/es/line/models/index.js +12 -13
- package/es/line/models/line.js +57 -17
- package/es/line/models/linearline.js +32 -14
- package/es/line/models/simpleLine.js +26 -11
- package/es/line/models/tile.js +28 -10
- package/es/line/models/wall.js +30 -13
- package/es/line/shaders/arc_chunks.vert.glsl +21 -0
- package/es/line/shaders/dash/arc_dash_frag.glsl +28 -0
- package/es/line/shaders/dash/arc_dash_vert.glsl +148 -0
- package/es/line/shaders/dash/line_dash_frag.glsl +31 -0
- package/es/line/shaders/dash/line_dash_vert.glsl +93 -0
- package/es/line/shaders/half/line_half_frag.glsl +53 -0
- package/es/line/shaders/half/line_half_vert.glsl +169 -0
- package/es/line/shaders/line_arc2d_vert.glsl +114 -0
- package/es/line/shaders/line_arc_3d_frag.glsl +103 -0
- package/es/line/shaders/line_arc_3d_vert.glsl +207 -0
- package/es/line/shaders/line_arc_frag.glsl +89 -0
- package/es/line/shaders/line_arc_great_circle_frag.glsl +101 -0
- package/es/line/shaders/line_arc_great_circle_vert.glsl +215 -0
- package/es/line/shaders/line_arc_vert.glsl +174 -0
- package/es/line/shaders/line_bezier_vert.glsl +85 -0
- package/es/line/shaders/line_frag.glsl +100 -0
- package/es/line/shaders/line_vert.glsl +192 -0
- package/es/line/shaders/linear/arc3d_linear_frag.glsl +47 -0
- package/es/line/shaders/linear/arc3d_linear_vert.glsl +207 -0
- package/es/line/shaders/linear/arc_linear_frag.glsl +38 -0
- package/es/line/shaders/linear/arc_linear_vert.glsl +138 -0
- package/es/line/shaders/linear/line_linear_frag.glsl +27 -0
- package/es/line/shaders/linearLine/line_linear_frag.glsl +20 -0
- package/es/line/shaders/linearLine/line_linear_vert.glsl +112 -0
- package/es/line/shaders/simple/simpleline_frag.glsl +10 -0
- package/es/line/shaders/simple/simpleline_linear_frag.glsl +11 -0
- package/es/line/shaders/simple/simpleline_vert.glsl +78 -0
- package/es/line/shaders/tile/line_tile_frag.glsl +79 -0
- package/es/line/shaders/tile/line_tile_vert.glsl +210 -0
- package/es/line/shaders/wall_frag.glsl +93 -0
- package/es/line/shaders/wall_vert.glsl +111 -0
- package/es/mask/index.js +4 -5
- package/es/mask/models/fill.js +11 -8
- package/es/mask/models/index.js +2 -3
- package/es/mask/shaders/mask_frag.glsl +7 -0
- package/es/mask/shaders/mask_vert.glsl +22 -0
- package/es/plugins/DataMappingPlugin.js +71 -34
- package/es/plugins/DataSourcePlugin.js +12 -10
- package/es/plugins/FeatureScalePlugin.js +44 -24
- package/es/plugins/LayerAnimateStylePlugin.js +6 -7
- package/es/plugins/LayerModelPlugin.js +16 -7
- package/es/plugins/LayerStylePlugin.js +7 -3
- package/es/plugins/LightingPlugin.js +21 -13
- package/es/plugins/MultiPassRendererPlugin.js +21 -8
- package/es/plugins/PixelPickingPlugin.js +33 -11
- package/es/plugins/RegisterStyleAttributePlugin.js +10 -3
- package/es/plugins/ShaderUniformPlugin.js +24 -10
- package/es/plugins/UpdateModelPlugin.js +7 -3
- package/es/plugins/UpdateStyleAttributePlugin.js +20 -7
- package/es/point/index.js +12 -6
- package/es/point/models/earthExtrude.js +30 -12
- package/es/point/models/earthFill.js +25 -13
- package/es/point/models/extrude.js +30 -12
- package/es/point/models/fill.js +50 -15
- package/es/point/models/fillmage.js +46 -17
- package/es/point/models/image.js +20 -12
- package/es/point/models/index.js +14 -14
- package/es/point/models/normal.js +15 -7
- package/es/point/models/radar.js +33 -13
- package/es/point/models/simplePoint.js +17 -9
- package/es/point/models/text.js +77 -30
- package/es/point/models/tile.js +33 -12
- package/es/point/shaders/animate/wave_frag.glsl +65 -0
- package/es/point/shaders/earth/extrude_frag.glsl +44 -0
- package/es/point/shaders/earth/extrude_vert.glsl +140 -0
- package/es/point/shaders/earth/fill_frag.glsl +86 -0
- package/es/point/shaders/earth/fill_vert.glsl +126 -0
- package/es/point/shaders/extrude/extrude_frag.glsl +44 -0
- package/es/point/shaders/extrude/extrude_vert.glsl +121 -0
- package/es/point/shaders/fill_frag.glsl +84 -0
- package/es/point/shaders/fill_vert.glsl +182 -0
- package/es/point/shaders/image/fillImage_frag.glsl +20 -0
- package/es/point/shaders/image/fillImage_vert.glsl +108 -0
- package/es/point/shaders/image_frag.glsl +39 -0
- package/es/point/shaders/image_vert.glsl +81 -0
- package/es/point/shaders/normal_frag.glsl +15 -0
- package/es/point/shaders/normal_vert.glsl +79 -0
- package/es/point/shaders/radar/radar_frag.glsl +64 -0
- package/es/point/shaders/radar/radar_vert.glsl +120 -0
- package/es/point/shaders/simplePoint_frag.glsl +53 -0
- package/es/point/shaders/simplePoint_vert.glsl +79 -0
- package/es/point/shaders/text_frag.glsl +48 -0
- package/es/point/shaders/text_vert.glsl +131 -0
- package/es/point/shaders/tile/fill_tile_frag.glsl +83 -0
- package/es/point/shaders/tile/fill_tile_vert.glsl +181 -0
- package/es/point/shape/extrude.js +8 -3
- package/es/polygon/index.js +6 -5
- package/es/polygon/models/extrude.js +40 -31
- package/es/polygon/models/fill.js +19 -8
- package/es/polygon/models/index.js +14 -14
- package/es/polygon/models/ocean.js +25 -33
- package/es/polygon/models/tile.js +13 -7
- package/es/polygon/models/water.js +21 -25
- package/es/polygon/shaders/extrude/polygon_extrude_frag.glsl +44 -0
- package/es/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +44 -0
- package/es/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +85 -0
- package/es/polygon/shaders/extrude/polygon_extrude_vert.glsl +90 -0
- package/es/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +48 -0
- package/es/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +93 -0
- package/es/polygon/shaders/polygon_frag.glsl +12 -0
- package/es/polygon/shaders/polygon_linear_frag.glsl +22 -0
- package/es/polygon/shaders/polygon_linear_vert.glsl +74 -0
- package/es/polygon/shaders/polygon_vert.glsl +66 -0
- package/es/polygon/shaders/tile/polygon_tile_frag.glsl +12 -0
- package/es/polygon/shaders/tile/polygon_tile_vert.glsl +82 -0
- package/es/polygon/shaders/water/polygon_ocean_frag.glsl +248 -0
- package/es/polygon/shaders/water/polygon_ocean_vert.glsl +52 -0
- package/es/polygon/shaders/water/polygon_water_frag.glsl +73 -0
- package/es/polygon/shaders/water/polygon_water_vert.glsl +55 -0
- package/es/raster/buffers/triangulation.js +2 -2
- package/es/raster/index.js +7 -6
- package/es/raster/models/index.js +3 -4
- package/es/raster/models/raster.js +15 -25
- package/es/raster/raster.js +9 -13
- package/es/raster/shaders/raster_2d_frag.glsl +28 -0
- package/es/raster/shaders/raster_2d_vert.glsl +18 -0
- package/es/raster/shaders/raster_frag.glsl +9 -0
- package/es/raster/shaders/raster_vert.glsl +44 -0
- package/es/tile/interface.js +1 -2
- package/es/tile/manager/tileConfigManager.js +6 -8
- package/es/tile/manager/tileLayerManager.js +19 -30
- package/es/tile/manager/tilePickerManager.js +14 -14
- package/es/tile/models/tileModel.js +6 -6
- package/es/tile/tileFactory/base.js +26 -32
- package/es/tile/tileFactory/index.js +6 -7
- package/es/tile/tileFactory/line.js +3 -9
- package/es/tile/tileFactory/point.js +3 -9
- package/es/tile/tileFactory/polygon.js +3 -9
- package/es/tile/tileFactory/raster.js +4 -10
- package/es/tile/tileFactory/rasterData.js +5 -11
- package/es/tile/tileFactory/rasterDataLayer.js +4 -5
- package/es/tile/tileFactory/vectorLayer.js +8 -9
- package/es/tile/tileLayer/baseTileLayer.js +67 -39
- package/es/tile/tmsTileLayer.js +5 -4
- package/es/tile/utils.js +5 -3
- package/es/utils/blend.js +1 -2
- package/es/utils/collision-index.js +36 -21
- package/es/utils/dataMappingStyle.js +71 -15
- package/es/utils/extrude_polyline.d.ts +15 -0
- package/es/utils/extrude_polyline.js +225 -51
- package/es/utils/grid-index.js +7 -21
- package/es/utils/layerData.js +41 -17
- package/es/utils/multiPassRender.js +21 -5
- package/es/utils/polylineNormal.js +40 -20
- package/es/utils/simpleLine.js +4 -6
- package/es/utils/symbol-layout.js +49 -10
- package/es/utils/updateShape.js +6 -3
- package/es/wind/index.js +5 -6
- package/es/wind/models/index.js +2 -3
- package/es/wind/models/utils.js +50 -26
- package/es/wind/models/wind.js +15 -18
- package/es/wind/models/windRender.js +89 -78
- package/es/wind/models/windShader.d.ts +6 -6
- package/es/wind/models/windShader.js +12 -7
- package/es/wind/shaders/wind_frag.glsl +9 -0
- package/es/wind/shaders/wind_vert.glsl +17 -0
- package/lib/Geometry/index.js +77 -115
- package/lib/Geometry/models/billboard.js +181 -218
- package/lib/Geometry/models/index.js +34 -19
- package/lib/Geometry/models/plane.js +278 -394
- package/lib/Geometry/models/sprite.js +189 -294
- package/lib/Geometry/shaders/billboard_frag.glsl +13 -0
- package/lib/Geometry/shaders/billboard_vert.glsl +50 -0
- package/lib/Geometry/shaders/plane_frag.glsl +22 -0
- package/lib/Geometry/shaders/plane_vert.glsl +53 -0
- package/lib/Geometry/shaders/sprite_frag.glsl +21 -0
- package/lib/Geometry/shaders/sprite_vert.glsl +28 -0
- package/lib/canvas/index.js +66 -102
- package/lib/canvas/models/canvas.js +140 -210
- package/lib/canvas/models/index.js +30 -13
- package/lib/citybuliding/building.js +63 -99
- package/lib/citybuliding/models/build.js +146 -196
- package/lib/citybuliding/shaders/build_frag.glsl +117 -0
- package/lib/citybuliding/shaders/build_vert.glsl +54 -0
- package/lib/core/BaseLayer.js +807 -1245
- package/lib/core/BaseModel.js +275 -375
- package/lib/core/interface.js +52 -20
- package/lib/core/schema.js +39 -18
- package/lib/core/shape/Path.js +78 -60
- package/lib/core/shape/extrude.js +90 -127
- package/lib/core/triangulation.js +208 -295
- package/lib/earth/index.js +62 -96
- package/lib/earth/models/atmosphere.js +112 -139
- package/lib/earth/models/base.js +150 -198
- package/lib/earth/models/bloomsphere.js +112 -139
- package/lib/earth/shaders/atmosphere_frag.glsl +17 -0
- package/lib/earth/shaders/atmosphere_vert.glsl +26 -0
- package/lib/earth/shaders/base_frag.glsl +13 -0
- package/lib/earth/shaders/base_vert.glsl +52 -0
- package/lib/earth/shaders/bloomsphere_frag.glsl +15 -0
- package/lib/earth/shaders/bloomsphere_vert.glsl +20 -0
- package/lib/earth/utils.js +89 -85
- package/lib/heatmap/index.js +92 -148
- package/lib/heatmap/models/grid.js +91 -113
- package/lib/heatmap/models/grid3d.js +123 -145
- package/lib/heatmap/models/heatmap.js +338 -470
- package/lib/heatmap/models/hexagon.js +92 -114
- package/lib/heatmap/models/index.js +37 -23
- package/lib/heatmap/shaders/grid_vert.glsl +42 -0
- package/lib/heatmap/shaders/heatmap_3d_frag.glsl +14 -0
- package/lib/heatmap/shaders/heatmap_3d_vert.glsl +46 -0
- package/lib/heatmap/shaders/heatmap_frag.glsl +47 -0
- package/lib/heatmap/shaders/heatmap_framebuffer_frag.glsl +10 -0
- package/lib/heatmap/shaders/heatmap_framebuffer_vert.glsl +35 -0
- package/lib/heatmap/shaders/heatmap_vert.glsl +10 -0
- package/lib/heatmap/shaders/hexagon_3d_frag.glsl +0 -0
- package/lib/heatmap/shaders/hexagon_3d_vert.glsl +64 -0
- package/lib/heatmap/shaders/hexagon_frag.glsl +12 -0
- package/lib/heatmap/shaders/hexagon_vert.glsl +41 -0
- package/lib/heatmap/triangulation.js +46 -30
- package/lib/image/index.js +74 -112
- package/lib/image/models/dataImage.js +173 -241
- package/lib/image/models/image.js +123 -177
- package/lib/image/models/index.js +32 -16
- package/lib/image/shaders/dataImage_frag.glsl +38 -0
- package/lib/image/shaders/image_frag.glsl +9 -0
- package/lib/image/shaders/image_vert.glsl +17 -0
- package/lib/index.js +96 -193
- package/lib/line/index.js +83 -128
- package/lib/line/models/arc.js +237 -328
- package/lib/line/models/arc_3d.js +228 -314
- package/lib/line/models/earthArc_3d.js +228 -316
- package/lib/line/models/great_circle.js +200 -279
- package/lib/line/models/half.js +201 -266
- package/lib/line/models/index.js +50 -43
- package/lib/line/models/line.js +299 -386
- package/lib/line/models/linearline.js +203 -258
- package/lib/line/models/simpleLine.js +175 -225
- package/lib/line/models/tile.js +237 -330
- package/lib/line/models/wall.js +235 -310
- package/lib/line/shaders/arc_chunks.vert.glsl +21 -0
- package/lib/line/shaders/dash/arc_dash_frag.glsl +28 -0
- package/lib/line/shaders/dash/arc_dash_vert.glsl +148 -0
- package/lib/line/shaders/dash/line_dash_frag.glsl +31 -0
- package/lib/line/shaders/dash/line_dash_vert.glsl +93 -0
- package/lib/line/shaders/half/line_half_frag.glsl +53 -0
- package/lib/line/shaders/half/line_half_vert.glsl +169 -0
- package/lib/line/shaders/line_arc2d_vert.glsl +114 -0
- package/lib/line/shaders/line_arc_3d_frag.glsl +103 -0
- package/lib/line/shaders/line_arc_3d_vert.glsl +207 -0
- package/lib/line/shaders/line_arc_frag.glsl +89 -0
- package/lib/line/shaders/line_arc_great_circle_frag.glsl +101 -0
- package/lib/line/shaders/line_arc_great_circle_vert.glsl +215 -0
- package/lib/line/shaders/line_arc_vert.glsl +174 -0
- package/lib/line/shaders/line_bezier_vert.glsl +85 -0
- package/lib/line/shaders/line_frag.glsl +100 -0
- package/lib/line/shaders/line_vert.glsl +192 -0
- package/lib/line/shaders/linear/arc3d_linear_frag.glsl +47 -0
- package/lib/line/shaders/linear/arc3d_linear_vert.glsl +207 -0
- package/lib/line/shaders/linear/arc_linear_frag.glsl +38 -0
- package/lib/line/shaders/linear/arc_linear_vert.glsl +138 -0
- package/lib/line/shaders/linear/line_linear_frag.glsl +27 -0
- package/lib/line/shaders/linearLine/line_linear_frag.glsl +20 -0
- package/lib/line/shaders/linearLine/line_linear_vert.glsl +112 -0
- package/lib/line/shaders/simple/simpleline_frag.glsl +10 -0
- package/lib/line/shaders/simple/simpleline_linear_frag.glsl +11 -0
- package/lib/line/shaders/simple/simpleline_vert.glsl +78 -0
- package/lib/line/shaders/tile/line_tile_frag.glsl +79 -0
- package/lib/line/shaders/tile/line_tile_vert.glsl +210 -0
- package/lib/line/shaders/wall_frag.glsl +93 -0
- package/lib/line/shaders/wall_vert.glsl +111 -0
- package/lib/mask/index.js +59 -93
- package/lib/mask/models/fill.js +82 -132
- package/lib/mask/models/index.js +30 -13
- package/lib/mask/shaders/mask_frag.glsl +7 -0
- package/lib/mask/shaders/mask_vert.glsl +22 -0
- package/lib/plugins/DataMappingPlugin.js +222 -304
- package/lib/plugins/DataSourcePlugin.js +87 -100
- package/lib/plugins/FeatureScalePlugin.js +239 -310
- package/lib/plugins/LayerAnimateStylePlugin.js +55 -61
- package/lib/plugins/LayerModelPlugin.js +72 -70
- package/lib/plugins/LayerStylePlugin.js +51 -44
- package/lib/plugins/LightingPlugin.js +68 -72
- package/lib/plugins/MultiPassRendererPlugin.js +65 -77
- package/lib/plugins/PixelPickingPlugin.js +109 -128
- package/lib/plugins/RegisterStyleAttributePlugin.js +110 -103
- package/lib/plugins/ShaderUniformPlugin.js +98 -103
- package/lib/plugins/UpdateModelPlugin.js +47 -36
- package/lib/plugins/UpdateStyleAttributePlugin.js +75 -80
- package/lib/point/index.js +147 -216
- package/lib/point/models/earthExtrude.js +201 -262
- package/lib/point/models/earthFill.js +202 -276
- package/lib/point/models/extrude.js +203 -282
- package/lib/point/models/fill.js +273 -369
- package/lib/point/models/fillmage.js +250 -327
- package/lib/point/models/image.js +163 -226
- package/lib/point/models/index.js +52 -46
- package/lib/point/models/normal.js +134 -176
- package/lib/point/models/radar.js +212 -286
- package/lib/point/models/simplePoint.js +142 -187
- package/lib/point/models/text.js +385 -559
- package/lib/point/models/tile.js +223 -294
- package/lib/point/shaders/animate/wave_frag.glsl +65 -0
- package/lib/point/shaders/earth/extrude_frag.glsl +44 -0
- package/lib/point/shaders/earth/extrude_vert.glsl +140 -0
- package/lib/point/shaders/earth/fill_frag.glsl +86 -0
- package/lib/point/shaders/earth/fill_vert.glsl +126 -0
- package/lib/point/shaders/extrude/extrude_frag.glsl +44 -0
- package/lib/point/shaders/extrude/extrude_vert.glsl +121 -0
- package/lib/point/shaders/fill_frag.glsl +84 -0
- package/lib/point/shaders/fill_vert.glsl +182 -0
- package/lib/point/shaders/image/fillImage_frag.glsl +20 -0
- package/lib/point/shaders/image/fillImage_vert.glsl +108 -0
- package/lib/point/shaders/image_frag.glsl +39 -0
- package/lib/point/shaders/image_vert.glsl +81 -0
- package/lib/point/shaders/normal_frag.glsl +15 -0
- package/lib/point/shaders/normal_vert.glsl +79 -0
- package/lib/point/shaders/radar/radar_frag.glsl +64 -0
- package/lib/point/shaders/radar/radar_vert.glsl +120 -0
- package/lib/point/shaders/simplePoint_frag.glsl +53 -0
- package/lib/point/shaders/simplePoint_vert.glsl +79 -0
- package/lib/point/shaders/text_frag.glsl +48 -0
- package/lib/point/shaders/text_vert.glsl +131 -0
- package/lib/point/shaders/tile/fill_tile_frag.glsl +83 -0
- package/lib/point/shaders/tile/fill_tile_vert.glsl +181 -0
- package/lib/point/shape/extrude.js +51 -51
- package/lib/polygon/index.js +100 -149
- package/lib/polygon/models/extrude.js +222 -303
- package/lib/polygon/models/fill.js +153 -205
- package/lib/polygon/models/index.js +52 -46
- package/lib/polygon/models/ocean.js +172 -251
- package/lib/polygon/models/tile.js +100 -139
- package/lib/polygon/models/water.js +152 -227
- package/lib/polygon/shaders/extrude/polygon_extrude_frag.glsl +44 -0
- package/lib/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +44 -0
- package/lib/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +85 -0
- package/lib/polygon/shaders/extrude/polygon_extrude_vert.glsl +90 -0
- package/lib/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +48 -0
- package/lib/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +93 -0
- package/lib/polygon/shaders/polygon_frag.glsl +12 -0
- package/lib/polygon/shaders/polygon_linear_frag.glsl +22 -0
- package/lib/polygon/shaders/polygon_linear_vert.glsl +74 -0
- package/lib/polygon/shaders/polygon_vert.glsl +66 -0
- package/lib/polygon/shaders/tile/polygon_tile_frag.glsl +12 -0
- package/lib/polygon/shaders/tile/polygon_tile_vert.glsl +82 -0
- package/lib/polygon/shaders/water/polygon_ocean_frag.glsl +248 -0
- package/lib/polygon/shaders/water/polygon_ocean_vert.glsl +52 -0
- package/lib/polygon/shaders/water/polygon_water_frag.glsl +73 -0
- package/lib/polygon/shaders/water/polygon_water_vert.glsl +55 -0
- package/lib/raster/buffers/triangulation.js +39 -26
- package/lib/raster/index.js +73 -111
- package/lib/raster/models/index.js +33 -17
- package/lib/raster/models/raster.js +134 -187
- package/lib/raster/raster.js +132 -189
- package/lib/raster/shaders/raster_2d_frag.glsl +28 -0
- package/lib/raster/shaders/raster_2d_vert.glsl +18 -0
- package/lib/raster/shaders/raster_frag.glsl +9 -0
- package/lib/raster/shaders/raster_vert.glsl +44 -0
- package/lib/tile/interface.js +17 -2
- package/lib/tile/manager/tileConfigManager.js +86 -126
- package/lib/tile/manager/tileLayerManager.js +227 -312
- package/lib/tile/manager/tilePickerManager.js +123 -187
- package/lib/tile/models/tileModel.js +51 -70
- package/lib/tile/tileFactory/base.js +292 -403
- package/lib/tile/tileFactory/index.js +48 -51
- package/lib/tile/tileFactory/line.js +50 -71
- package/lib/tile/tileFactory/point.js +50 -71
- package/lib/tile/tileFactory/polygon.js +50 -71
- package/lib/tile/tileFactory/raster.js +54 -72
- package/lib/tile/tileFactory/rasterData.js +76 -94
- package/lib/tile/tileFactory/rasterDataLayer.js +62 -98
- package/lib/tile/tileFactory/vectorLayer.js +95 -148
- package/lib/tile/tileLayer/baseTileLayer.js +220 -380
- package/lib/tile/tmsTileLayer.js +67 -109
- package/lib/tile/utils.js +86 -101
- package/lib/utils/blend.js +79 -60
- package/lib/utils/collision-index.js +63 -83
- package/lib/utils/dataMappingStyle.js +59 -56
- package/lib/utils/extrude_polyline.js +405 -428
- package/lib/utils/grid-index.js +111 -168
- package/lib/utils/layerData.js +88 -95
- package/lib/utils/multiPassRender.js +38 -31
- package/lib/utils/polylineNormal.js +86 -118
- package/lib/utils/simpleLine.js +85 -101
- package/lib/utils/symbol-layout.js +109 -173
- package/lib/utils/updateShape.js +40 -11
- package/lib/wind/index.js +71 -110
- package/lib/wind/models/index.js +30 -13
- package/lib/wind/models/utils.js +89 -104
- package/lib/wind/models/wind.js +224 -332
- package/lib/wind/models/windRender.js +215 -293
- package/lib/wind/models/windShader.js +181 -17
- package/lib/wind/shaders/wind_frag.glsl +9 -0
- package/lib/wind/shaders/wind_vert.glsl +17 -0
- package/package.json +11 -9
- package/es/Geometry/index.js.map +0 -1
- package/es/Geometry/models/billboard.js.map +0 -1
- package/es/Geometry/models/index.js.map +0 -1
- package/es/Geometry/models/plane.js.map +0 -1
- package/es/Geometry/models/sprite.js.map +0 -1
- package/es/canvas/index.js.map +0 -1
- package/es/canvas/models/canvas.js.map +0 -1
- package/es/canvas/models/index.js.map +0 -1
- package/es/citybuliding/building.js.map +0 -1
- package/es/citybuliding/models/build.js.map +0 -1
- package/es/core/BaseLayer.js.map +0 -1
- package/es/core/BaseModel.js.map +0 -1
- package/es/core/interface.js.map +0 -1
- package/es/core/schema.js.map +0 -1
- package/es/core/shape/Path.js.map +0 -1
- package/es/core/shape/extrude.js.map +0 -1
- package/es/core/triangulation.js.map +0 -1
- package/es/earth/index.js.map +0 -1
- package/es/earth/models/atmosphere.js.map +0 -1
- package/es/earth/models/base.js.map +0 -1
- package/es/earth/models/bloomsphere.js.map +0 -1
- package/es/earth/utils.js.map +0 -1
- package/es/glsl.d.js +0 -2
- package/es/glsl.d.js.map +0 -1
- package/es/heatmap/index.js.map +0 -1
- package/es/heatmap/models/grid.js.map +0 -1
- package/es/heatmap/models/grid3d.js.map +0 -1
- package/es/heatmap/models/heatmap.js.map +0 -1
- package/es/heatmap/models/hexagon.js.map +0 -1
- package/es/heatmap/models/index.js.map +0 -1
- package/es/heatmap/triangulation.js.map +0 -1
- package/es/image/index.js.map +0 -1
- package/es/image/models/dataImage.js.map +0 -1
- package/es/image/models/image.js.map +0 -1
- package/es/image/models/index.js.map +0 -1
- package/es/index.js.map +0 -1
- package/es/line/index.js.map +0 -1
- package/es/line/models/arc.js.map +0 -1
- package/es/line/models/arc_3d.js.map +0 -1
- package/es/line/models/earthArc_3d.js.map +0 -1
- package/es/line/models/great_circle.js.map +0 -1
- package/es/line/models/half.js.map +0 -1
- package/es/line/models/index.js.map +0 -1
- package/es/line/models/line.js.map +0 -1
- package/es/line/models/linearline.js.map +0 -1
- package/es/line/models/simpleLine.js.map +0 -1
- package/es/line/models/tile.js.map +0 -1
- package/es/line/models/wall.js.map +0 -1
- package/es/mask/index.js.map +0 -1
- package/es/mask/models/fill.js.map +0 -1
- package/es/mask/models/index.js.map +0 -1
- package/es/plugins/DataMappingPlugin.js.map +0 -1
- package/es/plugins/DataSourcePlugin.js.map +0 -1
- package/es/plugins/FeatureScalePlugin.js.map +0 -1
- package/es/plugins/LayerAnimateStylePlugin.js.map +0 -1
- package/es/plugins/LayerModelPlugin.js.map +0 -1
- package/es/plugins/LayerStylePlugin.js.map +0 -1
- package/es/plugins/LightingPlugin.js.map +0 -1
- package/es/plugins/MultiPassRendererPlugin.js.map +0 -1
- package/es/plugins/PixelPickingPlugin.js.map +0 -1
- package/es/plugins/RegisterStyleAttributePlugin.js.map +0 -1
- package/es/plugins/ShaderUniformPlugin.js.map +0 -1
- package/es/plugins/UpdateModelPlugin.js.map +0 -1
- package/es/plugins/UpdateStyleAttributePlugin.js.map +0 -1
- package/es/point/index.js.map +0 -1
- package/es/point/models/earthExtrude.js.map +0 -1
- package/es/point/models/earthFill.js.map +0 -1
- package/es/point/models/extrude.js.map +0 -1
- package/es/point/models/fill.js.map +0 -1
- package/es/point/models/fillmage.js.map +0 -1
- package/es/point/models/image.js.map +0 -1
- package/es/point/models/index.js.map +0 -1
- package/es/point/models/normal.js.map +0 -1
- package/es/point/models/radar.js.map +0 -1
- package/es/point/models/simplePoint.js.map +0 -1
- package/es/point/models/text.js.map +0 -1
- package/es/point/models/tile.js.map +0 -1
- package/es/point/shape/extrude.js.map +0 -1
- package/es/polygon/index.js.map +0 -1
- package/es/polygon/models/extrude.js.map +0 -1
- package/es/polygon/models/fill.js.map +0 -1
- package/es/polygon/models/index.js.map +0 -1
- package/es/polygon/models/ocean.js.map +0 -1
- package/es/polygon/models/tile.js.map +0 -1
- package/es/polygon/models/water.js.map +0 -1
- package/es/raster/buffers/triangulation.js.map +0 -1
- package/es/raster/index.js.map +0 -1
- package/es/raster/models/index.js.map +0 -1
- package/es/raster/models/raster.js.map +0 -1
- package/es/raster/raster.js.map +0 -1
- package/es/tile/interface.js.map +0 -1
- package/es/tile/manager/tileConfigManager.js.map +0 -1
- package/es/tile/manager/tileLayerManager.js.map +0 -1
- package/es/tile/manager/tilePickerManager.js.map +0 -1
- package/es/tile/models/tileModel.js.map +0 -1
- package/es/tile/tileFactory/base.js.map +0 -1
- package/es/tile/tileFactory/index.js.map +0 -1
- package/es/tile/tileFactory/line.js.map +0 -1
- package/es/tile/tileFactory/point.js.map +0 -1
- package/es/tile/tileFactory/polygon.js.map +0 -1
- package/es/tile/tileFactory/raster.js.map +0 -1
- package/es/tile/tileFactory/rasterData.js.map +0 -1
- package/es/tile/tileFactory/rasterDataLayer.js.map +0 -1
- package/es/tile/tileFactory/vectorLayer.js.map +0 -1
- package/es/tile/tileLayer/baseTileLayer.js.map +0 -1
- package/es/tile/tmsTileLayer.js.map +0 -1
- package/es/tile/utils.js.map +0 -1
- package/es/utils/blend.js.map +0 -1
- package/es/utils/collision-index.js.map +0 -1
- package/es/utils/dataMappingStyle.js.map +0 -1
- package/es/utils/extrude_polyline.js.map +0 -1
- package/es/utils/grid-index.js.map +0 -1
- package/es/utils/layerData.js.map +0 -1
- package/es/utils/multiPassRender.js.map +0 -1
- package/es/utils/polylineNormal.js.map +0 -1
- package/es/utils/simpleLine.js.map +0 -1
- package/es/utils/symbol-layout.js.map +0 -1
- package/es/utils/updateShape.js.map +0 -1
- package/es/wind/index.js.map +0 -1
- package/es/wind/models/index.js.map +0 -1
- package/es/wind/models/utils.js.map +0 -1
- package/es/wind/models/wind.js.map +0 -1
- package/es/wind/models/windRender.js.map +0 -1
- package/es/wind/models/windShader.js.map +0 -1
- package/lib/Geometry/index.js.map +0 -1
- package/lib/Geometry/models/billboard.js.map +0 -1
- package/lib/Geometry/models/index.js.map +0 -1
- package/lib/Geometry/models/plane.js.map +0 -1
- package/lib/Geometry/models/sprite.js.map +0 -1
- package/lib/canvas/index.js.map +0 -1
- package/lib/canvas/models/canvas.js.map +0 -1
- package/lib/canvas/models/index.js.map +0 -1
- package/lib/citybuliding/building.js.map +0 -1
- package/lib/citybuliding/models/build.js.map +0 -1
- package/lib/core/BaseLayer.js.map +0 -1
- package/lib/core/BaseModel.js.map +0 -1
- package/lib/core/interface.js.map +0 -1
- package/lib/core/schema.js.map +0 -1
- package/lib/core/shape/Path.js.map +0 -1
- package/lib/core/shape/extrude.js.map +0 -1
- package/lib/core/triangulation.js.map +0 -1
- package/lib/earth/index.js.map +0 -1
- package/lib/earth/models/atmosphere.js.map +0 -1
- package/lib/earth/models/base.js.map +0 -1
- package/lib/earth/models/bloomsphere.js.map +0 -1
- package/lib/earth/utils.js.map +0 -1
- package/lib/glsl.d.js +0 -2
- package/lib/glsl.d.js.map +0 -1
- package/lib/heatmap/index.js.map +0 -1
- package/lib/heatmap/models/grid.js.map +0 -1
- package/lib/heatmap/models/grid3d.js.map +0 -1
- package/lib/heatmap/models/heatmap.js.map +0 -1
- package/lib/heatmap/models/hexagon.js.map +0 -1
- package/lib/heatmap/models/index.js.map +0 -1
- package/lib/heatmap/triangulation.js.map +0 -1
- package/lib/image/index.js.map +0 -1
- package/lib/image/models/dataImage.js.map +0 -1
- package/lib/image/models/image.js.map +0 -1
- package/lib/image/models/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/line/index.js.map +0 -1
- package/lib/line/models/arc.js.map +0 -1
- package/lib/line/models/arc_3d.js.map +0 -1
- package/lib/line/models/earthArc_3d.js.map +0 -1
- package/lib/line/models/great_circle.js.map +0 -1
- package/lib/line/models/half.js.map +0 -1
- package/lib/line/models/index.js.map +0 -1
- package/lib/line/models/line.js.map +0 -1
- package/lib/line/models/linearline.js.map +0 -1
- package/lib/line/models/simpleLine.js.map +0 -1
- package/lib/line/models/tile.js.map +0 -1
- package/lib/line/models/wall.js.map +0 -1
- package/lib/mask/index.js.map +0 -1
- package/lib/mask/models/fill.js.map +0 -1
- package/lib/mask/models/index.js.map +0 -1
- package/lib/plugins/DataMappingPlugin.js.map +0 -1
- package/lib/plugins/DataSourcePlugin.js.map +0 -1
- package/lib/plugins/FeatureScalePlugin.js.map +0 -1
- package/lib/plugins/LayerAnimateStylePlugin.js.map +0 -1
- package/lib/plugins/LayerModelPlugin.js.map +0 -1
- package/lib/plugins/LayerStylePlugin.js.map +0 -1
- package/lib/plugins/LightingPlugin.js.map +0 -1
- package/lib/plugins/MultiPassRendererPlugin.js.map +0 -1
- package/lib/plugins/PixelPickingPlugin.js.map +0 -1
- package/lib/plugins/RegisterStyleAttributePlugin.js.map +0 -1
- package/lib/plugins/ShaderUniformPlugin.js.map +0 -1
- package/lib/plugins/UpdateModelPlugin.js.map +0 -1
- package/lib/plugins/UpdateStyleAttributePlugin.js.map +0 -1
- package/lib/point/index.js.map +0 -1
- package/lib/point/models/earthExtrude.js.map +0 -1
- package/lib/point/models/earthFill.js.map +0 -1
- package/lib/point/models/extrude.js.map +0 -1
- package/lib/point/models/fill.js.map +0 -1
- package/lib/point/models/fillmage.js.map +0 -1
- package/lib/point/models/image.js.map +0 -1
- package/lib/point/models/index.js.map +0 -1
- package/lib/point/models/normal.js.map +0 -1
- package/lib/point/models/radar.js.map +0 -1
- package/lib/point/models/simplePoint.js.map +0 -1
- package/lib/point/models/text.js.map +0 -1
- package/lib/point/models/tile.js.map +0 -1
- package/lib/point/shape/extrude.js.map +0 -1
- package/lib/polygon/index.js.map +0 -1
- package/lib/polygon/models/extrude.js.map +0 -1
- package/lib/polygon/models/fill.js.map +0 -1
- package/lib/polygon/models/index.js.map +0 -1
- package/lib/polygon/models/ocean.js.map +0 -1
- package/lib/polygon/models/tile.js.map +0 -1
- package/lib/polygon/models/water.js.map +0 -1
- package/lib/raster/buffers/triangulation.js.map +0 -1
- package/lib/raster/index.js.map +0 -1
- package/lib/raster/models/index.js.map +0 -1
- package/lib/raster/models/raster.js.map +0 -1
- package/lib/raster/raster.js.map +0 -1
- package/lib/tile/interface.js.map +0 -1
- package/lib/tile/manager/tileConfigManager.js.map +0 -1
- package/lib/tile/manager/tileLayerManager.js.map +0 -1
- package/lib/tile/manager/tilePickerManager.js.map +0 -1
- package/lib/tile/models/tileModel.js.map +0 -1
- package/lib/tile/tileFactory/base.js.map +0 -1
- package/lib/tile/tileFactory/index.js.map +0 -1
- package/lib/tile/tileFactory/line.js.map +0 -1
- package/lib/tile/tileFactory/point.js.map +0 -1
- package/lib/tile/tileFactory/polygon.js.map +0 -1
- package/lib/tile/tileFactory/raster.js.map +0 -1
- package/lib/tile/tileFactory/rasterData.js.map +0 -1
- package/lib/tile/tileFactory/rasterDataLayer.js.map +0 -1
- package/lib/tile/tileFactory/vectorLayer.js.map +0 -1
- package/lib/tile/tileLayer/baseTileLayer.js.map +0 -1
- package/lib/tile/tmsTileLayer.js.map +0 -1
- package/lib/tile/utils.js.map +0 -1
- package/lib/utils/blend.js.map +0 -1
- package/lib/utils/collision-index.js.map +0 -1
- package/lib/utils/dataMappingStyle.js.map +0 -1
- package/lib/utils/extrude_polyline.js.map +0 -1
- package/lib/utils/grid-index.js.map +0 -1
- package/lib/utils/layerData.js.map +0 -1
- package/lib/utils/multiPassRender.js.map +0 -1
- package/lib/utils/polylineNormal.js.map +0 -1
- package/lib/utils/simpleLine.js.map +0 -1
- package/lib/utils/symbol-layout.js.map +0 -1
- package/lib/utils/updateShape.js.map +0 -1
- package/lib/wind/index.js.map +0 -1
- package/lib/wind/models/index.js.map +0 -1
- package/lib/wind/models/utils.js.map +0 -1
- package/lib/wind/models/wind.js.map +0 -1
- package/lib/wind/models/windRender.js.map +0 -1
- package/lib/wind/models/windShader.js.map +0 -1
package/lib/core/BaseLayer.js
CHANGED
|
@@ -1,1324 +1,886 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
22
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
23
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
24
|
+
if (decorator = decorators[i])
|
|
25
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
26
|
+
if (kind && result)
|
|
27
|
+
__defProp(target, key, result);
|
|
28
|
+
return result;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// src/core/BaseLayer.ts
|
|
32
|
+
var BaseLayer_exports = {};
|
|
33
|
+
__export(BaseLayer_exports, {
|
|
34
|
+
default: () => BaseLayer
|
|
7
35
|
});
|
|
8
|
-
exports
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
21
|
-
|
|
22
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
23
|
-
|
|
24
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
25
|
-
|
|
26
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
27
|
-
|
|
28
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
29
|
-
|
|
30
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
31
|
-
|
|
32
|
-
var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
|
|
33
|
-
|
|
34
|
-
var _initializerWarningHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/initializerWarningHelper"));
|
|
35
|
-
|
|
36
|
-
var _isUndefined2 = _interopRequireDefault(require("lodash/isUndefined"));
|
|
37
|
-
|
|
38
|
-
var _isObject2 = _interopRequireDefault(require("lodash/isObject"));
|
|
39
|
-
|
|
40
|
-
var _isFunction2 = _interopRequireDefault(require("lodash/isFunction"));
|
|
41
|
-
|
|
42
|
-
var _asyncHook = require("@antv/async-hook");
|
|
43
|
-
|
|
44
|
-
var _l7Core = require("@antv/l7-core");
|
|
45
|
-
|
|
46
|
-
var _l7Source = _interopRequireDefault(require("@antv/l7-source"));
|
|
47
|
-
|
|
48
|
-
var _l7Utils = require("@antv/l7-utils");
|
|
49
|
-
|
|
50
|
-
var _eventemitter = require("eventemitter3");
|
|
51
|
-
|
|
52
|
-
var _blend = require("../utils/blend");
|
|
53
|
-
|
|
54
|
-
var _dataMappingStyle = require("../utils/dataMappingStyle");
|
|
55
|
-
|
|
56
|
-
var _layerData = require("../utils/layerData");
|
|
57
|
-
|
|
58
|
-
var _multiPassRender = require("../utils/multiPassRender");
|
|
59
|
-
|
|
60
|
-
var _updateShape = require("../utils/updateShape");
|
|
61
|
-
|
|
62
|
-
var _excluded = ["passes"],
|
|
63
|
-
_excluded2 = ["moduleName", "vertexShader", "fragmentShader", "triangulation", "segmentNumber", "workerEnabled", "workerOptions"];
|
|
64
|
-
|
|
65
|
-
var _dec, _class, _descriptor;
|
|
66
|
-
|
|
67
|
-
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; } } }; }
|
|
68
|
-
|
|
69
|
-
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); }
|
|
70
|
-
|
|
71
|
-
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; }
|
|
72
|
-
|
|
73
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
74
|
-
|
|
75
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
76
|
-
|
|
77
|
-
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); }; }
|
|
78
|
-
|
|
79
|
-
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; } }
|
|
80
|
-
|
|
36
|
+
module.exports = __toCommonJS(BaseLayer_exports);
|
|
37
|
+
var import_async_hook = require("@antv/async-hook");
|
|
38
|
+
var import_l7_core = require("@antv/l7-core");
|
|
39
|
+
var import_l7_source = __toESM(require("@antv/l7-source"));
|
|
40
|
+
var import_l7_utils = require("@antv/l7-utils");
|
|
41
|
+
var import_eventemitter3 = require("eventemitter3");
|
|
42
|
+
var import_lodash = require("lodash");
|
|
43
|
+
var import_blend = require("../utils/blend");
|
|
44
|
+
var import_dataMappingStyle = require("../utils/dataMappingStyle");
|
|
45
|
+
var import_layerData = require("../utils/layerData");
|
|
46
|
+
var import_multiPassRender = require("../utils/multiPassRender");
|
|
47
|
+
var import_updateShape = require("../utils/updateShape");
|
|
81
48
|
var layerIdCounter = 0;
|
|
82
|
-
var BaseLayer =
|
|
83
|
-
(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "visible", true);
|
|
97
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "zIndex", 0);
|
|
98
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "minZoom", void 0);
|
|
99
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "maxZoom", void 0);
|
|
100
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "inited", false);
|
|
101
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "layerModelNeedUpdate", false);
|
|
102
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "pickedFeatureID", null);
|
|
103
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "selectedFeatureID", null);
|
|
104
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "styleNeedUpdate", false);
|
|
105
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "rendering", void 0);
|
|
106
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "clusterZoom", 0);
|
|
107
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "layerType", void 0);
|
|
108
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "triangulation", void 0);
|
|
109
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "dataState", {
|
|
49
|
+
var BaseLayer = class extends import_eventemitter3.EventEmitter {
|
|
50
|
+
constructor(config = {}) {
|
|
51
|
+
super();
|
|
52
|
+
this.id = `${layerIdCounter++}`;
|
|
53
|
+
this.name = `${layerIdCounter}`;
|
|
54
|
+
this.visible = true;
|
|
55
|
+
this.zIndex = 0;
|
|
56
|
+
this.inited = false;
|
|
57
|
+
this.layerModelNeedUpdate = false;
|
|
58
|
+
this.pickedFeatureID = null;
|
|
59
|
+
this.selectedFeatureID = null;
|
|
60
|
+
this.styleNeedUpdate = false;
|
|
61
|
+
this.clusterZoom = 0;
|
|
62
|
+
this.dataState = {
|
|
110
63
|
dataSourceNeedUpdate: false,
|
|
111
64
|
dataMappingNeedUpdate: false,
|
|
112
65
|
filterNeedUpdate: false,
|
|
113
66
|
featureScaleNeedUpdate: false,
|
|
114
67
|
StyleAttrNeedUpdate: false
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
init: new
|
|
118
|
-
afterInit: new
|
|
119
|
-
beforeRender: new
|
|
120
|
-
beforeRenderData: new
|
|
121
|
-
afterRender: new
|
|
122
|
-
beforePickingEncode: new
|
|
123
|
-
afterPickingEncode: new
|
|
124
|
-
beforeHighlight: new
|
|
125
|
-
afterHighlight: new
|
|
126
|
-
beforeSelect: new
|
|
127
|
-
afterSelect: new
|
|
128
|
-
beforeDestroy: new
|
|
129
|
-
afterDestroy: new
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
(0,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "coordinateService", void 0);
|
|
146
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "iconService", void 0);
|
|
147
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fontService", void 0);
|
|
148
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "pickingService", void 0);
|
|
149
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "rendererService", void 0);
|
|
150
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "layerService", void 0);
|
|
151
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "interactionService", void 0);
|
|
152
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mapService", void 0);
|
|
153
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "styleAttributeService", void 0);
|
|
154
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "layerSource", void 0);
|
|
155
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "postProcessingPassFactory", void 0);
|
|
156
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "normalPassFactory", void 0);
|
|
157
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "animateOptions", {
|
|
158
|
-
enable: false
|
|
159
|
-
});
|
|
160
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "container", void 0);
|
|
161
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "encodedData", void 0);
|
|
162
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "configSchema", void 0);
|
|
163
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "currentPickId", null);
|
|
164
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "rawConfig", void 0);
|
|
165
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "needUpdateConfig", void 0);
|
|
166
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "pendingStyleAttributes", []);
|
|
167
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "scaleOptions", {});
|
|
168
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "animateStartTime", void 0);
|
|
169
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "aniamateStatus", false);
|
|
170
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "bottomColor", 'rgba(0, 0, 0, 0)');
|
|
171
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isDestroied", false);
|
|
172
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sourceEvent", function () {
|
|
173
|
-
_this.dataState.dataSourceNeedUpdate = true;
|
|
174
|
-
|
|
175
|
-
var layerConfig = _this.getLayerConfig();
|
|
176
|
-
|
|
68
|
+
};
|
|
69
|
+
this.hooks = {
|
|
70
|
+
init: new import_async_hook.SyncBailHook(),
|
|
71
|
+
afterInit: new import_async_hook.SyncBailHook(),
|
|
72
|
+
beforeRender: new import_async_hook.SyncBailHook(),
|
|
73
|
+
beforeRenderData: new import_async_hook.SyncWaterfallHook(),
|
|
74
|
+
afterRender: new import_async_hook.SyncHook(),
|
|
75
|
+
beforePickingEncode: new import_async_hook.SyncHook(),
|
|
76
|
+
afterPickingEncode: new import_async_hook.SyncHook(),
|
|
77
|
+
beforeHighlight: new import_async_hook.SyncHook(["pickedColor"]),
|
|
78
|
+
afterHighlight: new import_async_hook.SyncHook(),
|
|
79
|
+
beforeSelect: new import_async_hook.SyncHook(["pickedColor"]),
|
|
80
|
+
afterSelect: new import_async_hook.SyncHook(),
|
|
81
|
+
beforeDestroy: new import_async_hook.SyncHook(),
|
|
82
|
+
afterDestroy: new import_async_hook.SyncHook()
|
|
83
|
+
};
|
|
84
|
+
this.models = [];
|
|
85
|
+
this.layerChildren = [];
|
|
86
|
+
this.masks = [];
|
|
87
|
+
this.isVector = false;
|
|
88
|
+
this.animateOptions = { enable: false };
|
|
89
|
+
this.currentPickId = null;
|
|
90
|
+
this.pendingStyleAttributes = [];
|
|
91
|
+
this.scaleOptions = {};
|
|
92
|
+
this.aniamateStatus = false;
|
|
93
|
+
this.bottomColor = "rgba(0, 0, 0, 0)";
|
|
94
|
+
this.isDestroied = false;
|
|
95
|
+
this.sourceEvent = () => {
|
|
96
|
+
this.dataState.dataSourceNeedUpdate = true;
|
|
97
|
+
const layerConfig = this.getLayerConfig();
|
|
177
98
|
if (layerConfig && layerConfig.autoFit) {
|
|
178
|
-
|
|
99
|
+
this.fitBounds(layerConfig.fitBoundsOptions);
|
|
179
100
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
_this.rawConfig = config;
|
|
186
|
-
return _this;
|
|
101
|
+
this.reRender();
|
|
102
|
+
};
|
|
103
|
+
this.name = config.name || this.id;
|
|
104
|
+
this.zIndex = config.zIndex || 0;
|
|
105
|
+
this.rawConfig = config;
|
|
187
106
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
107
|
+
addMaskLayer(maskLayer) {
|
|
108
|
+
this.masks.push(maskLayer);
|
|
109
|
+
}
|
|
110
|
+
removeMaskLayer(maskLayer) {
|
|
111
|
+
const layerIndex = this.masks.indexOf(maskLayer);
|
|
112
|
+
if (layerIndex > -1) {
|
|
113
|
+
this.masks.splice(layerIndex, 1);
|
|
193
114
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
115
|
+
maskLayer.destroy();
|
|
116
|
+
}
|
|
117
|
+
getAttribute(name) {
|
|
118
|
+
return this.styleAttributeService.getLayerStyleAttribute(name);
|
|
119
|
+
}
|
|
120
|
+
getLayerConfig() {
|
|
121
|
+
return this.configService.getLayerConfig(this.id);
|
|
122
|
+
}
|
|
123
|
+
updateLayerConfig(configToUpdate) {
|
|
124
|
+
Object.keys(configToUpdate).map((key) => {
|
|
125
|
+
if (key in this.rawConfig) {
|
|
126
|
+
this.rawConfig[key] = configToUpdate[key];
|
|
201
127
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}, {
|
|
216
|
-
key: "updateLayerConfig",
|
|
217
|
-
value: function updateLayerConfig(configToUpdate) {
|
|
218
|
-
var _this2 = this;
|
|
219
|
-
|
|
220
|
-
Object.keys(configToUpdate).map(function (key) {
|
|
221
|
-
if (key in _this2.rawConfig) {
|
|
222
|
-
_this2.rawConfig[key] = configToUpdate[key];
|
|
223
|
-
}
|
|
128
|
+
});
|
|
129
|
+
if (!this.inited) {
|
|
130
|
+
this.needUpdateConfig = {
|
|
131
|
+
...this.needUpdateConfig,
|
|
132
|
+
...configToUpdate
|
|
133
|
+
};
|
|
134
|
+
} else {
|
|
135
|
+
const sceneId = this.container.get(import_l7_core.TYPES.SceneID);
|
|
136
|
+
(0, import_dataMappingStyle.handleStyleDataMapping)(configToUpdate, this);
|
|
137
|
+
this.configService.setLayerConfig(sceneId, this.id, {
|
|
138
|
+
...this.configService.getLayerConfig(this.id),
|
|
139
|
+
...this.needUpdateConfig,
|
|
140
|
+
...configToUpdate
|
|
224
141
|
});
|
|
225
|
-
|
|
226
|
-
if (!this.inited) {
|
|
227
|
-
this.needUpdateConfig = _objectSpread(_objectSpread({}, this.needUpdateConfig), configToUpdate);
|
|
228
|
-
} else {
|
|
229
|
-
var sceneId = this.container.get(_l7Core.TYPES.SceneID);
|
|
230
|
-
(0, _dataMappingStyle.handleStyleDataMapping)(configToUpdate, this);
|
|
231
|
-
this.configService.setLayerConfig(sceneId, this.id, _objectSpread(_objectSpread(_objectSpread({}, this.configService.getLayerConfig(this.id)), this.needUpdateConfig), configToUpdate));
|
|
232
|
-
this.needUpdateConfig = {};
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}, {
|
|
236
|
-
key: "setContainer",
|
|
237
|
-
value: function setContainer(container, sceneContainer) {
|
|
238
|
-
this.container = container;
|
|
239
|
-
this.sceneContainer = sceneContainer;
|
|
240
|
-
}
|
|
241
|
-
}, {
|
|
242
|
-
key: "getContainer",
|
|
243
|
-
value: function getContainer() {
|
|
244
|
-
return this.container;
|
|
245
|
-
}
|
|
246
|
-
}, {
|
|
247
|
-
key: "setBottomColor",
|
|
248
|
-
value: function setBottomColor(color) {
|
|
249
|
-
this.bottomColor = color;
|
|
250
|
-
}
|
|
251
|
-
}, {
|
|
252
|
-
key: "getBottomColor",
|
|
253
|
-
value: function getBottomColor() {
|
|
254
|
-
return this.bottomColor;
|
|
255
|
-
}
|
|
256
|
-
}, {
|
|
257
|
-
key: "addPlugin",
|
|
258
|
-
value: function addPlugin(plugin) {
|
|
259
|
-
this.plugins.push(plugin);
|
|
260
|
-
return this;
|
|
142
|
+
this.needUpdateConfig = {};
|
|
261
143
|
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
this.
|
|
294
|
-
|
|
295
|
-
this.multiPassRenderer.setLayer(this);
|
|
296
|
-
this.pendingStyleAttributes.forEach(function (_ref) {
|
|
297
|
-
var attributeName = _ref.attributeName,
|
|
298
|
-
attributeField = _ref.attributeField,
|
|
299
|
-
attributeValues = _ref.attributeValues,
|
|
300
|
-
updateOptions = _ref.updateOptions;
|
|
301
|
-
|
|
302
|
-
_this3.styleAttributeService.updateStyleAttribute(attributeName, {
|
|
303
|
-
scale: _objectSpread({
|
|
304
|
-
field: attributeField
|
|
305
|
-
}, _this3.splitValuesAndCallbackInAttribute(attributeValues, _this3.getLayerConfig()[attributeName]))
|
|
306
|
-
}, updateOptions);
|
|
144
|
+
}
|
|
145
|
+
setContainer(container, sceneContainer) {
|
|
146
|
+
this.container = container;
|
|
147
|
+
this.sceneContainer = sceneContainer;
|
|
148
|
+
}
|
|
149
|
+
getContainer() {
|
|
150
|
+
return this.container;
|
|
151
|
+
}
|
|
152
|
+
setBottomColor(color) {
|
|
153
|
+
this.bottomColor = color;
|
|
154
|
+
}
|
|
155
|
+
getBottomColor() {
|
|
156
|
+
return this.bottomColor;
|
|
157
|
+
}
|
|
158
|
+
addPlugin(plugin) {
|
|
159
|
+
this.plugins.push(plugin);
|
|
160
|
+
return this;
|
|
161
|
+
}
|
|
162
|
+
init() {
|
|
163
|
+
const sceneId = this.container.get(import_l7_core.TYPES.SceneID);
|
|
164
|
+
this.configService.setLayerConfig(sceneId, this.id, this.rawConfig);
|
|
165
|
+
this.layerType = this.rawConfig.layerType;
|
|
166
|
+
this.iconService = this.container.get(import_l7_core.TYPES.IIconService);
|
|
167
|
+
this.fontService = this.container.get(import_l7_core.TYPES.IFontService);
|
|
168
|
+
this.rendererService = this.container.get(import_l7_core.TYPES.IRendererService);
|
|
169
|
+
this.layerService = this.container.get(import_l7_core.TYPES.ILayerService);
|
|
170
|
+
this.interactionService = this.container.get(import_l7_core.TYPES.IInteractionService);
|
|
171
|
+
this.pickingService = this.container.get(import_l7_core.TYPES.IPickingService);
|
|
172
|
+
this.mapService = this.container.get(import_l7_core.TYPES.IMapService);
|
|
173
|
+
const { enableMultiPassRenderer, passes } = this.getLayerConfig();
|
|
174
|
+
if (enableMultiPassRenderer && (passes == null ? void 0 : passes.length) && passes.length > 0) {
|
|
175
|
+
this.mapService.on("mapAfterFrameChange", () => {
|
|
176
|
+
this.renderLayers();
|
|
307
177
|
});
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
postProcessingPassFactory: this.postProcessingPassFactory
|
|
323
|
-
});
|
|
178
|
+
}
|
|
179
|
+
this.cameraService = this.container.get(import_l7_core.TYPES.ICameraService);
|
|
180
|
+
this.coordinateService = this.container.get(import_l7_core.TYPES.ICoordinateSystemService);
|
|
181
|
+
this.shaderModuleService = this.container.get(import_l7_core.TYPES.IShaderModuleService);
|
|
182
|
+
this.postProcessingPassFactory = this.container.get(import_l7_core.TYPES.IFactoryPostProcessingPass);
|
|
183
|
+
this.normalPassFactory = this.container.get(import_l7_core.TYPES.IFactoryNormalPass);
|
|
184
|
+
this.styleAttributeService = this.container.get(import_l7_core.TYPES.IStyleAttributeService);
|
|
185
|
+
this.multiPassRenderer = this.container.get(import_l7_core.TYPES.IMultiPassRenderer);
|
|
186
|
+
this.multiPassRenderer.setLayer(this);
|
|
187
|
+
this.pendingStyleAttributes.forEach(({ attributeName, attributeField, attributeValues, updateOptions }) => {
|
|
188
|
+
this.styleAttributeService.updateStyleAttribute(attributeName, {
|
|
189
|
+
scale: {
|
|
190
|
+
field: attributeField,
|
|
191
|
+
...this.splitValuesAndCallbackInAttribute(attributeValues, this.getLayerConfig()[attributeName])
|
|
324
192
|
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
});
|
|
337
|
-
this.emit('add', {
|
|
338
|
-
target: this,
|
|
339
|
-
type: 'add'
|
|
193
|
+
}, updateOptions);
|
|
194
|
+
});
|
|
195
|
+
this.pendingStyleAttributes = [];
|
|
196
|
+
this.plugins = this.container.getAll(import_l7_core.TYPES.ILayerPlugin);
|
|
197
|
+
for (const plugin of this.plugins) {
|
|
198
|
+
plugin.apply(this, {
|
|
199
|
+
rendererService: this.rendererService,
|
|
200
|
+
mapService: this.mapService,
|
|
201
|
+
styleAttributeService: this.styleAttributeService,
|
|
202
|
+
normalPassFactory: this.normalPassFactory,
|
|
203
|
+
postProcessingPassFactory: this.postProcessingPassFactory
|
|
340
204
|
});
|
|
341
|
-
return this;
|
|
342
205
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
var calEncodeData = this.calculateEncodeData(data, option);
|
|
364
|
-
var triangulation = this.triangulation;
|
|
365
|
-
|
|
366
|
-
if (calEncodeData && triangulation) {
|
|
367
|
-
return this.styleAttributeService.createAttributesAndIndices(calEncodeData, triangulation);
|
|
368
|
-
} else {
|
|
369
|
-
return {
|
|
370
|
-
attributes: undefined,
|
|
371
|
-
elements: undefined
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}, {
|
|
376
|
-
key: "calculateEncodeData",
|
|
377
|
-
value: function calculateEncodeData(data, option) {
|
|
378
|
-
if (this.inited) {
|
|
379
|
-
return (0, _layerData.calculateData)(this, this.fontService, this.mapService, this.styleAttributeService, data, option);
|
|
380
|
-
} else {
|
|
381
|
-
console.warn('layer not inited!');
|
|
382
|
-
return null;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}, {
|
|
386
|
-
key: "prepareBuildModel",
|
|
387
|
-
value: function prepareBuildModel() {
|
|
388
|
-
this.inited = true;
|
|
389
|
-
this.updateLayerConfig(_objectSpread(_objectSpread({}, this.getDefaultConfig()), this.rawConfig));
|
|
390
|
-
|
|
391
|
-
var _this$getLayerConfig2 = this.getLayerConfig(),
|
|
392
|
-
animateOption = _this$getLayerConfig2.animateOption;
|
|
393
|
-
|
|
394
|
-
if (animateOption !== null && animateOption !== void 0 && animateOption.enable) {
|
|
395
|
-
this.layerService.startAnimate();
|
|
396
|
-
this.aniamateStatus = true;
|
|
397
|
-
}
|
|
206
|
+
this.hooks.init.call();
|
|
207
|
+
this.hooks.afterInit.call();
|
|
208
|
+
this.emit("inited", {
|
|
209
|
+
target: this,
|
|
210
|
+
type: "inited"
|
|
211
|
+
});
|
|
212
|
+
this.emit("add", {
|
|
213
|
+
target: this,
|
|
214
|
+
type: "add"
|
|
215
|
+
});
|
|
216
|
+
return this;
|
|
217
|
+
}
|
|
218
|
+
updateModelData(data) {
|
|
219
|
+
if (data.attributes && data.elements) {
|
|
220
|
+
this.models.map((m) => {
|
|
221
|
+
m.updateAttributesAndElements(data.attributes, data.elements);
|
|
222
|
+
});
|
|
223
|
+
} else {
|
|
224
|
+
console.warn("data error");
|
|
398
225
|
}
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
return this;
|
|
226
|
+
}
|
|
227
|
+
createModelData(data, option) {
|
|
228
|
+
var _a;
|
|
229
|
+
if ((_a = this.layerModel) == null ? void 0 : _a.createModelData) {
|
|
230
|
+
return this.layerModel.createModelData(option);
|
|
231
|
+
}
|
|
232
|
+
const calEncodeData = this.calculateEncodeData(data, option);
|
|
233
|
+
const triangulation = this.triangulation;
|
|
234
|
+
if (calEncodeData && triangulation) {
|
|
235
|
+
return this.styleAttributeService.createAttributesAndIndices(calEncodeData, triangulation);
|
|
236
|
+
} else {
|
|
237
|
+
return {
|
|
238
|
+
attributes: void 0,
|
|
239
|
+
elements: void 0
|
|
240
|
+
};
|
|
404
241
|
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
242
|
+
}
|
|
243
|
+
calculateEncodeData(data, option) {
|
|
244
|
+
if (this.inited) {
|
|
245
|
+
return (0, import_layerData.calculateData)(this, this.fontService, this.mapService, this.styleAttributeService, data, option);
|
|
246
|
+
} else {
|
|
247
|
+
console.warn("layer not inited!");
|
|
248
|
+
return null;
|
|
410
249
|
}
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
250
|
+
}
|
|
251
|
+
prepareBuildModel() {
|
|
252
|
+
this.inited = true;
|
|
253
|
+
this.updateLayerConfig({
|
|
254
|
+
...this.getDefaultConfig(),
|
|
255
|
+
...this.rawConfig
|
|
256
|
+
});
|
|
257
|
+
const { animateOption } = this.getLayerConfig();
|
|
258
|
+
if (animateOption == null ? void 0 : animateOption.enable) {
|
|
259
|
+
this.layerService.startAnimate();
|
|
260
|
+
this.aniamateStatus = true;
|
|
416
261
|
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
262
|
+
}
|
|
263
|
+
color(field, values, updateOptions) {
|
|
264
|
+
this.updateStyleAttribute("color", field, values, updateOptions);
|
|
265
|
+
return this;
|
|
266
|
+
}
|
|
267
|
+
texture(field, values, updateOptions) {
|
|
268
|
+
this.updateStyleAttribute("texture", field, values, updateOptions);
|
|
269
|
+
return this;
|
|
270
|
+
}
|
|
271
|
+
rotate(field, values, updateOptions) {
|
|
272
|
+
this.updateStyleAttribute("rotate", field, values, updateOptions);
|
|
273
|
+
return this;
|
|
274
|
+
}
|
|
275
|
+
size(field, values, updateOptions) {
|
|
276
|
+
this.updateStyleAttribute("size", field, values, updateOptions);
|
|
277
|
+
return this;
|
|
278
|
+
}
|
|
279
|
+
filter(field, values, updateOptions) {
|
|
280
|
+
this.updateStyleAttribute("filter", field, values, updateOptions);
|
|
281
|
+
return this;
|
|
282
|
+
}
|
|
283
|
+
shape(field, values, updateOptions) {
|
|
284
|
+
var _a, _b, _c;
|
|
285
|
+
const lastShape = (_c = (_b = (_a = this.styleAttributeService) == null ? void 0 : _a.getLayerStyleAttribute("shape")) == null ? void 0 : _b.scale) == null ? void 0 : _c.field;
|
|
286
|
+
const currentShape = field;
|
|
287
|
+
this.shapeOption = {
|
|
288
|
+
field,
|
|
289
|
+
values
|
|
290
|
+
};
|
|
291
|
+
this.updateStyleAttribute("shape", field, values, updateOptions);
|
|
292
|
+
if (!this.tileLayer) {
|
|
293
|
+
(0, import_updateShape.updateShape)(this, lastShape, currentShape);
|
|
294
|
+
}
|
|
295
|
+
return this;
|
|
296
|
+
}
|
|
297
|
+
label(field, values, updateOptions) {
|
|
298
|
+
this.pendingStyleAttributes.push({
|
|
299
|
+
attributeName: "label",
|
|
300
|
+
attributeField: field,
|
|
301
|
+
attributeValues: values,
|
|
302
|
+
updateOptions
|
|
303
|
+
});
|
|
304
|
+
return this;
|
|
305
|
+
}
|
|
306
|
+
animate(options) {
|
|
307
|
+
let rawAnimate = {};
|
|
308
|
+
if ((0, import_lodash.isObject)(options)) {
|
|
309
|
+
rawAnimate.enable = true;
|
|
310
|
+
rawAnimate = {
|
|
311
|
+
...rawAnimate,
|
|
312
|
+
...options
|
|
313
|
+
};
|
|
314
|
+
} else {
|
|
315
|
+
rawAnimate.enable = options;
|
|
422
316
|
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
317
|
+
this.updateLayerConfig({
|
|
318
|
+
animateOption: rawAnimate
|
|
319
|
+
});
|
|
320
|
+
return this;
|
|
321
|
+
}
|
|
322
|
+
source(data, options) {
|
|
323
|
+
if (data == null ? void 0 : data.data) {
|
|
324
|
+
this.setSource(data);
|
|
427
325
|
return this;
|
|
428
326
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
this.
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
327
|
+
this.sourceOption = {
|
|
328
|
+
data,
|
|
329
|
+
options
|
|
330
|
+
};
|
|
331
|
+
this.clusterZoom = 0;
|
|
332
|
+
return this;
|
|
333
|
+
}
|
|
334
|
+
setData(data, options) {
|
|
335
|
+
if (this.inited) {
|
|
336
|
+
this.layerSource.setData(data, options);
|
|
337
|
+
} else {
|
|
338
|
+
this.on("inited", () => {
|
|
339
|
+
const currentSource = this.getSource();
|
|
340
|
+
if (!currentSource) {
|
|
341
|
+
this.source(new import_l7_source.default(data, options));
|
|
342
|
+
this.sourceEvent();
|
|
343
|
+
} else {
|
|
344
|
+
this.layerSource.setData(data, options);
|
|
345
|
+
}
|
|
346
|
+
});
|
|
447
347
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
348
|
+
return this;
|
|
349
|
+
}
|
|
350
|
+
style(options) {
|
|
351
|
+
const lastConfig = this.getLayerConfig();
|
|
352
|
+
const { passes, ...rest } = options;
|
|
353
|
+
if (passes) {
|
|
354
|
+
(0, import_multiPassRender.normalizePasses)(passes).forEach((pass) => {
|
|
355
|
+
const postProcessingPass = this.multiPassRenderer.getPostProcessor().getPostProcessingPassByName(pass[0]);
|
|
356
|
+
if (postProcessingPass) {
|
|
357
|
+
postProcessingPass.updateOptions(pass[1]);
|
|
358
|
+
}
|
|
456
359
|
});
|
|
457
|
-
return this;
|
|
458
360
|
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
this.updateLayerConfig({
|
|
472
|
-
animateOption: rawAnimate
|
|
361
|
+
this.rawConfig = {
|
|
362
|
+
...this.rawConfig,
|
|
363
|
+
...rest
|
|
364
|
+
};
|
|
365
|
+
if (this.container) {
|
|
366
|
+
this.updateLayerConfig(this.rawConfig);
|
|
367
|
+
this.styleNeedUpdate = true;
|
|
368
|
+
}
|
|
369
|
+
if (lastConfig && lastConfig.mask === true && options.mask === false) {
|
|
370
|
+
this.clearModels();
|
|
371
|
+
this.layerModel.buildModels((models) => {
|
|
372
|
+
this.models = models;
|
|
473
373
|
});
|
|
474
|
-
return this;
|
|
475
374
|
}
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
this.sourceOption = {
|
|
485
|
-
data: data,
|
|
486
|
-
options: options
|
|
375
|
+
return this;
|
|
376
|
+
}
|
|
377
|
+
scale(field, cfg) {
|
|
378
|
+
if ((0, import_lodash.isObject)(field)) {
|
|
379
|
+
this.scaleOptions = {
|
|
380
|
+
...this.scaleOptions,
|
|
381
|
+
...field
|
|
487
382
|
};
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
}
|
|
491
|
-
}, {
|
|
492
|
-
key: "setData",
|
|
493
|
-
value: function setData(data, options) {
|
|
494
|
-
var _this4 = this;
|
|
495
|
-
|
|
496
|
-
if (this.inited) {
|
|
497
|
-
this.layerSource.setData(data, options);
|
|
498
|
-
} else {
|
|
499
|
-
this.on('inited', function () {
|
|
500
|
-
var currentSource = _this4.getSource();
|
|
501
|
-
|
|
502
|
-
if (!currentSource) {
|
|
503
|
-
_this4.source(new _l7Source.default(data, options));
|
|
504
|
-
|
|
505
|
-
_this4.sourceEvent();
|
|
506
|
-
} else {
|
|
507
|
-
_this4.layerSource.setData(data, options);
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
return this;
|
|
513
|
-
}
|
|
514
|
-
}, {
|
|
515
|
-
key: "style",
|
|
516
|
-
value: function style(options) {
|
|
517
|
-
var _this5 = this;
|
|
518
|
-
|
|
519
|
-
var lastConfig = this.getLayerConfig();
|
|
520
|
-
var passes = options.passes,
|
|
521
|
-
rest = (0, _objectWithoutProperties2.default)(options, _excluded);
|
|
522
|
-
|
|
523
|
-
if (passes) {
|
|
524
|
-
(0, _multiPassRender.normalizePasses)(passes).forEach(function (pass) {
|
|
525
|
-
var postProcessingPass = _this5.multiPassRenderer.getPostProcessor().getPostProcessingPassByName(pass[0]);
|
|
526
|
-
|
|
527
|
-
if (postProcessingPass) {
|
|
528
|
-
postProcessingPass.updateOptions(pass[1]);
|
|
529
|
-
}
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
this.rawConfig = _objectSpread(_objectSpread({}, this.rawConfig), rest);
|
|
534
|
-
|
|
535
|
-
if (this.container) {
|
|
536
|
-
this.updateLayerConfig(this.rawConfig);
|
|
537
|
-
this.styleNeedUpdate = true;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
if (lastConfig && lastConfig.mask === true && options.mask === false) {
|
|
541
|
-
this.clearModels();
|
|
542
|
-
this.layerModel.buildModels(function (models) {
|
|
543
|
-
_this5.models = models;
|
|
544
|
-
});
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
return this;
|
|
383
|
+
} else {
|
|
384
|
+
this.scaleOptions[field] = cfg;
|
|
548
385
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
386
|
+
return this;
|
|
387
|
+
}
|
|
388
|
+
renderLayers() {
|
|
389
|
+
this.rendering = true;
|
|
390
|
+
this.layerService.renderLayers();
|
|
391
|
+
this.rendering = false;
|
|
392
|
+
}
|
|
393
|
+
render() {
|
|
394
|
+
if (this.tileLayer !== void 0) {
|
|
395
|
+
this.tileLayer.render();
|
|
558
396
|
return this;
|
|
559
397
|
}
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
value: function renderLayers() {
|
|
563
|
-
this.rendering = true;
|
|
564
|
-
this.layerService.renderLayers();
|
|
565
|
-
this.rendering = false;
|
|
398
|
+
if (this.getEncodedData() && this.getEncodedData().length !== 0) {
|
|
399
|
+
this.renderModels();
|
|
566
400
|
}
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
if (this.getEncodedData() && this.getEncodedData().length !== 0) {
|
|
401
|
+
return this;
|
|
402
|
+
}
|
|
403
|
+
async renderMultiPass() {
|
|
404
|
+
if (this.getEncodedData() && this.getEncodedData().length !== 0) {
|
|
405
|
+
if (this.multiPassRenderer && this.multiPassRenderer.getRenderFlag()) {
|
|
406
|
+
await this.multiPassRenderer.render();
|
|
407
|
+
} else if (this.multiPassRenderer) {
|
|
576
408
|
this.renderModels();
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
return this;
|
|
580
|
-
}
|
|
581
|
-
}, {
|
|
582
|
-
key: "renderMultiPass",
|
|
583
|
-
value: function () {
|
|
584
|
-
var _renderMultiPass = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee() {
|
|
585
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
586
|
-
while (1) {
|
|
587
|
-
switch (_context.prev = _context.next) {
|
|
588
|
-
case 0:
|
|
589
|
-
if (!(this.getEncodedData() && this.getEncodedData().length !== 0)) {
|
|
590
|
-
_context.next = 7;
|
|
591
|
-
break;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
if (!(this.multiPassRenderer && this.multiPassRenderer.getRenderFlag())) {
|
|
595
|
-
_context.next = 6;
|
|
596
|
-
break;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
_context.next = 4;
|
|
600
|
-
return this.multiPassRenderer.render();
|
|
601
|
-
|
|
602
|
-
case 4:
|
|
603
|
-
_context.next = 7;
|
|
604
|
-
break;
|
|
605
|
-
|
|
606
|
-
case 6:
|
|
607
|
-
if (this.multiPassRenderer) {
|
|
608
|
-
this.renderModels();
|
|
609
|
-
} else {
|
|
610
|
-
this.renderModels();
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
case 7:
|
|
614
|
-
case "end":
|
|
615
|
-
return _context.stop();
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
}, _callee, this);
|
|
619
|
-
}));
|
|
620
|
-
|
|
621
|
-
function renderMultiPass() {
|
|
622
|
-
return _renderMultiPass.apply(this, arguments);
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
return renderMultiPass;
|
|
626
|
-
}()
|
|
627
|
-
}, {
|
|
628
|
-
key: "active",
|
|
629
|
-
value: function active(options) {
|
|
630
|
-
var activeOption = {};
|
|
631
|
-
activeOption.enableHighlight = (0, _isObject2.default)(options) ? true : options;
|
|
632
|
-
|
|
633
|
-
if ((0, _isObject2.default)(options)) {
|
|
634
|
-
activeOption.enableHighlight = true;
|
|
635
|
-
|
|
636
|
-
if (options.color) {
|
|
637
|
-
activeOption.highlightColor = options.color;
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
if (options.mix) {
|
|
641
|
-
activeOption.activeMix = options.mix;
|
|
642
|
-
}
|
|
643
409
|
} else {
|
|
644
|
-
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
this.updateLayerConfig(activeOption);
|
|
648
|
-
return this;
|
|
649
|
-
}
|
|
650
|
-
}, {
|
|
651
|
-
key: "setActive",
|
|
652
|
-
value: function setActive(id, options) {
|
|
653
|
-
var _this6 = this;
|
|
654
|
-
|
|
655
|
-
if ((0, _isObject2.default)(id)) {
|
|
656
|
-
var _id$x = id.x,
|
|
657
|
-
x = _id$x === void 0 ? 0 : _id$x,
|
|
658
|
-
_id$y = id.y,
|
|
659
|
-
y = _id$y === void 0 ? 0 : _id$y;
|
|
660
|
-
this.updateLayerConfig({
|
|
661
|
-
highlightColor: (0, _isObject2.default)(options) ? options.color : this.getLayerConfig().highlightColor,
|
|
662
|
-
activeMix: (0, _isObject2.default)(options) ? options.mix : this.getLayerConfig().activeMix
|
|
663
|
-
});
|
|
664
|
-
this.pick({
|
|
665
|
-
x: x,
|
|
666
|
-
y: y
|
|
667
|
-
});
|
|
668
|
-
} else {
|
|
669
|
-
this.updateLayerConfig({
|
|
670
|
-
pickedFeatureID: id,
|
|
671
|
-
highlightColor: (0, _isObject2.default)(options) ? options.color : this.getLayerConfig().highlightColor,
|
|
672
|
-
activeMix: (0, _isObject2.default)(options) ? options.mix : this.getLayerConfig().activeMix
|
|
673
|
-
});
|
|
674
|
-
this.hooks.beforeSelect.call((0, _l7Utils.encodePickingColor)(id)).then(function () {
|
|
675
|
-
setTimeout(function () {
|
|
676
|
-
_this6.reRender();
|
|
677
|
-
}, 1);
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
}, {
|
|
682
|
-
key: "select",
|
|
683
|
-
value: function select(option) {
|
|
684
|
-
var activeOption = {};
|
|
685
|
-
activeOption.enableSelect = (0, _isObject2.default)(option) ? true : option;
|
|
686
|
-
|
|
687
|
-
if ((0, _isObject2.default)(option)) {
|
|
688
|
-
activeOption.enableSelect = true;
|
|
689
|
-
|
|
690
|
-
if (option.color) {
|
|
691
|
-
activeOption.selectColor = option.color;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
if (option.mix) {
|
|
695
|
-
activeOption.selectMix = option.mix;
|
|
696
|
-
}
|
|
697
|
-
} else {
|
|
698
|
-
activeOption.enableSelect = !!option;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
this.updateLayerConfig(activeOption);
|
|
702
|
-
return this;
|
|
703
|
-
}
|
|
704
|
-
}, {
|
|
705
|
-
key: "setSelect",
|
|
706
|
-
value: function setSelect(id, options) {
|
|
707
|
-
var _this7 = this;
|
|
708
|
-
|
|
709
|
-
if ((0, _isObject2.default)(id)) {
|
|
710
|
-
var _id$x2 = id.x,
|
|
711
|
-
x = _id$x2 === void 0 ? 0 : _id$x2,
|
|
712
|
-
_id$y2 = id.y,
|
|
713
|
-
y = _id$y2 === void 0 ? 0 : _id$y2;
|
|
714
|
-
this.updateLayerConfig({
|
|
715
|
-
selectColor: (0, _isObject2.default)(options) ? options.color : this.getLayerConfig().selectColor,
|
|
716
|
-
selectMix: (0, _isObject2.default)(options) ? options.mix : this.getLayerConfig().selectMix
|
|
717
|
-
});
|
|
718
|
-
this.pick({
|
|
719
|
-
x: x,
|
|
720
|
-
y: y
|
|
721
|
-
});
|
|
722
|
-
} else {
|
|
723
|
-
this.updateLayerConfig({
|
|
724
|
-
pickedFeatureID: id,
|
|
725
|
-
selectColor: (0, _isObject2.default)(options) ? options.color : this.getLayerConfig().selectColor,
|
|
726
|
-
selectMix: (0, _isObject2.default)(options) ? options.mix : this.getLayerConfig().selectMix
|
|
727
|
-
});
|
|
728
|
-
this.hooks.beforeSelect.call((0, _l7Utils.encodePickingColor)(id)).then(function () {
|
|
729
|
-
setTimeout(function () {
|
|
730
|
-
_this7.reRender();
|
|
731
|
-
}, 1);
|
|
732
|
-
});
|
|
410
|
+
this.renderModels();
|
|
733
411
|
}
|
|
734
412
|
}
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
|
|
413
|
+
}
|
|
414
|
+
active(options) {
|
|
415
|
+
const activeOption = {};
|
|
416
|
+
activeOption.enableHighlight = (0, import_lodash.isObject)(options) ? true : options;
|
|
417
|
+
if ((0, import_lodash.isObject)(options)) {
|
|
418
|
+
activeOption.enableHighlight = true;
|
|
419
|
+
if (options.color) {
|
|
420
|
+
activeOption.highlightColor = options.color;
|
|
421
|
+
}
|
|
422
|
+
if (options.mix) {
|
|
423
|
+
activeOption.activeMix = options.mix;
|
|
424
|
+
}
|
|
425
|
+
} else {
|
|
426
|
+
activeOption.enableHighlight = !!options;
|
|
427
|
+
}
|
|
428
|
+
this.updateLayerConfig(activeOption);
|
|
429
|
+
return this;
|
|
430
|
+
}
|
|
431
|
+
setActive(id, options) {
|
|
432
|
+
if ((0, import_lodash.isObject)(id)) {
|
|
433
|
+
const { x = 0, y = 0 } = id;
|
|
738
434
|
this.updateLayerConfig({
|
|
739
|
-
|
|
435
|
+
highlightColor: (0, import_lodash.isObject)(options) ? options.color : this.getLayerConfig().highlightColor,
|
|
436
|
+
activeMix: (0, import_lodash.isObject)(options) ? options.mix : this.getLayerConfig().activeMix
|
|
740
437
|
});
|
|
741
|
-
this.
|
|
742
|
-
|
|
743
|
-
return this;
|
|
744
|
-
}
|
|
745
|
-
}, {
|
|
746
|
-
key: "show",
|
|
747
|
-
value: function show() {
|
|
438
|
+
this.pick({ x, y });
|
|
439
|
+
} else {
|
|
748
440
|
this.updateLayerConfig({
|
|
749
|
-
|
|
441
|
+
pickedFeatureID: id,
|
|
442
|
+
highlightColor: (0, import_lodash.isObject)(options) ? options.color : this.getLayerConfig().highlightColor,
|
|
443
|
+
activeMix: (0, import_lodash.isObject)(options) ? options.mix : this.getLayerConfig().activeMix
|
|
750
444
|
});
|
|
751
|
-
this.
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
key: "hide",
|
|
756
|
-
value: function hide() {
|
|
757
|
-
if (this.type === 'CanvasLayer' && this.layerModel.clearCanvas) {
|
|
758
|
-
this.layerModel.clearCanvas();
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
this.updateLayerConfig({
|
|
762
|
-
visible: false
|
|
445
|
+
this.hooks.beforeSelect.call((0, import_l7_utils.encodePickingColor)(id)).then(() => {
|
|
446
|
+
setTimeout(() => {
|
|
447
|
+
this.reRender();
|
|
448
|
+
}, 1);
|
|
763
449
|
});
|
|
764
|
-
this.reRender();
|
|
765
|
-
return this;
|
|
766
|
-
}
|
|
767
|
-
}, {
|
|
768
|
-
key: "setIndex",
|
|
769
|
-
value: function setIndex(index) {
|
|
770
|
-
this.zIndex = index;
|
|
771
|
-
this.layerService.updateLayerRenderList();
|
|
772
|
-
this.layerService.renderLayers();
|
|
773
|
-
return this;
|
|
774
450
|
}
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
key: "isVisible",
|
|
797
|
-
value: function isVisible() {
|
|
798
|
-
var zoom = this.mapService.getZoom();
|
|
799
|
-
|
|
800
|
-
var _this$getLayerConfig3 = this.getLayerConfig(),
|
|
801
|
-
visible = _this$getLayerConfig3.visible,
|
|
802
|
-
_this$getLayerConfig4 = _this$getLayerConfig3.minZoom,
|
|
803
|
-
minZoom = _this$getLayerConfig4 === void 0 ? -Infinity : _this$getLayerConfig4,
|
|
804
|
-
_this$getLayerConfig5 = _this$getLayerConfig3.maxZoom,
|
|
805
|
-
maxZoom = _this$getLayerConfig5 === void 0 ? Infinity : _this$getLayerConfig5;
|
|
806
|
-
|
|
807
|
-
return !!visible && zoom >= minZoom && zoom <= maxZoom;
|
|
808
|
-
}
|
|
809
|
-
}, {
|
|
810
|
-
key: "setMultiPass",
|
|
811
|
-
value: function setMultiPass(enableMultiPass, currentPasses) {
|
|
451
|
+
}
|
|
452
|
+
select(option) {
|
|
453
|
+
const activeOption = {};
|
|
454
|
+
activeOption.enableSelect = (0, import_lodash.isObject)(option) ? true : option;
|
|
455
|
+
if ((0, import_lodash.isObject)(option)) {
|
|
456
|
+
activeOption.enableSelect = true;
|
|
457
|
+
if (option.color) {
|
|
458
|
+
activeOption.selectColor = option.color;
|
|
459
|
+
}
|
|
460
|
+
if (option.mix) {
|
|
461
|
+
activeOption.selectMix = option.mix;
|
|
462
|
+
}
|
|
463
|
+
} else {
|
|
464
|
+
activeOption.enableSelect = !!option;
|
|
465
|
+
}
|
|
466
|
+
this.updateLayerConfig(activeOption);
|
|
467
|
+
return this;
|
|
468
|
+
}
|
|
469
|
+
setSelect(id, options) {
|
|
470
|
+
if ((0, import_lodash.isObject)(id)) {
|
|
471
|
+
const { x = 0, y = 0 } = id;
|
|
812
472
|
this.updateLayerConfig({
|
|
813
|
-
|
|
473
|
+
selectColor: (0, import_lodash.isObject)(options) ? options.color : this.getLayerConfig().selectColor,
|
|
474
|
+
selectMix: (0, import_lodash.isObject)(options) ? options.mix : this.getLayerConfig().selectMix
|
|
814
475
|
});
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
this.updateLayerConfig({
|
|
818
|
-
passes: currentPasses
|
|
819
|
-
});
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
if (enableMultiPass) {
|
|
823
|
-
var _this$getLayerConfig6 = this.getLayerConfig(),
|
|
824
|
-
_this$getLayerConfig7 = _this$getLayerConfig6.passes,
|
|
825
|
-
passes = _this$getLayerConfig7 === void 0 ? [] : _this$getLayerConfig7;
|
|
826
|
-
|
|
827
|
-
this.multiPassRenderer = (0, _multiPassRender.createMultiPassRenderer)(this, passes, this.postProcessingPassFactory, this.normalPassFactory);
|
|
828
|
-
this.multiPassRenderer.setRenderFlag(true);
|
|
829
|
-
|
|
830
|
-
var _this$rendererService = this.rendererService.getViewportSize(),
|
|
831
|
-
width = _this$rendererService.width,
|
|
832
|
-
height = _this$rendererService.height;
|
|
833
|
-
|
|
834
|
-
this.multiPassRenderer.resize(width, height);
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
return this;
|
|
838
|
-
}
|
|
839
|
-
}, {
|
|
840
|
-
key: "setMinZoom",
|
|
841
|
-
value: function setMinZoom(minZoom) {
|
|
476
|
+
this.pick({ x, y });
|
|
477
|
+
} else {
|
|
842
478
|
this.updateLayerConfig({
|
|
843
|
-
|
|
479
|
+
pickedFeatureID: id,
|
|
480
|
+
selectColor: (0, import_lodash.isObject)(options) ? options.color : this.getLayerConfig().selectColor,
|
|
481
|
+
selectMix: (0, import_lodash.isObject)(options) ? options.mix : this.getLayerConfig().selectMix
|
|
482
|
+
});
|
|
483
|
+
this.hooks.beforeSelect.call((0, import_l7_utils.encodePickingColor)(id)).then(() => {
|
|
484
|
+
setTimeout(() => {
|
|
485
|
+
this.reRender();
|
|
486
|
+
}, 1);
|
|
844
487
|
});
|
|
845
|
-
return this;
|
|
846
|
-
}
|
|
847
|
-
}, {
|
|
848
|
-
key: "getMinZoom",
|
|
849
|
-
value: function getMinZoom() {
|
|
850
|
-
var _this$getLayerConfig8 = this.getLayerConfig(),
|
|
851
|
-
minZoom = _this$getLayerConfig8.minZoom;
|
|
852
|
-
|
|
853
|
-
return minZoom;
|
|
854
|
-
}
|
|
855
|
-
}, {
|
|
856
|
-
key: "getMaxZoom",
|
|
857
|
-
value: function getMaxZoom() {
|
|
858
|
-
var _this$getLayerConfig9 = this.getLayerConfig(),
|
|
859
|
-
maxZoom = _this$getLayerConfig9.maxZoom;
|
|
860
|
-
|
|
861
|
-
return maxZoom;
|
|
862
488
|
}
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
489
|
+
}
|
|
490
|
+
setBlend(type) {
|
|
491
|
+
this.updateLayerConfig({
|
|
492
|
+
blend: type
|
|
493
|
+
});
|
|
494
|
+
this.layerModelNeedUpdate = true;
|
|
495
|
+
this.reRender();
|
|
496
|
+
return this;
|
|
497
|
+
}
|
|
498
|
+
show() {
|
|
499
|
+
this.updateLayerConfig({
|
|
500
|
+
visible: true
|
|
501
|
+
});
|
|
502
|
+
this.reRender();
|
|
503
|
+
return this;
|
|
504
|
+
}
|
|
505
|
+
hide() {
|
|
506
|
+
if (this.type === "CanvasLayer" && this.layerModel.clearCanvas) {
|
|
507
|
+
this.layerModel.clearCanvas();
|
|
868
508
|
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
509
|
+
this.updateLayerConfig({
|
|
510
|
+
visible: false
|
|
511
|
+
});
|
|
512
|
+
this.reRender();
|
|
513
|
+
return this;
|
|
514
|
+
}
|
|
515
|
+
setIndex(index) {
|
|
516
|
+
this.zIndex = index;
|
|
517
|
+
this.layerService.updateLayerRenderList();
|
|
518
|
+
this.layerService.renderLayers();
|
|
519
|
+
return this;
|
|
520
|
+
}
|
|
521
|
+
setCurrentPickId(id) {
|
|
522
|
+
this.currentPickId = id;
|
|
523
|
+
}
|
|
524
|
+
getCurrentPickId() {
|
|
525
|
+
return this.currentPickId;
|
|
526
|
+
}
|
|
527
|
+
setCurrentSelectedId(id) {
|
|
528
|
+
this.selectedFeatureID = id;
|
|
529
|
+
}
|
|
530
|
+
getCurrentSelectedId() {
|
|
531
|
+
return this.selectedFeatureID;
|
|
532
|
+
}
|
|
533
|
+
isVisible() {
|
|
534
|
+
const zoom = this.mapService.getZoom();
|
|
535
|
+
const {
|
|
536
|
+
visible,
|
|
537
|
+
minZoom = -Infinity,
|
|
538
|
+
maxZoom = Infinity
|
|
539
|
+
} = this.getLayerConfig();
|
|
540
|
+
return !!visible && zoom >= minZoom && zoom <= maxZoom;
|
|
541
|
+
}
|
|
542
|
+
setMultiPass(enableMultiPass, currentPasses) {
|
|
543
|
+
this.updateLayerConfig({
|
|
544
|
+
enableMultiPassRenderer: enableMultiPass
|
|
545
|
+
});
|
|
546
|
+
if (currentPasses) {
|
|
872
547
|
this.updateLayerConfig({
|
|
873
|
-
|
|
548
|
+
passes: currentPasses
|
|
874
549
|
});
|
|
875
|
-
return this;
|
|
876
550
|
}
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
551
|
+
if (enableMultiPass) {
|
|
552
|
+
const { passes = [] } = this.getLayerConfig();
|
|
553
|
+
this.multiPassRenderer = (0, import_multiPassRender.createMultiPassRenderer)(this, passes, this.postProcessingPassFactory, this.normalPassFactory);
|
|
554
|
+
this.multiPassRenderer.setRenderFlag(true);
|
|
555
|
+
const { width, height } = this.rendererService.getViewportSize();
|
|
556
|
+
this.multiPassRenderer.resize(width, height);
|
|
557
|
+
}
|
|
558
|
+
return this;
|
|
559
|
+
}
|
|
560
|
+
setMinZoom(minZoom) {
|
|
561
|
+
this.updateLayerConfig({
|
|
562
|
+
minZoom
|
|
563
|
+
});
|
|
564
|
+
return this;
|
|
565
|
+
}
|
|
566
|
+
getMinZoom() {
|
|
567
|
+
const { minZoom } = this.getLayerConfig();
|
|
568
|
+
return minZoom;
|
|
569
|
+
}
|
|
570
|
+
getMaxZoom() {
|
|
571
|
+
const { maxZoom } = this.getLayerConfig();
|
|
572
|
+
return maxZoom;
|
|
573
|
+
}
|
|
574
|
+
get(name) {
|
|
575
|
+
const cfg = this.getLayerConfig();
|
|
576
|
+
return cfg[name];
|
|
577
|
+
}
|
|
578
|
+
setMaxZoom(maxZoom) {
|
|
579
|
+
this.updateLayerConfig({
|
|
580
|
+
maxZoom
|
|
581
|
+
});
|
|
582
|
+
return this;
|
|
583
|
+
}
|
|
584
|
+
setAutoFit(autoFit) {
|
|
585
|
+
this.updateLayerConfig({
|
|
586
|
+
autoFit
|
|
587
|
+
});
|
|
588
|
+
return this;
|
|
589
|
+
}
|
|
590
|
+
fitBounds(fitBoundsOptions) {
|
|
591
|
+
if (!this.inited) {
|
|
880
592
|
this.updateLayerConfig({
|
|
881
|
-
autoFit:
|
|
593
|
+
autoFit: true
|
|
882
594
|
});
|
|
883
595
|
return this;
|
|
884
596
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
this.updateLayerConfig({
|
|
890
|
-
autoFit: true
|
|
891
|
-
});
|
|
892
|
-
return this;
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
var source = this.getSource();
|
|
896
|
-
var extent = source.extent;
|
|
897
|
-
var isValid = extent.some(function (v) {
|
|
898
|
-
return Math.abs(v) === Infinity;
|
|
899
|
-
});
|
|
900
|
-
|
|
901
|
-
if (isValid) {
|
|
902
|
-
return this;
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
this.mapService.fitBounds([[extent[0], extent[1]], [extent[2], extent[3]]], fitBoundsOptions);
|
|
597
|
+
const source = this.getSource();
|
|
598
|
+
const extent = source.extent;
|
|
599
|
+
const isValid = extent.some((v) => Math.abs(v) === Infinity);
|
|
600
|
+
if (isValid) {
|
|
906
601
|
return this;
|
|
907
602
|
}
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
this.
|
|
957
|
-
return model.destroy();
|
|
958
|
-
});
|
|
959
|
-
(_this$layerModel3 = this.layerModel) === null || _this$layerModel3 === void 0 ? void 0 : _this$layerModel3.clearModels();
|
|
960
|
-
this.models = [];
|
|
961
|
-
}
|
|
962
|
-
}, {
|
|
963
|
-
key: "isDirty",
|
|
964
|
-
value: function isDirty() {
|
|
965
|
-
return !!(this.styleAttributeService.getLayerStyleAttributes() || []).filter(function (attribute) {
|
|
966
|
-
return attribute.needRescale || attribute.needRemapping || attribute.needRegenerateVertices;
|
|
967
|
-
}).length;
|
|
968
|
-
}
|
|
969
|
-
}, {
|
|
970
|
-
key: "setSource",
|
|
971
|
-
value: function setSource(source) {
|
|
972
|
-
var _this8 = this;
|
|
973
|
-
|
|
974
|
-
if (this.layerSource) {
|
|
975
|
-
this.layerSource.off('sourceUpdate', this.sourceEvent);
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
this.layerSource = source;
|
|
979
|
-
this.clusterZoom = 0;
|
|
980
|
-
|
|
981
|
-
if (this.inited && this.layerSource.cluster) {
|
|
982
|
-
var zoom = this.mapService.getZoom();
|
|
983
|
-
this.layerSource.updateClusterData(zoom);
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
if (this.layerSource.inited) {
|
|
987
|
-
this.sourceEvent();
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
this.layerSource.on('sourceUpdate', function () {
|
|
991
|
-
_this8.sourceEvent();
|
|
992
|
-
});
|
|
993
|
-
}
|
|
994
|
-
}, {
|
|
995
|
-
key: "getSource",
|
|
996
|
-
value: function getSource() {
|
|
997
|
-
return this.layerSource;
|
|
998
|
-
}
|
|
999
|
-
}, {
|
|
1000
|
-
key: "getScaleOptions",
|
|
1001
|
-
value: function getScaleOptions() {
|
|
1002
|
-
return this.scaleOptions;
|
|
1003
|
-
}
|
|
1004
|
-
}, {
|
|
1005
|
-
key: "setEncodedData",
|
|
1006
|
-
value: function setEncodedData(encodedData) {
|
|
1007
|
-
this.encodedData = encodedData;
|
|
603
|
+
this.mapService.fitBounds([
|
|
604
|
+
[extent[0], extent[1]],
|
|
605
|
+
[extent[2], extent[3]]
|
|
606
|
+
], fitBoundsOptions);
|
|
607
|
+
return this;
|
|
608
|
+
}
|
|
609
|
+
destroy(refresh = true) {
|
|
610
|
+
var _a;
|
|
611
|
+
if (this.isDestroied) {
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
this.layerChildren.map((child) => child.destroy());
|
|
615
|
+
this.layerChildren = [];
|
|
616
|
+
this.masks.map((mask) => mask.destroy());
|
|
617
|
+
this.masks = [];
|
|
618
|
+
this.hooks.beforeDestroy.call();
|
|
619
|
+
this.layerSource.off("sourceUpdate", this.sourceEvent);
|
|
620
|
+
this.multiPassRenderer.destroy();
|
|
621
|
+
this.styleAttributeService.clearAllAttributes();
|
|
622
|
+
this.hooks.afterDestroy.call();
|
|
623
|
+
(_a = this.layerModel) == null ? void 0 : _a.clearModels();
|
|
624
|
+
this.models = [];
|
|
625
|
+
this.layerService.cleanRemove(this, refresh);
|
|
626
|
+
this.emit("remove", {
|
|
627
|
+
target: this,
|
|
628
|
+
type: "remove"
|
|
629
|
+
});
|
|
630
|
+
this.emit("destroy", {
|
|
631
|
+
target: this,
|
|
632
|
+
type: "destroy"
|
|
633
|
+
});
|
|
634
|
+
this.removeAllListeners();
|
|
635
|
+
this.isDestroied = true;
|
|
636
|
+
}
|
|
637
|
+
clear() {
|
|
638
|
+
this.styleAttributeService.clearAllAttributes();
|
|
639
|
+
}
|
|
640
|
+
clearModels() {
|
|
641
|
+
var _a;
|
|
642
|
+
this.models.forEach((model) => model.destroy());
|
|
643
|
+
(_a = this.layerModel) == null ? void 0 : _a.clearModels();
|
|
644
|
+
this.models = [];
|
|
645
|
+
}
|
|
646
|
+
isDirty() {
|
|
647
|
+
return !!(this.styleAttributeService.getLayerStyleAttributes() || []).filter((attribute) => attribute.needRescale || attribute.needRemapping || attribute.needRegenerateVertices).length;
|
|
648
|
+
}
|
|
649
|
+
setSource(source) {
|
|
650
|
+
if (this.layerSource) {
|
|
651
|
+
this.layerSource.off("sourceUpdate", this.sourceEvent);
|
|
1008
652
|
}
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
653
|
+
this.layerSource = source;
|
|
654
|
+
this.clusterZoom = 0;
|
|
655
|
+
if (this.inited && this.layerSource.cluster) {
|
|
656
|
+
const zoom = this.mapService.getZoom();
|
|
657
|
+
this.layerSource.updateClusterData(zoom);
|
|
1013
658
|
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
value: function getScale(name) {
|
|
1017
|
-
return this.styleAttributeService.getLayerAttributeScale(name);
|
|
659
|
+
if (this.layerSource.inited) {
|
|
660
|
+
this.sourceEvent();
|
|
1018
661
|
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
return _items;
|
|
1043
|
-
} else if (scale !== null && scale !== void 0 && scale.domain) {
|
|
1044
|
-
var _items2 = scale.domain().filter(function (item) {
|
|
1045
|
-
return !(0, _isUndefined2.default)(item);
|
|
1046
|
-
}).map(function (item) {
|
|
1047
|
-
return (0, _defineProperty2.default)({
|
|
1048
|
-
value: item
|
|
1049
|
-
}, name, scale(item));
|
|
1050
|
-
});
|
|
1051
|
-
|
|
1052
|
-
return _items2;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
662
|
+
this.layerSource.on("sourceUpdate", () => {
|
|
663
|
+
this.sourceEvent();
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
getSource() {
|
|
667
|
+
return this.layerSource;
|
|
668
|
+
}
|
|
669
|
+
getScaleOptions() {
|
|
670
|
+
return this.scaleOptions;
|
|
671
|
+
}
|
|
672
|
+
setEncodedData(encodedData) {
|
|
673
|
+
this.encodedData = encodedData;
|
|
674
|
+
}
|
|
675
|
+
getEncodedData() {
|
|
676
|
+
return this.encodedData;
|
|
677
|
+
}
|
|
678
|
+
getScale(name) {
|
|
679
|
+
return this.styleAttributeService.getLayerAttributeScale(name);
|
|
680
|
+
}
|
|
681
|
+
getLegendItems(name) {
|
|
682
|
+
const scale = this.styleAttributeService.getLayerAttributeScale(name);
|
|
683
|
+
if (!scale) {
|
|
1055
684
|
return [];
|
|
1056
685
|
}
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
x: x,
|
|
1064
|
-
y: y
|
|
686
|
+
if (scale.invertExtent) {
|
|
687
|
+
const items = scale.range().map((item) => {
|
|
688
|
+
return {
|
|
689
|
+
value: scale.invertExtent(item),
|
|
690
|
+
[name]: item
|
|
691
|
+
};
|
|
1065
692
|
});
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
key: "buildLayerModel",
|
|
1074
|
-
value: function buildLayerModel(options) {
|
|
1075
|
-
var _this9 = this;
|
|
1076
|
-
|
|
1077
|
-
var moduleName = options.moduleName,
|
|
1078
|
-
vertexShader = options.vertexShader,
|
|
1079
|
-
fragmentShader = options.fragmentShader,
|
|
1080
|
-
triangulation = options.triangulation,
|
|
1081
|
-
segmentNumber = options.segmentNumber,
|
|
1082
|
-
_options$workerEnable = options.workerEnabled,
|
|
1083
|
-
workerEnabled = _options$workerEnable === void 0 ? false : _options$workerEnable,
|
|
1084
|
-
workerOptions = options.workerOptions,
|
|
1085
|
-
rest = (0, _objectWithoutProperties2.default)(options, _excluded2);
|
|
1086
|
-
this.shaderModuleService.registerModule(moduleName, {
|
|
1087
|
-
vs: vertexShader,
|
|
1088
|
-
fs: fragmentShader
|
|
693
|
+
return items;
|
|
694
|
+
} else if (scale.ticks) {
|
|
695
|
+
const items = scale.ticks().map((item) => {
|
|
696
|
+
return {
|
|
697
|
+
value: item,
|
|
698
|
+
[name]: scale(item)
|
|
699
|
+
};
|
|
1089
700
|
});
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
701
|
+
return items;
|
|
702
|
+
} else if (scale == null ? void 0 : scale.domain) {
|
|
703
|
+
const items = scale.domain().filter((item) => !(0, import_lodash.isUndefined)(item)).map((item) => {
|
|
704
|
+
return {
|
|
705
|
+
value: item,
|
|
706
|
+
[name]: scale(item)
|
|
707
|
+
};
|
|
708
|
+
});
|
|
709
|
+
return items;
|
|
710
|
+
}
|
|
711
|
+
return [];
|
|
712
|
+
}
|
|
713
|
+
pick({ x, y }) {
|
|
714
|
+
this.interactionService.triggerHover({ x, y });
|
|
715
|
+
}
|
|
716
|
+
boxSelect(box, cb) {
|
|
717
|
+
this.pickingService.boxPickLayer(this, box, cb);
|
|
718
|
+
}
|
|
719
|
+
buildLayerModel(options) {
|
|
720
|
+
const {
|
|
721
|
+
moduleName,
|
|
722
|
+
vertexShader,
|
|
723
|
+
fragmentShader,
|
|
724
|
+
triangulation,
|
|
725
|
+
segmentNumber,
|
|
726
|
+
workerEnabled = false,
|
|
727
|
+
workerOptions,
|
|
728
|
+
...rest
|
|
729
|
+
} = options;
|
|
730
|
+
this.shaderModuleService.registerModule(moduleName, {
|
|
731
|
+
vs: vertexShader,
|
|
732
|
+
fs: fragmentShader
|
|
733
|
+
});
|
|
734
|
+
const { vs, fs, uniforms } = this.shaderModuleService.getModule(moduleName);
|
|
735
|
+
const { createModel } = this.rendererService;
|
|
736
|
+
return new Promise((resolve, reject) => {
|
|
737
|
+
if (workerOptions && workerOptions.modelType in import_l7_utils.WorkerSourceMap && workerEnabled) {
|
|
738
|
+
this.styleAttributeService.createAttributesAndIndicesAscy(this.encodedData, segmentNumber, workerOptions).then(({ attributes, elements }) => {
|
|
739
|
+
const m = createModel({
|
|
740
|
+
attributes,
|
|
741
|
+
uniforms,
|
|
742
|
+
fs,
|
|
743
|
+
vs,
|
|
744
|
+
elements,
|
|
745
|
+
blend: import_blend.BlendTypes[import_l7_core.BlendType.normal],
|
|
746
|
+
...rest
|
|
1113
747
|
});
|
|
1114
|
-
} else {
|
|
1115
|
-
var _this9$styleAttribute = _this9.styleAttributeService.createAttributesAndIndices(_this9.encodedData, triangulation, segmentNumber),
|
|
1116
|
-
attributes = _this9$styleAttribute.attributes,
|
|
1117
|
-
elements = _this9$styleAttribute.elements;
|
|
1118
|
-
|
|
1119
|
-
var m = createModel(_objectSpread({
|
|
1120
|
-
attributes: attributes,
|
|
1121
|
-
uniforms: uniforms,
|
|
1122
|
-
fs: fs,
|
|
1123
|
-
vs: vs,
|
|
1124
|
-
elements: elements,
|
|
1125
|
-
blend: _blend.BlendTypes[_l7Core.BlendType.normal]
|
|
1126
|
-
}, rest));
|
|
1127
748
|
resolve(m);
|
|
749
|
+
}).catch((err) => reject(err));
|
|
750
|
+
} else {
|
|
751
|
+
const {
|
|
752
|
+
attributes,
|
|
753
|
+
elements
|
|
754
|
+
} = this.styleAttributeService.createAttributesAndIndices(this.encodedData, triangulation, segmentNumber);
|
|
755
|
+
const m = createModel({
|
|
756
|
+
attributes,
|
|
757
|
+
uniforms,
|
|
758
|
+
fs,
|
|
759
|
+
vs,
|
|
760
|
+
elements,
|
|
761
|
+
blend: import_blend.BlendTypes[import_l7_core.BlendType.normal],
|
|
762
|
+
...rest
|
|
763
|
+
});
|
|
764
|
+
resolve(m);
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
createAttrubutes(options) {
|
|
769
|
+
const { triangulation } = options;
|
|
770
|
+
const { attributes } = this.styleAttributeService.createAttributes(this.encodedData, triangulation);
|
|
771
|
+
return attributes;
|
|
772
|
+
}
|
|
773
|
+
getTime() {
|
|
774
|
+
return this.layerService.clock.getDelta();
|
|
775
|
+
}
|
|
776
|
+
setAnimateStartTime() {
|
|
777
|
+
this.animateStartTime = this.layerService.clock.getElapsedTime();
|
|
778
|
+
}
|
|
779
|
+
stopAnimate() {
|
|
780
|
+
if (this.aniamateStatus) {
|
|
781
|
+
this.layerService.stopAnimate();
|
|
782
|
+
this.aniamateStatus = false;
|
|
783
|
+
this.updateLayerConfig({
|
|
784
|
+
animateOption: {
|
|
785
|
+
enable: false
|
|
1128
786
|
}
|
|
1129
787
|
});
|
|
1130
788
|
}
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
789
|
+
}
|
|
790
|
+
getLayerAnimateTime() {
|
|
791
|
+
return this.layerService.clock.getElapsedTime() - this.animateStartTime;
|
|
792
|
+
}
|
|
793
|
+
needPick(type) {
|
|
794
|
+
const {
|
|
795
|
+
enableHighlight = true,
|
|
796
|
+
enableSelect = true
|
|
797
|
+
} = this.getLayerConfig();
|
|
798
|
+
let isPick = this.eventNames().indexOf(type) !== -1 || this.eventNames().indexOf("un" + type) !== -1;
|
|
799
|
+
if ((type === "click" || type === "dblclick") && enableSelect) {
|
|
800
|
+
isPick = true;
|
|
801
|
+
}
|
|
802
|
+
if (type === "mousemove" && (enableHighlight || this.eventNames().indexOf("mouseenter") !== -1 || this.eventNames().indexOf("unmousemove") !== -1 || this.eventNames().indexOf("mouseout") !== -1)) {
|
|
803
|
+
isPick = true;
|
|
804
|
+
}
|
|
805
|
+
return this.isVisible() && isPick;
|
|
806
|
+
}
|
|
807
|
+
buildModels() {
|
|
808
|
+
throw new Error("Method not implemented.");
|
|
809
|
+
}
|
|
810
|
+
rebuildModels() {
|
|
811
|
+
throw new Error("Method not implemented.");
|
|
812
|
+
}
|
|
813
|
+
async renderMulPass(multiPassRenderer) {
|
|
814
|
+
await multiPassRenderer.render();
|
|
815
|
+
}
|
|
816
|
+
renderModels(isPicking) {
|
|
817
|
+
var _a;
|
|
818
|
+
if (this.getEncodedData() && this.getEncodedData().length > 0) {
|
|
819
|
+
if (this.layerModelNeedUpdate && this.layerModel) {
|
|
820
|
+
this.layerModel.buildModels((models) => {
|
|
821
|
+
this.models = models;
|
|
822
|
+
this.hooks.beforeRender.call();
|
|
823
|
+
this.layerModelNeedUpdate = false;
|
|
1161
824
|
});
|
|
1162
825
|
}
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
key: "getLayerAnimateTime",
|
|
1166
|
-
value: function getLayerAnimateTime() {
|
|
1167
|
-
return this.layerService.clock.getElapsedTime() - this.animateStartTime;
|
|
1168
|
-
}
|
|
1169
|
-
}, {
|
|
1170
|
-
key: "needPick",
|
|
1171
|
-
value: function needPick(type) {
|
|
1172
|
-
var _this$getLayerConfig10 = this.getLayerConfig(),
|
|
1173
|
-
_this$getLayerConfig11 = _this$getLayerConfig10.enableHighlight,
|
|
1174
|
-
enableHighlight = _this$getLayerConfig11 === void 0 ? true : _this$getLayerConfig11,
|
|
1175
|
-
_this$getLayerConfig12 = _this$getLayerConfig10.enableSelect,
|
|
1176
|
-
enableSelect = _this$getLayerConfig12 === void 0 ? true : _this$getLayerConfig12;
|
|
1177
|
-
|
|
1178
|
-
var isPick = this.eventNames().indexOf(type) !== -1 || this.eventNames().indexOf('un' + type) !== -1;
|
|
1179
|
-
|
|
1180
|
-
if ((type === 'click' || type === 'dblclick') && enableSelect) {
|
|
1181
|
-
isPick = true;
|
|
826
|
+
if ((_a = this == null ? void 0 : this.layerModel) == null ? void 0 : _a.renderUpdate) {
|
|
827
|
+
this.layerModel.renderUpdate();
|
|
1182
828
|
}
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
return this.isVisible() && isPick;
|
|
1189
|
-
}
|
|
1190
|
-
}, {
|
|
1191
|
-
key: "buildModels",
|
|
1192
|
-
value: function buildModels() {
|
|
1193
|
-
throw new Error('Method not implemented.');
|
|
1194
|
-
}
|
|
1195
|
-
}, {
|
|
1196
|
-
key: "rebuildModels",
|
|
1197
|
-
value: function rebuildModels() {
|
|
1198
|
-
throw new Error('Method not implemented.');
|
|
829
|
+
this.models.forEach((model) => {
|
|
830
|
+
model.draw({
|
|
831
|
+
uniforms: this.layerModel.getUninforms()
|
|
832
|
+
}, isPicking);
|
|
833
|
+
});
|
|
1199
834
|
}
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
}
|
|
1216
|
-
}, _callee2);
|
|
1217
|
-
}));
|
|
1218
|
-
|
|
1219
|
-
function renderMulPass(_x) {
|
|
1220
|
-
return _renderMulPass.apply(this, arguments);
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
return renderMulPass;
|
|
1224
|
-
}()
|
|
1225
|
-
}, {
|
|
1226
|
-
key: "renderModels",
|
|
1227
|
-
value: function renderModels(isPicking) {
|
|
1228
|
-
var _this10 = this;
|
|
1229
|
-
|
|
1230
|
-
if (this.getEncodedData() && this.getEncodedData().length > 0) {
|
|
1231
|
-
var _this$layerModel4;
|
|
1232
|
-
|
|
1233
|
-
if (this.layerModelNeedUpdate && this.layerModel) {
|
|
1234
|
-
this.layerModel.buildModels(function (models) {
|
|
1235
|
-
_this10.models = models;
|
|
1236
|
-
|
|
1237
|
-
_this10.hooks.beforeRender.call();
|
|
1238
|
-
|
|
1239
|
-
_this10.layerModelNeedUpdate = false;
|
|
1240
|
-
});
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
if (this !== null && this !== void 0 && (_this$layerModel4 = this.layerModel) !== null && _this$layerModel4 !== void 0 && _this$layerModel4.renderUpdate) {
|
|
1244
|
-
this.layerModel.renderUpdate();
|
|
835
|
+
return this;
|
|
836
|
+
}
|
|
837
|
+
updateStyleAttribute(type, field, values, updateOptions) {
|
|
838
|
+
if (!this.inited) {
|
|
839
|
+
this.pendingStyleAttributes.push({
|
|
840
|
+
attributeName: type,
|
|
841
|
+
attributeField: field,
|
|
842
|
+
attributeValues: values,
|
|
843
|
+
updateOptions
|
|
844
|
+
});
|
|
845
|
+
} else {
|
|
846
|
+
this.styleAttributeService.updateStyleAttribute(type, {
|
|
847
|
+
scale: {
|
|
848
|
+
field,
|
|
849
|
+
...this.splitValuesAndCallbackInAttribute(values, this.getLayerConfig()[field])
|
|
1245
850
|
}
|
|
1246
|
-
|
|
1247
|
-
this.models.forEach(function (model) {
|
|
1248
|
-
model.draw({
|
|
1249
|
-
uniforms: _this10.layerModel.getUninforms()
|
|
1250
|
-
}, isPicking);
|
|
1251
|
-
});
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
return this;
|
|
1255
|
-
}
|
|
1256
|
-
}, {
|
|
1257
|
-
key: "updateStyleAttribute",
|
|
1258
|
-
value: function updateStyleAttribute(type, field, values, updateOptions) {
|
|
1259
|
-
if (!this.inited) {
|
|
1260
|
-
this.pendingStyleAttributes.push({
|
|
1261
|
-
attributeName: type,
|
|
1262
|
-
attributeField: field,
|
|
1263
|
-
attributeValues: values,
|
|
1264
|
-
updateOptions: updateOptions
|
|
1265
|
-
});
|
|
1266
|
-
} else {
|
|
1267
|
-
this.styleAttributeService.updateStyleAttribute(type, {
|
|
1268
|
-
scale: _objectSpread({
|
|
1269
|
-
field: field
|
|
1270
|
-
}, this.splitValuesAndCallbackInAttribute(values, this.getLayerConfig()[field]))
|
|
1271
|
-
}, updateOptions);
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
}, {
|
|
1275
|
-
key: "getShaderPickStat",
|
|
1276
|
-
value: function getShaderPickStat() {
|
|
1277
|
-
return this.layerService.getShaderPickStat();
|
|
1278
|
-
}
|
|
1279
|
-
}, {
|
|
1280
|
-
key: "setEarthTime",
|
|
1281
|
-
value: function setEarthTime(time) {
|
|
1282
|
-
console.warn('empty fn');
|
|
1283
|
-
}
|
|
1284
|
-
}, {
|
|
1285
|
-
key: "getConfigSchema",
|
|
1286
|
-
value: function getConfigSchema() {
|
|
1287
|
-
throw new Error('Method not implemented.');
|
|
1288
|
-
}
|
|
1289
|
-
}, {
|
|
1290
|
-
key: "getModelType",
|
|
1291
|
-
value: function getModelType() {
|
|
1292
|
-
throw new Error('Method not implemented.');
|
|
1293
|
-
}
|
|
1294
|
-
}, {
|
|
1295
|
-
key: "getDefaultConfig",
|
|
1296
|
-
value: function getDefaultConfig() {
|
|
1297
|
-
return {};
|
|
851
|
+
}, updateOptions);
|
|
1298
852
|
}
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
853
|
+
}
|
|
854
|
+
getShaderPickStat() {
|
|
855
|
+
return this.layerService.getShaderPickStat();
|
|
856
|
+
}
|
|
857
|
+
setEarthTime(time) {
|
|
858
|
+
console.warn("empty fn");
|
|
859
|
+
}
|
|
860
|
+
getConfigSchema() {
|
|
861
|
+
throw new Error("Method not implemented.");
|
|
862
|
+
}
|
|
863
|
+
getModelType() {
|
|
864
|
+
throw new Error("Method not implemented.");
|
|
865
|
+
}
|
|
866
|
+
getDefaultConfig() {
|
|
867
|
+
return {};
|
|
868
|
+
}
|
|
869
|
+
reRender() {
|
|
870
|
+
if (this.inited) {
|
|
871
|
+
this.layerService.updateLayerRenderList();
|
|
872
|
+
this.layerService.renderLayers();
|
|
1314
873
|
}
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
|
|
874
|
+
}
|
|
875
|
+
splitValuesAndCallbackInAttribute(valuesOrCallback, defaultValues) {
|
|
876
|
+
return {
|
|
877
|
+
values: (0, import_lodash.isFunction)(valuesOrCallback) ? void 0 : valuesOrCallback || defaultValues,
|
|
878
|
+
callback: (0, import_lodash.isFunction)(valuesOrCallback) ? valuesOrCallback : void 0
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
};
|
|
882
|
+
__decorateClass([
|
|
883
|
+
(0, import_l7_core.lazyInject)(import_l7_core.TYPES.IGlobalConfigService)
|
|
884
|
+
], BaseLayer.prototype, "configService", 2);
|
|
885
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
886
|
+
0 && (module.exports = {});
|