@arcgis/core 5.0.0-next.71 → 5.0.0-next.72
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/Ground.js +1 -1
- package/applications/Components/analysisUtils.d.ts +1 -2
- package/applications/Components/analysisUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00631252e8bd4a456253.js +1 -0
- package/assets/esri/core/workers/chunks/{322085d63719da6e443c.js → 0c02b084ae30ba138c5d.js} +1 -1
- package/assets/esri/core/workers/chunks/0f2f1731543ed21db0a8.js +1 -0
- package/assets/esri/core/workers/chunks/1b201d83e9ba7d8615c0.js +1 -0
- package/assets/esri/core/workers/chunks/{b4f944ef6c174b20b619.js → 23545a9adc75564ecf6e.js} +1 -1
- package/assets/esri/core/workers/chunks/261b5a5db022ef580a1b.js +1 -0
- package/assets/esri/core/workers/chunks/2bd59ece927b5c1c9f80.js +1 -0
- package/assets/esri/core/workers/chunks/{37e46461da3000949a26.js → 2d8b8880e6bff4414e95.js} +1 -1
- package/assets/esri/core/workers/chunks/2fba74bae99ece15706c.js +1 -0
- package/assets/esri/core/workers/chunks/2fc64404bc42b7250086.js +1 -0
- package/assets/esri/core/workers/chunks/33cbfc34d5e2fc1a1a4f.js +1 -0
- package/assets/esri/core/workers/chunks/35887be3e4a218268d99.js +1 -0
- package/assets/esri/core/workers/chunks/3596ae4cb2bd2f3f35d9.js +1 -0
- package/assets/esri/core/workers/chunks/37814bf052ab59a5fb9e.js +1 -0
- package/assets/esri/core/workers/chunks/4e0d299054da075e5103.js +1 -0
- package/assets/esri/core/workers/chunks/50186162cd6d7c2ef0f9.js +1 -0
- package/assets/esri/core/workers/chunks/543ea1a0e7a6f1d267d1.js +1 -0
- package/assets/esri/core/workers/chunks/{dbfb00fb28b8b9f687a1.js → 5bbf20135c87a1cc8a18.js} +1 -1
- package/assets/esri/core/workers/chunks/5ed31ec0f53c1d55c4ea.js +1 -0
- package/assets/esri/core/workers/chunks/6309e8beedf5e7f2a50f.js +1 -0
- package/assets/esri/core/workers/chunks/{1a45b4b4803337f4b99f.js → 64985e9b6e2edb3ceb37.js} +38 -38
- package/assets/esri/core/workers/chunks/65475370cc4ebe2aa657.js +1 -0
- package/assets/esri/core/workers/chunks/65d9f3bc88472008443a.js +1 -0
- package/assets/esri/core/workers/chunks/6ab0f16f5c8806855c47.js +1 -0
- package/assets/esri/core/workers/chunks/7e37a3005f2ad2c0a918.js +1 -0
- package/assets/esri/core/workers/chunks/7f2496a59379e1a61ee5.js +1 -0
- package/assets/esri/core/workers/chunks/88379cd8e8e1c7ae3c7c.js +1 -0
- package/assets/esri/core/workers/chunks/{25abbe1663e18e677dc2.js → 935a6dccb88557f98189.js} +2 -2
- package/assets/esri/core/workers/chunks/{a808be466812db51813d.js → 9382af94bf6bf1b09c8c.js} +1 -1
- package/assets/esri/core/workers/chunks/{8e83c133b201b9b61e70.js → 979bc762ccc0d3fc2467.js} +1 -1
- package/assets/esri/core/workers/chunks/9c417f4dfb19e4c4bd71.js +1 -0
- package/assets/esri/core/workers/chunks/a554ad74be03b1ed1a72.js +1 -0
- package/assets/esri/core/workers/chunks/{e6e837e43b9348050832.js → a67c86f4254807eb6a05.js} +1 -1
- package/assets/esri/core/workers/chunks/{1ec1a1997b5577619040.js → b211b53aa7616a093b90.js} +1 -1
- package/assets/esri/core/workers/chunks/c31babdb59382b6bc007.js +1 -0
- package/assets/esri/core/workers/chunks/c8182c2cbb0ead202af6.js +1 -0
- package/assets/esri/core/workers/chunks/ce218c10b209b58e04fd.js +1 -0
- package/assets/esri/core/workers/chunks/ceef586d8cc8adc4d249.js +1 -0
- package/assets/esri/core/workers/chunks/d13e8ce9270dc0662b87.js +1 -0
- package/assets/esri/core/workers/chunks/db28d00171240b4fffac.js +1 -0
- package/assets/esri/core/workers/chunks/dbd382546837aa7709e2.js +1 -0
- package/assets/esri/core/workers/chunks/ea6f897f21b4f30e8e99.js +1 -0
- package/assets/esri/core/workers/chunks/{e8a3ad00936f2ccaf362.js → f0a667d8d33bc51c795d.js} +1 -1
- package/assets/esri/core/workers/chunks/{29b09db309ff75fb3e97.js → f65d26588d2d80680a26.js} +1 -1
- package/assets/esri/core/workers/chunks/f72e6c903f55ce95a6c5.js +1 -0
- package/assets/esri/core/workers/chunks/f893e10d660e819cca45.js +1 -0
- package/assets/esri/core/workers/chunks/{878010ca23da0bca9405.js → fb1ed5ef2f95ab093346.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/lyr3DMain.js +1 -1
- package/config.js +1 -1
- package/core/workers/registry.js +1 -1
- package/geometry/spatialReferenceEllipsoidUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/RouteLayer.d.ts +3 -3
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/GeometryDescriptor.js +1 -1
- package/layers/support/layerUtils.d.ts +4 -0
- package/layers/support/types.d.ts +3 -2
- package/package.json +1 -1
- package/rest/featureService/FeatureService.d.ts +1 -1
- package/rest/featureService/types.d.ts +4 -4
- package/rest/geoprocessor/GPOptions.d.ts +5 -5
- package/rest/geoprocessor/execute.d.ts +6 -0
- package/rest/layerSources/DynamicDataLayer.d.ts +2 -2
- package/rest/layerSources/QueryTableDataSource.d.ts +1 -1
- package/rest/print.d.ts +1 -1
- package/rest/support/ClosestFacilityParameters.d.ts +3 -3
- package/rest/support/ClosestFacilitySolveResult.d.ts +2 -2
- package/rest/support/Query.d.ts +2 -2
- package/rest/support/RouteParameters.d.ts +2 -5
- package/rest/support/RouteResult.d.ts +1 -1
- package/rest/support/ServiceAreaParameters.d.ts +1 -1
- package/rest/support/ServiceAreaSolveResult.d.ts +2 -2
- package/rest/support/types.d.ts +1 -1
- package/rest/symbolService.d.ts +2 -2
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementController.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/support/measurementUtils.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/support/Segment.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/VisualVariablePassParameters.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
- package/views/support/MeasurementWorker.js +5 -0
- package/views/support/MeasurementWorkerHandle.js +5 -0
- package/views/support/automaticAreaMeasurementUtils.js +1 -1
- package/views/support/geodesicAreaMeasurementUtils.js +1 -1
- package/views/support/geodesicLengthMeasurementUtils.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/Directions/DirectionsViewModel.d.ts +2 -2
- package/widgets/Search/SearchResultRenderer.d.ts +0 -2
- package/widgets/Search/SearchSource.d.ts +2 -2
- package/widgets/Search/SearchViewModel.d.ts +6 -7
- package/widgets/Search/types.d.ts +4 -4
- package/assets/esri/core/workers/chunks/0367a8580fede8f804f9.js +0 -1
- package/assets/esri/core/workers/chunks/14f4f5b7549cea7b5a6a.js +0 -1
- package/assets/esri/core/workers/chunks/1b475593c80d7bccdda5.js +0 -1
- package/assets/esri/core/workers/chunks/27ec8688f72130239b98.js +0 -1
- package/assets/esri/core/workers/chunks/2dd347aa2a061d536e69.js +0 -1
- package/assets/esri/core/workers/chunks/2f6fa33692478e99d24b.js +0 -1
- package/assets/esri/core/workers/chunks/3e7ea06b342e33bc48a5.js +0 -1
- package/assets/esri/core/workers/chunks/4387aaf9d5e8f6d1833d.js +0 -1
- package/assets/esri/core/workers/chunks/668a868fe2dcb6384ac9.js +0 -1
- package/assets/esri/core/workers/chunks/6acfa51b81e6f4255118.js +0 -1
- package/assets/esri/core/workers/chunks/6f8098f9fe233833245a.js +0 -1
- package/assets/esri/core/workers/chunks/76dbaef0d0794913f36f.js +0 -1
- package/assets/esri/core/workers/chunks/7c5218eae13d3bd30598.js +0 -1
- package/assets/esri/core/workers/chunks/7fc09382f934e9223a9b.js +0 -1
- package/assets/esri/core/workers/chunks/822ef6a043c7e147b4b6.js +0 -1
- package/assets/esri/core/workers/chunks/980313a6c35e79812d17.js +0 -1
- package/assets/esri/core/workers/chunks/9c157c0eeadb824ad01e.js +0 -1
- package/assets/esri/core/workers/chunks/a39ac9127a215d14d412.js +0 -1
- package/assets/esri/core/workers/chunks/a893f8db2477cf677ac8.js +0 -1
- package/assets/esri/core/workers/chunks/a95e28ade258b144cbb5.js +0 -1
- package/assets/esri/core/workers/chunks/abcee7cfd53cfe1d91e9.js +0 -1
- package/assets/esri/core/workers/chunks/b9f0d313f59fc7c43560.js +0 -1
- package/assets/esri/core/workers/chunks/bbe2eaef7edfa33b6eea.js +0 -1
- package/assets/esri/core/workers/chunks/bfdf646d4c8f175a4236.js +0 -1
- package/assets/esri/core/workers/chunks/d749aa62ad694147aebe.js +0 -1
- package/assets/esri/core/workers/chunks/d7d9656b990ce8be2152.js +0 -1
- package/assets/esri/core/workers/chunks/d8a7004c399d539aed09.js +0 -1
- package/assets/esri/core/workers/chunks/df92239eefff04471a0b.js +0 -1
- package/assets/esri/core/workers/chunks/ee2ca25048a920e43743.js +0 -1
- package/assets/esri/core/workers/chunks/eeb24a4ab4993f1f4e8e.js +0 -1
- package/assets/esri/core/workers/chunks/fe5d2735f057c7789f4b.js +0 -1
- package/views/support/GeodesicMeasurementWorker.js +0 -5
- package/views/support/GeodesicMeasurementWorkerHandle.js +0 -5
package/core/workers/registry.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
|
-
const r={CSVSourceWorker:()=>import("../../layers/graphics/sources/support/CSVSourceWorker.js"),EdgeProcessingWorker:()=>import("../../views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js"),ElevationSamplerWorker:()=>import("../../geometry/support/meshUtils/ElevationSamplerWorker.js"),Feature3DPipelineWorker:()=>import("../../views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js"),FeaturePipelineWorker:()=>import("../../views/2d/layers/features/FeaturePipelineWorker.js"),FeatureServiceSnappingSourceWorker:()=>import("../../views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js"),FlowWorker:()=>import("../../views/3d/support/flow/FlowWorker.js"),GaussianSplatSortWorker:()=>import("../../views/3d/support/GaussianSplatSortWorker.js"),
|
|
5
|
+
const r={CSVSourceWorker:()=>import("../../layers/graphics/sources/support/CSVSourceWorker.js"),EdgeProcessingWorker:()=>import("../../views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js"),ElevationSamplerWorker:()=>import("../../geometry/support/meshUtils/ElevationSamplerWorker.js"),Feature3DPipelineWorker:()=>import("../../views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js"),FeaturePipelineWorker:()=>import("../../views/2d/layers/features/FeaturePipelineWorker.js"),FeatureServiceSnappingSourceWorker:()=>import("../../views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js"),FlowWorker:()=>import("../../views/3d/support/flow/FlowWorker.js"),GaussianSplatSortWorker:()=>import("../../views/3d/support/GaussianSplatSortWorker.js"),MeasurementWorker:()=>import("../../views/support/MeasurementWorker.js"),GeoJSONSourceWorker:()=>import("../../layers/graphics/sources/geojson/GeoJSONSourceWorker.js"),LercWorker:()=>import("../../layers/support/LercWorker.js"),Lyr3DWorker:()=>import("../../views/3d/layers/Lyr3DWorker.js"),MemorySourceWorker:()=>import("../../layers/graphics/sources/support/MemorySourceWorker.js"),PBFDecoderWorker:()=>import("../../views/3d/support/PBFDecoderWorker.js"),PanoramicMeshWorker:()=>import("../../widgets/PanoramicViewer/support/PanoramicMeshWorker.js"),ParquetSourceWorker:()=>import("../../layers/graphics/sources/support/ParquetSourceWorker.js"),PointCloudWorker:()=>import("../../views/3d/layers/PointCloudWorker.js"),RasterWorker:()=>import("../../layers/support/RasterWorker.js"),SceneLayerSnappingSourceWorker:()=>import("../../views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js"),SceneLayerWorker:()=>import("../../views/3d/layers/SceneLayerWorker.js"),TextureCompressionWorker:()=>import("../../views/support/TextureCompressionWorker.js"),WFSSourceWorker:()=>import("../../layers/graphics/sources/WFSSourceWorker.js"),WorkerTileHandler:()=>import("../../views/2d/engine/vectorTiles/WorkerTileHandler.js"),arcadeGeometryOperatorsWorker:()=>import("../../arcade/geometry/operatorsWorker.js"),statsWorker:()=>import("../../smartMapping/statistics/support/statsWorker.js")};export{r as registry};
|
|
@@ -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{WGS84ECEFSpatialReferenceLike as e,SphericalPCPFMarsLike as t,SphericalPCPFMoonLike as
|
|
5
|
+
import{WGS84ECEFSpatialReferenceLike as e,SphericalPCPFMarsLike as t,SphericalPCPFMoonLike as n,SphericalECEFSpatialReferenceLike as s}from"./ellipsoidUtils.js";import o from"./SpatialReference.js";import{isWKIDFromMars as i,isWKIDFromMoon as r,equals as l}from"./support/spatialReferenceUtils.js";const p=new o(s),f=new o(t),c=new o(n),a=new o(e);function w(e){return l(e,p)||l(e,a)||l(e,f)||l(e,c)}function u(e){const t=k.get(e);if(t)return t;let n=p;if(e)if(e===f)n=f;else if(e===c)n=c;else{const t=e.wkid,s=e.latestWkid;if(null!=t||null!=s)i(t)||i(s)?n=f:(r(t)||r(s))&&(n=c);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===U?n=f:e===d&&(n=c)}}}return k.set(e,n),n}const k=new Map;function m(){k.clear()}const U=f.wkt.toUpperCase(),d=c.wkt.toUpperCase();export{p as SphericalECEFSpatialReference,f as SphericalPCPFMars,c as SphericalPCPFMoon,a as WGS84ECEFSpatialReference,m as cleanupSpatialReferenceEllipsoidUtils,u as getSphericalPCPF,w as isPCPF};
|
package/kernel.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 has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.
|
|
5
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.72",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
|
@@ -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"../request.js";import r from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s}from"../core/promiseUtils.js";import{on as a,sync as n}from"../core/reactiveUtils.js";import{property as l,subclass as p}from"../core/accessorSupport/decorators.js";import{persistable as m}from"../core/accessorSupport/decorators/persistable.js";import d from"../geometry/Extent.js";import u from"../geometry/SpatialReference.js";import c from"./Layer.js";import{APIKeyMixin as h}from"./mixins/APIKeyMixin.js";import{ArcGISService as f}from"./mixins/ArcGISService.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as S}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as _}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as j,url as T}from"./support/commonProperties.js";import v from"./support/SceneModifications.js";import{initFullExtent as
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import r from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s}from"../core/promiseUtils.js";import{on as a,sync as n}from"../core/reactiveUtils.js";import{property as l,subclass as p}from"../core/accessorSupport/decorators.js";import{persistable as m}from"../core/accessorSupport/decorators/persistable.js";import d from"../geometry/Extent.js";import u from"../geometry/SpatialReference.js";import c from"./Layer.js";import{APIKeyMixin as h}from"./mixins/APIKeyMixin.js";import{ArcGISService as f}from"./mixins/ArcGISService.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as S}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as _}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as j,url as T}from"./support/commonProperties.js";import v from"./support/SceneModifications.js";import{initFullExtent as b}from"./support/tiles3DUtils.js";import w from"../portal/Portal.js";import{logInvalidElevationInfoWarning as x,elevationModeRequiredMessage as L,featureExpressionUnsupportedMessage as P}from"../support/elevationInfoUtils.js";import{f as I}from"../chunks/persistableUrlUtils.js";import{isBasemap as k}from"../support/userTypeGuards/isBasemap.js";import{reader as R}from"../core/accessorSupport/decorators/reader.js";let U=class extends(f(g(S(_(i(y(h(c)))))))){readModifications(e,t,r){this._modificationsSource={url:I(e,r),context:r}}initialize(){this.addHandles(a(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,n))}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=new u({wkid:4326,vcsWkid:115700}),this.fullExtent=new d(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null,this.queryElevationCallback=null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){const t=[e];for(;t?.length>0;){const e=t.pop();if(!e)return;for(const[o,i]of Object.entries(e)){if("uri"===o)try{const e=new URL("https://tmp"+i).searchParams.get("session");if(e)return e}catch(r){}"object"==typeof i&&null!==i&&t.push(i)}}return null}async requestRootAndSession(e){const i=(e,t)=>new r("3dtiles-init:"+e,t);return this._rootRequestPromise||(this._rootRequestPromise=new Promise((r,a)=>{this.url||a(i("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null;new Promise((e,r)=>{if(this.replacesTerrain&&!this._key){const o=this.portalItem?.portal||this.parent?.portalItem?.portal||w.getDefault();o.signIn().then(()=>{o.g3dTilesEnabled?t(o.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>r(i("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):r(i("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+o.url))},()=>r(i("sign-in-failed","Error signing in to Portal")))}else e()}).then(()=>{t(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:e}).then(e=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data))}catch(t){return void a(i("root-parse-failed","Error parsing root tile, details: "+t))}this._rootTilesetJSON?(this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=b(this._rootTilesetJSON),r(),this._rootRequestPromise=null):a(i("root-is-null","Root tile is null."))},e=>{s(e),a(i("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,o.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},e=>a(e))})),this._rootRequestPromise}async _doLoad(e){const t=null!=e?e.signal:null;if(this.isUsedAsGroundLayer&&!has("enable-feature:basemap-groundlayers"))throw new r("3dtiles-init:not-supported-in-groundlayers","Layer is not supported in basemap.");try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new r("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(o){s(o)}if(null!=this._modificationsSource){const t=await v.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}get hasAttributionData(){return!1}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";x(o.getLogger(this),L(t,"absolute-height",e)),x(o.getLogger(this),P(t,e))}get replacesTerrain(){return!!has("enable-feature:basemap-groundlayers")&&this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return k(this.parent)}get hasGoogleUrl(){return!!this.url?.match(/.+\.googleapis.com/)}};e([l({type:["IntegratedMesh3DTilesLayer"]})],U.prototype,"operationalLayerType",void 0),e([l({type:v,clonable:e=>e.clone()}),m({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],U.prototype,"modifications",void 0),e([R(["web-scene","portal-item"],"modifications")],U.prototype,"readModifications",null),e([l({type:u})],U.prototype,"spatialReference",void 0),e([l({type:d})],U.prototype,"fullExtent",void 0),e([l(j)],U.prototype,"elevationInfo",null),e([l({type:["show","hide"]})],U.prototype,"listMode",void 0),e([l(T)],U.prototype,"url",void 0),e([l({readOnly:!0})],U.prototype,"type",void 0),e([l({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],U.prototype,"path",void 0),e([l({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],U.prototype,"minScale",void 0),e([l({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],U.prototype,"maxScale",void 0),e([l({readOnly:!0})],U.prototype,"hasAttributionData",null),e([l()],U.prototype,"replacesTerrain",null),e([l()],U.prototype,"isUsedAsGroundLayer",null),e([l()],U.prototype,"hasGoogleUrl",null),U=e([p("esri.layers.IntegratedMesh3DTilesLayer")],U);const D=U;export{D as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/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/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 u from"../geometry/support/WKIDUnitConversion.js";import{wasmFailedToInit as c,elevQueriesFull as g,elevQueriesGenericFail as m,invalidLayerView as w}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as p}from"./Lyr3DWorkerHandle.js";import{getVCSFromHeightModelInfo as b}from"./support/tiles3DUtils.js";import{loadLyr3DMainWASM as f}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as v}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as D}from"../views/3d/layers/support/makeScheduleFunction.js";const M=3857,L=32662,k=4326,R=5773,S=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:c})}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=f().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=k,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=R;else if(this.view.renderSpatialReference?.isWebMercator)this._viewSR.wkid=this._viewSR.latestWkid=M,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=R;else if(this.view.renderSpatialReference?.wkid===L)this._viewSR.wkid=this._viewSR.latestWkid=k,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=R;else if(!this._viewSR.latestVcsWkid&&!this._viewSR.vcsWkid){const e=b(this.view.heightModelInfo);if(e)this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=e;else{const e=this.view.heightModelInfo?.heightModel,i=!e||"gravity-related-height"===e;this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=i?R:S}}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(D(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)}setMaximumGaussianSplatCount(e){this._lyr3DMain.set_maximum_splat_count(e),this._layers.forEach(e=>{"gaussian-splat-3d"===e.layerView.type&&(e.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=>{const s=i.numGaussians??0;this._lyr3DMain?.on_renderable_created(!0,e.layerId,e.handle,i.memUsageBytes,s),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,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=v(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=u.values[u[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 W=C;export{W 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 y from"../geometry/SpatialReference.js";import{isGeographic as u}from"../geometry/support/spatialReferenceUtils.js";import c from"../geometry/support/WKIDUnitConversion.js";import{wasmFailedToInit as g,elevQueriesFull as m,elevQueriesGenericFail as w,invalidLayerView as p}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as f}from"./Lyr3DWorkerHandle.js";import{getVCSFromHeightModelInfo as b}from"./support/tiles3DUtils.js";import{loadLyr3DMainWASM as v}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as D}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as M}from"../views/3d/layers/support/makeScheduleFunction.js";const L=3857,k=32662,R=4326,S=5773,C=115700;let W=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:g})}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=v().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=R,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=S;else if(this.view.renderSpatialReference?.isWebMercator)this._viewSR.wkid=this._viewSR.latestWkid=L,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=S;else if(this.view.renderSpatialReference?.wkid===k)this._viewSR.wkid=this._viewSR.latestWkid=R,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=S;else if(!this._viewSR.latestVcsWkid&&!this._viewSR.vcsWkid){const e=b(this.view.heightModelInfo);if(e)this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=e;else{const e=this.view.heightModelInfo?.heightModel,i=!e||"gravity-related-height"===e;this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=i?S:C}}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 f(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)}setMaximumGaussianSplatCount(e){this._lyr3DMain.set_maximum_splat_count(e),this._layers.forEach(e=>{"gaussian-splat-3d"===e.layerView.type&&(e.needFrame=!0)})}queryElevation(e,i,t){if(!this._lyr3DMain)return Promise.reject(this._wasmNotLoaded);if(0===i.coordinates.length)return Promise.reject("no coordinates for elevation query");const s="global"===this.view.viewingMode?y.WGS84:this._viewSR.wkid===L?y.WebMercator:y.PlateCarree,r=i.projectSync(s);r&&(i=r);const a=2*i.coordinates.length,n=this._lyr3DMain._malloc(8*a),o=new Float64Array(this._lyr3DMain.HEAPF64.buffer,n,a);for(let y=0;y<i.coordinates.length;++y){const e=i.coordinates[y];o[2*y]=e.x,o[2*y+1]=e.y}const l=t?.maxGeometricError??0,d=this._lyr3DMain.create_elevation_query(e.wasmLayerId,l,n,a);if(this._lyr3DMain._free(n),d===m)return Promise.reject("max mesh elevation query limit exceeded");if(d===w)return Promise.reject("elevation query failed");const h={descriptor:i,signal:t?.signal,resolveCallback:null,rejectCallback:null},_=new Promise((e,i)=>{h.resolveCallback=e,h.rejectCallback=i});return this._elevationQueries.set(d,h),_}_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,i){if(i.isForElevationQuery)return;const t=this._isUpdating(e);e.outstandingJobCount+=1,t||e.layerView.updatingFlagChanged()}_decrementJobCount(e,i){if(i.isForElevationQuery)return;const t=this._isUpdating(e);e.outstandingJobCount-=1;t!==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,t)}_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,t)}_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,e);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,e),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,e)}}_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=>{const s=i.numGaussians??0;this._lyr3DMain?.on_renderable_created(!0,e.layerId,e.handle,i.memUsageBytes,s),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,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:p};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:p,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=D(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=u(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:p})}_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})],W.prototype,"view",void 0),e([h({readOnly:!0})],W.prototype,"isTerrainReady",null),W=e([_("esri.layers.Lyr3DWasmPerSceneView")],W);const V=W;export{V as default};
|
package/layers/RouteLayer.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ export interface RouteLayerProperties extends LayerProperties, PortalLayerProper
|
|
|
85
85
|
stops?: ReadonlyArrayOrCollection<StopProperties>;
|
|
86
86
|
/**
|
|
87
87
|
* The title of the layer used to identify it in places such as the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html)
|
|
88
|
-
* and [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) widgets and in the portal item created by
|
|
88
|
+
* and [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) widgets and in the portal item created by [saveAs()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-RouteLayer.html#saveAs).
|
|
89
89
|
*
|
|
90
90
|
* The title will default to the name of the solved route or "Route" if unsolved.
|
|
91
91
|
*/
|
|
@@ -233,7 +233,7 @@ export default class RouteLayer extends RouteLayerSuperclass {
|
|
|
233
233
|
set stops(value: ReadonlyArrayOrCollection<StopProperties>);
|
|
234
234
|
/**
|
|
235
235
|
* The title of the layer used to identify it in places such as the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html)
|
|
236
|
-
* and [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) widgets and in the portal item created by
|
|
236
|
+
* and [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) widgets and in the portal item created by [saveAs()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-RouteLayer.html#saveAs).
|
|
237
237
|
*
|
|
238
238
|
* The title will default to the name of the solved route or "Route" if unsolved.
|
|
239
239
|
*/
|
|
@@ -358,7 +358,7 @@ export default class RouteLayer extends RouteLayerSuperclass {
|
|
|
358
358
|
*/
|
|
359
359
|
saveAs(portalItem: PortalItem, options?: LayerSaveAsOptions): Promise<PortalItem>;
|
|
360
360
|
/**
|
|
361
|
-
* This method will solve the route using the route service referenced by
|
|
361
|
+
* This method will solve the route using the route service referenced by [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-RouteLayer.html#url)
|
|
362
362
|
* and the network objects [pointBarriers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-RouteLayer.html#pointBarriers), [polylineBarriers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-RouteLayer.html#polylineBarriers),
|
|
363
363
|
* [polygonBarriers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-RouteLayer.html#polygonBarriers), and [stops](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-RouteLayer.html#stops).
|
|
364
364
|
*
|
|
@@ -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{result as e}from"../../core/asyncUtils.js";import t from"../../core/Error.js";import{assertIsSome as n}from"../../core/maybe.js";import{whenOrAbort as a,throwIfAbortError as o}from"../../core/promiseUtils.js";import{getMetersPerUnitForSR as i}from"../../core/units.js";import{initializeProjection as l,project as r}from"../../geometry/projectionUtils.js";import{fromExtent as s}from"../../geometry/support/aaBoundingRect.js";import{GeometryQueryContext as c,ExtentQueryContext as u,isTileInfoTilemapCache as m,getLods as f}from"./ElevationQueryContext.js";import{ElevationTile as p}from"./ElevationTile.js";import{GeometryDescriptor as y}from"./GeometryDescriptor.js";import{TileElevationSampler as w}from"./TileElevationSampler.js";import{TileKey as d}from"./TileKey.js";async function h(e,n,a){if(e=a?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice(),!e.length)throw new t(
|
|
5
|
+
import{result as e}from"../../core/asyncUtils.js";import t from"../../core/Error.js";import{assertIsSome as n}from"../../core/maybe.js";import{whenOrAbort as a,throwIfAbortError as o}from"../../core/promiseUtils.js";import{getMetersPerUnitForSR as i}from"../../core/units.js";import{initializeProjection as l,project as r}from"../../geometry/projectionUtils.js";import{fromExtent as s}from"../../geometry/support/aaBoundingRect.js";import{GeometryQueryContext as c,ExtentQueryContext as u,isTileInfoTilemapCache as m,getLods as f}from"./ElevationQueryContext.js";import{ElevationTile as p}from"./ElevationTile.js";import{GeometryDescriptor as y}from"./GeometryDescriptor.js";import{TileElevationSampler as w}from"./TileElevationSampler.js";import{TileKey as d}from"./TileKey.js";async function h(e,n,a){if(e=a?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice(),!e.length)throw new t(O,"Elevation queries require at least one elevation layer to fetch tiles from");const o=y.fromGeometry(n),i={...j,...a,returnSampleInfo:!0},l=e.pop(),r=await v(l,o,i),s=await I(e,r,i);return s.geometry=s.geometry.export(),a?.returnSampleInfo||delete s.sampleInfo,s}async function v(e,n,a){if(!e)throw new t(O,"Elevation queries require an elevation layer to fetch tiles from");if(!n||!(n instanceof y)&&"point"!==n.type&&"multipoint"!==n.type&&"polyline"!==n.type)throw new t("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const o={...j,...a},i=o.signal;if("integrated-mesh-3dtiles"===e.type){const t=y.fromGeometry(n);if(e.queryElevationCallback&&e.replacesTerrain){const a=await e.queryElevationCallback(t,{signal:i,maxGeometricError:0}),o=t.coordinates.map(()=>({demResolution:1,source:e})),l=await a.project(n.spatialReference,i);if(l){return{geometry:l.export(),noDataValue:Number.MAX_VALUE,sampleInfo:o}}}const a=t.coordinates.map(()=>({demResolution:-1,source:e}));return{geometry:t.export(),noDataValue:Number.MAX_VALUE,sampleInfo:a}}const l=new c(e,n.spatialReference,o);return await e.load({signal:i}),await V(l,n,i),await x(l,i),await k(l,i),$(l),G(l,i)}async function g(e,n,a){if(e=Array.isArray(e)?e:[e],0===(e=a?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new t(O,"Elevation queries require at least one elevation layer to fetch tiles from");if(!n||"extent"!==n.type)throw new t("elevation-query:invalid-extent","Invalid or undefined extent");const o={...j,...a,returnSampleInfo:!0},i=T(e[e.length-1],n,o);if(1===e.length)return i;return E(e,n,await i,o)}async function T(e,t,n,a){const o=n.signal;await e.load({signal:o});const i=t.spatialReference,s=e.tileInfo.spatialReference;i.equals(s)||(await l([{source:i,dest:s}],{signal:o}),t=r(t,s));const c=new u(e,t,n,a);await x(c,o),await k(c,o);const m=c.elevationTiles,f=c.layer.tileInfo,p=c.parameters.noDataValue;return new w({noDataValue:p,tiles:m,tileInfo:f})}async function E(e,t,n,a){if(e.pop(),!e.length)return n;const o=n.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>s(e.extent)),i=await T(e[e.length-1],t,a,o);if(0===i.samplers.length)return n;const l=n.samplers.concat(i.samplers),r=a.noDataValue;return E(e,t,new w({samplers:l,noDataValue:r}),a)}async function I(e,t,a){const o=t.geometry.coordinates,i=t.sampleInfo;n(i);const l=new Array,r=new Array;for(let n=0;n<o.length;n++){i[n].demResolution<0&&e.length&&(l.push(o[n]),r.push(n))}const s=e.pop();if(null==s||0===l.length)return t;const c=t.geometry.clone(l),u=await v(s,c,a),m=u.sampleInfo;if(!m)throw new Error("no sampleInfo");return r.forEach((e,t)=>{o[e].z=u.geometry.coordinates[t].z,i[e].demResolution=m[t].demResolution,i[e].source=m[t].source}),I(e,t,a)}async function x(e,n){"geometry"===e.type&&C(e);const a=e.parameters.demResolution;if("number"==typeof a)F(e,a);else if("finest-contiguous"===a)await R(e,n);else{if("auto"!==a)throw new t("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${a}', expected a number, "finest-contiguous" or "auto"`);await q(e,n)}}async function R(e,t){const{tileInfo:n,tilemapCache:a}=e.layer,o=A(n,a,e.parameters.minDemResolution);await D(e,o,t)}async function D(e,n,i){const l=e.layer;if(e.selectTilesAtLOD(n),n<0)return;const r=l.tilemapCache,s=e.getTilesToFetch();try{if(r&&!m(r))await a(Promise.all(s.map(e=>r.fetchAvailability(e.level,e.row,e.col,{signal:i}))),i);else if(await k(e,i),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new t("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(c){o(c),await D(e,n-1,i)}}async function q(t,n){L(t),U(t);const i=t.layer.tilemapCache;if(!i||m(i))return b(t,n);const l=t.getTilesToFetch(),r={},s=l.map(async t=>{const a=new d(0,0,0),l=await e(i.fetchAvailabilityUpsample(t.level,t.row,t.col,a,{signal:n}));!1!==l.ok?null!=t.id&&(r[t.id]=a):o(l.error)});await a(Promise.all(s),n),t.remapTiles(r)}async function b(e,t){const n=e.layer.tileInfo;await k(e,t);let a=!1;e.forEachTileToFetch((e,t)=>{n.upsampleTile(e)?a=!0:t()}),a&&await b(e,t)}function A(e,t,n=0){const a=f(e,t);let o=a.length-1;if(n>0){const t=n/i(e.spatialReference),l=a.findIndex(e=>e.resolution<t);0===l?o=0:l>0&&(o=l-1)}return o}const j={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0,signal:null};async function V(e,n,a){let o;const i=e.layer.tileInfo.spatialReference;if(n instanceof y?o=await n.project(i,a):(await l([{source:n.spatialReference,dest:i}],{signal:a}),o=r(n,i)),!o)throw new t("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${n.spatialReference.wkid}' on an elevation service in '${i.wkid}'`);e.geometry=y.fromGeometry(o)}function C(e){if(null==e.layer.fullExtent)return;const t=new p(new d(-1,-1,-1));t.sample=()=>e.parameters.noDataValue,e.outsideExtentTile=t;const n=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const a=e.x,o=e.y;(a<n.xmin||a>n.xmax||o<n.ymin||o>n.ymax)&&(e.elevationTile=t)})}function S(e,t){const{tileInfo:n,tilemapCache:a}=e.layer,o=t/i(n.spatialReference),l=f(n,a);let r=l[0],s=0;for(let i=1;i<l.length;i++){const e=l[i];Math.abs(e.resolution-o)<Math.abs(r.resolution-o)&&(r=e,s=i)}return s}function F(e,t){const n=S(e,t);e.selectTilesAtLOD(n)}function L(e){const{tileInfo:t,tilemapCache:n}=e.layer,a=A(t,n,e.parameters.minDemResolution);e.selectTilesAtLOD(a,e.parameters.maximumAutoTileRequests)}async function k(e,t){const n=e.getTilesToFetch(),o={},i=e.parameters.cache,l=e.parameters.noDataValue,r={noDataValue:l,signal:t},s=n.map(async t=>{if(null==t.id)return;const n=`${e.layer.uid}:${t.id}:${l}`,a=i?.get(n),s=a??await e.layer.fetchTile(t.level,t.row,t.col,r);i?.put(n,s),o[t.id]=new p(t,s)});await a(Promise.allSettled(s),t),e.populateElevationTiles(o)}function U(e){const t=e.layer.tileInfo;let n=0;const a={},o=e=>{null!=e.id&&(e.id in a?a[e.id]++:(a[e.id]=1,n++))},i=e=>{if(null==e.id)return;const t=a[e.id];1===t?(delete a[e.id],n--):a[e.id]=t-1};e.forEachTileToFetch(o,i);let l=!0;for(;l&&(l=!1,e.forEachTileToFetch(a=>{n<=e.parameters.maximumAutoTileRequests||(i(a),t.upsampleTile(a)&&(l=!0),o(a))},i),l););}function $(e){e.geometry.coordinates.forEach(t=>{const n=t.elevationTile;let a=e.parameters.noDataValue;if(n){const e=n.sample(t.x,t.y);null==e?t.elevationTile=null:a=e}t.z=a})}async function G(e,t){const a=await e.geometry.project(e.outSpatialReference,t);n(a);const o={geometry:a.export(),noDataValue:e.parameters.noDataValue};return e.parameters.returnSampleInfo&&(o.sampleInfo=M(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),o}function M(e){const t=e.layer.tileInfo,n=i(t.spatialReference);return e.geometry.coordinates.map(a=>{let o=-1;if(a.elevationTile&&a.elevationTile!==e.outsideExtentTile){o=t.lodAt(a.elevationTile.key.level).resolution*n}return{demResolution:o,source:-1===o?void 0:e.layer}})}const O="elevation-query:invalid-layer";export{O as InvalidLayerError,g as createSampler,j as defaultOptions,A as getFinestLodIndex,v as query,h as queryAll};
|
|
@@ -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 e from"../../geometry/Multipoint.js";import t from"../../geometry/Point.js";import s from"../../geometry/Polyline.js";import{initializeProjection as n,project as o}from"../../geometry/projectionUtils.js";class r{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new r(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(t,s){if(this.spatialReference.equals(t))return this.clone();await n([{source:this.spatialReference,dest:t}],{signal:s});const r=new e({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=o(r,t);if(!i)return null;const a=this.coordinates.map((e,t)=>{const s=e.clone(),n=i.points[t];return s.x=n[0],s.y=n[1],s}),c=this.clone(a);return c.spatialReference=t,c}static fromGeometry(n){const o=new r(n);if(n instanceof r)return o.coordinates=n.coordinates.map(e=>e.clone()),o._exporter=(e,t)=>{const s=n.clone(e);return s.spatialReference=t,s},o;switch(n.type){case"point":{const e=n,{hasZ:s,hasM:r}=e;return o.coordinates=s&&r?[new i(e.x,e.y,e.z,e.m)]:s?[new i(e.x,e.y,e.z)]:r?[new i(e.x,e.y,null,e.m)]:[new i(e.x,e.y)],o._exporter=(e,s)=>n.hasM?new t(e[0].x,e[0].y,e[0].z,e[0].m,s):new t(e[0].x,e[0].y,e[0].z,s),o}case"multipoint":{const t=n,{hasZ:s,hasM:r}=t;return o.coordinates=s&&r?t.points.map(e=>new i(e[0],e[1],e[2],e[3])):s?t.points.map(e=>new i(e[0],e[1],e[2])):r?t.points.map(e=>new i(e[0],e[1],null,e[2])):t.points.map(e=>new i(e[0],e[1])),o._exporter=(t,s)=>n.hasM?new e({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:s}):new e({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:s}),o}case"polyline":{const e=n,t=[],r=[],{hasZ:a,hasM:c}=n;let p=0;for(const s of e.paths)if(r.push([p,p+s.length]),p+=s.length,a&&c)for(const e of s)t.push(new i(e[0],e[1],e[2],e[3]));else if(a)for(const e of s)t.push(new i(e[0],e[1],e[2]));else if(c)for(const e of s)t.push(new i(e[0],e[1],null,e[2]));else for(const e of s)t.push(new i(e[0],e[1]));return o.coordinates=t,o._exporter=(e,t)=>{const o=n.hasM?e.map(e=>[e.x,e.y,e.z??0,e.m??0]):e.map(e=>[e.x,e.y,e.z??0]),i=r.map(e=>o.slice(e[0],e[1]));return new s({paths:i,hasM:n.hasM,hasZ:!0,spatialReference:t})},o}}}}class i{constructor(e,t,s=null,n=null,o=null,r=null){this.x=e,this.y=t,this.z=s,this.m=n,this.tile=o,this.elevationTile=r}clone(){return new i(this.x,this.y,this.z,this.m)}}export{i as Coordinate,r as GeometryDescriptor};
|
|
5
|
+
import e from"../../geometry/Multipoint.js";import t from"../../geometry/Point.js";import s from"../../geometry/Polyline.js";import{initializeProjection as n,project as o}from"../../geometry/projectionUtils.js";class r{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new r(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(t,s){if(this.spatialReference.equals(t))return this.clone();await n([{source:this.spatialReference,dest:t}],{signal:s});const r=new e({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=o(r,t);if(!i)return null;const a=this.coordinates.map((e,t)=>{const s=e.clone(),n=i.points[t];return s.x=n[0],s.y=n[1],s}),c=this.clone(a);return c.spatialReference=t,c}projectSync(t){if(this.spatialReference.equals(t))return this.clone();const s=new e({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),n=o(s,t);if(!n)return null;const r=this.coordinates.map((e,t)=>{const s=e.clone(),o=n.points[t];return s.x=o[0],s.y=o[1],s}),i=this.clone(r);return i.spatialReference=t,i}static fromGeometry(n){const o=new r(n);if(n instanceof r)return o.coordinates=n.coordinates.map(e=>e.clone()),o._exporter=(e,t)=>{const s=n.clone(e);return s.spatialReference=t,s},o;switch(n.type){case"point":{const e=n,{hasZ:s,hasM:r}=e;return o.coordinates=s&&r?[new i(e.x,e.y,e.z,e.m)]:s?[new i(e.x,e.y,e.z)]:r?[new i(e.x,e.y,null,e.m)]:[new i(e.x,e.y)],o._exporter=(e,s)=>n.hasM?new t(e[0].x,e[0].y,e[0].z,e[0].m,s):new t(e[0].x,e[0].y,e[0].z,s),o}case"multipoint":{const t=n,{hasZ:s,hasM:r}=t;return o.coordinates=s&&r?t.points.map(e=>new i(e[0],e[1],e[2],e[3])):s?t.points.map(e=>new i(e[0],e[1],e[2])):r?t.points.map(e=>new i(e[0],e[1],null,e[2])):t.points.map(e=>new i(e[0],e[1])),o._exporter=(t,s)=>n.hasM?new e({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:s}):new e({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:s}),o}case"polyline":{const e=n,t=[],r=[],{hasZ:a,hasM:c}=n;let p=0;for(const s of e.paths)if(r.push([p,p+s.length]),p+=s.length,a&&c)for(const e of s)t.push(new i(e[0],e[1],e[2],e[3]));else if(a)for(const e of s)t.push(new i(e[0],e[1],e[2]));else if(c)for(const e of s)t.push(new i(e[0],e[1],null,e[2]));else for(const e of s)t.push(new i(e[0],e[1]));return o.coordinates=t,o._exporter=(e,t)=>{const o=n.hasM?e.map(e=>[e.x,e.y,e.z??0,e.m??0]):e.map(e=>[e.x,e.y,e.z??0]),i=r.map(e=>o.slice(e[0],e[1]));return new s({paths:i,hasM:n.hasM,hasZ:!0,spatialReference:t})},o}}}}class i{constructor(e,t,s=null,n=null,o=null,r=null){this.x=e,this.y=t,this.z=s,this.m=n,this.tile=o,this.elevationTile=r}clone(){return new i(this.x,this.y,this.z,this.m)}}export{i as Coordinate,r as GeometryDescriptor};
|
|
@@ -10,7 +10,8 @@ import type ParquetGeometryEncodingLocation from "./ParquetGeometryEncodingLocat
|
|
|
10
10
|
import type ParquetGeometryEncodingWkb from "./ParquetGeometryEncodingWkb.js";
|
|
11
11
|
import type RangeDomain from "./RangeDomain.js";
|
|
12
12
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
13
|
-
import type {
|
|
13
|
+
import type { QueryRelatedCapabilities } from "../types.js";
|
|
14
|
+
import type { GroundLayer } from "./layerUtils.js";
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Supported field types.
|
|
@@ -734,5 +735,5 @@ export interface ElevationQuerySampleInfo {
|
|
|
734
735
|
*
|
|
735
736
|
* @since 5.0
|
|
736
737
|
*/
|
|
737
|
-
source?:
|
|
738
|
+
source?: GroundLayer;
|
|
738
739
|
}
|
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@ export default class FeatureService extends FeatureServiceSuperclass {
|
|
|
43
43
|
/**
|
|
44
44
|
* Indicates whether the instance has loaded. When `true`,
|
|
45
45
|
* the properties of the object can be accessed. A WebMap is considered loaded
|
|
46
|
-
* when its
|
|
46
|
+
* when its [WebDocument2D#layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebDocument2D.html#layers) and [WebDocument2D#basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebDocument2D.html#basemap) are created, but not
|
|
47
47
|
* yet loaded.
|
|
48
48
|
*
|
|
49
49
|
* @default false
|
|
@@ -137,7 +137,7 @@ export interface OperationCapabilities {
|
|
|
137
137
|
*/
|
|
138
138
|
supportsEditing: boolean;
|
|
139
139
|
/**
|
|
140
|
-
* Indicates if features in the service can be
|
|
140
|
+
* Indicates if features in the service can be queried.
|
|
141
141
|
*
|
|
142
142
|
* @since 5.0
|
|
143
143
|
*/
|
|
@@ -272,7 +272,7 @@ export interface ServiceCapabilities {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
/**
|
|
275
|
-
* Results returned from the
|
|
275
|
+
* Results returned from the [createFeatureServices()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-featureService-utils.html#createFeatureServices) method.
|
|
276
276
|
*
|
|
277
277
|
* @since 4.28
|
|
278
278
|
*/
|
|
@@ -547,14 +547,14 @@ export interface ServiceEditsIdentifierFields {
|
|
|
547
547
|
export interface ServiceEditOptions {
|
|
548
548
|
/**
|
|
549
549
|
* The geodatabase version to apply the edits. This parameter applies only if the
|
|
550
|
-
*
|
|
550
|
+
* [capabilities.data.isDataVersioned](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-featureService-types.html#DataCapabilities) property of the layer is `true`.
|
|
551
551
|
*
|
|
552
552
|
* @since 5.0
|
|
553
553
|
*/
|
|
554
554
|
gdbVersion?: string;
|
|
555
555
|
/**
|
|
556
556
|
* Indicates whether the edits can be applied using globalIds of features or attachments.
|
|
557
|
-
* This parameter applies only if the layer's
|
|
557
|
+
* This parameter applies only if the layer's [capabilities.editing.supportsGlobalId](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-featureService-types.html#EditingCapabilities) property is `true`.
|
|
558
558
|
* When `false`, globalIds submitted with the features are ignored and the service assigns new globalIds
|
|
559
559
|
* to the new features. When `true`, the globalIds must be submitted with the new features. When updating existing features, if the `globalIdUsed` is
|
|
560
560
|
* `false`, the objectIds of the features to be updated must be provided. If the `globalIdUsed` is `true`, globalIds of features to be updated must be provided.
|
|
@@ -23,11 +23,11 @@ export default abstract class GPOptions extends Accessor {
|
|
|
23
23
|
set processExtent(value: ExtentProperties | null | undefined);
|
|
24
24
|
/**
|
|
25
25
|
* The spatial reference that the model will use to perform geometry operations.
|
|
26
|
-
* If `processSpatialReference` is specified and
|
|
26
|
+
* If `processSpatialReference` is specified and [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geoprocessor-GPOptions.html#outSpatialReference)
|
|
27
27
|
* is not specified, the output geometries will be in the spatial reference of the process
|
|
28
28
|
* spatial reference.
|
|
29
29
|
*
|
|
30
|
-
* A possible common scenario for using `processSpatialReference` and `
|
|
30
|
+
* A possible common scenario for using `processSpatialReference` and `outSpatialReference` is
|
|
31
31
|
* that you would like to perform spatial operations like buffer or clip on a projected coordinate
|
|
32
32
|
* system such as web mercator. And you would like to recieve the output based on a geographic
|
|
33
33
|
* coordinates such as WGS84.
|
|
@@ -37,7 +37,7 @@ export default abstract class GPOptions extends Accessor {
|
|
|
37
37
|
/**
|
|
38
38
|
* When `true`, individual values in a value table will be prefixed with the associated column name.
|
|
39
39
|
* If false, the default, a value table will consist as a two dimensional array of values.
|
|
40
|
-
* This property is referenced by
|
|
40
|
+
* This property is referenced by [execute](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geoprocessor-execute.html) and [JobInfo#fetchResultData()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-JobInfo.html#fetchResultData).
|
|
41
41
|
*
|
|
42
42
|
* @default false
|
|
43
43
|
* @since 4.29
|
|
@@ -46,7 +46,7 @@ export default abstract class GPOptions extends Accessor {
|
|
|
46
46
|
accessor returnColumnName: boolean;
|
|
47
47
|
/**
|
|
48
48
|
* When `true`, a parameter value of type `"feature-record-set-layer"` will be returned as a [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html)
|
|
49
|
-
* rather than a [feature set](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html). This property is referenced by
|
|
49
|
+
* rather than a [feature set](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html). This property is referenced by [execute](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geoprocessor-execute.html)
|
|
50
50
|
* and [JobInfo#fetchResultData()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-JobInfo.html#fetchResultData). The default is false.
|
|
51
51
|
*
|
|
52
52
|
* @default false
|
|
@@ -56,7 +56,7 @@ export default abstract class GPOptions extends Accessor {
|
|
|
56
56
|
*/
|
|
57
57
|
accessor returnFeatureCollection: boolean;
|
|
58
58
|
/**
|
|
59
|
-
* Returns geometry with measures when [LastMileDeliveryParameters#routeShape](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-LastMileDeliveryParameters.html#routeShape)
|
|
59
|
+
* Returns geometry with measures when [LastMileDeliveryParameters#routeShape](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-LastMileDeliveryParameters.html#routeShape) is `shape-with-measures`. If `true`, m-values will be included in the results if the features have m-values; otherwise, m-values are not returned. The default is false.
|
|
60
60
|
*
|
|
61
61
|
* @default false
|
|
62
62
|
*/
|
|
@@ -40,10 +40,10 @@ export interface DynamicDataLayerProperties extends JSONSupportMixinProperties {
|
|
|
40
40
|
*
|
|
41
41
|
* Data source | Description
|
|
42
42
|
* ------------|------------
|
|
43
|
-
* [TableDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-layerSources-TableDataSource.html) | A feature class with geometries or table without geometries. When a table data source does not contain geometries, it may be used as one of the sources in a
|
|
43
|
+
* [TableDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-layerSources-TableDataSource.html) | A feature class with geometries or table without geometries. When a table data source does not contain geometries, it may be used as one of the sources in a [join operation](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-layerSources-JoinTableDataSource.html). Feature class tables may be used on their own since they contain a geometry field.
|
|
44
44
|
* [QueryTableDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-layerSources-QueryTableDataSource.html) | A feature class or table that may be queried on the fly with a SQL where clause. This data source is useful for scenarios where you have a table containing unique geometries and another table with multiple records that match to each geometry. You can use the QueryTableDataSource to select only a subset of those matching records (so records in both tables have a one-to-one relationship with each other) and join them to the table with geometries.
|
|
45
45
|
* [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-layerSources-RasterDataSource.html) | A raster dataset used for visualization purposes only.
|
|
46
|
-
*
|
|
46
|
+
* [JoinTableDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-layerSources-JoinTableDataSource.html) | This data source consists of two data sources joined by a common attribute or key. The left table data source typically contains geometries, while the right source may be a table or query table without geometries.
|
|
47
47
|
*
|
|
48
48
|
* @since 5.0
|
|
49
49
|
* @see [Sample - MapImageLayer: toggle sublayer visibility](https://developers.arcgis.com/javascript/latest/sample-code/layers-mapimagelayer-sublayers/)
|
|
@@ -60,7 +60,7 @@ export default class QueryTableDataSource extends JSONSupport {
|
|
|
60
60
|
/**
|
|
61
61
|
* The field name(s) containing the unique IDs for each
|
|
62
62
|
* record in the table. This can be a comma separated list if the query table is used
|
|
63
|
-
* in a
|
|
63
|
+
* in a [JoinTableDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-layerSources-JoinTableDataSource.html).
|
|
64
64
|
*
|
|
65
65
|
* @since 5.0
|
|
66
66
|
*/
|
package/rest/print.d.ts
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* > Printing layers with non-standard URLs (e.g. no MapServer, FeatureServer, or ImageServer in the URL) requires ArcGIS Server 10.9.1 or later.
|
|
47
47
|
* > Printing layers with supported [blendModes](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) requires ArcGIS Server 10.9.1 or later. This is the list of currently supported types:
|
|
48
48
|
* > `"color-burn"`, `"color-dodge"`, `"color"`, `"darken"`, `"difference"`, `"exclusion"`, `"hard-light"`, `"hue"`, `"lighten"`, `"luminosity"`, `"multiply"`, `"normal"`, `"overlay"`, `"saturation"`, `"screen"`, `"soft-light"`.
|
|
49
|
-
* > Printing highlighted features with [SimpleFillSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html) with
|
|
49
|
+
* > Printing highlighted features with [SimpleFillSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html) with [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight) requires ArcGIS Server 11.4.0 or higher.
|
|
50
50
|
* > For printing [CatalogLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CatalogLayer.html) the catalog footprint is sent as a feature collection if the ArcGIS Server version is less than 11.3.1.
|
|
51
51
|
* > Otherwise, it's sent as a CatalogLayer with the `dynamicGroupLayer` visibility set to `false`. The other layers from the CatalogLayer are sent separately.
|
|
52
52
|
* >
|
|
@@ -135,9 +135,9 @@ export default class ClosestFacilityParameters extends ClosestFacilityParameters
|
|
|
135
135
|
* for multiple facilities.
|
|
136
136
|
*
|
|
137
137
|
* The unit for this parameter is based on the unit of the impedance attribute specified using the
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
138
|
+
* [impedanceAttribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ClosestFacilityParameters.html#impedanceAttribute) parameter or the
|
|
139
|
+
* [TravelMode#impedanceAttributeName](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-TravelMode.html#impedanceAttributeName) of the
|
|
140
|
+
* [travel mode](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-TravelMode.html) if travel mode is specified . If the
|
|
141
141
|
* impedanceAttributeName parameter is TravelTime, the defaultCutoff is specified in minutes. Otherwise, the value is
|
|
142
142
|
* specified in miles or kilometers based on whether the impedanceAttributeName is set to Miles or Kilometers,
|
|
143
143
|
* respectively.
|
|
@@ -55,7 +55,7 @@ export interface ClosestFacilitySolveResultProperties extends JSONSupportMixinPr
|
|
|
55
55
|
messages?: NAMessageProperties[] | null;
|
|
56
56
|
/**
|
|
57
57
|
* A set of features representing point barriers.
|
|
58
|
-
* Point barriers are returned if
|
|
58
|
+
* Point barriers are returned if [ClosestFacilityParameters#returnPointBarriers](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ClosestFacilityParameters.html#returnPointBarriers)
|
|
59
59
|
* is set to `true` in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-closestFacility.html#solve) request.
|
|
60
60
|
*
|
|
61
61
|
* @see [barriers](https://developers.arcgis.com/rest/services-reference/enterprise/closest-facility-sync-services/#barriers-1)
|
|
@@ -177,7 +177,7 @@ export default class ClosestFacilitySolveResult extends JSONSupport {
|
|
|
177
177
|
set messages(value: NAMessageProperties[] | null | undefined);
|
|
178
178
|
/**
|
|
179
179
|
* A set of features representing point barriers.
|
|
180
|
-
* Point barriers are returned if
|
|
180
|
+
* Point barriers are returned if [ClosestFacilityParameters#returnPointBarriers](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ClosestFacilityParameters.html#returnPointBarriers)
|
|
181
181
|
* is set to `true` in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-closestFacility.html#solve) request.
|
|
182
182
|
*
|
|
183
183
|
* @see [barriers](https://developers.arcgis.com/rest/services-reference/enterprise/closest-facility-sync-services/#barriers-1)
|
package/rest/support/Query.d.ts
CHANGED
|
@@ -709,8 +709,8 @@ export default class Query extends QuerySuperclass {
|
|
|
709
709
|
* > **Known Limitations**
|
|
710
710
|
* >
|
|
711
711
|
* > [FeatureLayerView#queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures),
|
|
712
|
-
* >
|
|
713
|
-
* >
|
|
712
|
+
* > [GeoJSONLayerView#queryFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerViewMixin.html#queryFeatures), and
|
|
713
|
+
* > [OGCFeatureLayerView#queryFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerViewMixin.html#queryFeatures) results do not
|
|
714
714
|
* > include the z-values when called in [2D MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) even if `returnZ` is set to `true`.
|
|
715
715
|
*/
|
|
716
716
|
accessor returnZ: boolean | null | undefined;
|
|
@@ -570,8 +570,7 @@ export default class RouteParameters extends RouteParametersSuperclass {
|
|
|
570
570
|
*/
|
|
571
571
|
accessor stops: (NetworkInput | Collection<Stop>) | null | undefined;
|
|
572
572
|
/**
|
|
573
|
-
* Specify whether the
|
|
574
|
-
* {@link rest/stop#timeWindowEnd} property values on [stops](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#stops) are specified in UTC
|
|
573
|
+
* Specify whether the time window start and end property values on [stops](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#stops) are in UTC
|
|
575
574
|
* or geographically local time.
|
|
576
575
|
*
|
|
577
576
|
* @since 4.24
|
|
@@ -634,9 +633,7 @@ export default class RouteParameters extends RouteParametersSuperclass {
|
|
|
634
633
|
accessor useHierarchy: boolean | null | undefined;
|
|
635
634
|
/**
|
|
636
635
|
* Use this property to indicate whether the operation should consider time windows specified on the [stops](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#stops)
|
|
637
|
-
* when finding the best route. The time windows are specified on stops using
|
|
638
|
-
* {@link rest/stop#timeWindowStart} and
|
|
639
|
-
* {@link rest/stop#timeWindowEnd} properties.
|
|
636
|
+
* when finding the best route. The time windows are specified on stops using start and end time window properties.
|
|
640
637
|
*
|
|
641
638
|
* @see [useTimeWindows](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#usetimewindows)
|
|
642
639
|
*/
|
|
@@ -95,7 +95,7 @@ export interface RouteResultProperties extends JSONSupportMixinProperties, Parti
|
|
|
95
95
|
* @see [route](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-route.html)
|
|
96
96
|
* @see [RouteParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html)
|
|
97
97
|
* @see [RouteSolveResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteSolveResult.html)
|
|
98
|
-
* @see
|
|
98
|
+
* @see [Directions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html)
|
|
99
99
|
* @see [Output parameters](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#output-parameters)
|
|
100
100
|
*/
|
|
101
101
|
export default abstract class RouteResult extends JSONSupport {
|
|
@@ -248,7 +248,7 @@ export default class ServiceAreaParameters extends ServiceAreaParametersSupercla
|
|
|
248
248
|
outputGeometryPrecisionUnits?: LengthUnit | null;
|
|
249
249
|
/**
|
|
250
250
|
* Use this property to specify the type of route features that are output by the operation. This parameter is
|
|
251
|
-
* applicable only
|
|
251
|
+
* applicable only when route features are included in the result.
|
|
252
252
|
*
|
|
253
253
|
* Possible Value | Description
|
|
254
254
|
* ------------------------|------------------------
|
|
@@ -17,7 +17,7 @@ export interface ServiceAreaSolveResultProperties extends JSONSupportMixinProper
|
|
|
17
17
|
messages?: NAMessageProperties[] | null;
|
|
18
18
|
/**
|
|
19
19
|
* A set of features representing point barriers.
|
|
20
|
-
* Point barriers are returned if
|
|
20
|
+
* Point barriers are returned if [ServiceAreaParameters#returnPointBarriers](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ServiceAreaParameters.html#returnPointBarriers)
|
|
21
21
|
* is set to `true` in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-serviceArea.html#solve) request.
|
|
22
22
|
*
|
|
23
23
|
* @see [barriers](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#barriers-1)
|
|
@@ -79,7 +79,7 @@ export default class ServiceAreaSolveResult extends JSONSupport {
|
|
|
79
79
|
set messages(value: NAMessageProperties[] | null | undefined);
|
|
80
80
|
/**
|
|
81
81
|
* A set of features representing point barriers.
|
|
82
|
-
* Point barriers are returned if
|
|
82
|
+
* Point barriers are returned if [ServiceAreaParameters#returnPointBarriers](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ServiceAreaParameters.html#returnPointBarriers)
|
|
83
83
|
* is set to `true` in a [solve()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-serviceArea.html#solve) request.
|
|
84
84
|
*
|
|
85
85
|
* @see [barriers](https://developers.arcgis.com/rest/services-reference/enterprise/service-area-sync/#barriers-1)
|
package/rest/support/types.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { TimeUnit, LengthUnit as CoreLengthUnit } from "../../core/units.js
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* An object describing the parameter values for the
|
|
16
|
-
*
|
|
16
|
+
* [RouteParameters#attributeParameterValues](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#attributeParameterValues) property, which is used by
|
|
17
17
|
* [RouteParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html), [ClosestFacilityParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ClosestFacilityParameters.html) and [ServiceAreaParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ServiceAreaParameters.html).
|
|
18
18
|
*
|
|
19
19
|
* @since 5.0
|
package/rest/symbolService.d.ts
CHANGED
|
@@ -17,8 +17,8 @@ import type { GenerateSymbolParameters, GenerateSymbolResponse } from "./types.j
|
|
|
17
17
|
* If using a SVG string value in the [GenerateSymbolParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-types.html#GenerateSymbolParameters), the XML namespace (`xmlns`) must be defined.
|
|
18
18
|
* For SVGs defined in `FormData` or an `HTMLFormElement`, the `name` of the element in the form must be `"svgImage"`, as shown in the examples below.
|
|
19
19
|
*
|
|
20
|
-
* The returned CIMSymbol will always be a
|
|
21
|
-
* with a
|
|
20
|
+
* The returned CIMSymbol will always be a [CIMPointSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-cim-types.html#CIMPointSymbol)
|
|
21
|
+
* with a [CIMVectorMarker](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-cim-types.html#CIMVectorMarker) symbol layer where `size = 10`. To update the size of the symbol, use [scaleCIMSymbolTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-cimSymbolUtils.html#scaleCIMSymbolTo).
|
|
22
22
|
*
|
|
23
23
|
* @param url - URL to the ArcGIS Server REST resource that represents a symbol service.
|
|
24
24
|
* @param params - Input parameters for converting an SVG to CIM Symbol.
|