@arcgis/core 5.0.0-next.55 → 5.0.0-next.57
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/Color.d.ts +12 -4
- package/Ground.js +1 -1
- package/applications/Components/SelectionOperation.d.ts +5 -0
- package/applications/Components/SketchTooltipControls.d.ts +5 -0
- package/applications/Components/actionUtils.d.ts +5 -0
- package/applications/Components/analysisUtils.d.ts +5 -0
- package/applications/Components/arcadeEditorUtils.d.ts +5 -0
- package/applications/Components/arcadeFeatureUtils.d.ts +5 -0
- package/applications/Components/basemapUtils.d.ts +5 -0
- package/applications/Components/drawUtils.d.ts +5 -0
- package/applications/Components/featureUtils.d.ts +5 -0
- package/applications/Components/fontUtils.d.ts +5 -0
- package/applications/Components/formatUtils.d.ts +5 -0
- package/applications/Components/getDefaultUnits.d.ts +5 -0
- package/applications/Components/gfxUtils.d.ts +5 -0
- package/applications/Components/imageryUtils.d.ts +5 -0
- package/applications/Components/layerOriginUtils.d.ts +5 -0
- package/applications/Components/layersEffectsJsonUtils.d.ts +5 -0
- package/applications/Components/previewSymbol2D.d.ts +5 -0
- package/applications/Components/reactiveUtils.d.ts +6 -0
- package/applications/Components/sanitizerUtils.d.ts +5 -0
- package/applications/Components/stringUtils.d.ts +6 -2
- package/applications/Components/styleUtils.d.ts +5 -0
- package/applications/Components/svgUtils.d.ts +5 -0
- package/applications/Components/testUtils.d.ts +5 -0
- package/applications/Components/viewUtils.d.ts +5 -0
- package/applications/Components/webStyleSymbolUtils.d.ts +5 -0
- package/applications/Excalibur/videoViewUtils.d.ts +5 -0
- package/applications/ExperienceBuilder/sketchUtils.d.ts +5 -0
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +10 -0
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +10 -0
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +11 -1
- package/applications/KnowledgeStudio/reshape.d.ts +5 -0
- package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +5 -0
- package/applications/MapViewer/layerUtils.d.ts +5 -0
- package/applications/MapViewer/mediaUtils.d.ts +5 -0
- package/applications/MapViewer/templateUtils.d.ts +5 -0
- package/applications/PortalApp/layerUtils.d.ts +5 -0
- package/applications/SceneViewer/colorUtils.d.ts +5 -0
- package/applications/SceneViewer/devEnvironmentUtils.d.ts +5 -0
- package/applications/SceneViewer/layerUtils.d.ts +5 -0
- package/applications/SceneViewer/sceneViewerUtils.d.ts +5 -0
- package/applications/SceneViewer/symbolUtils.d.ts +5 -0
- package/applications/Urban/meshUtils.d.ts +5 -0
- package/applications/WebEditor/sketchUtils.d.ts +5 -0
- package/arcade.d.ts +22 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/5340887a4a48bde3407a.js +1 -0
- package/assets/esri/core/workers/chunks/82ced9254b27707522ef.js +1 -0
- package/assets/esri/core/workers/chunks/8628bf45a33af786cd49.js +1 -0
- package/assets/esri/core/workers/chunks/{d63cf90d1356d1f10138.js → 8f4c480c418eba299c2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa92a7c11befbad8739f.js → b4f944ef6c174b20b619.js} +1 -1
- package/assets/esri/core/workers/chunks/c531c0e3d420a1be0ad2.js +316 -0
- package/assets/esri/core/workers/chunks/{14765f98b8ea447498a1.js → da2c41ac0f82f32013c1.js} +4 -4
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/ChapmanAtmosphere.glsl.js +5 -7
- package/chunks/HUDMaterial.glsl.js +1 -1
- package/chunks/LineCallout.glsl.js +2 -2
- package/chunks/Precipitation.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/vec32.js +1 -1
- package/config.d.ts +19 -1
- package/config.js +1 -1
- package/core/Error.d.ts +3 -4
- package/core/Error.js +1 -1
- package/core/Warning.js +1 -1
- package/core/accessorSupport/decorators.d.ts +11 -0
- package/core/accessorSupport/types.d.ts +2 -0
- package/core/has.js +1 -1
- package/core/lang.d.ts +6 -0
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/vec3.js +1 -1
- package/core/promiseUtils.d.ts +5 -0
- package/core/quantity.d.ts +5 -0
- package/core/reactiveUtils.d.ts +142 -0
- package/core/scheduling.d.ts +26 -5
- package/core/scheduling.js +1 -1
- package/core/sql/WhereClause.d.ts +2 -13
- package/core/sql/{WhereGrammar.d.ts → types.d.ts} +22 -1
- package/core/sql.d.ts +8 -0
- package/core/string.js +1 -1
- package/core/types.d.ts +30 -1
- package/core/units.d.ts +8 -0
- package/core/urlUtils.d.ts +7 -0
- package/core/workers/loaderConfig.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/core/workers.d.ts +26 -0
- package/form/elements/inputs.d.ts +55 -0
- package/form/elements.d.ts +43 -0
- package/geometry/coordinateFormatter.d.ts +33 -0
- package/geometry/geometryEngine.d.ts +16 -0
- package/geometry/operators/affineTransformOperator.d.ts +5 -0
- package/geometry/operators/alphaShapeOperator.d.ts +9 -0
- package/geometry/operators/areaOperator.d.ts +7 -0
- package/geometry/operators/autoCompleteOperator.d.ts +5 -0
- package/geometry/operators/boundaryOperator.d.ts +5 -0
- package/geometry/operators/bufferOperator.d.ts +11 -0
- package/geometry/operators/centroidOperator.d.ts +14 -0
- package/geometry/operators/clipOperator.d.ts +7 -0
- package/geometry/operators/containsOperator.d.ts +9 -0
- package/geometry/operators/convexHullOperator.d.ts +9 -0
- package/geometry/operators/crossesOperator.d.ts +7 -0
- package/geometry/operators/cutOperator.d.ts +18 -0
- package/geometry/operators/densifyOperator.d.ts +21 -0
- package/geometry/operators/differenceOperator.d.ts +7 -0
- package/geometry/operators/disjointOperator.d.ts +8 -0
- package/geometry/operators/distanceOperator.d.ts +8 -0
- package/geometry/operators/equalsOperator.d.ts +5 -0
- package/geometry/operators/extendOperator.d.ts +8 -0
- package/geometry/operators/generalizeOperator.d.ts +7 -0
- package/geometry/operators/geodesicBufferOperator.d.ts +13 -0
- package/geometry/operators/geodesicProximityOperator.d.ts +13 -0
- package/geometry/operators/geodeticAreaOperator.d.ts +11 -0
- package/geometry/operators/geodeticDensifyOperator.d.ts +12 -0
- package/geometry/operators/geodeticDistanceOperator.d.ts +14 -0
- package/geometry/operators/geodeticLengthOperator.d.ts +11 -0
- package/geometry/operators/geodeticUtilsOperator.d.ts +11 -0
- package/geometry/operators/graphicBufferOperator.d.ts +7 -0
- package/geometry/operators/integrateOperator.d.ts +9 -0
- package/geometry/operators/intersectionOperator.d.ts +7 -0
- package/geometry/operators/intersectsOperator.d.ts +9 -0
- package/geometry/operators/isNearOperator.d.ts +7 -0
- package/geometry/operators/labelPointOperator.d.ts +14 -0
- package/geometry/operators/lengthOperator.d.ts +7 -0
- package/geometry/operators/linesToPolygonsOperator.d.ts +5 -0
- package/geometry/operators/locateBetweenOperator.d.ts +10 -0
- package/geometry/operators/minimumBoundingCircleOperator.d.ts +13 -0
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +7 -0
- package/geometry/operators/offsetOperator.d.ts +44 -0
- package/geometry/operators/overlapsOperator.d.ts +7 -0
- package/geometry/operators/polygonOverlayOperator.d.ts +6 -0
- package/geometry/operators/polygonSlicerOperator.d.ts +5 -0
- package/geometry/operators/projectOperator.d.ts +41 -0
- package/geometry/operators/proximityOperator.d.ts +8 -0
- package/geometry/operators/relateOperator.d.ts +7 -0
- package/geometry/operators/reshapeOperator.d.ts +5 -0
- package/geometry/operators/shapePreservingProjectOperator.d.ts +27 -0
- package/geometry/operators/simplifyOGCOperator.d.ts +8 -0
- package/geometry/operators/simplifyOperator.d.ts +9 -0
- package/geometry/operators/support/geographicTransformationUtils.d.ts +11 -0
- package/geometry/operators/symmetricDifferenceOperator.d.ts +12 -0
- package/geometry/operators/touchesOperator.d.ts +7 -0
- package/geometry/operators/unionOperator.d.ts +7 -0
- package/geometry/operators/withinOperator.d.ts +9 -0
- package/geometry/support/geodesicUtils.d.ts +8 -0
- package/geometry/support/jsonUtils.d.ts +7 -0
- package/geometry/support/meshUtils.d.ts +5 -0
- package/geometry/support/normalizeUtils.d.ts +7 -0
- package/geometry/support/webMercatorUtils.d.ts +12 -0
- package/geometry.d.ts +38 -0
- package/interfaces.d.ts +31 -32
- package/intl.d.ts +111 -0
- package/kernel.d.ts +5 -0
- package/kernel.js +1 -1
- package/layers/BaseDynamicLayer.d.ts +1 -1
- package/layers/CSVLayer.d.ts +2 -2
- package/layers/CatalogLayer.d.ts +2 -2
- package/layers/FeatureLayer.d.ts +2 -1
- package/layers/GeoJSONLayer.d.ts +2 -1
- package/layers/ILyr3DWasmPerSceneView.js +1 -1
- package/layers/Layer.d.ts +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/OGCFeatureLayer.d.ts +1 -1
- package/layers/ParquetLayer.d.ts +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/SceneLayer.d.ts +2 -1
- package/layers/StreamLayer.d.ts +6 -5
- package/layers/SubtypeGroupLayer.d.ts +3 -4
- package/layers/VectorTileLayer.d.ts +1 -1
- package/layers/WFSLayer.d.ts +2 -1
- package/layers/WMSLayer.d.ts +2 -2
- package/layers/catalog/catalogUtils.d.ts +6 -0
- package/layers/ogc/wcsUtils.d.ts +6 -0
- package/layers/ogc/wfsUtils.d.ts +6 -0
- package/layers/orientedImagery/transformations/imageToWorld.d.ts +10 -0
- package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
- package/layers/orientedImagery/transformations/worldToImage.d.ts +10 -0
- package/layers/orientedImagery/types.d.ts +1 -1
- package/layers/support/arcadeUtils.d.ts +5 -0
- package/layers/support/csvUtils.d.ts +6 -0
- package/layers/support/fieldUtils.d.ts +9 -0
- package/layers/support/parquetUtils.d.ts +6 -0
- package/layers/support/rasterFunctionConstants.d.ts +9 -0
- package/layers/support/rasterFunctionUtils.d.ts +7 -0
- package/package.json +1 -1
- package/pointCloudRenderers.d.ts +44 -0
- package/popup/content.d.ts +48 -0
- package/rasterRenderers.d.ts +46 -0
- package/renderers/support/AuthoringInfo.d.ts +1 -1
- package/renderers/support/jsonUtils.d.ts +7 -0
- package/renderers/support/utils.d.ts +5 -0
- package/renderers/visualVariables/SizeVariable.d.ts +0 -3
- package/renderers/visualVariables/VisualVariable.d.ts +1 -1
- package/renderers/visualVariables/support/VisualVariableLegendOptions.d.ts +1 -1
- package/renderers.d.ts +46 -0
- package/request.d.ts +17 -0
- package/rest/closestFacility.d.ts +21 -0
- package/rest/featureService/utils.d.ts +5 -0
- package/rest/find.d.ts +21 -0
- package/rest/geometryService.d.ts +14 -0
- package/rest/geoprocessor.d.ts +16 -0
- package/rest/identify.d.ts +19 -0
- package/rest/imageService.d.ts +10 -0
- package/rest/knowledgeGraphService.d.ts +39 -0
- package/rest/lastMileDelivery.d.ts +12 -0
- package/rest/locator.d.ts +24 -0
- package/rest/networkService.d.ts +5 -0
- package/rest/networks/queryAssociations.d.ts +7 -0
- package/rest/networks/support/NetworkElement.d.ts +1 -1
- package/rest/networks/synthesizeAssociationGeometries.d.ts +7 -0
- package/rest/networks/trace.d.ts +6 -0
- package/rest/places.d.ts +34 -0
- package/rest/print.d.ts +74 -0
- package/rest/query.d.ts +33 -0
- package/rest/route.d.ts +18 -0
- package/rest/serviceArea.d.ts +18 -0
- package/rest/support/AreasAndLengthsParameters.d.ts +2 -2
- package/rest/support/AttachmentQuery.d.ts +0 -1
- package/rest/support/AttributeBinsQuery.d.ts +3 -3
- package/rest/support/AutoIntervalBinParameters.d.ts +4 -4
- package/rest/support/DateBinParameters.d.ts +2 -2
- package/rest/support/DateBinTimeInterval.d.ts +1 -1
- package/rest/support/DensifyParameters.d.ts +1 -1
- package/rest/support/DirectionsFeature.d.ts +1 -1
- package/rest/support/GPMessage.d.ts +1 -1
- package/rest/support/LastMileDeliveryParameters.d.ts +1 -1
- package/rest/support/QuantizationParameters.d.ts +3 -3
- package/rest/support/Query.d.ts +0 -1
- package/rest/support/QueryMixin.d.ts +1 -1
- package/rest/support/RelationshipQuery.d.ts +0 -1
- package/rest/support/interfaces.d.ts +1 -2
- package/rest/symbolService.d.ts +9 -0
- package/smartMapping/heuristics/binLevel.d.ts +12 -0
- package/smartMapping/heuristics/scaleRange.d.ts +15 -0
- package/smartMapping/heuristics/sizeRange.d.ts +12 -0
- package/smartMapping/labels/bins.d.ts +13 -0
- package/smartMapping/labels/clusters.d.ts +16 -0
- package/smartMapping/popup/clusters.d.ts +21 -0
- package/smartMapping/popup/templates.d.ts +18 -0
- package/smartMapping/raster/renderers/classBreaks.d.ts +7 -0
- package/smartMapping/raster/renderers/colormap.d.ts +7 -0
- package/smartMapping/raster/renderers/flow.d.ts +19 -0
- package/smartMapping/raster/renderers/rgb.d.ts +7 -0
- package/smartMapping/raster/renderers/shadedRelief.d.ts +7 -0
- package/smartMapping/raster/renderers/stretch.d.ts +7 -0
- package/smartMapping/raster/renderers/uniqueValue.d.ts +7 -0
- package/smartMapping/raster/renderers/vectorField.d.ts +20 -0
- package/smartMapping/raster/support/colorRamps.d.ts +7 -0
- package/smartMapping/raster/support/utils.d.ts +5 -0
- package/smartMapping/renderers/color.d.ts +17 -0
- package/smartMapping/renderers/dotDensity.d.ts +21 -0
- package/smartMapping/renderers/heatmap.d.ts +17 -0
- package/smartMapping/renderers/location.d.ts +10 -0
- package/smartMapping/renderers/opacity.d.ts +19 -0
- package/smartMapping/renderers/pieChart.d.ts +19 -0
- package/smartMapping/renderers/predominance.d.ts +27 -0
- package/smartMapping/renderers/relationship.d.ts +48 -0
- package/smartMapping/renderers/size.d.ts +18 -0
- package/smartMapping/renderers/support/rendererUtils.d.ts +8 -0
- package/smartMapping/renderers/support/spikeUtils.d.ts +6 -0
- package/smartMapping/renderers/type.d.ts +18 -0
- package/smartMapping/renderers/univariateColorSize.d.ts +29 -0
- package/smartMapping/statistics/classBreaks.d.ts +14 -0
- package/smartMapping/statistics/heatmapStatistics.d.ts +15 -0
- package/smartMapping/statistics/histogram.d.ts +17 -0
- package/smartMapping/statistics/predominantCategories.d.ts +6 -0
- package/smartMapping/statistics/summaryStatistics.d.ts +15 -0
- package/smartMapping/statistics/summaryStatisticsForAge.d.ts +8 -1
- package/smartMapping/statistics/support/ageUtils.d.ts +8 -0
- package/smartMapping/statistics/support/predominanceUtils.d.ts +8 -1
- package/smartMapping/statistics/types.d.ts +6 -1
- package/smartMapping/statistics/uniqueValues.d.ts +13 -0
- package/smartMapping/symbology/color.d.ts +8 -0
- package/smartMapping/symbology/dotDensity.d.ts +7 -0
- package/smartMapping/symbology/flow.d.ts +8 -0
- package/smartMapping/symbology/heatmap.d.ts +8 -0
- package/smartMapping/symbology/location.d.ts +8 -0
- package/smartMapping/symbology/pieChart.d.ts +7 -0
- package/smartMapping/symbology/predominance.d.ts +7 -0
- package/smartMapping/symbology/relationship.d.ts +7 -0
- package/smartMapping/symbology/size.d.ts +7 -0
- package/smartMapping/symbology/support/colorRamps.d.ts +7 -0
- package/smartMapping/symbology/type.d.ts +8 -0
- package/support/popupUtils.d.ts +5 -0
- package/support/revision.js +1 -1
- package/support/timeUtils.d.ts +9 -0
- package/symbols/CIMSymbol.d.ts +1 -1
- package/symbols/ExtrudeSymbol3DLayer.d.ts +2 -2
- package/symbols/FillSymbol3DLayer.d.ts +1 -1
- package/symbols/LineSymbol3DLayer.d.ts +2 -2
- package/symbols/ObjectSymbol3DLayer.d.ts +2 -2
- package/symbols/PathSymbol3DLayer.d.ts +2 -2
- package/symbols/TextSymbol.d.ts +2 -2
- package/symbols/support/Symbol3DFillMaterial.d.ts +1 -1
- package/symbols/support/Symbol3DFillMaterial.js +1 -1
- package/symbols/support/Symbol3DHalo.d.ts +8 -4
- package/symbols/support/Symbol3DHalo.js +1 -1
- package/symbols/support/cimConversionUtils.d.ts +9 -0
- package/symbols/support/cimSymbolUtils.d.ts +10 -0
- package/symbols/support/jsonUtils.d.ts +7 -0
- package/symbols/support/symbolUtils.d.ts +5 -0
- package/symbols.d.ts +59 -0
- package/tables/elements.d.ts +41 -0
- package/time/TimeExtent.d.ts +1 -1
- package/time/TimeInterval.d.ts +1 -1
- package/unionTypes.d.ts +5 -0
- package/versionManagement/utils.d.ts +5 -0
- package/versionManagement/versionAdapters/utils.d.ts +5 -0
- package/views/2d/MapViewConstraints.d.ts +18 -10
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
- package/views/2d/layers/support/RouteLayerWaypointVisualization.js +5 -0
- package/views/3d/analysis/DirectLineMeasurement/types.d.ts +5 -0
- package/views/3d/analysis/LineOfSight/types.d.ts +5 -0
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +1 -1
- package/views/3d/analysis/VolumeMeasurement/types.d.ts +5 -0
- package/views/3d/environment/ChapmanRaymarching.glsl.js +2 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +2 -2
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +8 -8
- package/views/3d/webgl.d.ts +6 -0
- package/views/BreakpointsOwner.d.ts +16 -16
- package/views/IBreakpointsOwner.d.ts +15 -15
- package/views/MapView.d.ts +1 -1
- package/views/PopupView.d.ts +2 -2
- package/views/SelectionManager.d.ts +1 -0
- package/views/SelectionManager.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.d.ts +6 -8
- package/views/analysis/AreaMeasurement/types.d.ts +6 -0
- package/views/analysis/DistanceMeasurement/types.d.ts +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileError.d.ts +4 -4
- package/views/analysis/ElevationProfile/types.d.ts +6 -0
- package/views/analysis/types.d.ts +5 -0
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/snapping/GridSnappingEngine.js +1 -1
- package/views/layers/BuildingSceneLayerView.d.ts +1 -1
- package/views/layers/LayerView.d.ts +1 -1
- package/views/support/colorUtils.d.ts +5 -0
- package/views/support/selectionUtils.js +1 -1
- package/webscene/types.d.ts +5 -0
- package/widgets/FeatureForm/FeatureFormViewModel.d.ts +2 -2
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/Features/FeaturesViewModel.d.ts +1 -1
- package/widgets/Home/HomeViewModel.d.ts +1 -1
- package/widgets/Locate/LocateViewModel.d.ts +2 -2
- package/widgets/Search/types.d.ts +5 -0
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/smartMapping/support/utils.d.ts +6 -0
- package/widgets/support/SelectionList/FeatureItem.js +1 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/widgets/support/symbolPreviewUtils.js +1 -1
- package/widgets/support/widget.d.ts +11 -0
- package/assets/esri/core/workers/chunks/0d1e8d5d9abee38e275e.js +0 -316
- package/assets/esri/core/workers/chunks/73c3ee2697265b0f7208.js +0 -1
- package/assets/esri/core/workers/chunks/cd2ea924cb91cdb6dde9.js +0 -1
- package/assets/esri/core/workers/chunks/d57577c02fb2932e8305.js +0 -1
- package/colorUtils.d.ts +0 -13
- package/core/Logger.d.ts +0 -29
- package/core/Message.d.ts +0 -2
- package/core/Message.js +0 -5
- package/core/accessorSupport/PropertyOrigin.d.ts +0 -2
- package/core/sql/sql92grammar.d.ts +0 -12
- package/core/string.d.ts +0 -3
- package/core/time.d.ts +0 -2
- package/core/timeUtils.d.ts +0 -2
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import i from"../request.js";import t from"../core/Accessor.js";import s from"../core/Logger.js";import{isAbortError as r}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{addFrameTask as n}from"../core/scheduling.js";import{property as o,subclass as l}from"../core/accessorSupport/decorators.js";import{isGeographic as d}from"../geometry/support/spatialReferenceUtils.js";import h from"../geometry/support/WKIDUnitConversion.js";import{wasmFailedToInit as _,invalidLayerView as y}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as u}from"./Lyr3DWorkerHandle.js";import{loadLyr3DMainWASM as c}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as g}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as m}from"../views/3d/layers/support/makeScheduleFunction.js";const w=3857,p=32662,b=4326,f=5773,v=115700;let D=class extends t{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._viewSR=null,this._lyr3DBusyCount=0,this._isTerrainReady=!1,this._hasLayerThatReplacesTerrain=!1,this._debugFlags=new Set,this._debugLevel=2,this._wasmNotLoaded="method requiring WASM was called when WASM isn't loaded",this._pulseTaskHandle=null,this._cameraElevationDirty=!0,this._debugFlags.add(0),this._debugFlags.add(1),this._debugFlags.add(2)}_debugLog(e,i,t,r=!0){if(this._debugFlags.has(e)&&this._debugLevel>=i){const e=r?`[js] ${t}`:`${t}`;0===i||1===i?s.getLogger(this).error(e):2===i&&s.getLogger(this).warn(e),s.getLogger(this).info(e)}}initialize(){this._debugLevel>2&&(s.getLogger(this).level="info"),this._debugLog(0,3,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([a(()=>this.view.state?.contentCamera,()=>this._updateWasmCamera()),a(()=>this.view.state?.contentCamera.relativeElevation,()=>{this._cameraElevationDirty=!0,this._markAllLayerViewsUpdating()})]),this._pulseTaskHandle=n({preRender:()=>this._pulseTask()})}destroy(){this._debugLog(0,3,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach(e=>{e.abortController.abort()}),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null);const e=this._workerHandle;e&&e.destroyWasm().then(()=>{this._workerHandle?.destroy(),this._workerHandle=null}),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}addLayerView(e){return this._lyr3DMain?this._addLayerView(e):(this._debugLog(0,1,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),{wasmLayerId:_})}removeLayerView(e){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;this._doRemoveLayerView(e);const i=this._layers.size;return 0===i&&(this._debugLog(0,3,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),i}getValidLayerViewCount(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;let e=0;return this._layers.forEach(i=>{i.layerView.wasmLayerId>=0&&++e}),e}setEnabled(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);if(t){this._lyr3DMain.set_enabled(e.wasmLayerId,i),t.needMemoryUsageUpdate=!0;const s=this._isUpdating(t);t.needFrame=!0,s||t.layerView.updatingFlagChanged()}}setLayerOffset(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,i)}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,i,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,i,t)}setMeshModifications(e,i,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const s=this._layers.get(e.wasmLayerId);if(s){const r=this._lyr3DMain._malloc(8*i.length),a=new Float64Array(this._lyr3DMain.HEAPF64.buffer,r,i.length);for(let e=0;e<i.length;++e)a[e]=i[e];this._lyr3DMain.set_mesh_modification_polygons(e.wasmLayerId,r,i.length,t),this._lyr3DMain._free(r);const n=this._isUpdating(s);s.needFrame=!0,n||s.layerView.updatingFlagChanged()}}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const i=this._layers.get(e);return!!i&&(i.outstandingJobCount>0||i.outstandingRenderableCount>0||i.needFrame||this._lyr3DBusyCount>0)}initializeWasm(e,i){return this._lyr3DMain?Promise.resolve():this.view.renderSpatialReference?(this._debugLog(0,3,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=c().then(t=>{this._lyr3DMain=t,this._lyr3DMainPromise=null;const s=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),r=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),a=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),n=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),o=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii");if(!this.view.renderSpatialReference)return void(this._lyr3DMain=null);this._viewSR=this.view.renderSpatialReference?.toJSON();const l="global"===this.view.viewingMode?5:3;if(5===l)this._viewSR.wkid=this._viewSR.latestWkid=b,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=f;else if(this.view.renderSpatialReference?.isWebMercator)this._viewSR.wkid=this._viewSR.latestWkid=w,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=f;else if(this.view.renderSpatialReference?.wkid===p)this._viewSR.wkid=this._viewSR.latestWkid=b,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=f;else if(!this._viewSR.latestVcsWkid&&!this._viewSR.vcsWkid){const e=this.view.heightModelInfo?.heightModel,i=!e||"gravity-related-height"===e;this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=i?f:v}return this._lyr3DMain.initialize_lyr3d_wasm(o,s,r,a,n,e,i,l,this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),Math.max(this._debugLevel,0))?(this._workerHandle=new u(m(this.view.resourceController)),this._workerHandle.promise?this._workerHandle.promise:void 0):(this._lyr3DMain=null,void this._debugLog(0,0,"Lyr3d Main WASM failed to initialize",!1))}).catch(e=>{this._debugLog(0,0,`Lyr3d WASM failed to download error = ${e}`,!1)})),this._lyr3DMainPromise):Promise.reject()}get isTerrainReady(){return this._isTerrainReady}setLodPixelThreshold(e,i){this._lyr3DMain?.set_lod_pixel_threshold(i);const t=this._layers.get(e.wasmLayerId);t&&(t.needFrame=!0)}_pulseTask(){if(this._lyr3DMain){if(this._cameraElevationDirty){const e=this.view.state?.contentCamera.relativeElevation;this._lyr3DMain.set_camera_elevation(e)}let e=0,i=0;this._layers.forEach(t=>{e+=t.layerView.usedMemory,i+=t.layerView.cachedMemory}),e/=1048576,i/=1048576;const t=this.view.resourceController.memoryController,s=t.usedMemory*t.maxMemory-e;this._lyr3DBusyCount=this._lyr3DMain.frame_pulse(t.memoryFactor,e,i,s,t.maxMemory),this._layers.forEach(e=>{this._cameraElevationDirty||(e.needFrame=!1),e.layerView.updatingFlagChanged()}),this._hasLayerThatReplacesTerrain&&!this._isTerrainReady&&(this._isTerrainReady=this._lyr3DMain.is_terrain_ready(),this._isTerrainReady&&this.notifyChange("isTerrainReady")),this._cameraElevationDirty=!1}}_isUpdating(e){return e.outstandingJobCount>0||e.outstandingRenderableCount>0||e.needFrame||this._lyr3DBusyCount>0}_incrementJobCount(e){const i=this._isUpdating(e);e.outstandingJobCount+=1,i||e.layerView.updatingFlagChanged()}_decrementJobCount(e){const i=this._isUpdating(e);e.outstandingJobCount-=1;i!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount+=1,i||e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount-=1;i!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_onJobFailed(e,i,t){i.error.length&&this._debugLog(1,1,i.error,!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(t.jobId,t.desc),this._decrementJobCount(e)}_onJobSucceeded(e,i,t){if(this._lyr3DMain){if(e.layerView.destroyed)return void this._lyr3DMain.on_job_failed(t.jobId,t.desc);const s=i.data.byteLength,r=this._lyr3DMain._malloc(s);new Uint8Array(this._lyr3DMain.HEAPU8.buffer,r,s).set(i.data),this._lyr3DMain.on_job_completed(t.jobId,i.jobDescJson,r,s),this._lyr3DMain._free(r)}this._decrementJobCount(e)}_getRequestPromises(e,t,s,r){const a=[];for(const n of e){const e=new URL(n);if("integrated-mesh-3dtiles"===r.type){if(e.origin===s.origin&&e.pathname===s.pathname){if(r.rootTileset){a.push(Promise.resolve(r.rootTileset.slice()));continue}}else r.session&&e.searchParams.append("session",r.session)}a.push(i(e.toString(),t).then(e=>e.data))}return a}_getInitialPromise(e,i,t,s,a,n,o){const l=this._getRequestPromises(e.urls,i,t,s);return Promise.all(l).then(e=>(a.inputs=e,this._workerHandle.invoke(a,n))).then(e=>e).catch(i=>{let t=1;return r(i)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):o&&400===i.details?.httpStatus?(t=3,this._debugLog(1,2,"Session expired, trying to create new Session.")):this._debugLog(1,1,`job ${e.jobId} failed with error ${i}.`),{status:t,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}})}async _onNewJob(){const e=this._lyr3DMain.get_next_job(),i=this._layers.get(e.layerId);if(!i)return;this._incrementJobCount(i);const t=i.abortController.signal,s=i.layerView.layer,a="integrated-mesh-3dtiles"===s.type?s.key:null,n="integrated-mesh-3dtiles"===s.type?s.session:null,o={responseType:"array-buffer",signal:t,query:{...i.customParameters,token:i.apiKey,key:a}},l={id:e.jobId,inputs:[],jobDescJson:e.desc.slice(),isMissingResourceCase:!1},d=new URL(s.url),h=a=>{if(1===a.status)this._onJobFailed(i,a,e);else if(0===a.status)this._onJobSucceeded(i,a,e);else if(2===a.status){const n=this._getRequestPromises(a.missingInputUrls,o,d,s);Promise.all(n).then(e=>{l.jobDescJson=a.jobDescJson,a.originalInputs?l.inputs=a.originalInputs:l.inputs=[],l.isMissingResourceCase=!0;for(const i of e)l.inputs.push(i);return this._workerHandle.invoke(l,t)}).then(t=>{1===t.status?this._onJobFailed(i,t,e):0===t.status&&this._onJobSucceeded(i,t,e)}).catch(t=>{this._decrementJobCount(i),r(t)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):this._debugLog(1,1,`job ${e.jobId} failed with error2 ${t}.`),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc)})}};try{const i=await this._getInitialPromise(e,o,d,s,l,t,n);if(3===i.status&&"integrated-mesh-3dtiles"===s.type){n===s.session&&null!==s.session&&await s.requestRootAndSession(t);h(await this._getInitialPromise(e,o,d,s,l,t,s.session))}else h(i)}catch(_){_&&this._debugLog(1,1,_.toString(),!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc),this._decrementJobCount(i)}}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),{meshData:i}=e;if(i.data&&i.data.byteLength>0){const e=i.data.slice();i.data=e}const t=this._layers.get(e.layerId);t&&(this._incrementRenderableCount(t),t.layerView.createRenderable(e).then(i=>{this._lyr3DMain?.on_renderable_created(!0,e.layerId,e.handle,i.memUsageBytes),this._decrementRenderableCount(t)}).catch(i=>{r(i)||this._debugLog(2,1,`createRenderable failed with error ${i}.`),this._lyr3DMain?.on_renderable_created(!1,e.layerId,e.handle,0),this._decrementRenderableCount(t)}))}_freeRenderables(e,i,t){if(t<1)return;const s=this._layers.get(e);if(!s)return;const r=s.layerView,a=[],n=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,t);for(let o=0;o<t;++o)a.push(n[o]);for(let o=0;o<t;++o)r.freeRenderable(a[o])}_setRenderableVisibility(e,i,t,s){if(s<1)return;const r=this._layers.get(e);if(!r)return;const a=r.layerView,n=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,s),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,t,s);for(let h=0;h<s;++h)n.push(l[h]),o.push(!!(1&d[h]));a.setRenderableVisibility(n,o,s)}_onWasmError(e,i,t,s){this._lyr3DMain&&this._debugLog(t,s,this._lyr3DMain.UTF8ToString(e,i),!1)}_doRemoveLayerView(e){const i=this._layers.get(e.wasmLayerId);return!!i&&(i.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._is3DTilesIMLayerView(e)&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!1,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")),this._layers.delete(e.wasmLayerId),!0)}_is3DTilesIMLayerView(e){return"integrated-mesh-3dtiles"===e.layer.type}_isGaussianSplatLayerView(e){return"gaussian-splat"===e.layer.type}_isGaussianSplatLayer(e){return"gaussian-splat"===e.type}_toWasmQuality(e){switch(e){case"low":return 1;case"medium":return 2;case"high":return 3}}_addLayerView(e){const i=e.layer;if(!i.url||!i.rootTilesetJSON)return{wasmLayerId:y};const t="integrated-mesh-3dtiles"===i.type?0:2,r=this._lyr3DMain.validate_root_tileset(JSON.stringify(i.rootTilesetJSON),t);if(0!==r.errorCode)return{wasmLayerId:y,check:r};const a=this._lyr3DMain.get_next_layer_id(),n=new AbortController;this._layers.set(a,{layerView:e,abortController:n,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:i.customParameters,apiKey:i.apiKey,needFrame:!0});const o=g(i.elevationInfo),l=this._toWasmQuality(this.view?.qualityProfile),_=e=>s.getLogger(this).error("add-spatial-reference-error","Error when adding SR:",e);let u=!1;if(this._isGaussianSplatLayerView(e)&&this._isGaussianSplatLayer(i)){let t=i.spatialReference;if(e.useEsriCrs&&i.esriCrsSpatialReference){t=i.esriCrsSpatialReference;const s=d(t);let r=1,a=1;!s&&t.wkid&&-1!==t.wkid&&(r=h.values[h[t.wkid]],a=e.metersPerVCSUnit),this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(t)),s,r,a).catch(_)}u=this._lyr3DMain.add_gaussian_splat_layer(l,i.url,a,o)}else this._is3DTilesIMLayerView(e)&&(u=this._lyr3DMain.add_3dtiles_layer(l,i.url,a,o,e.layer.replacesTerrain),u&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!0,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")));return u?(this._updateWasmCamera(),e.updatingFlagChanged(),{wasmLayerId:a}):(this._layers.delete(a),{wasmLayerId:y})}_updateWasmCamera(){const e=this.view.state?.contentCamera;if(!e||!this._lyr3DMain)return;const{eye:i,center:t,up:s,near:r,far:a,fovY:n}=e,o=[e.viewport[2],e.viewport[3]],l=e.width/e.height;this._lyr3DMain.set_camera_parameters({eye:i,center:t,up:s,near:r,far:a,fov:n,aspectRatio:l,viewport:o}),this._markAllLayerViewsUpdating()}_markAllLayerViewsUpdating(){this._layers.forEach(e=>{const i=this._isUpdating(e);e.needFrame=!0,i||e.layerView.updatingFlagChanged()})}_makeSRWasmSerializable(e){return{wkid:e?.wkid??-1,latestWkid:e?.latestWkid??-1,vcsWkid:e?.vcsWkid??-1,latestVcsWkid:e?.latestVcsWkid??-1,wkt:e?.wkt??""}}_cleanUpSR(e){return-1===e?.wkid&&e.latestWkid&&-1!==e.latestWkid?e.wkid=e.latestWkid:-1===e?.latestWkid&&e.wkid&&-1!==e.wkid&&(e.latestWkid=e.wkid),-1===e?.vcsWkid&&e.latestVcsWkid&&-1!==e.latestVcsWkid?e.vcsWkid=e.latestVcsWkid:-1===e?.latestVcsWkid&&e.vcsWkid&&-1!==e.vcsWkid&&(e.latestVcsWkid=e.vcsWkid),e}};e([o({constructOnly:!0})],D.prototype,"view",void 0),e([o({readOnly:!0})],D.prototype,"isTerrainReady",null),D=e([l("esri.layers.Lyr3DWasmPerSceneView")],D);const L=D;export{L as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import i from"../request.js";import t from"../core/Accessor.js";import s from"../core/Error.js";import r from"../core/Logger.js";import{createAbortError as a,isAborted as n,isAbortError as o}from"../core/promiseUtils.js";import{watch as l}from"../core/reactiveUtils.js";import{addFrameTask as d}from"../core/scheduling.js";import{property as h,subclass as _}from"../core/accessorSupport/decorators.js";import{isGeographic as y}from"../geometry/support/spatialReferenceUtils.js";import c from"../geometry/support/WKIDUnitConversion.js";import{wasmFailedToInit as u,elevQueriesFull as g,elevQueriesGenericFail as m,invalidLayerView as w}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as p}from"./Lyr3DWorkerHandle.js";import{loadLyr3DMainWASM as b}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as f}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as v}from"../views/3d/layers/support/makeScheduleFunction.js";const D=3857,M=32662,L=4326,k=5773,R=115700;let C=class extends t{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._viewSR=null,this._lyr3DBusyCount=0,this._isTerrainReady=!1,this._hasLayerThatReplacesTerrain=!1,this._elevationQueries=new Map,this._debugFlags=new Set,this._debugLevel=2,this._wasmNotLoaded="method requiring WASM was called when WASM isn't loaded",this._pulseTaskHandle=null,this._cameraElevationDirty=!0,this._debugFlags.add(0),this._debugFlags.add(1),this._debugFlags.add(2)}_debugLog(e,i,t,s=!0){if(this._debugFlags.has(e)&&this._debugLevel>=i){const e=s?`[js] ${t}`:`${t}`;0===i||1===i?r.getLogger(this).error(e):2===i&&r.getLogger(this).warn(e),r.getLogger(this).info(e)}}initialize(){this._debugLevel>2&&(r.getLogger(this).level="info"),this._debugLog(0,3,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([l(()=>this.view.state?.contentCamera,()=>this._updateWasmCamera()),l(()=>this.view.state?.contentCamera.relativeElevation,()=>{this._cameraElevationDirty=!0,this._markAllLayerViewsUpdating()})]),this._pulseTaskHandle=d({preRender:()=>this._pulseTask()})}destroy(){this._debugLog(0,3,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach(e=>{e.abortController.abort()}),this._elevationQueries.forEach((e,i)=>{this._lyr3DMain.cancel_elevation_query(i),e.rejectCallback(a())}),this._elevationQueries.clear(),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null);const e=this._workerHandle;e&&e.destroyWasm().then(()=>{this._workerHandle?.destroy(),this._workerHandle=null}),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}addLayerView(e){return this._lyr3DMain?this._addLayerView(e):(this._debugLog(0,1,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),{wasmLayerId:u})}removeLayerView(e){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;this._doRemoveLayerView(e);const i=this._layers.size;return 0===i&&(this._debugLog(0,3,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),i}getValidLayerViewCount(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;let e=0;return this._layers.forEach(i=>{i.layerView.wasmLayerId>=0&&++e}),e}setEnabled(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);if(t){this._lyr3DMain.set_enabled(e.wasmLayerId,i),t.needMemoryUsageUpdate=!0;const s=this._isUpdating(t);t.needFrame=!0,s||t.layerView.updatingFlagChanged()}}setLayerOffset(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,i)}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,i,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,i,t)}setMeshModifications(e,i,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const s=this._layers.get(e.wasmLayerId);if(s){const r=this._lyr3DMain._malloc(8*i.length),a=new Float64Array(this._lyr3DMain.HEAPF64.buffer,r,i.length);for(let e=0;e<i.length;++e)a[e]=i[e];this._lyr3DMain.set_mesh_modification_polygons(e.wasmLayerId,r,i.length,t),this._lyr3DMain._free(r);const n=this._isUpdating(s);s.needFrame=!0,n||s.layerView.updatingFlagChanged()}}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const i=this._layers.get(e);return!!i&&(i.outstandingJobCount>0||i.outstandingRenderableCount>0||i.needFrame||this._lyr3DBusyCount>0)}initializeWasm(e,i){return this._lyr3DMain?Promise.resolve():this.view.renderSpatialReference?(this._debugLog(0,3,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=b().then(t=>{this._lyr3DMain=t,this._lyr3DMainPromise=null;const s=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),r=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),a=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),n=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),o=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii"),l=this._lyr3DMain.addFunction(this._onElevQueryComplete.bind(this),"vi");if(!this.view.renderSpatialReference)return void(this._lyr3DMain=null);this._viewSR=this.view.renderSpatialReference?.toJSON();const d="global"===this.view.viewingMode?5:3;if(5===d)this._viewSR.wkid=this._viewSR.latestWkid=L,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=k;else if(this.view.renderSpatialReference?.isWebMercator)this._viewSR.wkid=this._viewSR.latestWkid=D,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=k;else if(this.view.renderSpatialReference?.wkid===M)this._viewSR.wkid=this._viewSR.latestWkid=L,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=k;else if(!this._viewSR.latestVcsWkid&&!this._viewSR.vcsWkid){const e=this.view.heightModelInfo?.heightModel,i=!e||"gravity-related-height"===e;this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=i?k:R}return this._lyr3DMain.initialize_lyr3d_wasm(o,s,r,a,n,l,e,i,d,this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),Math.max(this._debugLevel,0))?(this._workerHandle=new p(v(this.view.resourceController)),this._workerHandle.promise?this._workerHandle.promise:void 0):(this._lyr3DMain=null,void this._debugLog(0,0,"Lyr3d Main WASM failed to initialize",!1))}).catch(e=>{this._debugLog(0,0,`Lyr3d WASM failed to download error = ${e}`,!1)})),this._lyr3DMainPromise):Promise.reject()}get isTerrainReady(){return this._isTerrainReady}setLodPixelThreshold(e,i){this._lyr3DMain?.set_lod_pixel_threshold(i);const t=this._layers.get(e.wasmLayerId);t&&(t.needFrame=!0)}queryElevation(e,i,t){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),Promise.reject();if(0===i.coordinates.length)return Promise.reject("no coordinates for elevation query");const s=2*i.coordinates.length,r=this._lyr3DMain._malloc(8*s),a=new Float64Array(this._lyr3DMain.HEAPF64.buffer,r,s);for(let h=0;h<i.coordinates.length;++h){const e=i.coordinates[h];a[2*h]=e.x,a[2*h+1]=e.y}const n=t?.maxGeometricError??0,o=this._lyr3DMain.create_elevation_query(e.wasmLayerId,n,r,s);if(this._lyr3DMain._free(r),o===g)return Promise.reject("max mesh elevation query limit exceeded");if(o===m)return Promise.reject("elevation query failed");const l={descriptor:i,signal:t?.signal,resolveCallback:null,rejectCallback:null},d=new Promise((e,i)=>{l.resolveCallback=e,l.rejectCallback=i});return this._elevationQueries.set(o,l),d}_checkForAbortedElevationQueries(){const e=[];this._elevationQueries.forEach((i,t)=>{n(i.signal)&&(this._lyr3DMain.cancel_elevation_query(t),i.rejectCallback(a()),e.push(t))});for(let i=0;i<e.length;++i)this._elevationQueries.delete(e[i])}_pulseTask(){if(this._lyr3DMain){if(this._cameraElevationDirty){const e=this.view.state?.contentCamera.relativeElevation;this._lyr3DMain.set_camera_elevation(e)}this._checkForAbortedElevationQueries();let e=0,i=0;this._layers.forEach(t=>{e+=t.layerView.usedMemory,i+=t.layerView.cachedMemory}),e/=1048576,i/=1048576;const t=this.view.resourceController.memoryController,s=t.usedMemory*t.maxMemory-e;this._lyr3DBusyCount=this._lyr3DMain.frame_pulse(t.memoryFactor,e,i,s,t.maxMemory),this._layers.forEach(e=>{this._cameraElevationDirty||(e.needFrame=!1),e.layerView.updatingFlagChanged()}),this._hasLayerThatReplacesTerrain&&!this._isTerrainReady&&(this._isTerrainReady=this._lyr3DMain.is_terrain_ready(),this._isTerrainReady&&this.notifyChange("isTerrainReady")),this._cameraElevationDirty=!1}}_isUpdating(e){return e.outstandingJobCount>0||e.outstandingRenderableCount>0||e.needFrame||this._lyr3DBusyCount>0}_incrementJobCount(e){const i=this._isUpdating(e);e.outstandingJobCount+=1,i||e.layerView.updatingFlagChanged()}_decrementJobCount(e){const i=this._isUpdating(e);e.outstandingJobCount-=1;i!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount+=1,i||e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount-=1;i!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_onJobFailed(e,i,t){i.error.length&&this._debugLog(1,1,i.error,!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(t.jobId,t.desc),this._decrementJobCount(e)}_onJobSucceeded(e,i,t){if(this._lyr3DMain){if(e.layerView.destroyed)return void this._lyr3DMain.on_job_failed(t.jobId,t.desc);const s=i.data.byteLength,r=this._lyr3DMain._malloc(s);new Uint8Array(this._lyr3DMain.HEAPU8.buffer,r,s).set(i.data),this._lyr3DMain.on_job_completed(t.jobId,i.jobDescJson,r,s),this._lyr3DMain._free(r)}this._decrementJobCount(e)}_getRequestPromises(e,t,s,r){const a=[];for(const n of e){const e=new URL(n);if("integrated-mesh-3dtiles"===r.type){if(e.origin===s.origin&&e.pathname===s.pathname){if(r.rootTileset){a.push(Promise.resolve(r.rootTileset.slice()));continue}}else r.session&&e.searchParams.append("session",r.session)}a.push(i(e.toString(),t).then(e=>e.data))}return a}_getInitialPromise(e,i,t,s,r,a,n){const l=this._getRequestPromises(e.urls,i,t,s);return Promise.all(l).then(e=>(r.inputs=e,this._workerHandle.invoke(r,a))).then(e=>e).catch(i=>{let t=1;return o(i)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):n&&400===i.details?.httpStatus?(t=3,this._debugLog(1,2,"Session expired, trying to create new Session.")):this._debugLog(1,1,`job ${e.jobId} failed with error ${i}.`),{status:t,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}})}async _onNewJob(){const e=this._lyr3DMain.get_next_job(),i=this._layers.get(e.layerId);if(!i)return;this._incrementJobCount(i);const t=i.abortController.signal,s=i.layerView.layer,r="integrated-mesh-3dtiles"===s.type?s.key:null,a="integrated-mesh-3dtiles"===s.type?s.session:null,n={responseType:"array-buffer",signal:t,query:{...i.customParameters,token:i.apiKey,key:r}},l={id:e.jobId,inputs:[],jobDescJson:e.desc.slice(),isMissingResourceCase:!1},d=new URL(s.url),h=r=>{if(1===r.status)this._onJobFailed(i,r,e);else if(0===r.status)this._onJobSucceeded(i,r,e);else if(2===r.status){const a=this._getRequestPromises(r.missingInputUrls,n,d,s);Promise.all(a).then(e=>{l.jobDescJson=r.jobDescJson,r.originalInputs?l.inputs=r.originalInputs:l.inputs=[],l.isMissingResourceCase=!0;for(const i of e)l.inputs.push(i);return this._workerHandle.invoke(l,t)}).then(t=>{1===t.status?this._onJobFailed(i,t,e):0===t.status&&this._onJobSucceeded(i,t,e)}).catch(t=>{this._decrementJobCount(i),o(t)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):this._debugLog(1,1,`job ${e.jobId} failed with error ${t}.`),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc)})}};try{const i=await this._getInitialPromise(e,n,d,s,l,t,a);if(3===i.status&&"integrated-mesh-3dtiles"===s.type){a===s.session&&null!==s.session&&await s.requestRootAndSession(t);h(await this._getInitialPromise(e,n,d,s,l,t,s.session))}else h(i)}catch(_){_&&this._debugLog(1,1,_.toString(),!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc),this._decrementJobCount(i)}}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),{meshData:i}=e;if(i.data&&i.data.byteLength>0){const e=i.data.slice();i.data=e}const t=this._layers.get(e.layerId);t&&(this._incrementRenderableCount(t),t.layerView.createRenderable(e).then(i=>{this._lyr3DMain?.on_renderable_created(!0,e.layerId,e.handle,i.memUsageBytes),this._decrementRenderableCount(t)}).catch(i=>{o(i)||this._debugLog(2,1,`createRenderable failed with error ${i}.`),this._lyr3DMain?.on_renderable_created(!1,e.layerId,e.handle,0),this._decrementRenderableCount(t)}))}_freeRenderables(e,i,t){if(t<1)return;const s=this._layers.get(e);if(!s)return;const r=s.layerView,a=[],n=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,t);for(let o=0;o<t;++o)a.push(n[o]);for(let o=0;o<t;++o)r.freeRenderable(a[o])}_setRenderableVisibility(e,i,t,s){if(s<1)return;const r=this._layers.get(e);if(!r)return;const a=r.layerView,n=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,s),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,t,s);for(let h=0;h<s;++h)n.push(l[h]),o.push(!!(1&d[h]));a.setRenderableVisibility(n,o,s)}_onWasmError(e,i,t,s){this._lyr3DMain&&this._debugLog(t,s,this._lyr3DMain.UTF8ToString(e,i),!1)}_onElevQueryComplete(e){const i=this._elevationQueries.get(e),t=this._lyr3DMain.get_elevation_query_result(e);if(i)if(t.succeeded&&t.zs){const s=t.zs.slice(),r=i.descriptor.clone();for(let e=0;e<s.length;++e)r.coordinates[e].z=s[e];this._debugLog(2,3,`Success EQ ${e}, number points ${s.length}.`),i.resolveCallback(r),this._elevationQueries.delete(e)}else i.rejectCallback(new s("elevation-query:error",t?.error??"Elevation query failed")),this._elevationQueries.delete(e);else this._debugLog(2,1,`_onElevQueryComplete called for unknown queryId ${e}.`)}_doRemoveLayerView(e){const i=this._layers.get(e.wasmLayerId);return!!i&&(i.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._is3DTilesIMLayerView(e)&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!1,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")),this._layers.delete(e.wasmLayerId),!0)}_is3DTilesIMLayerView(e){return"integrated-mesh-3dtiles"===e.layer.type}_isGaussianSplatLayerView(e){return"gaussian-splat"===e.layer.type}_isGaussianSplatLayer(e){return"gaussian-splat"===e.type}_toWasmQuality(e){switch(e){case"low":return 1;case"medium":return 2;case"high":return 3}}_addLayerView(e){const i=e.layer;if(!i.url||!i.rootTilesetJSON)return{wasmLayerId:w};const t="integrated-mesh-3dtiles"===i.type?0:2,s=this._lyr3DMain.validate_root_tileset(JSON.stringify(i.rootTilesetJSON),t);if(0!==s.errorCode)return{wasmLayerId:w,check:s};const a=this._lyr3DMain.get_next_layer_id(),n=new AbortController;this._layers.set(a,{layerView:e,abortController:n,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:i.customParameters,apiKey:i.apiKey,needFrame:!0});const o=f(i.elevationInfo),l=this._toWasmQuality(this.view?.qualityProfile),d=e=>r.getLogger(this).error("add-spatial-reference-error","Error when adding SR:",e);let h=!1;if(this._isGaussianSplatLayerView(e)&&this._isGaussianSplatLayer(i)){let t=i.spatialReference;if(e.useEsriCrs&&i.esriCrsSpatialReference){t=i.esriCrsSpatialReference;const s=y(t);let r=1,a=1;!s&&t.wkid&&-1!==t.wkid&&(r=c.values[c[t.wkid]],a=e.metersPerVCSUnit),this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(t)),s,r,a).catch(d)}h=this._lyr3DMain.add_gaussian_splat_layer(l,i.url,a,o)}else this._is3DTilesIMLayerView(e)&&(h=this._lyr3DMain.add_3dtiles_layer(l,i.url,a,o,e.layer.replacesTerrain),h&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!0,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")));return h?(this._updateWasmCamera(),e.updatingFlagChanged(),{wasmLayerId:a}):(this._layers.delete(a),{wasmLayerId:w})}_updateWasmCamera(){const e=this.view.state?.contentCamera;if(!e||!this._lyr3DMain)return;const{eye:i,center:t,up:s,near:r,far:a,fovY:n}=e,o=[e.viewport[2],e.viewport[3]],l=e.width/e.height;this._lyr3DMain.set_camera_parameters({eye:i,center:t,up:s,near:r,far:a,fov:n,aspectRatio:l,viewport:o}),this._markAllLayerViewsUpdating()}_markAllLayerViewsUpdating(){this._layers.forEach(e=>{const i=this._isUpdating(e);e.needFrame=!0,i||e.layerView.updatingFlagChanged()})}_makeSRWasmSerializable(e){return{wkid:e?.wkid??-1,latestWkid:e?.latestWkid??-1,vcsWkid:e?.vcsWkid??-1,latestVcsWkid:e?.latestVcsWkid??-1,wkt:e?.wkt??""}}_cleanUpSR(e){return-1===e?.wkid&&e.latestWkid&&-1!==e.latestWkid?e.wkid=e.latestWkid:-1===e?.latestWkid&&e.wkid&&-1!==e.wkid&&(e.latestWkid=e.wkid),-1===e?.vcsWkid&&e.latestVcsWkid&&-1!==e.latestVcsWkid?e.vcsWkid=e.latestVcsWkid:-1===e?.latestVcsWkid&&e.vcsWkid&&-1!==e.vcsWkid&&(e.latestVcsWkid=e.vcsWkid),e}};e([h({constructOnly:!0})],C.prototype,"view",void 0),e([h({readOnly:!0})],C.prototype,"isTerrainReady",null),C=e([_("esri.layers.Lyr3DWasmPerSceneView")],C);const S=C;export{S as default};
|
|
@@ -388,7 +388,7 @@ export default class OGCFeatureLayer extends OGCFeatureLayerSuperclass {
|
|
|
388
388
|
* > Screen size perspective is currently not optimized for situations where the camera is very near the ground, or for scenes
|
|
389
389
|
* > with visual elements located far from the ground surface. In these cases it may be better to turn off screen size perspective.
|
|
390
390
|
* > As screen size perspective changes the size based on distance to the camera, it should be set to false when using
|
|
391
|
-
* >
|
|
391
|
+
* > [size visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html).
|
|
392
392
|
*
|
|
393
393
|
* @default true
|
|
394
394
|
*/
|
package/layers/ParquetLayer.d.ts
CHANGED
|
@@ -437,7 +437,7 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
|
|
|
437
437
|
* An array of field names from the service to include with each feature.
|
|
438
438
|
* To fetch the values from all fields in the layer, use `["*"]`. Fields specified in
|
|
439
439
|
* `outFields` will be requested alongside with required fields for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ParquetLayer.html#renderer),
|
|
440
|
-
* [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ParquetLayer.html#labelingInfo)
|
|
440
|
+
* and [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ParquetLayer.html#labelingInfo) for the layer.
|
|
441
441
|
* The required fields and `outFields` are used to populate
|
|
442
442
|
* {@link views/layers/ParquetLayerView#availableFields}.
|
|
443
443
|
*
|
package/layers/RouteLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../config.js";import r from"../Graphic.js";import o from"../PopupTemplate.js";import i from"../core/Collection.js";import s from"../core/Error.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as l}from"../core/object.js";import{isAbortError as u}from"../core/promiseUtils.js";import{on as p}from"../core/reactiveUtils.js";import{convertUnit as c}from"../core/units.js";import{urlToObject as m}from"../core/urlUtils.js";import{property as y,subclass as f}from"../core/accessorSupport/decorators.js";import{updateOrigins as d}from"../core/accessorSupport/originUtils.js";import h from"../geometry/Extent.js";import g from"../geometry/Multipoint.js";import{initializeProjection as w,project as S}from"../geometry/projectionUtils.js";import b from"../geometry/SpatialReference.js";import{wgs84 as v}from"../geometry/support/spatialReferenceUtils.js";import B from"./Layer.js";import{BlendLayer as P}from"./mixins/BlendLayer.js";import{OperationalLayer as I}from"./mixins/OperationalLayer.js";import{PortalLayer as N}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{sanitizeUrl as D}from"./support/arcgisLayerUrl.js";import C from"./support/RouteSymbols.js";import _ from"../portal/Portal.js";import L from"../portal/PortalItem.js";import{typeKeyword as O}from"../portal/support/portalItemUtils.js";import{read as R}from"../renderers/support/jsonUtils.js";import{fetchServiceDescription as T}from"../rest/networkService.js";import{solve as A}from"../rest/route.js";import F from"../rest/support/DirectionLine.js";import k from"../rest/support/DirectionPoint.js";import x from"../rest/support/PointBarrier.js";import G from"../rest/support/PolygonBarrier.js";import J from"../rest/support/PolylineBarrier.js";import M from"../rest/support/RouteInfo.js";import E from"../rest/support/RouteParameters.js";import U from"../rest/support/RouteSettings.js";import W from"../rest/support/Stop.js";import{writer as q}from"../core/accessorSupport/decorators/writer.js";import{reader as V}from"../core/accessorSupport/decorators/reader.js";function Y(e){if(!e.length)return;const t=e.toArray(),r=t.map(({objectId:e})=>e).filter(e=>null!=e);let o=Math.max(...r,0);for(const i of t)i.objectId??=++o}function Z(e,t){return e.length===t.length&&z(e)&&z(t)}function z(e){return e.every(({objectId:e})=>null!=e)}function K(e,t){return!!e.length||!!t.length}function X(e){return e.length?e:null}function H(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:H("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:H("esriGeometryPolyline")}}}function Q(e){return"layers"in e}function $(e){return"esri.rest.support.FeatureSet"===e.declaredClass}function ee(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}function te(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.addedCost=r.addedCost,e.barrierType=r.barrierType,e.costs=r.costs,e.curbApproach=r.curbApproach,e.fullEdge=r.fullEdge,e.geometry=r.geometry,e.name=r.name,e.sideOfEdge=r.sideOfEdge,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol)}}function re(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}function oe(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}function ie(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.arriveCurbApproach=r.arriveCurbApproach,e.arriveTime=r.arriveTime,e.arriveTimeOffset=r.arriveTimeOffset,e.cumulativeCosts=r.cumulativeCosts,e.cumulativeDistance=r.cumulativeDistance,e.cumulativeDuration=r.cumulativeDuration,e.curbApproach=r.curbApproach,e.departCurbApproach=r.departCurbApproach,e.departTime=r.departTime,e.departTimeOffset=r.departTimeOffset,e.distanceToNetworkInMeters=r.distanceToNetworkInMeters,e.geometry=r.geometry,e.lateDuration=r.lateDuration,e.name=r.name,e.navLatency=r.navLatency,e.positionAlong=r.positionAlong,e.routeName=r.routeName,e.serviceCosts=r.serviceCosts,e.serviceDistance=r.serviceDistance,e.serviceDuration=r.serviceDuration,e.sequence=r.sequence,e.sideOfEdge=r.sideOfEdge,e.snapX=r.snapX,e.snapY=r.snapY,e.snapZ=r.snapZ,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol,e.timeWindowEnd=r.timeWindowEnd,e.timeWindowStart=r.timeWindowStart,e.violations=r.violations,e.waitDuration=r.waitDuration,e.wait=r.wait)}}async function se(e){const t=b.WGS84;return await w(e.spatialReference,t),S(e,t)}function ne(e,t){if(t&&e?.length&&!e.every(({symbol:e})=>!!e))for(const r of e)r.symbol=t}function ae(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function le(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:c(e,t,"meters")}function ue(e){const{attributes:t,geometry:r,popupTemplate:o,symbol:i}=e.toGraphic().toJSON();return{attributes:t,geometry:r,popupInfo:o,symbol:i}}const pe=i.ofType(F),ce=i.ofType(k),me=i.ofType(x),ye=i.ofType(G),fe=i.ofType(J),de=i.ofType(W);let he=class extends(P(j(I(N(a(B)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.checksum=null,this.defaultSymbols=new C,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new me,this.polygonBarriers=new ye,this.polylineBarriers=new fe,this.routeInfo=null,this.spatialReference=b.WGS84,this.stops=new de,this.type="route";const t=()=>{this._setStopSymbol(this.stops)},r=()=>{ne(this.pointBarriers,this.defaultSymbols.pointBarriers)},o=()=>{ne(this.polylineBarriers,this.defaultSymbols.polylineBarriers)},i=()=>{ne(this.polygonBarriers,this.defaultSymbols.polygonBarriers)};this.addHandles([p(()=>this.stops,"change",t,{sync:!0,onListenerAdd:t}),p(()=>this.pointBarriers,"change",r,{sync:!0,onListenerAdd:r}),p(()=>this.polylineBarriers,"change",o,{sync:!0,onListenerAdd:o}),p(()=>this.polygonBarriers,"change",i,{sync:!0,onListenerAdd:i})])}writeFeatureCollectionWebmap(e,t,r,o){const i=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter(e=>!!e),s=i.map((e,t)=>t),n="web-map"===o.origin?"featureCollection.layers":"layers";l(n,i,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",e=>F.fromGraphic(e))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",e=>k.fromGraphic(e))}get fullExtent(){const e=new h({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:b.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter(e=>null!=e.geometry);if(t.length<2)return e;const{spatialReference:r}=t.at(0).geometry;if(null==r)return e;const o=t.toArray().map(e=>{const t=e.geometry;return[t.x,t.y]});return new g({points:o,spatialReference:r}).extent}readMaxScale(e,t){const r=Q(t)?t.layers:t.featureCollection?.layers,o=r?.find(e=>null!=e.layerDefinition.maxScale);return o?.layerDefinition.maxScale??0}readMinScale(e,t){const r=Q(t)?t.layers:t.featureCollection?.layers,o=r?.find(e=>null!=e.layerDefinition.minScale);return o?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",e=>x.fromGraphic(e))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",e=>G.fromGraphic(e))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",e=>J.fromGraphic(e))}readRouteInfo(e,t){return this._getNetworkFeatures(t,"RouteInfo",e=>M.fromGraphic(e)).at(0)??null}readSpatialReference(e,t){const r=Q(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return b.WGS84;const{layerDefinition:o,featureSet:i}=r[0],s=i.features[0],n=s?.geometry?.spatialReference??i.spatialReference??o.spatialReference??o.extent.spatialReference??v;return b.fromJSON(n)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",e=>W.fromGraphic(e),e=>this._setStopSymbol(e))}get title(){return this.routeInfo?.name??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return t.routeServiceUrl}set url(e){null!=e?this._set("url",D(e,n.getLogger(this))):this._set("url",t.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new s("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new s("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new s("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(!this.routeInfo)throw new s("routelayer:route-unsolved","save() requires a solved route");const{portal:r}=t;await r.signIn(),r.user||await t.reload();const{itemUrl:o,itemControl:i}=t;if("admin"!==i&&"update"!==i)throw new s("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const n={messages:[],origin:"portal-item",portal:r,url:o?m(o):void 0,writtenProperties:[]},a=this.write(void 0,n);return t.extent=await se(e),t.title=this.title,await t.update({data:a}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new s("routelayer:route-unsolved","saveAs() requires a solved route");const r=L.from(e).clone();r.extent??=await se(this.fullExtent),r.id=null,r.portal??=_.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",O.MULTI_LAYER,"Route Layer"];const{portal:o}=r,i={messages:[],origin:"portal-item",portal:o,url:null,writtenProperties:[]};await o.signIn();const n=t?.folder,a=this.write(void 0,i);return await o.user.addItem({item:r,folder:n,data:a}),this.portalItem=r,d(i),i.portalItem=r,r}async solve(e,t){Y(this.stops),Y(this.pointBarriers),Y(this.polylineBarriers),Y(this.polygonBarriers);const r=e?.stops??this.stops,o=e?.pointBarriers??X(this.pointBarriers),n=e?.polylineBarriers??X(this.polylineBarriers),a=e?.polygonBarriers??X(this.polygonBarriers);if(null==r)throw new s("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if(($(r)||ee(r))&&r.features.length<2||i.isCollection(r)&&r.length<2)throw new s("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(i.isCollection(r))for(const i of r)i.routeName=null;const l=e?.apiKey,{checksum:p,url:c}=this,m=await this._getServiceDescription(c,l,t),y=e?.travelMode??m.defaultTravelMode,f=e?.accumulateAttributes??[];y&&(f.push(y.distanceAttributeName),y.timeAttributeName&&f.push(y.timeAttributeName));const d={accumulateAttributes:f,checksum:p,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:o,polylineBarriers:n,polygonBarriers:a,preserveObjectID:!0,returnBarriers:!!o,returnDirections:!0,returnPolygonBarriers:!!a,returnPolylineBarriers:!!n,returnRoutes:!0,returnStops:!0,stops:r},h=E.from(e??{});let g;h.set(d);try{g=await A(c,h,t)}catch(S){throw u(S)?S:new s("routelayer:failed-route-request","the routing request failed",{error:S})}const w=this._toRouteLayerSolution(g);return this._isOverridden("title")||(this.title=w.routeInfo.name??"Route"),this._populatePortalFields(w,m,h),w}update(e){const{checksum:t,directionLines:r,directionPoints:o,pointBarriers:i,polygonBarriers:s,polylineBarriers:n,routeInfo:a,stops:l}=e;Z(l,this.stops)?ie(l,this.stops):this.set({stops:l}),K(i,this.pointBarriers)&&(Z(i,this.pointBarriers)?te(i,this.pointBarriers):this.set({pointBarriers:i})),K(n,this.polylineBarriers)&&(Z(n,this.polylineBarriers)?re(n,this.polylineBarriers):this.set({polylineBarriers:n})),K(s,this.polygonBarriers)&&(Z(s,this.polygonBarriers)?oe(s,this.polygonBarriers):this.set({polygonBarriers:s})),this.set({checksum:t}),this._set("directionLines",r),this._set("directionPoints",o),this._set("routeInfo",a),a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,s,n){const a=Q(e)?e.layers:e.featureCollection?.layers,l=a?.find(e=>e.layerDefinition.name===t);if(null==l)return new i;const{layerDefinition:u,popupInfo:p,featureSet:c}=l,m=u.drawingInfo.renderer,{features:y}=c,f=c.spatialReference??u.spatialReference??u.extent.spatialReference??v,d=m&&R(m),h=b.fromJSON(f),g=y.map(e=>{const i=r.fromJSON(e);i.geometry&&e.geometry&&null==e.geometry.spatialReference&&(i.geometry.spatialReference=h);const n=s(i);return n.symbol??=d?.getSymbol(i)??this._getNetworkSymbol(t),n.popupTemplate??=p&&o.fromJSON(p),n});return n&&g.some(({symbol:e})=>!e)&&n(g),new i(g)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,r){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const o=await T(e,t,r);return this._cachedServiceDescription={serviceDescription:o,url:e},o}_setStopSymbol(e){if(!e||!e.length||!this.defaultSymbols.stops||e.every(({symbol:e})=>!!e))return;const{first:t,last:r,middle:o,unlocated:i,waypoint:s,break:n}=this.defaultSymbols.stops,a=e.map(({sequence:e})=>e).filter(e=>null!=e),l=e.length===a.length;if(!this.routeInfo&&!l||1===e.length)return void e.forEach((i,s)=>{switch(s){case 0:i.symbol=t;break;case e.length-1:i.symbol=r;break;default:i.symbol=o}});const u=Math.min(...a),p=Math.max(...a);for(const c of e)c.sequence!==u?c.sequence!==p?this.routeInfo&&"ok"!==c.status&&"not-located-on-closest"!==c.status?c.symbol=i:"waypoint"!==c.locationType?"break"!==c.locationType?c.symbol=o:c.symbol=n:c.symbol=s:c.symbol=r:c.symbol=t}_toRouteLayerSolution(e){const{checksum:t,routeResults:r}=e,o=r[0].stops?.map(e=>W.fromJSON(e.toJSON()));this._setStopSymbol(o);const i=new de(o),s=new ye(e.polygonBarriers?.map(e=>G.fromJSON(e.toJSON())));ne(s,this.defaultSymbols.polygonBarriers);const n=new fe(e.polylineBarriers?.map(e=>J.fromJSON(e.toJSON())));ne(n,this.defaultSymbols.polylineBarriers);const a=new me(e.pointBarriers?.map(e=>x.fromJSON(e.toJSON())));ne(a,this.defaultSymbols.pointBarriers);const l=r[0].route?.toJSON(),u=M.fromJSON(l);u.symbol=this.defaultSymbols.routeInfo;const p=new ce(r[0].directionPoints?.features.map(e=>k.fromJSON(e.toJSON())));ne(p,this.defaultSymbols.directionPoints);const c=new pe(r[0].directionLines?.features.map(e=>F.fromJSON(e.toJSON())));return ne(c,this.defaultSymbols.directionLines),{checksum:t,directionLines:c,directionPoints:p,pointBarriers:a,polygonBarriers:s,polylineBarriers:n,routeInfo:u,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",F.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",k.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,o,i,s){if(!e?.length)return null;const n=this.spatialReference.toJSON(),{fullExtent:a,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map(e=>ue(e)),geometryType:r,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:t?.toJSON()??H(r)}},extent:a.toJSON(),fields:o,geometryType:r,hasM:!1,hasZ:!1,maxScale:l,minScale:u,name:i,objectIdField:"ObjectID",spatialReference:n,title:s,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",x.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",G.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",J.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new i([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",M.fields,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",W.fields,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,r=t?.first?.toJSON(),o=t?.middle?.toJSON(),i=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:o,uniqueValueInfos:[{value:"1",symbol:r,label:"First Stop"},{value:`${this.stops.length}`,symbol:i,label:"Last Stop"}]},e}_populatePortalFields(e,t,r){const o=t.networkDataset?.networkAttributes,i=o?.filter(({usageType:e})=>"cost"===e)??[],a=r.travelMode??t.defaultTravelMode;if(null==a)return void n.getLogger(this).warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:l,distanceAttributeName:u}=a,p=i.find(({name:e})=>e===l),c=i.find(({name:e})=>e===u),m=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,y=p?.units,f=c?.units;if(!y||!f)throw new s("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const d=r.directionsLanguage??t.directionsLanguage,h=r.accumulateAttributes??t.accumulateAttributeNames??[],g=new Set(i.filter(({name:e})=>e===l||e===u||e===m||null!=e&&h.includes(e)).map(({name:e})=>e)),w=e=>{for(const t in e)g.has(t)||delete e[t]};for(const s of e.pointBarriers)null!=s.costs&&(s.addedCost=s.costs[m]??0,w(s.costs));for(const s of e.polygonBarriers)null!=s.costs&&(s.scaleFactor=s.costs[m]??1,w(s.costs));for(const s of e.polylineBarriers)null!=s.costs&&(s.scaleFactor=s.costs[m]??1,w(s.costs));const{routeInfo:S}=e,{findBestSequence:b,preserveFirstStop:v,preserveLastStop:B,startTimeIsUTC:P,timeWindowsAreUTC:I}=r;S.analysisSettings=new U({accumulateAttributes:h,directionsLanguage:d,findBestSequence:b,preserveFirstStop:v,preserveLastStop:B,startTimeIsUTC:P,timeWindowsAreUTC:I,travelMode:a}),S.totalDuration=ae(S.totalCosts?.[l]??0,y),S.totalDistance=le(S.totalCosts?.[u]??0,f),S.totalLateDuration=ae(S.totalViolations?.[l]??0,y),S.totalWaitDuration=ae(S.totalWait?.[l]??0,y),null!=S.totalCosts&&w(S.totalCosts),null!=S.totalViolations&&w(S.totalViolations),null!=S.totalWait&&w(S.totalWait);for(const s of e.stops)null!=s.serviceCosts&&(s.serviceDuration=ae(s.serviceCosts[l]??0,y),s.serviceDistance=le(s.serviceCosts[u]??0,f),w(s.serviceCosts)),null!=s.cumulativeCosts&&(s.cumulativeDuration=ae(s.cumulativeCosts[l]??0,y),s.cumulativeDistance=le(s.cumulativeCosts[u]??0,f),w(s.cumulativeCosts)),null!=s.violations&&(s.lateDuration=ae(s.violations[l]??0,y),w(s.violations)),null!=s.wait&&(s.waitDuration=ae(s.wait[l]??0,y),w(s.wait))}};e([y({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],he.prototype,"_featureCollection",void 0),e([q(["web-map","portal-item"],"_featureCollection")],he.prototype,"writeFeatureCollectionWebmap",null),e([y({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],he.prototype,"_type",void 0),e([y({type:String})],he.prototype,"checksum",void 0),e([y({nonNullable:!0,type:C})],he.prototype,"defaultSymbols",void 0),e([y({readOnly:!0})],he.prototype,"directionLines",void 0),e([V(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],he.prototype,"readDirectionLines",null),e([y({readOnly:!0})],he.prototype,"directionPoints",void 0),e([V(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],he.prototype,"readDirectionPoints",null),e([y({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],he.prototype,"featureCollectionType",void 0),e([y({readOnly:!0})],he.prototype,"fullExtent",null),e([y({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],he.prototype,"legendEnabled",void 0),e([y({type:["show","hide"]})],he.prototype,"listMode",void 0),e([y({type:Number,nonNullable:!0,json:{write:!1}})],he.prototype,"maxScale",void 0),e([V(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],he.prototype,"readMaxScale",null),e([y({type:Number,nonNullable:!0,json:{write:!1}})],he.prototype,"minScale",void 0),e([V(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],he.prototype,"readMinScale",null),e([y({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],he.prototype,"operationalLayerType",void 0),e([y({nonNullable:!0,type:i.ofType(x)})],he.prototype,"pointBarriers",void 0),e([V(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],he.prototype,"readPointBarriers",null),e([y({nonNullable:!0,type:i.ofType(G)})],he.prototype,"polygonBarriers",void 0),e([V(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],he.prototype,"readPolygonBarriers",null),e([y({nonNullable:!0,type:i.ofType(J)})],he.prototype,"polylineBarriers",void 0),e([V(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],he.prototype,"readPolylineBarriers",null),e([y({readOnly:!0})],he.prototype,"routeInfo",void 0),e([V(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],he.prototype,"readRouteInfo",null),e([y({type:b})],he.prototype,"spatialReference",void 0),e([V(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],he.prototype,"readSpatialReference",null),e([y({nonNullable:!0,type:i.ofType(W)})],he.prototype,"stops",void 0),e([V(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],he.prototype,"readStops",null),e([y()],he.prototype,"title",null),e([y({readOnly:!0,json:{read:!1}})],he.prototype,"type",void 0),e([y()],he.prototype,"url",null),he=e([f("esri.layers.RouteLayer")],he);const ge=he;export{ge as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../config.js";import r from"../Graphic.js";import o from"../PopupTemplate.js";import{isSome as i}from"../core/arrayUtils.js";import s from"../core/Collection.js";import n from"../core/Error.js";import a from"../core/Logger.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as u}from"../core/object.js";import{isAbortError as p}from"../core/promiseUtils.js";import{on as c}from"../core/reactiveUtils.js";import{convertUnit as m}from"../core/units.js";import{urlToObject as y}from"../core/urlUtils.js";import{property as f,subclass as d}from"../core/accessorSupport/decorators.js";import{updateOrigins as h}from"../core/accessorSupport/originUtils.js";import g from"../geometry/Extent.js";import w from"../geometry/Multipoint.js";import{initializeProjection as S,project as b}from"../geometry/projectionUtils.js";import v from"../geometry/SpatialReference.js";import{wgs84 as B}from"../geometry/support/spatialReferenceUtils.js";import P from"./Layer.js";import{BlendLayer as I}from"./mixins/BlendLayer.js";import{OperationalLayer as N}from"./mixins/OperationalLayer.js";import{PortalLayer as j}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as D}from"./mixins/ScaleRangeLayer.js";import{sanitizeUrl as C}from"./support/arcgisLayerUrl.js";import _ from"./support/RouteSymbols.js";import L from"../portal/Portal.js";import O from"../portal/PortalItem.js";import{typeKeyword as R}from"../portal/support/portalItemUtils.js";import{read as T}from"../renderers/support/jsonUtils.js";import{fetchServiceDescription as A}from"../rest/networkService.js";import{solve as F}from"../rest/route.js";import k from"../rest/support/DirectionLine.js";import x from"../rest/support/DirectionPoint.js";import G from"../rest/support/PointBarrier.js";import J from"../rest/support/PolygonBarrier.js";import M from"../rest/support/PolylineBarrier.js";import E from"../rest/support/RouteInfo.js";import U from"../rest/support/RouteParameters.js";import W from"../rest/support/RouteSettings.js";import q from"../rest/support/Stop.js";import{writer as V}from"../core/accessorSupport/decorators/writer.js";import{reader as z}from"../core/accessorSupport/decorators/reader.js";function Y(e){if(!e.length)return;const t=e.toArray(),r=t.map(({objectId:e})=>e).filter(e=>null!=e);let o=Math.max(...r,0);for(const i of t)i.objectId??=++o}function Z(e,t){return e.length===t.length&&K(e)&&K(t)}function K(e){return e.every(({objectId:e})=>null!=e)}function X(e,t){return!!e.length||!!t.length}function H(e){return e.length?e:null}function Q(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Q("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Q("esriGeometryPolyline")}}}function $(e){return"layers"in e}function ee(e){return"esri.rest.support.FeatureSet"===e.declaredClass}function te(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}function re(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.addedCost=r.addedCost,e.barrierType=r.barrierType,e.costs=r.costs,e.curbApproach=r.curbApproach,e.fullEdge=r.fullEdge,e.geometry=r.geometry,e.name=r.name,e.sideOfEdge=r.sideOfEdge,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol)}}function oe(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}function ie(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}function se(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.arriveCurbApproach=r.arriveCurbApproach,e.arriveTime=r.arriveTime,e.arriveTimeOffset=r.arriveTimeOffset,e.cumulativeCosts=r.cumulativeCosts,e.cumulativeDistance=r.cumulativeDistance,e.cumulativeDuration=r.cumulativeDuration,e.curbApproach=r.curbApproach,e.departCurbApproach=r.departCurbApproach,e.departTime=r.departTime,e.departTimeOffset=r.departTimeOffset,e.distanceToNetworkInMeters=r.distanceToNetworkInMeters,e.geometry=r.geometry,e.lateDuration=r.lateDuration,e.name=r.name,e.navLatency=r.navLatency,e.positionAlong=r.positionAlong,e.routeName=r.routeName,e.serviceCosts=r.serviceCosts,e.serviceDistance=r.serviceDistance,e.serviceDuration=r.serviceDuration,e.sequence=r.sequence,e.sideOfEdge=r.sideOfEdge,e.snapX=r.snapX,e.snapY=r.snapY,e.snapZ=r.snapZ,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol,e.timeWindowEnd=r.timeWindowEnd,e.timeWindowStart=r.timeWindowStart,e.violations=r.violations,e.waitDuration=r.waitDuration,e.wait=r.wait)}}async function ne(e){const t=v.WGS84;return await S(e.spatialReference,t),b(e,t)}function ae(e,t){if(t&&e?.length&&!e.every(({symbol:e})=>!!e))for(const r of e)r.symbol=t}function le(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function ue(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:m(e,t,"meters")}function pe(e){const{attributes:t,geometry:r,popupTemplate:o,symbol:i}=e.toGraphic().toJSON();return{attributes:t,geometry:r,popupInfo:o,symbol:i}}const ce=s.ofType(k),me=s.ofType(x),ye=s.ofType(G),fe=s.ofType(J),de=s.ofType(M),he=s.ofType(q);let ge=class extends(I(D(N(j(l(P)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.checksum=null,this.defaultSymbols=new _,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new ye,this.polygonBarriers=new fe,this.polylineBarriers=new de,this.routeInfo=null,this.spatialReference=v.WGS84,this.stops=new he,this.type="route"}initialize(){const e=()=>{this._setStopSymbol(this.stops)},t=()=>{ae(this.pointBarriers,this.defaultSymbols.pointBarriers)},r=()=>{ae(this.polylineBarriers,this.defaultSymbols.polylineBarriers)},o=()=>{ae(this.polygonBarriers,this.defaultSymbols.polygonBarriers)};this.addHandles([c(()=>this.stops,"change",e,{sync:!0,onListenerAdd:e}),c(()=>this.pointBarriers,"change",t,{sync:!0,onListenerAdd:t}),c(()=>this.polylineBarriers,"change",r,{sync:!0,onListenerAdd:r}),c(()=>this.polygonBarriers,"change",o,{sync:!0,onListenerAdd:o})])}writeFeatureCollectionWebmap(e,t,r,o){const i=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter(e=>!!e),s=i.map((e,t)=>t),n="web-map"===o.origin?"featureCollection.layers":"layers";u(n,i,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",e=>k.fromGraphic(e))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",e=>x.fromGraphic(e))}get fullExtent(){const e=new g({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:v.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter(e=>null!=e.geometry);if(t.length<2)return e;const{spatialReference:r}=t.at(0).geometry;if(null==r)return e;const o=t.toArray().map(e=>{const t=e.geometry;return[t.x,t.y]});return new w({points:o,spatialReference:r}).extent}readMaxScale(e,t){const r=$(t)?t.layers:t.featureCollection?.layers,o=r?.find(e=>null!=e.layerDefinition.maxScale);return o?.layerDefinition.maxScale??0}readMinScale(e,t){const r=$(t)?t.layers:t.featureCollection?.layers,o=r?.find(e=>null!=e.layerDefinition.minScale);return o?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",e=>G.fromGraphic(e))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",e=>J.fromGraphic(e))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",e=>M.fromGraphic(e))}readRouteInfo(e,t){return this._getNetworkFeatures(t,"RouteInfo",e=>E.fromGraphic(e)).at(0)??null}readSpatialReference(e,t){const r=$(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return v.WGS84;const{layerDefinition:o,featureSet:i}=r[0],s=i.features[0],n=s?.geometry?.spatialReference??i.spatialReference??o.spatialReference??o.extent.spatialReference??B;return v.fromJSON(n)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",e=>q.fromGraphic(e),e=>this._setStopSymbol(e))}get title(){return this.routeInfo?.name??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return t.routeServiceUrl}set url(e){null!=e?this._set("url",C(e,a.getLogger(this))):this._set("url",t.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new n("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new n("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new n("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(!this.routeInfo)throw new n("routelayer:route-unsolved","save() requires a solved route");const{portal:r}=t;await r.signIn(),r.user||await t.reload();const{itemUrl:o,itemControl:i}=t;if("admin"!==i&&"update"!==i)throw new n("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:r,url:o?y(o):void 0,writtenProperties:[]},a=this.write(void 0,s);return t.extent=await ne(e),t.title=this.title,await t.update({data:a}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new n("routelayer:route-unsolved","saveAs() requires a solved route");const r=O.from(e).clone();r.extent??=await ne(this.fullExtent),r.id=null,r.portal??=L.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",R.MULTI_LAYER,"Route Layer"];const{portal:o}=r,i={messages:[],origin:"portal-item",portal:o,url:null,writtenProperties:[]};await o.signIn();const s=t?.folder,a=this.write(void 0,i);return await o.user.addItem({item:r,folder:s,data:a}),this.portalItem=r,h(i),i.portalItem=r,r}async solve(e,t){Y(this.stops),Y(this.pointBarriers),Y(this.polylineBarriers),Y(this.polygonBarriers);const r=e?.stops??this.stops,o=e?.pointBarriers??H(this.pointBarriers),i=e?.polylineBarriers??H(this.polylineBarriers),a=e?.polygonBarriers??H(this.polygonBarriers);if(null==r)throw new n("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((ee(r)||te(r))&&r.features.length<2||s.isCollection(r)&&r.length<2)throw new n("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(s.isCollection(r))for(const s of r)s.routeName=null;const l=e?.apiKey,{checksum:u,url:c}=this,m=await this._getServiceDescription(c,l,t),y=e?.travelMode??m.defaultTravelMode,f=e?.accumulateAttributes??[];y&&(f.push(y.distanceAttributeName),y.timeAttributeName&&f.push(y.timeAttributeName));const d={accumulateAttributes:f,checksum:u,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:o,polylineBarriers:i,polygonBarriers:a,preserveObjectID:!0,returnBarriers:!!o,returnDirections:!0,returnPolygonBarriers:!!a,returnPolylineBarriers:!!i,returnRoutes:!0,returnStops:!0,stops:r},h=U.from(e??{});let g;h.set(d);try{g=await F(c,h,t)}catch(S){throw p(S)?S:new n("routelayer:failed-route-request","the routing request failed",{error:S})}const w=this._toRouteLayerSolution(g);return this._isOverridden("title")||(this.title=w.routeInfo.name??"Route"),this._populatePortalFields(w,m,h),w}update(e){const{checksum:t,directionLines:r,directionPoints:o,pointBarriers:i,polygonBarriers:s,polylineBarriers:n,routeInfo:a,stops:l}=e;Z(l,this.stops)?se(l,this.stops):this.set({stops:l}),X(i,this.pointBarriers)&&(Z(i,this.pointBarriers)?re(i,this.pointBarriers):this.set({pointBarriers:i})),X(n,this.polylineBarriers)&&(Z(n,this.polylineBarriers)?oe(n,this.polylineBarriers):this.set({polylineBarriers:n})),X(s,this.polygonBarriers)&&(Z(s,this.polygonBarriers)?ie(s,this.polygonBarriers):this.set({polygonBarriers:s})),this.set({checksum:t}),this._set("directionLines",r),this._set("directionPoints",o),this._set("routeInfo",a),a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,i,n){const a=$(e)?e.layers:e.featureCollection?.layers,l=a?.find(e=>e.layerDefinition.name===t);if(null==l)return new s;const{layerDefinition:u,popupInfo:p,featureSet:c}=l,m=u.drawingInfo.renderer,{features:y}=c,f=c.spatialReference??u.spatialReference??u.extent.spatialReference??B,d=m&&T(m),h=v.fromJSON(f),g=y.map(e=>{const s=r.fromJSON(e);s.geometry&&e.geometry&&null==e.geometry.spatialReference&&(s.geometry.spatialReference=h);const n=i(s);return n.symbol??=d?.getSymbol(s)??this._getNetworkSymbol(t),n.popupTemplate??=p&&o.fromJSON(p),n});return n&&g.some(({symbol:e})=>!e)&&n(g),new s(g)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,r){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const o=await A(e,t,r);return this._cachedServiceDescription={serviceDescription:o,url:e},o}_setStopSymbol(e){const t=s.isCollection(e)?e.toArray():e;if(!t||!t.length||!this.defaultSymbols.stops||t.every(({symbol:e})=>!!e))return;const{first:r,last:o,middle:n,unlocated:a,waypoint:l,break:u}=this.defaultSymbols.stops,p=t.map(({sequence:e})=>e).filter(i),c=t.length===p.length;if(!this.routeInfo&&!c||1===t.length)return void t.forEach((e,i)=>{switch(i){case 0:e.symbol=r;break;case t.length-1:e.symbol=o;break;default:e.symbol=n}});const m=Math.min(...p),y=Math.max(...p);for(const i of t)i.sequence!==m?i.sequence!==y?this.routeInfo&&"ok"!==i.status&&"not-located-on-closest"!==i.status?i.symbol=a:"waypoint"!==i.locationType?"break"!==i.locationType?i.symbol=n:i.symbol=u:i.symbol=l:i.symbol=o:i.symbol=r}_toRouteLayerSolution(e){const{checksum:t,routeResults:r}=e,o=r[0].stops?.map(e=>q.fromJSON(e.toJSON()));this._setStopSymbol(o);const i=new he(o),s=new fe(e.polygonBarriers?.map(e=>J.fromJSON(e.toJSON())));ae(s,this.defaultSymbols.polygonBarriers);const n=new de(e.polylineBarriers?.map(e=>M.fromJSON(e.toJSON())));ae(n,this.defaultSymbols.polylineBarriers);const a=new ye(e.pointBarriers?.map(e=>G.fromJSON(e.toJSON())));ae(a,this.defaultSymbols.pointBarriers);const l=r[0].route?.toJSON(),u=E.fromJSON(l);u.symbol=this.defaultSymbols.routeInfo;const p=new me(r[0].directionPoints?.features.map(e=>x.fromJSON(e.toJSON())));ae(p,this.defaultSymbols.directionPoints);const c=new ce(r[0].directionLines?.features.map(e=>k.fromJSON(e.toJSON())));return ae(c,this.defaultSymbols.directionLines),{checksum:t,directionLines:c,directionPoints:p,pointBarriers:a,polygonBarriers:s,polylineBarriers:n,routeInfo:u,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",k.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",x.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,o,i,s){if(!e?.length)return null;const n=this.spatialReference.toJSON(),{fullExtent:a,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map(e=>pe(e)),geometryType:r,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:t?.toJSON()??Q(r)}},extent:a.toJSON(),fields:o,geometryType:r,hasM:!1,hasZ:!1,maxScale:l,minScale:u,name:i,objectIdField:"ObjectID",spatialReference:n,title:s,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",G.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",J.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",M.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new s([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",E.fields,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",q.fields,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,r=t?.first?.toJSON(),o=t?.middle?.toJSON(),i=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:o,uniqueValueInfos:[{value:"1",symbol:r,label:"First Stop"},{value:`${this.stops.length}`,symbol:i,label:"Last Stop"}]},e}_populatePortalFields(e,t,r){const o=t.networkDataset?.networkAttributes,i=o?.filter(({usageType:e})=>"cost"===e)??[],s=r.travelMode??t.defaultTravelMode;if(null==s)return void a.getLogger(this).warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:l,distanceAttributeName:u}=s,p=i.find(({name:e})=>e===l),c=i.find(({name:e})=>e===u),m=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,y=p?.units,f=c?.units;if(!y||!f)throw new n("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const d=r.directionsLanguage??t.directionsLanguage,h=r.accumulateAttributes??t.accumulateAttributeNames??[],g=new Set(i.filter(({name:e})=>e===l||e===u||e===m||null!=e&&h.includes(e)).map(({name:e})=>e)),w=e=>{for(const t in e)g.has(t)||delete e[t]};for(const n of e.pointBarriers)null!=n.costs&&(n.addedCost=n.costs[m]??0,w(n.costs));for(const n of e.polygonBarriers)null!=n.costs&&(n.scaleFactor=n.costs[m]??1,w(n.costs));for(const n of e.polylineBarriers)null!=n.costs&&(n.scaleFactor=n.costs[m]??1,w(n.costs));const{routeInfo:S}=e,{findBestSequence:b,preserveFirstStop:v,preserveLastStop:B,startTimeIsUTC:P,timeWindowsAreUTC:I}=r;S.analysisSettings=new W({accumulateAttributes:h,directionsLanguage:d,findBestSequence:b,preserveFirstStop:v,preserveLastStop:B,startTimeIsUTC:P,timeWindowsAreUTC:I,travelMode:s}),S.totalDuration=le(S.totalCosts?.[l]??0,y),S.totalDistance=ue(S.totalCosts?.[u]??0,f),S.totalLateDuration=le(S.totalViolations?.[l]??0,y),S.totalWaitDuration=le(S.totalWait?.[l]??0,y),null!=S.totalCosts&&w(S.totalCosts),null!=S.totalViolations&&w(S.totalViolations),null!=S.totalWait&&w(S.totalWait);for(const n of e.stops)null!=n.serviceCosts&&(n.serviceDuration=le(n.serviceCosts[l]??0,y),n.serviceDistance=ue(n.serviceCosts[u]??0,f),w(n.serviceCosts)),null!=n.cumulativeCosts&&(n.cumulativeDuration=le(n.cumulativeCosts[l]??0,y),n.cumulativeDistance=ue(n.cumulativeCosts[u]??0,f),w(n.cumulativeCosts)),null!=n.violations&&(n.lateDuration=le(n.violations[l]??0,y),w(n.violations)),null!=n.wait&&(n.waitDuration=le(n.wait[l]??0,y),w(n.wait))}};e([f({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ge.prototype,"_featureCollection",void 0),e([V(["web-map","portal-item"],"_featureCollection")],ge.prototype,"writeFeatureCollectionWebmap",null),e([f({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ge.prototype,"_type",void 0),e([f({type:String})],ge.prototype,"checksum",void 0),e([f({nonNullable:!0,type:_})],ge.prototype,"defaultSymbols",void 0),e([f({readOnly:!0})],ge.prototype,"directionLines",void 0),e([z(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ge.prototype,"readDirectionLines",null),e([f({readOnly:!0})],ge.prototype,"directionPoints",void 0),e([z(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ge.prototype,"readDirectionPoints",null),e([f({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ge.prototype,"featureCollectionType",void 0),e([f({readOnly:!0})],ge.prototype,"fullExtent",null),e([f({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ge.prototype,"legendEnabled",void 0),e([f({type:["show","hide"]})],ge.prototype,"listMode",void 0),e([f({type:Number,nonNullable:!0,json:{write:!1}})],ge.prototype,"maxScale",void 0),e([z(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ge.prototype,"readMaxScale",null),e([f({type:Number,nonNullable:!0,json:{write:!1}})],ge.prototype,"minScale",void 0),e([z(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ge.prototype,"readMinScale",null),e([f({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ge.prototype,"operationalLayerType",void 0),e([f({nonNullable:!0,type:s.ofType(G)})],ge.prototype,"pointBarriers",void 0),e([z(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ge.prototype,"readPointBarriers",null),e([f({nonNullable:!0,type:s.ofType(J)})],ge.prototype,"polygonBarriers",void 0),e([z(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ge.prototype,"readPolygonBarriers",null),e([f({nonNullable:!0,type:s.ofType(M)})],ge.prototype,"polylineBarriers",void 0),e([z(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ge.prototype,"readPolylineBarriers",null),e([f({readOnly:!0})],ge.prototype,"routeInfo",void 0),e([z(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ge.prototype,"readRouteInfo",null),e([f({type:v})],ge.prototype,"spatialReference",void 0),e([z(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ge.prototype,"readSpatialReference",null),e([f({nonNullable:!0,type:s.ofType(q)})],ge.prototype,"stops",void 0),e([z(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ge.prototype,"readStops",null),e([f()],ge.prototype,"title",null),e([f({readOnly:!0,json:{read:!1}})],ge.prototype,"type",void 0),e([f()],ge.prototype,"url",null),ge=e([d("esri.layers.RouteLayer")],ge);const we=ge;export{we as default};
|
package/layers/SceneLayer.d.ts
CHANGED
|
@@ -874,7 +874,8 @@ export default class SceneLayer extends SceneLayerSuperclass {
|
|
|
874
874
|
* >
|
|
875
875
|
* > Screen size perspective is currently not optimized for situations where the camera is very near the ground, or for scenes
|
|
876
876
|
* > with visual elements located far from the ground surface. In these cases it may be better to turn off screen size perspective.
|
|
877
|
-
* > As screen size perspective changes the size based on distance to the camera, it should be set to false when using
|
|
877
|
+
* > As screen size perspective changes the size based on distance to the camera, it should be set to false when using
|
|
878
|
+
* > [size visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html).
|
|
878
879
|
*
|
|
879
880
|
* @default true
|
|
880
881
|
* @since 4.4
|
package/layers/StreamLayer.d.ts
CHANGED
|
@@ -188,8 +188,8 @@ export interface StreamLayerProperties extends LayerProperties, ClonableMixinPro
|
|
|
188
188
|
* [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#url), the spatial reference is read from the service.
|
|
189
189
|
*
|
|
190
190
|
* When creating a StreamLayer from client-side features, this property is
|
|
191
|
-
* inferred from the geometries of the features provided in the
|
|
192
|
-
*
|
|
191
|
+
* inferred from the geometries of the features provided in the [sendMessageToClient()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#sendMessageToClient)
|
|
192
|
+
* method.
|
|
193
193
|
*/
|
|
194
194
|
spatialReference?: SpatialReferenceProperties;
|
|
195
195
|
}
|
|
@@ -724,7 +724,8 @@ export default class StreamLayer extends StreamLayerSuperclass {
|
|
|
724
724
|
* >
|
|
725
725
|
* > Screen size perspective is currently not optimized for situations where the camera is very near the ground, or for scenes
|
|
726
726
|
* > with visual elements located far from the ground surface. In these cases it may be better to turn off screen size perspective.
|
|
727
|
-
* > As screen size perspective changes the size based on distance to the camera, it should be set to false when using
|
|
727
|
+
* > As screen size perspective changes the size based on distance to the camera, it should be set to false when using
|
|
728
|
+
* > [size visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html).
|
|
728
729
|
*
|
|
729
730
|
* @default true
|
|
730
731
|
* @since 4.4
|
|
@@ -746,8 +747,8 @@ export default class StreamLayer extends StreamLayerSuperclass {
|
|
|
746
747
|
* [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#url), the spatial reference is read from the service.
|
|
747
748
|
*
|
|
748
749
|
* When creating a StreamLayer from client-side features, this property is
|
|
749
|
-
* inferred from the geometries of the features provided in the
|
|
750
|
-
*
|
|
750
|
+
* inferred from the geometries of the features provided in the [sendMessageToClient()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#sendMessageToClient)
|
|
751
|
+
* method.
|
|
751
752
|
*/
|
|
752
753
|
get spatialReference(): SpatialReference;
|
|
753
754
|
set spatialReference(value: SpatialReferenceProperties);
|
|
@@ -230,14 +230,13 @@ export default class SubtypeGroupLayer extends SubtypeGroupLayerSuperclass {
|
|
|
230
230
|
* An array of field names from the service to include with each feature.
|
|
231
231
|
* To fetch the values from all fields in the layer, use `["*"]`. Fields specified in
|
|
232
232
|
* `outFields` will be requested alongside with required fields for rendering,
|
|
233
|
-
*
|
|
233
|
+
* and setting the [elevation info](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SubtypeGroupLayer.html#elevationInfo) for the layer.
|
|
234
234
|
* The required fields and `outFields` are used to populate
|
|
235
235
|
* {@link views/layers/SubtypeGroupLayerView#availableFields}.
|
|
236
236
|
* Set this property to include the fields that will be used for client-side
|
|
237
237
|
* {@link views/layers/SubtypeGroupLayerView#queryFeatures queries}
|
|
238
238
|
* if the fields are not part of required fields used for rendering.
|
|
239
239
|
*
|
|
240
|
-
* @see {@link views/layers/SubtypeGroupLayerView#availableFields}
|
|
241
240
|
* @see [fieldUtils](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html)
|
|
242
241
|
* @example
|
|
243
242
|
* // Includes all fields from the service in the layer
|
|
@@ -667,8 +666,8 @@ export default class SubtypeGroupLayer extends SubtypeGroupLayerSuperclass {
|
|
|
667
666
|
* Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the feature service and returns a
|
|
668
667
|
* [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) once the promise resolves.
|
|
669
668
|
* A [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) contains an array of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html)
|
|
670
|
-
* features.
|
|
671
|
-
*
|
|
669
|
+
* features.
|
|
670
|
+
*
|
|
672
671
|
* > [!WARNING]
|
|
673
672
|
* >
|
|
674
673
|
* > To query features/graphics available to or visible in the
|
|
@@ -870,7 +870,7 @@ export default class VectorTileLayer extends VectorTileLayerSuperclass {
|
|
|
870
870
|
* the vector tile data (the PBF files) is fetched from the service.
|
|
871
871
|
*
|
|
872
872
|
* Use [setLayoutProperties()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setLayoutProperties) method if you are only changing the layout properties of a style layer.
|
|
873
|
-
* Use
|
|
873
|
+
* Use [setPaintProperties](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setPaintProperties) method to change only paint properties of a style layer.
|
|
874
874
|
*
|
|
875
875
|
* > [!WARNING]
|
|
876
876
|
* >
|
package/layers/WFSLayer.d.ts
CHANGED
|
@@ -571,7 +571,8 @@ export default class WFSLayer extends WFSLayerSuperclass {
|
|
|
571
571
|
* >
|
|
572
572
|
* > Screen size perspective is currently not optimized for situations where the camera is very near the ground, or for scenes
|
|
573
573
|
* > with visual elements located far from the ground surface. In these cases it may be better to turn off screen size perspective.
|
|
574
|
-
* > As screen size perspective changes the size based on distance to the camera, it should be set to false when using
|
|
574
|
+
* > As screen size perspective changes the size based on distance to the camera, it should be set to false when using
|
|
575
|
+
* > [size visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html).
|
|
575
576
|
*
|
|
576
577
|
* @default true
|
|
577
578
|
*/
|
package/layers/WMSLayer.d.ts
CHANGED
|
@@ -357,7 +357,7 @@ export default class WMSLayer extends WMSLayerSuperclass {
|
|
|
357
357
|
accessor description: string | null | undefined;
|
|
358
358
|
/**
|
|
359
359
|
* An array of time, elevation and other dimensions for the root layer.
|
|
360
|
-
* Information from a
|
|
360
|
+
* Information from a [TimeDimension](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-wmsUtils.html#TimeDimension) can be used to update [View#timeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#timeExtent),
|
|
361
361
|
* [timeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html#timeExtent), or to configure a [TimeSlider](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-TimeSlider.html) widget.
|
|
362
362
|
*
|
|
363
363
|
* A WMSLayer or [WMSSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-WMSSublayer.html) can only have one time dimension. The following example shows how to find the
|
|
@@ -372,7 +372,7 @@ export default class WMSLayer extends WMSLayerSuperclass {
|
|
|
372
372
|
* ```
|
|
373
373
|
*
|
|
374
374
|
* Data can exist at specific times or time ranges. We can access this information from the `extent` property of the
|
|
375
|
-
* [TimeDimension](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-wmsUtils.html#TimeDimension) as either an array of discrete dates or
|
|
375
|
+
* [TimeDimension](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-wmsUtils.html#TimeDimension) as either an array of discrete dates or [DimensionInterval](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-wmsUtils.html#DimensionInterval)s.
|
|
376
376
|
* For example, continuing from the previous example, a [TimeSlider](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-TimeSlider.html) is configured using the extent from a TimeDimension.
|
|
377
377
|
*
|
|
378
378
|
* ```js
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides utility functions for the [CatalogLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CatalogLayer.html).
|
|
3
|
+
*
|
|
4
|
+
* @since 4.30
|
|
5
|
+
* @see [CatalogLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CatalogLayer.html)
|
|
6
|
+
*/
|
|
1
7
|
import type CatalogLayer from "../CatalogLayer.js";
|
|
2
8
|
import type Layer from "../Layer.js";
|
|
3
9
|
|
package/layers/ogc/wcsUtils.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides utility functions for the [WCSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WCSLayer.html).
|
|
3
|
+
*
|
|
4
|
+
* @since 4.31
|
|
5
|
+
* @see [WCSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WCSLayer.html)
|
|
6
|
+
*/
|
|
1
7
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
2
8
|
import type { CustomParameters } from "../mixins/CustomParametersMixin.js";
|
|
3
9
|
import type { WCSVersion } from "../raster/datasets/types.js";
|
package/layers/ogc/wfsUtils.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides utility functions for the [WFSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WFSLayer.html).
|
|
3
|
+
*
|
|
4
|
+
* @since 4.20
|
|
5
|
+
* @see [WFSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WFSLayer.html)
|
|
6
|
+
*/
|
|
1
7
|
import type Extent from "../../geometry/Extent.js";
|
|
2
8
|
import type SpatialReference from "../../geometry/SpatialReference.js";
|
|
3
9
|
import type Field from "../support/Field.js";
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the utility function to convert image coordinates to geographic coordinates.
|
|
3
|
+
* This function is currently utilized in the Oriented Imagery widget to extract geographic world locations in the map-image location tool and for constructing the current footprint generated for the images displayed in the oriented imagery widget.
|
|
4
|
+
*
|
|
5
|
+
* @beta
|
|
6
|
+
* @since 4.31
|
|
7
|
+
* @see [OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html)
|
|
8
|
+
* @see [OrientedImageryViewer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-OrientedImageryViewer.html)
|
|
9
|
+
* @see [Sample - Creating an OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-orientedImagery-transformations-imageToWorld.html#creating-an-orientedimagerylayer)
|
|
10
|
+
*/
|
|
1
11
|
import type Point from "../../../geometry/Point.js";
|
|
2
12
|
import type { ReadonlyArrayOrCollection } from "../../../core/Collection.js";
|
|
3
13
|
import type { ImageToWorldProperties, UpdateElevationProps } from "./types.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{deepClone as e}from"../../../arcade/deepClone.js";import"../../../core/
|
|
5
|
+
import{deepClone as e}from"../../../arcade/deepClone.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import"../../../core/Logger.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import a from"../../../geometry/Point.js";import n from"../../../geometry/Polygon.js";import{fromArray as r,intersectLine as i,fromPoints as o}from"../../../geometry/support/plane.js";import s from"./updateElevation.js";import{pointToArray as c,or as m}from"./utils.js";import{worldToImagePanoramic as p,worldToImage as f}from"./worldToImage.js";import{normalizeDegrees as l}from"../../../widgets/OrientedImageryViewer/components/imageNavigationUtils.js";async function g(e,n,r,s=w){const{cameraLocation:p,farPlaneVertices:f}=r,l=c(p),g=new Array;await d(f,r,g);let h=o(g[0],g[1],g[2]),u=e.clone();for(let w=0;w<s;w++){const s=t();if(!i(h,l,c(e),s))break;let f=0,w=null;if(({error:f,imagePoint:w,pointWithZ:u}=await j(n,new a(s,p.spatialReference),r)),f<=1)break;const[d,b]=y(p.spatialReference,g);if(m(d<=1,b<=1))break;g.splice(0,g.length,...await x(d,b,new a(s,p.spatialReference),r)),h=o(g[0],g[1],g[2])}return c(u)}async function h(e,n,o,s=w){const{cameraLocation:p,farPlaneVertices:f}=o,l=c(p),g=new Array;await d(f,o,g);const h=[0,0,0,0];let u=r(h,g.flat(),!1),j=e.clone();for(let w=0;w<s;w++){const s=t();if(!i(h,l,c(e),s)||!u)break;let f,w=0;if(({error:w,imagePoint:f,pointWithZ:j}=await b(n,new a(s,p.spatialReference),o)),w<=1)break;const[d,R]=y(p.spatialReference,g);if(m(d<=1,R<=1))break;g.splice(0,g.length,...await x(d,R,new a(s,p.spatialReference),o)),u=r(h,g.flat(),!1)}return c(j)}const w=10,u=10;function y(e,t){const a=new n({spatialReference:e});a.addRing(t);return[a.extent?.width?a.extent.width/u:1,a.extent?.height?a.extent.height/u:1]}async function d(t,a,n){const r=e(t),i=await s(r,a);n.push(...i.map(c))}async function j(e,t,a){const n=await s(t,a),r=f(n,a);return{error:R(r,e),imagePoint:r,pointWithZ:n}}async function b(e,t,a){const n=await s(t,a),r=p(n,a),i=l(r.heading+a.cameraHeading);return{error:Math.abs(i-e.heading)+Math.abs(r.pitch-e.pitch),imagePoint:r,pointWithZ:n}}const R=(e,t)=>Math.abs(e.x-t.x)+Math.abs(e.y-t.y);async function x(e,t,n,r){const i=[[-e,-t],[e,-t],[e,t],[-e,t]].map(([e,t])=>new a([n.x+e,n.y+t],n.spatialReference));return s(i,r).then(e=>e.map(e=>e.toArray()))}export{g as rectifyMapPoint,h as rectifyMapPointPanoramic};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the utility function to convert geographic coordinates to image coordinates.
|
|
3
|
+
* This function is currently utilized in the Oriented Imagery widget to extract image coordinates for the map-image location tool and for constructing the current footprint generated for the images displayed in the oriented imagery widget.
|
|
4
|
+
*
|
|
5
|
+
* @beta
|
|
6
|
+
* @since 4.31
|
|
7
|
+
* @see [OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html)
|
|
8
|
+
* @see [OrientedImageryViewer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-OrientedImageryViewer.html)
|
|
9
|
+
* @see [Sample - Creating an OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-orientedImagery-transformations-worldToImage.html#creating-an-orientedimagerylayer)
|
|
10
|
+
*/
|
|
1
11
|
import type Point from "../../../geometry/Point.js";
|
|
2
12
|
import type { ReadonlyArrayOrCollection } from "../../../core/Collection.js";
|
|
3
13
|
import type { WorldToImageProperties } from "./types.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TimeUnit } from "../../core/
|
|
1
|
+
import type { TimeUnit } from "../../core/units.js";
|
|
2
2
|
|
|
3
3
|
export type OrientedImageryType = "horizontal" | "nadir" | "oblique" | "360" | "inspection" | "terrestrial-frame-video" | "aerial-frame-video" | "terrestrial-360-video" | "aerial-360-video";
|
|
4
4
|
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains convenience methods for getting Arcade expressions defined on a layer.
|
|
3
|
+
*
|
|
4
|
+
* @since 4.25
|
|
5
|
+
*/
|
|
1
6
|
import type CSVLayer from "../CSVLayer.js";
|
|
2
7
|
import type FeatureLayer from "../FeatureLayer.js";
|
|
3
8
|
import type GeoJSONLayer from "../GeoJSONLayer.js";
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides utility functions for the [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html).
|
|
3
|
+
*
|
|
4
|
+
* @since 4.32
|
|
5
|
+
* @see [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html)
|
|
6
|
+
*/
|
|
1
7
|
import type Field from "./Field.js";
|
|
2
8
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
3
9
|
import type { CustomParameters } from "../mixins/CustomParametersMixin.js";
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convenience methods for getting field names used for feature layer
|
|
3
|
+
* [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo),
|
|
4
|
+
* [elevation](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo),
|
|
5
|
+
* [editor tracking](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#editFieldsInfo)
|
|
6
|
+
* and time span.
|
|
7
|
+
*
|
|
8
|
+
* @since 4.11
|
|
9
|
+
*/
|
|
1
10
|
import type CSVLayer from "../CSVLayer.js";
|
|
2
11
|
import type FeatureLayer from "../FeatureLayer.js";
|
|
3
12
|
import type GeoJSONLayer from "../GeoJSONLayer.js";
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides utility functions for the [ParquetLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ParquetLayer.html).
|
|
3
|
+
*
|
|
4
|
+
* @since 4.33
|
|
5
|
+
* @see [ParquetLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ParquetLayer.html)
|
|
6
|
+
*/
|
|
1
7
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
2
8
|
import type { ParquetLayerInfo } from "../graphics/sources/ParquetSource.js";
|
|
3
9
|
import type { CustomParameters } from "../mixins/CustomParametersMixin.js";
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Various constant values used by different raster functions when setting [ImageryTileLayer#rasterFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryTileLayer.html#rasterFunction)
|
|
3
|
+
* or [ImageryLayer#rasterFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#rasterFunction) properties.
|
|
4
|
+
*
|
|
5
|
+
* @since 4.26
|
|
6
|
+
* @see [RasterFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html)
|
|
7
|
+
* @see [Client-side raster functions](https://ubatsukh.github.io/arcgis-js-api-demos/clientside-rasterfunctions/index.html)
|
|
8
|
+
* @see [REST API Raster function objects](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm)
|
|
9
|
+
*/
|
|
1
10
|
|
|
2
11
|
/** Slope type constants used for the [slope raster function](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm#ESRI_SECTION1_641F092319AE46D1A9441F8D1FDF186C). */
|
|
3
12
|
export const slopeType: SlopeType;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Various utility functions that create [RasterFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html) for imagery processing.
|
|
3
|
+
* Utility methods in this module makes the raster function generations easier when applying raster functions to
|
|
4
|
+
* [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html) and [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryTileLayer.html).
|
|
5
|
+
*
|
|
6
|
+
* @since 4.28
|
|
7
|
+
*/
|
|
1
8
|
import type RasterFunction from "./RasterFunction.js";
|
|
2
9
|
import type { Base2RasterFunctionParameters, BaseNRasterFunctionParameters, BaseRasterFunctionParameters, RasterArgument } from "../raster/functions/types.js";
|
|
3
10
|
import type { BaseStretchParameters, ContrastBrightnessParameters, ConvolutionFunctionCustomParameters, ConvolutionFunctionParameters, MinMaxStretchParameters, PercentClipStretchParameters, StddevStretchParameters } from "../raster/functions/creators/createAppearenceFunctions.js";
|
package/package.json
CHANGED
package/pointCloudRenderers.d.ts
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A convenience module for importing [PointCloudRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-PointCloudRenderer.html) classes when developing with
|
|
3
|
+
* [TypeScript](https://developers.arcgis.com/javascript/latest/get-started/#typescript).
|
|
4
|
+
* For example, rather than importing renderers one at a time like this:
|
|
5
|
+
*
|
|
6
|
+
* ```js
|
|
7
|
+
* import PointCloudClassBreaksRenderer from "@arcgis/core/renderers/PointCloudClassBreaksRenderer.js";
|
|
8
|
+
* import PointCloudRGBRenderer from "@arcgis/core/renderers/PointCloudRGBRenderer.js";
|
|
9
|
+
* import PointCloudStretchRenderer from "@arcgis/core/renderers/PointCloudStretchRenderer.js";
|
|
10
|
+
* import PointCloudUniqueValueRenderer from "@arcgis/core/renderers/PointCloudUniqueValueRenderer.js";
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* You can use this module to import them on a single line:
|
|
14
|
+
*
|
|
15
|
+
* ```js
|
|
16
|
+
* import {
|
|
17
|
+
* PointCloudClassBreaksRenderer,
|
|
18
|
+
* PointCloudRGBRenderer,
|
|
19
|
+
* PointCloudStretchRenderer,
|
|
20
|
+
* PointCloudUniqueValueRenderer
|
|
21
|
+
* } from "@arcgis/core/pointCloudRenderers.js";
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* This module also allows you to implement [type guards](https://basarat.gitbook.io/typescript/type-system/typeguard)
|
|
25
|
+
* on renderers, making your code smarter.
|
|
26
|
+
*
|
|
27
|
+
* ```js
|
|
28
|
+
* import { PointCloudRenderer } from "@arcgis/core/pointCloudRenderers.js";
|
|
29
|
+
*
|
|
30
|
+
* function logInfos(renderer: PointCloudRenderer): void {
|
|
31
|
+
* if (renderer.type === "point-cloud-class-breaks") {
|
|
32
|
+
* // new at 4.8, the compiler knows the renderer is a PointCloudClassBreaksRenderer
|
|
33
|
+
* console.log("renderer colorClassBreakInfos: ", renderer.colorClassBreakInfos);
|
|
34
|
+
* }
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @deprecated since version 4.32. Use [unionTypes](https://developers.arcgis.com/javascript/latest/api-reference/esri-unionTypes.html) to import union types, or individual modules to import classes.
|
|
39
|
+
* @since 4.8
|
|
40
|
+
* @see [PointCloudClassBreaksRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-PointCloudClassBreaksRenderer.html)
|
|
41
|
+
* @see [PointCloudRGBRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-PointCloudRGBRenderer.html)
|
|
42
|
+
* @see [PointCloudStretchRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-PointCloudStretchRenderer.html)
|
|
43
|
+
* @see [PointCloudUniqueValueRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-PointCloudUniqueValueRenderer.html)
|
|
44
|
+
*/
|
|
1
45
|
import type PointCloudClassBreaksRendererClass from "./renderers/PointCloudClassBreaksRenderer.js";
|
|
2
46
|
import type PointCloudRGBRendererClass from "./renderers/PointCloudRGBRenderer.js";
|
|
3
47
|
import type PointCloudStretchRendererClass from "./renderers/PointCloudStretchRenderer.js";
|