@arcgis/core 5.0.0-next.59 → 5.0.0-next.60
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/analysis/Analysis.d.ts +2 -3
- package/analysis/ElevationProfile/ElevationProfileLine.d.ts +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -3
- package/analysis/ElevationProfile/{elevationProfileLineTypes.d.ts → types.d.ts} +2 -2
- package/analysis/ElevationProfileAnalysis.d.ts +1 -1
- package/analysis/LengthDimension.d.ts +1 -1
- package/analysis/LineOfSightAnalysisObserver.d.ts +1 -1
- package/analysis/LineOfSightAnalysisTarget.d.ts +1 -1
- package/analysis/Slice/SliceAnalysisExcludedLayer.js +5 -0
- package/analysis/Slice/types.d.ts +4 -0
- package/analysis/SliceAnalysis.d.ts +1 -4
- package/analysis/SliceAnalysis.js +1 -1
- package/analysis/Viewshed.d.ts +1 -1
- package/analysis/VolumeMeasurementAnalysis.d.ts +1 -1
- package/analysis/VolumeMeasurementAnalysis.js +1 -1
- package/analysis/types.d.ts +22 -1
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +6 -0
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +4 -1
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +11 -1
- package/applications/KnowledgeStudio/layerInternalAccessUtils.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade.d.ts +27 -4
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02cd179176fee25d09a8.js +1 -0
- package/assets/esri/core/workers/chunks/0367a8580fede8f804f9.js +1 -0
- package/assets/esri/core/workers/chunks/0483a2cfdb8c7158e73a.js +1 -0
- package/assets/esri/core/workers/chunks/{73f9cbf0f919b6adc2d5.js → 05ab54b81c366e98138f.js} +1 -1
- package/assets/esri/core/workers/chunks/108a4ab28b6586e281d9.js +1 -0
- package/assets/esri/core/workers/chunks/14f4f5b7549cea7b5a6a.js +1 -0
- package/assets/esri/core/workers/chunks/1b475593c80d7bccdda5.js +1 -0
- package/assets/esri/core/workers/chunks/{de05c59da6d67716795d.js → 1c350a2c4014146dbcd9.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2425f6af7df6902dfc4.js → 1e8ceed33a3657ac02b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d61b6efa17e8c5832da.js → 21ebd234cf32ae52b3ea.js} +1 -1
- package/assets/esri/core/workers/chunks/27ec8688f72130239b98.js +1 -0
- package/assets/esri/core/workers/chunks/{087cf25ca211836a084a.js → 2a6231db5ee6cbfd59a5.js} +1 -1
- package/assets/esri/core/workers/chunks/2d8dca9a4a58469ddd05.js +1 -0
- package/assets/esri/core/workers/chunks/2e6bd743b88e83d43137.js +1 -0
- package/assets/esri/core/workers/chunks/2f6fa33692478e99d24b.js +1 -0
- package/assets/esri/core/workers/chunks/31eda00e6842005d0ec8.js +1 -0
- package/assets/esri/core/workers/chunks/{ce90e8489143228262e7.js → 33a13e80badd20ed8de2.js} +1 -1
- package/assets/esri/core/workers/chunks/{01d38a9ca9e88c38aab9.js → 34178ace79e8dea3567d.js} +1 -1
- package/assets/esri/core/workers/chunks/37a3e91791a18ed8b8da.js +1 -0
- package/assets/esri/core/workers/chunks/{47338472f5a8e004a671.js → 37e46461da3000949a26.js} +1 -1
- package/assets/esri/core/workers/chunks/{c531c0e3d420a1be0ad2.js → 3d1a5a3467f3a6585b3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{be6a05d5375e80968877.js → 47e5149765beee46f208.js} +1 -1
- package/assets/esri/core/workers/chunks/{44fb1184eeed0636704a.js → 4b088260252787734c00.js} +1 -1
- package/assets/esri/core/workers/chunks/4cbe78d6a5ff617e15d6.js +1 -0
- package/assets/esri/core/workers/chunks/509065a27bd07bd32475.js +1 -0
- package/assets/esri/core/workers/chunks/{c09cba77ee60a3d765e2.js → 522a6787d9e0f520ac79.js} +1 -1
- package/assets/esri/core/workers/chunks/5686220aed9a74dbd2b1.js +1 -0
- package/assets/esri/core/workers/chunks/584c4602d97a008afb83.js +1 -0
- package/assets/esri/core/workers/chunks/{60954ab810dbbf36e5e1.js → 5a66b7f1f4da75da8e7f.js} +1 -1
- package/assets/esri/core/workers/chunks/{10094eb2b94e98dd4a8a.js → 5dc2f2e28c30386efadf.js} +1 -1
- package/assets/esri/core/workers/chunks/668a868fe2dcb6384ac9.js +1 -0
- package/assets/esri/core/workers/chunks/68cb43f2fa8cc826e99b.js +1 -0
- package/assets/esri/core/workers/chunks/68ee11589de0da7fed08.js +1 -0
- package/assets/esri/core/workers/chunks/{d42273394f575e71dd55.js → 73bee5659414b3687cfc.js} +1 -1
- package/assets/esri/core/workers/chunks/{090dad5579f0148d6486.js → 76dbaef0d0794913f36f.js} +1 -1
- package/assets/esri/core/workers/chunks/{09bd9bd37a339802907a.js → 7bf30c254228f9b7f224.js} +1 -1
- package/assets/esri/core/workers/chunks/7c5218eae13d3bd30598.js +1 -0
- package/assets/esri/core/workers/chunks/7fc09382f934e9223a9b.js +1 -0
- package/assets/esri/core/workers/chunks/{472d290f8eb1c1a85724.js → 8195310b4c53db902fc1.js} +1 -1
- package/assets/esri/core/workers/chunks/831b8282380844a7c4d5.js +1 -0
- package/assets/esri/core/workers/chunks/83c5dea24e36ac2e3497.js +1 -0
- package/assets/esri/core/workers/chunks/{49df576f0215618aa651.js → 84440efe2cc337dab81f.js} +1 -1
- package/assets/esri/core/workers/chunks/852007720e3bc29532db.js +1 -0
- package/assets/esri/core/workers/chunks/87c6470ee295d736b06d.js +1 -0
- package/assets/esri/core/workers/chunks/89853fccdf2bfcc290c0.js +1 -0
- package/assets/esri/core/workers/chunks/{1e152a34e368bd810a0f.js → 8d58e59ea13ecafdd45c.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2442549c5daf3653eb4.js → 8d6641d0f7c93f83c414.js} +1 -1
- package/assets/esri/core/workers/chunks/8db723b8468e408dda46.js +1 -0
- package/assets/esri/core/workers/chunks/92a4f56232f81ca457fa.js +1 -0
- package/assets/esri/core/workers/chunks/{8a132d91077ecf849248.js → 92ef6071ea87b7f940e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb4aefaf9b0327dda738.js → 942c80c425b1f13cced5.js} +1 -1
- package/assets/esri/core/workers/chunks/980313a6c35e79812d17.js +1 -0
- package/assets/esri/core/workers/chunks/{e6bab7b739bfbb39f6cd.js → 988f5e003377d734d282.js} +1 -1
- package/assets/esri/core/workers/chunks/{7364fb5e99933533890d.js → 9ba8a2e1c0fb4e1efc7c.js} +1 -1
- package/assets/esri/core/workers/chunks/9c157c0eeadb824ad01e.js +1 -0
- package/assets/esri/core/workers/chunks/a39ac9127a215d14d412.js +1 -0
- package/assets/esri/core/workers/chunks/{63cf702cde83692126be.js → a6f29d1a6356e2de5a79.js} +1 -1
- package/assets/esri/core/workers/chunks/a94dd0f5839b6e2bb2d2.js +1 -0
- package/assets/esri/core/workers/chunks/ab0275669e28e7a34c38.js +1 -0
- package/assets/esri/core/workers/chunks/abc8015e13b1395b8d64.js +1 -0
- package/assets/esri/core/workers/chunks/abcee7cfd53cfe1d91e9.js +1 -0
- package/assets/esri/core/workers/chunks/acdbe0299024d58e1421.js +1 -0
- package/assets/esri/core/workers/chunks/{63c91421a71ae3b3599e.js → adff1791ae44631ad34a.js} +1 -1
- package/assets/esri/core/workers/chunks/{0eb6b9c638a5fcfe9bab.js → b4a59dd11d75df7bd510.js} +1 -1
- package/assets/esri/core/workers/chunks/{224f01b11fdba9250b1e.js → b64cfd86d9204be743c6.js} +1 -1
- package/assets/esri/core/workers/chunks/b7f2fb6684cf684b0bce.js +1 -0
- package/assets/esri/core/workers/chunks/b9f0d313f59fc7c43560.js +1 -0
- package/assets/esri/core/workers/chunks/bb5373ff7cdad7270095.js +1 -0
- package/assets/esri/core/workers/chunks/bb92a9daa0c5b019561f.js +1 -0
- package/assets/esri/core/workers/chunks/bbe2eaef7edfa33b6eea.js +1 -0
- package/assets/esri/core/workers/chunks/bddaa83fcb9fdb1e1856.js +1 -0
- package/assets/esri/core/workers/chunks/bfdf646d4c8f175a4236.js +1 -0
- package/assets/esri/core/workers/chunks/{0000781c850b1b4828b3.js → bfe052b386ec4874f350.js} +1 -1
- package/assets/esri/core/workers/chunks/{aa297e0931213341f51b.js → c3272b09bff886b08ce1.js} +1 -1
- package/assets/esri/core/workers/chunks/c38a07e936226b361b63.js +1 -0
- package/assets/esri/core/workers/chunks/{0d9904ba62558686c289.js → c743e561e7d73a100576.js} +1 -1
- package/assets/esri/core/workers/chunks/{b907d16e82ac908bb896.js → c96083838f919a8f64cd.js} +1 -1
- package/assets/esri/core/workers/chunks/{be80ed6e2955eabe912f.js → ca761dc5f45cafef313e.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a6e50d95539b46f629c.js → cad1d7e5ce89f51b3ac9.js} +1 -1
- package/assets/esri/core/workers/chunks/{dbe55d4731227d6e9571.js → ccc743e41854eb225c23.js} +1 -1
- package/assets/esri/core/workers/chunks/cf3a9ead26629f3508b3.js +1 -0
- package/assets/esri/core/workers/chunks/{3a612f873e29348370b2.js → d129a5a34e9ad09bd39e.js} +1 -1
- package/assets/esri/core/workers/chunks/{461093ce28ceadd7853d.js → d14e75b160aa432233c6.js} +1 -1
- package/assets/esri/core/workers/chunks/{e668ddc7332e5e560e78.js → d2abfcb0c8bf894c7f72.js} +1 -1
- package/assets/esri/core/workers/chunks/d749aa62ad694147aebe.js +1 -0
- package/assets/esri/core/workers/chunks/{f142c5cbdd16f1768275.js → d77f56576a49a998164a.js} +1 -1
- package/assets/esri/core/workers/chunks/{044a0ccd89741c1ae770.js → d79d29b52a65fb6bf94d.js} +1 -1
- package/assets/esri/core/workers/chunks/da7685ec2b6eaf00fd2d.js +1 -0
- package/assets/esri/core/workers/chunks/dae09fb8da0faa6dede4.js +1 -0
- package/assets/esri/core/workers/chunks/e16e88de4e93b0f48b2c.js +1 -0
- package/assets/esri/core/workers/chunks/e8bf362b2631f977b1cb.js +1 -0
- package/assets/esri/core/workers/chunks/ec5f83aa752c39a96609.js +1 -0
- package/assets/esri/core/workers/chunks/ed7e353e290b3a272457.js +1 -0
- package/assets/esri/core/workers/chunks/ef9a23d41acb5ad36426.js +1 -0
- package/assets/esri/core/workers/chunks/{33154a245eeca4ba38c6.js → f3437ae6bba846b524d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{cfd2839e218610a222e5.js → f54ec21fa67db6fef5a6.js} +1 -1
- package/assets/esri/core/workers/chunks/{58242447b72cc60a5040.js → f91e63d7842c427c7f72.js} +1 -1
- package/assets/esri/core/workers/chunks/{914746077017fa50933f.js → fa0bbf0d7eadb924c473.js} +1 -1
- package/assets/esri/core/workers/chunks/fbd577f56529063ce491.js +1 -0
- package/assets/esri/core/workers/chunks/fe33b11ec3f58a0f541a.js +1 -0
- package/assets/esri/core/workers/chunks/fe5d2735f057c7789f4b.js +1 -0
- package/assets/esri/core/workers/chunks/ff7df6fb78fa2c0e9247.js +1 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_en.json +1 -1
- package/chunks/bundle.js +1 -1
- package/config.js +1 -1
- package/core/memoryEstimations.js +1 -1
- package/core/promiseUtils.d.ts +1 -1
- package/core/units.d.ts +2 -0
- package/geometry/FlatGeometry.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/interfaces.d.ts +29 -31
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +3 -3
- package/layers/GeoJSONLayer.d.ts +1 -1
- package/layers/ImageryTileLayer.d.ts +1 -1
- package/layers/OGCFeatureLayer.d.ts +1 -1
- package/layers/ParquetLayer.d.ts +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/SceneLayer.d.ts +1 -1
- package/layers/StreamLayer.d.ts +8 -7
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/WCSLayer.d.ts +1 -1
- package/layers/WFSLayer.d.ts +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.d.ts +1 -1
- package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
- package/layers/graphics/FlatFeature.js +5 -0
- package/layers/graphics/FlatFeatureSet.js +5 -0
- package/layers/graphics/data/FlatFeatureStore.js +5 -0
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/flatFeatureQueryEngineAdapter.js +5 -0
- package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -1
- package/layers/mixins/ArcGISImageService.d.ts +1 -1
- package/layers/mixins/ImageryTileMixin.d.ts +1 -1
- package/layers/ogc/ogcFeatureUtils.d.ts +57 -0
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/ogc/types.d.ts +73 -0
- package/layers/raster/functions/creators/createDataManagementFunctions.d.ts +1 -1
- package/layers/raster/functions/creators/createSurfaceFunctions.d.ts +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +1 -1
- package/layers/support/FeatureReductionCluster.d.ts +1 -1
- package/layers/support/StreamConnection.d.ts +37 -4
- package/layers/support/Sublayer.d.ts +1 -1
- package/layers/support/TrackPartInfo.d.ts +1 -1
- package/layers/support/fieldUtils.d.ts +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/libs/parquet/parquet.js +1 -1
- package/package.json +1 -1
- package/pointCloudRenderers.d.ts +1 -1
- package/portal/jsonTypes.d.ts +6 -0
- package/renderers/DictionaryRenderer.d.ts +2 -5
- package/renderers/PointCloudClassBreaksRenderer.d.ts +2 -1
- package/renderers/PointCloudRenderer.d.ts +3 -6
- package/renderers/PointCloudStretchRenderer.d.ts +2 -1
- package/renderers/PointCloudUniqueValueRenderer.d.ts +2 -1
- package/renderers/RasterShadedReliefRenderer.d.ts +2 -3
- package/renderers/RasterStretchRenderer.d.ts +1 -1
- package/renderers/Renderer.d.ts +2 -2
- package/renderers/VectorFieldRenderer.d.ts +4 -3
- package/renderers/support/AuthoringInfo.d.ts +2 -25
- package/renderers/support/AuthoringInfoVisualVariable.d.ts +2 -17
- package/renderers/support/RasterPresetRenderer.d.ts +1 -1
- package/renderers/support/RendererLegendOptions.d.ts +1 -4
- package/renderers/support/jsonUtils.d.ts +1 -1
- package/renderers/support/pointCloud/types.d.ts +10 -0
- package/renderers/support/raster/types.d.ts +54 -0
- package/renderers/support/types.d.ts +44 -0
- package/renderers/support/utils.d.ts +1 -1
- package/renderers/types.d.ts +16 -6
- package/renderers.d.ts +1 -1
- package/rest/knowledgeGraph/GraphObject.d.ts +1 -1
- package/rest/knowledgeGraph/GraphObject.js +1 -1
- package/smartMapping/labels/bins.d.ts +1 -1
- package/smartMapping/popup/clusters.d.ts +1 -1
- package/smartMapping/popup/templates.d.ts +1 -1
- package/smartMapping/raster/renderers/classBreaks.d.ts +1 -1
- package/smartMapping/raster/renderers/rgb.d.ts +1 -1
- package/smartMapping/raster/renderers/stretch.d.ts +1 -1
- package/smartMapping/raster/support/utils.d.ts +1 -1
- package/smartMapping/renderers/color.d.ts +1 -2
- package/smartMapping/renderers/pieChart.d.ts +1 -1
- package/smartMapping/renderers/predominance.d.ts +1 -1
- package/smartMapping/renderers/size.d.ts +1 -2
- package/smartMapping/renderers/support/rendererUtils.d.ts +1 -1
- package/smartMapping/renderers/univariateColorSize.d.ts +1 -1
- package/support/revision.js +1 -1
- package/unionTypes.d.ts +23 -7
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/TileContainer.js +1 -1
- package/views/2d/engine/webgl/WGLContainer.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/Technique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorkerProxy.d.ts +2 -2
- package/views/2d/layers/features/FeatureStoreQueryAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ParquetSourceChunk.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/2d/layers/features/support/Tile.js +1 -1
- package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicContainer.js +1 -1
- package/views/2d/layers/support/DebouncedFeatureOverride.js +1 -1
- package/views/2d/layers/support/DebugOverlay.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.d.ts +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
- package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/BreakpointsOwner.d.ts +26 -21
- package/views/DOMContainer.d.ts +2 -1
- package/views/MapView.d.ts +3 -3
- package/views/SceneView.d.ts +3 -3
- package/views/View.d.ts +2 -2
- package/views/View2D.js +1 -1
- package/views/Viewport2DMixin.d.ts +3 -2
- package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +1 -1
- package/views/interactive/snapping/LineSnapper.js +1 -1
- package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/BuildingSceneLayerView.d.ts +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.d.ts +2 -2
- package/widgets/Features/FeaturesViewModel.d.ts +1 -1
- package/widgets/Home/HomeViewModel.d.ts +1 -1
- package/widgets/Locate/LocateViewModel.d.ts +2 -2
- package/widgets/Slice/SliceViewModel.d.ts +2 -1
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
- package/widgets/types.d.ts +1 -1
- package/analysis/FeatureReference.d.ts +0 -19
- package/analysis/VolumeMeasurement/volumeMeasurementUtils.js +0 -5
- package/analysis/support/SliceAnalysisExcludedLayer.js +0 -5
- package/assets/esri/core/workers/chunks/00f044370bf3bb6b24d7.js +0 -1
- package/assets/esri/core/workers/chunks/0136cd1a5da204b6daeb.js +0 -1
- package/assets/esri/core/workers/chunks/097001462d93b78b64f4.js +0 -1
- package/assets/esri/core/workers/chunks/0fcb40204db8ee5571c3.js +0 -1
- package/assets/esri/core/workers/chunks/13167bdd486b41163147.js +0 -1
- package/assets/esri/core/workers/chunks/1363345f31f4f5051132.js +0 -1
- package/assets/esri/core/workers/chunks/13be94357dcf5afc4fcb.js +0 -1
- package/assets/esri/core/workers/chunks/1693f19f1c37e0a2087e.js +0 -1
- package/assets/esri/core/workers/chunks/18c4cd160a4052b05831.js +0 -1
- package/assets/esri/core/workers/chunks/18ce7b1559a45d017c45.js +0 -1
- package/assets/esri/core/workers/chunks/1dc3ab52fcde7bff0f23.js +0 -1
- package/assets/esri/core/workers/chunks/27794d48c04a5875fd22.js +0 -1
- package/assets/esri/core/workers/chunks/2a66841243975cac3e3c.js +0 -1
- package/assets/esri/core/workers/chunks/2c12848e4934e9bb2bd0.js +0 -1
- package/assets/esri/core/workers/chunks/311c4914a4f69f3c1525.js +0 -1
- package/assets/esri/core/workers/chunks/35cbc61a006351620ead.js +0 -1
- package/assets/esri/core/workers/chunks/36a04be40369111a633d.js +0 -1
- package/assets/esri/core/workers/chunks/3b5e71b156244789f624.js +0 -1
- package/assets/esri/core/workers/chunks/3dd0db77a05263000bd8.js +0 -1
- package/assets/esri/core/workers/chunks/5047acfd66539eefe353.js +0 -1
- package/assets/esri/core/workers/chunks/51fd6662245b920af652.js +0 -1
- package/assets/esri/core/workers/chunks/58419d362f24b35003c1.js +0 -1
- package/assets/esri/core/workers/chunks/58cf5b9a6aa685fc3367.js +0 -1
- package/assets/esri/core/workers/chunks/5ffeb8fb58d59bad68c3.js +0 -1
- package/assets/esri/core/workers/chunks/6d09965ab2bff9da88b6.js +0 -1
- package/assets/esri/core/workers/chunks/700122f775b98a7ed353.js +0 -1
- package/assets/esri/core/workers/chunks/7353d78feba7e6302b6e.js +0 -1
- package/assets/esri/core/workers/chunks/7737e69da604d2521da8.js +0 -1
- package/assets/esri/core/workers/chunks/7ba31425caa404f86424.js +0 -1
- package/assets/esri/core/workers/chunks/7cd0ab01933bfb2c6e43.js +0 -1
- package/assets/esri/core/workers/chunks/80c36f1786ae0be00962.js +0 -1
- package/assets/esri/core/workers/chunks/81c2cc77c275a5b555c0.js +0 -1
- package/assets/esri/core/workers/chunks/8892bf3d2367e35de001.js +0 -1
- package/assets/esri/core/workers/chunks/8d941204425571b656ec.js +0 -1
- package/assets/esri/core/workers/chunks/973bf2ed34d57f299472.js +0 -1
- package/assets/esri/core/workers/chunks/9b6e2099aabf67b9f9f2.js +0 -1
- package/assets/esri/core/workers/chunks/a6b1e3ec30f6d641aea9.js +0 -1
- package/assets/esri/core/workers/chunks/a8f7e44657083f6aa3fd.js +0 -1
- package/assets/esri/core/workers/chunks/b648a1e641cf5c772d67.js +0 -1
- package/assets/esri/core/workers/chunks/b91c13f44f4d1bac5799.js +0 -1
- package/assets/esri/core/workers/chunks/be6cc8a1485961f22372.js +0 -1
- package/assets/esri/core/workers/chunks/c91201b37d1cb3875fb4.js +0 -1
- package/assets/esri/core/workers/chunks/d22e0d733bfe821c0510.js +0 -1
- package/assets/esri/core/workers/chunks/d54988c21ea5667d00b7.js +0 -1
- package/assets/esri/core/workers/chunks/d62193323c67b379dee3.js +0 -1
- package/assets/esri/core/workers/chunks/d65ca3b8fccae8c3c3fa.js +0 -1
- package/assets/esri/core/workers/chunks/d8dc130ea559be1f68c6.js +0 -1
- package/assets/esri/core/workers/chunks/dcf6f7001f470f76bd3e.js +0 -1
- package/assets/esri/core/workers/chunks/e00d56ae5e68267fe269.js +0 -1
- package/assets/esri/core/workers/chunks/e2c7c269be93c552dc5b.js +0 -1
- package/assets/esri/core/workers/chunks/e4d593ddcbcf06010ab0.js +0 -1
- package/assets/esri/core/workers/chunks/f286f13686f003c5eec5.js +0 -1
- package/assets/esri/core/workers/chunks/fb6670a929b7333f1764.js +0 -1
- package/assets/esri/core/workers/chunks/fbdf553253cf8f22c022.js +0 -1
- package/assets/esri/core/workers/chunks/fc10c738bae304721ab2.js +0 -1
- package/assets/esri/core/workers/chunks/ff79c2cb28db7e0a1fc4.js +0 -1
- package/assets/esri/core/workers/chunks/ffdf1cbc1e54414d0f96.js +0 -1
- package/renderers/support/colorRampUtils.d.ts +0 -4
- package/renderers/support/pointCloudTypeUtils.d.ts +0 -6
- package/renderers/support/rasterRendererHelper.d.ts +0 -37
- package/renderers/support/rasterTypeUtils.d.ts +0 -9
- package/renderers/support/typeUtils.d.ts +0 -11
- /package/analysis/{dimensionUtils.d.ts → Dimension/types.d.ts} +0 -0
- /package/analysis/VolumeMeasurement/{volumeMeasurementUtils.d.ts → types.d.ts} +0 -0
package/views/View2D.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../Viewpoint.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import has from"../core/has.js";import a from"../core/Logger.js";import{destroyMaybe as n}from"../core/maybe.js";import{watch as o,syncAndInitial as l}from"../core/reactiveUtils.js";import{property as p,cast as h,subclass as g}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import{initialize as u}from"../core/workers/workers.js";import c from"../geometry/Point.js";import m from"../geometry/Polygon.js";import{isLoadedOrLoadFor as y}from"../geometry/projectionUtils.js";import w from"../layers/support/TileInfo.js";import{BreakpointsOwner as f}from"./BreakpointsOwner.js";import{DOMContainer as V}from"./DOMContainer.js";import{PopupView as M}from"./PopupView.js";import v from"./View.js";import{Viewport2DBaseMixin as b}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as _}from"./Viewport2DMixin.js";import j from"./2d/AnimationManager.js";import{layerView2DImporter as R}from"./2d/layerViewModuleImportUtils.js";import S from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{extentToScale as L}from"./2d/viewpointUtils.js";import{importAnalysisViewModule as O}from"./2d/analysis/analysisViewModuleImportUtils.js";import{ManagedCanvas as T}from"./2d/engine/ManagedCanvas.js";import k from"./2d/layers/features/support/TileStore.js";import{createOrReuseHighlightGradient as C}from"./2d/layers/support/util.js";import{clipContainsPoint as x}from"./2d/support/clippingUtils.js";import{getDefaultHighlightOptions as D,setDefaultHighlightOptions as P}from"./2d/support/highlightOptionsUtils.js";import{hitTest as A}from"./2d/support/hitTestUtils.js";import{takeRawScreenshot as E,takeScreenshot as z}from"./2d/support/screenshotUtils.js";import{Timeline as U}from"./2d/support/Timeline.js";import G from"./navigation/Navigation.js";import I from"./navigation/NavigationActionMap.js";import q from"./support/AnalysisViewManager.js";import N from"./support/HighlightOptions.js";import{check as W}from"./support/WebGLRequirements.js";import $ from"./ui/DefaultUI.js";import F from"./ui/2d/DefaultUI2D.js";import{RenderingContextOptions as B}from"./webgl/RenderingContextOptions.js";import{isWebMap as H}from"../webmap/utils.js";import Z from"../webmap/background/ColorBackground.js";let J,K,Q,X,Y,ee,te;async function ie(){const[,{GraphicsView2D:e,GraphicContainer:t,LabelManager:i,MapViewNavigation:r,MagnifierView2D:s,GridView2D:a,Stage:n}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);K=e,Q=t,X=i,Y=r,ee=s,te=a,J=n}let re=class extends(_(b(f(M(V(v)))))){get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this._magnifierView=null,this._gridView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.labelManager=null,this.navigation=new G({actionMap:new I({dragTertiary:"none"})}),this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.analysisViewManager=new q({importAnalysisViewModule:e=>O(e),view:this}),this.floors=new i,this.grid=null,this.map=null,this.timeline=new U,this.type="2d",this.view2dType=null,this.ui=new F,this.test={takeScreenshot:async e=>E(this._getScreenshotView(e),e)},this.padding={top:0,right:0,bottom:0,left:0},u()}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=n(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new k(this.featuresTilingScheme)}get constraintsInfo(){const e=this.defaultsFromMap?.tileInfo,t=this.spatialReference;return{lods:e?.spatialReference?.equals(t)?e.lods:null,spatialReference:t}}get initialExtentRequired(){if(!this.stateManager)return!1;const{scale:e,constraints:t,center:i,viewpoint:r,extent:s}=this;let a=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint)&&(!s&&(t?.effectiveLODs||(a=-1),(!i||0===e&&-1===a)&&(null==r?.targetGeometry||"extent"!==r.targetGeometry.type&&!r.scale)))}get defaultsFromMapSettings(){return{required:{extent:!1,heightModelInfo:!1,tileInfo:!0},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get scheduler(){return this.frameTask.scheduler}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return y(t.spatialReference,i)}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get background(){return H(this.map)?this.map.initialViewProperties.background:null}set background(e){this._override("background",e)}get center(){return this.stateManager?.center??null}set center(e){this.stateManager.center=e}get constraints(){return super.constraints}set constraints(e){super.constraints=e}get extent(){return super.extent}set extent(e){super.extent=e}get highlightOptions(){return D(this)}set highlightOptions(e){P(this,e)}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get rendering(){return this.stage?.renderRequested??!1}get resizeAlign(){return super.resizeAlign}set resizeAlign(e){super.resizeAlign=e}get resolution(){return this.stateManager.resolution??0}get rotation(){return super.rotation}set rotation(e){super.rotation=e}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get spatialReference(){return super.spatialReference}set spatialReference(e){super.spatialReference=e}get spatialReferenceLocked(){return this._get("spatialReferenceLocked")}set spatialReferenceLocked(e){this.stage&&a.getLogger(this).warn("spatialReferenceLocked cannot be changed after the view has become ready"),this._set("spatialReferenceLocked",e)}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){const e=!(!this.magnifier.visible||null===this.magnifier.position||!this._magnifierView?.updatingHandles.updating),t=!this.destroyed&&(!this.layerViewManager||!this.labelManager||!this.graphicsView||!0===this.analysisViewManager.updating||!0===this.layerViewManager.updating||!0===this.labelManager.updating||!0===this.graphicsView.updating||this.allLayerViews.some(e=>!e.destroyed&&!("layerViews"in e)&&!0===e.updating)||e);if(has("esri-2d-log-updating")){const i=this.allLayerViews.reduce((e,t)=>({...e,[`${t.layer.id}(${t.layer.type})`]:!t.destroyed&&!("layerViews"in t)&&t.updating}),{});console.log(`Updating MapView: ${t}\n-> Null LayerViewManager: ${!this.layerViewManager}\n-> Null LabelManager: ${!this.labelManager}\n-> Null GraphicsView: ${!this.graphicsView}\n-> layerViewManager.updating: ${this.layerViewManager?.updating}\n-> labelManager.updating: ${this.labelManager?.updating}\n-> graphicsView.updating: ${this.graphicsView?.updating}\n-> allLayerViews: ${JSON.stringify(i)}\n-> updatingMagnifier: ${e}\n`)}return t}get viewpoint(){return super.viewpoint}set viewpoint(e){super.viewpoint=e}get visibleArea(){const e=this.stateManager.visibleArea;return e?new m({rings:[e.map(e=>[e[0],e[1]])],spatialReference:this.spatialReference}):e}get zoom(){return this.stateManager.zoom??-1}set zoom(e){this.stateManager.zoom=e}get navigating(){return this.mapViewNavigation?.interacting??!1}async hitTest(e,t){return A(this,e,t)}async takeScreenshot(e){return z(this._getScreenshotView(e),e)}toScreen(e,t){return this.stateManager.toScreen(e,t)}async whenAnalysisView(e){if(null==e.parent)throw new s("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return H(this.map)?this.map.initialViewProperties.timeZone:null}getDefaultTimeExtent(){return H(this.map)?this.map.initialViewProperties.timeExtent:null}getSurface(){return this.surface}hasLayerViewModule(e){return R.hasLayerViewModule(e)}importLayerView(e){return R.importLayerView(e)}pixelSizeAt(){return this.ready?this.resolution:(a.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}async popupHitTest(e){const t=this.toMap(e),i=await this.hitTest(e),r=this.allLayerViews.toArray().filter(i=>i.clips.every(i=>x(this,i,e,t))).reverse(),s=new globalThis.Map(r.map(e=>[e.layer.uid,e])),a=[];let n=0,o=0;for(;n<i.results.length||o<r.length;){const e=i.results.at(n);if(e&&"graphic"!==e.type){++n;continue}const l=s.get((e?.layer??e?.graphic.layer)?.uid);if((!e||l)&&o<r.length&&r.at(o)!==l){const e=r.at(o);"fetchPopupFeaturesAtLocation"in e&&a.push({mapPoint:t,layerView:e}),++o}else e&&(a.push({graphic:e.graphic,layerView:l}),++n)}return{hits:a,location:t}}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}async validate(){let e=W(this.type);if(has("safari")&&has("safari")<9&&(e=new s("mapview:browser-not-supported","This browser is not supported by MapView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:has("safari")})),null!=e)throw a.getLogger(this).warn("#validate()",e.message),e}loadAsyncDependencies(){return ie()}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:r,padding:s,size:a}=this;if(!e)return null;const n=r&&"initialViewProperties"in r?r.initialViewProperties:void 0,o=this.stateManager.getUserStartupOptions(this.size),l=n?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,g=l?.rotation??0,d=l?.scale||p&&L(p,[a[0]-s.left-s.right,a[1]-s.top-s.bottom]),u=o.center??h,c=o.rotation??g,m=o.scale??d;return u&&m?new t({targetGeometry:u,scale:m,rotation:c}):null}_startup(){this.timeline.begin("MapView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=new T(this.surface),i=new J(this.surface,{canvas:this.renderCanvas,contextOptions:new B(this.deactivatedWebGLExtensions,this.debugWebGLExtensions),renderingOptions:this.renderingOptions,timeline:this.timeline},t);this.stage=i,this._magnifierView=new ee,this._magnifierView.magnifier=this.magnifier,this._gridView=new te;const r=new X({view:this});this._set("labelManager",r);const s=new j({view:this});this._set("animationManager",s);const a=new Y({view:this,animationManager:s});this._set("mapViewNavigation",a),this._setupSpatialReferenceDependentProperties(),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),i.on("webgl-error",e=>this.fatalError=e.error),o(()=>this.stationary,e=>i.stationary=e,l),o(()=>this.background,e=>{i.backgroundColor=e?.color,this._magnifierView.backgroundColor=e?.color},l),o(()=>this.magnifier,e=>this._magnifierView.magnifier=e,l),o(()=>this.grid,e=>this._gridView.grid=e,l),o(()=>this.renderingOptions,e=>i.renderingOptions=e,l),o(()=>this.highlights.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{i.highlightGradient=C(i.highlightGradient,this.highlights.items)},l),o(()=>this.state.id,()=>i.state=this.state,l),o(()=>this.animationsEnabled,e=>this.stage.animationsEnabled=e,l)],"map-view"),this._updateStageChildren();const n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this)),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.labelManager.destroy(),this._magnifierView.destroy(),this._gridView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._gridView=null,this._set("labelManager",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(e=>{this.stage.addChild(e.container)});const e=this.graphicsView;this.stage.addChild(e.container),this.stage.addChild(this._magnifierView),this.stage.addChild(this._gridView)}_setupSpatialReferenceDependentProperties(){const e=new S(w.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",e);const t=new K({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new Q(e)});this._set("graphicsView",t)}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(e){const{allLayerViews:t,padding:i,size:r,stage:s}=this;return{allLayerViews:t,backgroundColor:e?.ignoreBackground?null:this.background?.color,padding:i,size:r,stage:s}}_spatialReferenceChanged(e){if(this.ready){this.frameTask.stop();for(const e of this.allLayerViews)e.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(e),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const e of this.allLayerViews)e.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}static{this.type="2d"}};e([p({constructOnly:!0})],re.prototype,"deactivatedWebGLExtensions",void 0),e([p({constructOnly:!0})],re.prototype,"debugWebGLExtensions",void 0),e([p({readOnly:!0})],re.prototype,"featuresTilingScheme",void 0),e([p({readOnly:!0})],re.prototype,"graphicsTileStore",null),e([p()],re.prototype,"graphicsView",void 0),e([p()],re.prototype,"constraintsInfo",null),e([p()],re.prototype,"initialExtentRequired",null),e([p()],re.prototype,"labelManager",void 0),e([p({type:G,nonNullable:!0})],re.prototype,"navigation",void 0),e([p({constructOnly:!0})],re.prototype,"renderCanvas",void 0),e([p()],re.prototype,"renderingOptions",void 0),e([p({constructOnly:!0})],re.prototype,"supersampleScreenshotsEnabled",void 0),e([p()],re.prototype,"defaultsFromMapSettings",null),e([p({readOnly:!0})],re.prototype,"typeSpecificPreconditionsReady",null),e([p()],re.prototype,"analysisViewManager",void 0),e([p({type:Z})],re.prototype,"background",null),e([p({type:c})],re.prototype,"center",null),e([p({type:i})],re.prototype,"floors",void 0),e([p()],re.prototype,"grid",void 0),e([p({type:N})],re.prototype,"highlightOptions",null),e([p()],re.prototype,"map",void 0),e([p()],re.prototype,"padding",null),e([p({readOnly:!0})],re.prototype,"rendering",null),e([p({readOnly:!0})],re.prototype,"resolution",null),e([p()],re.prototype,"scale",null),e([p({type:Boolean,value:!1})],re.prototype,"spatialReferenceLocked",null),e([p({readOnly:!0})],re.prototype,"tileInfo",null),e([p({type:U,readOnly:!0})],re.prototype,"timeline",void 0),e([p({readOnly:!0})],re.prototype,"type",void 0),e([p({readOnly:!0})],re.prototype,"updating",null),e([p({readOnly:!0})],re.prototype,"view2dType",void 0),e([p({readOnly:!0})],re.prototype,"visibleArea",null),e([p()],re.prototype,"zoom",null),e([p({readOnly:!0})],re.prototype,"navigating",null),e([p(),h(e=>e instanceof $?e:d(F,e))],re.prototype,"ui",void 0),re=e([g("esri.views.View2D")],re);const se=re;export{se as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../Viewpoint.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import has from"../core/has.js";import a from"../core/Logger.js";import{destroyMaybe as n}from"../core/maybe.js";import{watch as o,syncAndInitial as l}from"../core/reactiveUtils.js";import{property as p,cast as h,subclass as g}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import{initialize as u}from"../core/workers/workers.js";import c from"../geometry/Point.js";import m from"../geometry/Polygon.js";import{isLoadedOrLoadFor as y}from"../geometry/projectionUtils.js";import w from"../layers/support/TileInfo.js";import{BreakpointsOwner as f}from"./BreakpointsOwner.js";import{DOMContainer as V}from"./DOMContainer.js";import{PopupView as M}from"./PopupView.js";import v from"./View.js";import{Viewport2DBaseMixin as b}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as _}from"./Viewport2DMixin.js";import j from"./2d/AnimationManager.js";import{layerView2DImporter as R}from"./2d/layerViewModuleImportUtils.js";import S from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{extentToScale as L}from"./2d/viewpointUtils.js";import{importAnalysisViewModule as O}from"./2d/analysis/analysisViewModuleImportUtils.js";import{ManagedCanvas as T}from"./2d/engine/ManagedCanvas.js";import k from"./2d/layers/features/support/TileStore.js";import{createOrReuseHighlightGradient as C}from"./2d/layers/support/util.js";import{clipContainsPoint as x}from"./2d/support/clippingUtils.js";import{getDefaultHighlightOptions as D,setDefaultHighlightOptions as P}from"./2d/support/highlightOptionsUtils.js";import{hitTest as A}from"./2d/support/hitTestUtils.js";import{takeRawScreenshot as E,takeScreenshot as z}from"./2d/support/screenshotUtils.js";import{Timeline as U}from"./2d/support/Timeline.js";import G from"./navigation/Navigation.js";import I from"./navigation/NavigationActionMap.js";import q from"./support/AnalysisViewManager.js";import N from"./support/HighlightOptions.js";import{check as W}from"./support/WebGLRequirements.js";import $ from"./ui/DefaultUI.js";import F from"./ui/2d/DefaultUI2D.js";import{RenderingContextOptions as B}from"./webgl/RenderingContextOptions.js";import{isWebMap as H}from"../webmap/utils.js";import Z from"../webmap/background/ColorBackground.js";let J,K,Q,X,Y,ee,te;async function ie(){const[,{GraphicsView2D:e,GraphicContainer:t,LabelManager:i,MapViewNavigation:r,MagnifierView2D:s,GridView2D:a,Stage:n}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);K=e,Q=t,X=i,Y=r,ee=s,te=a,J=n}let re=class extends(_(b(f(M(V(v)))))){get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this._magnifierView=null,this._gridView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.labelManager=null,this.navigation=new G({actionMap:new I({dragTertiary:"none"})}),this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.analysisViewManager=new q({importAnalysisViewModule:e=>O(e),view:this}),this.floors=new i,this.grid=null,this.map=null,this.timeline=new U,this.type="2d",this.view2dType=null,this.ui=new F,this.test={takeScreenshot:async e=>E(this._getScreenshotView(e),e)},this.padding={top:0,right:0,bottom:0,left:0},u()}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=n(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new k(this.featuresTilingScheme)}get constraintsInfo(){const e=this.defaultsFromMap?.tileInfo,t=this.spatialReference;return{lods:e?.spatialReference?.equals(t)?e.lods:null,spatialReference:t}}get initialExtentRequired(){if(!this.stateManager)return!1;const{scale:e,constraints:t,center:i,viewpoint:r,extent:s}=this;let a=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint)&&(!s&&(t?.effectiveLODs||(a=-1),(!i||0===e&&-1===a)&&(null==r?.targetGeometry||"extent"!==r.targetGeometry.type&&!r.scale)))}get defaultsFromMapSettings(){return{required:{extent:!1,heightModelInfo:!1,tileInfo:!0},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get scheduler(){return this.frameTask.scheduler}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return y(t.spatialReference,i)}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get background(){return H(this.map)?this.map.initialViewProperties.background:null}set background(e){this._override("background",e)}get center(){return this.stateManager?.center??null}set center(e){this.stateManager.center=e}get constraints(){return super.constraints}set constraints(e){super.constraints=e}get extent(){return super.extent}set extent(e){super.extent=e}get highlightOptions(){return D(this)}set highlightOptions(e){P(this,e)}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get rendering(){return this.stage?.renderRequested??!1}get resizeAlign(){return super.resizeAlign}set resizeAlign(e){super.resizeAlign=e}get resolution(){return this.stateManager.resolution??0}get rotation(){return super.rotation}set rotation(e){super.rotation=e}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get spatialReference(){return super.spatialReference}set spatialReference(e){super.spatialReference=e}get spatialReferenceLocked(){return this._get("spatialReferenceLocked")}set spatialReferenceLocked(e){this.stage&&a.getLogger(this).warn("spatialReferenceLocked cannot be changed after the view has become ready"),this._set("spatialReferenceLocked",e)}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){const e=!(!this.magnifier.visible||null===this.magnifier.position||!this._magnifierView?.updatingHandles.updating),t=!this.destroyed&&(!this.layerViewManager||!this.labelManager||!this.graphicsView||!0===this.analysisViewManager.updating||!0===this.layerViewManager.updating||!0===this.labelManager.updating||!0===this.graphicsView.updating||this.allLayerViews.some(e=>!e.destroyed&&!("layerViews"in e)&&!0===e.updating)||e);if(has("esri-2d-log-updating")){const i=this.allLayerViews.reduce((e,t)=>({...e,[`${t.layer.id}(${t.layer.type})`]:!t.destroyed&&!("layerViews"in t)&&t.updating}),{});console.log(`Updating MapView: ${t}\n-> Null LayerViewManager: ${!this.layerViewManager}\n-> Null LabelManager: ${!this.labelManager}\n-> Null GraphicsView: ${!this.graphicsView}\n-> layerViewManager.updating: ${this.layerViewManager?.updating}\n-> labelManager.updating: ${this.labelManager?.updating}\n-> graphicsView.updating: ${this.graphicsView?.updating}\n-> allLayerViews: ${JSON.stringify(i)}\n-> updatingMagnifier: ${e}\n`)}return t}get viewpoint(){return super.viewpoint}set viewpoint(e){super.viewpoint=e}get visibleArea(){const e=this.stateManager.visibleArea;return e?new m({rings:[e.map(e=>[e[0],e[1]])],spatialReference:this.spatialReference}):e}get zoom(){return this.stateManager.zoom??-1}set zoom(e){this.stateManager.zoom=e}get navigating(){return this.mapViewNavigation?.interacting??!1}async hitTest(e,t){return A(this,e,t)}async takeScreenshot(e){return z(this._getScreenshotView(e),e)}toScreen(e,t){return this.stateManager.toScreen(e,t)}async whenAnalysisView(e){if(null==e.parent)throw new s("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return H(this.map)?this.map.initialViewProperties.timeZone:null}getDefaultTimeExtent(){return H(this.map)?this.map.initialViewProperties.timeExtent:null}getSurface(){return this.surface}hasLayerViewModule(e){return R.hasLayerViewModule(e)}importLayerView(e){return R.importLayerView(e)}pixelSizeAt(){return this.ready?this.resolution:(a.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}async popupHitTest(e){const t=this.toMap(e),i=await this.hitTest(e),r=this.allLayerViews.toArray().filter(i=>i.clips.every(i=>x(this,i,e,t))).reverse(),s=new globalThis.Map(r.map(e=>[e.layer.uid,e])),a=[];let n=0,o=0;for(;n<i.results.length||o<r.length;){const e=i.results.at(n);if(e&&"graphic"!==e.type){++n;continue}const l=s.get((e?.layer??e?.graphic.layer)?.uid);if((!e||l)&&o<r.length&&r.at(o)!==l){const e=r.at(o);"fetchPopupFeaturesAtLocation"in e&&a.push({mapPoint:t,layerView:e}),++o}else e&&(a.push({graphic:e.graphic,layerView:l}),++n)}return{hits:a,location:t}}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}async validate(){let e=W(this.type);if(has("safari")&&has("safari")<9&&(e=new s("mapview:browser-not-supported","This browser is not supported by MapView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:has("safari")})),null!=e)throw a.getLogger(this).warn("#validate()",e.message),e}loadAsyncDependencies(){return ie()}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:r,padding:s,size:a}=this;if(!e)return null;const n=r&&"initialViewProperties"in r?r.initialViewProperties:void 0,o=this.stateManager.getUserStartupOptions(this.size),l=n?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,g=l?.rotation??0,d=l?.scale||p&&L(p,[a[0]-s.left-s.right,a[1]-s.top-s.bottom]),u=o.center??h,c=o.rotation??g,m=o.scale??d;return u&&m?new t({targetGeometry:u,scale:m,rotation:c}):null}_startup(){this.timeline.begin("MapView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=new T(this.surface),i=new J(this.surface,{canvas:this.renderCanvas,contextOptions:new B(this.deactivatedWebGLExtensions,this.debugWebGLExtensions),renderingOptions:this.renderingOptions,timeline:this.timeline},t);this.stage=i,this._magnifierView=new ee,this._magnifierView.magnifier=this.magnifier,this._gridView=new te;const r=new X({view:this});this._set("labelManager",r);const s=new j({view:this});this._set("animationManager",s);const a=new Y({view:this,animationManager:s});this._set("mapViewNavigation",a),this._setupSpatialReferenceDependentProperties(),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),i.on("webgl-error",e=>this.fatalError=e.error),o(()=>this.stationary,e=>i.stationary=e,l),o(()=>this.background,e=>{i.backgroundColor=e?.color,this._magnifierView.backgroundColor=e?.color},l),o(()=>this.magnifier,e=>this._magnifierView.magnifier=e,l),o(()=>this.grid,e=>this._gridView.grid=e,l),o(()=>this.renderingOptions,e=>i.renderingOptions=e,l),o(()=>this.highlights.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{i.highlightGradient=C(i.highlightGradient,this.highlights.items)},l),o(()=>this.state.id,()=>i.state=this.state,l),o(()=>this.animationsEnabled,e=>this.stage.animationsEnabled=e,l)],"map-view"),this._updateStageChildren();const n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this)),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.labelManager.destroy(),this._magnifierView.destroy(),this._gridView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._gridView=null,this._set("labelManager",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(e=>{this.stage.addChild(e.container)});const e=this.graphicsView;this.stage.addChild(e.container),this.stage.addChild(this._magnifierView),this.stage.addChild(this._gridView)}_setupSpatialReferenceDependentProperties(){const e=new S(w.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",e);const t=new K({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new Q(e,!0)});this._set("graphicsView",t)}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(e){const{allLayerViews:t,padding:i,size:r,stage:s}=this;return{allLayerViews:t,backgroundColor:e?.ignoreBackground?null:this.background?.color,padding:i,size:r,stage:s}}_spatialReferenceChanged(e){if(this.ready){this.frameTask.stop();for(const e of this.allLayerViews)e.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(e),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const e of this.allLayerViews)e.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}static{this.type="2d"}};e([p({constructOnly:!0})],re.prototype,"deactivatedWebGLExtensions",void 0),e([p({constructOnly:!0})],re.prototype,"debugWebGLExtensions",void 0),e([p({readOnly:!0})],re.prototype,"featuresTilingScheme",void 0),e([p({readOnly:!0})],re.prototype,"graphicsTileStore",null),e([p()],re.prototype,"graphicsView",void 0),e([p()],re.prototype,"constraintsInfo",null),e([p()],re.prototype,"initialExtentRequired",null),e([p()],re.prototype,"labelManager",void 0),e([p({type:G,nonNullable:!0})],re.prototype,"navigation",void 0),e([p({constructOnly:!0})],re.prototype,"renderCanvas",void 0),e([p()],re.prototype,"renderingOptions",void 0),e([p({constructOnly:!0})],re.prototype,"supersampleScreenshotsEnabled",void 0),e([p()],re.prototype,"defaultsFromMapSettings",null),e([p({readOnly:!0})],re.prototype,"typeSpecificPreconditionsReady",null),e([p()],re.prototype,"analysisViewManager",void 0),e([p({type:Z})],re.prototype,"background",null),e([p({type:c})],re.prototype,"center",null),e([p({type:i})],re.prototype,"floors",void 0),e([p()],re.prototype,"grid",void 0),e([p({type:N})],re.prototype,"highlightOptions",null),e([p()],re.prototype,"map",void 0),e([p()],re.prototype,"padding",null),e([p({readOnly:!0})],re.prototype,"rendering",null),e([p({readOnly:!0})],re.prototype,"resolution",null),e([p()],re.prototype,"scale",null),e([p({type:Boolean,value:!1})],re.prototype,"spatialReferenceLocked",null),e([p({readOnly:!0})],re.prototype,"tileInfo",null),e([p({type:U,readOnly:!0})],re.prototype,"timeline",void 0),e([p({readOnly:!0})],re.prototype,"type",void 0),e([p({readOnly:!0})],re.prototype,"updating",null),e([p({readOnly:!0})],re.prototype,"view2dType",void 0),e([p({readOnly:!0})],re.prototype,"visibleArea",null),e([p()],re.prototype,"zoom",null),e([p({readOnly:!0})],re.prototype,"navigating",null),e([p(),h(e=>e instanceof $?e:d(F,e))],re.prototype,"ui",void 0),re=e([g("esri.views.View2D")],re);const se=re;export{se as default};
|
|
@@ -6,6 +6,7 @@ export interface Viewport2DMixinProperties {}
|
|
|
6
6
|
|
|
7
7
|
export type Viewport2DMixinEvents = SceneViewEventTypes;
|
|
8
8
|
|
|
9
|
+
/** Mixin that adds event handling capabilities to [View2D](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html) and [VideoView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html). */
|
|
9
10
|
export abstract class Viewport2DMixin {
|
|
10
11
|
constructor(...args: any[]);
|
|
11
12
|
/**
|
|
@@ -16,8 +17,8 @@ export abstract class Viewport2DMixin {
|
|
|
16
17
|
"@eventTypes": Viewport2DMixinEvents;
|
|
17
18
|
/**
|
|
18
19
|
* Registers an event handler on the instance. Call this method to hook an
|
|
19
|
-
* event with a listener. See the
|
|
20
|
-
* of listened events.
|
|
20
|
+
* event with a listener. See the [Events summary table](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-Viewport2DMixin.html#events-summary)
|
|
21
|
+
* for a list of listened events.
|
|
21
22
|
*
|
|
22
23
|
* @param type - The name of the event or events to listen for.
|
|
23
24
|
* @param listener - The function to call when the event is fired, if modifiers were specified.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ElevationProfileLineUnion } from "../../../analysis/ElevationProfile/
|
|
1
|
+
import type { ElevationProfileLineUnion } from "../../../analysis/ElevationProfile/types.js";
|
|
2
2
|
import type { Clonable, ClonableMixinProperties } from "../../../core/Clonable.js";
|
|
3
3
|
import type { ElevationProfileSample, ElevationProfileStatistics } from "./types.js";
|
|
4
4
|
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{cyclicalPI as e,cyclical2PI as t}from"../../../core/Cyclical.js";import{valueInUnit as s,createAngle as r}from"../../../core/quantity.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as o}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as n,markAsTarget as a,fromVec3 as l}from"../sketch/normalizedPoint.js";import{SnappingAlgorithm as p}from"./SnappingAlgorithm.js";import{isLine as h,editEdgeToSnappingEdge as c,squaredScreenDistance as d}from"./snappingUtils.js";import{LineSnappingCandidate as m}from"./candidates/LineSnappingCandidate.js";import{vectorToScreenPoint as g}from"../support/viewUtils.js";import{radiansGeographicBetweenVec as f,pointFromDistanceAlongAzimuth as u}from"../../support/angularMeasurementUtils.js";import{projectPointToLineLike as x}from"../../support/geometry3dUtils.js";class S extends p{constructor(e,t,s){super(e,t),this._geodesicLengthMeasurementUtils=s}snapNewVertex(e,t){const s=t.editGeometryOperations.data.parts
|
|
5
|
+
import{cyclicalPI as e,cyclical2PI as t}from"../../../core/Cyclical.js";import{valueInUnit as s,createAngle as r}from"../../../core/quantity.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as o}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as n,markAsTarget as a,fromVec3 as l}from"../sketch/normalizedPoint.js";import{SnappingAlgorithm as p}from"./SnappingAlgorithm.js";import{isLine as h,editEdgeToSnappingEdge as c,squaredScreenDistance as d}from"./snappingUtils.js";import{LineSnappingCandidate as m}from"./candidates/LineSnappingCandidate.js";import{vectorToScreenPoint as g}from"../support/viewUtils.js";import{radiansGeographicBetweenVec as f,pointFromDistanceAlongAzimuth as u}from"../../support/angularMeasurementUtils.js";import{projectPointToLineLike as x}from"../../support/geometry3dUtils.js";class S extends p{constructor(e,t,s){super(e,t),this._geodesicLengthMeasurementUtils=s}snapNewVertex(e,t){const s=t.editGeometryOperations.data.parts.at(-1),r=s?.segments.length??0,i=[];if(r<1||!s)return i;const{spatialReference:n}=t,a=g(e,n,o,this.view),{view:l}=this,p=s.segments[r-1];let d=p;do{if(h(d)&&this.edgeExceedsShortLineThreshold(d,t)){const s=c(d,l,t);this._processCandidateProposal(s.left,s.right,e,a,t,i)}d=d.leftVertex.leftSegment}while(d&&d!==p);return i}snapExistingVertex(e,t){const s=[],r=t.vertexHandle,i=r.part;if(i.segments.length<2)return s;const{view:a}=this,{spatialReference:l}=t,p=g(e,l,o,a),d=r.leftSegment,m=r.rightSegment;h(d)&&h(m)&&this.edgeExceedsShortLineThreshold(d,t)&&this.edgeExceedsShortLineThreshold(m,t)&&this._processCandidateProposal(n(d.leftVertex.pos,a,t),n(m.rightVertex.pos,a,t),e,p,t,s);const f=i.segments[0];let u=f;do{if(h(u)&&u!==r.leftSegment&&u!==r.rightSegment&&this.edgeExceedsShortLineThreshold(u,t)){const r=c(u,a,t);this._processCandidateProposal(r.left,r.right,e,p,t,s)}u=u.rightVertex.rightSegment}while(u&&u!==f);return s}_processCandidateProposal(e,t,s,r,n,p){const{spatialReference:h,pointer:c}=n,f=i();j(f,e,t,s,n,this._geodesicLengthMeasurementUtils);const u=a(l(f));d(r,g(u,h,o,this.view))<this.squaredProximityThreshold(c)&&p.push(new m({lineStart:e,lineEnd:t,targetPoint:u,isDraped:"on-the-ground"===n.elevationInfo?.mode}))}}function j(e,t,s,r,i,o){v(e,t,s,r,i,o)||w(e,r,t,s)}function v(i,o,n,a,{spatialReference:l},p){const h=f(o,n,l,l);if(null==h)return!1;const c=f(n,a,l,l);if(null==c)return!1;const d=p.geodesicDistance(n,a,l);if(null==d)return!1;const m=Math.abs(e.shortestSignedDiff(h,c))>Math.PI/2?t.normalize(h+Math.PI):h;return u(i,n,l,s(d,"meters"),r(m,"radians","geographic"),"geodesic"),i[2]=a[2],!0}function w(e,t,s,r){x(t,{start:s,end:r,type:1},e),e[2]=t[2]}export{S as LineSnapper};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{squaredDistance as e}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{absoluteHeightElevationInfo as r}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as i,asVec2 as s,markAsTarget as n,fromValues as o}from"../sketch/normalizedPoint.js";import{defaults as l}from"./Settings.js";import{SnappingAlgorithm as a}from"./SnappingAlgorithm.js";import{isLine as c,editEdgeToSnappingEdge as h,squaredScreenDistance as p}from"./snappingUtils.js";import{ParallelLineSnappingCandidate as g}from"./candidates/ParallelLineSnappingCandidate.js";import{vectorToScreenPoint as
|
|
5
|
+
import{squaredDistance as e}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{absoluteHeightElevationInfo as r}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as i,asVec2 as s,markAsTarget as n,fromValues as o}from"../sketch/normalizedPoint.js";import{defaults as l}from"./Settings.js";import{SnappingAlgorithm as a}from"./SnappingAlgorithm.js";import{isLine as c,editEdgeToSnappingEdge as h,squaredScreenDistance as p}from"./snappingUtils.js";import{ParallelLineSnappingCandidate as g}from"./candidates/ParallelLineSnappingCandidate.js";import{vectorToScreenPoint as f}from"../support/viewUtils.js";import{projectPointToLine as m}from"../../support/geometry2dUtils.js";class d extends a{snapNewVertex(e,t){const s=t.editGeometryOperations.data.parts.at(-1),n=[];if(!s)return n;const o=s.segments.length,l=s.vertices.length;if(o<2)return n;const{view:a}=this,p=f(e,t.spatialReference,r,a),g=s.vertices[0],m=s.vertices[l-1],d=c(m.leftSegment)?i(m.pos,a,t):null,u=c(g.rightSegment)?i(g.pos,a,t):null,v=s.segments[o-1];let x=v;do{if(c(x)&&this.edgeExceedsShortLineThreshold(x,t)){const r=h(x,a,t);d&&this._checkEdgeForParallelLines(r,d,e,p,t,n),u&&this._checkEdgeForParallelLines(r,u,e,p,t,n)}x=x.leftVertex.leftSegment}while(x&&x!==v);return n}snapExistingVertex(e,t){const s=[],n=t.vertexHandle,o=n.part;if(o.segments.length<3)return s;const{view:l}=this,a=f(e,t.spatialReference,r,l),p=n.leftSegment,g=n.rightSegment,m=o.vertices[0],d=i(m.pos,l,t),u=o.vertices.length,v=o.vertices[u-1],x=i(v.pos,l,t),L=o.segments[0];let S=L;do{if(c(S)&&S!==p&&S!==g&&this.edgeExceedsShortLineThreshold(S,t)){const r=h(S,l,t);c(p)&&this._checkEdgeForParallelLines(r,i(p.leftVertex.pos,l,t),e,a,t,s),c(g)&&this._checkEdgeForParallelLines(r,i(g.rightVertex.pos,l,t),e,a,t,s),n===m?this._checkEdgeForParallelLines(r,x,e,a,t,s):n===v&&this._checkEdgeForParallelLines(r,d,e,a,t,s)}S=S.rightVertex.rightSegment}while(S&&S!==L);return s}_checkEdgeForParallelLines(t,i,a,c,h,d){const x=t.left,L=t.right;if(m(v,s(i),s(x),s(L)),e(v,s(i))<l.parallelLineThreshold)return;m(v,s(a),s(x),s(L),s(i));const{spatialReference:S,pointer:P}=h,j=n(o(v[0],v[1],a[2]));if(p(c,f(j,S,r,this.view))<this.squaredProximityThreshold(P)){if(this.isVertical(j,i,h)||this.isVertical(x,L,h))return;if(u(t,d))return;d.push(new g({referenceLine:t,lineStart:i,targetPoint:j,isDraped:"on-the-ground"===h.elevationInfo?.mode}))}}}function u(t,r){const i=t.left,n=t.right;for(const o of r)if(m(v,s(n),s(o.constraint.start),s(o.constraint.end),s(i)),e(v,s(n))<l.parallelLineThreshold)return o.addReferenceLine(t),!0;return!1}const v=t();export{d as ParallelLineSnapper};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{cyclical2PI as e}from"../../../core/Cyclical.js";import{createAngle as t,valueInUnit as r}from"../../../core/quantity.js";import{subtract as i,dot as n,squaredLength as s,scaleAndAdd as o}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{c,e as p,h as g}from"../../../chunks/vec32.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as m}from"../../../support/elevationInfoUtils.js";import{VerticalHalfPlaneConstraint as l}from"../sketch/constraints.js";import{fromAnyMapPoint as f,asVec2 as d,markAsTarget as u,fromValues as x,fromVec3 as S}from"../sketch/normalizedPoint.js";import{SnappingAlgorithm as v}from"./SnappingAlgorithm.js";import{isLine as V,squaredScreenDistance as j}from"./snappingUtils.js";import{RightAngleSnappingCandidate as k}from"./candidates/RightAngleSnappingCandidate.js";import{vectorToScreenPoint as C}from"../support/viewUtils.js";import{radiansGeographicBetweenVec as _,pointFromDistanceAlongAzimuth as w}from"../../support/angularMeasurementUtils.js";class y extends v{constructor(e,t,r){super(e,t),this._geodesicLengthMeasurementUtils=r}snapNewVertex(e,t){const r=t.editGeometryOperations.data.parts
|
|
5
|
+
import{cyclical2PI as e}from"../../../core/Cyclical.js";import{createAngle as t,valueInUnit as r}from"../../../core/quantity.js";import{subtract as i,dot as n,squaredLength as s,scaleAndAdd as o}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{c,e as p,h as g}from"../../../chunks/vec32.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as m}from"../../../support/elevationInfoUtils.js";import{VerticalHalfPlaneConstraint as l}from"../sketch/constraints.js";import{fromAnyMapPoint as f,asVec2 as d,markAsTarget as u,fromValues as x,fromVec3 as S}from"../sketch/normalizedPoint.js";import{SnappingAlgorithm as v}from"./SnappingAlgorithm.js";import{isLine as V,squaredScreenDistance as j}from"./snappingUtils.js";import{RightAngleSnappingCandidate as k}from"./candidates/RightAngleSnappingCandidate.js";import{vectorToScreenPoint as C}from"../support/viewUtils.js";import{radiansGeographicBetweenVec as _,pointFromDistanceAlongAzimuth as w}from"../../support/angularMeasurementUtils.js";class y extends v{constructor(e,t,r){super(e,t),this._geodesicLengthMeasurementUtils=r}snapNewVertex(e,t){const r=t.editGeometryOperations.data.parts.at(-1),i=[];if(!r||r.vertices.length<2)return i;const{view:n}=this,s=C(e,t.spatialReference,m,n),o=r.vertices.at(-1);V(o.leftSegment)&&this._checkForSnappingCandidate(1,i,o.leftSegment,o,o.leftSegment.leftVertex,e,s,t);const a=r.vertices[0];return V(a.rightSegment)&&this._checkForSnappingCandidate(2,i,a.rightSegment,a,a.rightSegment.rightVertex,e,s,t),i}snapExistingVertex(e,t){const r=[],i=t.vertexHandle,{part:n}=i;if(n.vertices.length<3)return r;const{view:s}=this,o=C(e,t.spatialReference,m,s),a=i.leftSegment,c=i.rightSegment;if(V(a?.leftVertex.leftSegment)){const i=a.leftVertex.leftSegment;this._checkForSnappingCandidate(3,r,i,i.rightVertex,i.leftVertex,e,o,t)}if(V(c)&&V(c.rightVertex.rightSegment)){const i=c.rightVertex.rightSegment;this._checkForSnappingCandidate(3,r,i,i.leftVertex,i.rightVertex,e,o,t)}return r}_checkForSnappingCandidate(e,t,r,i,n,s,o,a){if(!V(r)||!this.edgeExceedsShortLineThreshold(r,a))return;const c=this.view,p=f(i.pos,c,a),g=f(n.pos,c,a);F(U,g,p,s,a,this._geodesicLengthMeasurementUtils),this._checkForSnappingCandidateAlongProjectedRay(e,t,g,p,U,s,o,a)}_checkForSnappingCandidateAlongProjectedRay(e,t,r,a,p,g,f,v){const{spatialReference:V,pointer:_}=v,w=i(P,d(g),d(a)),y=n(p,w)/s(p),F=o(P,d(a),p,y),R=u(x(F[0],F[1],g[2]));if(j(f,C(R,V,m,this.view))>this.squaredProximityThreshold(_)||this.isVertical(R,a,v)||this.isVertical(a,r,v))return;const M=c(h(),a,p,Math.sign(y));t.push(new k({targetPoint:R,constraint:new l(a,S(M)),previousVertex:r,otherVertex:a,otherVertexType:1,selfSnappingType:e,isDraped:"on-the-ground"===v.elevationInfo?.mode}))}}function F(e,t,r,i,n,s){R(e,t,r,i,n,s)||M(e,t,r)}function R(i,n,s,o,{spatialReference:a},c){const g=_(n,s,a,a);if(null==g)return!1;const m=_(s,o,a,a);if(null==m)return!1;const l=Math.sign(e.shortestSignedDiff(g,m))*Math.PI*.5,f=t(g+l,"radians","geographic"),d=h(),u=c.geodesicDistance(s,o,a);return null!=u&&(w(d,s,a,r(u,"meters"),f,"geodesic"),p(i,d,s),!0)}function M(e,t,r){const n=i(P,d(r),d(t));g(e,n[1],-n[0],0)}const P=a(),U=h();export{y as RightAngleSnapper};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{lerp as e,distance as t}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{absoluteHeightElevationInfo as r}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as s,asVec2 as
|
|
5
|
+
import{lerp as e,distance as t}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{absoluteHeightElevationInfo as r}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as s,asVec2 as n,markAsTarget as o,fromValues as p}from"../sketch/normalizedPoint.js";import{SnappingAlgorithm as a}from"./SnappingAlgorithm.js";import{squaredScreenDistance as l}from"./snappingUtils.js";import{RightAngleTriangleSnappingCandidate as m}from"./candidates/RightAngleTriangleSnappingCandidate.js";import{vectorToScreenPoint as g}from"../support/viewUtils.js";import{projectPointToCircle as d}from"../../support/geometry2dUtils.js";class h extends a{snapNewVertex(e,t){const i=t.editGeometryOperations.data.parts.at(-1),r=[];if(!i)return r;const n=i.vertices.length;if("polygon"!==t.editGeometryOperations.data.type||n<2)return r;const{view:o}=this,p=i.vertices[0],a=i.vertices[n-1];if(a.leftSegment&&"line"!==a.leftSegment.type||a.rightSegment&&"line"!==a.rightSegment.type)return r;const l=s(p.pos,o,t),m=s(a.pos,o,t);return this._processCandidateProposal(l,m,e,t,r),r}snapExistingVertex(e,t){const i=[],r=t.vertexHandle,n=r.part;if(n.segments.length<2)return i;if("polyline"===t.editGeometryOperations.data.type&&(0===r.index||r.index===n.vertices.length-1))return i;if("line"!==r.leftSegment?.type||"line"!==r.rightSegment?.type)return i;const{view:o}=this,p=s(r.leftSegment.leftVertex.pos,o,t),a=s(r.rightSegment.rightVertex.pos,o,t);return this._processCandidateProposal(p,a,e,t,i),i}_processCandidateProposal(i,s,a,h,c){if(!this.exceedsShortLineThreshold(i,s,h))return;const u=e(f,n(i),n(s),.5),v=.5*t(n(i),n(s)),x=d(f,n(a),u,v),y=o(p(x[0],x[1],a[2])),{spatialReference:S,pointer:j}=h,w=g(a,S,r,this.view);if(l(w,g(y,S,r,this.view))<this.squaredProximityThreshold(j)){if(this.isVertical(i,y,h)||this.isVertical(y,s,h))return;c.push(new m({targetPoint:y,point1:i,point2:s,isDraped:"on-the-ground"===h.elevationInfo?.mode}))}}}const f=i();export{h as RightAngleTriangleSnapper};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../../../core/Evented.js";import{createResolver as i,throwIfAborted as r}from"../../../../../core/promiseUtils.js";import{watch as s,sync as a,whenOnce as n}from"../../../../../core/reactiveUtils.js";import{property as o,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../../core/support/UpdatingHandles.js";import d from"../../../../../geometry/SpatialReference.js";import{fromJSON as h}from"../../../../../geometry/support/jsonUtils.js";import p from"../../../../../layers/graphics/data/
|
|
5
|
+
import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../../../core/Evented.js";import{createResolver as i,throwIfAborted as r}from"../../../../../core/promiseUtils.js";import{watch as s,sync as a,whenOnce as n}from"../../../../../core/reactiveUtils.js";import{property as o,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../../core/support/UpdatingHandles.js";import d from"../../../../../geometry/SpatialReference.js";import{fromJSON as h}from"../../../../../geometry/support/jsonUtils.js";import p from"../../../../../layers/graphics/data/FlatFeatureStore.js";import{QueryEngine as c}from"../../../../../layers/graphics/data/QueryEngine.js";import f from"../../../../../layers/support/TileInfo.js";import{TileKey as m}from"../../../../../layers/support/TileKey.js";import g from"../../../../../rest/support/Query.js";import y from"../../../../../symbols/support/ElevationInfo.js";import{getSnappingCandidateElevationAligner as _}from"../snappingCandidateElevationAlignment.js";import{getSnappingCandidateElevationFilter as S}from"../snappingCandidateElevationFilter.js";import{getSymbologySnappingCandidatesFetcher as F}from"../symbologySnappingCandidates.js";import{FeatureServiceTiledFetcher as v}from"./FeatureServiceTiledFetcher.js";import{FeatureServiceTileStore as w}from"./FeatureServiceTileStore.js";let I=class extends t{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=i(),this._elevationAligner=_(),this._elevationFilter=S(),this._symbologyCandidatesFetcher=F(),this._updatingHandles=new u,this._alignPointsInFeatures=async(e,t)=>{const i={query:e},s=await this.remoteClient.invoke("alignElevation",i,{signal:t});return r(t),s},this._getSymbologyCandidates=async(e,t)=>{const i={candidates:e,spatialReference:this._spatialReference.toJSON()},s=await this.remoteClient.invoke("getSymbologyCandidates",i,{signal:t});return r(t),s}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:i,timeInfo:r,fieldsIndex:n}=e.serviceInfo,{hasZ:o}=e,l=!1,u=d.fromJSON(e.spatialReference);this._spatialReference=u,this._featureStore=new p(t,o,l),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new c({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:n,hasZ:o,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i},timeInfo:r}),this._featureFetcher=new v({store:new w({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:u,sourceSpatialReference:d.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const h="3d"===e.configuration.viewType;return this._elevationAligner=_(h,{elevationInfo:null!=e.elevationInfo?y.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=S(h),this.addHandles([s(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),a),s(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),C}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.suspended=e,C}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.outFields=new Set(e??[]),C}async fetchCandidates(e,t){await this._whenSetup.promise,r(t);const i=j(e,this._featureStore.hasZ),s=t?.signal,a=await this._queryEngine.executeQueryForSnapping(i,s);r(s);const n=await this._elevationAligner.alignCandidates(a.candidates,d.fromJSON(e.point.spatialReference)??d.WGS84,s);r(s);const o=await this._symbologyCandidatesFetcher.fetch(n,s);r(s);const l=0===o.length?n:n.concat(o);return{result:{candidates:this._elevationFilter.filter(i,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles.map(e=>m.fromJSON(e)),this._featureFetcher.tileInfo=null!=e.tileInfo?f.fromJSON(e.tileInfo):null,C}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.refresh(),C}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),await n(()=>!this.updating,t),r(t),C}async getDebugInfo(e,t){return r(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),r(t),C}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),C}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),C}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),C}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=F(e,this._getSymbologyCandidates),C}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?g.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};e([o({readOnly:!0})],I.prototype,"updating",null),e([o()],I.prototype,"_isInitializing",void 0),I=e([l("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],I);const b=I;function j(e,t){const i=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:i}};const{distance:r,units:s,spatialRel:a,where:n,timeExtent:o,objectIds:l}=e.filter,u={geometry:e.filter.geometry?h(e.filter.geometry):void 0,distance:r,units:s,spatialRel:a,timeExtent:o,objectIds:l,returnZ:i,where:n??"1=1"};return{...e,query:u}}const C={result:{}};export{b as default};
|
package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{intersection as s,isSubsetOf as i}from"../../../../../core/SetUtils.js";import{property as r,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{create as
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{intersection as s,isSubsetOf as i}from"../../../../../core/SetUtils.js";import{property as r,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{getBoundingRect as n}from"../../../../../geometry/FlatGeometry.js";import{create as l,empty as u,intersects as c,fromExtent as h,area as a}from"../../../../../geometry/support/aaBoundingRect.js";import{BoundsStore as d}from"../../../../../layers/graphics/data/BoundsStore.js";import{TileKey as f}from"../../../../../layers/support/TileKey.js";import{executeQueryForCount as _}from"../../../../../rest/query/operations/query.js";import{FeatureServiceTileCache as m}from"./FeatureServiceTileCache.js";let p=class extends t{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new d,this._tiles=new m,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=l()}add(e,t){for(const s of t)this._referenceFeature(s.objectId);const i=this.featureStore.upsertMany(t),r=i.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>s(e,t),new Set(Object.keys(i[0]?.attributes??[]))),o=this._memoryLimitExceeded;this._addTileStorage(e,new Set(i.map(e=>e.objectId)),r),o&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:s}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<s||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const s of e.objectIds){if(1===this._refCounts.get(s)){const e=this.featureStore.getFeature(s);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}}return t}_hasAttributesForTile(e,t){if(e){const s=this._tiles.get(e);if(s)return!s.objectIds.size||i(t,s.attributeKeys)}return!1}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new g(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)1===this._unreferenceFeature(i)&&t.push(i);this.featureStore.removeManyById(t);const s=e.key.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const{features:i}=await t(e,s);for(const r of i){if(this._tmpBoundingRect.fill(0),null==r.geometry||0===r.geometry.vertexCount)continue;u(this._tmpBoundingRect);const e=n(r.geometry,this._tmpBoundingRect);this._tileBounds.forEachInBounds(e,e=>{const t=this._tiles.get(e);this.featureStore.add(r);const s=r.objectId;t.objectIds.has(s)||(t.objectIds.add(s),this._referenceFeature(s),this._tileFeatureCounts.set(t.key.id,t.objectIds.size))})}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!c(h(this.extent,this._tmpBoundingRect),e.extent))return new C(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new C(e);if(this._hasAttributesForTile(e.id,s))return new C(e);const i=this._createTileTree(e,this.tileInfo);return this._simplify(i,t,null,0,1),this._collectMissingTiles(e,i,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){let r=this._tileFeatureCounts.get(e.id);return null!=r||(r=await _(t,s,i),this._tileFeatureCounts.set(e.id,r)),r}_createTileTree(e,t){const s=new v(e.level,e.row,e.col);return t.updateTileInfo(s,1),this._tileBounds.forEachInBounds(e.extent,i=>{const r=this._tiles.get(i)?.key;r&&y(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)}),s}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const o=t.row>>r,n=t.col>>r,l=e.row<<1,u=n-(e.col<<1)+(o-l<<1),c=e.children[u];if(null!=c)this._populateChildren(c,t,s,i);else{const r=new v(e.level+1,o,n);s.updateTileInfo(r,1),e.children[u]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const o=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),o);const n=r/2,l=n*n;let u=0;for(let c=0;c<e.children.length;c++){const s=e.children[c];u+=null!=s?this._simplify(s,t,e,c,n):l}return 0===u?this._mergeChildren(e):1-u/o<w&&(this._purge(e),null!=s&&(s.children[i]=null),u=o),u}_mergeChildren(e){const t=new Set;let i;this._forEachLeaf(e,e=>{const r=this._tiles.get(e.id);if(r){i=i?s(i,r.attributeKeys):new Set(r.attributeKeys);for(const e of r.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,i??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const r=new S(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,i),r.info}_collectMissingTilesRecurse(e,t,s,i){const r=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,i);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let n=0;n<e.children.length;n++){const s=e.children[n];null==s?t.addMissing(e.level+1,(e.row<<1)+((2&n)>>1),(e.col<<1)+(1&n),o):this._collectMissingTilesRecurse(s,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};function y(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,o=1<<r.level-i.level;return Math.floor(r.row/o)===i.row&&Math.floor(r.col/o)===i.col}e([r({constructOnly:!0})],p.prototype,"featureStore",void 0),e([r()],p.prototype,"tileInfo",void 0),e([r()],p.prototype,"extent",void 0),e([r()],p.prototype,"maximumByteSize",void 0),p=e([o("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],p);class g{constructor(e,t,s){this.key=e,this.objectIds=t,this.attributeKeys=s}}class v extends f{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class C{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=a(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class S{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new C(t),null!=s&&(this._extent=h(s))}addMissing(e,t,s,i){const r=new f(e,t,s);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||c(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=a(r.extent))}}const w=.18751;export{p as FeatureServiceTileStore,C as ProcessResult};
|
package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{equals as i}from"../../../../../core/arrayUtils.js";import{createTask as s}from"../../../../../core/asyncUtils.js";import r from"../../../../../core/Logger.js";import{throwIfAbortError as o}from"../../../../../core/promiseUtils.js";import{when as n}from"../../../../../core/reactiveUtils.js";import{union as a,equals as l,isSubsetOf as u,difference as d}from"../../../../../core/SetUtils.js";import{normalizeGlobalID as c}from"../../../../../core/uuid.js";import{property as h,subclass as p}from"../../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as y}from"../../../../../core/support/UpdatingHandles.js";import f from"../../../../../geometry/Extent.js";import{toExtent as m}from"../../../../../geometry/support/aaBoundingRect.js";import{unquantizeOptimizedFeatureSet as _,convertFromFeatureSet as g}from"../../../../../layers/graphics/featureConversionUtils.js";import F from"../../../../../layers/graphics/OptimizedFeatureSet.js";import{isHostedAgolService as T}from"../../../../../layers/support/arcgisLayerUrl.js";import{OptimizedFeatureSetParserContext as b}from"../../../../../rest/query/operations/pbfOptimizedFeatureSet.js";import{executeQueryForExtent as P,executeQueryPBF as v,executeQuery as I}from"../../../../../rest/query/operations/query.js";import O from"../../../../../rest/support/Query.js";import{PendingFeatureTile as S}from"./PendingFeatureTile.js";let w=class extends t{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),i=a(e,this._mandatoryOutFields);l(i,t)||(this._set("outFields",i),u(i,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new y}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>i(e,t,({id:e},{id:t})=>e===t)}),this.addHandles(n(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const s of this._pendingTiles.values())s.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},i=s(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(i){o(i),r.getLogger(this).warn("Failed to apply edits",i)}});this.addHandles(i),await this._updatingHandles.addPromise(i.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!T(this.url))return;const e=s(async e=>{try{const t=await P(this.url,new O({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=f.fromJSON(t?.extent)}catch(t){o(t),r.getLogger(this).warn("Failed to fetch data extent",t)}});this._updatingHandles.addPromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const i=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<C}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const i=this.tileSize*t;return e*(q/(i*i))<M}_ensureFetchAllCounts(e){let t=!0;for(const i of this._pendingTiles.values())i.state.type<2&&this._updatingHandles.addPromise(i.process(e)),i.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new S(e,t);return this._pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:x,signal:t})}async _fetchFeatures(e,t,i){let s=0;const r=[];let o=0,n=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,s,n),{features:u,exceededTransferLimit:d}=await this._queryFeatures(a,i);l&&(s+=a.num),o+=u.length;for(const e of u)r.push(e);if(n=t-o,!l||!d||n<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let s=null;const r=e?c(e):e;if(this.store.featureStore.forEach(e=>{r===c(e.attributes[t])&&(s=e.objectId??e.attributes[i])}),null==s)throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery();return i.objectIds=e,this._queryFeatures(i,t)}async _queryFeatures(e,t){return 0===e.num?new F:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,s=await v(this.url,e,new b({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:x,signal:t});return _(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,s=await I(this.url,e,i,{query:this._configuration.customParameters,timeout:x,signal:t});return g(s,{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),i=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,s=a(d(this.outFields,i??new Set),this._mandatoryOutFields);return t.outFields=Array.from(s),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new O({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?m(e.key.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return null!=i&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:o,maxRecordCount:n,supportsResultType:a}=this.capabilities.query,l=s?O.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&o?o:n||j);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};e([h({constructOnly:!0})],w.prototype,"url",void 0),e([h({constructOnly:!0})],w.prototype,"objectIdField",void 0),e([h({constructOnly:!0})],w.prototype,"globalIdField",void 0),e([h({constructOnly:!0})],w.prototype,"capabilities",void 0),e([h({constructOnly:!0})],w.prototype,"sourceSpatialReference",void 0),e([h({constructOnly:!0})],w.prototype,"spatialReference",void 0),e([h({constructOnly:!0})],w.prototype,"store",void 0),e([h({readOnly:!0})],w.prototype,"_minimumVerticesPerFeature",null),e([h()],w.prototype,"_mandatoryOutFields",null),e([h()],w.prototype,"outFields",null),e([h()],w.prototype,"suspended",void 0),e([h()],w.prototype,"_historicMoment",void 0),e([h()],w.prototype,"filter",null),e([h()],w.prototype,"customParameters",null),e([h({readOnly:!0})],w.prototype,"_configuration",null),e([h()],w.prototype,"tileInfo",null),e([h()],w.prototype,"tileSize",null),e([h()],w.prototype,"tilesOfInterest",void 0),e([h({readOnly:!0})],w.prototype,"updating",null),e([h({readOnly:!0})],w.prototype,"availability",void 0),e([h()],w.prototype,"hasZ",null),w=e([p("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],w);const j=2e3,x=6e5,C=1e6,q=25,M=1;export{w as FeatureServiceTiledFetcher};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{equals as i}from"../../../../../core/arrayUtils.js";import{createTask as s}from"../../../../../core/asyncUtils.js";import r from"../../../../../core/Logger.js";import{throwIfAbortError as o}from"../../../../../core/promiseUtils.js";import{when as n}from"../../../../../core/reactiveUtils.js";import{union as a,equals as l,isSubsetOf as u,difference as d}from"../../../../../core/SetUtils.js";import{normalizeGlobalID as c}from"../../../../../core/uuid.js";import{property as h,subclass as p}from"../../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as y}from"../../../../../core/support/UpdatingHandles.js";import f from"../../../../../geometry/Extent.js";import{toExtent as m}from"../../../../../geometry/support/aaBoundingRect.js";import{unquantizeOptimizedFeatureSet as _}from"../../../../../layers/graphics/featureConversionUtils.js";import{FlatFeatureSet as g,convertOptimizedFeatureSetToFlat as F,convertFeatureSetToFlat as T}from"../../../../../layers/graphics/FlatFeatureSet.js";import{isHostedAgolService as b}from"../../../../../layers/support/arcgisLayerUrl.js";import{OptimizedFeatureSetParserContext as P}from"../../../../../rest/query/operations/pbfOptimizedFeatureSet.js";import{executeQueryForExtent as v,executeQueryPBF as I,executeQuery as O}from"../../../../../rest/query/operations/query.js";import S from"../../../../../rest/support/Query.js";import{PendingFeatureTile as w}from"./PendingFeatureTile.js";let j=class extends t{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),i=a(e,this._mandatoryOutFields);l(i,t)||(this._set("outFields",i),u(i,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new y}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>i(e,t,({id:e},{id:t})=>e===t)}),this.addHandles(n(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const s of this._pendingTiles.values())s.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},i=s(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(i){o(i),r.getLogger(this).warn("Failed to apply edits",i)}});this.addHandles(i),await this._updatingHandles.addPromise(i.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!b(this.url))return;const e=s(async e=>{try{const t=await v(this.url,new S({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=f.fromJSON(t?.extent)}catch(t){o(t),r.getLogger(this).warn("Failed to fetch data extent",t)}});this._updatingHandles.addPromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const i=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<q}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const i=this.tileSize*t;return e*(M/(i*i))<A}_ensureFetchAllCounts(e){let t=!0;for(const i of this._pendingTiles.values())i.state.type<2&&this._updatingHandles.addPromise(i.process(e)),i.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new w(e,t);return this._pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:C,signal:t})}async _fetchFeatures(e,t,i){let s=0;const r=[];let o=0,n=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,s,n),{features:u,exceededTransferLimit:d}=await this._queryFeatures(a,i);l&&(s+=a.num),o+=u.length;for(const e of u)r.push(e);if(n=t-o,!l||!d||n<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let s=null;const r=e?c(e):e;if(this.store.featureStore.forEach(e=>{r===c(e.attributes[t])&&(s=e.objectId??e.attributes[i])}),null==s)throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery();return i.objectIds=e,this._queryFeatures(i,t)}async _queryFeatures(e,t){return 0===e.num?new g:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,s=await I(this.url,e,new P({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:C,signal:t});return F(_(s))}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,s=await O(this.url,e,i,{query:this._configuration.customParameters,timeout:C,signal:t});return T(s,{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),i=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,s=a(d(this.outFields,i??new Set),this._mandatoryOutFields);return t.outFields=Array.from(s),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new S({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?m(e.key.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return null!=i&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:o,maxRecordCount:n,supportsResultType:a}=this.capabilities.query,l=s?S.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&o?o:n||x);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};e([h({constructOnly:!0})],j.prototype,"url",void 0),e([h({constructOnly:!0})],j.prototype,"objectIdField",void 0),e([h({constructOnly:!0})],j.prototype,"globalIdField",void 0),e([h({constructOnly:!0})],j.prototype,"capabilities",void 0),e([h({constructOnly:!0})],j.prototype,"sourceSpatialReference",void 0),e([h({constructOnly:!0})],j.prototype,"spatialReference",void 0),e([h({constructOnly:!0})],j.prototype,"store",void 0),e([h({readOnly:!0})],j.prototype,"_minimumVerticesPerFeature",null),e([h()],j.prototype,"_mandatoryOutFields",null),e([h()],j.prototype,"outFields",null),e([h()],j.prototype,"suspended",void 0),e([h()],j.prototype,"_historicMoment",void 0),e([h()],j.prototype,"filter",null),e([h()],j.prototype,"customParameters",null),e([h({readOnly:!0})],j.prototype,"_configuration",null),e([h()],j.prototype,"tileInfo",null),e([h()],j.prototype,"tileSize",null),e([h()],j.prototype,"tilesOfInterest",void 0),e([h({readOnly:!0})],j.prototype,"updating",null),e([h({readOnly:!0})],j.prototype,"availability",void 0),e([h()],j.prototype,"hasZ",null),j=e([p("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],j);const x=2e3,C=6e5,q=1e6,M=25,A=1;export{j as FeatureServiceTiledFetcher};
|
|
@@ -18,7 +18,7 @@ export interface BuildingSceneLayerViewProperties extends LayerViewProperties {}
|
|
|
18
18
|
* The BuildingSceneLayerView contains a list of [sublayer views](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-BuildingComponentSublayerView.html)
|
|
19
19
|
* for all the [component sublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html) of a
|
|
20
20
|
* [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html). The BuildingSceneLayerView doesn't have query methods. To query the features
|
|
21
|
-
* loaded on the client, use the
|
|
21
|
+
* loaded on the client, use the [query methods](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-BuildingComponentSublayerView.html#methods-summary)
|
|
22
22
|
* on the component [sublayer views](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-BuildingComponentSublayerView.html):
|
|
23
23
|
*
|
|
24
24
|
* ```js
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__addDisposableResource as e,__disposeResources as r}from"tslib";import{isSupportedLayer as t}from"../../../arcade/featureset/support/shared.js";import a from"../../../core/Logger.js";import{sqlAnd as i}from"../../../core/sql.js";import{isImageryGraphicOrigin as n}from"../../../graphic/isImageryGraphicOrigin.js";import{isImageryTileGraphicOrigin as o}from"../../../graphic/isImageryTileGraphicOrigin.js";import s from"../../../layers/FeatureLayer.js";import{internalTimeReceivedField as c}from"../../../layers/support/streamLayerUtils.js";import{isDate as u}from"../../../support/guards.js";import{applyTextFormattingHTML as l,htmlEntities as p}from"./featureUtils.js";const d="esri.widgets.Feature.support.arcadeFeatureUtils",f=()=>a.getLogger(d);function y(e){return l(p(e))}function m(e){return"createQuery"in e&&"queryFeatures"in e}async function g({graphic:e,view:r,options:t}){const{isAggregate:a}=e,i=e.layer??e.sourceLayer;if(!a||!i||"2d"!==r?.type)return[];const n=await r.whenLayerView(i);if(!m(n))return[];const o=n.createQuery(),s=e.getObjectId();o.aggregateIds=null!=s?[s]:[];const{features:c}=await n.queryFeatures(o,t);return c}function w({layer:e,aggregatedFeatures:r,interceptor:t}){const{fields:a,objectIdField:i,geometryType:n,spatialReference:o}=e,c="displayField"in e?e.displayField:void 0;return new s({fields:a,objectIdField:i,geometryType:n,spatialReference:o,displayField:c,interceptor:t,..."feature"===e.type?{templates:e.templates,typeIdField:e.typeIdField,types:e.types}:null,source:r})}function v(e){return e.isAggregate?"popup-feature-reduction":"esri.views.3d.layers.VoxelGraphic"===e.declaredClass?"popup-voxel":n(e.origin)||o(e.origin)?"popup-imagery":"popup"}function h(e){return{scale:e?.scale,timeProperties:{currentStart:e?.timeExtent?.start,currentEnd:e?.timeExtent?.end,startIncluded:!0,endIncluded:!0}}}function x(e){return{$voxel:e}}function b(e,r,t){let a=null;
|
|
5
|
+
import{__addDisposableResource as e,__disposeResources as r}from"tslib";import{isSupportedLayer as t}from"../../../arcade/featureset/support/shared.js";import a from"../../../core/Logger.js";import{sqlAnd as i}from"../../../core/sql.js";import{isImageryGraphicOrigin as n}from"../../../graphic/isImageryGraphicOrigin.js";import{isImageryTileGraphicOrigin as o}from"../../../graphic/isImageryTileGraphicOrigin.js";import s from"../../../layers/FeatureLayer.js";import{internalTimeReceivedField as c}from"../../../layers/support/streamLayerUtils.js";import{isDate as u}from"../../../support/guards.js";import{applyTextFormattingHTML as l,htmlEntities as p}from"./featureUtils.js";const d="esri.widgets.Feature.support.arcadeFeatureUtils",f=()=>a.getLogger(d);function y(e){return l(p(e))}function m(e){return"createQuery"in e&&"queryFeatures"in e}async function g({graphic:e,view:r,options:t}){const{isAggregate:a}=e,i=e.layer??e.sourceLayer;if(!a||!i||"2d"!==r?.type)return[];const n=await r.whenLayerView(i);if(!m(n))return[];const o=n.createQuery(),s=e.getObjectId();o.aggregateIds=null!=s?[s]:[];const{features:c}=await n.queryFeatures(o,t);return c}function w({layer:e,aggregatedFeatures:r,interceptor:t}){const{fields:a,objectIdField:i,geometryType:n,spatialReference:o}=e,c="displayField"in e?e.displayField:void 0;return new s({fields:a,objectIdField:i,geometryType:n,spatialReference:o,displayField:c,interceptor:t,..."feature"===e.type?{templates:e.templates,typeIdField:e.typeIdField,types:e.types}:null,source:r})}function v(e){return e.isAggregate?"popup-feature-reduction":"esri.views.3d.layers.VoxelGraphic"===e.declaredClass?"popup-voxel":n(e.origin)||o(e.origin)?"popup-imagery":"popup"}function h(e){return{scale:e?.scale,timeProperties:{currentStart:e?.timeExtent?.start,currentEnd:e?.timeExtent?.end,startIncluded:!0,endIncluded:!0}}}function x(e){return{$voxel:e}}function b(e,r,t){let a=null;const i=e.origin.layer;if("imagery"===i.type&&"mosaic-dataset"===i.sourceType){a=e.cloneShallow();const r=e.origin.layer.fieldsIndex;a.attributes=Object.fromEntries(Object.entries(a.attributes??{}).filter(([e])=>r.has(e)))}return{$pixel:e,$imageCollectionItem:a,$userInput:r,$view:h(t)}}async function F(e,r,t,a,i,n,o){let s=null;if(n.has("$aggregatedfeatures")){const e=await g({graphic:r,view:t,options:a}),n=r.sourceLayer||r.layer;s=w({layer:n,aggregatedFeatures:e,interceptor:i})}return{vars:{$feature:r,$aggregatedFeatures:s,$view:h(t)},track:o?await $(e,r,t):null,[Symbol.dispose]:()=>s?.[Symbol.dispose]()}}function I(e){if(u(e))return e.getTime();if("number"==typeof e)return e;if("string"==typeof e)return new Date(e).getTime();throw new Error(`Unexpected time value: ${e}`)}async function $(e,r,t){const a=r.sourceLayer||r.layer;if(null==a||!("timeInfo"in a))return null;const n=a.timeInfo?.trackIdField;if(null==n)return null;const o=r.getAttribute(n);if(null==o)return null;let s,u;if("string"==typeof o)s=`"${n.replaceAll('"','""')}" = '${o.replaceAll("'","''")}'`;else{if("number"!=typeof o)return f().warn("Expected track id to be a string or number"),null;s=`"${n.replaceAll('"','""')}" = ${o}`}if("stream"===a.type&&null!=t){const e=await t.whenLayerView(a),r=e.createQuery();r.returnGeometry=!0,r.where=i(r.where,s),u=(await e.queryFeatures(r)).features}else{if(!("queryFeatures"in a))return null;{const e=a.createQuery();e.returnGeometry=!0,e.where=i(e.where,s),u=(await a.queryFeatures(e)).features}}const l=a.fieldsIndex.normalizeFieldName(a.timeInfo.startField)??c,p=a.timeInfo.endField?a.fieldsIndex.normalizeFieldName(a.timeInfo.endField):null,d=u.map(r=>{const a=r.getObjectId();if(null==a)throw new Error("Cannot identify observation");const i=e.ArcadeFeature.createFromGraphic(r,t?.timeZone),n=I(r.getAttribute(l));return{id:a,feature:i,startTime:n,endTime:null!=p?I(r.getAttribute(p)):n,stats:{totalDistance:void 0,distance:void 0,speed:void 0,acceleration:void 0}}}).sort((e,r)=>e.startTime-r.startTime),y="esri.TrackGraphic"===r.declaredClass?d.length-1:d.findIndex(e=>r.getObjectId()===e.id);if(y<0)throw new Error("Couldn't locate feature in observations");return{observations:d,currentObservationIndex:y}}async function j(e,r,a,i,n,o){const s=(r.sourceLayer||r.layer)??void 0;return{vars:{$feature:r,$layer:null!=s&&t(s)?s:"scene"===s?.type&&null!=s.associatedLayer?s.associatedLayer:void 0,$map:a,$datastore:s&&"url"in s?s.url:void 0,$userInput:i,$graph:"knowledge-graph-sublayer"===s?.type?s.parentCompositeLayer?.knowledgeGraph:void 0,$view:h(n)},track:o?await $(e,r,n):null}}async function T(e,{arcade:r,graphic:t,map:a,location:i,view:n,options:o,interceptor:s,arcadeExecutor:c,usesTrack:u}){switch(e){case"popup":return{...await j(r,t,a,i,n,u),[Symbol.dispose](){}};case"popup-feature-reduction":{const e=new Set(c.variablesUsed);return await F(r,t,n,o,s,e,u)}case"popup-voxel":return{vars:x(t),track:null,[Symbol.dispose](){}};case"popup-imagery":return{vars:b(t,i,n),track:null,[Symbol.dispose](){}};default:throw new Error(`Unexpected profile name ${e}`)}}async function k(){const[e,r,{Feature:t}]=await Promise.all([import("../../../arcade.js"),import("../../../arcade/arcade.js"),import("../../../arcade/Feature.js")]);return{executor:e,syntaxUtils:r,ArcadeFeature:t}}async function E(t,a,i){const{executor:{createArcadeProfile:n,createArcadeExecutor:o},syntaxUtils:s}=i,c=v(a),u=n(c);let l;try{l=await o(t,u)}catch(y){return f().error("arcade-executor-error",{error:y,expression:t}),null}const p=new Set;l.variablesUsed.includes("$view")&&(s.scriptUsesViewProperties(l.syntaxTree,["scale"])&&p.add("view-scale"),s.scriptUsesViewProperties(l.syntaxTree,["timeProperties"])&&p.add("view-time-extent"));const d=s.scriptUsesTrack(l.syntaxTree);return{dependencies:p,async evaluate({graphic:a,interceptor:n,location:o,map:s,options:u,spatialReference:p,view:m}){const g={stack:[],error:void 0,hasError:!1};try{const r=e(g,await T(c,{arcade:i,graphic:a,map:s,location:o,view:m,options:u,interceptor:n,arcadeExecutor:l,usesTrack:d}),!1),w={abortSignal:u?.signal??void 0,interceptor:n??void 0,rawOutput:!0,spatialReference:p??void 0,timeZone:m?.timeZone,track:r.track,console(...e){f().info(...e)}};try{return await l.executeAsync(r.vars,w)}catch(y){if(u?.signal?.aborted)return;return void f().error("arcade-execution-error",{error:y,graphic:a,expression:t})}}catch(w){g.error=w,g.hasError=!0}finally{r(g)}}}}async function A({expression:e,graphic:r}){return e?E(e,r,await k()):null}async function L(e,r){if(!e?.length)return{dependencies:new Set,expressions:new Map};const t=await k(),a=new Set,i=new Map;for(const n of e){const e=await E(n.expression,r,t);i.set(`expression/${n.name}`,e),e?.dependencies.forEach(e=>a.add(e))}return{dependencies:a,expressions:i}}export{A as compileExpression,L as compileExpressionInfos,y as formatArcadeValue,b as prepareImageryPopupArgs};
|
|
@@ -46,8 +46,8 @@ export interface FeatureFormViewModelEvents {
|
|
|
46
46
|
* Call [FeatureLayer#applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) method
|
|
47
47
|
* to update a feature's attributes.
|
|
48
48
|
*
|
|
49
|
-
* @see [submit()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#submit)
|
|
50
|
-
* @see [getValues()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#getValues)
|
|
49
|
+
* @see [FeatureForm#submit()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#submit)
|
|
50
|
+
* @see [FeatureForm#getValues()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#getValues)
|
|
51
51
|
* @example
|
|
52
52
|
* // Listen to the feature form's submit event.
|
|
53
53
|
* featureForm.on("submit", function(){
|
|
@@ -111,7 +111,7 @@ export interface FeaturesViewModelEvents {
|
|
|
111
111
|
*
|
|
112
112
|
* @see [Popup#actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actions)
|
|
113
113
|
* @see [PopupTemplate#actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#actions)
|
|
114
|
-
* @see [open()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#open)
|
|
114
|
+
* @see [Features#open()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#open)
|
|
115
115
|
* @example
|
|
116
116
|
* featuresWidget.open({
|
|
117
117
|
* location: event.mapPoint,
|
|
@@ -32,7 +32,7 @@ export interface HomeViewModelEvents {
|
|
|
32
32
|
/**
|
|
33
33
|
* Fires when the [Home#go()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#go) method is called.
|
|
34
34
|
*
|
|
35
|
-
* @see [go()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#go)
|
|
35
|
+
* @see [Home#go()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#go)
|
|
36
36
|
* @example
|
|
37
37
|
* homeWidget.on("go", function(event){
|
|
38
38
|
* console.log("updating viewpoint");
|
|
@@ -9,7 +9,7 @@ export interface LocateViewModelEvents {
|
|
|
9
9
|
/**
|
|
10
10
|
* Fires after the `locate()` method is called and succeeds.
|
|
11
11
|
*
|
|
12
|
-
* @see [
|
|
12
|
+
* @see [locate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate-LocateViewModel.html#locate)
|
|
13
13
|
* @example
|
|
14
14
|
* locateBtn.on("locate", ({ position }) => {
|
|
15
15
|
* const { longitude, latitude } = position.coords;
|
|
@@ -20,7 +20,7 @@ export interface LocateViewModelEvents {
|
|
|
20
20
|
/**
|
|
21
21
|
* Fires after the [Locate#locate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#locate) method is called and fails.
|
|
22
22
|
*
|
|
23
|
-
* @see [
|
|
23
|
+
* @see [locate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate-LocateViewModel.html#locate)
|
|
24
24
|
*/
|
|
25
25
|
"locate-error": LocateViewModelLocateErrorEvent;
|
|
26
26
|
}
|
|
@@ -2,10 +2,11 @@ import type SliceAnalysis from "../../analysis/SliceAnalysis.js";
|
|
|
2
2
|
import type SlicePlane from "../../analysis/SlicePlane.js";
|
|
3
3
|
import type Collection from "../../core/Collection.js";
|
|
4
4
|
import type SceneView from "../../views/SceneView.js";
|
|
5
|
-
import type { SliceableLayer, SliceAnalysisProperties } from "../../analysis/SliceAnalysis.js";
|
|
6
5
|
import type { SlicePlaneProperties } from "../../analysis/SlicePlane.js";
|
|
6
|
+
import type { SliceableLayer } from "../../analysis/Slice/types.js";
|
|
7
7
|
import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
|
|
8
8
|
import type { AnalysisViewModel } from "../support/AnalysisViewModel.js";
|
|
9
|
+
import type { SliceAnalysisProperties } from "../../analysis/SliceAnalysis.js";
|
|
9
10
|
|
|
10
11
|
/** @deprecated since 4.33. Use the [SliceAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-SliceAnalysis.html) or [Slice component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-slice/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
11
12
|
export interface SliceViewModelProperties extends Partial<Pick<SliceViewModel, "excludeGroundSurface" | "tiltEnabled" | "view">> {
|
|
@@ -134,7 +134,7 @@ export interface TimeSliderViewModelEvents {
|
|
|
134
134
|
* Fires when a user clicks on an action in the actions menu.
|
|
135
135
|
*
|
|
136
136
|
* @since 4.21
|
|
137
|
-
* @see [actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-TimeSlider.html#actions)
|
|
137
|
+
* @see [TimeSlider#actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-TimeSlider.html#actions)
|
|
138
138
|
* @example
|
|
139
139
|
* // Add an action to reset the time extent to the full time extent.
|
|
140
140
|
* timeSlider.actions.add({
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{onLocaleChange as
|
|
5
|
+
import{__decorate as t}from"tslib";import{onLocaleChange as e,fetchMessageBundle as i}from"../../intl.js";import r from"../../core/Accessor.js";import o from"../../core/Collection.js";import{deprecatedModule as s}from"../../core/deprecate.js";import a from"../../core/Error.js";import l from"../../core/Logger.js";import{watch as n,on as d,initial as y}from"../../core/reactiveUtils.js";import{property as p,subclass as c}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as h}from"../../core/support/UpdatingHandles.js";import{isFeatureLayer as u,getOwningPortalUrl as w}from"../../layers/support/layerUtils.js";import g from"../../portal/Portal.js";import{hasUserTypeExtension as v}from"../../portal/support/utils.js";const _={noDirtyAreasInExtent:-2147208940,cannotAcquireVersionLock_v10:-2147217146,cannotAcquireVersionLock_v11:-2147220947,operationOnlyAllowedByOwner:-2147217144};s(l.getLogger("esri.widgets.UtilityNetworkValidateTopology.UtilityNetworkValidateTopologyViewModel"),"UtilityNetworkValidateTopologyViewModel",{replacement:"UtilityNetwork.validateTopology",version:"5.0",see:"https://esriurl.com/UtilityNetworkClass#validateTopology",warnOnce:!0});let m=class extends r{constructor(t){super(t),this._activeOperationDidSucceed=!1,this._initialValidationsFinished=!1,this._dirtyAreasLayer=null,this._serverVersion=null,this._updatingHandles=new h,this._validConstructProperties=!1,this.executionError="",this.extentToValidate="current",this.loadErrors=new o}initialize(){const t=async()=>{this.messages||(this.messages=await i("esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology"))};t().then(()=>{this.view||(this.view=null),this.utilityNetwork||(this.utilityNetwork=null),this.addHandles([n(()=>[this.view,this.utilityNetwork],async()=>{const{loadErrors:t,messages:{info:{noUtilityNetwork:e,noView:i}}}=this;this._initialValidationsFinished=!1,t.removeAll(),this._validConstructProperties=!0,this._dirtyAreasLayer=null,this._serverVersion=null,"utility"!==this.utilityNetwork?.type&&(this.loadErrors.push(e),l.getLogger(this).error(new a("utilityNetworkValidateTopology:missing-property",e)),this._validConstructProperties=!1),"2d"!==this.view?.type&&(this.loadErrors.push(i),l.getLogger(this).error(new a("utilityNetworkValidateTopology:missing-property",i)),this._validConstructProperties=!1),this._validConstructProperties&&(this.utilityNetwork.loaded||await this.utilityNetwork.load().catch(t=>{l.getLogger(this).error(t),this._validConstructProperties=!1}),await this._setDirtyAreasLayer()),this._validConstructProperties&&await this._validateNetworkExtension()},y),d(()=>this.view?.map?.layers,"change",async()=>{const{loadErrors:t,messages:{info:{noUtilityNetwork:e}}}=this,i=t.find(t=>t===e);this._initialValidationsFinished=!1,i||(t.removeAll(),await this._validateNetworkExtension(),await this._setDirtyAreasLayer()),this._initialValidationsFinished=!0}),e(t)])})}destroy(){this._updatingHandles.destroy()}get state(){return this.loadErrors.length||!this._validConstructProperties?"disabled":this.executionError?"failed":this._updatingHandles.updating?"executing":this._activeOperationDidSucceed?"success":this._initialValidationsFinished?"ready":"loading"}set utilityNetwork(t){this._get("utilityNetwork")!==t&&this._set("utilityNetwork",t)}set view(t){this._get("view")!==t&&this._set("view",t)}async validateTopology(){const{messages:{info:{cannotAcquireVersionLock:t,noDirtyAreasInExtent:e,operationOnlyAllowedByOwner:i}},utilityNetwork:r,view:o}=this;if(!this.loadErrors.length){this._activeOperationDidSucceed=!1,this._set("executionError","");const s={gdbVersion:r?.gdbVersion,outSpatialReference:o.spatialReference?.clone()||null,validateArea:"current"===this.extentToValidate?o.extent.clone():r.fullExtent.clone()};this._updatingHandles.addPromise(r?.validateTopology(s).then(()=>{this._activeOperationDidSucceed=!0},r=>{let o="Error: "+r;if(r instanceof a&&r.details?.raw)switch(r.details.raw.extendedCode){case _.noDirtyAreasInExtent:o=e;break;case _.cannotAcquireVersionLock_v10:case _.cannotAcquireVersionLock_v11:o=t;break;case _.operationOnlyAllowedByOwner:o=i;break;default:o=r.details.message??r.details.raw.message}this._set("executionError",o)}))}}async _setDirtyAreasLayer(){const{messages:{info:{noDirtyAreasLayer:t}}}=this,e=this.view?.map.allLayers.items.filter(t=>u(t)).find(t=>t.parsedUrl?.path===this.utilityNetwork?.networkSystemLayers.dirtyAreasLayerUrl);e?(this._dirtyAreasLayer=e,await this._dirtyAreasLayer.load(),this._serverVersion=this._dirtyAreasLayer.version??0,this._validConstructProperties=!0):(this.loadErrors.includes(t)||(this.loadErrors.push(t),l.getLogger(this).error(new a("utilityNetworkValidateTopology:missing-layer",t))),this._validConstructProperties=!1)}async _validateNetworkExtension(){const{messages:{info:{noAdvancedEditingUserTypeExtension:t,noUtilityNetworkServiceUserTypeExtension:e}}}=this,i=await w(this.utilityNetwork.layerUrl),r=new g({url:i});await r.load();const o=r.user?.username??"",s=Number(this._serverVersion)<=11.1?"utilityNetwork":"advediting";if(!await v(r,o,s)){const i=Number(this._serverVersion)<=11.1?e:t;this.loadErrors.push(i),l.getLogger(this).error(new a("utilityNetworkValidateTopology:no-user-type-extension",i)),this._validConstructProperties=!1}this._initialValidationsFinished=!0}};t([p()],m.prototype,"_initialValidationsFinished",void 0),t([p()],m.prototype,"_dirtyAreasLayer",void 0),t([p()],m.prototype,"_validConstructProperties",void 0),t([p({readOnly:!0})],m.prototype,"executionError",void 0),t([p()],m.prototype,"extentToValidate",void 0),t([p({type:o})],m.prototype,"loadErrors",void 0),t([p()],m.prototype,"messages",void 0),t([p({readOnly:!0})],m.prototype,"state",null),t([p()],m.prototype,"utilityNetwork",null),t([p()],m.prototype,"view",null),m=t([c("esri.widgets.UtilityNetworkValidateTopology.UtilityNetworkValidateTopologyViewModel")],m);const k=m;export{k as default};
|
package/widgets/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type Polyline from "../geometry/Polyline.js";
|
|
|
5
5
|
import type Layer from "../layers/Layer.js";
|
|
6
6
|
import type Sublayer from "../layers/support/Sublayer.js";
|
|
7
7
|
import type LayerView from "../views/layers/LayerView.js";
|
|
8
|
-
import type { RelationshipFocus } from "../renderers/support/
|
|
8
|
+
import type { RelationshipFocus } from "../renderers/support/types.js";
|
|
9
9
|
import type { SymbolUnion } from "../symbols/support/typeUtils.js";
|
|
10
10
|
type LegendMessages = Record<string, unknown>;
|
|
11
11
|
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* A reference to a feature in a layer. The interface of a feature reference is compatible with a
|
|
4
|
-
* [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html), but contains only the minimal set of information required
|
|
5
|
-
* to reference a feature.
|
|
6
|
-
*/
|
|
7
|
-
export interface FeatureReference {
|
|
8
|
-
/** Feature attributes. */
|
|
9
|
-
attributes: any;
|
|
10
|
-
/** Reference to a layer. */
|
|
11
|
-
layer?: FeatureReferenceLayer | null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface FeatureReferenceLayer {
|
|
15
|
-
/** The layer id. */
|
|
16
|
-
id: string | number;
|
|
17
|
-
/** The object id field. */
|
|
18
|
-
objectIdField?: string | null;
|
|
19
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
-
*/
|
|
5
|
-
import{__decorate as r}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{property as o,subclass as t}from"../../core/accessorSupport/decorators.js";let i=class extends e{constructor(r){super(r),this.layerId=""}static fromLayer(r){return new this({layerId:"building-component"===r.type?r.layer.id:r.id,sublayerId:"building-component"===r.type?r.id:void 0})}};r([o({type:String,json:{write:{isRequired:!0}}})],i.prototype,"layerId",void 0),r([o({type:Number,json:{write:!0}})],i.prototype,"sublayerId",void 0),i=r([t("esri.analysis.support.SliceAnalysisExcludedLayer")],i);export{i as SliceAnalysisExcludedLayer};
|