@arcgis/core 4.23.0-next.20220131 → 4.23.0-next.20220205
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/Graphic.js +1 -1
- package/TimeExtent.js +1 -1
- package/assets/components/assets/calcite-date-picker/nls/pt-BR.json +31 -0
- package/assets/components/assets/calcite-date-picker/nls/pt-PT.json +3 -3
- package/assets/components/assets/calcite-icon/clipboard16.json +1 -0
- package/assets/components/assets/calcite-icon/clipboard24.json +1 -0
- package/assets/components/assets/calcite-icon/clipboard32.json +1 -0
- package/assets/components/assets/calcite-icon/folders16.json +1 -0
- package/assets/components/assets/calcite-icon/folders24.json +1 -0
- package/assets/components/assets/calcite-icon/folders32.json +1 -0
- package/assets/components/assets/calcite-icon/initiative16.json +1 -0
- package/assets/components/assets/calcite-icon/initiative24.json +1 -0
- package/assets/components/assets/calcite-icon/initiative32.json +1 -0
- package/assets/components/assets/calcite-icon/initiativeTemplate16.json +1 -0
- package/assets/components/assets/calcite-icon/initiativeTemplate24.json +1 -0
- package/assets/components/assets/calcite-icon/initiativeTemplate32.json +1 -0
- package/assets/components/assets/calcite-icon/multipleVariables16.json +1 -0
- package/assets/components/assets/calcite-icon/multipleVariables24.json +1 -0
- package/assets/components/assets/calcite-icon/multipleVariables32.json +1 -0
- package/assets/components/assets/calcite-icon/paletteCheck16.json +1 -0
- package/assets/components/assets/calcite-icon/paletteCheck24.json +1 -0
- package/assets/components/assets/calcite-icon/paletteCheck32.json +1 -0
- package/assets/components/assets/calcite-icon/pentagon16.json +1 -0
- package/assets/components/assets/calcite-icon/pentagon24.json +1 -0
- package/assets/components/assets/calcite-icon/pentagon32.json +1 -0
- package/assets/components/assets/calcite-icon/puzzlePiece16.json +1 -0
- package/assets/components/assets/calcite-icon/puzzlePiece24.json +1 -0
- package/assets/components/assets/calcite-icon/puzzlePiece32.json +1 -0
- package/assets/components/assets/calcite-icon/ribbonRosette16.json +1 -0
- package/assets/components/assets/calcite-icon/ribbonRosette24.json +1 -0
- package/assets/components/assets/calcite-icon/ribbonRosette32.json +1 -0
- package/assets/components/assets/calcite-icon/speechBubbleExclamation16.json +1 -0
- package/assets/components/assets/calcite-icon/speechBubbleExclamation24.json +1 -0
- package/assets/components/assets/calcite-icon/speechBubbleExclamation32.json +1 -0
- package/assets/components/assets/calcite-icon/survey16.json +1 -0
- package/assets/components/assets/calcite-icon/survey24.json +1 -0
- package/assets/components/assets/calcite-icon/survey32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{7a5f5acfbd4ca1a5c1f3.js → 06116433eb6e669f146b.js} +1 -1
- package/assets/esri/core/workers/chunks/0a4401a148c3cb73d6ff.js +1 -0
- package/assets/esri/core/workers/chunks/{83d00afae4406ec78bc9.js → 0c6be307709523eb8a05.js} +1 -1
- package/assets/esri/core/workers/chunks/{e0c8d61c7a85ce15499a.js → 0d9adefd00c44585be2e.js} +1 -1
- package/assets/esri/core/workers/chunks/{44f0c3663b293afbd172.js → 0e09691edb44641de5f0.js} +1 -1
- package/assets/esri/core/workers/chunks/0e215fa28a0448169132.js +1 -0
- package/assets/esri/core/workers/chunks/{391e96192d1ec4e55ce2.js → 101b4f02f0572afb666f.js} +1 -1
- package/assets/esri/core/workers/chunks/{db3c729ce0c0b2690dc9.js → 1180ffd523c6292bc04e.js} +1 -1
- package/assets/esri/core/workers/chunks/{826c983100569586b61f.js → 1571e8213feb518ff100.js} +1 -1
- package/assets/esri/core/workers/chunks/{929c9b7cdab7c4ca3d87.js → 17c51f5a13f471e6656a.js} +1 -1
- package/assets/esri/core/workers/chunks/{37c03cfc19086ce631c6.js → 18a8b9e2f6bd89827189.js} +1 -1
- package/assets/esri/core/workers/chunks/{ed0bcc66fb1e0ee75a4b.js → 1f34957ef42e5b5977d0.js} +1 -1
- package/assets/esri/core/workers/chunks/236de5f0476f6080ee62.js +1 -0
- package/assets/esri/core/workers/chunks/288ca064cd0472439276.js +1 -0
- package/assets/esri/core/workers/chunks/29aa6046534a43d7ce19.js +1 -0
- package/assets/esri/core/workers/chunks/2e1291cd831592216446.js +1 -0
- package/assets/esri/core/workers/chunks/{68a59ce98177d8513337.js → 3403cb53e4e60923c5fc.js} +1 -1
- package/assets/esri/core/workers/chunks/34bed896b68993cabaa1.js +1 -0
- package/assets/esri/core/workers/chunks/{99619fcb772807c74f3b.js → 444829a840b8ded16fd7.js} +1 -1
- package/assets/esri/core/workers/chunks/467b5faa1c90d9821609.js +1 -0
- package/assets/esri/core/workers/chunks/49353182a16218a84251.js +1 -0
- package/assets/esri/core/workers/chunks/{fc046a15466c25d081ff.js → 4a2e93b12d60e8d92491.js} +1 -1
- package/assets/esri/core/workers/chunks/4de996ebc432f5e149bc.js +1 -0
- package/assets/esri/core/workers/chunks/50976921acf7bd636123.js +1 -0
- package/assets/esri/core/workers/chunks/5144ef135e0deb48c7bf.js +1 -0
- package/assets/esri/core/workers/chunks/584bbb675ed225f68171.js +1 -0
- package/assets/esri/core/workers/chunks/5a90d121ba79613cc2aa.js +1 -0
- package/assets/esri/core/workers/chunks/5b286f3f3deea10bdd91.js +1 -0
- package/assets/esri/core/workers/chunks/{0463ba46df855a92b9c0.js → 65ccd204ec3053687a77.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f8c6a179e39fd4c5e6f.js → 6a2b8d6a9bada45ab66d.js} +1 -1
- package/assets/esri/core/workers/chunks/6be326edd9829781d926.js +1 -0
- package/assets/esri/core/workers/chunks/6ea99a6e21b09674f6b3.js +1 -0
- package/assets/esri/core/workers/chunks/{5bcb3240b3c005e5fe72.js → 7215af7810d15e89aa5a.js} +1 -1
- package/assets/esri/core/workers/chunks/7509c1693ffedc0fa018.js +1 -0
- package/assets/esri/core/workers/chunks/7b0b75878370b3475fe5.js +1 -0
- package/assets/esri/core/workers/chunks/{bfedd6ebff817c9b31c0.js → 7b618c449d793aacd874.js} +1 -1
- package/assets/esri/core/workers/chunks/{2460f3b6ada6ae900dec.js → 7c0ff01f081c7e9050d2.js} +1 -1
- package/assets/esri/core/workers/chunks/806a7db0084214a53c79.js +1 -0
- package/assets/esri/core/workers/chunks/{8fa0a14165d43ffe87a5.js → 8325b577f52936f86cff.js} +1 -1
- package/assets/esri/core/workers/chunks/84d8e77d78d0d5134083.js +1 -0
- package/assets/esri/core/workers/chunks/{dd13772a5e2eccc6a2bc.js → 8598f762f15ca68d52b7.js} +1 -1
- package/assets/esri/core/workers/chunks/85b1ae51da3689bccf92.js +1 -0
- package/assets/esri/core/workers/chunks/873b0cbd343dc71755ed.js +1 -0
- package/assets/esri/core/workers/chunks/8804b8489eeab888275b.js +1 -0
- package/assets/esri/core/workers/chunks/{5ec98f4ddac707d0fbd1.js → 88815d533808aabb1fa9.js} +1 -1
- package/assets/esri/core/workers/chunks/8c8c0ecdf44fdbb56000.js +1 -0
- package/assets/esri/core/workers/chunks/{f2124f4d0f2b8a91f0ea.js → 90c5edcd8a609224ce55.js} +1 -1
- package/assets/esri/core/workers/chunks/{bac9fc90e6756e211160.js → 94d9951509c0db09547a.js} +1 -1
- package/assets/esri/core/workers/chunks/996d6ae7f2e2273f9bce.js +1 -0
- package/assets/esri/core/workers/chunks/{c1135cb02ec46c491459.js → 9ce961bc390202c87941.js} +1 -1
- package/assets/esri/core/workers/chunks/9fbc7d2e0326be41b382.js +1 -0
- package/assets/esri/core/workers/chunks/a363fb40096679b011f6.js +1 -0
- package/assets/esri/core/workers/chunks/a41522b0a853b85c8269.js +1 -0
- package/assets/esri/core/workers/chunks/a763c11d2b02b3ec36ad.js +1 -0
- package/assets/esri/core/workers/chunks/{aeaa1667c2d9f1b3366b.js → a85ed251d3d3668e474f.js} +1 -1
- package/assets/esri/core/workers/chunks/{69fd99b7c76e9992ccf3.js → b32bf9808cb4be3a6bd0.js} +1 -1
- package/assets/esri/core/workers/chunks/b33a6fbbc8de2969b1ca.js +1 -0
- package/assets/esri/core/workers/chunks/b548e6b3add4154ac4e6.js +1 -0
- package/assets/esri/core/workers/chunks/b6c55bdd8c957b062bc1.js +1 -0
- package/assets/esri/core/workers/chunks/b90509b2088fd444fc39.js +1 -0
- package/assets/esri/core/workers/chunks/{b9e9cb354822c6d995a4.js → bea473dba8e57617a71d.js} +1 -1
- package/assets/esri/core/workers/chunks/{0d02c6ad1f4688bfa374.js → bf7c44644fe7b0aa60cf.js} +1 -1
- package/assets/esri/core/workers/chunks/c1a70f025e90d97fac6d.js +1 -0
- package/assets/esri/core/workers/chunks/{d72488db62fcf39447b6.js → c23d965a55215168a1a2.js} +1 -1
- package/assets/esri/core/workers/chunks/c3192cfe115ce354ffbc.js +1 -0
- package/assets/esri/core/workers/chunks/c3d768801f2f6cb9d5d0.js +1 -0
- package/assets/esri/core/workers/chunks/d09a0b2dc3a6fc10fa41.js +1 -0
- package/assets/esri/core/workers/chunks/d21526570300597aa6ae.js +1 -0
- package/assets/esri/core/workers/chunks/d2ffb0f21363c0d3d2a9.js +1 -0
- package/assets/esri/core/workers/chunks/{ec10151a2a95e95a0bb5.js → d304fe0ac836afd46e3d.js} +1 -1
- package/assets/esri/core/workers/chunks/{37a7bd30352b1309b8f8.js → d3f05b8e4bd53eb1eb9d.js} +1 -1
- package/assets/esri/core/workers/chunks/{17de7a324dfa7f57ad5d.js → d780e946149b1c3d1246.js} +1 -1
- package/assets/esri/core/workers/chunks/dc037f1496bb4aa40d10.js +1 -0
- package/assets/esri/core/workers/chunks/{8cbb04a9065aa3756638.js → dc04a8ba6c770bdc2bd4.js} +1 -1
- package/assets/esri/core/workers/chunks/dd5a71818a989a6edb00.js +1 -0
- package/assets/esri/core/workers/chunks/{89820b200ee44e678af5.js → dd891a98105904f8a06b.js} +1 -1
- package/assets/esri/core/workers/chunks/e17edd48179d41ddf1e7.js +1 -0
- package/assets/esri/core/workers/chunks/e323086de328a164f7f0.js +1 -0
- package/assets/esri/core/workers/chunks/ea50a6a994e5ee578d97.js +1 -0
- package/assets/esri/core/workers/chunks/{655b55ac0cd533d7e9d7.js → ecf074743183c1749581.js} +1 -1
- package/assets/esri/core/workers/chunks/f067b4fc65b835437afd.js +1 -0
- package/assets/esri/core/workers/chunks/f0e5c82e9c4fbe3c9d0a.js +1 -0
- package/assets/esri/core/workers/chunks/f96b24c075771d028e20.js +1 -0
- package/assets/esri/core/workers/chunks/{5790d171072b3c7d108f.js → f9a6de00c628538f07f6.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c607d30ff8ca1b61286.js → fe0c3b7c9b428d9c3f25.js} +1 -1
- package/assets/esri/core/workers/chunks/{49a1a633bb0d93764aae.js → fffea9587ec14c6d34e8.js} +1 -1
- package/assets/esri/themes/base/_mixins.scss +1 -1
- package/assets/esri/themes/base/widgets/_Directions.scss +0 -6
- package/assets/esri/themes/base/widgets/_Legend.scss +8 -7
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_en.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_nb.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
- package/chunks/Fog.glsl.js +12 -24
- package/chunks/Heatmap.glsl.js +10 -0
- package/chunks/HeatmapDensity.glsl.js +21 -0
- package/chunks/Precipitation.glsl.js +2 -2
- package/core/maybe.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/interfaces.d.ts +2432 -231
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/rasterFunctions/vectorFieldUtils.js +1 -1
- package/package.json +2 -2
- package/rasterRenderers.js +1 -1
- package/renderers/DictionaryRenderer.js +1 -1
- package/renderers/FlowRenderer.d.ts +4 -0
- package/renderers/FlowRenderer.js +5 -0
- package/renderers/support/DictionaryLoader.js +5 -0
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/renderers/support/rendererConversion.js +1 -1
- package/rest/geoprocessor/GPOptions.js +1 -1
- package/rest/print.js +1 -1
- package/rest/support/DirectionLine.js +1 -1
- package/rest/support/DirectionPoint.js +1 -1
- package/rest/support/FeatureSet.js +1 -1
- package/rest/support/LegendLayer.js +1 -1
- package/rest/support/LinearUnit.js +1 -1
- package/rest/support/PointBarrier.js +1 -1
- package/rest/support/PolygonBarrier.js +1 -1
- package/rest/support/PolylineBarrier.js +1 -1
- package/rest/support/RasterData.js +1 -1
- package/smartMapping/raster/renderers/flow.js +5 -0
- package/smartMapping/raster/support/utils.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/featureFlags.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/TextSymbol3DLayer.js +1 -1
- package/symbols/cim/effects/EffectArrow.js +1 -1
- package/symbols/support/Symbol3DHalo.js +1 -1
- package/symbols/support/Symbol3DTextBackground.js +5 -0
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/tasks/Geoprocessor.js +1 -1
- package/views/2d/FrameTask.js +1 -1
- package/views/2d/ViewState.js +1 -1
- package/views/2d/constraints/GeometryConstraint.js +1 -1
- package/views/2d/engine/BitmapTileContainer.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/RasterTileContainer.js +1 -1
- package/views/2d/engine/RasterVFContainer.js +5 -0
- package/views/2d/engine/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/RasterVFTileContainer.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/flow/BrushFlow.js +1 -1
- package/views/2d/engine/flow/FlowDisplayData.js +1 -1
- package/views/2d/engine/flow/FlowGLResources.js +1 -1
- package/views/2d/engine/flow/FlowStyle.js +1 -1
- package/views/2d/engine/flow/FlowView2D.js +5 -0
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/flow/flowRendererUtils.js +5 -0
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/brushes/raster/BrushVectorField.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/Buffer.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLBaseTextTemplate.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/input/handlers/DragPan.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/WMSLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/Pipeline.js +1 -1
- package/views/2d/layers/features/createSymbolSchema.js +5 -0
- package/views/2d/layers/features/processors/HeatmapProcessor.js +1 -1
- package/views/2d/layers/features/processors/SymbolProcessor.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/ClusterStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryVFStrategy.js +5 -0
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +5 -0
- package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
- package/views/2d/navigation/MapViewNavigation.js +1 -1
- package/views/2d/navigation/actions/Pan.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.js +1 -1
- package/views/3d/environment/weather.js +1 -1
- package/views/3d/interactive/analysisTools/lineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/IRouteLayerView3D.js +4 -0
- package/views/3d/layers/RouteLayerView3D.js +5 -0
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/labelPlacement.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +5 -0
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextTexture.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +5 -0
- package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +5 -0
- package/views/MapView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/View.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/draw/support/HighlightHelper.js +5 -0
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/layerUtils.js +1 -1
- package/views/interactive/InteractiveToolBase.js +1 -1
- package/views/support/WatchUpdatingTracking.js +1 -1
- package/views/support/projectionUtils.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/enums.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/Directions/support/resources.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Legend/styles/Card.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/widgets/support/vnodeCache.js +5 -0
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0453fad5cb819797b4f6.js +0 -1
- package/assets/esri/core/workers/chunks/0c15d77d8e817cf45a9a.js +0 -1
- package/assets/esri/core/workers/chunks/0cd0a6eef51fc5b9ea61.js +0 -1
- package/assets/esri/core/workers/chunks/0d684f16f37d5dc385dd.js +0 -1
- package/assets/esri/core/workers/chunks/16b6d0f8378582c051c3.js +0 -1
- package/assets/esri/core/workers/chunks/1877ab1b6a115dbba1c5.js +0 -1
- package/assets/esri/core/workers/chunks/197ec52641aed20029c6.js +0 -1
- package/assets/esri/core/workers/chunks/1b2a961f776a0b57e57a.js +0 -1
- package/assets/esri/core/workers/chunks/1b3fd66577b19aa5f2b6.js +0 -1
- package/assets/esri/core/workers/chunks/1c733b7db092a2a88ef3.js +0 -1
- package/assets/esri/core/workers/chunks/2629adf79e7fd9f25f07.js +0 -1
- package/assets/esri/core/workers/chunks/27474b007988855bea9d.js +0 -1
- package/assets/esri/core/workers/chunks/2b25fc7945a187c2bb9d.js +0 -1
- package/assets/esri/core/workers/chunks/34b59d7099904dcb28b5.js +0 -1
- package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +0 -1
- package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +0 -1
- package/assets/esri/core/workers/chunks/4ba6de8aa7e2960bad49.js +0 -1
- package/assets/esri/core/workers/chunks/4be35af7d6babbfe9d84.js +0 -1
- package/assets/esri/core/workers/chunks/5457962a70bd3c557a75.js +0 -1
- package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +0 -1
- package/assets/esri/core/workers/chunks/57b349d1dbc0bed75b79.js +0 -1
- package/assets/esri/core/workers/chunks/5d11b97b667921d67ae7.js +0 -1
- package/assets/esri/core/workers/chunks/5dbe555a5a662ff3d9ce.js +0 -1
- package/assets/esri/core/workers/chunks/64b7e8d812ea8fcf269e.js +0 -1
- package/assets/esri/core/workers/chunks/75d812955a473d0e8960.js +0 -1
- package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +0 -1
- package/assets/esri/core/workers/chunks/952980635afc7ec81804.js +0 -1
- package/assets/esri/core/workers/chunks/96f148a556a2418038de.js +0 -1
- package/assets/esri/core/workers/chunks/9876a1bae350795fab36.js +0 -1
- package/assets/esri/core/workers/chunks/a1930e4f035bc9aa1ae5.js +0 -1
- package/assets/esri/core/workers/chunks/a8692bffb76444c34760.js +0 -1
- package/assets/esri/core/workers/chunks/b3f5e91116112b0b612a.js +0 -1
- package/assets/esri/core/workers/chunks/ba762bcfd74af0bb8218.js +0 -1
- package/assets/esri/core/workers/chunks/be588873c16770ceb9ef.js +0 -1
- package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +0 -1
- package/assets/esri/core/workers/chunks/c2253a9f29c1aabb2b75.js +0 -1
- package/assets/esri/core/workers/chunks/c984b3040e120e502b11.js +0 -1
- package/assets/esri/core/workers/chunks/cdbc005eebec1503b99d.js +0 -1
- package/assets/esri/core/workers/chunks/d04fca5d46cca02500b7.js +0 -1
- package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +0 -1
- package/assets/esri/core/workers/chunks/d98dab12b71912fa397b.js +0 -1
- package/assets/esri/core/workers/chunks/dedc333a61081772ca7b.js +0 -1
- package/assets/esri/core/workers/chunks/e218bde41ffbcc5194f5.js +0 -1
- package/assets/esri/core/workers/chunks/e287f49184d076af17e2.js +0 -1
- package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +0 -1
- package/assets/esri/core/workers/chunks/ea595b0df5050eda2a13.js +0 -1
- package/assets/esri/core/workers/chunks/eb82ff10cef2bde6e57f.js +0 -1
- package/assets/esri/core/workers/chunks/ee6e0db58dc64410e687.js +0 -1
- package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +0 -1
- package/renderers/AnimatedFlowRenderer.d.ts +0 -4
- package/renderers/AnimatedFlowRenderer.js +0 -5
- package/views/2d/engine/flow/AnimatedFlowView2D.js +0 -5
- package/views/2d/engine/flow/animatedFlowRendererUtils.js +0 -5
- package/views/2d/layers/imagery/ImageryGraphicsView2D.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import i from"../../../Graphic.js";import t from"../../../core/Collection.js";import{watch as r,syncAndInitial as s,sync as a}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{GraphicsCollection as l}from"../../../support/GraphicsCollection.js";import n from"../engine/flow/
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import i from"../../../Graphic.js";import t from"../../../core/Collection.js";import{watch as r,syncAndInitial as s,sync as a}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{GraphicsCollection as l}from"../../../support/GraphicsCollection.js";import n from"../engine/flow/FlowView2D.js";import{LayerView2DMixin as u}from"./LayerView2D.js";import w from"./graphics/GraphicsView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import v from"./imagery/ImageryView2D.js";import d from"./imagery/VectorFieldView2D.js";import{ImageryLayerView as p}from"../../layers/ImageryLayerView.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as y}from"../../layers/RefreshableLayerView.js";let b=class extends(p(y(u(m)))){constructor(){super(...arguments),this._exportImageVersion=-1,this._highlightGraphics=new l,this.subview=null}destroy(){var e;null==(e=this.subview)||e.destroy()}get pixelData(){return this.updating?null:"getPixelData"in this.subview?this.subview.getPixelData():null}get updating(){return!!(!this.subview||"updating"in this.subview&&this.subview.updating)}async hitTest(e,i){return this.subview?[this.subview.hitTest(e)]:null}update(e){var i;null==(i=this.subview)||i.update(e)}attach(){this.layer.increaseRasterJobHandlerUsage(),this._setSubView(),this.view&&(this._highlightView=new w({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme)}),this.container.addChild(this._highlightView.container)),this.handles.add([r((()=>{var e,i;return this.subview&&null!=(e=null==(i=this.layer)?void 0:i.blendMode)?e:"normal"}),(e=>{this.subview&&(this.subview.container.blendMode=e)}),s),r((()=>{var e,i;return this.subview&&null!=(e=null==(i=this.layer)?void 0:i.effect)?e:null}),(e=>{this.subview&&(this.subview.container.effect=e)}),s),r((()=>{var e,i;return null==(e=this.layer)||null==(i=e.exportImageServiceParameters)?void 0:i.version}),(e=>{e&&this._exportImageVersion!==e&&(this._exportImageVersion=e,this.requestUpdate())}),a),r((()=>this.subview?this.layer.timeExtent:null),(e=>{"timeExtent"in this.subview&&(this.subview.timeExtent=e),this.requestUpdate()})),this.layer.on("redraw",(()=>{"redraw"in this.subview?this.subview.redraw():this.subview.redrawOrRefetch()})),r((()=>this.layer.renderer),(()=>this._setSubView()))],"imagerylayerview-update")}detach(){var e,i;this.layer.decreaseRasterJobHandlerUsage(),this.container.removeAllChildren(),this._detachSubview(this.subview),null==(e=this.subview)||e.destroy(),this.subview=null,null==(i=this._highlightView)||i.destroy(),this.handles.remove("imagerylayerview-update"),this._exportImageVersion=-1}moveStart(){}viewChange(){}moveEnd(){this.requestUpdate()}highlight(e,r){if(!((Array.isArray(e)?e[0]:t.isCollection(e)?e.getItemAt(0):e)instanceof i))return{remove:()=>{}};let s=[];return Array.isArray(e)||t.isCollection(e)?s=e.map((e=>e.clone())):e instanceof i&&(s=[e.clone()]),this._highlightGraphics.addMany(s),{remove:()=>{this._highlightGraphics.removeMany(s)}}}async doRefresh(){this.requestUpdate()}isUpdating(){return!this.subview||this.subview.updating}_setSubView(){var e;if(!this.view)return;const i=null==(e=this.layer.renderer)?void 0:e.type;let t="Imagery";if("vector-field"===i&&"lerc"===this.layer.format?t="ImageryVF":"flow"===i&&(t="flow"),this.subview){var r;if(this.subview.type===t)return this._attachSubview(this.subview),void("flow"===this.subview.type&&this.subview.redrawOrRefetch());this._detachSubview(this.subview),null==(r=this.subview)||r.destroy(),this.subview=null}this.subview="Imagery"===t?new v({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):"ImageryVF"===t?new d({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):new n({layer:this.layer,layerView:this}),this._attachSubview(this.subview),this.requestUpdate()}_attachSubview(e){e&&!e.attached&&(e.attach(),e.attached=!0,this.container.addChildAt(e.container,0),e.container.blendMode=this.layer.blendMode,e.container.effect=this.layer.effect)}_detachSubview(e){null!=e&&e.attached&&(this.container.removeChild(e.container),e.detach(),e.attached=!1)}};e([h()],b.prototype,"pixelData",null),e([h({readOnly:!0})],b.prototype,"updating",null),e([h()],b.prototype,"subview",void 0),b=e([o("esri.views.2d.layers.ImageryLayerView2D")],b);const g=b;export{g as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import s from"../../../Graphic.js";import
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import s from"../../../Graphic.js";import i from"../../../core/Logger.js";import{isAbortError as t}from"../../../core/promiseUtils.js";import{watch as r,syncAndInitial as o,initial as a}from"../../../core/reactiveUtils.js";import{watch as u}from"../../../core/watchUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import l from"../engine/flow/FlowView2D.js";import{LayerView2DMixin as c}from"./LayerView2D.js";import d from"./imagery/ImageryTileView2D.js";import v from"./imagery/VectorFieldTileView2D.js";import{canUseMajorityInterpolationOnDataSource as p}from"./support/util.js";import{ImageryTileLayerView as w}from"../../layers/ImageryTileLayerView.js";import b from"../../layers/LayerView.js";import{RefreshableLayerView as m}from"../../layers/RefreshableLayerView.js";const y=i.getLogger("esri.views.2d.layers.ImageryTileLayerView2D");let g=class extends(w(m(c(b)))){constructor(){super(...arguments),this._useWebGLForProcessing=!0,this._useProgressiveUpdate=!0,this.subview=null}destroy(){var e;null==(e=this.subview)||e.destroy()}get useWebGLForProcessing(){return this._useWebGLForProcessing}set useWebGLForProcessing(e){this._useWebGLForProcessing=e,this.subview&&"useWebGLForProcessing"in this.subview&&(this.subview.useWebGLForProcessing=e)}get useProgressiveUpdate(){return this._useWebGLForProcessing}set useProgressiveUpdate(e){this._useProgressiveUpdate=e,this.subview&&"useProgressiveUpdate"in this.subview&&(this.subview.useProgressiveUpdate=e)}update(e){this.subview.update(e),this.notifyChange("updating")}isUpdating(){return!this.subview||this.subview.updating}attach(){this.layer.increaseRasterJobHandlerUsage(),this._updateSubview(),this.handles.add([u(this.layer,["bandIds","renderer","interpolation","multidimensionalDefinition"],((e,s,i)=>{const r="multidimensionalDefinition"===i,o="interpolation"===i&&("majority"===e||"majority"===s)&&p(this.layer),a="renderer"===i&&s.type!==e.type;a&&this._updateSubview();const u=r||o||a;this.subview.redrawOrRefetch(u).catch((e=>{t(e)||y.error(e)})),this.notifyChange("updating")})),r((()=>{var e,s;return this.subview&&null!=(e=null==(s=this.layer)?void 0:s.blendMode)?e:"normal"}),(e=>{this.subview&&(this.subview.container.blendMode=e)}),o),r((()=>{var e,s;return this.subview&&null!=(e=null==(s=this.layer)?void 0:s.effect)?e:null}),(e=>{this.subview&&(this.subview.container.effect=e)}),o),r((()=>this.timeExtent),(()=>{this.subview.redrawOrRefetch(!0).catch((e=>{t(e)||y.error(e)}))}),a)],"attach")}detach(){this.handles.remove("attach"),this.layer.decreaseRasterJobHandlerUsage(),this._detachSubview(this.subview)}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.subview.moveEnd()}async hitTest(e,i){return[new s({attributes:{},geometry:e.clone()})]}doRefresh(){return this.subview.doRefresh()}_updateSubview(){const e="vector-field"===this.layer.renderer.type?"rasterVF":"flow"===this.layer.renderer.type?"flow":"raster";if(this.subview){var s;if(this.subview.type===e)return void this._attachSubview(this.subview);this._detachSubview(this.subview),null==(s=this.subview)||s.destroy(),this.subview=null}const{layer:i}=this;let t;t="rasterVF"===e?new v({layer:i,layerView:this}):"flow"===e?new l({layer:i,layerView:this}):new d({layer:i,layerView:this}),"useWebGLForProcessing"in t&&(t.useWebGLForProcessing=this._useWebGLForProcessing),"useProgressiveUpdate"in t&&(t.useProgressiveUpdate=this._useProgressiveUpdate),"previousLOD"in t&&(t.previousLOD=this.subview&&"previousLOD"in this.subview&&this.subview.previousLOD),this._attachSubview(t),this.subview=t,this.requestUpdate()}_attachSubview(e){e&&!e.attached&&(e.attach(),e.attached=!0,this.container.addChildAt(e.container,0),e.container.blendMode=this.layer.blendMode,e.container.effect=this.layer.effect)}_detachSubview(e){null!=e&&e.attached&&(this.container.removeChild(e.container),e.detach(),e.attached=!1)}};e([n()],g.prototype,"subview",void 0),e([n()],g.prototype,"useWebGLForProcessing",null),e([n()],g.prototype,"useProgressiveUpdate",null),g=e([h("esri.views.2d.layers.ImageryTileLayerView2D")],g);const f=g;export{f as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import{version as i}from"../../../kernel.js";import t from"../../../request.js";import s from"../../../core/Collection.js";import a from"../../../core/Handles.js";import{isSome as o,isNone as l}from"../../../core/maybe.js";import{queryToObject as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{version as i}from"../../../kernel.js";import t from"../../../request.js";import s from"../../../core/Collection.js";import a from"../../../core/Handles.js";import{isSome as o,isNone as l}from"../../../core/maybe.js";import{watch as r}from"../../../core/reactiveUtils.js";import{queryToObject as n,objectToQuery as h}from"../../../core/urlUtils.js";import{property as p}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../../geometry/Extent.js";import{load as d,project as y}from"../../../geometry/projection.js";import w from"../../../geometry/SpatialReference.js";import{canProject as u,project as g}from"../../../geometry/support/webMercatorUtils.js";import{getGraphics as _,fetchService as V,parseKML as b}from"../../../layers/support/kmlUtils.js";import{parseUrl as f}from"../../../rest/utils.js";import{GraphicsCollection as v}from"../../../support/GraphicsCollection.js";import{Bitmap as S}from"../engine/Bitmap.js";import{BitmapContainer as I}from"../engine/BitmapContainer.js";import{LayerView2DMixin as C}from"./LayerView2D.js";import x from"./graphics/GraphicContainer.js";import k from"./graphics/GraphicsView2D.js";import j from"../../layers/LayerView.js";class P{constructor(){this.allSublayers=new Map,this.allPoints=[],this.allPolylines=[],this.allPolygons=[],this.allMapImages=[]}}let M=class extends(C(j)){constructor(){super(...arguments),this._handles=new a,this._bitmapIndex=new Map,this._mapImageContainer=new I,this._kmlVisualData=new P,this.allVisiblePoints=new v,this.allVisiblePolylines=new v,this.allVisiblePolygons=new v,this.allVisibleMapImages=new s}async hitTest(e,i){var t,s,a;return(await Promise.all([null==(t=this._pointsView)?void 0:t.hitTest(e),null==(s=this._polylinesView)?void 0:s.hitTest(e),null==(a=this._polygonsView)?void 0:a.hitTest(e)])).flat().filter((e=>!!e&&(e.layer=this.layer,e.sourceLayer=this.layer,!0)))}update(e){this._polygonsView&&this._polygonsView.processUpdate(e),this._polylinesView&&this._polylinesView.processUpdate(e),this._pointsView&&this._pointsView.processUpdate(e)}attach(){this._fetchController=new AbortController,this.container.addChild(this._mapImageContainer),this._polygonsView=new k({view:this.view,graphics:this.allVisiblePolygons,requestUpdateCallback:()=>this.requestUpdate(),container:new x(this.view.featuresTilingScheme)}),this.container.addChild(this._polygonsView.container),this._polylinesView=new k({view:this.view,graphics:this.allVisiblePolylines,requestUpdateCallback:()=>this.requestUpdate(),container:new x(this.view.featuresTilingScheme)}),this.container.addChild(this._polylinesView.container),this._pointsView=new k({view:this.view,graphics:this.allVisiblePoints,requestUpdateCallback:()=>this.requestUpdate(),container:new x(this.view.featuresTilingScheme)}),this.container.addChild(this._pointsView.container),this.handles.add([this.allVisibleMapImages.on("change",(e=>{e.added.forEach((e=>this._addMapImage(e))),e.removed.forEach((e=>this._removeMapImage(e)))})),r((()=>this.layer.visibleSublayers),(e=>{for(const[i,t]of this._kmlVisualData.allSublayers)t.visibility=0;for(const i of e){const e=this._kmlVisualData.allSublayers.get(i.id);e&&(e.visibility=1)}this._refreshCollections()}))]),this.updatingHandles.addPromise(this._fetchService(this._fetchController.signal))}detach(){this._fetchController.abort(),this._fetchController=null,this._handles.removeAll(),this._mapImageContainer.removeAllChildren(),this.container.removeAllChildren(),this._bitmapIndex.clear(),this._polygonsView&&(this._polygonsView.destroy(),this._polygonsView=null),this._polylinesView&&(this._polylinesView.destroy(),this._polylinesView=null),this._pointsView&&(this._pointsView.destroy(),this._pointsView=null)}moveStart(){}viewChange(){this._polygonsView.viewChange(),this._polylinesView.viewChange(),this._pointsView.viewChange()}moveEnd(){}isUpdating(){return this._pointsView.updating||this._polygonsView.updating||this._polylinesView.updating}_addMapImage(e){(this.view.spatialReference.isWGS84||this.view.spatialReference.isWebMercator)&&t(e.href,{responseType:"image"}).then((({data:i})=>{let t=c.fromJSON(e.extent);u(t,this.view.spatialReference)&&(t=g(t,this.view.spatialReference));const s=new S(i,"standard");s.x=t.xmin,s.y=t.ymax,s.resolution=t.width/i.naturalWidth,s.rotation=e.rotation,this._mapImageContainer.addChild(s),this._bitmapIndex.set(e,s)}))}async _getViewDependentUrl(e,t){const{viewFormat:s,viewBoundScale:a,httpQuery:r}=e;if(o(s)){if(l(t))throw new Error("Loading this network link requires a view state.");let p;if(await d(),o(a)&&1!==a){const e=new c(t.extent);e.expand(a),p=e}else p=t.extent;p=y(p,w.WGS84);const m=y(p,w.WebMercator),u=p.xmin,g=p.xmax,_=p.ymin,V=p.ymax,b=t.size[0]*t.pixelRatio,v=t.size[1]*t.pixelRatio,S=Math.max(m.width,m.height),I={"[bboxWest]":u.toString(),"[bboxEast]":g.toString(),"[bboxSouth]":_.toString(),"[bboxNorth]":V.toString(),"[lookatLon]":p.center.x.toString(),"[lookatLat]":p.center.y.toString(),"[lookatRange]":S.toString(),"[lookatTilt]":"0","[lookatHeading]":t.rotation.toString(),"[lookatTerrainLon]":p.center.x.toString(),"[lookatTerrainLat]":p.center.y.toString(),"[lookatTerrainAlt]":"0","[cameraLon]":p.center.x.toString(),"[cameraLat]":p.center.y.toString(),"[cameraAlt]":S.toString(),"[horizFov]":"60","[vertFov]":"60","[horizPixels]":b.toString(),"[vertPixels]":v.toString(),"[terrainEnabled]":"0","[clientVersion]":i,"[kmlVersion]":"2.2","[clientName]":"ArcGIS API for JavaScript","[language]":"en-US"},C=e=>{for(const i in e)for(const t in I)e[i]=e[i].replace(t,I[t])},x=n(s);C(x);let k={};o(r)&&(k=n(r),C(k));const j=f(e.href);j.query={...j.query,...x,...k};return`${j.path}?${h(x)}`}return e.href}async _fetchService(e){const i=new P;await this._loadVisualData(this.layer.url,i,e),this._kmlVisualData=i,this._refreshCollections()}_refreshCollections(){this.allVisiblePoints.removeAll(),this.allVisiblePolylines.removeAll(),this.allVisiblePolygons.removeAll(),this.allVisibleMapImages.removeAll(),this.allVisiblePoints.addMany(this._kmlVisualData.allPoints.filter((e=>this._isSublayerVisible(e.sublayerId))).map((({item:e})=>e))),this.allVisiblePolylines.addMany(this._kmlVisualData.allPolylines.filter((e=>this._isSublayerVisible(e.sublayerId))).map((({item:e})=>e))),this.allVisiblePolygons.addMany(this._kmlVisualData.allPolygons.filter((e=>this._isSublayerVisible(e.sublayerId))).map((({item:e})=>e))),this.allVisibleMapImages.addMany(this._kmlVisualData.allMapImages.filter((e=>this._isSublayerVisible(e.sublayerId))).map((({item:e})=>e)))}_isSublayerVisible(e){const i=this._kmlVisualData.allSublayers.get(e);return!!i.visibility&&(-1===i.parentFolderId||this._isSublayerVisible(i.parentFolderId))}_loadVisualData(e,i,t){return this._fetchParsedKML(e,t).then((async e=>{for(const s of e.sublayers){i.allSublayers.set(s.id,s);const e=s.points?await _(s.points):[],a=s.polylines?await _(s.polylines):[],o=s.polygons?await _(s.polygons):[],l=s.mapImages||[];if(i.allPoints.push(...e.map((e=>({item:e,sublayerId:s.id})))),i.allPolylines.push(...a.map((e=>({item:e,sublayerId:s.id})))),i.allPolygons.push(...o.map((e=>({item:e,sublayerId:s.id})))),i.allMapImages.push(...l.map((e=>({item:e,sublayerId:s.id})))),s.networkLink){const e=await this._getViewDependentUrl(s.networkLink,this.view.state);await this._loadVisualData(e,i,t)}}}))}_fetchParsedKML(e,i){return V(e,this.view.spatialReference,this.layer.refreshInterval,i).then((e=>b(e.data)))}_removeMapImage(e){const i=this._bitmapIndex.get(e);i&&(this._mapImageContainer.removeChild(i),this._bitmapIndex.delete(e))}};e([p()],M.prototype,"_pointsView",void 0),e([p()],M.prototype,"_polylinesView",void 0),e([p()],M.prototype,"_polygonsView",void 0),e([p()],M.prototype,"updating",void 0),M=e([m("esri.views.2d.layers.KMLLayerView2D")],M);const U=M;export{U as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Collection.js";import{referenceSetter as s}from"../../../core/collectionUtils.js";import i from"../../../core/Error.js";import{watch as r,syncAndInitial as a,on as o}from"../../../core/reactiveUtils.js";import{property as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Collection.js";import{referenceSetter as s}from"../../../core/collectionUtils.js";import i from"../../../core/Error.js";import{watch as r,syncAndInitial as a,on as o}from"../../../core/reactiveUtils.js";import{property as p}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{Container as l}from"../engine/Container.js";import h from"../../layers/support/ClipArea.js";import c from"../../layers/support/ClipRect.js";import d from"../../layers/support/Geometry.js";import u from"../../layers/support/Path.js";const y=t.ofType({key:"type",base:h,typeMap:{rect:c,path:u,geometry:d}}),f=t=>{let h=class extends t{constructor(){super(...arguments),this.attached=!1,this.clips=new y,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1}initialize(){var e,t,s,p;const n=null==(e=null==(t=this.view)?void 0:t.spatialReferenceLocked)||e;(null==(s=this.view)?void 0:s.spatialReference)&&n&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new i("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer}))):(this.container||(this.container=new l),this.container.fadeTransitionEnabled=!0,this.container.opacity=0,this.container.clips=this.clips,this.handles.add([r((()=>this.suspended),(e=>{this.container&&(this.container.visible=!e),this.view&&!e&&this.updateRequested&&this.view.requestUpdate()}),a),r((()=>{var e,t;return null!=(e=null==(t=this.layer)?void 0:t.opacity)?e:1}),(e=>{this.container&&(this.container.opacity=e)}),a),r((()=>this.layer&&"blendMode"in this.layer?this.layer.blendMode:"normal"),(e=>{this.container&&(this.container.blendMode=e)}),a),r((()=>this.layer&&"effect"in this.layer?this.layer.effect:null),(e=>{this.container&&(this.container.effect=e)}),a),o((()=>this.clips),"change",(()=>{this.container&&(this.container.clips=this.clips)}))]),null!=(p=this.view)&&p.whenLayerView?this.view.whenLayerView(this.layer).then((e=>{e===this&&this.processAttach()}),(()=>{})):this.when().then((()=>{this.processAttach()}),(()=>{})))}destroy(){this.processDetach(),this.updateRequested=!1}get spatialReferenceSupported(){var e;const t=null==(e=this.view)?void 0:e.spatialReference;return null==t||this.supportsSpatialReference(t)}get updating(){var e;return this.spatialReferenceSupported&&(!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())||!(null==(e=this.updatingHandles)||!e.updating))}get visibleAtCurrentScale(){return this.isVisibleAtScale(this.view.scale)}processAttach(){this.isResolved()&&!this.attached&&!this.destroyed&&this.spatialReferenceSupported&&(this.attach(),this.attached=!0,this.requestUpdate())}processDetach(){this.attached&&(this.detach(),this.attached=!1,this.updateRequested=!1)}isVisibleAtScale(e){const t=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;if(!t)return!0;const{minScale:s,maxScale:i}=t;return(0===s||e<=s)&&(0===i||e>=i)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.suspended||this.view.requestUpdate())}processUpdate(e){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",e),this.updateRequested&&!this.suspended&&(this.updateRequested=!1,this.update(e))):this.updateRequested=!1}hitTest(e,t){return Promise.resolve(null)}supportsSpatialReference(e){return!0}isUpdating(){return!1}canResume(){return!!this.spatialReferenceSupported&&(!!super.canResume()&&this.visibleAtCurrentScale)}getSuspendInfo(){const e=super.getSuspendInfo(),t=!this.spatialReferenceSupported,s=this.visibleAtCurrentScale;return t&&(e.spatialReferenceNotSupported=t),s&&(e.outsideScaleRange=s),e}};return e([p()],h.prototype,"attached",void 0),e([p({type:y,set(e){const t=s(e,this._get("clips"),y);this._set("clips",t)}})],h.prototype,"clips",void 0),e([p()],h.prototype,"container",void 0),e([p()],h.prototype,"moving",void 0),e([p({readOnly:!0})],h.prototype,"spatialReferenceSupported",null),e([p({readOnly:!0})],h.prototype,"updateParameters",void 0),e([p()],h.prototype,"updateRequested",void 0),e([p()],h.prototype,"updating",null),e([p()],h.prototype,"view",void 0),e([p({readOnly:!0})],h.prototype,"visibleAtCurrentScale",null),h=e([n("esri.views.2d.layers.LayerView2D")],h),h};export{f as LayerView2DMixin};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import{BitmapContainer as o}from"../engine/BitmapContainer.js";import{LayerView2DMixin as h}from"./LayerView2D.js";import p from"./graphics/GraphicsView2D.js";import
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import{BitmapContainer as o}from"../engine/BitmapContainer.js";import{LayerView2DMixin as h}from"./LayerView2D.js";import p from"./graphics/GraphicsView2D.js";import n from"./graphics/HighlightGraphicContainer.js";import m from"./support/ExportStrategy.js";import c from"../../layers/LayerView.js";import{MapImageLayerView as d}from"../../layers/MapImageLayerView.js";import{RefreshableLayerView as g}from"../../layers/RefreshableLayerView.js";import{createQueryGeometry as l}from"../../support/drapedUtils.js";const u=t.getLogger("esri.views.2d.layers.MapImageLayerView2D"),f=new Set([54100,54101,54099]),y=new Set([54090,54091,8857,8858,8859]);let w=class extends(d(g(h(c)))){constructor(){super(...arguments),this._highlightGraphics=new a}supportsSpatialReference(e){const{wkid:t}=e;if(t){if(this.layer.version<10.8&&f.has(t))return!1;if(this.layer.version<10.7&&y.has(t))return!1}return!0}update(e){this.strategy.update(e).catch((e=>{r(e)||u.error(e)}))}attach(){const{imageMaxWidth:e,imageMaxHeight:t,version:r}=this.layer,i=r>=10.3,s=r>=10;this._bitmapContainer=new o,this.container.addChild(this._bitmapContainer);const a=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new n(this.view.featuresTilingScheme)});this.container.addChild(a.container),this.strategy=new m({container:this._bitmapContainer,fetchSource:this.fetchImage.bind(this),requestUpdate:this.requestUpdate.bind(this),imageMaxWidth:e,imageMaxHeight:t,imageRotationSupported:i,imageNormalizationSupported:s,hidpi:!0}),this.handles.add(this.watch("exportImageVersion",(()=>this.requestUpdate())),"exportImageVersion"),this.handles.add(this.watch("view.floors",(()=>this.requestUpdate())),"view.floors"),this.requestUpdate()}detach(){this.handles.remove("exportImageVersion"),this.handles.remove("view.floors"),this.strategy.destroy(),this.container.removeAllChildren(),this._bitmapContainer.removeAllChildren()}moveStart(){}viewChange(){}moveEnd(){this.requestUpdate()}highlight(e,t){return this._highlightGraphics.add(e),{remove:()=>{this._highlightGraphics.remove(e)}}}createFetchPopupFeaturesQueryGeometry(e,t){return l(e,t,this.view)}async doRefresh(){this.requestUpdate()}isUpdating(){return this.strategy.updating||this.updateRequested}fetchImage(e,t,r,i){return this.layer.fetchImage(e,t,r,{timeExtent:this.timeExtent,floors:this.view.floors,...i})}};e([i()],w.prototype,"strategy",void 0),e([i()],w.prototype,"updating",void 0),w=e([s("esri.views.2d.layers.MapImageLayerView2D")],w);const v=w;export{v as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{watch as s}from"../../../core/reactiveUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{BitmapTileLayerView2D as a}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{watch as s}from"../../../core/reactiveUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{BitmapTileLayerView2D as a}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as o}from"./LayerView2D.js";import{createBlankImage as h,resampleImage as n}from"./support/imageUtils.js";import c from"../tiling/TileInfoView.js";import u from"../tiling/TileKey.js";import p from"../tiling/TileQueue.js";import f from"../tiling/TileStrategy.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as y}from"../../layers/RefreshableLayerView.js";import{TileLayerView as d}from"../../layers/TileLayerView.js";import{createQueryGeometry as g}from"../../support/drapedUtils.js";const w=[0,0];let _=class extends(d(y(a(o(m))))){constructor(){super(...arguments),this._tileStrategy=null,this._fetchQueue=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume()}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null;this._tileInfoView=new c(this.layer.tileInfo,this.layer.fullExtent),this._fetchQueue=new p({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,t)=>this.fetchTile(e,t)}),this._tileStrategy=new f({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),this.requestUpdate(),this.handles.add(s((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){var t;const i=null==(t=this.layer.tileInfo)?void 0:t.spatialReference;return e.equals(i)}createFetchPopupFeaturesQueryGeometry(e,t){return g(e,t,this.view)}async doRefresh(){this.updateRequested||this.suspended||(this._fetchQueue.reset(),this._tileStrategy.tiles.forEach((e=>this._enqueueTileFetch(e))))}isUpdating(){var e,t;return null!=(e=null==(t=this._fetchQueue)?void 0:t.updating)&&e}acquireTile(e){const t=this._bitmapView.createTile(e),i=t.bitmap;return[i.x,i.y]=this._tileInfoView.getTileCoords(w,t.key),i.resolution=this._tileInfoView.getTileResolution(t.key),[i.width,i.height]=this._tileInfoView.tileInfo.size,this._enqueueTileFetch(t),this._bitmapView.addChild(t),this.requestUpdate(),t}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,t={}){const s="tilemapCache"in this.layer?this.layer.tilemapCache:null,{signal:r,resamplingLevel:l=0}=t;if(!s)try{return await this._fetchImage(e,r)}catch(c){if(!i(c)&&!this.resampling)return h(this._tileInfoView.tileInfo.size);if(l<3){const i=this._tileInfoView.getTileParentId(e.id);if(i){const s=new u(i),r=await this.fetchTile(s,{...t,resamplingLevel:l+1});return n(this._tileInfoView,r,s,e)}}throw c}const a=new u(0,0,0,0);let o;try{if(await s.fetchAvailabilityUpsample(e.level,e.row,e.col,a,{signal:r}),a.level!==e.level&&!this.resampling)return h(this._tileInfoView.tileInfo.size);o=await this._fetchImage(a,r)}catch(c){if(i(c))throw c;o=await this._fetchImage(e,r)}return this.resampling?n(this._tileInfoView,o,a,e):o}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);e.bitmap.source=t,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(s){i(s)||t.getLogger(this.declaredClass).error(s)}this.requestUpdate()}}async _fetchImage(e,t){return this.layer.fetchTile(e.level,e.row,e.col,{signal:t})}};e([r()],_.prototype,"_fetchQueue",void 0),e([r()],_.prototype,"resampling",null),_=e([l("esri.views.2d.layers.TileLayerView2D")],_);const I=_;export{I as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{watch as s}from"../../../core/reactiveUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import a from"../../../geometry/Extent.js";import{BitmapContainer as n}from"../engine/BitmapContainer.js";import{LayerView2DMixin as p}from"./LayerView2D.js";import m from"./support/ExportStrategy.js";import h from"../../layers/LayerView.js";import{RefreshableLayerView as c}from"../../layers/RefreshableLayerView.js";import{WMSLayerView as d}from"../../layers/WMSLayerView.js";const u=t.getLogger("esri.views.2d.layers.WMSLayerView2D");let l=class extends(d(c(p(h)))){constructor(){super(...arguments),this.container=new n}supportsSpatialReference(e){return this.layer.supportsSpatialReference(e)}update(e){this.strategy.update(e).catch((e=>{r(e)||u.error(e)}))}attach(){const{layer:e,container:t}=this,{imageMaxHeight:r,imageMaxWidth:i}=e;this.strategy=new m({container:t,fetchSource:this.fetchImage.bind(this),requestUpdate:this.requestUpdate.bind(this),imageMaxHeight:r,imageMaxWidth:i,imageRotationSupported:!1,imageNormalizationSupported:!1,hidpi:!1}),this.handles.add(s((()=>this.exportImageVersion),(()=>this.requestUpdate())),"exportImageVersion")}detach(){this.handles.remove("exportImageVersion"),this.strategy.destroy(),this.strategy=null,this.container.removeAllChildren()}moveStart(){}viewChange(){}moveEnd(){this.requestUpdate()}createFetchPopupFeaturesQuery(e){const{view:t,container:r}=this,{x:s,y:i}=e,{spatialReference:o}=t;let n=null,p=0,m=0;if(r.children.some((e=>{const{width:t,height:r,resolution:h,x:c,y:d}=e,u=c+h*t,l=d-h*r;return s>=c&&s<=u&&i<=d&&i>=l&&(n=new a({xmin:c,ymin:l,xmax:u,ymax:d,spatialReference:o}),p=t,m=r,!0)})),!n)return null;const h=n.width/p,c=Math.round((s-n.xmin)/h),d=Math.round((n.ymax-i)/h);return{extent:n,width:p,height:m,x:c,y:d}}async doRefresh(){this.requestUpdate()}isUpdating(){return this.strategy.updating||this.updateRequested}fetchImage(e,t,r,s){return this.layer.fetchImage(e,t,r,{timeExtent:this.timeExtent,...s})}};e([i()],l.prototype,"strategy",void 0),e([i()],l.prototype,"updating",void 0),l=e([o("esri.views.2d.layers.WMSLayerView2D")],l);const y=l;export{y as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{BitmapTileLayerView2D as a}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as l}from"./LayerView2D.js";import{resampleImage as h}from"./support/imageUtils.js";import o from"../tiling/TileInfoView.js";import n from"../tiling/TileKey.js";import c from"../tiling/TileQueue.js";import u from"../tiling/TileStrategy.js";import f from"../../layers/LayerView.js";import{RefreshableLayerView as p}from"../../layers/RefreshableLayerView.js";const d=[102113,102100,3857,3785,900913],
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{BitmapTileLayerView2D as a}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as l}from"./LayerView2D.js";import{resampleImage as h}from"./support/imageUtils.js";import o from"../tiling/TileInfoView.js";import n from"../tiling/TileKey.js";import c from"../tiling/TileQueue.js";import u from"../tiling/TileStrategy.js";import f from"../../layers/LayerView.js";import{RefreshableLayerView as p}from"../../layers/RefreshableLayerView.js";const d=[102113,102100,3857,3785,900913],m=[0,0],y=t.getLogger("esri.views.2d.layers.WMTSLayerView2D");let w=class extends(p(a(l(f)))){constructor(){super(...arguments),this._tileStrategy=null,this._fetchQueue=null,this._tileRequests=new Map,this.layer=null}get tileMatrixSet(){const e=this._getTileMatrixSetBySpatialReference(this.layer.activeLayer);return e?(e.id!==this.layer.activeLayer.tileMatrixSetId&&(this.layer.activeLayer.tileMatrixSetId=e.id),e):null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume()}attach(){if(!this.tileMatrixSet)return;const{tileInfo:e}=this.tileMatrixSet;this._tileInfoView=new o(e),this._fetchQueue=new c({tileInfoView:this._tileInfoView,concurrency:16,process:(e,t)=>this.fetchTile(e,t)}),this._tileStrategy=new u({cachePolicy:"keep",resampling:!0,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),this.handles.add(this.watch(["layer.activeLayer.styleId","tileMatrixSet"],(()=>this._refresh())),this.declaredClass),super.attach()}detach(){var e,t;super.detach(),this.handles.remove(this.declaredClass),null==(e=this._tileStrategy)||e.destroy(),null==(t=this._fetchQueue)||t.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}acquireTile(e){const t=this._bitmapView.createTile(e),i=t.bitmap;return[i.x,i.y]=this._tileInfoView.getTileCoords(m,t.key),i.resolution=this._tileInfoView.getTileResolution(t.key),[i.width,i.height]=this._tileInfoView.tileInfo.size,this._enqueueTileFetch(t),this._bitmapView.addChild(t),this.requestUpdate(),t}async doRefresh(){this.updateRequested||this.suspended||this._refresh()}isUpdating(){var e,t;return null!=(e=null==(t=this._fetchQueue)?void 0:t.updating)&&e}async fetchTile(e,t={}){const s="tilemapCache"in this.layer?this.layer.tilemapCache:null,{signal:r,resamplingLevel:a=0}=t;if(!s)return this._fetchImage(e,r);const l=new n(0,0,0,0);let o;try{await s.fetchAvailabilityUpsample(e.level,e.row,e.col,l,{signal:r}),o=await this._fetchImage(l,r)}catch(c){if(i(c))throw c;if(a<3){const i=this._tileInfoView.getTileParentId(e.id);if(i){const s=new n(i),r=await this.fetchTile(s,{...t,resamplingLevel:a+1});return h(this._tileInfoView,r,s,e)}}throw c}return h(this._tileInfoView,o,l,e)}canResume(){const e=super.canResume();return e?null!==this.tileMatrixSet:e}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);e.bitmap.source=t,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(t){i(t)||y.error(t)}this.requestUpdate()}}async _fetchImage(e,t){return this.layer.fetchTile(e.level,e.row,e.col,{signal:t})}_refresh(){this._fetchQueue.reset(),this._tileStrategy.tiles.forEach((e=>{if(!e.bitmap.source)return;const t={id:e.key.id,fulfilled:!1,promise:this._fetchQueue.push(e.key).then((t=>{e.bitmap.source=t})).catch((t=>{i(t)||(e.bitmap.source=null)})).finally((()=>{e.requestRender(),t.fulfilled=!0}))};this._tileRequests.set(e,t)}))}_getTileMatrixSetBySpatialReference(e){const t=this.view.spatialReference;if(!e.tileMatrixSets)return null;let i=e.tileMatrixSets.find((e=>e.tileInfo.spatialReference.wkid===t.wkid));return!i&&t.isWebMercator&&(i=e.tileMatrixSets.find((e=>d.indexOf(e.tileInfo.spatialReference.wkid)>-1))),i}};e([s()],w.prototype,"_fetchQueue",void 0),e([s({readOnly:!0})],w.prototype,"tileMatrixSet",null),w=e([r("esri.views.2d.layers.WMTSLayerView2D")],w);const _=w;export{_ as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{HandleOwner as t}from"../../../../core/HandleOwner.js";import"../../../../core/has.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{equals as o}from"../../../../geometry/support/spatialReferenceUtils.js";import i from"../../../../layers/support/TileInfo.js";import{loadProcessorModule as l}from"./processors.js";import n from"./controllers/FeatureController2D.js";import a from"./support/TileStore.js";import{UpdateToken as c}from"./support/UpdateToken.js";import p from"../../tiling/TileInfoView.js";const h=new Set;function u(){return h}let d=class extends t{constructor(){super(...arguments),this.controller=null,this.processor=null,this.remoteClient=null,this.tileStore=null,this.service=null,this.viewState=null,this._paused=!1,this._pendingTileUpdates=[]}initialize(){this.handles.add(this.watch("updating",(e=>{this.remoteClient.invoke("setUpdating",e).catch((e=>{}))})))}destroy(){var e,t,r,s;Array.isArray(null==(e=this.service)?void 0:e.source)&&this.service.source.forEach((e=>e.close())),null==(t=this.controller)||t.destroy(),null==(r=this.processor)||r.destroy(),null==(s=this.tileStore)||s.destroy(),this.controller=this.processor=this.tileStore=this.remoteClient=null}get updating(){return!this.controller||this.controller.updating}async startup({service:e,config:t,tileInfo:r,tiles:s}){var l;if(this._paused=!0,Array.isArray(null==(l=this.service)?void 0:l.source)&&this.service.source.forEach((e=>e.close())),this.service=e,!this.tileStore||!o(this.tileStore.tileScheme.spatialReference,r.spatialReference)){var n;null==(n=this.tileStore)||n.destroy();const e=new p(i.fromJSON(r));this.tileStore=new a(e)}for(await this._createProcessorAndController(t),await this.update({config:t},!0),this.tileStore.clear(),this.tileStore.updateTiles(s),this._paused=!1;this._pendingTileUpdates.length;)this.tileStore.updateTiles(this._pendingTileUpdates.pop())}async updateTiles(e){this._paused?this._pendingTileUpdates.push(e):this.tileStore.updateTiles(e)}async update({config:e},t=!1){const r=c.empty();return t||this.controller.pause(),await Promise.all([this.processor.update(r,e),this.controller.update(r,e)]),r.toJSON()}async applyUpdate(e){return this.controller.applyUpdate(c.create(e))}async _createProcessorAndController(e){await Promise.all([this._handleControllerConfig(e),this._handleProcessorConfig(e)]),this.controller.processor=this.processor}async _handleControllerConfig(e){const t=await this._createController(this.service,e);return await t.startup(),t}async _handleProcessorConfig(e){return this._createProcessor(this.service,e)}async _createController(e,t){this.controller&&this.controller.destroy();const{tileStore:r,remoteClient:s}=this,o=new n({service:e,config:t,tileStore:r,remoteClient:s});return this.controller=o,o}async _createProcessor(e,t){const r=t.schema.processors[0].type,s=(await l(r)).default,{remoteClient:o,tileStore:i}=this,n=new s({service:e,config:t,tileStore:i,remoteClient:o});return this.processor&&this.processor.destroy(),this.processor=n,n}};e([r()],d.prototype,"controller",void 0),e([r()],d.prototype,"processor",void 0),e([r()],d.prototype,"updating",null),e([r()],d.prototype,"viewState",void 0),d=e([s("esri.views.2d.layers.features.Pipeline")],d);const m=d;export{m as default,u as getInstances};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{WGLGeometryType as e}from"../../engine/webgl/enums.js";import{createMaterialKey as t}from"../../engine/webgl/materialKey/MaterialKey.js";function r(e){if("line-marker"===e.type){var t;return{type:"line-marker",color:null==(t=e.color)?void 0:t.toJSON(),placement:e.placement,style:e.style}}return e.constructor.fromJSON(e.toJSON()).toJSON()}function a(e){return hydrateKey(e)}function l(e,t,a){if(!e)return null;switch(e.type){case"simple-fill":case"picture-fill":return s(e,t,a);case"simple-marker":case"picture-marker":return o(e,t,a);case"simple-line":return i(e,t,a);case"text":return u(e,t,a);case"label":return n(e,t,a);case"cim":return{type:"cim",rendererKey:t.vvFlags,data:e.data,maxVVSize:t.maxVVSize};case"CIMSymbolReference":return{type:"cim",rendererKey:t.vvFlags,data:e,maxVVSize:t.maxVVSize};case"web-style":return{...r(e),type:"web-style",hash:e.hash(),rendererKey:t.vvFlags,maxVVSize:t.maxVVSize};default:throw new Error(`symbol not supported ${e.type}`)}}function n(r,l,n){const s=r.toJSON(),i=t(e.LABEL,{...l,placement:s.labelPlacement});return{materialKey:n?a(i):i,hash:r.hash(),...s,labelPlacement:s.labelPlacement}}function s(l,n,s){const i=n.supportsOutlineFills,o=t(e.FILL,{...n,isOutlinedFill:i}),u=s?a(o):o,c=l.clone(),h=c.outline;n.supportsOutlineFills||(c.outline=null);const m={materialKey:u,hash:c.hash(),isOutlinedFill:!!n.supportsOutlineFills,...r(c)};if(n.supportsOutlineFills)return m;const p=[];if(p.push(m),h){const l=t(e.LINE,{...n,isOutline:!0}),i={materialKey:s?a(l):l,hash:h.hash(),...r(h)};p.push(i)}return{type:"composite-symbol",layers:p,hash:p.reduce(((e,t)=>t.hash+e),"")}}function i(l,n,s){const i=t(e.LINE,n),o=s?a(i):i,u=l.clone(),c=u.marker;u.marker=null;const h=[];if(h.push({materialKey:o,hash:u.hash(),...r(u)}),c){var m;const l=t(e.MARKER,n),i=s?a(l):l;c.color=null!=(m=c.color)?m:u.color,h.push({materialKey:i,hash:c.hash(),lineWidth:u.width,...r(c)})}return{type:"composite-symbol",layers:h,hash:h.reduce(((e,t)=>t.hash+e),"")}}function o(l,n,s){const i=t(e.MARKER,n),o=s?a(i):i,u=r(l);return{materialKey:o,hash:l.hash(),...u,angle:l.angle,maxVVSize:n.maxVVSize}}function u(l,n,s){const i=t(e.TEXT,n),o=s?a(i):i,u=r(l);return{materialKey:o,hash:l.hash(),...u,angle:l.angle,maxVVSize:n.maxVVSize}}export{l as createSymbolSchema};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/has.js";import{isSome as t,
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/has.js";import{isSome as t,applySome as s}from"../../../../../core/maybe.js";import"../../../../../core/Logger.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/accessorSupport/set.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{diff as i}from"../../../../../core/accessorSupport/diffUtils.js";import{calculateHeatmapIntensityInfoReaders as o}from"../../../../../renderers/support/heatmapUtils.js";import{TILE_SIZE as a}from"../../../engine/webgl/definitions.js";import n from"./BaseProcessor.js";import{getPow2NeighborKey as d}from"../support/tileUtils.js";class p{constructor(e,t){this.offset=e,this.extent=t}}function c(e){const t=e.key,s=new Map,r=256,i=a,o=e.tileInfoView.tileInfo.isWrappable;return s.set(d(t,-1,-1,o).id,new p([-i,-i],[i-r,i-r,i,i])),s.set(d(t,0,-1,o).id,new p([0,-i],[0,i-r,i,i])),s.set(d(t,1,-1,o).id,new p([i,-i],[0,i-r,r,i])),s.set(d(t,-1,0,o).id,new p([-i,0],[i-r,0,i,i])),s.set(d(t,1,0,o).id,new p([i,0],[0,0,r,i])),s.set(d(t,-1,1,o).id,new p([-i,i],[i-r,0,i,r])),s.set(d(t,0,1,o).id,new p([0,i],[0,0,i,r])),s.set(d(t,1,1,o).id,new p([i,i],[0,0,r,r])),s}let l=class extends n{constructor(){super(...arguments),this.type="heatmap",this._tileKeyToFeatureSets=new Map}initialize(){this.handles.add([this.tileStore.on("update",this.onTileUpdate.bind(this))])}async update(e,t){const s=t.schema.processors[0];if("heatmap"!==s.type)return;i(this._schema,s)&&(e.mesh=!0,this._schema=s)}onTileUpdate(e){for(const t of e.removed)this._tileKeyToFeatureSets.delete(t.key.id)}onTileClear(e){const t={clear:!0};return this._tileKeyToFeatureSets.delete(e.key.id),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:t})}async onTileMessage(e,r,i){this._tileKeyToFeatureSets.has(e.key.id)||this._tileKeyToFeatureSets.set(e.key.id,new Map);const a=this._tileKeyToFeatureSets.get(e.key.id);if(t(r.addOrUpdate)&&r.addOrUpdate.hasFeatures&&a.set(r.addOrUpdate.instance,r),r.end){const t=[],r=c(e);this._tileKeyToFeatureSets.forEach(((i,o)=>{if(o===e.key.id)i.forEach((e=>s(e.addOrUpdate,(e=>t.push(e)))));else if(r.has(o)){const e=r.get(o),[a,n]=e.offset;i.forEach((e=>s(e.addOrUpdate,(e=>{const s=e.transform(a,n,1,1);t.push(s)}))))}}));const a=o(t,this._schema.mesh,512,512),n={tileKey:e.key.id,intensityInfo:a},d=[a.matrix];return this.remoteClient.invoke("tileRenderer.onTileData",n,{...i,transferList:d})}}onTileError(e,t,s){return this.remoteClient.invoke("tileRenderer.onTileError",{tileKey:e.id,error:t},s)}};l=e([r("esri.views.2d.layers.features.processors.HeatmapProcessor")],l);const h=l;export{h as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../../chunks/tslib.es6.js";import{bidiText as t}from"../../../../../core/BidiText.js";import"../../../../../core/Error.js";import s from"../../../../../core/has.js";import r from"../../../../../core/Logger.js";import{
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import{bidiText as t}from"../../../../../core/BidiText.js";import"../../../../../core/Error.js";import s from"../../../../../core/has.js";import r from"../../../../../core/Logger.js";import{applySome as i,isNone as a,isSome as o,unwrapOrThrow as n,unwrap as l}from"../../../../../core/maybe.js";import{throwIfAborted as c,all as d,isAbortError as f}from"../../../../../core/promiseUtils.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/accessorSupport/set.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators/subclass.js";import{diff as u,hasDiff as m}from"../../../../../core/accessorSupport/diffUtils.js";import p from"../../../../../geometry/SpatialReference.js";import{isAggregateId as g}from"../../../engine/webgl/DisplayId.js";import{MeshData as y}from"../../../engine/webgl/mesh/MeshData.js";import{WGLMeshFactory as _}from"../../../engine/webgl/mesh/factories/WGLMeshFactory.js";import{WGLTemplateStore as b}from"../../../engine/webgl/mesh/templates/WGLTemplateStore.js";import{createMatcher as S}from"../../../engine/webgl/util/Matcher.js";import{codepoints as w}from"../textUtils.js";import I from"./BaseProcessor.js";import M from"../support/ResourceManagerProxy.js";function v(e,t){return(!e.minScale||e.minScale>=t)&&(!e.maxScale||e.maxScale<=t)}function x(e){const t=e.message,s={message:{data:{},tileKey:t.tileKey,tileKeyOrigin:t.tileKeyOrigin},transferList:new Array};for(const r in t.data){const e=t.data[r];if(s.message.data[r]=null,o(e)){const t=e.stride,a=e.indices.slice(0),o=e.vertices.slice(0),n=e.records.slice(0),l={stride:t,indices:a,vertices:o,records:n,metrics:i(e.metrics,(e=>e.slice(0)))};s.transferList.push(a,o,n),s.message.data[r]=l}}return s}r.getLogger("esri.views.2d.layers.features.processors.SymbolProcessor");let j=class extends I{constructor(){super(...arguments),this.type="symbol",this._matchers={feature:null,aggregate:null},this._bufferData=new Map,this._bufferIds=new Map}initialize(){this.handles.add([this.tileStore.on("update",this.onTileUpdate.bind(this))]),this._resourceManagerProxy=new M(this.remoteClient)}destroy(){this._resourceManagerProxy.destroy()}get supportsTileUpdates(){return!0}forEachBufferId(e){this._bufferIds.forEach((t=>{t.forEach(e)}))}async update(e,t){const r=t.schema.processors[0];if("symbol"!==r.type)return;const i=u(this._schema,r);m(i,"mesh")&&(s("esri-2d-update-debug")&&console.debug("Applying Update - Processor:",i),e.mesh=!0,e.why.mesh.push("Symbology changed"),this._schema=r,this._factory=this._createFactory(r),this._factory.update(r,this.tileStore.tileScheme.tileInfo))}onTileMessage(e,t,s,r){return c(r),this._onTileData(e,t,s,r)}onTileClear(e){const t={clear:!0};return this._bufferData.delete(e.key.id),this._bufferIds.delete(e.key.id),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:t})}onTileError(e,t,s){const r=s.signal,i={tileKey:e.id,error:t};return this.remoteClient.invoke("tileRenderer.onTileError",i,{signal:r})}onTileUpdate(e){for(const t of e.removed)this._bufferData.has(t.key.id)&&this._bufferData.delete(t.key.id),this._bufferIds.has(t.key.id)&&this._bufferIds.delete(t.key.id);for(const t of e.added)this._bufferData.forEach((e=>{for(const s of e)s.message.tileKey===t.id&&this._updateTileMesh("append",t,x(s),[],!1,!1,null)}))}_addBufferData(e,t){this._bufferData.has(e)||this._bufferData.set(e,[]),this._bufferData.get(e).push(x(t))}_createFactory(e){const{geometryType:t,objectIdField:s,fields:r}=this.service,a=(e,t)=>this.remoteClient.invoke("tileRenderer.getMaterialItems",e,t),o={geometryType:t,fields:r,spatialReference:p.fromJSON(this.spatialReference)},n=new b(a,this.tileStore.tileScheme.tileInfo),{matcher:l,aggregateMatcher:c}=e.mesh;return this._store=n,this._matchers.feature=S(l,n,o,this._resourceManagerProxy),this._matchers.aggregate=i(c,(e=>S(e,n,o,this._resourceManagerProxy))),new _(t,s,n)}async _onTileData(e,t,s,r){c(r);const{type:i,addOrUpdate:n,remove:l}=t,f=t.end,h=!!this._schema.mesh.sortKey;if(!n){const t={type:i,addOrUpdate:null,remove:l,clear:!1,end:f,sort:h};return this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:t},r)}const u=this._processFeatures(e,n,s,r);try{const s=await u;if(a(s)){const t={type:i,addOrUpdate:null,remove:l,clear:!1,end:f,sort:h};return this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:t},r)}const n=[];for(const t of s){let s=!1;const r=t.message.bufferIds,i=e.key.id,a=t.message.tileKey;if(i!==a&&o(r)){if(!this.tileStore.get(a)){this._addBufferData(i,t),n.push(t);continue}let e=this._bufferIds.get(a);e||(e=new Set,this._bufferIds.set(a,e));const o=Array.from(r);for(const t of o){if(e.has(t)){s=!0;break}e.add(t)}}s||(this._addBufferData(i,t),n.push(t))}await d(n.map((s=>{const a=e.key.id===s.message.tileKey,o=a?t.remove:[],n=a&&t.end;return this._updateTileMesh(i,e,s,o,n,t.clear,r.signal)})))}catch(m){this._handleError(e,m,r)}}async _updateTileMesh(e,t,s,r,a,o,n){const d=e,f=s.message.tileKey,h=!!this._schema.mesh.sortKey;f!==t.key.id&&(a=!1);const u=i(s,(e=>e.message)),m=i(s,(e=>e.transferList))||[],p={type:d,addOrUpdate:u,remove:r,clear:!1,end:a,sort:h},g={transferList:l(m)||[],signal:n};return c(g),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:f,data:p},g)}async _processFeatures(e,t,s,r){if(a(t)||!t.hasFeatures)return null;const i={transform:e.transform,hasZ:!1,hasM:!1},o=this._factory,n={viewingMode:"",scale:e.scale},l=await this._matchers.feature,d=await this._matchers.aggregate;c(r);const f=this._getLabelInfos(e,t);return await o.analyze(t.getCursor(),this._resourceManagerProxy,l,d,i,n),c(r),this._writeFeatureSet(e,t,i,f,o,s)}_writeFeatureSet(e,t,s,r,i,a){const n=t.getSize(),l=new y(e.key.id,{features:n,records:n,metrics:0},this._schema.mesh.matcher.stride,a,!0),c={viewingMode:"",scale:e.scale},d=t.getCursor();for(;d.next();)try{const t=d.getDisplayId(),a=o(r)?r.get(t):null;i.writeCursor(l,d,s,c,e.level,a,this._resourceManagerProxy)}catch(h){}const f=e.tileInfoView.tileInfo.isWrappable;return l.serialize(f)}_handleError(e,t,s){if(!f(t)){const r={tileKey:e.id,error:t.message};return this.remoteClient.invoke("tileRenderer.onTileError",r,{signal:s.signal})}}_getLabelingSchemaForScale(e){const t=this._schema.mesh.labels;if(a(t))return null;if("subtype"===t.type){const s={type:"subtype",classes:{}};let r=!1;for(const i in t.classes){const a=t.classes[i].filter((t=>v(t,e.scale)));r=r||!!a.length,s.classes[i]=a}return r?s:null}const s=t.classes.filter((t=>v(t,e.scale)));return s.length?{type:"simple",classes:s}:null}_getLabels(e,t){if("subtype"===t.type){var s;const r=this.service.subtypeField,i=n(r,"Expected to find subtype Field"),a=e.readAttribute(i);return null==a?[]:null!=(s=t.classes[a])?s:[]}return t.classes}_getLabelInfos(e,s){const r=this._getLabelingSchemaForScale(e);if(a(r))return null;const i=new Map,o=s.getCursor();for(;o.next();){const e=o.getDisplayId(),s=[],a=g(e),n=a&&1!==o.readAttribute("cluster_count")?"aggregate":"feature",l=this._getLabels(o,r);for(const r of l){if(r.target!==n)continue;const i=o.getStorage(),l=a&&"feature"===n?i.getComputedStringAtIndex(o.readAttribute("referenceId"),r.fieldIndex):i.getComputedStringAtIndex(e,r.fieldIndex);if(!l)continue;const c=t(l.toString()),d=c[0],f=c[1];this._store.getMosaicItem(r.symbol,w(d)).then((e=>{s[r.index]={glyphs:e.glyphMosaicItems,rtl:f,index:r.index}}))}i.set(e,s)}return i}};j=e([h("esri.views.2d.layers.features.processors.SymbolProcessor")],j);const T=j;export{T as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../renderers/ClassBreaksRenderer.js";import"../../../../renderers/DictionaryRenderer.js";import"../../../../renderers/DotDensityRenderer.js";import"../../../../renderers/HeatmapRenderer.js";import"../../../../renderers/Renderer.js";import e from"../../../../renderers/SimpleRenderer.js";import"../../../../renderers/UniqueValueRenderer.js";import"../../../../renderers/support/jsonUtils.js";import t from"../../../../core/Error.js";import r from"../../../../core/has.js";import{clone as i}from"../../../../core/lang.js";import n from"../../../../core/Logger.js";import{isSome as l,unwrap as s,isNone as a,unwrapOr as o}from"../../../../core/maybe.js";import{pt2px as u}from"../../../../core/screenUtils.js";import{fromJSON as d}from"../../../../symbols/support/jsonUtils.js";import{WGLGeometryType as f}from"../../engine/webgl/enums.js";import{getVVType as c}from"../../engine/webgl/Utils.js";import{createMaterialKey as p,hydrateMaterialKey as m}from"../../engine/webgl/materialKey/MaterialKey.js";import{getVVFlags as y}from"../../engine/webgl/util/vvFlagUtils.js";import{getPtMaxVVSize as g}from"./support/pixelBuffering.js";import{simplifyVisualVariables as b}from"./support/rendererUtils.js";import{createClusterRenderer as h}from"../support/clusterUtils.js";import{toJSONGeometryType as x}from"../support/util.js";const v=n.getLogger("esri.views.2d.layers.features.schemaUtils"),w="ValidationError",S={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along"],esriGeometryMultipoint:null};function F(e){return m(e)}function V(e){return e}function E(e){if("line-marker"===e.type){var t;return{type:"line-marker",color:null==(t=e.color)?void 0:t.toJSON(),placement:e.placement,style:e.style}}return d(e.toJSON()).toJSON()}function I(e){let t=0,r=0,i=!1,n=!0,s=!0;if(l(e)&&(r=g(e),"visualVariables"in e&&(t=y(e.visualVariables||[]),i="dot-density"===e.type),!i)){const t=e.getSymbols();"backgroundFillSymbol"in e&&e.backgroundFillSymbol&&t.push(e.backgroundFillSymbol);for(const e of t)if("cim"===e.type&&(n=!1),"simple-fill"===e.type||"picture-fill"===e.type){const t=e.outline;t&&"none"!==t.style&&"solid"!==t.style&&(s=!1);const r=t&&"none"!==t.style&&"solid"!==t.style,i="simple-fill"===e.type&&"none"!==e.style&&"solid"!==e.style;("picture-fill"===e.type||i||r)&&(n=!1)}}return i&&(s=!1),{vvFlags:t,maxVVSize:r,supportsOutlineFills:s,stride:{fill:i?"dot-density":n?"simple":"default"}}}function z(e,t,r){return j(e,I(t),r)}function j(e,t,r){if(!e)return null;switch(e.type){case"simple-fill":case"picture-fill":return R(e,t,r);case"simple-marker":case"picture-marker":return N(e,t,r);case"simple-line":return T(e,t,r);case"text":return O(e,t,r);case"label":return M(e,t,r);case"cim":return{type:"cim",rendererKey:t.vvFlags,data:e.data,maxVVSize:t.maxVVSize};case"CIMSymbolReference":return{type:"cim",rendererKey:t.vvFlags,data:e,maxVVSize:t.maxVVSize};case"web-style":return{...E(e),type:"web-style",hash:e.hash(),rendererKey:t.vvFlags,maxVVSize:t.maxVVSize};default:throw new Error(`symbol not supported ${e.type}`)}}function R(e,t,r){const i=t.supportsOutlineFills,n=p(f.FILL,{...t,isOutlinedFill:i}),l=r?F(n):n,s=e.clone(),a=s.outline;t.supportsOutlineFills||(s.outline=null);const o={materialKey:l,hash:s.hash(),isOutlinedFill:!!t.supportsOutlineFills,...E(s)};if(t.supportsOutlineFills)return o;const u=[];if(u.push(o),a){const e=p(f.LINE,{...t,isOutline:!0}),i={materialKey:r?F(e):e,hash:a.hash(),...E(a)};u.push(i)}return{type:"composite-symbol",layers:u,hash:u.reduce(((e,t)=>t.hash+e),"")}}function T(e,t,r){const i=p(f.LINE,t),n=r?F(i):i,l=e.clone(),s=l.marker;l.marker=null;const a=[];if(a.push({materialKey:n,hash:l.hash(),...E(l)}),s){var o;const e=p(f.MARKER,t),i=r?F(e):e;s.color=null!=(o=s.color)?o:l.color,a.push({materialKey:i,hash:s.hash(),lineWidth:l.width,...E(s)})}return{type:"composite-symbol",layers:a,hash:a.reduce(((e,t)=>t.hash+e),"")}}function N(e,t,r){const i=p(f.MARKER,t),n=r?F(i):i,l=E(e);return{materialKey:n,hash:e.hash(),...l,angle:e.angle,maxVVSize:t.maxVVSize}}function O(e,t,r){const i=p(f.TEXT,t),n=r?F(i):i,l=E(e);return{materialKey:n,hash:e.hash(),...l,angle:e.angle,maxVVSize:t.maxVVSize}}function k(e,r){const i=e.labelPlacement,n=S[r];if(!e.symbol)return v.warn("No ILabelClass symbol specified."),!0;if(!n)return v.error(new t("mapview-labeling:unsupported-geometry-type",`Unable to create labels for Feature Layer, ${r} is not supported`)),!0;if(!n.some((e=>e===i))){const t=n[0];i&&v.warn(`Found invalid label placement type ${i} for ${r}. Defaulting to ${t}`),e.labelPlacement=t}return!1}function K(e,t){const r=i(e);return r.some((e=>k(e,t)))?[]:r}function M(e,t,r){const i=e.toJSON(),n=p(f.LABEL,{...t,placement:i.labelPlacement});return{materialKey:r?F(n):n,hash:e.hash(),...i,labelPlacement:i.labelPlacement}}function B(e){return r("esri-2d-update-debug")&&console.debug("Created new schema",L(e,!0)),L(e)}function L(e,t=!1){try{var r,i;const n=A(e,t),l={};n.map((t=>P(l,e,t)));return{source:{definitionExpression:e.definitionExpression,fields:e.fields.map((e=>e.toJSON())),gdbVersion:e.gdbVersion,historicMoment:null==(r=e.historicMoment)?void 0:r.getTime(),outFields:e.availableFields,pixelBuffer:e.pixelBuffer,spatialReference:e.spatialReference.toJSON(),timeExtent:null==(i=e.timeExtent)?void 0:i.toJSON(),customParameters:e.customParameters},attributes:{fields:{},indexCount:0},processors:n,targets:l}}catch(n){if(n.fieldName===w)return v.error(n),null;throw n}}function P(e,r,i){switch(i.target){case"feature":return void U(e,C(r),i);case"aggregate":{if(!("featureReduction"in r))return;const n=r.featureReduction;if("selection"===n.type)throw new t(w,"Mapview does not support `selection` reduction type",n);return U(e,C(r),i),void D(e,n,i)}}}function J(e,t){for(const r in t){const i=t[r];if(i.target!==e.name)continue;const n=e.attributes[r];n?(n.context.mesh=n.context.mesh||i.context.mesh,n.context.storage=n.context.storage||i.context.storage):e.attributes[r]=i}return e}function C(e){var t,r,i,n,l;return[null!=(t=null==(r=s(e.filter))?void 0:r.toJSON())?t:null,null!=(i=null==(n=s(null==(l=s(e.featureEffect))?void 0:l.filter))?void 0:n.toJSON())?i:null]}function U(e,t,r){return e.feature||(e.feature={name:"feature",input:"source",filters:t,attributes:{}}),J(e.feature,r.attributes.fields),e}function D(e,t,r){return e.aggregate||(e.aggregate={name:"aggregate",input:"feature",filters:null,attributes:{},params:{clusterRadius:u(t.clusterRadius/2),clusterPixelBuffer:64*Math.ceil(u(t.clusterMaxSize)/64),fields:r.aggregateFields}}),J(e.aggregate,r.attributes.fields),e}function $(e,t){return t.field?q(e,{...t,type:"field",field:t.field}):t.valueExpression?q(e,{...t,type:"expression",valueExpression:t.valueExpression}):{field:null,fieldIndex:null}}function q(e,t){switch(t.type){case"expression":{const r=V(t.valueExpression);if(!e.fields[r]){const i=e.indexCount++;e.fields[r]={...t,name:r,fieldIndex:i}}return{fieldIndex:e.fields[r].fieldIndex}}case"label-expression":{const r=V(JSON.stringify(t.label));if(!e.fields[r]){const i=e.indexCount++;e.fields[r]={...t,name:r,fieldIndex:i}}return{fieldIndex:e.fields[r].fieldIndex}}case"field":{const r=t.field;return"aggregate"===t.target&&e.fields[r]||(e.fields[r]={...t,name:r}),{field:r}}case"statistic":return e.fields[t.name]={...t},{field:t.name}}}function A(e,t=!1){const r=new Array;let i=0;return r.push(H(e,i++,t)),r}function G(e,t,r,i,n,l=!1){const s=q(t,{type:"label-expression",target:i,context:{mesh:!0},resultType:"string",label:{labelExpression:r.labelExpression,labelExpressionInfo:r.labelExpressionInfo?{expression:r.labelExpressionInfo.expression}:null,symbol:!!r.symbol,where:r.where}}),{fieldIndex:a}=s;return{...z(r,e,l),fieldIndex:a,target:i,index:n}}function H(r,i,n=!1){const s={indexCount:0,fields:{}},a="featureReduction"in r&&r.featureReduction,o=a?"aggregate":"feature";if("sublayers"in r){const e={type:"subtype",subtypeField:r.subtypeField,renderers:{},stride:{fill:"default"}},i={type:"subtype",mapping:{},target:"feature"},a={type:"subtype",classes:{}},u={type:"symbol",target:"feature",aggregateFields:[],attributes:s,storage:i,mesh:{matcher:e,aggregateMatcher:null,labels:a,sortKey:null}},d=new Set;let f=0;for(const{renderer:c,subtypeCode:p,labelingInfo:m,labelsVisible:y}of r.sublayers){const r=_(s,o,c,n),u=Q(s,o,c),g=y&&m;if("visualVariables"in c&&c.visualVariables&&c.visualVariables.length)throw new t(w,"Visual variables are currently not supported for subtype layers");if("dictionary"===r.type)throw new t(w,"Dictionary renderer is not supported in subtype layers");if("subtype"===r.type)throw new t(w,"Nested subtype renderers is not supported");if(l(u)&&"subtype"===u.type)throw new t(w,"Nested subtype storage is not supported");if(l(u)&&"dot-density"===u.type)throw new t(w,"Dot density attributes are not supported in subtype layers");if(d.has(p))throw new t(w,"Subtype codes for sublayers must be unique");d.add(p),e.renderers[p]=r,i.mapping[p]=u,g&&(a.classes[p]=g.map((e=>G(c,s,e,"feature",f++,n))))}return u}if("heatmap"===r.renderer.type){const{blurRadius:e,fieldOffset:t,field:i}=r.renderer;return{type:"heatmap",aggregateFields:[],attributes:s,target:o,storage:null,mesh:{blurRadius:e,fieldOffset:t,field:$(s,{target:o,field:i,resultType:"numeric"}).field}}}{const i=[],l="aggregate"===o?h(i,r.renderer,a,null):r.renderer;X(s,i);const u=_(s,o,l,n);let d=null;const f=Q(s,o,l),c=x(r.geometryType);let p=r.labelsVisible&&r.labelingInfo||[],m=[];if(a){if("selection"===a.type)throw new t(w,"Mapview does not support `selection` reduction type",a);if(a.symbol){const t=new e({symbol:a.symbol,visualVariables:"visualVariables"in l?l.visualVariables:null});d=_(s,o,t,n)}m=a&&a.labelsVisible&&a.labelingInfo||[]}p=K(p,c),m=K(m,c);let y=0;const g=[...p.map((e=>G(l,s,e,"feature",y++,n))),...m.map((e=>G(l,s,e,"aggregate",y++,n)))],b=W(s,r.orderBy);return{type:"symbol",target:o,attributes:s,aggregateFields:i,storage:f,mesh:{matcher:u,labels:{type:"simple",classes:g},aggregateMatcher:d,sortKey:b}}}}function W(e,r){if(a(r)||!r.length)return null;r.length>1&&v.warn(`Layer rendering currently only supports ordering by 1 orderByInfo, but found ${r.length}. All but the first will be discarded`);const i=r[0],n="ascending"===i.order?"asc":"desc";if(i.field)return{field:i.field,order:n};if(i.valueExpression){return{fieldIndex:q(e,{type:"expression",target:"feature",valueExpression:i.valueExpression,resultType:"numeric"}).fieldIndex,order:n}}return v.error(new t(w,"Expected to find a field or valueExpression for OrderByInfo",i)),null}function X(e,t){const r={mesh:!0,storage:!0};for(const i of t){const{name:t,outStatistic:n}=i,{statisticType:l,onStatisticField:s}=n;let a=null,o=null,u=null;const d="numeric",f="feature";if("onStatisticValueExpression"in n){o=q(e,{type:"expression",target:f,valueExpression:n.onStatisticValueExpression,resultType:d}).fieldIndex}else if("onStatisticNormalizationField"in n){a=q(e,{type:"field",target:f,field:s,resultType:d}).field,u=n.onStatisticNormalizationField}else{a=q(e,{type:"field",target:f,field:s,resultType:d}).field}q(e,{type:"statistic",target:"aggregate",name:t,context:r,inField:a,inNormalizationField:u,inFieldIndex:o,statisticType:l})}}function Q(e,t,r){switch(r.type){case"dot-density":return Y(e,t,r.attributes);case"simple":case"class-breaks":case"unique-value":case"dictionary":return Z(e,t,r.visualVariables);case"heatmap":return null}}function Y(e,t,r){if(!r||!r.length)return{type:"dot-density",mapping:[],target:t};return{type:"dot-density",mapping:r.map(((r,i)=>{const{field:n,fieldIndex:l}=$(e,{valueExpression:r.valueExpression,field:r.field,resultType:"numeric",target:t});return{binding:i,field:n,fieldIndex:l}})),target:t}}function Z(e,t,r){if(!r||!r.length)return{type:"visual-variable",mapping:[],target:t};const i={storage:!0},n="numeric";return{type:"visual-variable",mapping:b(r).map((r=>{var l;const s=c(r.type),{field:a,fieldIndex:o}=$(e,{target:t,valueExpression:r.valueExpression,field:r.field,context:i,resultType:n});switch(r.type){case"size":return"$view.scale"===r.valueExpression?null:{type:"size",binding:s,field:a,fieldIndex:o,normalizationField:$(e,{target:t,field:r.normalizationField,context:i,resultType:n}).field,valueRepresentation:null!=(l=r.valueRepresentation)?l:null};case"color":return{type:"color",binding:s,field:a,fieldIndex:o,normalizationField:$(e,{target:t,field:r.normalizationField,context:i,resultType:n}).field};case"opacity":return{type:"opacity",binding:s,field:a,fieldIndex:o,normalizationField:$(e,{target:t,field:r.normalizationField,context:i,resultType:n}).field};case"rotation":return{type:"rotation",binding:s,field:a,fieldIndex:o}}})).filter((e=>e)),target:t}}function _(e,t,r,i=!1){const n=o(e,{indexCount:0,fields:{}});switch(r.type){case"simple":case"dot-density":return ee(n,r,i);case"class-breaks":return te(n,t,r,i);case"unique-value":return re(n,t,r,i);case"dictionary":return ie(n,r,i)}}function ee(e,t,r=!1){const i=t.getSymbols(),n=i.length?i[0]:null,{stride:l}=I(t);return{type:"simple",symbol:z(n,t,r),stride:l}}function te(e,t,r,i=!1){const n={mesh:!0,use:"renderer.field"},l=r.backgroundFillSymbol,{field:s,fieldIndex:a}=$(e,{target:t,field:r.field,valueExpression:r.valueExpression,resultType:"numeric",context:n}),o=r.normalizationType,u="log"===o?"esriNormalizeByLog":"percent-of-total"===o?"esriNormalizeByPercentOfTotal":"field"===o?"esriNormalizeByField":null,d=I(r),f=r.classBreakInfos.map((e=>({symbol:j(e.symbol,d,i),min:e.minValue,max:e.maxValue}))).sort(((e,t)=>e.min-t.min));return{type:"interval",attributes:e.fields,field:s,fieldIndex:a,backgroundFillSymbol:j(l,d,i),defaultSymbol:j(r.defaultSymbol,d,i),intervals:f,normalizationField:r.normalizationField,normalizationTotal:r.normalizationTotal,normalizationType:u,isMaxInclusive:r.isMaxInclusive,stride:d.stride}}function re(e,r,i,n=!1){const l=[],s=i.backgroundFillSymbol,a={target:r,context:{mesh:!0},resultType:"string"};if(i.field&&"string"!=typeof i.field)throw new t(w,"Expected renderer.field to be a string",i);const{field:o,fieldIndex:u}=$(e,{...a,field:i.field,valueExpression:i.valueExpression}),d=I(i);for(const t of i.uniqueValueInfos)l.push({value:""+t.value,symbol:j(t.symbol,d,n)});return{type:"map",attributes:e.fields,field:o,fieldIndex:u,field2:$(e,{...a,field:i.field2}).field,field3:$(e,{...a,field:i.field3}).field,fieldDelimiter:i.fieldDelimiter,backgroundFillSymbol:j(s,d),defaultSymbol:j(i.defaultSymbol,d),map:l,stride:d.stride}}function ie(e,t,r=!1){return{type:"dictionary",renderer:t.toJSON(),stride:{fill:"default"}}}export{X as addAggregateFields,_ as createMatcherSchema,B as createSchema,z as createSymbolSchema,I as createSymbolSchemaOptions};
|
|
5
|
+
import e from"../../../../core/Error.js";import t from"../../../../core/has.js";import{clone as i}from"../../../../core/lang.js";import r from"../../../../core/Logger.js";import{isSome as l,unwrap as n,isNone as s,unwrapOr as o}from"../../../../core/maybe.js";import{pt2px as a}from"../../../../core/screenUtils.js";import{getVVType as u}from"../../engine/webgl/Utils.js";import{getVVFlags as d}from"../../engine/webgl/util/vvFlagUtils.js";import{createSymbolSchema as f}from"./createSymbolSchema.js";export{createSymbolSchema}from"./createSymbolSchema.js";import{getPtMaxVVSize as c}from"./support/pixelBuffering.js";import{simplifyVisualVariables as p}from"./support/rendererUtils.js";import{createClusterRenderer as m}from"../support/clusterUtils.js";import{toJSONGeometryType as y}from"../support/util.js";const g=r.getLogger("esri.views.2d.layers.features.schemaUtils"),b="ValidationError",x={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along"],esriGeometryMultipoint:null};function v(e){return e}function h(e){let t=0,i=0,r=!1,n=!0,s=!0;if(l(e)){if(i=c(e),"visualVariables"in e&&(t=d(e.visualVariables||[]),r="dot-density"===e.type),"dictionary"===e.type)return{maxVVSize:i,supportsOutlineFills:!1,vvFlags:t,stride:{fill:"default"}};if(!r){const t=e.getSymbols();"backgroundFillSymbol"in e&&e.backgroundFillSymbol&&t.push(e.backgroundFillSymbol);for(const e of t)if("cim"===e.type&&(n=!1),"simple-fill"===e.type||"picture-fill"===e.type){const t=e.outline;t&&"none"!==t.style&&"solid"!==t.style&&(s=!1);const i=t&&"none"!==t.style&&"solid"!==t.style,r="simple-fill"===e.type&&"none"!==e.style&&"solid"!==e.style;("picture-fill"===e.type||r||i)&&(n=!1)}}}return r&&(s=!1),{vvFlags:t,maxVVSize:i,supportsOutlineFills:s,stride:{fill:r?"dot-density":n?"simple":"default"}}}function w(t,i){const r=t.labelPlacement,l=x[i];if(!t.symbol)return g.warn("No ILabelClass symbol specified."),!0;if(!l)return g.error(new e("mapview-labeling:unsupported-geometry-type",`Unable to create labels for Feature Layer, ${i} is not supported`)),!0;if(!l.some((e=>e===r))){const e=l[0];r&&g.warn(`Found invalid label placement type ${r} for ${i}. Defaulting to ${e}`),t.labelPlacement=e}return!1}function F(e,t){const r=i(e);return r.some((e=>w(e,t)))?[]:r}function I(e){return t("esri-2d-update-debug")&&console.debug("Created new schema",E(e,!0)),E(e)}function E(e,t=!1){try{var i,r;const l=O(e,t),n={};l.map((t=>S(n,e,t)));return{source:{definitionExpression:e.definitionExpression,fields:e.fields.map((e=>e.toJSON())),gdbVersion:e.gdbVersion,historicMoment:null==(i=e.historicMoment)?void 0:i.getTime(),outFields:e.availableFields,pixelBuffer:e.pixelBuffer,spatialReference:e.spatialReference.toJSON(),timeExtent:null==(r=e.timeExtent)?void 0:r.toJSON(),customParameters:e.customParameters},attributes:{fields:{},indexCount:0},processors:l,targets:n}}catch(l){if(l.fieldName===b)return g.error(l),null;throw l}}function S(t,i,r){switch(r.target){case"feature":return void V(t,T(i),r);case"aggregate":{if(!("featureReduction"in i))return;const l=i.featureReduction;if("selection"===l.type)throw new e(b,"Mapview does not support `selection` reduction type",l);return V(t,T(i),r),void N(t,l,r)}}}function z(e,t){for(const i in t){const r=t[i];if(r.target!==e.name)continue;const l=e.attributes[i];l?(l.context.mesh=l.context.mesh||r.context.mesh,l.context.storage=l.context.storage||r.context.storage):e.attributes[i]=r}return e}function T(e){var t,i,r,l,s;return[null!=(t=null==(i=n(e.filter))?void 0:i.toJSON())?t:null,null!=(r=null==(l=n(null==(s=n(e.featureEffect))?void 0:s.filter))?void 0:l.toJSON())?r:null]}function V(e,t,i){return e.feature||(e.feature={name:"feature",input:"source",filters:t,attributes:{}}),z(e.feature,i.attributes.fields),e}function N(e,t,i){return e.aggregate||(e.aggregate={name:"aggregate",input:"feature",filters:null,attributes:{},params:{clusterRadius:a(t.clusterRadius/2),clusterPixelBuffer:64*Math.ceil(a(t.clusterMaxSize)/64),fields:i.aggregateFields}}),z(e.aggregate,i.attributes.fields),e}function j(e,t){return t.field?M(e,{...t,type:"field",field:t.field}):t.valueExpression?M(e,{...t,type:"expression",valueExpression:t.valueExpression}):{field:null,fieldIndex:null}}function M(e,t){switch(t.type){case"expression":{const i=v(t.valueExpression);if(!e.fields[i]){const r=e.indexCount++;e.fields[i]={...t,name:i,fieldIndex:r}}return{fieldIndex:e.fields[i].fieldIndex}}case"label-expression":{const i=v(JSON.stringify(t.label));if(!e.fields[i]){const r=e.indexCount++;e.fields[i]={...t,name:i,fieldIndex:r}}return{fieldIndex:e.fields[i].fieldIndex}}case"field":{const i=t.field;return"aggregate"===t.target&&e.fields[i]||(e.fields[i]={...t,name:i}),{field:i}}case"statistic":return e.fields[t.name]={...t},{field:t.name}}}function O(e,t=!1){const i=new Array;let r=0;return i.push(B(e,r++,t)),i}function R(e,t,i,r,l,n=!1){const s=M(t,{type:"label-expression",target:r,context:{mesh:!0},resultType:"string",label:{labelExpression:i.labelExpression,labelExpressionInfo:i.labelExpressionInfo?{expression:i.labelExpressionInfo.expression}:null,symbol:!!i.symbol,where:i.where}}),{fieldIndex:o}=s,a=h(e);return{...f(i,a,n),fieldIndex:o,target:r,index:l}}function B(t,i,r=!1){const n={indexCount:0,fields:{}},s="featureReduction"in t&&t.featureReduction,o=s?"aggregate":"feature";if("sublayers"in t){const i={type:"subtype",subtypeField:t.subtypeField,renderers:{},stride:{fill:"default"}},s={type:"subtype",mapping:{},target:"feature"},a={type:"subtype",classes:{}},u={type:"symbol",target:"feature",aggregateFields:[],attributes:n,storage:s,mesh:{matcher:i,aggregateMatcher:null,labels:a,sortKey:null}},d=new Set;let f=0;for(const{renderer:c,subtypeCode:p,labelingInfo:m,labelsVisible:y}of t.sublayers){const t=L(n,o,c,r),u=C(n,o,c),g=y&&m;if("visualVariables"in c&&c.visualVariables&&c.visualVariables.length)throw new e(b,"Visual variables are currently not supported for subtype layers");if("dictionary"===t.type)throw new e(b,"Dictionary renderer is not supported in subtype layers");if("subtype"===t.type)throw new e(b,"Nested subtype renderers is not supported");if(l(u)&&"subtype"===u.type)throw new e(b,"Nested subtype storage is not supported");if(l(u)&&"dot-density"===u.type)throw new e(b,"Dot density attributes are not supported in subtype layers");if(d.has(p))throw new e(b,"Subtype codes for sublayers must be unique");d.add(p),i.renderers[p]=t,s.mapping[p]=u,g&&(a.classes[p]=g.map((e=>R(c,n,e,"feature",f++,r))))}return u}if("heatmap"===t.renderer.type){const{blurRadius:e,fieldOffset:i,field:r}=t.renderer;return{type:"heatmap",aggregateFields:[],attributes:n,target:o,storage:null,mesh:{blurRadius:e,fieldOffset:i,field:j(n,{target:o,field:r,resultType:"numeric"}).field}}}{const i=[],l="aggregate"===o?m(i,t.renderer,s,null):t.renderer;P(n,i);const a=L(n,o,l,r);let u=null;const d=C(n,o,l),c=y(t.geometryType);let p=t.labelsVisible&&t.labelingInfo||[],g=[];if(s){if("selection"===s.type)throw new e(b,"Mapview does not support `selection` reduction type",s);if(s.symbol){const e=h(l);u={type:"simple",symbol:f(s.symbol,e,r),stride:e.stride}}g=s&&s.labelsVisible&&s.labelingInfo||[]}p=F(p,c),g=F(g,c);let x=0;const v=[...p.map((e=>R(l,n,e,"feature",x++,r))),...g.map((e=>R(l,n,e,"aggregate",x++,r)))],w=k(n,t.orderBy);return{type:"symbol",target:o,attributes:n,aggregateFields:i,storage:d,mesh:{matcher:a,labels:{type:"simple",classes:v},aggregateMatcher:u,sortKey:w}}}}function k(t,i){if(s(i)||!i.length)return null;i.length>1&&g.warn(`Layer rendering currently only supports ordering by 1 orderByInfo, but found ${i.length}. All but the first will be discarded`);const r=i[0],l="ascending"===r.order?"asc":"desc";if(r.field)return{field:r.field,order:l};if(r.valueExpression){return{fieldIndex:M(t,{type:"expression",target:"feature",valueExpression:r.valueExpression,resultType:"numeric"}).fieldIndex,order:l}}return g.error(new e(b,"Expected to find a field or valueExpression for OrderByInfo",r)),null}function P(e,t){const i={mesh:!0,storage:!0};for(const r of t){const{name:t,outStatistic:l}=r,{statisticType:n,onStatisticField:s}=l;let o=null,a=null,u=null;const d="numeric",f="feature";if("onStatisticValueExpression"in l){a=M(e,{type:"expression",target:f,valueExpression:l.onStatisticValueExpression,resultType:d}).fieldIndex}else if("onStatisticNormalizationField"in l){o=M(e,{type:"field",target:f,field:s,resultType:d}).field,u=l.onStatisticNormalizationField}else{o=M(e,{type:"field",target:f,field:s,resultType:d}).field}M(e,{type:"statistic",target:"aggregate",name:t,context:i,inField:o,inNormalizationField:u,inFieldIndex:a,statisticType:n})}}function C(e,t,i){switch(i.type){case"dot-density":return U(e,t,i.attributes);case"simple":case"class-breaks":case"unique-value":case"dictionary":return J(e,t,i.visualVariables);case"heatmap":return null}}function U(e,t,i){if(!i||!i.length)return{type:"dot-density",mapping:[],target:t};return{type:"dot-density",mapping:i.map(((i,r)=>{const{field:l,fieldIndex:n}=j(e,{valueExpression:i.valueExpression,field:i.field,resultType:"numeric",target:t});return{binding:r,field:l,fieldIndex:n}})),target:t}}function J(e,t,i){if(!i||!i.length)return{type:"visual-variable",mapping:[],target:t};const r={storage:!0},l="numeric";return{type:"visual-variable",mapping:p(i).map((i=>{var n;const s=u(i.type),{field:o,fieldIndex:a}=j(e,{target:t,valueExpression:i.valueExpression,field:i.field,context:r,resultType:l});switch(i.type){case"size":return"$view.scale"===i.valueExpression?null:{type:"size",binding:s,field:o,fieldIndex:a,normalizationField:j(e,{target:t,field:i.normalizationField,context:r,resultType:l}).field,valueRepresentation:null!=(n=i.valueRepresentation)?n:null};case"color":return{type:"color",binding:s,field:o,fieldIndex:a,normalizationField:j(e,{target:t,field:i.normalizationField,context:r,resultType:l}).field};case"opacity":return{type:"opacity",binding:s,field:o,fieldIndex:a,normalizationField:j(e,{target:t,field:i.normalizationField,context:r,resultType:l}).field};case"rotation":return{type:"rotation",binding:s,field:o,fieldIndex:a}}})).filter((e=>e)),target:t}}function L(e,t,i,r=!1){const l=o(e,{indexCount:0,fields:{}});switch(i.type){case"simple":case"dot-density":return $(l,i,r);case"class-breaks":return D(l,t,i,r);case"unique-value":return q(l,t,i,r);case"dictionary":return G(l,i,r)}}function $(e,t,i=!1){const r=t.getSymbols(),l=r.length?r[0]:null,n=h(t);return{type:"simple",symbol:f(l,n,i),stride:n.stride}}function D(e,t,i,r=!1){const l={mesh:!0,use:"renderer.field"},n=i.backgroundFillSymbol,{field:s,fieldIndex:o}=j(e,{target:t,field:i.field,valueExpression:i.valueExpression,resultType:"numeric",context:l}),a=i.normalizationType,u="log"===a?"esriNormalizeByLog":"percent-of-total"===a?"esriNormalizeByPercentOfTotal":"field"===a?"esriNormalizeByField":null,d=h(i),c=i.classBreakInfos.map((e=>({symbol:f(e.symbol,d,r),min:e.minValue,max:e.maxValue}))).sort(((e,t)=>e.min-t.min));return{type:"interval",attributes:e.fields,field:s,fieldIndex:o,backgroundFillSymbol:f(n,d,r),defaultSymbol:f(i.defaultSymbol,d,r),intervals:c,normalizationField:i.normalizationField,normalizationTotal:i.normalizationTotal,normalizationType:u,isMaxInclusive:i.isMaxInclusive,stride:d.stride}}function q(t,i,r,l=!1){const n=[],s=r.backgroundFillSymbol,o={target:i,context:{mesh:!0},resultType:"string"};if(r.field&&"string"!=typeof r.field)throw new e(b,"Expected renderer.field to be a string",r);const{field:a,fieldIndex:u}=j(t,{...o,field:r.field,valueExpression:r.valueExpression}),d=h(r);for(const e of r.uniqueValueInfos)n.push({value:""+e.value,symbol:f(e.symbol,d,l)});return{type:"map",attributes:t.fields,field:a,fieldIndex:u,field2:j(t,{...o,field:r.field2}).field,field3:j(t,{...o,field:r.field3}).field,fieldDelimiter:r.fieldDelimiter,backgroundFillSymbol:f(s,d),defaultSymbol:f(r.defaultSymbol,d),map:n,stride:d.stride}}function G(e,t,i=!1){const r=h(t);return{type:"dictionary",config:t.config,fieldMap:t.fieldMap,scaleExpression:t.scaleExpression,url:t.url,symbolOptions:r,stride:r.stride}}export{P as addAggregateFields,L as createMatcherSchema,I as createSchema,h as createSymbolSchemaOptions};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../../../core/Error.js";import e from"../../../../../core/has.js";import i from"../../../../../core/Logger.js";import{clamp as s}from"../../../../../core/mathUtils.js";import{isNone as r,isSome as a,mapMany as o,forEachSome as n,andThen as l,unwrap as h}from"../../../../../core/maybe.js";import{createResolver as c,isAbortError as u}from"../../../../../core/promiseUtils.js";import{diff as d}from"../../../../../core/accessorSupport/diffUtils.js";import p from"../../../../../layers/support/FieldsIndex.js";import{MAX_FILTERS as _,HIGHLIGHT_FLAG as g,ATTRIBUTE_DATA_VV as f,NAN_MAGIC_NUMBER as m,ATTRIBUTE_DATA_ANIMATION as y}from"../../../engine/webgl/definitions.js";import{DISPLAY_ID_TYPE_AGGREGATE as x,DISPLAY_ID_TYPE_FEATURE as b,getDisplayIdTexel as T,getDisplayIdType as z,getDisplayIdFilterMask as S}from"../../../engine/webgl/DisplayId.js";import{getPixelArrayCtor as w}from"../../../engine/webgl/Utils.js";import{createDebugLogger as A,DEBUG_ATTR_UPDATES as E}from"../../../engine/webgl/util/debug.js";import{getVisualVariableSizeValueRepresentationRatio as D}from"../tileRenderers/support/visualVariablesUtils.js";import{PixelType as k}from"../../../../webgl/enums.js";const U=i.getLogger("esri.views.layers.2d.features.support.AttributeStore"),F=A(E,U),B={sharedArrayBuffer:e("esri-shared-array-buffer"),atomics:e("esri-atomics")};function C(t,e){return i=>e(t(i))}class R{constructor(t,e,i,s){this.size=0,this.texelSize=4;const{pixelType:r,layout:a,textureOnly:o}=s;this.textureOnly=o||!1,this.pixelType=r,this._ctype=e,this.layout=a,this._resetRange(),this._shared=t,this.size=i,o||(this.data=this._initData(r,i,t,e))}get buffer(){return l(this.data,(t=>t.buffer))}unsetComponentAllTexels(t,e){const i=h(this.data);for(let s=0;s<this.size*this.size;s++)i[s*this.texelSize+t]&=~e;this.dirtyStart=0,this.dirtyEnd=this.size*this.size-1}setComponentAllTexels(t,e){const i=h(this.data);for(let s=0;s<this.size*this.size;s++)i[s*this.texelSize+t]|=255&e;this.dirtyStart=0,this.dirtyEnd=this.size*this.size-1}setComponent(t,e,i){const s=h(this.data);for(const r of i)s[r*this.texelSize+t]|=e,this.dirtyStart=Math.min(this.dirtyStart,r),this.dirtyEnd=Math.max(this.dirtyEnd,r)}setComponentTexel(t,e,i){h(this.data)[i*this.texelSize+t]|=e,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i)}unsetComponentTexel(t,e,i){h(this.data)[i*this.texelSize+t]&=~e,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i)}getData(t,e){const i=T(t);return h(this.data)[i*this.texelSize+e]}setData(t,e,i){const s=T(t),r=1<<e;0!=(this.layout&r)?(this.data[s*this.texelSize+e]=i,this.dirtyStart=Math.min(this.dirtyStart,s),this.dirtyEnd=Math.max(this.dirtyEnd,s)):U.error("mapview-attributes-store","Tried to set a value for a texel's readonly component")}lock(){this.pixelType===k.UNSIGNED_BYTE&&this._shared&&B.atomics&&"local"!==this._ctype&&Atomics.store(this.data,0,1)}unlock(){this.pixelType===k.UNSIGNED_BYTE&&this._shared&&B.atomics&&"local"!==this._ctype&&Atomics.store(this.data,0,0)}expand(t){if(this.size=t,!this.textureOnly){const e=this._initData(this.pixelType,t,this._shared,this._ctype),i=h(this.data);e.set(i),this.data=e}}toMessage(){const t=this.dirtyStart,e=this.dirtyEnd,i=this.texelSize;if(t>e)return null;this._resetRange();const s=!(this._shared||"local"===this._ctype),r=this.pixelType,a=this.layout,o=h(this.data);return{start:t,end:e,data:s&&o.slice(t*i,(e+1)*i)||null,pixelType:r,layout:a}}_initData(t,e,i,s){const r=i&&"local"!==s?SharedArrayBuffer:ArrayBuffer,a=w(t),o=new a(new r(e*e*4*a.BYTES_PER_ELEMENT));for(let n=0;n<o.length;n+=4)o[n+1]=255;return o}_resetRange(){this.dirtyStart=2147483647,this.dirtyEnd=0}}class M{constructor(t,e){this._client=t,this.config=e,this._attributeComputeMap=new Map,this._blocks=new Array,this._filters=new Array(_),this._targetType=0,this._abortController=new AbortController,this._hasScaleExpr=!1,this._size=32,this._idsToHighlight=new Set;const i=e.supportsTextureFloat?k.FLOAT:k.UNSIGNED_BYTE;F(`Creating AttributeStore ${B.sharedArrayBuffer?"with":"without"} shared memory`),this._blockDescriptors=[{pixelType:k.UNSIGNED_BYTE,layout:1},{pixelType:k.UNSIGNED_BYTE,layout:15,textureOnly:!0},{pixelType:i,layout:15},{pixelType:i,layout:15}],this._blocks=this._blockDescriptors.map((()=>null))}destroy(){this._abortController.abort()}get hasScaleExpr(){return this._hasScaleExpr}get _signal(){return this._abortController.signal}get hasHighlight(){return this._idsToHighlight.size>0}update(t,i){this.config=i;const s=i.schema.processors[0].storage,o=d(this._schema,s);if((t.targets.feature||t.targets.aggregate)&&(t.storage.data=!0),o&&(e("esri-2d-update-debug")&&console.debug("Applying Update - AttributeStore:",o),t.storage.data=!0,this._schema=s,this._attributeComputeMap.clear(),!r(s))){switch(s.target){case"feature":this._targetType=b;break;case"aggregate":this._targetType=x}if("subtype"===s.type)for(const t in s.mapping){const e=s.mapping[t];if(a(e))for(const t of e.mapping)this._bindAttribute(t)}else for(const t of s.mapping)this._bindAttribute(t)}}onTileData(t,e){if(r(e.addOrUpdate))return;const i=e.addOrUpdate.getCursor();for(;i.next();){const t=i.getDisplayId();this.setAttributeData(t,i)}}invalidateResources(){this._createResourcesPromise=null,this._abortController.abort(),this._abortController=new AbortController}async setHighlight(t,e){const i=1,s=this._getBlock(0),r=e.map((t=>T(t)));s.lock(),s.unsetComponentAllTexels(0,i),s.setComponent(0,i,r),s.unlock(),this._idsToHighlight.clear();for(const a of t)this._idsToHighlight.add(a);await this.sendUpdates()}async updateFilters(t,i){const{config:s,service:r,spatialReference:a}=i,{filters:o}=s,n=o.map(((t,e)=>this._updateFilter(t,e,r,a)));(await Promise.all(n)).some((t=>t))&&(t.storage.filters=!0,e("esri-2d-update-debug")&&console.debug("Applying Update - AttributeStore:","Filters changed"))}setData(t,e,i,s){const r=T(t);this._ensureSizeForTexel(r),this._getBlock(e).setData(t,i,s)}getData(t,e,i){return this._getBlock(e).getData(t,i)}getHighlightFlag(t){return this._idsToHighlight.has(t)?g:0}unsetAttributeData(t){const e=T(t);this._getBlock(0).setData(e,0,0)}setAttributeData(t,e){const i=T(t);if(this._ensureSizeForTexel(i),this._getBlock(0).setData(i,0,this.getFilterFlags(e)),this._targetType!==z(t))return;const r=this._attributeComputeMap,a=this.config.supportsTextureFloat?1:2,o=4;r.size&&r.forEach(((t,r)=>{const n=r*a%o,l=Math.floor(r*a/o),h=this._getBlock(l+f),c=t(e);if(this.config.supportsTextureFloat)h.setData(i,n,c);else if(c===m)h.setData(i,n,255),h.setData(i,n+1,255);else{const t=s(Math.round(c),-32767,32766)+32768,e=255&t,r=(65280&t)>>8;h.setData(i,n,e),h.setData(i,n+1,r)}}))}sendUpdates(){if(this._nextUpdate)return this._nextUpdate.promise;if(this._currUpdate)return this._nextUpdate=c(),this._nextUpdate.promise;const e={blocks:this._blocks.map((t=>a(t)?t.toMessage():null))};return this._currUpdate=this._createResources().then((()=>{const t=()=>{if(this._currUpdate=null,this._nextUpdate){const t=this._nextUpdate;this._nextUpdate=null,this.sendUpdates().then((()=>t.resolve()))}},i=this._client.update(e,this._signal).then(t).catch(t);return this._client.render(this._signal),i})).catch((e=>u(e)?(this._createResourcesPromise=null,this._createResources()):(U.error(new t("mapview-attribute-store","Encountered an error during client update",e)),Promise.resolve()))),this._currUpdate}_ensureSizeForTexel(t){for(;t>=this._size*this._size;)if(this._expand())return}_bindAttribute(t){function e(){return t.normalizationField?e=>{const i=e.readAttribute(t.normalizationField);if(!i)return null;return e.readAttribute(t.field)/i}:e=>e.readAttribute(t.field)}function i(){return t.normalizationField&&U.warn("mapview-arcade","Ignoring normalizationField specified with an arcade expression which is not supported."),e=>e.getComputedNumericAtIndex(t.fieldIndex)}let s;if(null!=t.fieldIndex)s=i();else{if(!t.field)return;s=e()}if(t.valueRepresentation){s=C(s,(e=>D(e,t.valueRepresentation)))}const r=t=>null===t||isNaN(t)||t===1/0?m:t;this._attributeComputeMap.set(t.binding,C(s,r))}_createResources(){if(a(this._createResourcesPromise))return this._createResourcesPromise;this._getBlock(y),F("Initializing AttributeStore");const e={shared:B.sharedArrayBuffer&&!("local"===this._client.type),size:this._size,blocks:o(this._blocks,(t=>({textureOnly:t.textureOnly,buffer:t.buffer,pixelType:t.pixelType})))},i=this._client.initialize(e,this._signal).catch((e=>{u(e)?this._createResourcesPromise=null:U.error(new t("mapview-attribute-store","Encountered an error during client initialization",e))}));return this._createResourcesPromise=i,i.then((()=>r(this._createResourcesPromise)?this._createResources():void 0)),i}_getBlock(t){const e=this._blocks[t];if(a(e))return e;F(`Initializing AttributeBlock at index ${t}`);const i=B.sharedArrayBuffer,s=this._client.type,r=new R(i,s,this._size,this._blockDescriptors[t]);return this._blocks[t]=r,this._createResourcesPromise=null,r}_expand(){if(this._size<this.config.maxTextureSize){const t=this._size<<=1;return F("Expanding block size to",t,this._blocks),n(this._blocks,(e=>e.expand(t))),this._createResourcesPromise=null,this._size=t,0}return U.error(new t("mapview-limitations","Maximum number of onscreen features exceeded.")),-1}async _updateFilter(t,e,i,s){const o=this._filters[e],n=a(o)&&o.hash;if(!o&&!t)return!1;if(n===JSON.stringify(t))return!1;if(r(t)){if(!o)return!1;const t=1<<e+1,i=this._getBlock(0);return this._filters[e]=null,i.setComponentAllTexels(0,t),this.sendUpdates(),!0}const l=await this._getFilter(e,i);return await l.update(t,s),!0}async _getFilter(t,e){const i=this._filters[t];if(a(i))return i;const{default:s}=await import("./FeatureFilter.js"),r=new s({geometryType:e.geometryType,hasM:!1,hasZ:!1,timeInfo:e.timeInfo,fieldsIndex:new p(e.fields)});return this._filters[t]=r,r}isVisible(t){return!!(2&this._getBlock(0).getData(t,0))}getFilterFlags(t){let e=0;const i=S(t.getDisplayId());for(let a=0;a<this._filters.length;a++){const s=!!(i&1<<a),o=this._filters[a];e|=(!s||r(o)||o.check(t)?1:0)<<a}let s=0;if(this._idsToHighlight.size){const e=t.getObjectId();s=this.getHighlightFlag(e)}return e<<1|s}}export{M as default};
|
|
5
|
+
import t from"../../../../../core/Error.js";import e from"../../../../../core/has.js";import i from"../../../../../core/Logger.js";import{clamp as s}from"../../../../../core/mathUtils.js";import{isNone as r,isSome as a,mapMany as o,forEachSome as n,applySome as l,unwrap as h}from"../../../../../core/maybe.js";import{createResolver as c,isAbortError as u}from"../../../../../core/promiseUtils.js";import{diff as d}from"../../../../../core/accessorSupport/diffUtils.js";import p from"../../../../../layers/support/FieldsIndex.js";import{MAX_FILTERS as _,HIGHLIGHT_FLAG as g,ATTRIBUTE_DATA_VV as f,NAN_MAGIC_NUMBER as m,ATTRIBUTE_DATA_ANIMATION as y}from"../../../engine/webgl/definitions.js";import{DISPLAY_ID_TYPE_AGGREGATE as x,DISPLAY_ID_TYPE_FEATURE as b,getDisplayIdTexel as T,getDisplayIdType as z,getDisplayIdFilterMask as S}from"../../../engine/webgl/DisplayId.js";import{getPixelArrayCtor as w}from"../../../engine/webgl/Utils.js";import{createDebugLogger as A,DEBUG_ATTR_UPDATES as E}from"../../../engine/webgl/util/debug.js";import{getVisualVariableSizeValueRepresentationRatio as D}from"../tileRenderers/support/visualVariablesUtils.js";import{PixelType as k}from"../../../../webgl/enums.js";const U=i.getLogger("esri.views.layers.2d.features.support.AttributeStore"),F=A(E,U),B={sharedArrayBuffer:e("esri-shared-array-buffer"),atomics:e("esri-atomics")};function C(t,e){return i=>e(t(i))}class R{constructor(t,e,i,s){this.size=0,this.texelSize=4;const{pixelType:r,layout:a,textureOnly:o}=s;this.textureOnly=o||!1,this.pixelType=r,this._ctype=e,this.layout=a,this._resetRange(),this._shared=t,this.size=i,o||(this.data=this._initData(r,i,t,e))}get buffer(){return l(this.data,(t=>t.buffer))}unsetComponentAllTexels(t,e){const i=h(this.data);for(let s=0;s<this.size*this.size;s++)i[s*this.texelSize+t]&=~e;this.dirtyStart=0,this.dirtyEnd=this.size*this.size-1}setComponentAllTexels(t,e){const i=h(this.data);for(let s=0;s<this.size*this.size;s++)i[s*this.texelSize+t]|=255&e;this.dirtyStart=0,this.dirtyEnd=this.size*this.size-1}setComponent(t,e,i){const s=h(this.data);for(const r of i)s[r*this.texelSize+t]|=e,this.dirtyStart=Math.min(this.dirtyStart,r),this.dirtyEnd=Math.max(this.dirtyEnd,r)}setComponentTexel(t,e,i){h(this.data)[i*this.texelSize+t]|=e,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i)}unsetComponentTexel(t,e,i){h(this.data)[i*this.texelSize+t]&=~e,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i)}getData(t,e){const i=T(t);return h(this.data)[i*this.texelSize+e]}setData(t,e,i){const s=T(t),r=1<<e;0!=(this.layout&r)?(this.data[s*this.texelSize+e]=i,this.dirtyStart=Math.min(this.dirtyStart,s),this.dirtyEnd=Math.max(this.dirtyEnd,s)):U.error("mapview-attributes-store","Tried to set a value for a texel's readonly component")}lock(){this.pixelType===k.UNSIGNED_BYTE&&this._shared&&B.atomics&&"local"!==this._ctype&&Atomics.store(this.data,0,1)}unlock(){this.pixelType===k.UNSIGNED_BYTE&&this._shared&&B.atomics&&"local"!==this._ctype&&Atomics.store(this.data,0,0)}expand(t){if(this.size=t,!this.textureOnly){const e=this._initData(this.pixelType,t,this._shared,this._ctype),i=h(this.data);e.set(i),this.data=e}}toMessage(){const t=this.dirtyStart,e=this.dirtyEnd,i=this.texelSize;if(t>e)return null;this._resetRange();const s=!(this._shared||"local"===this._ctype),r=this.pixelType,a=this.layout,o=h(this.data);return{start:t,end:e,data:s&&o.slice(t*i,(e+1)*i)||null,pixelType:r,layout:a}}_initData(t,e,i,s){const r=i&&"local"!==s?SharedArrayBuffer:ArrayBuffer,a=w(t),o=new a(new r(e*e*4*a.BYTES_PER_ELEMENT));for(let n=0;n<o.length;n+=4)o[n+1]=255;return o}_resetRange(){this.dirtyStart=2147483647,this.dirtyEnd=0}}class M{constructor(t,e){this._client=t,this.config=e,this._attributeComputeMap=new Map,this._blocks=new Array,this._filters=new Array(_),this._targetType=0,this._abortController=new AbortController,this._hasScaleExpr=!1,this._size=32,this._idsToHighlight=new Set;const i=e.supportsTextureFloat?k.FLOAT:k.UNSIGNED_BYTE;F(`Creating AttributeStore ${B.sharedArrayBuffer?"with":"without"} shared memory`),this._blockDescriptors=[{pixelType:k.UNSIGNED_BYTE,layout:1},{pixelType:k.UNSIGNED_BYTE,layout:15,textureOnly:!0},{pixelType:i,layout:15},{pixelType:i,layout:15}],this._blocks=this._blockDescriptors.map((()=>null))}destroy(){this._abortController.abort()}get hasScaleExpr(){return this._hasScaleExpr}get _signal(){return this._abortController.signal}get hasHighlight(){return this._idsToHighlight.size>0}update(t,i){this.config=i;const s=i.schema.processors[0].storage,o=d(this._schema,s);if((t.targets.feature||t.targets.aggregate)&&(t.storage.data=!0),o&&(e("esri-2d-update-debug")&&console.debug("Applying Update - AttributeStore:",o),t.storage.data=!0,this._schema=s,this._attributeComputeMap.clear(),!r(s))){switch(s.target){case"feature":this._targetType=b;break;case"aggregate":this._targetType=x}if("subtype"===s.type)for(const t in s.mapping){const e=s.mapping[t];if(a(e))for(const t of e.mapping)this._bindAttribute(t)}else for(const t of s.mapping)this._bindAttribute(t)}}onTileData(t,e){if(r(e.addOrUpdate))return;const i=e.addOrUpdate.getCursor();for(;i.next();){const t=i.getDisplayId();this.setAttributeData(t,i)}}invalidateResources(){this._createResourcesPromise=null,this._abortController.abort(),this._abortController=new AbortController}async setHighlight(t,e){const i=1,s=this._getBlock(0),r=e.map((t=>T(t)));s.lock(),s.unsetComponentAllTexels(0,i),s.setComponent(0,i,r),s.unlock(),this._idsToHighlight.clear();for(const a of t)this._idsToHighlight.add(a);await this.sendUpdates()}async updateFilters(t,i){const{config:s,service:r,spatialReference:a}=i,{filters:o}=s,n=o.map(((t,e)=>this._updateFilter(t,e,r,a)));(await Promise.all(n)).some((t=>t))&&(t.storage.filters=!0,e("esri-2d-update-debug")&&console.debug("Applying Update - AttributeStore:","Filters changed"))}setData(t,e,i,s){const r=T(t);this._ensureSizeForTexel(r),this._getBlock(e).setData(t,i,s)}getData(t,e,i){return this._getBlock(e).getData(t,i)}getHighlightFlag(t){return this._idsToHighlight.has(t)?g:0}unsetAttributeData(t){const e=T(t);this._getBlock(0).setData(e,0,0)}setAttributeData(t,e){const i=T(t);if(this._ensureSizeForTexel(i),this._getBlock(0).setData(i,0,this.getFilterFlags(e)),this._targetType!==z(t))return;const r=this._attributeComputeMap,a=this.config.supportsTextureFloat?1:2,o=4;r.size&&r.forEach(((t,r)=>{const n=r*a%o,l=Math.floor(r*a/o),h=this._getBlock(l+f),c=t(e);if(this.config.supportsTextureFloat)h.setData(i,n,c);else if(c===m)h.setData(i,n,255),h.setData(i,n+1,255);else{const t=s(Math.round(c),-32767,32766)+32768,e=255&t,r=(65280&t)>>8;h.setData(i,n,e),h.setData(i,n+1,r)}}))}sendUpdates(){if(this._nextUpdate)return this._nextUpdate.promise;if(this._currUpdate)return this._nextUpdate=c(),this._nextUpdate.promise;const e={blocks:this._blocks.map((t=>a(t)?t.toMessage():null))};return this._currUpdate=this._createResources().then((()=>{const t=()=>{if(this._currUpdate=null,this._nextUpdate){const t=this._nextUpdate;this._nextUpdate=null,this.sendUpdates().then((()=>t.resolve()))}},i=this._client.update(e,this._signal).then(t).catch(t);return this._client.render(this._signal),i})).catch((e=>u(e)?(this._createResourcesPromise=null,this._createResources()):(U.error(new t("mapview-attribute-store","Encountered an error during client update",e)),Promise.resolve()))),this._currUpdate}_ensureSizeForTexel(t){for(;t>=this._size*this._size;)if(this._expand())return}_bindAttribute(t){function e(){return t.normalizationField?e=>{const i=e.readAttribute(t.normalizationField);if(!i)return null;return e.readAttribute(t.field)/i}:e=>e.readAttribute(t.field)}function i(){return t.normalizationField&&U.warn("mapview-arcade","Ignoring normalizationField specified with an arcade expression which is not supported."),e=>e.getComputedNumericAtIndex(t.fieldIndex)}let s;if(null!=t.fieldIndex)s=i();else{if(!t.field)return;s=e()}if(t.valueRepresentation){s=C(s,(e=>D(e,t.valueRepresentation)))}const r=t=>null===t||isNaN(t)||t===1/0?m:t;this._attributeComputeMap.set(t.binding,C(s,r))}_createResources(){if(a(this._createResourcesPromise))return this._createResourcesPromise;this._getBlock(y),F("Initializing AttributeStore");const e={shared:B.sharedArrayBuffer&&!("local"===this._client.type),size:this._size,blocks:o(this._blocks,(t=>({textureOnly:t.textureOnly,buffer:t.buffer,pixelType:t.pixelType})))},i=this._client.initialize(e,this._signal).catch((e=>{u(e)?this._createResourcesPromise=null:U.error(new t("mapview-attribute-store","Encountered an error during client initialization",e))}));return this._createResourcesPromise=i,i.then((()=>r(this._createResourcesPromise)?this._createResources():void 0)),i}_getBlock(t){const e=this._blocks[t];if(a(e))return e;F(`Initializing AttributeBlock at index ${t}`);const i=B.sharedArrayBuffer,s=this._client.type,r=new R(i,s,this._size,this._blockDescriptors[t]);return this._blocks[t]=r,this._createResourcesPromise=null,r}_expand(){if(this._size<this.config.maxTextureSize){const t=this._size<<=1;return F("Expanding block size to",t,this._blocks),n(this._blocks,(e=>e.expand(t))),this._createResourcesPromise=null,this._size=t,0}return U.error(new t("mapview-limitations","Maximum number of onscreen features exceeded.")),-1}async _updateFilter(t,e,i,s){const o=this._filters[e],n=a(o)&&o.hash;if(!o&&!t)return!1;if(n===JSON.stringify(t))return!1;if(r(t)){if(!o)return!1;const t=1<<e+1,i=this._getBlock(0);return this._filters[e]=null,i.setComponentAllTexels(0,t),this.sendUpdates(),!0}const l=await this._getFilter(e,i);return await l.update(t,s),!0}async _getFilter(t,e){const i=this._filters[t];if(a(i))return i;const{default:s}=await import("./FeatureFilter.js"),r=new s({geometryType:e.geometryType,hasM:!1,hasZ:!1,timeInfo:e.timeInfo,fieldsIndex:new p(e.fields)});return this._filters[t]=r,r}isVisible(t){return!!(2&this._getBlock(0).getData(t,0))}getFilterFlags(t){let e=0;const i=S(t.getDisplayId());for(let a=0;a<this._filters.length;a++){const s=!!(i&1<<a),o=this._filters[a];e|=(!s||r(o)||o.check(t)?1:0)<<a}let s=0;if(this._idsToHighlight.size){const e=t.getObjectId();s=this.getHighlightFlag(e)}return e<<1|s}}export{M as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../../geometry.js";import e from"../../../../../core/Evented.js";import t from"../../../../../core/has.js";import{isNone as s,isSome as r,
|
|
5
|
+
import"../../../../../geometry.js";import e from"../../../../../core/Evented.js";import t from"../../../../../core/has.js";import{isNone as s,isSome as r,applySome as a}from"../../../../../core/maybe.js";import{diff as i,hasDiff as o}from"../../../../../core/accessorSupport/diffUtils.js";import{GeohashTree as h}from"../../../../../geohash/GeohashTree.js";import{setGeohashBuf as l,setGeohashXY as n}from"../../../../../geohash/geohashUtils.js";import{earth as u}from"../../../../../geometry/support/Ellipsoid.js";import{getInfo as c}from"../../../../../geometry/support/spatialReferenceUtils.js";import{quantizeX as g,quantizeY as d}from"../../../../../layers/graphics/featureConversionUtils.js";import p,{OptimizedFeatureWithGeometry as f}from"../../../../../layers/graphics/OptimizedFeature.js";import _ from"../../../../../layers/graphics/OptimizedGeometry.js";import{checkProjectionSupport as m,project as y}from"../../../../../layers/graphics/data/projectionSupport.js";import{TILE_SIZE as v}from"../../../engine/webgl/definitions.js";import{Store2D as I}from"../Store2D.js";import{FeatureSetReaderJSON as b}from"./FeatureSetReaderJSON.js";import R from"../../../../../geometry/SpatialReference.js";const C=12,M=1;class x extends f{constructor(e,t,s,r,a){super(new _([],[t,s]),r,null,e),this.geohashBoundsInfo=a}get count(){return this.attributes.cluster_count}static create(e,t,s,r,a,i,o,h){const l=new x(t,s,r,i,o);return l.displayId=e.createDisplayId(!0),l.referenceId=h,l.tileLevel=a,l}update(e,t,s,r,a,i){return this.geometry.coords[0]=e,this.geometry.coords[1]=t,this.tileLevel=s,this.attributes=r,this.geohashBoundsInfo=a,this.referenceId=null,this.referenceId=i,this}toJSON(){return{objectId:this.objectId,referenceId:1===this.attributes.cluster_count?this.referenceId:null,attributes:{...this.attributes,clusterId:this.objectId},geometry:{x:this.geometry.coords[0],y:this.geometry.coords[1]}}}}function L(e){return 57.29577951308232*e}class j extends I{constructor(t,s,r){super(t,r),this.events=new e,this._geohashLevel=0,this._tileLevel=0,this._aggregateValueRanges={},this._aggregateValueRangesChanged=!1,this._geohashBuf=[],this._clusters=new Map,this._tiles=new Map,this.geometryInfo=t.geometryInfo,this._spatialReference=s,this._projectionSupportCheck=m(s,R.WGS84),this._bitsets.geohash=r.getBitset(r.createBitset()),this._bitsets.inserted=r.getBitset(r.createBitset())}async updateSchema(e,r){const a=this._schema;try{await super.updateSchema(e,r),await this._projectionSupportCheck}catch(n){}const l=i(a,r);r&&(!s(l)||e.source||e.storage.filters)?((o(l,"params.fields")||!this._tree||e.source)&&(this._tree=new h(this._statisticFields),this._rebuildTree(),t("esri-2d-update-debug")&&console.debug("Aggregate mesh needs update due to tree changing")),t("esri-2d-update-debug")&&console.debug("Applying Update - ClusterStore:",l),e.targets[r.name]=!0,e.mesh=!1,this._aggregateValueRanges={}):a&&(e.mesh=!0)}clear(){this._rebuildTree()}sweepFeatures(e,t){this._bitsets.inserted.forEachSet((s=>{if(!e.has(s)){const e=t.lookupByDisplayIdUnsafe(s);this._remove(e)}}))}sweepClusters(e,t,s){this._clusters.forEach(((r,a)=>{r&&r.tileLevel!==s&&(e.releaseDisplayId(r.displayId),t.unsetAttributeData(r.displayId),this._clusters.delete(a))}))}onTileData(e,t,r,a,i=!0){if(!this._schema||s(t.addOrUpdate))return t;const o=this._getTransforms(e,this._spatialReference);{const e=t.addOrUpdate.getCursor();for(;e.next();)this._update(e,a)}if(t.status.mesh||!i)return t;const h=new Array,l=this._schema.params.clusterRadius;this._getClustersForTile(h,e,l,r,o),t.addOrUpdate=b.fromOptimizedFeatures(h,"esriGeometryPoint"),t.addOrUpdate.attachStorage(r),t.end=!0;{const s=t.addOrUpdate.getCursor();for(;s.next();){const t=s.getDisplayId();this._bitsets.computed.unset(t),this.setComputedAttributes(r,s,t,e.scale)}}return this._aggregateValueRangesChanged&&t.end&&(this.events.emit("valueRangesChanged",{valueRanges:this._aggregateValueRanges}),this._aggregateValueRangesChanged=!1),t}onTileUpdate({added:e,removed:t}){if(e.length){const t=e[0].level;this._tileLevel=t,this._setGeohashLevel(t)}if(!this._schema)return;const s=this._schema.params.clusterRadius;t.forEach((e=>{this._tiles.delete(e.key.id),this._markTileClustersForDeletion(e,s)}))}getAggregate(e){for(const t of this._clusters.values())if((null==t?void 0:t.displayId)===e)return t.toJSON();return null}getAggregates(){const e=[];for(const t of this._clusters.values())(null==t?void 0:t.tileLevel)===this._tileLevel&&e.push(t.toJSON());return e}getDisplayId(e){const t=this._clusters.get(e);return t?t.displayId:null}getFeatureDisplayIdsForAggregate(e){const t=this._clusters.get(e);if(!t)return[];const s=t.geohashBoundsInfo;return this._tree.getRegionDisplayIds(s.xLL,s.yLL,s.xTR,s.yTR,s.level)}getDisplayIdForReferenceId(e){for(const t of this._clusters.values())if((null==t?void 0:t.referenceId)===e)return t.displayId;return null}getAggregateValueRanges(){return this._aggregateValueRanges}forEach(e){for(const[t,s]of this._clusters)s&&e(s,t)}size(){let e=0;return this.forEach((t=>e++)),e}_rebuildTree(){this._bitsets.computed.clear(),this._bitsets.inserted.clear(),this._tree&&this._tree.clear()}_remove(e){const t=e.getDisplayId(),s=e.getXHydrated(),r=e.getYHydrated(),a=this._geohashBuf[2*t],i=this._geohashBuf[2*t+1];this._bitsets.inserted.has(t)&&(this._bitsets.inserted.unset(t),this._tree.removeCursor(e,s,r,a,i,this._geohashLevel))}_update(e,t){const s=e.getDisplayId(),r=this._bitsets.inserted,a=t.isVisible(s);if(a===r.has(s))return;if(!a)return void this._remove(e);const i=e.getXHydrated(),o=e.getYHydrated();if(!this._setGeohash(s,i,o))return;const h=this._geohashBuf[2*s],l=this._geohashBuf[2*s+1];this._tree.insertCursor(e,s,i,o,h,l,this._geohashLevel),r.set(s)}_setGeohash(e,t,s){if(this._bitsets.geohash.has(e))return!0;const r=this._geohashBuf;if(this._spatialReference.isWebMercator){const a=L(t/u.radius),i=a-360*Math.floor((a+180)/360),o=L(Math.PI/2-2*Math.atan(Math.exp(-s/u.radius)));l(r,e,o,i,C)}else{const a=y({x:t,y:s},this._spatialReference,R.WGS84);if(!a)return!1;l(r,e,a.y,a.x,C)}return this._bitsets.geohash.set(e),!0}_getClustersForTile(e,t,i,o,h,l=!0){const n=this._schema.params.clusterPixelBuffer,u=2*i,c=this._getGeohashLevel(t.key.level),f=Math.ceil(2**t.key.level*v/u),_=Math.ceil(n/u)+0,m=Math.ceil(v/u),{row:y,col:I}=t.key,b=I*v,R=y*v,C=Math.floor(b/u)-_,M=Math.floor(R/u)-_,x=C+m+2*_,L=M+m+2*_,j=t.tileInfoView.getLODInfoAt(t.key.level);for(let v=C;v<=x;v++)for(let i=M;i<=L;i++){let n=v;j.wrap&&(n=v<0?v+f:v%f);const u=j.wrap&&v<0,_=j.wrap&&v%f!==v,m=this._lookupCluster(o,j,t.key.level,n,i,c);if(r(m)){const t=a(h,(e=>u?e.left:_?e.right:e.tile));if(l&&s(t))continue;if(!m.count)continue;if(r(t)&&l){const s=m.geometry.clone();let a=m.attributes;s.coords[0]=g(t,s.coords[0]),s.coords[1]=d(t,s.coords[1]),1===m.count&&r(m.referenceId)&&(a={...m.attributes,referenceId:m.referenceId});const i=new p(s,a);i.displayId=m.displayId,e.push(i)}}}}_getGeohashLevel(e){return Math.min(Math.ceil(e/2+2),C)}_setGeohashLevel(e){const t=this._getGeohashLevel(e),s=(Math.floor(t/M)+1)*M-1;if(this._geohashLevel!==s)return this._geohashLevel=s,this._rebuildTree(),void this._bitsets.geohash.clear()}_getTransforms(e,t){const s={originPosition:"upperLeft",scale:[e.resolution,e.resolution],translate:[e.bounds[0],e.bounds[3]]},r=c(t);if(!r)return{tile:s,left:null,right:null};const[a,i]=r.valid;return{tile:s,left:{...s,translate:[i,e.bounds[3]]},right:{...s,translate:[a-i+e.bounds[0],e.bounds[3]]}}}_getClusterId(e,t,s){return(15&e)<<28|(16383&t)<<14|16383&s}_markForDeletion(e,t,s){const r=this._getClusterId(e,t,s);this._clusters.delete(r)}_getClusterBounds(e,t,s){const r=this._schema.params.clusterRadius,a=2*r;let i=s%2?t*a:t*a-r;const o=s*a;let h=i+a;const l=o-a,n=2**e.level*v;e.wrap&&i<0&&(i=0),e.wrap&&h>n&&(h=n);const u=i/v,c=o/v,g=h/v,d=l/v;return[e.getXForColumn(u),e.getYForRow(c),e.getXForColumn(g),e.getYForRow(d)]}_lookupCluster(e,t,s,a,i,o){const h=this._getClusterId(s,a,i),l=this._clusters.get(h),[c,g,d,p]=this._getClusterBounds(t,a,i),f={x:c,y:g},_={x:d,y:p};let m=0,v=0,I=0,b=0;if(this._spatialReference.isWebMercator){{const e=L(f.x/u.radius);m=e-360*Math.floor((e+180)/360),v=L(Math.PI/2-2*Math.atan(Math.exp(-f.y/u.radius)))}{const e=L(_.x/u.radius);I=e-360*Math.floor((e+180)/360),b=L(Math.PI/2-2*Math.atan(Math.exp(-_.y/u.radius)))}}else{const e=y(f,this._spatialReference,R.WGS84),t=y(_,this._spatialReference,R.WGS84);if(!e||!t)return null;m=e.x,v=e.y,I=t.x,b=t.y}const C={geohashX:0,geohashY:0},M={geohashX:0,geohashY:0};n(C,v,m,o),n(M,b,I,o);const j=C.geohashX,w=C.geohashY,V=M.geohashX,S=M.geohashY,F={xLL:j,yLL:w,xTR:V,yTR:S,level:o},T=this._tree.getRegionStatistics(j,w,V,S,o),{count:D,xTotal:k,yTotal:B,referenceId:G}=T,O=D?k/D:0,A=D?B/D:0;if(0===D)return this._clusters.set(h,null),null;const U={cluster_count:D,...T.attributes},X=r(l)?l.update(O,A,s,U,F,G):x.create(e,h,O,A,s,U,F,G);return 0===D&&(X.geometry.coords[0]=(c+d)/2,X.geometry.coords[1]=(g+p)/2),this._clusters.set(h,X),this._updateAggregateValueRangeForCluster(X,X.tileLevel),X}_updateAggregateValueRangeForCluster(e,t){const s=this._aggregateValueRanges[t]||{minValue:1/0,maxValue:0},r=s.minValue,a=s.maxValue;s.minValue=Math.min(r,e.count),s.maxValue=Math.max(a,e.count),this._aggregateValueRanges[t]=s,r===s.minValue&&a===s.maxValue||(this._aggregateValueRangesChanged=!0)}_markTileClustersForDeletion(e,t){const s=2*t,r=Math.ceil(v/s),{row:a,col:i}=e.key,o=i*v,h=a*v,l=Math.floor(o/s),n=Math.floor(h/s);for(let u=l;u<l+r;u++)for(let t=n;t<n+r;t++)this._markForDeletion(e.key.level,u,t)}}export{x as ClusterInfo,j as ClusterStore};
|