@arcgis/core 5.2.0-next.126 → 5.2.0-next.128
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/WebScene.js +1 -1
- package/applications/Components/basemapToggleUtils.d.ts +53 -0
- package/applications/Components/basemapToggleUtils.js +2 -0
- package/applications/SceneViewer/sceneViewerUtils.d.ts +14 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/applications/WebEditor/sketchUtils.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{e35eb93c0fb1f6de8db0.js → 00d9e41deecf5828975c.js} +1 -1
- package/assets/esri/core/workers/chunks/038d2b80d96237c25b6f.js +1 -0
- package/assets/esri/core/workers/chunks/{ab8a1140bf31f46f8ebf.js → 1262918b2161d79851c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3ef23923424ad8c5048.js → 1c2723f9630e7d597843.js} +1 -1
- package/assets/esri/core/workers/chunks/{9ca98fffd43e63d5ade3.js → 1c33aa349beea9a3792f.js} +1 -1
- package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js → 2226c20c38e20713bcb5.js} +2 -2
- package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js.LICENSE.txt → 2226c20c38e20713bcb5.js.LICENSE.txt} +2 -2
- package/assets/esri/core/workers/chunks/{4d18451e0ea6ca54101a.js → 2ebad7e588b26e74cefe.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8258636096416c837a2.js → 3b7dff15a0058ea29886.js} +1 -1
- package/assets/esri/core/workers/chunks/{4716693eca44e8f89f5c.js → 3bf56c33876ba56c4b21.js} +1 -1
- package/assets/esri/core/workers/chunks/3c6ee445e49da0076ac1.js +1 -0
- package/assets/esri/core/workers/chunks/3f045f09ac95e7f22a97.js +1 -0
- package/assets/esri/core/workers/chunks/500f6d6f0ffa235cae85.js +1 -0
- package/assets/esri/core/workers/chunks/{56acda1eed3a013430e2.js → 58fb92775d668cfd295c.js} +1 -1
- package/assets/esri/core/workers/chunks/{e6637f9176566382ed3e.js → 606cca69eaea84bfcdc6.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdbda3d2afea25142b86.js → 6267a1fe1603daa399b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 668ec0bdfb2095e90c9e.js} +1 -1
- package/assets/esri/core/workers/chunks/{806f96ad09e882be41af.js → 67fd2cdb2e6834bfa710.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fe5ef5ccf480634d159.js → 75294f515c7f8393181c.js} +1 -1
- package/assets/esri/core/workers/chunks/75879ae88fd87b089a87.js +1 -0
- package/assets/esri/core/workers/chunks/761ea719ec1b4d562db2.js +1 -0
- package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 86d7a3ae672a51b75fcc.js} +1 -1
- package/assets/esri/core/workers/chunks/{30604a29df320d7a4c6b.js → 88e11b645a1361f1bdbe.js} +1 -1
- package/assets/esri/core/workers/chunks/89dad6c1bfd81e4d7f8e.js +1 -0
- package/assets/esri/core/workers/chunks/{8daed13400d9e63e65ae.js → 8a842cde240aef12e417.js} +1 -1
- package/assets/esri/core/workers/chunks/{c692e583e87af58f6d91.js → 8b0d6205ceeec1ab446f.js} +1 -1
- package/assets/esri/core/workers/chunks/{57ab87e70ef85b9405f9.js → 8cb216404a6254bc695c.js} +1 -0
- package/assets/esri/core/workers/chunks/92509dd25996c6390a31.js +1 -0
- package/assets/esri/core/workers/chunks/9ccc2c8f7416943cc373.js +29 -0
- package/assets/esri/core/workers/chunks/a0a9c41400ae98df1912.js +1 -0
- package/assets/esri/core/workers/chunks/{b96358d475dc98034aa4.js → a15ed056e7493ddf3b4c.js} +1 -1
- package/assets/esri/core/workers/chunks/{25e212fe9a2ea37c9e81.js → a3a33ffa34f4d645ddfe.js} +1 -1
- package/assets/esri/core/workers/chunks/af0704494398f33aa315.js +1 -0
- package/assets/esri/core/workers/chunks/{ce1ccf9ec90b786591e5.js → b396c4b4bb144200acc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{97602019a1ccad22a03a.js → bbfb80a6983574007ce5.js} +1 -1
- package/assets/esri/core/workers/chunks/{d5f72670634e73c0b53a.js → bcf2e5cf6b9c6d0442bb.js} +1 -1
- package/assets/esri/core/workers/chunks/{17218d714cb07b607c2f.js → c35e9dee87937f483a3d.js} +1 -1
- package/assets/esri/core/workers/chunks/{85739ed6af0f0a3cb302.js → c94bdfed831c775e04c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e3fd81653dc0d86456c.js → cfeba0ffb7fdc2a9af05.js} +1 -1
- package/assets/esri/core/workers/chunks/d1187ad6cc4959683819.js +1 -0
- package/assets/esri/core/workers/chunks/d94a2b3b2ef49af9c2e3.js +1 -0
- package/assets/esri/core/workers/chunks/{cb7cb7d57c4e7f76600f.js → dc92710a8fdfb9135e55.js} +1 -1
- package/assets/esri/core/workers/chunks/ec187933b42fe65594b7.js +1 -0
- package/assets/esri/core/workers/chunks/eec5a93dbc258a90b6de.js +1 -0
- package/assets/esri/core/workers/chunks/{e1ae83ff3e0225708d4d.js → f479b4a4cee4bb2e046c.js} +1 -1
- package/assets/esri/core/workers/chunks/{78abd6c42f39e6f6ffbb.js → f983296b6f4a62a911eb.js} +1 -1
- package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
- package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
- package/assets/esri/images/portal/propresentation16.png +0 -0
- package/assets/esri/images/portal/urbanproject16.png +0 -0
- package/assets/esri/images/support/loading-throb.gif +0 -0
- package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
- package/assets/esri/themes/base/icons/style.scss +0 -0
- package/assets/esri/themes/base/icons/variables.scss +0 -0
- package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
- package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
- package/assets/esri/themes/base/images/files/code-32.svg +0 -0
- package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
- package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
- package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
- package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
- package/assets/esri/themes/base/images/files/image-32.svg +0 -0
- package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
- package/assets/esri/themes/base/images/files/report-32.svg +0 -0
- package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
- package/assets/esri/themes/base/images/files/text-32.svg +0 -0
- package/assets/esri/themes/base/images/files/video-32.svg +0 -0
- package/assets/esri/themes/base/images/files/word-32.svg +0 -0
- package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
- package/assets/esri/themes/base/images/loading-throb.gif +0 -0
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -0
- package/assets/esri/themes/base/widgets/_Tooltip.scss +42 -3
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
- package/chunks/GlobalIllumination.glsl.js +1 -0
- package/config.js +1 -1
- package/core/Accessor.d.ts +1 -1
- package/core/lang.js +1 -1
- package/core/units.js +1 -1
- package/geometry/HeightModelInfo.js +1 -1
- package/geometry/ellipsoidUtils.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/interfaces.d.ts +1 -0
- package/kernel.js +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/ParquetLayer.d.ts +21 -13
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/transferFeatures.js +2 -0
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/mixins/HeightModelInfoMixin.js +2 -0
- package/layers/mixins/SceneService.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/raster/datasets/RasterFactory.js +1 -1
- package/package.json +3 -3
- package/popup/FeatureContentCollection.d.ts +15 -25
- package/popup/FeatureContentCollection.js +1 -1
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/callouts/calloutAnalysisUtils.js +2 -0
- package/symbols/cim/callouts/effects/BackgroundCallout.js +1 -1
- package/symbols/cim/callouts/effects/BalloonCallout.js +1 -1
- package/symbols/cim/callouts/effects/PointSymbolCallout.js +1 -1
- package/symbols/cim/callouts/effects/SimpleLineCallout.js +1 -1
- package/symbols/cim/callouts/effects/calloutUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/engine/webgl/ClipMesh.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/CalloutMeshWriterCoordinator.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterReferences.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
- package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +5 -3
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +1 -1
- package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/interactive/editingTools/manipulatedObjectUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/layers/support/FeatureMemory.js +2 -0
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
- package/views/3d/state/Constraints.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/support/PBFDecoder.js +1 -1
- package/views/3d/support/PBFDecoderWorker.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
- package/views/DOMContainer.d.ts +2 -2
- package/views/DOMContainer.js +1 -1
- package/views/PopupView.d.ts +1 -1
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/interactive/options/TooltipVisibleElements.d.ts +11 -1
- package/views/interactive/options/TooltipVisibleElements.js +1 -1
- package/views/interactive/tooltip/components/ElevationModeSelect.js +2 -0
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
- package/views/support/hitTestSelectUtils.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.d.ts +1 -0
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +9 -1
- package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -0
- package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/legacy/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/Popup/types.d.ts +0 -7
- package/widgets/Popup.d.ts +7 -7
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +2 -0
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/assets/esri/core/workers/chunks/0a2b7c691a577cb3d189.js +0 -1
- package/assets/esri/core/workers/chunks/2146c25c01c9fc11b16c.js +0 -1
- package/assets/esri/core/workers/chunks/4678a8170d8a3ccd1a7b.js +0 -1
- package/assets/esri/core/workers/chunks/56e97b98dcb8a3f2bcb7.js +0 -1
- package/assets/esri/core/workers/chunks/6c3535aa7250c08b9e5b.js +0 -1
- package/assets/esri/core/workers/chunks/6e75f09fb9452bd5f9fb.js +0 -1
- package/assets/esri/core/workers/chunks/7441d121f00ce747c08e.js +0 -1
- package/assets/esri/core/workers/chunks/76548469fe1b9c3b2051.js +0 -1
- package/assets/esri/core/workers/chunks/82ce034b5ba54de9b970.js +0 -29
- package/assets/esri/core/workers/chunks/ba435cc73956d9c64a11.js +0 -1
- package/assets/esri/core/workers/chunks/c77496c350004ee66eb2.js +0 -1
- package/assets/esri/core/workers/chunks/d371d9279b30548efa02.js +0 -1
- package/assets/esri/core/workers/chunks/dc52e036547612949d32.js +0 -1
- package/assets/esri/core/workers/chunks/e5ee64e2fb5bfcb716d8.js +0 -1
- package/views/2d/engine/webgl/mesh/bufcut.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sketch":{"area":"Area","deflection":"Deflection","direction":{"relative":"Deflection","absolute":"Direction"},"directionModeSelect":{"title":"Direction mode","absolute":"Absolute","relative":"Deflection"},"distance":"Distance","elevation":"Elevation","helpMessages2d":{"mesh":"","meshTooClose":"","meshTooFar":"","meshUnderground":"","multipoint":"Click on the map to add points. Double-click to complete.","point":"Click on the map to add a point.","polygonOneVertex":"Click on the map to continue drawing.","polygonClickOneVertex":"Click on the map to finish drawing.","polygonTwoVertices":"Double-click on the map to complete.","polygonZeroVertices":"Click on the map to start drawing.","polygonZeroVerticesHybrid":"Click or drag on the map to start drawing.","polylineOneVertex":"Double-click on the map to complete.","polylineZeroVertices":"Click on the map to start drawing.","freehandStart":"Click and drag to draw.","freehandEnd":"Release to finish.","shapeStartHybrid":"Click to place or click and drag to draw.","shapeEndHybrid":"Release to finish.","shapeStartClick":"Click to start drawing.","shapeEndClick":"Click again to finish.","curveBezierControlPoint1":"Click to place the first control point.","curveBezierControlPoint2":"Click to place the second control point.","curvePlaceEndPoint":"Click to place the curve endpoint.","curveInteriorPoint":"Click to place the arc's interior point.","noTool":"Select a tool to start drawing."},"helpMessages3d":{"mesh":"Click in the scene to place the model.","meshTooClose":"Zoom out for a better view of the model.","meshTooFar":"Zoom in for a better view of the model.","meshUnderground":"Move underground for a better view of the model.","multipoint":"","point":"Click in the scene to add a point.","polygonOneVertex":"Click in the scene to continue drawing.","polygonClickOneVertex":"Click in the scene to complete.","polygonTwoVertices":"Double-click in the scene to complete.","polygonZeroVertices":"Click in the scene to start drawing.","polygonZeroVerticesHybrid":"Click or drag in the scene to start drawing.","polylineOneVertex":"Double-click in the scene to complete.","polylineZeroVertices":"Click in the scene to start drawing.","freehandStart":"Click and drag to draw.","freehandEnd":"Release to finish.","shapeStartHybrid":"Click to place or click and drag to draw.","shapeEndHybrid":"Release to finish.","shapeStartClick":"Click to start drawing.","shapeEndClick":"Click again to finish.","curveBezierControlPoint1":"","curveBezierControlPoint2":"","curvePlaceEndPoint":"","curveInteriorPoint":"","noTool":""},"invalidValue":"Not a valid value","latitude":"Latitude","lockConstraint":"Lock constraint","longitude":"Longitude","orientation":"Orientation","radius":"Radius","rotation":"Rotation","scale":"Scale","size":"Size","totalLength":"Total length","unlockConstraint":"Unlock constraint","x":"X","y":"Y","z":"Z"}}
|
|
1
|
+
{"sketch":{"area":"Area","deflection":"Deflection","direction":{"relative":"Deflection","absolute":"Direction"},"directionModeSelect":{"title":"Direction mode","absolute":"Absolute","relative":"Deflection"},"distance":"Distance","elevation":"Elevation","elevationModeSelect":{"title":"Elevation mode","absolute-height":"Absolute","on-the-ground":"On the ground","relative-to-ground":"Relative to ground","relative-to-scene":"Relative to scene"},"helpMessages2d":{"mesh":"","meshTooClose":"","meshTooFar":"","meshUnderground":"","multipoint":"Click on the map to add points. Double-click to complete.","point":"Click on the map to add a point.","polygonOneVertex":"Click on the map to continue drawing.","polygonClickOneVertex":"Click on the map to finish drawing.","polygonTwoVertices":"Double-click on the map to complete.","polygonZeroVertices":"Click on the map to start drawing.","polygonZeroVerticesHybrid":"Click or drag on the map to start drawing.","polylineOneVertex":"Double-click on the map to complete.","polylineZeroVertices":"Click on the map to start drawing.","freehandStart":"Click and drag to draw.","freehandEnd":"Release to finish.","shapeStartHybrid":"Click to place or click and drag to draw.","shapeEndHybrid":"Release to finish.","shapeStartClick":"Click to start drawing.","shapeEndClick":"Click again to finish.","curveBezierControlPoint1":"Click to place the first control point.","curveBezierControlPoint2":"Click to place the second control point.","curvePlaceEndPoint":"Click to place the curve endpoint.","curveInteriorPoint":"Click to place the arc's interior point.","noTool":"Select a tool to start drawing."},"helpMessages3d":{"mesh":"Click in the scene to place the model.","meshTooClose":"Zoom out for a better view of the model.","meshTooFar":"Zoom in for a better view of the model.","meshUnderground":"Move underground for a better view of the model.","multipoint":"","point":"Click in the scene to add a point.","polygonOneVertex":"Click in the scene to continue drawing.","polygonClickOneVertex":"Click in the scene to complete.","polygonTwoVertices":"Double-click in the scene to complete.","polygonZeroVertices":"Click in the scene to start drawing.","polygonZeroVerticesHybrid":"Click or drag in the scene to start drawing.","polylineOneVertex":"Double-click in the scene to complete.","polylineZeroVertices":"Click in the scene to start drawing.","freehandStart":"Click and drag to draw.","freehandEnd":"Release to finish.","shapeStartHybrid":"Click to place or click and drag to draw.","shapeEndHybrid":"Release to finish.","shapeStartClick":"Click to start drawing.","shapeEndClick":"Click again to finish.","curveBezierControlPoint1":"","curveBezierControlPoint2":"","curvePlaceEndPoint":"","curveInteriorPoint":"","noTool":""},"invalidValue":"Not a valid value","latitude":"Latitude","lockConstraint":"Lock constraint","longitude":"Longitude","orientation":"Orientation","radius":"Radius","rotation":"Rotation","scale":"Scale","size":"Size","totalLength":"Total length","unlockConstraint":"Unlock constraint","x":"X","y":"Y","z":"Z"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"attachments":{"addFile":"Add file","attachmentNumberedLabel":"Attachment {index}","attach":"Attach","attachmentEditingDisabled":"Attachment editing is disabled.","attachmentLimitExceeded":"Attachment limit exceeded","attachmentLimitReached":"Attachment limit reached","attachmentMustBeShorterThan":"Attachment must be shorter than {maxDuration}","attachmentsMustBeShorterThan":"Attachments must be shorter than {maxDuration}","attachmentMustBeSmallerThan":"Attachment must be smaller than {maxSize}","attachmentsMustBeSmallerThan":"Attachments must be smaller than {maxSize}","durationInSecond":"{count} second","durationInSeconds":"{count} seconds","capture":"Capture","captureMethodNotSupported":"Capture method is not supported","captureUnsupportedAdd":"Capture is not supported on this device.","captureUnsupportedDetail":"Capture is not supported on this device.","chooseFile":"Choose file","count":"Count: {count}","deleted":"Deleted","download":"Download","dragAndDropFile":"Drag and drop file.","fileExceedsMaximumSize":"File exceeds the maximum size","fileName":"File name","fileSelected":"File selected","fileToBeReplaced":"File to be replaced","imageResizedToMeetRequirements":"Image has been resized to meet requirements","maximumAudioLength":"Max audio length: {maxDuration}","maximumFileSize":"Maximum file size: {maxSize}","maximumNumberOfFiles":"Maximum number of files: {count}","maximumVideoLength":"Max video length: {maxDuration}","maximize":"Maximize","maximumNumberReachedRemoveToContinue":"Maximum number reached. Remove attachments to continue.","maxAttachmentsShort":"Max: {count}","maxAttachments":"Maximum attachments: {count}","minimumNotMet":"Minimum attachment requirement not met","minimumNumberOfFiles":"Minimum number of files: {count}","minAttachmentsShort":"Min: {count}","minAttachments":"Minimum attachments: {count}","noAttachments":"No attachments","noPreviewAvailable":"No preview available","remove":"Remove","replace":"Replace","recordAudio":"Record audio","takePhoto":"Take photo","takeVideo":"Take video","searchAttachments":"Search attachments","replaceFile":"Replace file","selectFile":"Select file","size":"Size","type":"Type","unableToAddAttachment":"Unable to add attachment","unableToAddAttachments":"Unable to add attachments","unsupportedDevice":"Unsupported device","unsupportedDeviceCaptureMessage":"This device does not support the required capture method.","viewAll":"View all","youCanAddUpToOneAttachment":"You can add up to 1 attachment","youCanAddUpToAttachments":"You can add up to {count} attachments"},"addFeature":"Add feature","addRecord":"Add record","unsupportedDomainGroupTitle":"Unsupported values","differentValues":"Different values","differentValuesPlaceholder":"(Different values)","empty":"No value","otherOptionLabel":"Other","expressionEvaluationFailed":"Form failed to run calculations","failedToCalculateValues":"Failed to calculate values","footerButtons":{"add":"Add","delete":"Delete","discard":"Discard","done":"Done","replace":"Replace","reset":"Reset","update":"Update"},"footerNotices":{"deleteDisabledMinimumAttachments":"Delete disabled. This feature requires a minimum number of attachments."},"formFailedToLoad":"Form failed to load.","formFailedToLoadTooManyComplexFeatures":"This form uses functions that limit attribute editing to {num} features.","formFailedToLoadTooManyFeatures":"Select up to {num} features to edit attributes.","noVisibleFields":{"allElementsHidden":"The selected features have no fields to display","elementsHiddenInSome":"The selected features have shared fields that are not displayed because of visibility expressions","noElements":"The selected feature has no fields to display","noElementsInCommon":"The selected features have no shared fields"},"other":"Other","recommended":"Recommended","relatedRecords":{"noOriginKeyFeature":"A feature cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noOriginKeyRecord":"A record cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noRecordsFound":"No records were found.","noRelatedRecordsFound":"No related records were found.","relatedRecordsTitle":"Related records","untitledLayer":"Untitled layer"},"requiredFieldBatchMode":"This field is required for one or more features.","requiredFieldLabel":"{name} - required field","deselectAllLabel":"Deselect all","selectAllLabel":"Select all","showAll":"Show all","showAllOptions":"Show all options","titles":{"addAttachments":"Add attachments","attachments":"Attachments","editFeature":"Edit feature","editFeatures":"Edit features","editAttachment":"Edit attachment","replaceAttachment":"Replace attachment"},"totalCount":"Total: {count}","unsupported":"Unsupported","unsupportedContingentValues":"Editing attributes for multiple features is not available for layers with contingent values.","validationErrors":{"cannotBeNull":"Please enter a value","invalidCodedValue":"Value should be one of the listed values.","invalidType":"Not a valid value","invalidBatchFormType":"One or more features contain invalid values. Check individual features.","featuresInError":"One or more features have errors. Check individual features.","featuresWithInvalidValues":"One or more features have invalid values","nonVisibleError_changeValues":"The selected feature has hidden fields with invalid values. Change the values so that fields are visible.","nonVisibleError_checkIndividualFeatures":"One or more features have hidden fields with invalid values. Check individual features and correct the issues.","outsideRange":"Value should be between {min} and {max}","outsideRangeMax":"Value should be less than or equal to {max}","outsideRangeMin":"Value should be greater than or equal to {min}","tooFewSelectedChoices":"Select at least {min} of the options","tooManySelectedChoices":"Select no more than {max} of the options","tooShort":"This field requires a minimum of {min} characters","valuesIncompatible":"Value is incompatible with other selected values"},"valueExpressionError":"Failed to calculate value","viewAll":"View all","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."}}
|
|
1
|
+
{"attachments":{"addFile":"Add file","attachmentNumberedLabel":"Attachment {index}","attach":"Attach","attachmentEditingDisabled":"Attachment editing is disabled.","attachmentLimitExceeded":"Attachment limit exceeded","attachmentLimitReached":"Attachment limit reached","attachmentMustBeShorterThan":"Attachment must be shorter than {maxDuration}","attachmentsMustBeShorterThan":"Attachments must be shorter than {maxDuration}","attachmentMustBeSmallerThan":"Attachment must be smaller than {maxSize}","attachmentsMustBeSmallerThan":"Attachments must be smaller than {maxSize}","durationInSecond":"{count} second","durationInSeconds":"{count} seconds","capture":"Capture","captureMethodNotSupported":"Capture method is not supported","captureUnsupportedAdd":"Capture is not supported on this device.","captureUnsupportedDetail":"Capture is not supported on this device.","chooseFile":"Choose file","count":"Count: {count}","deleted":"Deleted","download":"Download","dragAndDropFile":"Drag and drop file.","fileExceedsMaximumSize":"File exceeds the maximum size","fileName":"File name","fileSelected":"File selected","fileToBeReplaced":"File to be replaced","imageResizedToMeetRequirements":"Image has been resized to meet requirements","maximumAudioLength":"Max audio length: {maxDuration}","maximumFileSize":"Maximum file size: {maxSize}","maximumNumberOfFiles":"Maximum number of files: {count}","maximumVideoLength":"Max video length: {maxDuration}","maximize":"Maximize","maximumNumberReachedRemoveToContinue":"Maximum number reached. Remove attachments to continue.","maxAttachmentsShort":"Max: {count}","maxAttachments":"Maximum attachments: {count}","minimumNotMet":"Minimum attachment requirement not met","minimumNumberOfFiles":"Minimum number of files: {count}","minAttachmentsShort":"Min: {count}","minAttachments":"Minimum attachments: {count}","noAttachments":"No attachments","noPreviewAvailable":"No preview available","remove":"Remove","replace":"Replace","recordAudio":"Record audio","takePhoto":"Take photo","takeVideo":"Take video","searchAttachments":"Search attachments","replaceFile":"Replace file","selectFile":"Select file","size":"Size","type":"Type","unableToAddAttachment":"Unable to add attachment","unableToAddAttachments":"Unable to add attachments","unsupportedDevice":"Unsupported device","unsupportedDeviceCaptureMessage":"This device does not support the required capture method.","viewAll":"View all","youCanAddUpToOneAttachment":"You can add up to 1 attachment","youCanAddUpToAttachments":"You can add up to {count} attachments"},"addFeature":"Add feature","addRecord":"Add record","unsupportedDomainGroupTitle":"Unsupported values","differentValues":"Different values","differentValuesPlaceholder":"(Different values)","empty":"No value","noDynamicChoices":"No choices were returned for this field","otherOptionLabel":"Other","expressionEvaluationFailed":"Form failed to run calculations","failedToCalculateValues":"Failed to calculate values","footerButtons":{"add":"Add","delete":"Delete","discard":"Discard","done":"Done","replace":"Replace","reset":"Reset","update":"Update"},"footerNotices":{"deleteDisabledMinimumAttachments":"Delete disabled. This feature requires a minimum number of attachments."},"formFailedToLoad":"Form failed to load.","formFailedToLoadTooManyComplexFeatures":"This form uses functions that limit attribute editing to {num} features.","formFailedToLoadTooManyFeatures":"Select up to {num} features to edit attributes.","noVisibleFields":{"allElementsHidden":"The selected features have no fields to display","elementsHiddenInSome":"The selected features have shared fields that are not displayed because of visibility expressions","noElements":"The selected feature has no fields to display","noElementsInCommon":"The selected features have no shared fields"},"other":"Other","recommended":"Recommended","relatedRecords":{"noOriginKeyFeature":"A feature cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noOriginKeyRecord":"A record cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noRecordsFound":"No records were found.","noRelatedRecordsFound":"No related records were found.","relatedRecordsTitle":"Related records","untitledLayer":"Untitled layer"},"requiredFieldBatchMode":"This field is required for one or more features.","requiredFieldLabel":"{name} - required field","deselectAllLabel":"Deselect all","selectAllLabel":"Select all","showAll":"Show all","showAllOptions":"Show all options","titles":{"addAttachments":"Add attachments","attachments":"Attachments","editFeature":"Edit feature","editFeatures":"Edit features","editAttachment":"Edit attachment","replaceAttachment":"Replace attachment"},"totalCount":"Total: {count}","unsupported":"Unsupported","unsupportedContingentValues":"Editing attributes for multiple features is not available for layers with contingent values.","validationErrors":{"cannotBeNull":"Please enter a value","invalidCodedValue":"Value should be one of the listed values.","invalidType":"Not a valid value","invalidBatchFormType":"One or more features contain invalid values. Check individual features.","featuresInError":"One or more features have errors. Check individual features.","featuresWithInvalidValues":"One or more features have invalid values","nonVisibleError_changeValues":"The selected feature has hidden fields with invalid values. Change the values so that fields are visible.","nonVisibleError_checkIndividualFeatures":"One or more features have hidden fields with invalid values. Check individual features and correct the issues.","outsideRange":"Value should be between {min} and {max}","outsideRangeMax":"Value should be less than or equal to {max}","outsideRangeMin":"Value should be greater than or equal to {min}","tooFewSelectedChoices":"Select at least {min} of the options","tooManySelectedChoices":"Select no more than {max} of the options","tooShort":"This field requires a minimum of {min} characters","valuesIncompatible":"Value is incompatible with other selected values"},"valueExpressionError":"Failed to calculate value","viewAll":"View all","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."}}
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.128";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/core/Accessor.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type GroupKey<T> = Exclude<T, ResourceHandle>;
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Accessor is an abstract class that facilitates access to instance properties and provides a mechanism for watching property changes.
|
|
7
|
-
* You can watch for property changes by using
|
|
7
|
+
* You can watch for property changes by using [watch()](https://developers.arcgis.com/javascript/latest/references/core/core/reactiveUtils/#watch).
|
|
8
8
|
*
|
|
9
9
|
* @since 4.0
|
|
10
10
|
* @see [Guide - Implementing Accessor](https://developers.arcgis.com/javascript/latest/implementing-accessor/)
|
package/core/lang.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{equals as t}from"./arrayUtils.js";import{isInt8Array as n,isUint8Array as e,isUint8ClampedArray as r,isInt16Array as o,isUint16Array as f,isInt32Array as i,isUint32Array as c,isFloat32Array as u,isFloat64Array as s}from"./typedArrayUtil.js";function l(t,n){let e;if(n)for(e in t)t.hasOwnProperty(e)&&(void 0===t[e]?delete t[e]:t[e]instanceof Object&&l(t[e],!0));else for(e in t)t.hasOwnProperty(e)&&void 0===t[e]&&delete t[e];return t}function a(t){if(!t||"object"!=typeof t||"function"==typeof t)return t;const n=O(t);if(null!=n)return n;if(y(t))return t.clone();if(b(t))return t.map(a);if(m(t))throw new Error("Trying to clone an unclonable Accessor instance");const e={};for(const r of Object.getOwnPropertyNames(t))e[r]=a(t[r]);return e}function p(t,n){if(!t||"object"!=typeof t||"function"==typeof t||"HTMLElement"in globalThis&&t instanceof HTMLElement)return t;const e=O(t);if(null!=e)return e;if(b(t)){let e=!0;const r=t.map(t=>{const r=p(t,n);return null!=t&&null==r&&(e=!1),r});return e?r:null}if(y(t))return t.clone(n);if(t instanceof File||t instanceof Blob)return t;if(m(t))return null;const r=new(0,Object.getPrototypeOf(t).constructor);for(const o of Object.getOwnPropertyNames(t)){const n=t[o],e=p(n);if(null!=n&&null==e)return null;r[o]=e}return r}function y(t){return"function"==typeof t.clone}function b(t){return"function"==typeof t.map&&"function"==typeof t.forEach}function m(t){return"function"==typeof t.notifyChange
|
|
2
|
+
import{equals as t}from"./arrayUtils.js";import{isInt8Array as n,isUint8Array as e,isUint8ClampedArray as r,isInt16Array as o,isUint16Array as f,isInt32Array as i,isUint32Array as c,isFloat32Array as u,isFloat64Array as s}from"./typedArrayUtil.js";function l(t,n){let e;if(n)for(e in t)t.hasOwnProperty(e)&&(void 0===t[e]?delete t[e]:t[e]instanceof Object&&l(t[e],!0));else for(e in t)t.hasOwnProperty(e)&&void 0===t[e]&&delete t[e];return t}function a(t){if(!t||"object"!=typeof t||"function"==typeof t)return t;const n=O(t);if(null!=n)return n;if(y(t))return t.clone();if(b(t))return t.map(a);if(m(t))throw new Error("Trying to clone an unclonable Accessor instance");const e={};for(const r of Object.getOwnPropertyNames(t))e[r]=a(t[r]);return e}function p(t,n){if(!t||"object"!=typeof t||"function"==typeof t||"HTMLElement"in globalThis&&t instanceof HTMLElement)return t;const e=O(t);if(null!=e)return e;if(b(t)){let e=!0;const r=t.map(t=>{const r=p(t,n);return null!=t&&null==r&&(e=!1),r});return e?r:null}if(y(t))return t.clone(n);if(t instanceof File||t instanceof Blob)return t;if(m(t))return null;const r=new(0,Object.getPrototypeOf(t).constructor);for(const o of Object.getOwnPropertyNames(t)){const n=t[o],e=p(n);if(null!=n&&null==e)return null;r[o]=e}return r}function y(t){return"function"==typeof t.clone}function b(t){return"function"==typeof t.map&&"function"==typeof t.forEach}function m(t){return"function"==typeof t.notifyChange}function g(t){if("[object Object]"!==Object.prototype.toString.call(t))return!1;const n=Object.getPrototypeOf(t);return null===n||n===Object.prototype}function O(t){if(n(t)||e(t)||r(t)||o(t)||f(t)||i(t)||c(t)||u(t)||s(t))return t.slice();if(t instanceof Date)return new Date(t);if(t instanceof ArrayBuffer){return t.slice(0,t.byteLength)}if(t instanceof Map){const n=new Map;for(const[e,r]of t)n.set(e,a(r));return n}if(t instanceof Set){const n=new Set;for(const e of t)n.add(a(e));return n}return null}function j(t,n){return t===n||"number"==typeof t&&isNaN(t)&&"number"==typeof n&&isNaN(n)||"function"==typeof t?.getTime&&"function"==typeof n?.getTime&&t.getTime()===n.getTime()||!1}function h(n,e){return n===e||(null==n||"string"==typeof n?n===e:"number"==typeof n?n===e||"number"==typeof e&&isNaN(n)&&isNaN(e):n instanceof Date?e instanceof Date&&n.getTime()===e.getTime():Array.isArray(n)?Array.isArray(e)&&t(n,e):n instanceof Set?e instanceof Set&&N(n,e):n instanceof Map?e instanceof Map&&T(n,e):!!g(n)&&(g(e)&&w(n,e)))}function w(t,n){if(null===t||null===n)return!1;const e=Object.keys(t);if(null===n||Object.keys(n).length!==e.length)return!1;for(const r of e)if(t[r]!==n[r]||!Object.prototype.hasOwnProperty.call(n,r))return!1;return!0}function N(t,n){if(t.size!==n.size)return!1;for(const e of t)if(!n.has(e))return!1;return!0}function T(t,n){if(t.size!==n.size)return!1;for(const[e,r]of t){const t=n.get(e);if(t!==r||void 0===t&&!n.has(e))return!1}return!0}export{a as clone,j as equals,h as equalsShallow,l as fixJson,m as isAccessorLike,y as isClonable,g as isPlainObject,p as tryClone};
|
package/core/units.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{strict as e}from"./jsonMap.js";import{getReferenceEllipsoid as s,isEarth as i}from"../geometry/ellipsoidUtils.js";import{earth as t,mars as n,moon as r}from"../geometry/support/Ellipsoid.js";import{isWKIDFromMars as a,isWKIDFromMoon as c,isGeographic as u}from"../geometry/support/spatialReferenceUtils.js";import{vcsLookup as l}from"../geometry/support/vcsLookup.js";import o from"../geometry/support/WKIDUnitConversion.js";const m=39.37,f=t.radius*Math.PI/200,d=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,U=o,b=/UNIT\[([^\]]+)]/i,B=new Set([4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104025,104026,104139,104140]),k=e()({millimeter:"millimeters",centimeter:"centimeters",meter:"meters",meter_german:"german-meters",kilometer:"kilometers",decimeter:"decimeters",micrometer:"micrometers",nanometer:"nanometers","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",fathom:"fathoms",nautical_mile:"nautical-miles",chain_us:"us-chains",link_us:"us-links",mile_us:"us-miles",yard_clarke:"clarke-yards",chain_clarke:"clarke-chains",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",link_sears:"sears-links",yard_benoit_1895_a:"benoit-1895-a-yards",foot_benoit_1895_a:"benoit-1895-a-feet",chain_benoit_1895_a:"benoit-1895-a-chains",link_benoit_1895_a:"benoit-1895-a-links",yard_benoit_1895_b:"benoit-1895-b-yards",foot_benoit_1895_b:"benoit-1895-b-feet",chain_benoit_1895_b:"benoit-1895-b-chains",link_benoit_1895_b:"benoit-1895-b-links",foot_1865:"1865-feet",foot_indian:"indian-feet",foot_indian_1937:"indian-1937-feet",foot_indian_1962:"indian-1962-feet",foot_indian_1975:"indian-1975-feet",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",yard_indian_1962:"indian-1962-yards",yard_indian_1975:"indian-1975-yards",statute_mile:"statute-miles",foot_gold_coast:"gold-coast-feet",foot_british_1936:"british-1936-feet",yard:"yards",chain:"chains",link:"links",yard_sears_1922_truncated:"sears-1922-truncated-yards",foot_sears_1922_truncated:"sears-1922-truncated-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains",link_sears_1922_truncated:"sears-1922-truncated-links",yard_us:"us-yards",inch:"inches",inch_us:"us-inches",rod:"rods",rod_us:"us-rods",nautical_mile_us:"us-nautical-miles",nautical_mile_uk:"uk-nautical-miles",smoot:"smoots",vara_tx:"tx-vara",point:"points"}),h=e=>e*e,_=e=>e*e*e,q={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},meters:{inBaseUnits:1},feet:{inBaseUnits:.3048},"us-feet":{inBaseUnits:.3048006096012192},"clarke-feet":{inBaseUnits:.3047972654},fathoms:{inBaseUnits:1.8288},"nautical-miles":{inBaseUnits:1852},"german-meters":{inBaseUnits:1.0000135965},"us-chains":{inBaseUnits:20.11684023368047},"us-links":{inBaseUnits:.2011684023368047},"us-miles":{inBaseUnits:1609.347218694438},kilometers:{inBaseUnits:1e3},"clarke-yards":{inBaseUnits:.9143917962},"clarke-chains":{inBaseUnits:20.1166195164},"clarke-links":{inBaseUnits:.201166195164},"sears-yards":{inBaseUnits:.9143984146160287},"sears-feet":{inBaseUnits:.3047994715386762},"sears-chains":{inBaseUnits:20.11676512155263},"sears-links":{inBaseUnits:.2011676512155263},"benoit-1895-a-yards":{inBaseUnits:.9143992},"benoit-1895-a-feet":{inBaseUnits:.3047997333333333},"benoit-1895-a-chains":{inBaseUnits:20.1167824},"benoit-1895-a-links":{inBaseUnits:.201167824},"benoit-1895-b-yards":{inBaseUnits:.9143992042898124},"benoit-1895-b-feet":{inBaseUnits:.3047997347632708},"benoit-1895-b-chains":{inBaseUnits:20.11678249437587},"benoit-1895-b-links":{inBaseUnits:.2011678249437587},"1865-feet":{inBaseUnits:.3048008333333334},"indian-feet":{inBaseUnits:.3047995102481469},"indian-1937-feet":{inBaseUnits:.30479841},"indian-1962-feet":{inBaseUnits:.3047996},"indian-1975-feet":{inBaseUnits:.3047995},"indian-yards":{inBaseUnits:.9143985307444408},"indian-1937-yards":{inBaseUnits:.91439523},"indian-1962-yards":{inBaseUnits:.9143988},"indian-1975-yards":{inBaseUnits:.9143985},miles:{inBaseUnits:1609.344},"statute-miles":{inBaseUnits:1609.344},"gold-coast-feet":{inBaseUnits:.3047997101815088},"british-1936-feet":{inBaseUnits:.3048007491},yards:{inBaseUnits:.9144},chains:{inBaseUnits:20.1168},links:{inBaseUnits:.201168},"sears-1922-truncated-yards":{inBaseUnits:.914398},"sears-1922-truncated-feet":{inBaseUnits:.3047993333333334},"sears-1922-truncated-chains":{inBaseUnits:20.116756},"sears-1922-truncated-links":{inBaseUnits:.20116756},"us-yards":{inBaseUnits:.9144018288036576},decimeters:{inBaseUnits:.1},inches:{inBaseUnits:.0254},"us-inches":{inBaseUnits:.0254000508001016},rods:{inBaseUnits:5.0292},"us-rods":{inBaseUnits:5.029210058420118},"us-nautical-miles":{inBaseUnits:1853.248},"uk-nautical-miles":{inBaseUnits:1853.184},smoots:{inBaseUnits:1.7018},"tx-vara":{inBaseUnits:.8466683600033867},points:{inBaseUnits:.0003527777777777778},micrometers:{inBaseUnits:1e-6},nanometers:{inBaseUnits:1e-9},"50-kilometers":{inBaseUnits:5e4},"150-kilometers":{inBaseUnits:15e4}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:h(.001)},"square-centimeters":{inBaseUnits:h(.01)},"square-decimeters":{inBaseUnits:h(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:h(1e3)},"square-inches":{inBaseUnits:h(.0254)},"square-feet":{inBaseUnits:h(.3048)},"square-yards":{inBaseUnits:h(.9144)},"square-miles":{inBaseUnits:h(1609.344)},"square-nautical-miles":{inBaseUnits:h(1852)},"square-us-feet":{inBaseUnits:h(1200/3937)},acres:{inBaseUnits:.0015625*h(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},megaliters:{inBaseUnits:1e6},gigaliters:{inBaseUnits:1e9},"cubic-millimeters":{inBaseUnits:1e3*_(.001)},"cubic-centimeters":{inBaseUnits:1e3*_(.01)},"cubic-decimeters":{inBaseUnits:1e3*_(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*_(1e3)},"cubic-inches":{inBaseUnits:1e3*_(.0254)},"cubic-feet":{inBaseUnits:1e3*_(.3048)},"cubic-yards":{inBaseUnits:1e3*_(.9144)},"cubic-miles":{inBaseUnits:1e3*_(1609.344)},"cubic-us-feet":{inBaseUnits:1e3*_(1200/3937)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},y=(()=>{const e={};for(const s in q)for(const i in q[s].units)e[i]=s;return e})();function p(e,s,i){return e*q[i].units[s].inBaseUnits}function g(e,s,i){return e/q[i].units[s].inBaseUnits}const w=["inches","feet","yards","miles","nautical-miles","us-feet","millimeters","centimeters","decimeters","meters","kilometers"],M=["square-inches","square-feet","square-yards","square-miles","square-nautical-miles","square-us-feet","square-millimeters","square-centimeters","square-decimeters","square-meters","square-kilometers","acres","ares","hectares"],v=["cubic-inches","cubic-feet","cubic-yards","cubic-miles","cubic-us-feet","liters","megaliters","gigaliters","cubic-millimeters","cubic-centimeters","cubic-decimeters","cubic-meters","cubic-kilometers"],S=["metric","imperial"],D=[...S,...M],C=[...S,...w],E=[...S,...v],P=new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);function x(e){return"imperial"===e||"metric"===e}function W(e){const s=y[e];if(!s)throw new Error("unknown type");return s}function I(e){return q[e].baseUnit}function j(e){return I(W(e))}function R(e,s=null){return s=s||W(e),q[s].baseUnit===e}function F(e,s,i){if(s===i)return e;const t=W(s);if(t!==W(i))throw new Error("incompatible units");const n=R(s,t)?e:p(e,s,t);return R(i,t)?n:g(n,i,t)}function N(e,s,i,t=!1){if(!t&&u(s))throw new Error("Unable to convert from an angular unit to a linear unit.");const n=me(s);return n!==i&&(e=n?F(e,n,i):F(e*=ae(s),"meters",i)),e}function O(e,s,i,t=!1){if(!t&&u(i))throw new Error("Unable to convert from a linear unit to an angular unit.");const n=me(i);return s!==n&&(e=n?F(e,s,n):F(e,s,"meters")/ae(i)),e}function J(e){switch(e){case"metric":return"meters";case"imperial":return"feet";default:return e}}function T(e){return J(e)}function V(e){switch(e){case"metric":return"square-meters";case"imperial":return"square-feet";default:return e}}function K(e){switch(e){case"metric":return"cubic-meters";case"imperial":return"cubic-feet";default:return e}}function L(e,s,i){switch(i){case"metric":return G(e,s);case"imperial":return Y(e,s);default:return i}}function A(e,s,i){switch(i){case"metric":return H(e,s);case"imperial":return $(e,s);default:return i}}function G(e,s){const i=F(e,s,"meters");return Math.abs(i)<3e3?"meters":"kilometers"}function H(e,s){const i=F(e,s,"meters");return Math.abs(i)<1e5?"meters":"kilometers"}function Y(e,s){const i=F(e,s,"feet");return Math.abs(i)<1e3?"feet":"miles"}function $(e,s){const i=F(e,s,"feet");return Math.abs(i)<1e5?"feet":"miles"}function z(e,s){const i=F(e,s,"square-meters");return Math.abs(i)<3e6?"square-meters":"square-kilometers"}function Q(e,s){const i=F(e,s,"square-feet");return Math.abs(i)<1e6?"square-feet":"square-miles"}function X(e,s,i){switch(i){case"metric":return z(e,s);case"imperial":return Q(e,s);default:return i}}function Z(e,s){const i=F(e,s,"cubic-meters");return Math.abs(i)<3e8?"cubic-meters":"cubic-kilometers"}function ee(e,s){const i=F(e,s,"cubic-feet");return Math.abs(i)<1e8?"cubic-feet":"cubic-miles"}function se(e,s,i){switch(i){case"metric":return Z(e,s);case"imperial":return ee(e,s);default:return i}}function ie(e,s,i){return F(e,s,"meters")/(i*Math.PI/180)}function te(e){return k.fromJSON(e.toLowerCase())||null}function ne(e){const s=(e?.latestVcsWkid?l.get(e.latestVcsWkid):null)??(e?.vcsWkid?l.get(e.vcsWkid):null);return s?s.unit.conversionFactor:null==e||i(e)?ce(e,!1)??1:1}function re(e){const i=(e?.latestVcsWkid?l.get(e.latestVcsWkid):null)??(e?.vcsWkid?l.get(e.vcsWkid):null);if(i)return te(i.unit.name);return ae(e)>=s(e).metersPerDegree?"meters":me(e)}function ae(e,s=t.metersPerDegree){return ce(e,!0)??s}function ce(e,s=!1){const i=e?.wkid??null,t=e?.wkt2??e?.wkt??null;let u=null;if(i){if(a(i))return n.metersPerDegree;if(c(i))return r.metersPerDegree;u=U.values[U[i]],!u&&s&&B.has(i)&&(u=f)}else t&&(Be(t)?u=le(d.exec(t),u):be(t)&&(u=le(b.exec(t),u)));return u}function ue(e){return u(e)?1:ae(e)}function le(e,s){return e?.[1]?oe(e[1]):s}function oe(e){return parseFloat(e.split(",")[1])}function me(e){const s=e?.wkid??null,i=e?.wkt2??e?.wkt??null;let t=null;if(s)t=U.units[U[s]];else if(i){const e=Be(i)?d:be(i)?b:null;if(e){const s=e.exec(i);s?.[1]&&(t=he(s[1]))}}return null!=t?te(t):null}function fe(e){const s=me(e);return null!=s&&C.includes(s)?s:null}function de(e){const s=re(e);return null!=s&&C.includes(s)?s:null}function Ue(e){const s=me(e);return null==s?null:P.get(s)}function be(e){return/^GEOCCS/i.test(e)}function Be(e){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(e)}const ke=1e-7;function he(e){const s=/[\\"']([^\\"']+)/.exec(e);let i=s?.[1];if(!i||!te(i)){const s=oe(e);i=null;const t=U.values;for(let e=0;e<t.length;++e)if(Math.abs(s-t[e])<ke){i=U.units[e];break}}return i}function _e(e){const s=me(e);if(null==s)return null;switch(s){case"feet":case"us-feet":case"clarke-feet":case"fathoms":case"nautical-miles":case"us-chains":case"us-links":case"us-miles":case"clarke-yards":case"clarke-chains":case"clarke-links":case"sears-yards":case"sears-feet":case"sears-chains":case"sears-links":case"benoit-1895-a-yards":case"benoit-1895-a-feet":case"benoit-1895-a-chains":case"benoit-1895-a-links":case"benoit-1895-b-yards":case"benoit-1895-b-feet":case"benoit-1895-b-chains":case"benoit-1895-b-links":case"1865-feet":case"indian-feet":case"indian-1937-feet":case"indian-1962-feet":case"indian-1975-feet":case"indian-yards":case"indian-1937-yards":case"indian-1962-yards":case"indian-1975-yards":case"statute-miles":case"gold-coast-feet":case"british-1936-feet":case"yards":case"chains":case"links":case"sears-1922-truncated-yards":case"sears-1922-truncated-feet":case"sears-1922-truncated-chains":case"sears-1922-truncated-links":case"us-yards":case"inches":case"us-inches":case"rods":case"us-rods":case"us-nautical-miles":case"uk-nautical-miles":case"smoots":case"tx-vara":case"points":return"imperial";case"millimeters":case"centimeters":case"meters":case"german-meters":case"kilometers":case"decimeters":case"micrometers":case"nanometers":case"50-kilometers":case"150-kilometers":return"metric"}return null}const qe={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},ye={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},pe={esriDUDecimalDegrees:"degrees",esriDURadians:"radians"},ge=e()(qe),we=e()(ye),Me=e()(pe);function ve(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-nautical-miles":return"nautical-miles";case"square-us-feet":return"us-feet";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";case"square-meters":return"meters";case"square-kilometers":return"kilometers"}throw new Error("unhandled area unit")}export{X as adaptiveAreaUnit,Q as adaptiveImperialAreaUnit,Y as adaptiveImperialLengthUnit,$ as adaptiveImperialVerticalLengthUnit,ee as adaptiveImperialVolumeUnit,L as adaptiveLengthUnit,z as adaptiveMetricAreaUnit,G as adaptiveMetricLengthUnit,H as adaptiveMetricVerticalLengthUnit,Z as adaptiveMetricVolumeUnit,A as adaptiveVerticalLengthUnit,se as adaptiveVolumeUnit,Me as angleUnitsJSONMap,Ue as areaUnitFromSpatialReference,ge as areaUnitsJSONMap,j as baseUnitForUnit,I as baseUnitForUnitType,N as convertFromSpatialReferenceUnit,O as convertToSpatialReferenceUnit,F as convertUnit,V as defaultAreaUnit,J as defaultLengthUnit,T as defaultVerticalLengthUnit,K as defaultVolumeUnit,ve as deriveLengthUnitFromAreaUnit,_e as getDefaultUnitSystem,ue as getMetersPerCartesianUnitForSR,ce as getMetersPerUnit,ae as getMetersPerUnitForSR,ne as getMetersPerVerticalUnitForSR,me as getUnitString,re as getVerticalUnitStringForSR,B as gradGcsIds,m as inchesPerMeter,R as isBaseUnit,x as isMeasurementSystem,Be as isProjectedWKT,ie as lengthToDegrees,fe as lengthUnitFromSpatialReference,w as lengthUnits,we as lengthUnitsJSONMap,D as measurementAreaUnits,C as measurementLengthUnits,E as measurementVolumeUnits,te as unitFromRESTJSON,W as unitType,de as verticalLengthUnitFromSpatialReference};
|
|
2
|
+
import{strict as e}from"./jsonMap.js";import{isEarth as s,getReferenceEllipsoid as i}from"../geometry/ellipsoidUtils.js";import{earth as t,mars as n,moon as r}from"../geometry/support/Ellipsoid.js";import{isWKIDFromMars as a,isWKIDFromMoon as c,isGeographic as u}from"../geometry/support/spatialReferenceUtils.js";import{vcsLookup as l}from"../geometry/support/vcsLookup.js";import o from"../geometry/support/WKIDUnitConversion.js";const m=39.37,f=t.radius*Math.PI/200,d=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,U=o,b=/UNIT\[([^\]]+)]/i,B=new Set([4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104025,104026,104139,104140]),k=e()({millimeter:"millimeters",centimeter:"centimeters",meter:"meters",meter_german:"german-meters",kilometer:"kilometers",decimeter:"decimeters",micrometer:"micrometers",nanometer:"nanometers","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",fathom:"fathoms",nautical_mile:"nautical-miles",chain_us:"us-chains",link_us:"us-links",mile_us:"us-miles",yard_clarke:"clarke-yards",chain_clarke:"clarke-chains",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",link_sears:"sears-links",yard_benoit_1895_a:"benoit-1895-a-yards",foot_benoit_1895_a:"benoit-1895-a-feet",chain_benoit_1895_a:"benoit-1895-a-chains",link_benoit_1895_a:"benoit-1895-a-links",yard_benoit_1895_b:"benoit-1895-b-yards",foot_benoit_1895_b:"benoit-1895-b-feet",chain_benoit_1895_b:"benoit-1895-b-chains",link_benoit_1895_b:"benoit-1895-b-links",foot_1865:"1865-feet",foot_indian:"indian-feet",foot_indian_1937:"indian-1937-feet",foot_indian_1962:"indian-1962-feet",foot_indian_1975:"indian-1975-feet",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",yard_indian_1962:"indian-1962-yards",yard_indian_1975:"indian-1975-yards",statute_mile:"statute-miles",foot_gold_coast:"gold-coast-feet",foot_british_1936:"british-1936-feet",yard:"yards",chain:"chains",link:"links",yard_sears_1922_truncated:"sears-1922-truncated-yards",foot_sears_1922_truncated:"sears-1922-truncated-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains",link_sears_1922_truncated:"sears-1922-truncated-links",yard_us:"us-yards",inch:"inches",inch_us:"us-inches",rod:"rods",rod_us:"us-rods",nautical_mile_us:"us-nautical-miles",nautical_mile_uk:"uk-nautical-miles",smoot:"smoots",vara_tx:"tx-vara",point:"points"}),h=e=>e*e,_=e=>e*e*e,q={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},meters:{inBaseUnits:1},feet:{inBaseUnits:.3048},"us-feet":{inBaseUnits:.3048006096012192},"clarke-feet":{inBaseUnits:.3047972654},fathoms:{inBaseUnits:1.8288},"nautical-miles":{inBaseUnits:1852},"german-meters":{inBaseUnits:1.0000135965},"us-chains":{inBaseUnits:20.11684023368047},"us-links":{inBaseUnits:.2011684023368047},"us-miles":{inBaseUnits:1609.347218694438},kilometers:{inBaseUnits:1e3},"clarke-yards":{inBaseUnits:.9143917962},"clarke-chains":{inBaseUnits:20.1166195164},"clarke-links":{inBaseUnits:.201166195164},"sears-yards":{inBaseUnits:.9143984146160287},"sears-feet":{inBaseUnits:.3047994715386762},"sears-chains":{inBaseUnits:20.11676512155263},"sears-links":{inBaseUnits:.2011676512155263},"benoit-1895-a-yards":{inBaseUnits:.9143992},"benoit-1895-a-feet":{inBaseUnits:.3047997333333333},"benoit-1895-a-chains":{inBaseUnits:20.1167824},"benoit-1895-a-links":{inBaseUnits:.201167824},"benoit-1895-b-yards":{inBaseUnits:.9143992042898124},"benoit-1895-b-feet":{inBaseUnits:.3047997347632708},"benoit-1895-b-chains":{inBaseUnits:20.11678249437587},"benoit-1895-b-links":{inBaseUnits:.2011678249437587},"1865-feet":{inBaseUnits:.3048008333333334},"indian-feet":{inBaseUnits:.3047995102481469},"indian-1937-feet":{inBaseUnits:.30479841},"indian-1962-feet":{inBaseUnits:.3047996},"indian-1975-feet":{inBaseUnits:.3047995},"indian-yards":{inBaseUnits:.9143985307444408},"indian-1937-yards":{inBaseUnits:.91439523},"indian-1962-yards":{inBaseUnits:.9143988},"indian-1975-yards":{inBaseUnits:.9143985},miles:{inBaseUnits:1609.344},"statute-miles":{inBaseUnits:1609.344},"gold-coast-feet":{inBaseUnits:.3047997101815088},"british-1936-feet":{inBaseUnits:.3048007491},yards:{inBaseUnits:.9144},chains:{inBaseUnits:20.1168},links:{inBaseUnits:.201168},"sears-1922-truncated-yards":{inBaseUnits:.914398},"sears-1922-truncated-feet":{inBaseUnits:.3047993333333334},"sears-1922-truncated-chains":{inBaseUnits:20.116756},"sears-1922-truncated-links":{inBaseUnits:.20116756},"us-yards":{inBaseUnits:.9144018288036576},decimeters:{inBaseUnits:.1},inches:{inBaseUnits:.0254},"us-inches":{inBaseUnits:.0254000508001016},rods:{inBaseUnits:5.0292},"us-rods":{inBaseUnits:5.029210058420118},"us-nautical-miles":{inBaseUnits:1853.248},"uk-nautical-miles":{inBaseUnits:1853.184},smoots:{inBaseUnits:1.7018},"tx-vara":{inBaseUnits:.8466683600033867},points:{inBaseUnits:.0003527777777777778},micrometers:{inBaseUnits:1e-6},nanometers:{inBaseUnits:1e-9},"50-kilometers":{inBaseUnits:5e4},"150-kilometers":{inBaseUnits:15e4}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:h(.001)},"square-centimeters":{inBaseUnits:h(.01)},"square-decimeters":{inBaseUnits:h(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:h(1e3)},"square-inches":{inBaseUnits:h(.0254)},"square-feet":{inBaseUnits:h(.3048)},"square-yards":{inBaseUnits:h(.9144)},"square-miles":{inBaseUnits:h(1609.344)},"square-nautical-miles":{inBaseUnits:h(1852)},"square-us-feet":{inBaseUnits:h(1200/3937)},acres:{inBaseUnits:.0015625*h(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},megaliters:{inBaseUnits:1e6},gigaliters:{inBaseUnits:1e9},"cubic-millimeters":{inBaseUnits:1e3*_(.001)},"cubic-centimeters":{inBaseUnits:1e3*_(.01)},"cubic-decimeters":{inBaseUnits:1e3*_(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*_(1e3)},"cubic-inches":{inBaseUnits:1e3*_(.0254)},"cubic-feet":{inBaseUnits:1e3*_(.3048)},"cubic-yards":{inBaseUnits:1e3*_(.9144)},"cubic-miles":{inBaseUnits:1e3*_(1609.344)},"cubic-us-feet":{inBaseUnits:1e3*_(1200/3937)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},y=(()=>{const e={};for(const s in q)for(const i in q[s].units)e[i]=s;return e})();function p(e,s,i){return e*q[i].units[s].inBaseUnits}function g(e,s,i){return e/q[i].units[s].inBaseUnits}const w=["inches","feet","yards","miles","nautical-miles","us-feet","millimeters","centimeters","decimeters","meters","kilometers"],M=["square-inches","square-feet","square-yards","square-miles","square-nautical-miles","square-us-feet","square-millimeters","square-centimeters","square-decimeters","square-meters","square-kilometers","acres","ares","hectares"],v=["cubic-inches","cubic-feet","cubic-yards","cubic-miles","cubic-us-feet","liters","megaliters","gigaliters","cubic-millimeters","cubic-centimeters","cubic-decimeters","cubic-meters","cubic-kilometers"],S=["metric","imperial"],D=[...S,...M],C=[...S,...w],E=[...S,...v],P=new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);function x(e){return"imperial"===e||"metric"===e}function W(e){const s=y[e];if(!s)throw new Error("unknown type");return s}function I(e){return q[e].baseUnit}function j(e){return I(W(e))}function R(e,s=null){return s=s||W(e),q[s].baseUnit===e}function F(e,s,i){if(s===i)return e;const t=W(s);if(t!==W(i))throw new Error("incompatible units");const n=R(s,t)?e:p(e,s,t);return R(i,t)?n:g(n,i,t)}function N(e,s,i,t=!1){if(!t&&u(s))throw new Error("Unable to convert from an angular unit to a linear unit.");const n=fe(s);return n!==i&&(e=n?F(e,n,i):F(e*=ce(s),"meters",i)),e}function O(e,s,i,t=!1){if(!t&&u(i))throw new Error("Unable to convert from a linear unit to an angular unit.");const n=fe(i);return s!==n&&(e=n?F(e,s,n):F(e,s,"meters")/ce(i)),e}function J(e){switch(e){case"metric":return"meters";case"imperial":return"feet";default:return e}}function T(e){return J(e)}function V(e){switch(e){case"metric":return"square-meters";case"imperial":return"square-feet";default:return e}}function K(e){switch(e){case"metric":return"cubic-meters";case"imperial":return"cubic-feet";default:return e}}function L(e,s,i){switch(i){case"metric":return G(e,s);case"imperial":return Y(e,s);default:return i}}function A(e,s,i){switch(i){case"metric":return H(e,s);case"imperial":return $(e,s);default:return i}}function G(e,s){const i=F(e,s,"meters");return Math.abs(i)<3e3?"meters":"kilometers"}function H(e,s){const i=F(e,s,"meters");return Math.abs(i)<1e5?"meters":"kilometers"}function Y(e,s){const i=F(e,s,"feet");return Math.abs(i)<1e3?"feet":"miles"}function $(e,s){const i=F(e,s,"feet");return Math.abs(i)<1e5?"feet":"miles"}function z(e,s){const i=F(e,s,"square-meters");return Math.abs(i)<3e6?"square-meters":"square-kilometers"}function Q(e,s){const i=F(e,s,"square-feet");return Math.abs(i)<1e6?"square-feet":"square-miles"}function X(e,s,i){switch(i){case"metric":return z(e,s);case"imperial":return Q(e,s);default:return i}}function Z(e,s){const i=F(e,s,"cubic-meters");return Math.abs(i)<3e8?"cubic-meters":"cubic-kilometers"}function ee(e,s){const i=F(e,s,"cubic-feet");return Math.abs(i)<1e8?"cubic-feet":"cubic-miles"}function se(e,s,i){switch(i){case"metric":return Z(e,s);case"imperial":return ee(e,s);default:return i}}function ie(e,s,i){return F(e,s,"meters")/(i*Math.PI/180)}function te(e){return k.fromJSON(e.toLowerCase())||null}function ne(e){const i=(e?.latestVcsWkid?l.get(e.latestVcsWkid):null)??(e?.vcsWkid?l.get(e.vcsWkid):null);return i?i.unit.conversionFactor:null==e||s(e)?ue(e,!1)??1:1}function re(e){const s=(e?.latestVcsWkid?l.get(e.latestVcsWkid):null)??(e?.vcsWkid?l.get(e.vcsWkid):null);return s?te(s.unit.name):ae(e)}function ae(e){return ce(e)>=i(e).metersPerDegree?"meters":fe(e)}function ce(e,s=t.metersPerDegree){return ue(e,!0)??s}function ue(e,s=!1){const i=e?.wkid??null,t=e?.wkt2??e?.wkt??null;let u=null;if(i){if(a(i))return n.metersPerDegree;if(c(i))return r.metersPerDegree;u=U.values[U[i]],!u&&s&&B.has(i)&&(u=f)}else t&&(ke(t)?u=oe(d.exec(t),u):Be(t)&&(u=oe(b.exec(t),u)));return u}function le(e){return u(e)?1:ce(e)}function oe(e,s){return e?.[1]?me(e[1]):s}function me(e){return parseFloat(e.split(",")[1])}function fe(e){const s=e?.wkid??null,i=e?.wkt2??e?.wkt??null;let t=null;if(s)t=U.units[U[s]];else if(i){const e=ke(i)?d:Be(i)?b:null;if(e){const s=e.exec(i);s?.[1]&&(t=_e(s[1]))}}return null!=t?te(t):null}function de(e){const s=fe(e);return null!=s&&C.includes(s)?s:null}function Ue(e){const s=re(e);return null!=s&&C.includes(s)?s:null}function be(e){const s=fe(e);return null==s?null:P.get(s)}function Be(e){return/^GEOCCS/i.test(e)}function ke(e){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(e)}const he=1e-7;function _e(e){const s=/[\\"']([^\\"']+)/.exec(e);let i=s?.[1];if(!i||!te(i)){const s=me(e);i=null;const t=U.values;for(let e=0;e<t.length;++e)if(Math.abs(s-t[e])<he){i=U.units[e];break}}return i}function qe(e){const s=fe(e);if(null==s)return null;switch(s){case"feet":case"us-feet":case"clarke-feet":case"fathoms":case"nautical-miles":case"us-chains":case"us-links":case"us-miles":case"clarke-yards":case"clarke-chains":case"clarke-links":case"sears-yards":case"sears-feet":case"sears-chains":case"sears-links":case"benoit-1895-a-yards":case"benoit-1895-a-feet":case"benoit-1895-a-chains":case"benoit-1895-a-links":case"benoit-1895-b-yards":case"benoit-1895-b-feet":case"benoit-1895-b-chains":case"benoit-1895-b-links":case"1865-feet":case"indian-feet":case"indian-1937-feet":case"indian-1962-feet":case"indian-1975-feet":case"indian-yards":case"indian-1937-yards":case"indian-1962-yards":case"indian-1975-yards":case"statute-miles":case"gold-coast-feet":case"british-1936-feet":case"yards":case"chains":case"links":case"sears-1922-truncated-yards":case"sears-1922-truncated-feet":case"sears-1922-truncated-chains":case"sears-1922-truncated-links":case"us-yards":case"inches":case"us-inches":case"rods":case"us-rods":case"us-nautical-miles":case"uk-nautical-miles":case"smoots":case"tx-vara":case"points":return"imperial";case"millimeters":case"centimeters":case"meters":case"german-meters":case"kilometers":case"decimeters":case"micrometers":case"nanometers":case"50-kilometers":case"150-kilometers":return"metric"}return null}const ye={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},pe={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},ge={esriDUDecimalDegrees:"degrees",esriDURadians:"radians"},we=e()(ye),Me=e()(pe),ve=e()(ge);function Se(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-nautical-miles":return"nautical-miles";case"square-us-feet":return"us-feet";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";case"square-meters":return"meters";case"square-kilometers":return"kilometers"}throw new Error("unhandled area unit")}export{X as adaptiveAreaUnit,Q as adaptiveImperialAreaUnit,Y as adaptiveImperialLengthUnit,$ as adaptiveImperialVerticalLengthUnit,ee as adaptiveImperialVolumeUnit,L as adaptiveLengthUnit,z as adaptiveMetricAreaUnit,G as adaptiveMetricLengthUnit,H as adaptiveMetricVerticalLengthUnit,Z as adaptiveMetricVolumeUnit,A as adaptiveVerticalLengthUnit,se as adaptiveVolumeUnit,ve as angleUnitsJSONMap,be as areaUnitFromSpatialReference,we as areaUnitsJSONMap,j as baseUnitForUnit,I as baseUnitForUnitType,N as convertFromSpatialReferenceUnit,O as convertToSpatialReferenceUnit,F as convertUnit,V as defaultAreaUnit,J as defaultLengthUnit,T as defaultVerticalLengthUnit,K as defaultVolumeUnit,Se as deriveLengthUnitFromAreaUnit,qe as getDefaultUnitSystem,ae as getDefaultVerticalUnitStringForSR,le as getMetersPerCartesianUnitForSR,ue as getMetersPerUnit,ce as getMetersPerUnitForSR,ne as getMetersPerVerticalUnitForSR,fe as getUnitString,re as getVerticalUnitStringForSR,B as gradGcsIds,m as inchesPerMeter,R as isBaseUnit,x as isMeasurementSystem,ke as isProjectedWKT,ie as lengthToDegrees,de as lengthUnitFromSpatialReference,w as lengthUnits,Me as lengthUnitsJSONMap,D as measurementAreaUnits,C as measurementLengthUnits,E as measurementVolumeUnits,te as unitFromRESTJSON,W as unitType,Ue as verticalLengthUnitFromSpatialReference};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{removeUnordered as t}from"../core/arrayUtils.js";import{strict as r}from"../core/jsonMap.js";import{JSONSupport as i}from"../core/JSONSupport.js";import{unitFromRESTJSON as o
|
|
2
|
+
import{__decorate as e}from"tslib";import{removeUnordered as t}from"../core/arrayUtils.js";import{strict as r}from"../core/jsonMap.js";import{JSONSupport as i}from"../core/JSONSupport.js";import{unitFromRESTJSON as o}from"../core/units.js";import s from"../core/Warning.js";import{property as n,subclass as a}from"../core/accessorSupport/decorators.js";import{vcsLookup as l}from"./support/vcsLookup.js";import{writer as c}from"../core/accessorSupport/decorators/writer.js";import{reader as h}from"../core/accessorSupport/decorators/reader.js";var d;const p=r()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),u=p.jsonValues.slice();t(u,"orthometric");const g=r()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=d=class extends i{constructor(e){super(e),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(e,t){super.read(e,t),"service"!==t?.origin&&"web-scene"!==t?.origin||(this.origin="service"===t.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(e,t,r){return p.write(e,t,r)}readHeightModel(e,t,r){const i=p.read(e);return i||(r?.messages&&r.messages.push(y(e,{context:r})),null)}readHeightUnit(e,t,r){const i=g.read(e);return i||(r?.messages&&r.messages.push(f(e,{context:r})),null)}readHeightUnitService(e,t,r){const i=o(e)||g.read(e);return i||(r?.messages&&r.messages.push(f(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new d({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static fromSpatialReference(e){const{latestVcsWkid:t,vcsWkid:r}=e;if(!r)return null;const i=(null!=t?l.get(t):null)??l.get(r);return i?new d({heightModel:0===i.type?"gravity-related-height":"ellipsoidal",heightUnit:o(i.unit.name),vertCRS:i.datum,origin:3,associatedSpatialReference:e}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new d;return t.read(e,{origin:"web-scene"}),t}};function f(e,t){return new s("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}function y(e,t){return new s("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}e([n()],m.prototype,"origin",void 0),e([n()],m.prototype,"associatedSpatialReference",void 0),e([n({type:p.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:u,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),e([c("web-scene","heightModel")],m.prototype,"writeHeightModel",null),e([h(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),e([n({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),e([h("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),e([h("service","heightUnit")],m.prototype,"readHeightUnitService",null),e([n({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),e([h("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=d=e([a("esri.geometry.HeightModelInfo")],m);export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{earth as n,mars as t,moon as r}from"./support/Ellipsoid.js";import{equals as e,isWKIDFromMars as i,isWKIDFromMoon as c,isValid as o}from"./support/spatialReferenceUtils.js";function u(n){return{wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${n.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`}}const S=u(n),T=u(t),G=u(r),I={wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${n.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`},p=T.wkt.toUpperCase(),s=G.wkt.toUpperCase();function E(e){if(null!=e&&o(e)){const n=e.wkid,o=e.wkt2??e.wkt;if(i(n))return t;const u=o?.toUpperCase();if(o&&u===p)return t;if(c(n)||u&&u===s)return r}return n}const f=Math.cos(Math.PI/16/16);function R(e){return i(e)?t:c(e)?r:n}function A(n){return e(n,S)}function O(n){return A(n)||e(n,T)||e(n,G)}function U(n){return!(H(n)||w(n))}function H(n){return i(n?.wkid)||e(n,T)}function w(n){return c(n?.wkid)||e(n,G)}export{S as SphericalECEFSpatialReferenceLike,T as SphericalPCPFMarsLike,G as SphericalPCPFMoonLike,I as WGS84ECEFSpatialReferenceLike,E as getReferenceEllipsoid,R as getReferenceEllipsoidFromWKID,U as isEarth,H as isMars,w as isMoon,A as isSphericalECEF,O as isSphericalPCPF,f as radiusModifier};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../core/Error.js";import t from"../HeightModelInfo.js";import{parse as
|
|
2
|
+
import e from"../../core/Error.js";import{getDefaultVerticalUnitStringForSR as t}from"../../core/units.js";import n from"../HeightModelInfo.js";import{parse as i}from"../../layers/support/arcgisLayerUrl.js";function a(n,i){if(!n)return null;if(!s(n))return new e("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:n});const a=n.heightUnit,r=t(i);return a!==r?new e("webscene:incompatible-height-unit",`The vertical units of the scene (${a}) must match the horizontal units of the scene (${r})`,{verticalUnit:a,horizontalUnit:r}):null}function r(n,i,a){const r=h(n),s=i,l=o(r,s,a);if(r){const i=t(n.spatialReference);if(!a&&i!==r.heightUnit){const t=new e("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${i})`,{horizontalUnit:i});return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:r,error:t})}}if(!c(n)||4===l)return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:r});switch(l){case 1:{const t=r?.heightUnit||"unknown",n=s?.heightUnit||"unknown",i=new e("layerview:incompatible-height-unit",`The vertical units of the layer (${t}) must match the vertical units of the scene (${n})`,{layerUnit:t,sceneUnit:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:r,sceneHeightModelInfo:s,error:i})}case 2:{const t=r?.heightModel||"unknown",n=s?.heightModel||"unknown",i=new e("layerview:incompatible-height-model",`The height model of the layer (${t}) must match the height model of the scene (${n})`,{layerHeightModel:t,sceneHeightModel:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:r,sceneHeightModelInfo:s,error:i})}case 3:{const t=r?.vertCRS||"unknown",n=s?.vertCRS||"unknown",i=new e("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${t}) must match the vertical datum of the scene (${n})`,{layerDatum:t,sceneDatum:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:r,sceneHeightModelInfo:s,error:i})}}return null}function o(e,t,n){if(!s(e)||!s(t))return 4;if(null==e||null==t)return 0;if(!n&&e.heightUnit!==t.heightUnit)return 1;if(e.heightModel!==t.heightModel)return 2;switch(e.heightModel){case"gravity-related-height":return 0;case"ellipsoidal":return e.vertCRS===t.vertCRS?0:3;default:return 4}}function s(e){return null==e||null!=e.heightModel&&null!=e.heightUnit}function c(e){return"heightModelInfo"in e&&null!=e.heightModelInfo||null!=e.spatialReference||!g(e)}function l(e){const t=e.url?i(e.url):void 0,n=e.spatialReference?.vcsWkid;return!(null==n&&null!=t&&"ImageServer"===t.serverType)&&u(e)&&e.heightModelInfo?e.heightModelInfo:null}function h(e,i){const a=l(e);if(a)return a;if(!g(e))return null;const r=i??e.spatialReference,o=r&&n.fromSpatialReference(r);if(o)return o;const s=t(r);return s?new n({heightModel:"gravity-related-height",heightUnit:s,origin:4,associatedSpatialReference:r}):null}function u(e){return"heightModelInfo"in e}function f(e){if("unknown"===e.type||!("capabilities"in e))return!1;switch(e.type){case"annotation-feature":case"catalog":case"catalog-footprint":case"csv":case"feature":case"dimension-feature":case"geojson":case"subtype-group":case"ogc-feature":case"oriented-imagery":case"wfs":case"knowledge-graph-sublayer":return!0;default:return!1}}function g(e){return f(e)?!!(e.capabilities&&e.capabilities.data&&e.capabilities.data.supportsZ):m(e)}function d(e){return null!=e.layers||m(e)||f(e)||u(e)}function m(e){switch(e.type){case"annotation-feature":case"building-scene":case"elevation":case"gaussian-splat":case"integrated-mesh":case"integrated-mesh-3dtiles":case"point-cloud":case"scene":case"voxel":return!0;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"catalog":case"catalog-footprint":case"catalog-dynamic-group":case"csv":case"dimension":case"dimension-feature":case"geojson":case"feature":case"subtype-group":case"geospatial-pdf":case"geo-rss":case"graphics":case"group":case"imagery":case"imagery-tile":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-image":case"map-notes":case"media":case"ogc-feature":case"open-street-map":case"oriented-imagery":case"parquet":case"route":case"stream":case"tile":case"unknown":case"unsupported":case"vector-tile":case"video":case"viewshed":case"wcs":case"web-tile":case"wfs":case"wms":case"wmts":case null:return!1}return!1}export{h as deriveHeightModelInfoFromLayer,l as getLayerHeightModelInfo,o as isCompatible,r as rejectLayerError,d as supportsHeightModelInfo,a as validateWebSceneError};
|
package/interfaces.d.ts
CHANGED
|
@@ -1100,6 +1100,7 @@ declare namespace __esri {
|
|
|
1100
1100
|
getSourceLayerFromBuildingComponentSublayerGraphic: typeof import("./applications/SceneViewer/sceneViewerUtils.js").getSourceLayerFromBuildingComponentSublayerGraphic;
|
|
1101
1101
|
setSourceLayerOfBuildingComponentSublayerGraphic: typeof import("./applications/SceneViewer/sceneViewerUtils.js").setSourceLayerOfBuildingComponentSublayerGraphic;
|
|
1102
1102
|
getColorWithEmissiveStrength: typeof import("./applications/SceneViewer/sceneViewerUtils.js").getColorWithEmissiveStrength;
|
|
1103
|
+
getBasemapTerrainTilingSchemeLocked: typeof import("./applications/SceneViewer/sceneViewerUtils.js").getBasemapTerrainTilingSchemeLocked;
|
|
1103
1104
|
}
|
|
1104
1105
|
|
|
1105
1106
|
export const sceneViewerUtils: sceneViewerUtils;
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.128",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
|
package/layers/ElevationLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import r from"../core/Error.js";import{releaseMaybe as i}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a,throwIfAborted as s}from"../core/promiseUtils.js";import{objectToQuery as l}from"../core/urlUtils.js";import{property as p,subclass as n}from"../core/accessorSupport/decorators.js";import c from"
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import r from"../core/Error.js";import{releaseMaybe as i}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a,throwIfAborted as s}from"../core/promiseUtils.js";import{objectToQuery as l}from"../core/urlUtils.js";import{property as p,subclass as n}from"../core/accessorSupport/decorators.js";import c from"./Layer.js";import{ArcGISCachedService as d}from"./mixins/ArcGISCachedService.js";import{ArcGISService as u}from"./mixins/ArcGISService.js";import{HeightModelInfoMixin as y}from"./mixins/HeightModelInfoMixin.js";import{OperationalLayer as h}from"./mixins/OperationalLayer.js";import{PortalLayer as m}from"./mixins/PortalLayer.js";import{url as v}from"./support/commonProperties.js";import f from"./support/ElevationTileData.js";import{acquireDecoder as w}from"./support/LercDecoder.js";import{reader as S}from"../core/accessorSupport/decorators/reader.js";let g=class extends(y(d(u(h(m(o(c))))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=w()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=i(this._lercDecoder)}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());if(!r)return{operations:{supportsTileMap:!1}};return{operations:{supportsTileMap:r.includes("tilemap")}}}get memoizedElevationQueryDependencies(){return[this.loadStatus,this.tileInfo,this.fullExtent,this.spatialReference]}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new r("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(a).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,i,o,a){const s=a?.signal,l={responseType:"array-buffer",signal:s,useQueue:a?.useQueue,priority:a?.priority},p={noDataValue:a?.noDataValue,returnFileInfo:!0};await this.load(),await this._fetchTileAvailability(e,i,o,a);const n=await t(this.getTileUrl(e,i,o),l),c=await this._lercDecoder.decode(n.data,p,s);if(!c)throw new r("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new f({values:c.pixelData,width:c.width,height:c.height,noDataValue:c.noDataValue})}getTileUrl(e,t,r){const i=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,o=l({...this.parsedUrl.query,blankTile:!i&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${o?"?"+o:""}`}async queryElevation(e,t){const{query:r}=await(import("./support/ElevationQuery.js"));return s(t),r(this,e,t)}async createElevationSampler(e,t){const{createSampler:r}=await(import("./support/ElevationQuery.js"));return s(t),r(this,e,t)}_fetchTileAvailability(e,t,r,i){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,i):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const r={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await t(this.parsedUrl.path,r);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[j]}};e([p({readOnly:!0})],g.prototype,"capabilities",void 0),e([S("service","capabilities",["capabilities"])],g.prototype,"readCapabilities",null),e([p({json:{read:{source:"copyrightText"}}})],g.prototype,"copyright",void 0),e([p({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],g.prototype,"path",void 0),e([p({type:["show","hide"]})],g.prototype,"listMode",void 0),e([p({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],g.prototype,"minScale",void 0),e([p({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],g.prototype,"maxScale",void 0),e([p({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],g.prototype,"opacity",void 0),e([p({type:["ArcGISTiledElevationServiceLayer"]})],g.prototype,"operationalLayerType",void 0),e([p()],g.prototype,"sourceJSON",void 0),e([p({json:{read:!1},value:"elevation",readOnly:!0})],g.prototype,"type",void 0),e([p()],g.prototype,"memoizedElevationQueryDependencies",null),e([p(v)],g.prototype,"url",void 0),e([p()],g.prototype,"version",void 0),e([S("version",["currentVersion"])],g.prototype,"readVersion",null),g=e([n("esri.layers.ElevationLayer")],g);const j=Symbol("default-fetch-tile");g.prototype.fetchTile[j]=!0;const T=g;export{T as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../core/Error.js";import{setDeepValue as i}from"../core/object.js";import{property as r,subclass as o}from"../core/accessorSupport/decorators.js";import a from"../geometry/SpatialReference.js";import n from"../graphic/OrientedImageryGraphicOrigin.js";import s from"./FeatureLayer.js";import{getEffectiveElevationSource as p,parseSequenceOrderFields as l,orientedImageryTypeMap as d,timeIntervalUnitTypeMap as y,verticalMeasurementTypeMap as m,isOrientationAccuracy as u,padAccuracyArray as c}from"./orientedImagery/core/utils.js";import h from"./support/Field.js";import
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../core/Error.js";import{setDeepValue as i}from"../core/object.js";import{property as r,subclass as o}from"../core/accessorSupport/decorators.js";import a from"../geometry/SpatialReference.js";import n from"../graphic/OrientedImageryGraphicOrigin.js";import s from"./FeatureLayer.js";import{getEffectiveElevationSource as p,parseSequenceOrderFields as l,orientedImageryTypeMap as d,timeIntervalUnitTypeMap as y,verticalMeasurementTypeMap as m,isOrientationAccuracy as u,padAccuracyArray as c}from"./orientedImagery/core/utils.js";import h from"./support/Field.js";import g from"../tables/AttributeTableTemplate.js";import f from"../time/TimeExtent.js";const v=new Set(["demPathPrefix","demPathSuffix","depthImagePathPrefix","depthImagePathSuffix","elevationSource","horizontalMeasurementUnit","imageGeometryField","imageReferenceField","referenceIDField","sequenceOrderField","sequenceOrderFields","verticalMeasurementUnit","videoPathPrefix","videoPathSuffix","timeAnimation","visibilityTimeExtent"]),S=new Set(["elevationSource"]),P=(e,t)=>!v.has(t)&&e,j=(e,t,i)=>{const r=`orientedImageryProperties.${e}`,o={allowNull:S.has(e),ignoreOrigin:!0};return{name:r,write:t?{...o,target:r,writer:t}:o,read:i?{ignoreOrigin:!0,source:r,reader:i}:{ignoreOrigin:!0}}};function I(e,t,i,r){const{name:o,write:a,read:n}=j(e,t,i),s={name:o,write:a,read:n,origins:{service:{name:`orientedImageryInfo.${o}`,write:t,read:i},"web-scene":{name:o,write:P(a,e),read:P(n,e)},"web-map":{name:o,write:a,read:n}}};return r&&s.origins?(s.type=r,s.origins["web-map"].type=r,s.origins["web-scene"].type=r,s):s}function O(e,t,r){e?.length&&i(r,e,t)}let b=class extends s{constructor(e){super(e),this.attributeTableTemplate=null,this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.graphicOrigin=new n(this),this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imageGeometryField="ImageGeometry",this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageReferenceField="OIObjectID",this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.referenceIDField="OBJECTID",this.sequenceOrderField="SequenceOrder",this.sequenceOrderFields=[],this.subtypeField=null,this.subtypes=null,this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit="days",this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.verticalSearchRange=null,this.videoPathPrefix=null,this.videoPathSuffix=null,this.virtualCacheDirectory=null,this.dataStoreID=null,this.imageAccessPaths=null,this.visibilityTimeExtent=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:i}=this;return p(e,t,i)}get effectiveSequenceOrderField(){const{sequenceOrderField:e,fields:t,sequenceOrderFields:i}=this;return l(e,t,i)}get fieldConfigurations(){return super.fieldConfigurations}set fieldConfigurations(e){super.fieldConfigurations=e}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}findFirstValidLayerId(e){return e.layers?.find(({type:e})=>!!e&&this.supportedSourceTypes.has(e))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new t("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};e([r({type:g,json:{write:!1,read:!1}})],b.prototype,"attributeTableTemplate",void 0),e([r({type:Number,json:I("cameraHeading")})],b.prototype,"cameraHeading",void 0),e([r({type:Number,json:I("cameraHeight")})],b.prototype,"cameraHeight",void 0),e([r({type:Number,json:I("cameraPitch")})],b.prototype,"cameraPitch",void 0),e([r({type:Number,json:I("cameraRoll")})],b.prototype,"cameraRoll",void 0),e([r({type:Number,json:I("coveragePercent")})],b.prototype,"coveragePercent",void 0),e([r({type:String,json:I("demPathPrefix")})],b.prototype,"demPathPrefix",void 0),e([r({type:String,json:I("demPathSuffix")})],b.prototype,"demPathSuffix",void 0),e([r({type:String,json:I("depthImagePathPrefix")})],b.prototype,"depthImagePathPrefix",void 0),e([r({type:String,json:I("depthImagePathSuffix")})],b.prototype,"depthImagePathSuffix",void 0),e([r({type:Object,json:I("elevationSource")})],b.prototype,"elevationSource",void 0),e([r({readOnly:!0})],b.prototype,"effectiveElevationSource",null),e([r({readOnly:!0})],b.prototype,"effectiveSequenceOrderField",null),e([r({type:Number,json:I("farDistance")})],b.prototype,"farDistance",void 0),e([r({type:[h]})],b.prototype,"fields",void 0),e([r()],b.prototype,"geometryType",void 0),e([r({readOnly:!0,clonable:!1})],b.prototype,"graphicOrigin",void 0),e([r({type:Number,json:I("horizontalFieldOfView")})],b.prototype,"horizontalFieldOfView",void 0),e([r({type:String,json:I("horizontalMeasurementUnit")})],b.prototype,"horizontalMeasurementUnit",void 0),e([r({type:String,json:{...I("imageGeometryField"),default:"ImageGeometry"}})],b.prototype,"imageGeometryField",void 0),e([r({type:String,json:I("imagePathPrefix")})],b.prototype,"imagePathPrefix",void 0),e([r({type:String,json:I("imagePathSuffix")})],b.prototype,"imagePathSuffix",void 0),e([r({type:String,json:{...I("imageReferenceField"),default:"OIObjectID"}})],b.prototype,"imageReferenceField",void 0),e([r({type:Number,json:I("imageRotation")})],b.prototype,"imageRotation",void 0),e([r({type:Number,json:I("maximumDistance")})],b.prototype,"maximumDistance",void 0),e([r({type:Number,json:I("nearDistance")})],b.prototype,"nearDistance",void 0),e([r({type:["OrientedImageryLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],b.prototype,"operationalLayerType",void 0),e([r({json:{...I("orientationAccuracy",(e,t,r)=>{i(r,e.join(";"),t)},e=>{const t=e?.split(";")?.map(Number);return u(t)?c(t):[0,0,0,0,0,0,0,0]},String)}})],b.prototype,"orientationAccuracy",void 0),e([r({json:{...I("orientedImageryType",d.write,d.read,d.jsonValues.slice(1))}})],b.prototype,"orientedImageryType",void 0),e([r({type:String,json:{...I("referenceIDField"),default:"OBJECTID"}})],b.prototype,"referenceIDField",void 0),e([r({type:String,json:{...I("sequenceOrderField"),default:"SequenceOrder"}})],b.prototype,"sequenceOrderField",void 0),e([r({json:{...I("sequenceOrderFields",O),default:[]}})],b.prototype,"sequenceOrderFields",void 0),e([r({type:a})],b.prototype,"spatialReference",void 0),e([r({readOnly:!0})],b.prototype,"subtypeField",void 0),e([r({readOnly:!0})],b.prototype,"subtypes",void 0),e([r({json:{read:!1},value:"oriented-imagery",readOnly:!0})],b.prototype,"type",void 0),e([r({type:y.apiValues,json:{...I("timeIntervalUnit",y.write,y.read,y.jsonValues)}})],b.prototype,"timeIntervalUnit",void 0),e([r({type:Number,json:I("verticalFieldOfView")})],b.prototype,"verticalFieldOfView",void 0),e([r({type:m.apiValues,json:{...I("verticalMeasurementUnit",m.write,m.read,m.jsonValues)}})],b.prototype,"verticalMeasurementUnit",void 0),e([r({type:Number,json:I("verticalSearchRange")})],b.prototype,"verticalSearchRange",void 0),e([r({type:String,json:I("videoPathPrefix")})],b.prototype,"videoPathPrefix",void 0),e([r({type:String,json:I("videoPathSuffix")})],b.prototype,"videoPathSuffix",void 0),e([r({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.orientedImageryProperties.virtualCacheDirectory",read:!0}}}})],b.prototype,"virtualCacheDirectory",void 0),e([r({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.dsid",read:!0}}}})],b.prototype,"dataStoreID",void 0),e([r({type:Object,readOnly:!0,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.imageAccessPaths",read:!0}}}})],b.prototype,"imageAccessPaths",void 0),e([r({type:f,json:{origins:{"web-scene":{write:!1,read:!1}}}})],b.prototype,"visibilityTimeExtent",void 0),b=e([o("esri.layers.OrientedImageryLayer")],b);const x=b;export{x as default};
|
package/layers/ParquetLayer.d.ts
CHANGED
|
@@ -242,25 +242,35 @@ export interface ParquetLayerProperties extends LayerProperties, CustomParameter
|
|
|
242
242
|
* or rely on auto-detection, see the [geometryEncoding](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryEncoding) property.
|
|
243
243
|
*
|
|
244
244
|
* ParquetLayers may be created by either:
|
|
245
|
-
*
|
|
245
|
+
* #### Specifying the [data](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#data) for the Parquet files.
|
|
246
246
|
*
|
|
247
|
-
* The ParquetLayer can be loaded by setting its [data](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#data) property to file-backed data.
|
|
247
|
+
* The ParquetLayer can be loaded by setting its [data](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#data) property to file-backed data or portal item data.
|
|
248
248
|
* The following snippet shows how to add a new ParquetLayer to the map.
|
|
249
249
|
*
|
|
250
250
|
* ```js
|
|
251
|
-
* //
|
|
251
|
+
* // Create a parquet layer from multiple Parquet files
|
|
252
252
|
* const layer = new ParquetLayer({
|
|
253
253
|
* data: new ParquetFilesData({
|
|
254
254
|
* urls: [
|
|
255
|
-
* "
|
|
256
|
-
* "
|
|
255
|
+
* "https://example.com/path/to/parquetfile1.parquet",
|
|
256
|
+
* "https://example.com/path/to/parquetfile2.parquet"
|
|
257
257
|
* ]
|
|
258
258
|
* })
|
|
259
259
|
* });
|
|
260
260
|
* map.add(layer);
|
|
261
|
+
*
|
|
262
|
+
* // Create a parquet layer from arcgis online portal item
|
|
263
|
+
* const layer = new ParquetLayer({
|
|
264
|
+
* data: new ParquetPortalItemData({
|
|
265
|
+
* portalItem: {
|
|
266
|
+
* id: "6ab6f959c1684eb5a54db91644a89747",
|
|
267
|
+
* },
|
|
268
|
+
* }),
|
|
269
|
+
* });
|
|
270
|
+
* map.add(layer);
|
|
261
271
|
* ```
|
|
262
272
|
*
|
|
263
|
-
*
|
|
273
|
+
* #### Using the [getParquetLayerInfo()](https://developers.arcgis.com/javascript/latest/references/core/layers/support/parquetUtils/#getParquetLayerInfo)
|
|
264
274
|
*
|
|
265
275
|
* Use the [getParquetLayerInfo()](https://developers.arcgis.com/javascript/latest/references/core/layers/support/parquetUtils/#getParquetLayerInfo) method to
|
|
266
276
|
* retrieve information needed to create a parquet layer from the first Parquet file in the specified data source.
|
|
@@ -298,7 +308,6 @@ export interface ParquetLayerProperties extends LayerProperties, CustomParameter
|
|
|
298
308
|
* >
|
|
299
309
|
* > * The ParquetLayer is supported in a [Map component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/) or a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
|
|
300
310
|
* > * The ParquetLayer only supports geographic (WGS84) and Web Mercator spatial references.
|
|
301
|
-
* > * Time and date fields may be downgraded to numeric values.
|
|
302
311
|
* > * ParquetLayer supports the [orderByFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#orderByFields) query parameter for datasets containing up to 500,000 features.
|
|
303
312
|
*
|
|
304
313
|
* @beta
|
|
@@ -312,12 +321,11 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
|
|
|
312
321
|
/**
|
|
313
322
|
* @example
|
|
314
323
|
* const layer = new ParquetLayer({
|
|
315
|
-
* data: new
|
|
316
|
-
*
|
|
317
|
-
* "
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
* })
|
|
324
|
+
* data: new ParquetPortalItemData({
|
|
325
|
+
* portalItem: {
|
|
326
|
+
* id: "6ab6f959c1684eb5a54db91644a89747",
|
|
327
|
+
* },
|
|
328
|
+
* }),
|
|
321
329
|
* });
|
|
322
330
|
* mapElement.map.add(layer); // adds the layer to the map
|
|
323
331
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import s from"../../../core/Collection.js";import r from"../../../core/Error.js";import has from"../../../core/has.js";import{clone as a}from"../../../core/lang.js";import l from"../../../core/Logger.js";import{destroyMaybe as n,removeMaybe as o,abortMaybe as h}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,watch as m,syncAndInitial as f,sync as y}from"../../../core/reactiveUtils.js";import{sqlAnd as _}from"../../../core/sql.js";import{property as g,subclass as F}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as x}from"../../../core/support/UpdatingHandles.js";import{projectAsync as v}from"../../../geometry/projectionUtils.js";import{isHostedAgolService as w}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as D}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as C}from"../../support/layerUtils.js";import b from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as S,virtualSnapshotTileId as E,virtualDisplayFilterHighlightTileId as T}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as V}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as H}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as I}from"../../../views/3d/support/debugFlags.js";let L=class extends(u(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void l.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get snappingComplexityExceeded(){return this._tileFetcher?.snappingComplexityExceeded??!0}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===M.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){const e=this.context.effectiveDisplayFilter?.where||null,t=null!=e&&"1=1"!==e;return("tiles"!==this.mode||!t)&&(this._tileFetcher?.showsAllFeatures??!1)}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===M.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,s=i?.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&s){const t=this._approximateExtentSizeAtScale(e.minScale,s);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>M.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,s=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),r=t.levels[0];return s*((r.tileSize[0]/(r.scale/e)+r.tileSize[1]/(r.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new S(0,0,0,null,E);return new s([e])}const e=this.layerView.view.featureTiles;if(!e)return new s;const t=e.tiles;if(this.layerView.displayFilterEnabled&&null!=this.layerView.effectiveDisplayFilterClause&&"1=1"!==this.layerView.effectiveDisplayFilterClause&&this.layerView.highlightIds?.length>0){const e=new S(0,0,0,this.layerView.view.featureTiles?.tilingScheme,T);return new s([...t,e])}return t}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new x,this.serviceDataExtent=null,this.serviceDataCount=M.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add(()=>this.displayFeatureLimit,e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal))),this._updatingHandles.add(()=>this.mode,()=>this._modeChanged(),p),this._updatingHandles.add(()=>this.mode,(e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)},p),this.addResolvingPromise(Promise.resolve().then(()=>this._verifyCapabilities()).then(()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo())).then(()=>this._initializeTileFetcher()))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!C(e)?.operations.supportsQuery)throw new r("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=n(this._tileFetcher),this._tilesHandle=o(this._tilesHandle),this._lifeCycleAbortController=h(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const{layerView:t,tileDescriptors:i}=this,s=t.layer,r=new V({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=r,this._suspended?r.suspend():r.resume(),e&&this.addHandles(m(()=>e.quality,e=>r.memoryFactor=e,f));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(m(()=>this.layerView.view?.qualitySettings?.graphics3D?.[a],e=>r.lodFactor=e||1,p));const l=e=>{r.maximumNumberOfFeatures=e,r.useTileCount=this.serviceDataCount>e},o=e=>{r.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==s.type&&this._updatingHandles.add(()=>s.createQueryVersion,()=>this._dataFilterChanged()),this._updatingHandles.add(()=>this.layerView.effectiveDisplayFilter,()=>this._effectiveDisplayFilterChanged()),this._updatingHandles.add(()=>this.layerView.highlightIds,()=>this._displayFilterHighlightIdsChanged()),this._updatingHandles.add(()=>t.availableFields,(e,t)=>this._availableFieldsChanged(t,e)),this._updatingHandles.add(()=>t.requiredFields,(e,t)=>this._requiredFieldsChanged(t,e)),"customParameters"in s&&this._updatingHandles.add(()=>s.customParameters,()=>this.restart()),this.addHandles([s.on("apply-edits",e=>this._applyEdits(e)),m(()=>this.extent,e=>r.filterExtent=e,y),m(()=>this.tileDescriptors,e=>r.tileDescriptors=e,y),m(()=>this.maximumNumberOfFeatures,l,f),m(()=>this.serviceDataCount,o,f),m(()=>({featureTiles:e.featureTiles,show:I.FEATURE_TILE_FETCH_SHOW_TILES}),({show:t,featureTiles:i})=>{t&&r&&i?r.debugger??=new H(r,i.tilingScheme.toTileInfo(),e):r.debugger=n(r.debugger)},p)]),this._supportsExceedsLimitQuery||this._updatingHandles.add(()=>this.maxTotalSnapshotVertices,()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal)))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.enableFeatureTiles());break;default:l.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_effectiveDisplayFilterChanged(){"snapshot"!==this.mode&&this._refetch({resetForceTilesMode:!1})}_displayFilterHighlightIdsChanged(){"snapshot"!==this.mode&&null!=this._tileFetcher&&this._tileFetcher.refetchDisplayFilterHighlightTile()}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then(e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.consumePromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}}).catch(e=>{if(!d(e))throw e})}_availableFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new b({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=this.layerView,i=e.createQuery();return i.returnGeometry=!1,i.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),t.effectiveDisplayFilter&&(i.where=_(i.where,t.effectiveDisplayFilter.where)),i}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return w(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference)??null)}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,s=i.capabilities?.query.supportsExtent??!1,r=a(t.fullExtentInLocalViewSpatialReference),l=i.fullExtent,n=this._fullExtentIsAccurate(),o=this.serviceDataCount;if(s&&o<=M.maxFeatureCountForExtent&&(!r||!n)&&"queryExtent"in i){const t=this._createDataInfoQuery(),s=await i.queryExtent(t,{timeout:M.queryExtentTimeout,signal:e});this._set("serviceDataExtent",s.extent)}else if(r)this._set("serviceDataExtent",r);else if(null!=l){const e=l.spatialReference?await v(l,t.view.spatialReference):null;this._set("serviceDataExtent",e??null)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",M.noServiceDataCount);const s=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:M.queryStatisticsTimeout,signal:e}));if(!0===s.ok)this._set("serviceDataCount",s.value);else{if(d(s.error))throw s.error;this._set("serviceDataCount",M.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,s){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:r,averageSymbolComplexity:a}=e,{verticesPerFeature:l,verticesPerCoordinate:n}=a,o=l<=0,h=this._minimumNumberOfVerticesForGeometry>1;if(!o&&!h)return void(this._snapshotLimitExceeded=!1);0!==l&&null!=t&&await t;const u=Math.min(r,A),c=this.serviceDataCount,p=c!==M.noServiceDataCount;let m=p?Math.ceil((u-c*l)/(n||1)):Math.ceil(u/(n||1));if(h&&(m=Math.min(m,N)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:M.queryStatisticsTimeout,signal:s}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await D(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),s=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),r=s.then(()=>this._updateServiceDataExtent(t)).catch(e=>{d(e)||l.getLogger(this).error("#fetchServiceDataInfo()",e)}).then(()=>{r===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null});return e&&(this._fetchDataInfoPromise=r),this._fetchDataInfoAbortController=e,s.then(()=>{},()=>{})}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([g({readOnly:!0})],L.prototype,"type",void 0),e([g({constructOnly:!0})],L.prototype,"graphics",void 0),e([g({constructOnly:!0})],L.prototype,"layerView",void 0),e([g({constructOnly:!0})],L.prototype,"context",void 0),e([g({readOnly:!0})],L.prototype,"dataUpdating",null),e([g()],L.prototype,"extent",null),e([g()],L.prototype,"updating",null),e([g({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([g()],L.prototype,"updatingTotal",null),e([g()],L.prototype,"updatingRemaining",null),e([g()],L.prototype,"expectedFeatureDiff",null),e([g()],L.prototype,"memoryForUnusedFeatures",null),e([g()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([g()],L.prototype,"snappingComplexityExceeded",null),e([g({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([g({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([g()],L.prototype,"_snapshotLimitExceeded",void 0),e([g()],L.prototype,"displayFeatureLimit",void 0),e([g({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([g({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([g()],L.prototype,"_forceTilesMode",void 0),e([g({readOnly:!0})],L.prototype,"mode",null),e([g({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([g({readOnly:!0})],L.prototype,"tileDescriptors",null),e([g()],L.prototype,"_tileFetcher",void 0),e([g()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([F("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,A=1e6,q=12e3,j=1e4,N=5e6;function P(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}class M{static{this.noServiceDataCount=1/0}static{this.maxSnapshotMinScaleFactor=5}static reset(){M.maxFeatureCountForExtent=O,M.queryStatisticsTimeout=q,M.queryExtentTimeout=j}}M.reset();export{L as FeatureTileController3D,M as FeatureTileController3DConstants};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import s from"../../../core/Error.js";import has from"../../../core/has.js";import{clone as a}from"../../../core/lang.js";import l from"../../../core/Logger.js";import{destroyMaybe as o,removeMaybe as n,abortMaybe as h}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,watch as m,syncAndInitial as f,sync as y}from"../../../core/reactiveUtils.js";import{sqlAnd as _}from"../../../core/sql.js";import{property as g,subclass as F}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as x}from"../../../core/support/UpdatingHandles.js";import{projectAsync as v}from"../../../geometry/projectionUtils.js";import{isHostedAgolService as w}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as D}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as C}from"../../support/layerUtils.js";import b from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as S,virtualSnapshotTileId as E,virtualDisplayFilterHighlightTileId as T}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as V}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as H}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as I}from"../../../views/3d/support/debugFlags.js";let L=class extends(u(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void l.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get usedMemory(){return this._tileFetcher?.usedMemory??0}get usedMemoryPerFeature(){return this._tileFetcher?.usedMemoryPerFeature??0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get snappingComplexityExceeded(){return this._tileFetcher?.snappingComplexityExceeded??!0}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===N.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){const e=this.context.effectiveDisplayFilter?.where||null,t=null!=e&&"1=1"!==e;return("tiles"!==this.mode||!t)&&(this._tileFetcher?.showsAllFeatures??!1)}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===N.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,r=i?.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>N.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new S(0,0,0,null,E);return new r([e])}const e=this.layerView.view.featureTiles;if(!e)return new r;const t=e.tiles;if(this.layerView.displayFilterEnabled&&null!=this.layerView.effectiveDisplayFilterClause&&"1=1"!==this.layerView.effectiveDisplayFilterClause&&this.layerView.highlightIds?.length>0){const e=new S(0,0,0,this.layerView.view.featureTiles?.tilingScheme,T);return new r([...t,e])}return t}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new x,this.serviceDataExtent=null,this.serviceDataCount=N.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add(()=>this.displayFeatureLimit,e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal))),this._updatingHandles.add(()=>this.mode,()=>this._modeChanged(),p),this._updatingHandles.add(()=>this.mode,(e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)},p),this.addResolvingPromise(Promise.resolve().then(()=>this._verifyCapabilities()).then(()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo())).then(()=>this._initializeTileFetcher()))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!C(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=o(this._tileFetcher),this._tilesHandle=n(this._tilesHandle),this._lifeCycleAbortController=h(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const{layerView:t,tileDescriptors:i}=this,r=t.layer,s=new V({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=s,this._suspended?s.suspend():s.resume(),e&&this.addHandles(m(()=>e.quality,e=>s.memoryFactor=e,f));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(m(()=>this.layerView.view?.qualitySettings?.graphics3D?.[a],e=>s.lodFactor=e||1,p));const l=e=>{s.maximumNumberOfFeatures=e,s.useTileCount=this.serviceDataCount>e},n=e=>{s.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==r.type&&this._updatingHandles.add(()=>r.createQueryVersion,()=>this._dataFilterChanged()),this._updatingHandles.add(()=>this.layerView.effectiveDisplayFilter,()=>this._effectiveDisplayFilterChanged()),this._updatingHandles.add(()=>this.layerView.highlightIds,()=>this._displayFilterHighlightIdsChanged()),this._updatingHandles.add(()=>t.availableFields,(e,t)=>this._availableFieldsChanged(t,e)),this._updatingHandles.add(()=>t.requiredFields,(e,t)=>this._requiredFieldsChanged(t,e)),"customParameters"in r&&this._updatingHandles.add(()=>r.customParameters,()=>this.restart()),this.addHandles([r.on("apply-edits",e=>this._applyEdits(e)),m(()=>this.extent,e=>s.filterExtent=e,y),m(()=>this.tileDescriptors,e=>s.tileDescriptors=e,y),m(()=>this.maximumNumberOfFeatures,l,f),m(()=>this.serviceDataCount,n,f),m(()=>({featureTiles:e.featureTiles,show:I.FEATURE_TILE_FETCH_SHOW_TILES}),({show:t,featureTiles:i})=>{t&&s&&i?s.debugger??=new H(s,i.tilingScheme.toTileInfo(),e):s.debugger=o(s.debugger)},p)]),this._supportsExceedsLimitQuery||this._updatingHandles.add(()=>this.maxTotalSnapshotVertices,()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal)))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.enableFeatureTiles());break;default:l.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_effectiveDisplayFilterChanged(){"snapshot"!==this.mode&&this._refetch({resetForceTilesMode:!1})}_displayFilterHighlightIdsChanged(){"snapshot"!==this.mode&&null!=this._tileFetcher&&this._tileFetcher.refetchDisplayFilterHighlightTile()}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then(e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.consumePromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}}).catch(e=>{if(!d(e))throw e})}_availableFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new b({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=this.layerView,i=e.createQuery();return i.returnGeometry=!1,i.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),t.effectiveDisplayFilter&&(i.where=_(i.where,t.effectiveDisplayFilter.where)),i}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return w(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference)??null)}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=a(t.fullExtentInLocalViewSpatialReference),l=i.fullExtent,o=this._fullExtentIsAccurate(),n=this.serviceDataCount;if(r&&n<=N.maxFeatureCountForExtent&&(!s||!o)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:N.queryExtentTimeout,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=l){const e=l.spatialReference?await v(l,t.view.spatialReference):null;this._set("serviceDataExtent",e??null)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",N.noServiceDataCount);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:N.queryStatisticsTimeout,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(d(r.error))throw r.error;this._set("serviceDataCount",N.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,r){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:s,averageSymbolComplexity:a}=e,{verticesPerFeature:l,verticesPerCoordinate:o}=a,n=l<=0,h=this._minimumNumberOfVerticesForGeometry>1;if(!n&&!h)return void(this._snapshotLimitExceeded=!1);0!==l&&null!=t&&await t;const u=Math.min(s,A),c=this.serviceDataCount,p=c!==N.noServiceDataCount;let m=p?Math.ceil((u-c*l)/(o||1)):Math.ceil(u/(o||1));if(h&&(m=Math.min(m,j)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:N.queryStatisticsTimeout,signal:r}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await D(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),s=r.then(()=>this._updateServiceDataExtent(t)).catch(e=>{d(e)||l.getLogger(this).error("#fetchServiceDataInfo()",e)}).then(()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null});return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then(()=>{},()=>{})}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([g({readOnly:!0})],L.prototype,"type",void 0),e([g({constructOnly:!0})],L.prototype,"graphics",void 0),e([g({constructOnly:!0})],L.prototype,"layerView",void 0),e([g({constructOnly:!0})],L.prototype,"context",void 0),e([g({readOnly:!0})],L.prototype,"dataUpdating",null),e([g()],L.prototype,"extent",null),e([g()],L.prototype,"updating",null),e([g({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([g()],L.prototype,"updatingTotal",null),e([g()],L.prototype,"updatingRemaining",null),e([g()],L.prototype,"expectedFeatureDiff",null),e([g()],L.prototype,"usedMemory",null),e([g()],L.prototype,"usedMemoryPerFeature",null),e([g()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([g()],L.prototype,"snappingComplexityExceeded",null),e([g({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([g({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([g()],L.prototype,"_snapshotLimitExceeded",void 0),e([g()],L.prototype,"displayFeatureLimit",void 0),e([g({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([g({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([g()],L.prototype,"_forceTilesMode",void 0),e([g({readOnly:!0})],L.prototype,"mode",null),e([g({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([g({readOnly:!0})],L.prototype,"tileDescriptors",null),e([g()],L.prototype,"_tileFetcher",void 0),e([g()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([F("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,A=1e6,q=12e3,M=1e4,j=5e6;function P(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}class N{static{this.noServiceDataCount=1/0}static{this.maxSnapshotMinScaleFactor=5}static reset(){N.maxFeatureCountForExtent=O,N.queryStatisticsTimeout=q,N.queryExtentTimeout=M}}N.reset();export{L as FeatureTileController3D,N as FeatureTileController3DConstants};
|