@arcgis/core 4.33.0-next.20250204 → 4.33.0-next.20250206
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/assets/components/assets/icon/dualImageArea16.json +1 -0
- package/assets/components/assets/icon/dualImageArea24.json +1 -0
- package/assets/components/assets/icon/dualImageArea32.json +1 -0
- package/assets/components/assets/icon/dualImageDistance16.json +1 -0
- package/assets/components/assets/icon/dualImageDistance24.json +1 -0
- package/assets/components/assets/icon/dualImageDistance32.json +1 -0
- package/assets/components/assets/icon/dualImageLocation16.json +1 -0
- package/assets/components/assets/icon/dualImageLocation24.json +1 -0
- package/assets/components/assets/icon/dualImageLocation32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/06f693780f70e5a627c4.js +1 -0
- package/assets/esri/core/workers/chunks/{24a86c52c8bdd0b5eb4d.js → 09a99c556089c166d1f8.js} +1 -1
- package/assets/esri/core/workers/chunks/15f850c9a1154fc57e5a.js +1 -0
- package/assets/esri/core/workers/chunks/{9b4f471fcd8a3b5e089f.js → 192569dfa7c0ea8dd864.js} +1 -1
- package/assets/esri/core/workers/chunks/1a2e1a414e651e988435.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/24e47f748f0e4f815c6e.js +1 -0
- package/assets/esri/core/workers/chunks/28374a64790342e1b5ae.js +1 -0
- package/assets/esri/core/workers/chunks/{c3f03ccabca691186aad.js → 287362f9af132fafe4de.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad215219e5eef8598745.js → 28dbbfc44cc2bdcd221d.js} +1 -1
- package/assets/esri/core/workers/chunks/2adc533dadcb018a9755.js +1 -0
- package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/333091ab2e267652ed56.js +1 -0
- package/assets/esri/core/workers/chunks/354531dc2f0dea2ad96f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/38cd7745b8ef1b8b6196.js +1 -0
- package/assets/esri/core/workers/chunks/{8a1e4f65fc81aba7a704.js → 4122d10bc910e888eee1.js} +1 -1
- package/assets/esri/core/workers/chunks/41cd1a5c99ab3bbd1fb4.js +1 -0
- package/assets/esri/core/workers/chunks/433576983754f690bcc7.js +1 -0
- package/assets/esri/core/workers/chunks/{b1269b51cef3e11c85e3.js → 48ecc5a74fecbb2b9c6f.js} +1 -1
- package/assets/esri/core/workers/chunks/{b8a519d5d24b2e728ff8.js → 5a25cef6355fd20e44e7.js} +2 -2
- package/assets/esri/core/workers/chunks/{b8a519d5d24b2e728ff8.js.LICENSE.txt → 5a25cef6355fd20e44e7.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{8edae4ca2b18a219a43e.js → 5e7f16b312077ca8c18d.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a0415db78c68d31733f.js → 6039da57a2adedd3b83f.js} +1 -1
- package/assets/esri/core/workers/chunks/72cf9192292e5c85c6df.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/73d03c208242778e67bf.js +1 -0
- package/assets/esri/core/workers/chunks/{e4f82b5b50996b1ae48e.js → 746c964cf07e4306f21f.js} +1 -1
- package/assets/esri/core/workers/chunks/77764ca90bdd13ee2167.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{723a9fba144e2fa6d017.js → 7cb09e58bcc537ec1f7a.js} +1 -1
- package/assets/esri/core/workers/chunks/{07360fde6ea65664e6ca.js → 82d26884127ed772cc4b.js} +1 -1
- package/assets/esri/core/workers/chunks/842db06ce62758fab1e7.js +1 -0
- package/assets/esri/core/workers/chunks/{60cd8f4bba3e682ba57e.js → 91d2bdfa6e34c10b7f50.js} +1 -1
- package/assets/esri/core/workers/chunks/{12dd892cf61a76fb40ad.js → 991e0f619f1f81f94d56.js} +1 -1
- package/assets/esri/core/workers/chunks/9a27824d94df702e6e28.js +1 -0
- package/assets/esri/core/workers/chunks/{610b33b7291cffcc4e5d.js → a42ae5d5e5f66d120b4d.js} +1 -1
- package/assets/esri/core/workers/chunks/a5e9ea13e844a62b2a7f.js +1 -0
- package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/b43d88b6e7dc4ab13599.js +1 -0
- package/assets/esri/core/workers/chunks/{da77eefaad83c0644380.js → b8fae500c69ca2cff62a.js} +1 -1
- package/assets/esri/core/workers/chunks/b9d9a1dc3c5d799e2685.js +1 -0
- package/assets/esri/core/workers/chunks/{9c5c6ecaf5be24279fa5.js → ddc30044f61a2c2df3fe.js} +1 -1
- package/assets/esri/core/workers/chunks/e26dc0c1654316bb1558.js +1 -0
- package/assets/esri/core/workers/chunks/ef6279f5c63ab1e88c71.js +1 -0
- package/assets/esri/core/workers/chunks/{0711d3ad4d403bcfdcad.js → f117a89d1f4001a1f9f0.js} +1 -1
- package/assets/esri/core/workers/chunks/f4e48bbdbc9da10ec71a.js +1 -0
- package/assets/esri/core/workers/chunks/f9e48205178a5a804d38.js +1 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +74 -17
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/ColorMaterial.glsl.js +4 -5
- package/chunks/Pattern.glsl.js +1 -1
- package/chunks/WaterSurface.glsl.js +2 -2
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- package/interfaces.d.ts +76 -28
- package/layers/Layer.js +1 -1
- package/layers/graphics/data/FeatureStore.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/ogc/wcsUtils.js +1 -1
- package/layers/support/RasterFunctionTemplate.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/multipartParser.js +1 -1
- package/layers/support/rasterDatasets/wcsCapabilitiesParser.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +2 -1
- package/layers/support/rasterFunctionUtils.js +1 -1
- package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/package.json +2 -2
- package/rest/query/operations/queryAttachments.js +1 -1
- package/rest/support/AttachmentQuery.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/support/util.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileCache.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/support/geolocationUtils.js +1 -1
- package/assets/esri/core/workers/chunks/04306c2760c1f5b19966.js +0 -1
- package/assets/esri/core/workers/chunks/1e3ab66d0e8a7f160f33.js +0 -1
- package/assets/esri/core/workers/chunks/380d37ceb8cf52bad190.js +0 -1
- package/assets/esri/core/workers/chunks/39e38aab86dcee3f79be.js +0 -1
- package/assets/esri/core/workers/chunks/3ce826ebf0692363309d.js +0 -1
- package/assets/esri/core/workers/chunks/402de76b5de05615e111.js +0 -1
- package/assets/esri/core/workers/chunks/69d307758262e5d7a32e.js +0 -1
- package/assets/esri/core/workers/chunks/6dee40b94f94ee7bc4e4.js +0 -1
- package/assets/esri/core/workers/chunks/7a3e4cb5f64dac2cfe0e.js +0 -1
- package/assets/esri/core/workers/chunks/7e4d72279cc599b7029c.js +0 -1
- package/assets/esri/core/workers/chunks/8438fba57e82e4cc7c11.js +0 -1
- package/assets/esri/core/workers/chunks/92155d112ebb6a4c6c6e.js +0 -1
- package/assets/esri/core/workers/chunks/ba37ab9e560644dc1f18.js +0 -1
- package/assets/esri/core/workers/chunks/bbbe5d6cb8b737811c84.js +0 -1
- package/assets/esri/core/workers/chunks/bf26f58210755875748c.js +0 -1
- package/assets/esri/core/workers/chunks/c7a94e569c905f97244a.js +0 -1
- package/assets/esri/core/workers/chunks/d8c762ca94e3a11b125d.js +0 -1
- package/assets/esri/core/workers/chunks/dbc447413ab40a79ba87.js +0 -1
- package/assets/esri/core/workers/chunks/f48ef415b90edc7ccadd.js +0 -1
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{VertexAttribute as g}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as v}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as
|
|
5
|
+
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{VertexAttribute as g}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as v}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";function c(c){const m=new b,{vertex:u,fragment:w,attributes:p,varyings:f}=m,{vvColor:h,hasVertexColors:C}=c;return d(u,c),m.include(r,c),m.include(i,c),m.include(s,c),m.include(o,c),w.include(e,c),m.include(v,c),m.include(l,c),p.add(g.POSITION,"vec3"),h&&p.add(g.COLORFEATUREATTRIBUTE,"float"),C||f.add("vColor","vec4"),f.add("vpos","vec3"),u.uniforms.add(new n("uColor",(e=>e.color))),u.main.add(a`
|
|
6
6
|
vpos = position;
|
|
7
7
|
forwardNormalizedVertexColor();
|
|
8
8
|
forwardObjectAndLayerIdColor();
|
|
9
9
|
|
|
10
|
-
${
|
|
10
|
+
${C?"vColor *= uColor;":h?"vColor = uColor * interpolateVVColor(colorFeatureAttribute);":"vColor = uColor;"}
|
|
11
11
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
12
|
-
gl_Position = transformPosition(proj, view, vpos);`),
|
|
12
|
+
gl_Position = transformPosition(proj, view, vpos);`),w.include(t),w.main.add(a`discardBySlice(vpos);
|
|
13
13
|
discardByTerrainDepth();
|
|
14
|
-
|
|
15
|
-
outputColorHighlightOID(fColor, vpos);`),b}const b=Object.freeze(Object.defineProperty({__proto__:null,build:m},Symbol.toStringTag,{value:"Module"}));export{b as C,m as b};
|
|
14
|
+
outputColorHighlightOID(vColor, vpos);`),m}const m=Object.freeze(Object.defineProperty({__proto__:null,build:c},Symbol.toStringTag,{value:"Module"}));export{m as C,c as b};
|
package/chunks/Pattern.glsl.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{terrainDepthTest as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as c,addCameraPosition as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as g}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{VertexAttribute as p}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{Style as m}from"../views/3d/webgl-engine/materials/PatternStyle.js";import{outputColorHighlightOID as f}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as u}from"../views/webgl/ShaderBuilder.js";const w=.70710678118,b=w,h=.08715574274,y=10,S=1;function j(j){const C=new u,{vertex:T,fragment:P,attributes:R,varyings:V}=C,D=j.output===e.Highlight;c(T,j),C.include(r,j),C.include(a,j),C.include(l,j),C.include(t,j),C.fragment.include(o,j),C.include(f,j),C.include(i,j),j.draped?T.uniforms.add(new v("worldToScreenRatio",(e=>1/e.screenToPCSRatio))):R.add(p.BOUNDINGRECT,"mat3"),R.add(p.POSITION,"vec3"),R.add(p.UVMAPSPACE,"vec4"),j.vvColor&&R.add(p.COLORFEATUREATTRIBUTE,"float"),V.add("vColor","vec4"),V.add("vpos","vec3"),V.add("vuv","vec2"),T.uniforms.add(new s("uColor",(e=>e.color)));const O=j.style===m.ForwardDiagonal||j.style===m.BackwardDiagonal||j.style===m.DiagonalCross;return O&&T.code.add(g`
|
|
5
|
+
import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{terrainDepthTest as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as c,addCameraPosition as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as g}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{VertexAttribute as p}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{Style as m}from"../views/3d/webgl-engine/materials/PatternStyle.js";import{outputColorHighlightOID as f}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as u}from"../views/webgl/ShaderBuilder.js";const w=.70710678118,b=w,h=.08715574274,y=10,S=1;function j(j){const C=new u,{vertex:T,fragment:P,attributes:R,varyings:V}=C,D=j.output===e.Highlight;c(T,j),C.include(r,j),C.include(a,j),C.include(l,j),C.include(t,j),C.fragment.include(o,j),C.include(f,j),C.include(i,j),j.draped?T.uniforms.add(new v("worldToScreenRatio",(e=>1/e.screenToPCSRatio))):R.add(p.BOUNDINGRECT,"mat3"),R.add(p.POSITION,"vec3"),R.add(p.UVMAPSPACE,"vec4"),j.vvColor&&R.add(p.COLORFEATUREATTRIBUTE,"float"),j.hasVertexColors||V.add("vColor","vec4"),V.add("vpos","vec3"),V.add("vuv","vec2"),T.uniforms.add(new s("uColor",(e=>e.color)));const O=j.style===m.ForwardDiagonal||j.style===m.BackwardDiagonal||j.style===m.DiagonalCross;return O&&T.code.add(g`
|
|
6
6
|
const mat2 rotate45 = mat2(${g.float(w)}, ${g.float(-.70710678118)},
|
|
7
7
|
${g.float(b)}, ${g.float(w)});
|
|
8
8
|
`),j.draped||(d(T,j),T.uniforms.add(new v("worldToScreenPerDistanceRatio",(e=>1/e.camera.perScreenPixelRatio))),T.code.add(g`vec3 projectPointToLineSegment(vec3 center, vec3 halfVector, vec3 point) {
|
|
@@ -25,7 +25,7 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
25
25
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
26
26
|
|
|
27
27
|
gl_Position = transformPosition(proj, view, vpos);
|
|
28
|
-
forwardLinearDepth();`)),S.include(c,O),O.output){case i.Color:case i.ColorEmission:S.include(t,{pbrMode:m.Disabled,lightingSphericalHarmonicsOrder:2}),S.include(w),S.include(v,O),S.include(p,O),S.fragment.include(o,O),S.include(C,O),N.uniforms.add(z,new y("timeElapsed",(e=>e
|
|
28
|
+
forwardLinearDepth();`)),S.include(c,O),O.output){case i.Color:case i.ColorEmission:S.include(t,{pbrMode:m.Disabled,lightingSphericalHarmonicsOrder:2}),S.include(w),S.include(v,O),S.include(p,O),S.fragment.include(o,O),S.include(C,O),N.include(u),h(N,O),l(N),d(N),N.uniforms.add(z,new y("timeElapsed",(({timeElapsed:e})=>e)),D.uniforms.get("view"),D.uniforms.get("localOrigin")).main.add(j`
|
|
29
29
|
discardBySlice(vpos);
|
|
30
30
|
discardByTerrainDepth();
|
|
31
31
|
vec3 localUp = vnormal;
|
|
@@ -51,7 +51,7 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
51
51
|
vuv = uv0;
|
|
52
52
|
vpos = position;
|
|
53
53
|
|
|
54
|
-
gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(new y("timeElapsed",(e=>e
|
|
54
|
+
gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(new y("timeElapsed",(({timeElapsed:e})=>e))).main.add(j`discardBySlice(vpos);
|
|
55
55
|
vec4 tangentNormalFoam = getSurfaceNormalAndFoam(vuv, timeElapsed);
|
|
56
56
|
tangentNormalFoam.xyz = normalize(tangentNormalFoam.xyz);
|
|
57
57
|
fragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w);`);break;case i.Highlight:S.include(n,O),S.varyings.add("vpos","vec3"),D.uniforms.add(z),D.main.add(j`
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as e}from"../../core/arrayUtils.js";import{load as r,supportsCurves as t,execute as o,executeMany as n,isLoaded as a}from"./gx/operatorProject.js";let s,i,c,m,f,p,u,l,h,j,x;function T(){return!!i&&a()}async function g(){if(!T()){const[e,o,n,a]=await Promise.all([import("./support/apiConverter.js"),import("../../chunks/ProjectionTransformation.js").then((e=>e.aI)).then((({CompositeGeographicTransformation:e})=>e)),import("../../chunks/ProjectionTransformation.js").then((e=>e.aJ)).then((({create:e,createFromWKT:r})=>({create:e,createFromWKT:r}))),import("../../chunks/ProjectionTransformation.js").then((e=>e.aK)).then((({createEx:e,createFromAoi:r})=>({createEx:e,createFromAoi:r}))),r()]);s=e.fromExtent,i=e.fromGeometry,c=e.fromSpatialReference,m=e.getSpatialReference,f=e.toGeometry,p=o,u=n.create,l=n.createFromWKT,h=a.createEx,j=a.createFromAoi,x=t()}}function E(e,r,t={}){const n=F(m(e),r,t);return f(o(i(e),n),r)}function k(r,t,o={}){const a=r.map(i),s=F(m(r),t,o);return n(a,s).map((e=>f(e,t))).filter(e)}function F(e,r,t={}){let o;if(t?.geographicTransformation){const e=t.geographicTransformation.steps.map((e=>e.wkid?u(e.wkid,e.isInverse):l(e.wkt,e.isInverse)));o=new p(e,null,
|
|
5
|
+
import{isSome as e}from"../../core/arrayUtils.js";import{load as r,supportsCurves as t,execute as o,executeMany as n,isLoaded as a}from"./gx/operatorProject.js";let s,i,c,m,f,p,u,l,h,j,x;function T(){return!!i&&a()}async function g(){if(!T()){const[e,o,n,a]=await Promise.all([import("./support/apiConverter.js"),import("../../chunks/ProjectionTransformation.js").then((e=>e.aI)).then((({CompositeGeographicTransformation:e})=>e)),import("../../chunks/ProjectionTransformation.js").then((e=>e.aJ)).then((({create:e,createFromWKT:r})=>({create:e,createFromWKT:r}))),import("../../chunks/ProjectionTransformation.js").then((e=>e.aK)).then((({createEx:e,createFromAoi:r})=>({createEx:e,createFromAoi:r}))),r()]);s=e.fromExtent,i=e.fromGeometry,c=e.fromSpatialReference,m=e.getSpatialReference,f=e.toGeometry,p=o,u=n.create,l=n.createFromWKT,h=a.createEx,j=a.createFromAoi,x=t()}}function E(e,r,t={}){const n=F(m(e),r,t);return f(o(i(e),n),r)}function k(r,t,o={}){const a=r.map(i),s=F(m(r),t,o);return n(a,s).map((e=>f(e,t))).filter(e)}function F(e,r,t={}){let o;const n=c(e),a=c(r);if(t?.geographicTransformation){const e=t.geographicTransformation.steps.map((e=>e.wkid?u(e.wkid,e.isInverse):l(e.wkt,e.isInverse)));o=new p(e,null,n,a)}else if(t?.areaOfInterestExtent)return j(n,a,s(t.areaOfInterestExtent).asEnvelope2D());return h(n,a,o)}export{E as execute,k as executeMany,T as isLoaded,g as load,x as supportsCurves};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as e}from"../../core/arrayUtils.js";import{load as r,supportsCurves as t,execute as n,executeMany as o,isLoaded as a}from"./gx/operatorShapePreservingProject.js";let i,s,c,m,p,f,u,
|
|
5
|
+
import{isSome as e}from"../../core/arrayUtils.js";import{load as r,supportsCurves as t,execute as n,executeMany as o,isLoaded as a}from"./gx/operatorShapePreservingProject.js";let i,s,c,m,p,f,u,h,g,l,x;function T(){return!!s&&a()}async function j(){if(!T()){const[e,n,o,a]=await Promise.all([import("./support/apiConverter.js"),import("../../chunks/ProjectionTransformation.js").then((e=>e.aI)).then((({CompositeGeographicTransformation:e})=>e)),import("../../chunks/ProjectionTransformation.js").then((e=>e.aJ)).then((({create:e,createFromWKT:r})=>({create:e,createFromWKT:r}))),import("../../chunks/ProjectionTransformation.js").then((e=>e.aK)).then((({createEx:e,createFromAoi:r})=>({createEx:e,createFromAoi:r}))),r()]);i=e.fromExtent,s=e.fromGeometry,c=e.fromSpatialReference,m=e.getSpatialReference,p=e.toGeometry,f=n,u=o.create,h=o.createFromWKT,g=a.createEx,l=a.createFromAoi,x=t()}}function I(e,r,t={}){const o=E(m(e),r,t),a=t?.maxDeviationInSrTo??0,i=t?.minSegmentLengthInDegrees??0;return p(n(s(e),o,i,a),r)}function v(r,t,n={}){const a=r.map(s),i=E(m(r),t,n),c=n?.maxDeviationInSrTo??0;return o(a,i,n?.minSegmentLengthInDegrees??0,c).map((e=>p(e,t))).filter(e)}function E(e,r,t={}){let n;const o=c(e),a=c(r);if(t?.geographicTransformation){const e=t.geographicTransformation.steps.map((e=>e.wkid?u(e.wkid,e.isInverse):h(e.wkt,e.isInverse)));n=new f(e,null,o,a)}else if(t?.areaOfInterestExtent)return l(o,a,i(t.areaOfInterestExtent).asEnvelope2D());return g(o,a,n)}export{I as execute,v as executeMany,T as isLoaded,j as load,x as supportsCurves};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Logger.js";import{getMetersPerUnitForSR as t}from"../../../core/unitUtils.js";import o from"../../Mesh.js";import n from"../../Point.js";import{project as r}from"../../projection.js";import
|
|
5
|
+
import e from"../../../core/Logger.js";import{getMetersPerUnitForSR as t}from"../../../core/unitUtils.js";import o from"../../Mesh.js";import n from"../../Point.js";import{project as r}from"../../projection.js";import i from"../MeshComponent.js";import{MeshVertexAttributes as a}from"../MeshVertexAttributes.js";import{isGround as s}from"../../../support/groundInstanceUtils.js";async function l(t,o,n){let r;if(u(t)||s(t)){const e=await c(t);return r=await e.createElevationSampler(o,{demResolution:n?.demResolution??"finest-contiguous"}),m(r,o,{material:n?.material})}return"string"==typeof n?.demResolution?(e.getLogger("esri.geometry.support.meshUtils.elevation").error("create()","demResolution must be a number when used directly with a sampler"),null):m(t,o,{material:n?.material,demResolution:n?.demResolution})}function m(e,n,s){const l=t(n.spatialReference),m=(s?.demResolution??e.demResolution.min)/l,c=Math.round(n.width/m),u=Math.round(n.height/m),f=c+1,d=u+1,h=new Float64Array(f*d*3),R=new Float32Array(f*d*2);let w=0,y=0;const g=new Uint32Array(c*u*2*3);let j=0,v=0;const A=!e.spatialReference.equals(n.spatialReference);p.spatialReference=n.spatialReference;const{xmin:x,ymin:b,height:M,width:U}=n;for(let t=0;t<d;t++){const o=b+M*(t/u);for(let n=0;n<f;n++){const i=x+U*(n/c);if(h[w++]=i,h[w++]=o,A){p.x=i,p.y=o;const t=r(p,e.spatialReference);h[w++]=e.elevationAt(t.x,t.y)??0}else h[w++]=e.elevationAt(i,o)??0;const a=n/c,s=t/u;R[y++]=a,R[y++]=s,t!==u&&n!==c&&(g[v++]=j+1,g[v++]=j+f+1,g[v++]=j+f,g[v++]=j,g[v++]=j+1,g[v++]=j+f),j++}}return new o({vertexAttributes:new a({position:h,uv:R}),components:[new i({faces:g,shading:"smooth",material:s?.material??null})],spatialReference:n.spatialReference})}async function c(e){return u(e)?e.load():(await e.load(),await Promise.allSettled(e.layers.items.map((e=>e.load()))),e)}function u(e){return"type"in e&&("elevation"===e.type||"base-elevation"===e.type)}const p=new n;export{l as create};
|
package/interfaces.d.ts
CHANGED
|
@@ -23918,15 +23918,6 @@ declare namespace __esri {
|
|
|
23918
23918
|
}
|
|
23919
23919
|
|
|
23920
23920
|
export class Layer {
|
|
23921
|
-
/**
|
|
23922
|
-
* Called by the views, such as {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html MapView} and
|
|
23923
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html SceneView}, when the layer is added to the
|
|
23924
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers Map.layers} collection and a layer view must
|
|
23925
|
-
* be created for it.
|
|
23926
|
-
*
|
|
23927
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#createLayerView Read more...}
|
|
23928
|
-
*/
|
|
23929
|
-
createLayerView: CreateLayerView | nullish;
|
|
23930
23921
|
/**
|
|
23931
23922
|
* The unique ID assigned to the layer.
|
|
23932
23923
|
*
|
|
@@ -24090,6 +24081,19 @@ declare namespace __esri {
|
|
|
24090
24081
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#cancelLoad Read more...}
|
|
24091
24082
|
*/
|
|
24092
24083
|
cancelLoad(): void;
|
|
24084
|
+
/**
|
|
24085
|
+
* Called by the views, such as {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html MapView} and
|
|
24086
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html SceneView}, when the layer is added to the
|
|
24087
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers Map.layers} collection and a layer view must
|
|
24088
|
+
* be created for it.
|
|
24089
|
+
*
|
|
24090
|
+
* @param view The parent view.
|
|
24091
|
+
* @param options An object specifying additional options. See the object specification table below for the required properties of this object.
|
|
24092
|
+
* @param options.signal A signal to abort the creation of the layerview.
|
|
24093
|
+
*
|
|
24094
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#createLayerView Read more...}
|
|
24095
|
+
*/
|
|
24096
|
+
createLayerView(view: any, options?: LayerCreateLayerViewOptions): Promise<LayerView>;
|
|
24093
24097
|
/**
|
|
24094
24098
|
* Destroys the layer and any associated resources (including its {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#portalItem portalItem}, if it is a property on the layer).
|
|
24095
24099
|
*
|
|
@@ -24183,15 +24187,6 @@ declare namespace __esri {
|
|
|
24183
24187
|
}
|
|
24184
24188
|
|
|
24185
24189
|
interface LayerProperties extends LoadableProperties {
|
|
24186
|
-
/**
|
|
24187
|
-
* Called by the views, such as {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html MapView} and
|
|
24188
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html SceneView}, when the layer is added to the
|
|
24189
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers Map.layers} collection and a layer view must
|
|
24190
|
-
* be created for it.
|
|
24191
|
-
*
|
|
24192
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#createLayerView Read more...}
|
|
24193
|
-
*/
|
|
24194
|
-
createLayerView?: CreateLayerView | nullish;
|
|
24195
24190
|
/**
|
|
24196
24191
|
* The full extent of the layer.
|
|
24197
24192
|
*
|
|
@@ -24242,7 +24237,9 @@ declare namespace __esri {
|
|
|
24242
24237
|
visible?: boolean;
|
|
24243
24238
|
}
|
|
24244
24239
|
|
|
24245
|
-
export
|
|
24240
|
+
export interface LayerCreateLayerViewOptions {
|
|
24241
|
+
signal?: AbortSignal | nullish;
|
|
24242
|
+
}
|
|
24246
24243
|
|
|
24247
24244
|
export interface LayerFromArcGISServerUrlParams {
|
|
24248
24245
|
url: string;
|
|
@@ -36672,6 +36669,7 @@ declare namespace __esri {
|
|
|
36672
36669
|
* @param parameters The clip parameters object has the following properties.
|
|
36673
36670
|
* @param parameters.geometry An extent or a polygon geometry to define the clip shape.
|
|
36674
36671
|
* @param parameters.keepOutside When `false`, the imagery within the clip geometry will be kept in the output. When `true`, imagery outside of the clip geometry will be kept and the imagery inside the clip geometry will be discarded.
|
|
36672
|
+
* @param parameters.raster The input raster. Default is the image service.
|
|
36675
36673
|
* @param parameters.outputPixelType The output pixel type.
|
|
36676
36674
|
*
|
|
36677
36675
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#clip Read more...}
|
|
@@ -36690,6 +36688,7 @@ declare namespace __esri {
|
|
|
36690
36688
|
*
|
|
36691
36689
|
* @param parameters The parameters object has the following properties.
|
|
36692
36690
|
* @param parameters.raster The input raster. Default is the image service.
|
|
36691
|
+
* @param parameters.outputPixelType The output pixel type, default is u8.
|
|
36693
36692
|
*
|
|
36694
36693
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#colormapToRGB Read more...}
|
|
36695
36694
|
*/
|
|
@@ -36701,9 +36700,9 @@ declare namespace __esri {
|
|
|
36701
36700
|
* @param parameters.rasters The input raster. Default is the image service.
|
|
36702
36701
|
* @param parameters.outputPixelType The output pixel type, default is unknown.
|
|
36703
36702
|
*
|
|
36704
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#
|
|
36703
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#compositeBand Read more...}
|
|
36705
36704
|
*/
|
|
36706
|
-
|
|
36705
|
+
compositeBand(parameters: rasterFunctionUtilsCompositeBandParameters): RasterFunction;
|
|
36707
36706
|
/**
|
|
36708
36707
|
* Creates a raster function that sets the truthy pixels (value is not 0) to the pixel value from a true raster, and falsy pixels (value is 0) to the pixel value of the false raster.
|
|
36709
36708
|
*
|
|
@@ -36821,6 +36820,7 @@ declare namespace __esri {
|
|
|
36821
36820
|
*
|
|
36822
36821
|
* @param parameters The grayscale parameters object has the following properties.
|
|
36823
36822
|
* @param parameters.weights The weights applied to each input band. Weights are often applied because some bands have variable importance depending on the application.
|
|
36823
|
+
* @param parameters.raster The input raster. Default is the image service.
|
|
36824
36824
|
* @param parameters.outputPixelType The output pixel type, default is unknown.
|
|
36825
36825
|
*
|
|
36826
36826
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#grayscale Read more...}
|
|
@@ -36922,7 +36922,7 @@ declare namespace __esri {
|
|
|
36922
36922
|
* @param parameters The parameters object has the following properties.
|
|
36923
36923
|
* @param parameters.includedRanges The included values for each band. Each band is specified using a range [from, to].
|
|
36924
36924
|
* @param parameters.noDataValues The nodata values for each band.
|
|
36925
|
-
* @param parameters.noDataInterpretation Result is no data if all bands are nodata when match-all is specified, any if any band is nodata when match-any is specified.
|
|
36925
|
+
* @param parameters.noDataInterpretation Result is no data if all bands are nodata when match-all is specified, any if any band is nodata when match-any is specified. Default is match-any.
|
|
36926
36926
|
* @param parameters.raster The input raster. Default is the image service.
|
|
36927
36927
|
* @param parameters.outputPixelType The output pixel type, default is unknown.
|
|
36928
36928
|
*
|
|
@@ -37045,6 +37045,7 @@ declare namespace __esri {
|
|
|
37045
37045
|
* @param parameters The parameters object has the following properties.
|
|
37046
37046
|
* @param parameters.slopeType The slope type
|
|
37047
37047
|
* @param parameters.zFactor A ratio of z unit / xy unit, with optional exaggeration factored in.
|
|
37048
|
+
* @param parameters.scalingType The slope result is scaled dynamically by adjusting the zFactor. Default is none.
|
|
37048
37049
|
* @param parameters.pixelSizePower Pixel size factor accounts for changes in scale as the viewer zooms in and out on the map display. It controls the rate at which the zFactor changes. This parameter is only valid when the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#scalingType scalingType} is `adjusted`.
|
|
37049
37050
|
* @param parameters.pixelSizeZFactor Pixel Size Power accounts for the altitude changes (or scale) as the viewer zooms in and out on the map display. It is the exponent applied to the pixel size term in the equation that controls the rate at which the zFactor changes to avoid significant loss of relief. This parameter is only valid when the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#scalingType scalingType} is `adjusted`.
|
|
37050
37051
|
* @param parameters.removeEdgeEffect Remove edge effect when true
|
|
@@ -37112,6 +37113,20 @@ declare namespace __esri {
|
|
|
37112
37113
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#stretchMinMax Read more...}
|
|
37113
37114
|
*/
|
|
37114
37115
|
stretchMinMax(parameters: rasterFunctionUtilsStretchMinMaxParameters): RasterFunction;
|
|
37116
|
+
/**
|
|
37117
|
+
* Creates a Stretch function without a specific stretch method.
|
|
37118
|
+
*
|
|
37119
|
+
* @param parameters The parameters object has the following properties.
|
|
37120
|
+
* @param parameters.outputMin The minimum output value. Default is 0.
|
|
37121
|
+
* @param parameters.outputMax The maximum output value. Default is 255.
|
|
37122
|
+
* @param parameters.useGamma When true, gamma stretch is applied.
|
|
37123
|
+
* @param parameters.gamma The gamma values used for each band, needed when useGamma is true.
|
|
37124
|
+
* @param parameters.raster The input raster. Default is the image service.
|
|
37125
|
+
* @param parameters.outputPixelType The output pixel type, default is unknown.
|
|
37126
|
+
*
|
|
37127
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#stretchNone Read more...}
|
|
37128
|
+
*/
|
|
37129
|
+
stretchNone(parameters: rasterFunctionUtilsStretchNoneParameters): RasterFunction;
|
|
37115
37130
|
/**
|
|
37116
37131
|
* Creates a Stretch function using percent-clip stretch type.
|
|
37117
37132
|
*
|
|
@@ -37388,7 +37403,14 @@ declare namespace __esri {
|
|
|
37388
37403
|
| "yellow-to-green-to-dark-blue"
|
|
37389
37404
|
| "yellow-to-red"
|
|
37390
37405
|
| "yellow-green-bright"
|
|
37391
|
-
| "yellow-green-light-to-dark"
|
|
37406
|
+
| "yellow-green-light-to-dark"
|
|
37407
|
+
| "hillshade"
|
|
37408
|
+
| "gray"
|
|
37409
|
+
| "elevation"
|
|
37410
|
+
| "ndvi"
|
|
37411
|
+
| "ndvi2"
|
|
37412
|
+
| "ndvi3"
|
|
37413
|
+
| "random";
|
|
37392
37414
|
raster?: RasterPrimaryArgument;
|
|
37393
37415
|
outputPixelType?: OutputPixelType;
|
|
37394
37416
|
}
|
|
@@ -37597,7 +37619,7 @@ declare namespace __esri {
|
|
|
37597
37619
|
}
|
|
37598
37620
|
|
|
37599
37621
|
export interface rasterFunctionUtilsBandArithmeticSultanParameters {
|
|
37600
|
-
bandIds: [number, number, number, number, number
|
|
37622
|
+
bandIds: [number, number, number, number, number];
|
|
37601
37623
|
raster?: RasterPrimaryArgument;
|
|
37602
37624
|
outputPixelType?: OutputPixelType;
|
|
37603
37625
|
}
|
|
@@ -37639,14 +37661,16 @@ declare namespace __esri {
|
|
|
37639
37661
|
export interface rasterFunctionUtilsClipParameters {
|
|
37640
37662
|
geometry: Polygon | Extent;
|
|
37641
37663
|
keepOutside?: boolean;
|
|
37664
|
+
raster?: RasterPrimaryArgument;
|
|
37642
37665
|
outputPixelType?: OutputPixelType;
|
|
37643
37666
|
}
|
|
37644
37667
|
|
|
37645
37668
|
export interface rasterFunctionUtilsColormapToRGBParameters {
|
|
37646
37669
|
raster?: RasterPrimaryArgument;
|
|
37670
|
+
outputPixelType?: OutputPixelType;
|
|
37647
37671
|
}
|
|
37648
37672
|
|
|
37649
|
-
export interface
|
|
37673
|
+
export interface rasterFunctionUtilsCompositeBandParameters {
|
|
37650
37674
|
rasters: RasterArgument[];
|
|
37651
37675
|
outputPixelType?: OutputPixelType;
|
|
37652
37676
|
}
|
|
@@ -37667,6 +37691,7 @@ declare namespace __esri {
|
|
|
37667
37691
|
|
|
37668
37692
|
export interface rasterFunctionUtilsGrayscaleParameters {
|
|
37669
37693
|
weights: number[];
|
|
37694
|
+
raster?: RasterPrimaryArgument;
|
|
37670
37695
|
outputPixelType?: OutputPixelType;
|
|
37671
37696
|
}
|
|
37672
37697
|
|
|
@@ -37684,9 +37709,9 @@ declare namespace __esri {
|
|
|
37684
37709
|
}
|
|
37685
37710
|
|
|
37686
37711
|
export interface rasterFunctionUtilsMaskParameters {
|
|
37687
|
-
includedRanges
|
|
37688
|
-
noDataValues
|
|
37689
|
-
noDataInterpretation
|
|
37712
|
+
includedRanges?: [number, number][];
|
|
37713
|
+
noDataValues?: number[][];
|
|
37714
|
+
noDataInterpretation?: "match-any" | "match-all";
|
|
37690
37715
|
raster?: RasterPrimaryArgument;
|
|
37691
37716
|
outputPixelType?: OutputPixelType;
|
|
37692
37717
|
}
|
|
@@ -37701,6 +37726,7 @@ declare namespace __esri {
|
|
|
37701
37726
|
export interface rasterFunctionUtilsSlopeParameters {
|
|
37702
37727
|
slopeType: "degree" | "percent-rise";
|
|
37703
37728
|
zFactor: number;
|
|
37729
|
+
scalingType?: "none" | "adjusted";
|
|
37704
37730
|
pixelSizePower?: number;
|
|
37705
37731
|
pixelSizeZFactor?: number;
|
|
37706
37732
|
removeEdgeEffect?: boolean;
|
|
@@ -37735,6 +37761,15 @@ declare namespace __esri {
|
|
|
37735
37761
|
outputPixelType?: OutputPixelType;
|
|
37736
37762
|
}
|
|
37737
37763
|
|
|
37764
|
+
export interface rasterFunctionUtilsStretchNoneParameters {
|
|
37765
|
+
outputMin?: number;
|
|
37766
|
+
outputMax?: number;
|
|
37767
|
+
useGamma?: boolean;
|
|
37768
|
+
gamma?: number[];
|
|
37769
|
+
raster?: RasterPrimaryArgument;
|
|
37770
|
+
outputPixelType?: OutputPixelType;
|
|
37771
|
+
}
|
|
37772
|
+
|
|
37738
37773
|
export interface rasterFunctionUtilsStretchPercentClipParameters {
|
|
37739
37774
|
minPercent: number;
|
|
37740
37775
|
maxPercent: number;
|
|
@@ -103347,6 +103382,13 @@ declare namespace __esri {
|
|
|
103347
103382
|
*/
|
|
103348
103383
|
get graphic(): Graphic | nullish;
|
|
103349
103384
|
set graphic(value: GraphicProperties | nullish);
|
|
103385
|
+
/**
|
|
103386
|
+
* An array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html AttachmentsOrderByInfo} indicating the display order for the attachments, and whether they should be sorted in ascending `asc` or descending `desc` order.
|
|
103387
|
+
*
|
|
103388
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#orderByFields Read more...}
|
|
103389
|
+
*/
|
|
103390
|
+
get orderByFields(): AttachmentsOrderByInfo[] | nullish;
|
|
103391
|
+
set orderByFields(value: AttachmentsOrderByInfoProperties[] | nullish);
|
|
103350
103392
|
/**
|
|
103351
103393
|
* Queries for the attachments on a feature.
|
|
103352
103394
|
*
|
|
@@ -103380,6 +103422,12 @@ declare namespace __esri {
|
|
|
103380
103422
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#mode Read more...}
|
|
103381
103423
|
*/
|
|
103382
103424
|
mode?: "view" | "add" | "edit";
|
|
103425
|
+
/**
|
|
103426
|
+
* An array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-support-AttachmentsOrderByInfo.html AttachmentsOrderByInfo} indicating the display order for the attachments, and whether they should be sorted in ascending `asc` or descending `desc` order.
|
|
103427
|
+
*
|
|
103428
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#orderByFields Read more...}
|
|
103429
|
+
*/
|
|
103430
|
+
orderByFields?: AttachmentsOrderByInfoProperties[] | nullish;
|
|
103383
103431
|
}
|
|
103384
103432
|
|
|
103385
103433
|
/**
|
package/layers/Layer.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/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import r from"../core/Error.js";import o from"../core/Evented.js";import i from"../core/Identifiable.js";import s from"../core/Loadable.js";import a from"../core/Logger.js";import{isAbortError as l}from"../core/promiseUtils.js";import{urlToObject as n}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import d from"../geometry/Extent.js";import c from"../geometry/SpatialReference.js";import{fromPortalItem as u}from"./support/fromPortalItem.js";import m from"../time/TimeExtent.js";let b=0,h=class extends(o.EventedMixin(i.IdentifiableMixin(s))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new d(-180,-90,180,90,c.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=c.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await import("./support/arcgisLayers.js")).fromUrl(t)}static fromPortalItem(e){return u(e)}initialize(){this.when().catch((e=>{l(e)||a.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return n(this.url)}createLayerView(e,t){return Promise.reject(new r("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e){return(await t(e,{query:{f:"json"},responseType:"json"})).data}throw new r("layer:no-attribution-data","Layer does not have attribution data")}};e([p({type:String})],h.prototype,"attributionDataUrl",void 0),e([p({readOnly:!0})],h.prototype,"effectiveVisible",null),e([p({type:d})],h.prototype,"fullExtent",void 0),e([p({readOnly:!0})],h.prototype,"hasAttributionData",null),e([p({type:String,clonable:!1})],h.prototype,"id",void 0),e([p({type:Boolean,nonNullable:!0})],h.prototype,"legendEnabled",void 0),e([p({type:["show","hide","hide-children"]})],h.prototype,"listMode",void 0),e([p({type:Number,range:{min:0,max:1},nonNullable:!0})],h.prototype,"opacity",void 0),e([p({clonable:!1})],h.prototype,"parent",void 0),e([p({readOnly:!0})],h.prototype,"parsedUrl",null),e([p({type:Boolean,readOnly:!0})],h.prototype,"persistenceEnabled",void 0),e([p({type:Boolean})],h.prototype,"popupEnabled",void 0),e([p({type:Boolean})],h.prototype,"attributionVisible",void 0),e([p({type:c})],h.prototype,"spatialReference",void 0),e([p({type:String})],h.prototype,"title",void 0),e([p({readOnly:!0,json:{read:!1}})],h.prototype,"type",void 0),e([p()],h.prototype,"url",void 0),e([p({type:m})],h.prototype,"visibilityTimeExtent",void 0),e([p({type:Boolean,nonNullable:!0})],h.prototype,"visible",void 0),h=e([y("esri.layers.Layer")],h);const f=h;export{f as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import r from"../../../core/Evented.js";import s from"../../../core/Logger.js";import{create as o,fromRect as i}from"../../../geometry/support/aaBoundingBox.js";import{create as n}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as
|
|
5
|
+
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import r from"../../../core/Evented.js";import s from"../../../core/Logger.js";import{create as o,fromRect as i}from"../../../geometry/support/aaBoundingBox.js";import{create as n}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as u}from"../featureConversionUtils.js";import{BoundsStore as a}from"./BoundsStore.js";import{cleanFromGeometryEngine as d}from"./geometryUtils.js";import{optimizedFeatureQueryEngineAdapter as h}from"./optimizedFeatureQueryEngineAdapter.js";const m=o();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new a,this._featuresById=new Map,this._usedMemory=0,this.events=new r,this.featureAdapter=h}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,r,s,o]=this.fullBounds;return{xmin:t,ymin:r,xmax:s,ymax:o,spatialReference:d(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(t){const r=t.map((e=>this._upsert(e)));return this._emitChanged(),r.filter(e)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const r of e){const e=this._boundsStore.get(r.objectId);e&&t(i(m,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const r=e.objectId;if(null==r)return void s.getLogger("esri.layers.graphics.data.FeatureStore").error(new t("featurestore:invalid-feature","feature id is missing",{feature:e}));const o=this._featuresById.get(r);let i;if(o?(e.displayId=o.displayId,i=this._boundsStore.get(r),this._boundsStore.delete(r),this._usedMemory-=this.estimateFeatureUsedMemory?.(o)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(r,null),void this._featuresById.set(r,e);i=u(null!=i?i:n(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(r,i),this._featuresById.set(r,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const r=e?.objectId;if(null==r)return s.getLogger("esri.layers.graphics.data.FeatureStore").error(new t("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const o=this._featuresById.get(r);if(!o)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(o)??0;const{geometry:i,attributes:a}=e;for(const t in a)o.attributes[t]=a[t];return i&&(o.geometry=i,this._boundsStore.set(r,u(n(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(o)??0,o}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}export{f as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../request.js";import{createTask as t}from"../../../../core/asyncUtils.js";import s from"../../../../core/Error.js";import i from"../../../../core/Logger.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{getJsonType as n}from"../../../../geometry/support/jsonUtils.js";import{wgs84 as a,equals as o}from"../../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as u,convertToGeometry as l,convertFromFeatures as d,convertToFeature as p,convertFromFeature as c}from"../../featureConversionUtils.js";import{executeQueryForSnapping as m}from"../../data/executeQueryForSnapping.js";import y from"../../data/FeatureStore.js";import{checkProjectionSupport as h,project as f}from"../../data/projectionSupport.js";import{QueryEngine as g}from"../../data/QueryEngine.js";import{inferLayerProperties as _,createOptimizedFeatures as F,validateGeoJSON as I}from"./geojson.js";import{createDrawingInfo as j,createDefaultTemplate as E,createDefaultAttributesFunction as b}from"../support/clientSideDefaults.js";import{loadGeometryEngineForSimplify as T,mixAttributes as w,createFeatureEditSuccessResult as q,createFeatureEditErrorResult as x,simplify as S}from"../support/sourceUtils.js";import R from"../../../support/FieldsIndex.js";import{kebabDict as C}from"../../../support/fieldType.js";import{getFieldDefaultValue as O,getFieldDefaultLength as k}from"../../../support/fieldUtils.js";import{utc as D}from"../../../../time/timeZoneUtils.js";const Q={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryWithCacheHint:!0,supportsQueryWithDistance:!0,supportsQueryWithResultType:!0,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};class A{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const i=[],[r]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),n=_(r,{geometryType:e.geometryType}),o=e.fields||n.fields||[],u=null!=e.hasZ?e.hasZ:n.hasZ,l=n.geometryType;let d=e.objectIdField||n.objectIdFieldName||"__OBJECTID";const p=e.spatialReference||a;let c=e.timeInfo;o===n.fields&&n.unknownFields.length>0&&i.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:n.unknownFields}});const m=new R(o);let h=m.get(d);h?("esriFieldTypeString"!==h.type&&(h.type="esriFieldTypeOID"),h.editable=!1,h.nullable=!1,d=h.name):(h={alias:d,name:d,type:"string"===n.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(h));const f={};for(const a of o){if(null==a.name&&(a.name=a.alias),null==a.alias&&(a.alias=a.name),!a.name)throw new s("geojson-layer:invalid-field-name","field name is missing",{field:a});if(!C.jsonValues.includes(a.type))throw new s("geojson-layer:invalid-field-type",`invalid type for field "${a.name}"`,{field:a});if(a.name!==h.name){const e=O(a);void 0!==e&&(f[a.name]=e)}null==a.length&&(a.length=k(a))}if(c){if(c.startTimeField){const e=m.get(c.startTimeField);e?(c.startTimeField=e.name,e.type="esriFieldTypeDate"):c.startTimeField=null}if(c.endTimeField){const e=m.get(c.endTimeField);e?(c.endTimeField=e.name,e.type="esriFieldTypeDate"):c.endTimeField=null}if(c.trackIdField){const e=m.get(c.trackIdField);e?c.trackIdField=e.name:(c.trackIdField=null,i.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:c}}))}c.startTimeField||c.endTimeField||(i.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:c}}),c=null)}const F=l?j(l):void 0,I=m.dateFields.length?{timeZoneIANA:D}:null,T={warnings:i,featureErrors:[],layerDefinition:{...Q,drawingInfo:F??void 0,templates:E(f),extent:void 0,geometryType:l,objectIdField:d,fields:o,hasZ:!!u,timeInfo:c,dateFieldsTimeReference:I}};this._queryEngine=new g({fieldsIndex:R.fromLayerJSON({fields:o,timeInfo:c,dateFieldsTimeReference:I}),geometryType:l,hasM:!1,hasZ:u,objectIdField:d,spatialReference:p,timeInfo:c,featureStore:new y({geometryType:l,hasM:!1,hasZ:u})});const w=this._queryEngine.fieldsIndex.requiredFields.indexOf(h);w>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(w,1),this._createDefaultAttributes=b(f,d);const q=await this._createFeatures(r);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,q);const x=this._normalizeFeatures(q,T.featureErrors);this._queryEngine.featureStore.addMany(x);const{fullExtent:S,timeExtent:A}=await this._queryEngine.fetchRecomputedExtents();if(T.layerDefinition.extent=S,A){const{start:e,end:t}=A;T.layerDefinition.timeInfo.timeExtent=[e,t]}return T}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([T(t,s),h(e.adds,t),h(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),m(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=t(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)}),(e=>{this._queryEngine.featureStore.clear(),r(e)||i.getLogger("esri.layers.GeoJSONLayer").error(new s("geojson-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:n,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();return{extent:n,timeExtent:a}}async _createFeatures(e){if(null==e)return[];const{geometryType:t,hasZ:s,objectIdField:i}=this._queryEngine,r=F(e,{geometryType:t,hasZ:s,objectIdField:i});if(!o(this._queryEngine.spatialReference,a))for(const n of r)null!=n.geometry&&(n.geometry=u(f(l(n.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),a,this._queryEngine.spatialReference)));return r}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:s,customParameters:i}=this._loadOptions,r=(await e(s??"",{responseType:"json",query:{...i},signal:t})).data;return I(r),r}_normalizeFeatures(e,t){const{objectIdField:s,fieldsIndex:i}=this._queryEngine,r=[];for(const n of e){const e=this._createDefaultAttributes(),a=w(i,e,n.attributes,!0);a?t?.push(a):(this._assignObjectId(e,n.attributes,!0),n.attributes=e,n.objectId=e[s],r.push(n))}return r}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(r,t),s?.length&&this._applyUpdateEdits(r,s),i?.length){for(const e of i)r.deleteResults.push(q(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:n,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();return{extent:n,timeExtent:a,featureEditResults:r}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:r,hasZ:a,objectIdField:o,spatialReference:u,featureStore:l,fieldsIndex:p}=this._queryEngine,c=[];for(const d of t){if(d.geometry&&i!==n(d.geometry)){s.push(x("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=w(p,t,d.attributes);if(r)s.push(r);else{if(this._assignObjectId(t,d.attributes),d.attributes=t,null!=d.uid){const t=d.attributes[o];e.uidToObjectId[d.uid]=t}if(null!=d.geometry){const e=d.geometry.spatialReference??u;d.geometry=f(S(d.geometry,e),e,u)}c.push(d),s.push(q(d.attributes[o]))}}l.addMany(d([],c,i,a,r,o))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:o,featureStore:u,fieldsIndex:l}=this._queryEngine;for(const d of t){const{attributes:t,geometry:m}=d,y=t?.[a];if(null==y){e.push(x(`Identifier field ${a} missing`));continue}if(!u.has(y)){e.push(x(`Feature with object id ${y} missing`));continue}const h=p(u.getFeature(y),s,r,i);if(null!=m){if(s!==n(m)){e.push(x("Incorrect geometry type."));continue}const t=m.spatialReference??o;h.geometry=f(S(m,t),t,o)}if(t){const s=w(l,h.attributes,t);if(s){e.push(s);continue}}u.add(c(h,s,r,i,a)),e.push(q(y))}}_createObjectIdGenerator(e,t){const s=e.fieldsIndex.get(e.objectIdField);if("esriFieldTypeString"===s.type)return()=>s.name+"-"+Date.now().toString(16);let i=Number.NEGATIVE_INFINITY;for(const r of t)r.objectId&&(i=Math.max(i,r.objectId));return i=Math.max(0,i)+1,()=>i++}_assignObjectId(e,t,s=!1){const i=this._queryEngine.objectIdField;e[i]=s&&i in t?t[i]:this._objectIdGenerator()}async _checkProjection(e){try{await h(a,e)}catch{throw new s("geojson-layer","Projection not supported")}}}export{A as default};
|
|
5
|
+
import e from"../../../../request.js";import{createTask as t}from"../../../../core/asyncUtils.js";import s from"../../../../core/Error.js";import i from"../../../../core/Logger.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{getJsonType as n}from"../../../../geometry/support/jsonUtils.js";import{wgs84 as a,equals as o}from"../../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as u,convertToGeometry as l,convertFromFeatures as d,convertToFeature as p,convertFromFeature as c}from"../../featureConversionUtils.js";import{executeQueryForSnapping as m}from"../../data/executeQueryForSnapping.js";import y from"../../data/FeatureStore.js";import{checkProjectionSupport as h,project as f}from"../../data/projectionSupport.js";import{QueryEngine as g}from"../../data/QueryEngine.js";import{inferLayerProperties as _,createOptimizedFeatures as F,validateGeoJSON as I}from"./geojson.js";import{createDrawingInfo as j,createDefaultTemplate as E,createDefaultAttributesFunction as b}from"../support/clientSideDefaults.js";import{loadGeometryEngineForSimplify as T,mixAttributes as w,createFeatureEditSuccessResult as q,createFeatureEditErrorResult as x,simplify as S}from"../support/sourceUtils.js";import R from"../../../support/FieldsIndex.js";import{kebabDict as O}from"../../../support/fieldType.js";import{getFieldDefaultValue as C,getFieldDefaultLength as k}from"../../../support/fieldUtils.js";import{utc as D}from"../../../../time/timeZoneUtils.js";const Q={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryWithCacheHint:!0,supportsQueryWithDistance:!0,supportsQueryWithResultType:!0,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};class A{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const i=[],[r]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),n=_(r,{geometryType:e.geometryType}),o=e.fields||n.fields||[],u=null!=e.hasZ?e.hasZ:n.hasZ,l=n.geometryType;let d=e.objectIdField||n.objectIdFieldName||"__OBJECTID";const p=e.spatialReference||a;let c=e.timeInfo;o===n.fields&&n.unknownFields.length>0&&i.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:n.unknownFields}});const m=new R(o);let h=m.get(d);h?("esriFieldTypeString"!==h.type&&(h.type="esriFieldTypeOID"),h.editable=!1,h.nullable=!1,d=h.name):(h={alias:d,name:d,type:"string"===n.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(h));const f={};for(const a of o){if(null==a.name&&(a.name=a.alias),null==a.alias&&(a.alias=a.name),!a.name)throw new s("geojson-layer:invalid-field-name","field name is missing",{field:a});if(!O.jsonValues.includes(a.type))throw new s("geojson-layer:invalid-field-type",`invalid type for field "${a.name}"`,{field:a});if(a.name!==h.name){const e=C(a);void 0!==e&&(f[a.name]=e)}null==a.length&&(a.length=k(a))}if(c){if(c.startTimeField){const e=m.get(c.startTimeField);e?(c.startTimeField=e.name,e.type="esriFieldTypeDate"):c.startTimeField=null}if(c.endTimeField){const e=m.get(c.endTimeField);e?(c.endTimeField=e.name,e.type="esriFieldTypeDate"):c.endTimeField=null}if(c.trackIdField){const e=m.get(c.trackIdField);e?c.trackIdField=e.name:(c.trackIdField=null,i.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:c}}))}c.startTimeField||c.endTimeField||(i.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:c}}),c=null)}const F=l?j(l):void 0,I=m.dateFields.length?{timeZoneIANA:D}:null,T={warnings:i,featureErrors:[],layerDefinition:{...Q,drawingInfo:F??void 0,templates:E(f),extent:void 0,geometryType:l,objectIdField:d,fields:o,hasZ:!!u,timeInfo:c,dateFieldsTimeReference:I}};this._queryEngine=new g({fieldsIndex:R.fromLayerJSON({fields:o,timeInfo:c,dateFieldsTimeReference:I}),geometryType:l,hasM:!1,hasZ:u,objectIdField:d,spatialReference:p,timeInfo:c,featureStore:new y({geometryType:l,hasM:!1,hasZ:u})});const w=this._queryEngine.fieldsIndex.requiredFields.indexOf(h);w>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(w,1),this._createDefaultAttributes=b(f,d);const q=await this._createFeatures(r);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,q);const x=this._normalizeFeatures(q,T.featureErrors);this._queryEngine.featureStore.addMany(x);const{fullExtent:S,timeExtent:A}=await this._queryEngine.fetchRecomputedExtents();if(T.layerDefinition.extent=S,A){const{start:e,end:t}=A;T.layerDefinition.timeInfo.timeExtent=[e,t]}return T}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([T(t,s),h(e.adds,t),h(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),m(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=t(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)}),(e=>{this._queryEngine.featureStore.clear(),r(e)||i.getLogger("esri.layers.GeoJSONLayer").error(new s("geojson-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:n,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();return{extent:n,timeExtent:a}}async _createFeatures(e){if(null==e)return[];const{geometryType:t,hasZ:s,objectIdField:i}=this._queryEngine,r=F(e,{geometryType:t,hasZ:s,objectIdField:i});if(!o(this._queryEngine.spatialReference,a))for(const n of r)null!=n.geometry&&(n.geometry=u(f(l(n.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),a,this._queryEngine.spatialReference)));return r}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:s,customParameters:i}=this._loadOptions,r=(await e(s??"",{responseType:"json",query:{...i},signal:t})).data;return I(r),r}_normalizeFeatures(e,t){const{objectIdField:s,fieldsIndex:i}=this._queryEngine,r=[];for(const n of e){const e=this._createDefaultAttributes(),a=w(i,e,n.attributes,!0);a?t?.push(a):(this._assignObjectId(e,n.attributes,!0),n.attributes=e,n.objectId=e[s],r.push(n))}return r}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(r,t),s?.length&&this._applyUpdateEdits(r,s),i?.length){for(const e of i)r.deleteResults.push(q(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:n,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();return{extent:n,timeExtent:a,featureEditResults:r}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:r,hasZ:a,objectIdField:o,spatialReference:u,featureStore:l,fieldsIndex:p}=this._queryEngine,c=[];for(const d of t){if(d.geometry&&i!==n(d.geometry)){s.push(x("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=w(p,t,d.attributes);if(r)s.push(r);else{if(this._assignObjectId(t,d.attributes),d.attributes=t,null!=d.uid){const t=d.attributes[o];e.uidToObjectId[d.uid]=t}if(null!=d.geometry){const e=d.geometry.spatialReference??u;d.geometry=f(S(d.geometry,e),e,u)}c.push(d),s.push(q(d.attributes[o]))}}l.addMany(d([],c,i,a,r,o))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:o,featureStore:u,fieldsIndex:l}=this._queryEngine;for(const d of t){const{attributes:t,geometry:m}=d,y=t?.[a];if(null==y){e.push(x(`Identifier field ${a} missing`));continue}if(!u.has(y)){e.push(x(`Feature with object id ${y} missing`));continue}const h=p(u.getFeature(y),s,r,i);if(null!=m){if(s!==n(m)){e.push(x("Incorrect geometry type."));continue}const t=m.spatialReference??o;h.geometry=f(S(m,t),t,o)}if(t){const s=w(l,h.attributes,t);if(s){e.push(s);continue}}u.add(c(h,s,r,i,a)),e.push(q(y))}}_createObjectIdGenerator(e,t){const s=e.fieldsIndex.get(e.objectIdField);if("esriFieldTypeString"===s.type)return()=>s.name+"-"+Date.now().toString(16);let i=Number.NEGATIVE_INFINITY;for(const r of t)r.objectId&&(i=Math.max(i,r.objectId));return i=Math.max(0,i)+1,()=>i++}_assignObjectId(e,t,s=!1){const i=this._queryEngine.objectIdField;e[i]=s&&i in t?t[i]:this._objectIdGenerator()}async _checkProjection(e){try{await h(a,e)}catch{throw new s("geojson-layer","Projection not supported")}}}export{A as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../core/Error.js";import{getJsonType as t,isPoint as i}from"../../../../geometry/support/jsonUtils.js";import{wgs84 as s}from"../../../../geometry/support/spatialReferenceUtils.js";import{convertFromFeatures as r,convertToFeature as n,convertFromFeature as a}from"../../featureConversionUtils.js";import{initialObjectId as o,findLastObjectIdFromFeatures as l}from"../../objectIdUtils.js";import{executeQueryForSnapping as u}from"../../data/executeQueryForSnapping.js";import d from"../../data/FeatureStore.js";import{checkProjectionSupport as p,project as f}from"../../data/projectionSupport.js";import{QueryEngine as c}from"../../data/QueryEngine.js";import{createDefaultAttributesFunction as y,createDrawingInfo as m,createDefaultTemplate as h}from"./clientSideDefaults.js";import{loadGeometryEngineForSimplify as g,createFeatureEditErrorResult as I,mixAttributes as
|
|
5
|
+
import e from"../../../../core/Error.js";import{getJsonType as t,isPoint as i}from"../../../../geometry/support/jsonUtils.js";import{wgs84 as s}from"../../../../geometry/support/spatialReferenceUtils.js";import{convertFromFeatures as r,convertToFeature as n,convertFromFeature as a}from"../../featureConversionUtils.js";import{initialObjectId as o,findLastObjectIdFromFeatures as l}from"../../objectIdUtils.js";import{executeQueryForSnapping as u}from"../../data/executeQueryForSnapping.js";import d from"../../data/FeatureStore.js";import{checkProjectionSupport as p,project as f}from"../../data/projectionSupport.js";import{QueryEngine as c}from"../../data/QueryEngine.js";import{createDefaultAttributesFunction as y,createDrawingInfo as m,createDefaultTemplate as h}from"./clientSideDefaults.js";import{loadGeometryEngineForSimplify as g,createFeatureEditErrorResult as I,mixAttributes as F,createFeatureEditSuccessResult as b,simplify as j}from"./sourceUtils.js";import E from"../../../support/FieldsIndex.js";import{kebabDict as _}from"../../../support/fieldType.js";import{getFieldDefaultLength as T,getFieldDefaultValue as x}from"../../../support/fieldUtils.js";import{utc as R}from"../../../../time/timeZoneUtils.js";const q=s,O={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:s},D={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentOrderByFields:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0,supportsQueryWithCacheHint:!0}};function w(e){return i(e)?null!=e.z:!!e.hasZ}function S(e){return i(e)?null!=e.m:!!e.hasM}class Q{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(t){const i=[],{features:s}=t,r=this._inferLayerProperties(s,t.fields),n=t.fields||[],a=null!=t.hasM?t.hasM:!!r.hasM,u=null!=t.hasZ?t.hasZ:!!r.hasZ,f=!t.spatialReference&&!r.spatialReference,g=f?q:t.spatialReference||r.spatialReference,I=f?O:null,F=t.geometryType||r.geometryType,b=!F;let j=t.objectIdField||r.objectIdField,w=t.timeInfo;const S=new E(n);if(!b&&(f&&i.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!F))throw new e("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!j)throw new e("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(r.objectIdField&&j!==r.objectIdField&&(i.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${j}" doesn't match the field name "${r.objectIdField}", found in the provided fields`}),j=r.objectIdField),j&&!r.objectIdField){const e=S.get(j);e?(j=e.name,e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):n.unshift({alias:j,name:j,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const o of n){if(null==o.name&&(o.name=o.alias),null==o.alias&&(o.alias=o.name),!o.name)throw new e("feature-layer:invalid-field-name","field name is missing",{field:o});if(o.name===j&&(o.type="esriFieldTypeOID"),!_.jsonValues.includes(o.type))throw new e("feature-layer:invalid-field-type",`invalid type for field "${o.name}"`,{field:o});null==o.length&&(o.length=T(o))}const Q={};for(const e of n)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=x(e);void 0!==t&&(Q[e.name]=t)}if(w){if(w.startTimeField){const e=S.get(w.startTimeField);e?(w.startTimeField=e.name,e.type="esriFieldTypeDate"):w.startTimeField=null}if(w.endTimeField){const e=S.get(w.endTimeField);e?(w.endTimeField=e.name,e.type="esriFieldTypeDate"):w.endTimeField=null}if(w.trackIdField){const e=S.get(w.trackIdField);e?w.trackIdField=e.name:(w.trackIdField=null,i.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:w}}))}w.startTimeField||w.endTimeField||(i.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:w}}),w=null)}const v=S.dateFields.length?{timeZoneIANA:t.dateFieldsTimeZone??R}:null;this._createDefaultAttributes=y(Q,j);const M={warnings:i,featureErrors:[],layerDefinition:{...D,drawingInfo:m(F),templates:h(Q),extent:I,geometryType:F,objectIdField:j,fields:n,hasZ:u,hasM:a,timeInfo:w,dateFieldsTimeReference:v},assignedObjectIds:{}};if(this._queryEngine=new c({fieldsIndex:E.fromLayerJSON({fields:n,timeInfo:w,dateFieldsTimeReference:v}),geometryType:F,hasM:a,hasZ:u,objectIdField:j,spatialReference:g,featureStore:new d({geometryType:F,hasM:a,hasZ:u}),timeInfo:w}),!s?.length)return this._nextObjectId=o,M;const Z=l(j,s);return this._nextObjectId=Z+1,await p(s,g),this._loadInitialFeatures(M,s)}async applyEdits(e){const{spatialReference:t,geometryType:i}=this._queryEngine;return await Promise.all([g(t,i),p(e.adds,t),p(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return u(this._queryEngine,e,t.signal)}queryAttributeBins(e,t={}){return this._queryEngine.executeAttributeBinsQuery(e,t.signal)}_inferLayerProperties(e,i){let s,r,n=null,a=null,o=null;for(const l of e){const e=l.geometry;if(null!=e&&(n||(n=t(e)),a||(a=e.spatialReference),null==s&&(s=w(e)),null==r&&(r=S(e)),n&&a&&null!=s&&null!=r))break}if(i&&i.length){let e=null;i.some((t=>{const i="esriFieldTypeOID"===t.type,s=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,i||s}))&&(o=e.name)}return{geometryType:n,spatialReference:a,objectIdField:o,hasM:r,hasZ:s}}async _loadInitialFeatures(e,i){const{geometryType:s,hasM:n,hasZ:a,objectIdField:o,spatialReference:l,featureStore:u,fieldsIndex:d}=this._queryEngine,p=[];for(const r of i){if(null!=r.uid&&(e.assignedObjectIds[r.uid]=-1),r.geometry&&s!==t(r.geometry)){e.featureErrors.push(I("Incorrect geometry type."));continue}const i=this._createDefaultAttributes(),n=F(d,i,r.attributes,!0);n?e.featureErrors.push(n):(this._assignObjectId(i,r.attributes,!0),r.attributes=i,null!=r.uid&&(e.assignedObjectIds[r.uid]=r.attributes[o]),null!=r.geometry&&(r.geometry=f(r.geometry,r.geometry.spatialReference,l)),p.push(r))}u.addMany(r([],p,s,a,n,o));const{fullExtent:c,timeExtent:y}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=c,y){const{start:t,end:i}=y;e.layerDefinition.timeInfo.timeExtent=[t,i]}return e}async _applyEdits(e){const{adds:t,updates:i,deletes:s}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(r,t),i?.length&&this._applyUpdateEdits(r,i),s?.length){for(const e of s)r.deleteResults.push(b(e));this._queryEngine.featureStore.removeManyById(s)}const{fullExtent:n,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();return{extent:n,timeExtent:a,featureEditResults:r}}_applyAddEdits(e,i){const{addResults:s}=e,{geometryType:n,hasM:a,hasZ:o,objectIdField:l,spatialReference:u,featureStore:d,fieldsIndex:p}=this._queryEngine,c=[];for(const r of i){if(r.geometry&&n!==t(r.geometry)){s.push(I("Incorrect geometry type."));continue}const i=this._createDefaultAttributes(),a=F(p,i,r.attributes);if(a)s.push(a);else{if(this._assignObjectId(i,r.attributes),r.attributes=i,null!=r.uid){const t=r.attributes[l];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??u;r.geometry=f(j(r.geometry,e),e,u)}c.push(r),s.push(b(r.attributes[l]))}}d.addMany(r([],c,n,o,a,l))}_applyUpdateEdits({updateResults:e},i){const{geometryType:s,hasM:r,hasZ:o,objectIdField:l,spatialReference:u,featureStore:d,fieldsIndex:p}=this._queryEngine;for(const c of i){const{attributes:i,geometry:y}=c,m=i?.[l];if(null==m){e.push(I(`Identifier field ${l} missing`));continue}if(!d.has(m)){e.push(I(`Feature with object id ${m} missing`));continue}const h=n(d.getFeature(m),s,o,r);if(null!=y){if(s!==t(y)){e.push(I("Incorrect geometry type."));continue}const i=y.spatialReference??u;h.geometry=f(j(y,i),i,u)}if(i){const t=F(p,h.attributes,i);if(t){e.push(t);continue}}d.add(a(h,s,o,r,l)),e.push(b(m))}}_assignObjectId(e,t,i=!1){const s=this._queryEngine.objectIdField;i&&t&&isFinite(t[s])?e[s]=t[s]:e[s]=this._nextObjectId++}}export{Q as default};
|
package/layers/ogc/wcsUtils.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/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import e from"../../request.js";import r from"../../core/Error.js";import{isAbortError as s}from"../../core/promiseUtils.js";import{isSupportedVersion as t,parseCapabilities as o}from"../support/rasterDatasets/wcsCapabilitiesParser.js";import{parseCoverages as a}from"../support/rasterDatasets/wcsCoverageParser.js";async function i(a,i){const{version:n,customParameters:c,signal:p}=i??{},l=n?.startsWith("1.0")?"version":"acceptVersions",m={service:"WCS",request:"GetCapabilities",[l]:n,...c};try{let{data:r}=await e(a,{query:m,responseType:"xml",signal:p});return i?.version||t(r)||(m[l]="2.0.1",({data:r}=await e(a,{query:m,responseType:"xml",signal:p}))),o(r)}catch(u){if(!s(u))throw new r("wcslayer:open","wcs capabilities is not valid or supported");throw u}}async function n(t,o){const{coverageIds:i,version:n,customParameters:c,signal:p}=o,l=n.slice(0,3),m="1.0"===l?"coverage":"1.1"===l?"identifiers":"coverageId",u={service:"WCS",request:"DescribeCoverage",version:n,[m]:i.join(","),...c};try{const{data:r}=await e(t,{query:u,responseType:"xml",signal:p});return a(r,n)}catch(v){if(!s(v))throw new r("wcslayer:open","wcs coverage description is not valid or supported");throw v}}export{n as describeCoverage,i as getCapabilities};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import{JSONMap as e}from"../../core/jsonMap.js";import o from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{Integer as i}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import s from"./RasterFunctionInfo.js";import n from"./RasterFunctionProperties.js";const y=new e({0:"mosaic",1:"item",2:"item-group"},{useNumericKeys:!0});let a=class extends o{constructor(){super(...arguments),this.functionType="mosaic",this.type="RasterFunctionTemplate"}};t([r({type:[String],json:{write:!0}})],a.prototype,"aliases",void 0),t([r({type:Object,json:{write:{isRequired:!0}}})],a.prototype,"arguments",void 0),t([r({type:String,json:{write:{isRequired:!0}}})],a.prototype,"description",void 0),t([r({type:s,json:{write:{isRequired:!0},name:"function"}})],a.prototype,"functionInfo",void 0),t([r({type:y.apiValues,json:{type:[0,1,2],read:y.read,write:{writer:y.write,isRequired:!0}}})],a.prototype,"functionType",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"group",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"help",void 0),t([r({type:Number,json:{type:i,write:!0,name:"_object_id"}})],a.prototype,"id",void 0),t([r({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),t([r({type:String,json:{write:!0,name:"definition"}})],a.prototype,"queryDefinition",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"tag",void 0),t([r({type:n,json:{write:!0}})],a.prototype,"properties",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"thumbnail",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"thumbnailEx",void 0),t([r({json:{type:["RasterFunctionTemplate"],write:!0}})],a.prototype,"type",void 0),a=t([p("esri.layers.support.RasterFunctionTemplate")],a);const c=a;export{c as default};
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import{JSONMap as e}from"../../core/jsonMap.js";import o from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{Integer as i}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import s from"./RasterFunctionInfo.js";import n from"./RasterFunctionProperties.js";const y=new e({0:"mosaic",1:"item",2:"item-group"},{useNumericKeys:!0});let a=class extends o{constructor(){super(...arguments),this.description="",this.functionType="mosaic",this.type="RasterFunctionTemplate"}};t([r({type:[String],json:{write:!0}})],a.prototype,"aliases",void 0),t([r({type:Object,json:{write:{isRequired:!0}}})],a.prototype,"arguments",void 0),t([r({type:String,json:{write:{isRequired:!0}}})],a.prototype,"description",void 0),t([r({type:s,json:{write:{isRequired:!0},name:"function"}})],a.prototype,"functionInfo",void 0),t([r({type:y.apiValues,json:{type:[0,1,2],read:y.read,write:{writer:y.write,isRequired:!0}}})],a.prototype,"functionType",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"group",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"help",void 0),t([r({type:Number,json:{type:i,write:!0,name:"_object_id"}})],a.prototype,"id",void 0),t([r({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),t([r({type:String,json:{write:!0,name:"definition"}})],a.prototype,"queryDefinition",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"tag",void 0),t([r({type:n,json:{write:!0}})],a.prototype,"properties",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"thumbnail",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"thumbnailEx",void 0),t([r({json:{type:["RasterFunctionTemplate"],write:!0}})],a.prototype,"type",void 0),a=t([p("esri.layers.support.RasterFunctionTemplate")],a);const c=a;export{c as default};
|