@arcgis/core 4.33.0-next.20250324 → 4.33.0-next.20250326
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/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/containerUtils.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/fieldStats.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/arcade/functions/stats.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/geometry/functions.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0059295780fa4a090f30.js +319 -0
- package/assets/esri/core/workers/chunks/{8f4bcca8b0525e19374f.js → 042771b4e56355924140.js} +1 -1
- package/assets/esri/core/workers/chunks/09c9e4e94f09ba9f4c22.js +1 -0
- package/assets/esri/core/workers/chunks/{3bea1400160042dca9f3.js → 0e82365be7d9257e7cb2.js} +1 -1
- package/assets/esri/core/workers/chunks/1dd6d68d23ba07587ae4.js +1 -0
- package/assets/esri/core/workers/chunks/{fef46b841e8369b30227.js → 2873cb727c59328074db.js} +1 -1
- package/assets/esri/core/workers/chunks/3808f10747cecc8a1a9b.js +1 -0
- package/assets/esri/core/workers/chunks/{9cfce9414b874878d761.js → 4dc1e7d7ac2a4b0144c4.js} +96 -96
- package/assets/esri/core/workers/chunks/{e5e1f8ac53c70427a60b.js → 59e4e780dcdfed555ca5.js} +1 -1
- package/assets/esri/core/workers/chunks/{33005043f7084048296d.js → 6ab96eaaad0aaad46db9.js} +1 -1
- package/assets/esri/core/workers/chunks/705c1ebb327f680f8519.js +1 -0
- package/assets/esri/core/workers/chunks/{bd2dcc55ac3418421ee5.js → 726e3f413824f02fe689.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c9160e3d596fe75392d.js → 75ec4d2ae9d427a1434f.js} +1 -1
- package/assets/esri/core/workers/chunks/{11f9d7cd95891596b716.js → 77199b4b39ee8b4303de.js} +1 -1
- package/assets/esri/core/workers/chunks/{74c01de62ccaed0666e0.js → 81f2f1614ea27f4c2e65.js} +1 -1
- package/assets/esri/core/workers/chunks/{d787474e78360c925fd9.js → a59ad50d932da1e28c8f.js} +1 -1
- package/assets/esri/core/workers/chunks/afe94e351b4a50d7bc53.js +1 -0
- package/assets/esri/core/workers/chunks/{47c04980098dc0c228d7.js → b02ac03503bfff1ff922.js} +1 -1
- package/assets/esri/core/workers/chunks/{cbbbaccc0d3683e1c0fe.js → b8a4352f83502449ff95.js} +1 -1
- package/assets/esri/core/workers/chunks/{605eddec7aac891ed141.js → ba47e43ef039fe4b8c5c.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ee000c92e4d5d21e22d.js → bc3f42401131a12fce9b.js} +1 -1
- package/assets/esri/core/workers/chunks/{2cedf4222238c86a98e8.js → c6bcfa99fb222894fa0e.js} +1 -1
- package/assets/esri/core/workers/chunks/cb386923200272cf26a9.js +1 -0
- package/assets/esri/core/workers/chunks/{a2377969f76640f1d6fe.js → d5d2a4e8e19898d86c6d.js} +1 -1
- package/assets/esri/core/workers/chunks/{5f8028928ae8e5d27dda.js → e088edb9ffbaa1ed12eb.js} +1 -1
- package/assets/esri/core/workers/chunks/ed831e51c2a03ee95879.js +1 -0
- package/assets/esri/core/workers/chunks/{3e9cd82325c473ddbf1f.js → edcc0fefd57323d2cb67.js} +1 -1
- package/assets/esri/core/workers/chunks/{065ae931b5891847a06f.js → f28eaf1d3a7f12788bcf.js} +1 -1
- package/assets/esri/core/workers/chunks/f9396af9cbfd165e72e2.js +1 -0
- package/assets/esri/core/workers/chunks/{f86736a60856ef7fdacb.js → fa3eeb40e2d732c184d8.js} +1 -1
- package/chunks/BloomBlur.glsl.js +1 -1
- package/chunks/BloomComposition.glsl.js +2 -2
- package/chunks/ComponentShader.glsl.js +24 -25
- package/chunks/HighlightApply.glsl.js +1 -1
- package/chunks/HighlightDownsample.glsl.js +1 -1
- package/chunks/HighlightToSingle.glsl.js +1 -1
- package/chunks/LineSeries.js +1 -1
- package/chunks/ShadowHighlight.glsl.js +1 -1
- package/chunks/Theme.js +1 -1
- package/chunks/Tick.js +1 -1
- package/chunks/WaterSurface.glsl.js +1 -1
- package/chunks/aiServices.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/chartUtilsAm5.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/chunks/nl_NL.js +1 -1
- package/chunks/vec32.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/interfaces.d.ts +17 -17
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/package.json +1 -1
- package/rest/support/DirectionLine.js +1 -1
- package/rest/support/DirectionPoint.js +1 -1
- package/rest/support/PointBarrier.js +1 -1
- package/rest/support/PolygonBarrier.js +1 -1
- package/rest/support/PolylineBarrier.js +1 -1
- package/rest/support/RasterData.js +1 -1
- package/rest/support/RouteInfo.js +1 -1
- package/rest/support/Stop.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/LabelManager.js +1 -1
- package/views/2d/engine/vectorTiles/Placement.js +1 -1
- package/views/2d/engine/vectorTiles/SourceLayerData.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
- package/views/2d/engine/vectorTiles/TileManager.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/BaseBucket.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
- package/views/2d/engine/vectorTiles/constants.js +5 -0
- package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +5 -0
- package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/core.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/jobsUtil.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/util.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
- package/views/2d/engine/webgl/AFeatureTile.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/Buffer.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/meshDebugUtils.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/AlignedVertexSpec.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/processor/LabelMatcherSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/SubtypeProcessorSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
- package/views/2d/tiling/FeatureTileSubscriptionManager.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/Viewshed/ScaleOrientManipulation.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/deconflictorDebug.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/buffer/InterleavedLayout.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoubleConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +9 -9
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/{UintTexture2DBindUniform.js → Texture2DUintBindUniform.js} +1 -1
- package/views/3d/webgl-engine/core/shaderModules/{UintTexture2DPassUniform.js → Texture2DUintPassUniform.js} +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
- package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightDownsample.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightToSingle.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0e164b19e4ea3aa73843.js +0 -1
- package/assets/esri/core/workers/chunks/1034155c525d2b7baaa1.js +0 -1
- package/assets/esri/core/workers/chunks/2b9ce6648823f6962f58.js +0 -1
- package/assets/esri/core/workers/chunks/88a7780b1c689afff8bd.js +0 -1
- package/assets/esri/core/workers/chunks/ac6b582ca180210e596c.js +0 -1
- package/assets/esri/core/workers/chunks/accd0661a6dd297fab6b.js +0 -1
- package/assets/esri/core/workers/chunks/b5f44cf03c4e5cc07bc4.js +0 -1
- package/assets/esri/core/workers/chunks/bfbb118ae3b4a4ce1c74.js +0 -319
- package/assets/esri/core/workers/chunks/fa7ddf3c89cdb8052b26.js +0 -1
- package/chunks/BloomDepthAdjust.glsl.js +0 -14
- package/views/2d/engine/vectorTiles/decluttering/jobs.js +0 -5
- package/views/2d/engine/webgl/collisions/CollisionEngine.js +0 -5
- package/views/2d/engine/webgl/collisions/CollisionGrid.js +0 -5
- package/views/3d/webgl-engine/core/shaderModules/TextureCubeBindUniform.js +0 -5
- package/views/3d/webgl-engine/core/shaderModules/UintTexture2DDrawUniform.js +0 -5
- package/views/3d/webgl-engine/effects/bloom/BloomDepthAdjust.glsl.js +0 -5
- package/views/3d/webgl-engine/effects/bloom/BloomDepthAdjustTechnique.js +0 -5
|
@@ -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 e}from"../../../chunks/tslib.es6.js";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../core/mathUtils.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/number.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/GLObjectType.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../intl/locale.js";import"luxon";import"../../../core/JSONSupport.js";import"../../../core/sql/UnknownTimeZone.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import n from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import{getHighlightGraphics as p}from"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import{BitmapTileLayerView2D as m}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as c}from"./LayerView2D.js";import g from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as f,resampleImage as u}from"./support/imageUtils.js";import d from"../tiling/TileInfoView.js";import j from"../tiling/TileKey.js";import y from"../tiling/TileQueue.js";import w from"../tiling/TileStrategy.js";import b from"../../layers/LayerView.js";import _ from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as T,MapServiceLayerViewHelper as G}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{defaultHighlightName as V}from"../../support/HighlightDefaults.js";import{TaskPriority as v}from"../../support/Scheduler.js";const I=[0,0];let P=class extends(_(m(c(b)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new d(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new y({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:v.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new w({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),T(this,this.layer)){const e=this._highlightView=new n({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new G({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:(i,t)=>{e.graphicUpdateHandler({graphic:i,property:t})},layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=p(e);if(0===s.length)return i();const r=t?.name??V;return this._addHighlightGraphics(s,r),i((()=>!this.destroyed&&this._removeHighlightGraphics(s,r)))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map((e=>e.uid)),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map((e=>e.uid)),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return f(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new j(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return u(this._tileInfoView,o,s,e)}}return f(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new j(0,0,0,0);let a,n=null;try{if(n=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),f(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(p){if(s(p))throw p;if(this.resampling&&"unknown"===n&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?u(this._tileInfoView,a,h,e):a:f(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],P.prototype,"resampling",null),e([o()],P.prototype,"tilemapCache",null),P=e([l("esri.views.2d.layers.TileLayerView2D")],P);const C=P;export{C as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../core/mathUtils.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/GLObjectType.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../intl/locale.js";import"luxon";import"../../../core/JSONSupport.js";import"../../../core/sql/UnknownTimeZone.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import n from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import{getHighlightGraphics as p}from"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import{BitmapTileLayerView2D as m}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as c}from"./LayerView2D.js";import g from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as f,resampleImage as u}from"./support/imageUtils.js";import d from"../tiling/TileInfoView.js";import j from"../tiling/TileKey.js";import y from"../tiling/TileQueue.js";import w from"../tiling/TileStrategy.js";import b from"../../layers/LayerView.js";import _ from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as T,MapServiceLayerViewHelper as G}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{defaultHighlightName as V}from"../../support/HighlightDefaults.js";import{TaskPriority as v}from"../../support/Scheduler.js";const I=[0,0];let P=class extends(_(m(c(b)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new d(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new y({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:v.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new w({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),T(this,this.layer)){const e=this._highlightView=new n({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new G({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:(i,t)=>{e.graphicUpdateHandler({graphic:i,property:t})},layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=p(e);if(0===s.length)return i();const r=t?.name??V;return this._addHighlightGraphics(s,r),i((()=>!this.destroyed&&this._removeHighlightGraphics(s,r)))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map((e=>e.uid)),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map((e=>e.uid)),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return f(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new j(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return u(this._tileInfoView,o,s,e)}}return f(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new j(0,0,0,0);let a,n=null;try{if(n=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),f(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(p){if(s(p))throw p;if(this.resampling&&"unknown"===n&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?u(this._tileInfoView,a,h,e):a:f(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],P.prototype,"resampling",null),e([o()],P.prototype,"tilemapCache",null),P=e([l("esri.views.2d.layers.TileLayerView2D")],P);const C=P;export{C 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 has from"../../../../core/has.js";import{throwIfAborted as e,createResolver as t}from"../../../../core/promiseUtils.js";import{UpdatingHandles as s}from"../../../../core/support/UpdatingHandles.js";import{AFeatureContainer as r}from"../../engine/AFeatureContainer.js";import{WGLDrawPhase as i,FeatureSelection as n,FeatureBatchingStrategy as a}from"../../engine/webgl/enums.js";import o from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as h}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{TechniqueType as d}from"../../engine/webgl/shaderGraph/techniques/TechniqueType.js";import{RenderState as l}from"./RenderState.js";import{renderHighlight as u}from"../support/util.js";class c{constructor(e,s){this.id=e,this.version=s,this._resolver=t(),this._done=!1}get done(){return this._done}get promise(){return this._resolver.promise}end(){this._resolver.resolve(),this._done=!0}destroy(){this._resolver.reject()}}class _ extends r{constructor(e){super(e.view.featuresTilingScheme),this.updatingHandles=new s,this._hitTestsRequests=[],this._store=new o,this._visibleTiles=new Set,this._subscriptions=new Map,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._shouldUnlockAttributeView=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}renderChildren(e){if(this._updateAttributeView(),this._renderState?.update(this.attributeView.currentEpoch),this._renderState){const e=Array.from(this._renderState.tiles()).filter((e=>e.needsUpload));if(e.length){e[Math.floor(Math.random()*e.length)].upload(),e.length>=2&&this.requestRender()}for(const t of this._renderState.tiles())t.tryReady(this.attributeView.currentEpoch)&&(this._subscriptions.get(t.key.id)?.end(),this._layerView.requestUpdate(),this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this.requestRender())}for(const
|
|
5
|
+
import has from"../../../../core/has.js";import{throwIfAborted as e,createResolver as t}from"../../../../core/promiseUtils.js";import{UpdatingHandles as s}from"../../../../core/support/UpdatingHandles.js";import{AFeatureContainer as r}from"../../engine/AFeatureContainer.js";import{WGLDrawPhase as i,FeatureSelection as n,FeatureBatchingStrategy as a}from"../../engine/webgl/enums.js";import o from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as h}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{TechniqueType as d}from"../../engine/webgl/shaderGraph/techniques/TechniqueType.js";import{RenderState as l}from"./RenderState.js";import{renderHighlight as u}from"../support/util.js";class c{constructor(e,s){this.id=e,this.version=s,this._resolver=t(),this._done=!1}get done(){return this._done}get promise(){return this._resolver.promise}end(){this._resolver.resolve(),this._done=!0}destroy(){this._resolver.reject()}}class _ extends r{constructor(e){super(e.view.featuresTilingScheme),this.updatingHandles=new s,this._hitTestsRequests=[],this._store=new o,this._visibleTiles=new Set,this._subscriptions=new Map,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._shouldUnlockAttributeView=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}renderChildren(e){if(this._updateAttributeView(),this._renderState?.update(this.attributeView.currentEpoch),this._layerView.requestUpdate(),this._renderState){const e=Array.from(this._renderState.tiles()).filter((e=>e.needsUpload));if(e.length){e[Math.floor(Math.random()*e.length)].upload(),e.length>=2&&this.requestRender()}for(const t of this._renderState.tiles())t.tryReady(this.attributeView.currentEpoch)&&(this._subscriptions.get(t.key.id)?.end(),this._layerView.requestUpdate(),this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter(),this.requestRender())}const t=this._layerView.subscriptionManager.updateVisibility();this.setVisibleTiles(t);for(const s of this.children)s.setTransform(e.state);switch(super.renderChildren(e),e.drawPhase){case i.MAP:return this._renderMapPhase(e);case i.HIGHLIGHT:return this._renderHighlightPhase(e);case i.LABEL:return this._renderLabelPhase(e)}}subscriptions(){return this._subscriptions.values()}get _instanceStore(){return this._store}get instanceStore(){return this._store}get layerView(){return this._layerView}get hasLabels(){return this._layerView.labelingCollisionInfos.length>0}get hasHighlight(){return this._layerView.hasHighlight}get _layer(){return this._layerView.layer}_getHeatmapInstance(e){if(null==this._instanceStore||!(e.drawPhase&h.heatmap.drawPhase))return null;for(const t of this._instanceStore.values())if(p(t))return t;return null}get tiles(){return this._renderState?.tiles()}get children(){return this._renderState?Array.from(this._renderState.tiles()).filter((e=>this._visibleTiles.has(e.key.id))):[]}updateAttributeView(e){this.requestRender(),this.attributeView.requestUpdate(e),this.hasLabels&&(this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter())}updateSubscriptions(e){for(const{tileId:t,version:s}of e.subscribe)if(this._subscriptions.has(t))this._subscriptions.get(t).version=s;else{const e=new c(t,s);this._subscriptions.set(t,e),this.updatingHandles.addPromise(e.promise)}for(const t of e.unsubscribe){const e=this._subscriptions.get(t);e?.destroy(),this._subscriptions.delete(t),this.removeTile(t)}}isDone(e){return!!this._renderState&&this._renderState.isTileDone(e)}async updateRenderState(e){has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureContainer.updateRenderState`),this._renderStateNext=new l((()=>this._stage),(e=>this._subscriptions.get(e)?.version),e,this.layerView.view.labelManager.symbolFader,this,this.tileInfoView)}getDisplayStatistics(e,t){const s=this._statisticsByLevel.get(e);return s?s.get(t):null}updateStatistics(e,t){if(this._lockStatisticUpdates)return void this._updateStatisticsRequests.push({level:e,statistics:t});let s=this._statisticsByLevel.get(e);s||(s=new Map,this._statisticsByLevel.set(e,s));for(const r of t)s.set(r.fieldName,{minValue:r.minValue,maxValue:r.maxValue})}lockForOverrides(){this._renderState?.lockUploads(),this._lockStatisticUpdates=!0,this.attributeView.locked||(this.attributeView.lockTextureUploads(),this._shouldUnlockAttributeView=!0)}unlockForOverrides(){this._renderState?.unlockUploads(),this._shouldUnlockAttributeView&&(this.attributeView.unlockTextureUploads(),this._shouldUnlockAttributeView=!1),this._lockStatisticUpdates=!1;for(const e of this._updateStatisticsRequests)this.updateStatistics(e.level,e.statistics);this._updateStatisticsRequests=[],this._renderState?.flush(),this.requestRender()}trySwapRenderState(){this._renderStateNext&&(has("esri-2d-update-debug")&&console.debug(`Version[${this._renderStateNext.version}] FeatureContainer.update.swapRenderState`),this._renderState?.destroy(),this._renderState=this._renderStateNext,this._renderState.flush(),this._renderStateNext=null),this.requestRender()}setVisibleTiles(e){this._visibleTiles=e;for(const t of this.tiles??[])t.rendering=e.has(t.key.id)}async onMessage(t,s){e(s);const r=t.inner;if(!this._subscriptions.has(r.id))return;const i=this._subscriptions.get(r.id);if(i.version!==r.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${r.subscriptionVesrion} != ${i.version}`;console.debug(`Version[${e}] Tile[${r.id}] FeatureContainer - Dropping message, outdated version]`,r)}return}const n=this._renderStateNext??this._renderState;if(!n)throw new Error("InternalError: No renderState defined");n.version!==r.version&&console.error(`InternalError: Version mismatch. [renderState: ${n.version}, message: ${r.version}]`),n.enqueueUpdate(t),this.requestRender(),this._layerView.view.labelManager.requestUpdate(),this._layerView.requestUpdate()}removeTile(e){(this._renderState||this._renderStateNext)&&(this._renderState&&this._renderState.removeTile(e),this._renderStateNext&&this._renderStateNext.removeTile(e))}hitTest(e){let s=this._hitTestsRequests.find((({x:t,y:s})=>t===e.x&&s===e.y));const r=t();return s?s.resolvers.push(r):(s={x:e.x,y:e.y,resolvers:[r]},this._hitTestsRequests.push(s)),this.requestRender(),r.promise}getSortKeys(e){const t=new Set(e),s=new Map;for(const r of this.children)if(r.getSortKeys(t).forEach(((e,t)=>s.set(t,e))),s.size===t.size)break;return s}get hasAnimation(){return this.hasLabels}doRender(e){const{minScale:t,maxScale:s}=this._layer.effectiveScaleRange,r=e.state.scale;r<=(t||1/0)&&r>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}setStencilReference(e){if(null==this._getHeatmapInstance(e))super.setStencilReference(e);else for(const t of this.children)t.stencilRef=h.heatmap.getStencilReference(t)}_renderMapPhase(e){this._layerView.featureEffectView.hasEffects?(this._renderOutsideEffect(e),this._renderInsideEffect(e)):this._renderFeatures(e,n.All),this._hitTestsRequests.length>0&&this._renderHittest(e)}_renderHighlightPhase(e){this.hasHighlight&&u(e,!1,(e=>{this._renderFeatures(e,n.Highlight)}))}_renderLabelPhase(e){this._renderFeatures(e,n.All)}_renderInsideEffect(e){const t=e.painter.effects.insideEffect;t.bind(e),this._renderFeatures(e,n.InsideEffect),t.draw(e,this._layerView.featureEffectView.includedEffects),t.unbind()}_renderOutsideEffect(e){const t=e.painter.effects.outsideEffect;t.bind(e),this._renderFeatures(e,n.OutsideEffect),t.draw(e,this._layerView.featureEffectView.excludedEffects),t.unbind()}_renderHittest(e){const{context:t}=e,s=e.painter.effects.hittest,r=t.getBoundFramebufferObject(),a=t.getViewport(),o=e.passOptions,h=e.drawPhase;s.bind(e),e.passOptions=s.createOptions(e,this._hitTestsRequests),e.drawPhase=i.HITTEST;const{distance:d,smallSymbolDistance:l}=e.passOptions,u=Math.max(d,l);for(const i of this.children)i.visible&&i.containsScreenPoint(e.state,e.passOptions.position,2*u)&&this._renderTile(i,e,n.All);s.draw(e),s.unbind(),t.bindFramebuffer(r),t.restoreViewport(a),e.passOptions=o,e.drawPhase=h}_renderFeatures(e,t){const s=this._getHeatmapInstance(e);null!=s?this._renderHeatmapFeatures(e,t,s):this._renderGeometryFeatures(e,t)}_renderGeometryFeatures(e,t){for(const s of this.children)s.visible&&this._renderTile(s,e,t)}_renderHeatmapFeatures(e,t,s){for(const r of this.children)r.visible&&this._renderTile(r,e,t,d.Heatmap);s.techniqueRef.renderResolvePass(e,s)}_renderTile(e,t,s,r){const i=has("featurelayer-strict-draw-order")?a.STRICT_ORDER:has("featurelayer-force-marker-text-draw-order")?a.STRICT_MARKERS_AND_TEXT:a.BATCHING,n=e.getDisplayList(this._instanceStore,i);t.selection=s,n?.render(t,r)}}function p(e){return e.techniqueRef.type===d.Heatmap}export{_ as FeatureContainer};
|
|
@@ -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/CircularArray.js";import t from"../../../../core/Error.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{create as s}from"../../../../geometry/support/aaBoundingRect.js";import"../../tiling/TileInfoView.js";import o from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{FeatureTile as n}from"../../engine/webgl/FeatureTile.js";const
|
|
5
|
+
import e from"../../../../core/CircularArray.js";import t from"../../../../core/Error.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{create as s}from"../../../../geometry/support/aaBoundingRect.js";import"../../tiling/TileInfoView.js";import o from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{FeatureTile as n}from"../../engine/webgl/FeatureTile.js";import{TechniqueType as r}from"../../engine/webgl/shaderGraph/techniques/TechniqueType.js";const d=1e3;class l{constructor(t,i,s,o,n,r){this.getStage=t,this.getSubscriptionVersion=i,this.version=s,this._fader=o,this._container=n,this._tileInfoView=r,this._pendingUpdates=new e(d),this._locked=!1,this._tiles=new Map}destroy(){for(const e of this.tiles())e.destroy();this._pendingUpdates.clear(),this._tiles.clear()}tiles(){return this._tiles.values()}size(){return this._tiles.size}getTile(e){return this._tiles.get(e)}setTiles(e){this._tiles.clear();for(const t of e)this._tiles.set(t.key.id,t)}lockUploads(){this._locked=!0}unlockUploads(){this._locked=!1,this.flush()}enqueueUpdate(e){this._pendingUpdates.enqueue(e)}update(e){if(!this._locked)for(;this._pendingUpdates.size;){const t=this._pendingUpdates.peek();if(null==t||t.inner.attributeEpoch>e)break;this._updateTile(t),this._pendingUpdates.dequeue()}}removeTile(e){const t=this._tiles.get(e);has("esri-2d-update-debug")&&console.debug(`Tile[${e}] RenderState.removeTile`),t&&(this._fader.unregisterFeatureTile(t),t.destroy()),this._tiles.delete(e)}isTileDone(e){const t=this._tiles.get(e.id);return!!t&&(t.isReady&&t.decluttered)}flush(){for(;this._pendingUpdates.size;){const e=this._pendingUpdates.dequeue();null!=e&&this._updateTile(e)}for(const e of this._tiles.values())e.upload()}_updateTile(e){const{inner:t,objectIdMap:i}=e,s=this.getSubscriptionVersion(t.id);if(s!==t.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${t.subscriptionVesrion} != ${s}`;console.debug(`Version[${e}] Tile[${t.id}] FeatureContainer - Dropping message, outdated version]`,t)}return}if(has("esri-2d-update-debug")){const e=t.debugInfo?.chunkId??"<EnsureEnd>";console.debug(`Version[${t.version}] Tile[${t.id}] Chunk[${e}] RenderState.updateTile [${t.type}]`,t)}const o=this._ensureTile(t.id);if("update"===t.type){const[e,...s]=t.modify;o.onMessage({type:"update",modify:e,remove:t.remove,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});for(const o of s){const e=this._tiles.get(o.tileId);e&&e.onMessage({type:"update",modify:o,remove:t.remove,end:!1,isPixelBuffer:!0,attributeEpoch:null,objectIdMap:i})}return}if(null==t.append)return void o.onMessage({type:"append",clear:t.clear,debugInfo:t.debugInfo,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});const[n,...r]=t.append;o.onMessage({type:"append",clear:t.clear,append:n,debugInfo:t.debugInfo,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});for(const d of r){const e=this._tiles.get(d.tileId);e&&e.onMessage({type:"update",modify:d,remove:[],sort:!1,end:!1,isPixelBuffer:!0,attributeEpoch:null,objectIdMap:i})}}_ensureTile(e){if(!this._tiles.has(e)){const t=this._createTile(e);this._copyPixelBufferedEntitiesInto(t),this._tiles.set(e,t)}return this._tiles.get(e)}_createTile(e){has("esri-2d-update-debug")&&console.debug(`Version[${this.version}] Tile[${e}] RenderState.createTile`);const d=new o(e),l=this._tileInfoView.getTileBounds(s(),d),a=l[0],u=l[3],p=this._tileInfoView.getTileResolution(d.level),c=this._container.instanceStore.find(r.Label)?.instanceId,h=new n(d,p,a,u,this._fader,c,!0);if(this._fader.registerFeatureTile(h),h.stage=this.getStage(),!h.stage){const e=new t("featurelayerview:webgl","Cannot create tile with empty stage");i.getLogger("esri.views.2d.layers.features.RenderState").error(e)}return h}_copyPixelBufferedEntitiesInto(e){let t=7;const i=this._tileInfoView.getLODInfoAt(e.key);for(let s=-1;s<=1;s++)for(let o=-1;o<=1;o++){if(0===s&&0===o)continue;const n=e.key.getNormalizedNeighbor(o,s,i).id,r=this._tiles.get(n);if(null!=r){const i=1<<t;e.copyPixelBufferedEntitesFrom(r,i,o,s)}t--}}}export{l as RenderState};
|
|
@@ -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{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{getLayerDeconflictionEnabled as o,createLabelVVEvaluator as
|
|
5
|
+
import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{getLayerDeconflictionEnabled as o,createLabelVVEvaluator as i}from"./labelingUtils.js";import{createFeatureSourceSchema as s}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as a}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as l}from"../support/rendererUtils.js";class n{constructor(e){this.layer=e}getLabelingDeconflictionInfo(e){const t=this.layer,r=o(t);return[{vvEvaluators:{0:i(t.renderer)},deconflictionEnabled:r}]}async createServiceOptions(o){const i=this.layer,{capabilities:s,editingInfo:a,objectIdField:l,globalIdField:n,datesInUnknownTimezone:p,dateFieldsTimeZone:d,orderBy:c,parsedUrl:u}=i,y=i.fieldsIndex.toJSON(),m=r(i),f=i.timeInfo?.toJSON(),h=i.spatialReference.toJSON(),g=e(u);let b=l;if(c?.length){const e=!c[0].valueExpression&&c[0].field;e&&(b=e)}const I=t(g.path),F=o.spatialReference.toJSON();return{type:"feature-service",source:g,isSourceHosted:I,orderByFields:b,outSpatialReference:F,metadata:{timeReferenceUnknownClient:p,dateFieldsTimeZone:d,globalIdField:n,fieldsIndex:y,geometryType:m,objectIdField:l,timeInfo:f,spatialReference:h,outSpatialReference:F,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:s.query.maxRecordCount,supportsCompactGeometry:s.query.supportsCompactGeometry,supportsDefaultSpatialReference:s.query.supportsDefaultSpatialReference,supportsFormatPBF:s.query.supportsFormatPBF,supportsMaxRecordCountFactor:s.query.supportsMaxRecordCountFactor,supportsQuantization:s.query.supportsQuantization,lastEditDate:a?.lastEditDate?.getTime(),snapshotInfo:null}}}createSourceSchema(e,t){const{definitionExpression:r,displayFilterInfo:o,customParameters:i,timeExtent:a,apiKey:l}=this.layer;return s({definitionExpression:r,displayFilterInfo:o,customParameters:i,timeExtent:a},e,t,l)}createProcessorSchema(e,t,r){const{fields:o,geometryType:i,orderBy:s,objectIdField:l,renderer:n,labelingInfo:p,labelsVisible:d}=this.layer,c={featureReduction:null,layerId:this.layer.id,fields:o.map((e=>e.toJSON())),geometryType:i,labelingInfo:p,labelsVisible:d,objectIdField:l,orderBy:s??"default",renderer:n?.clone()};return a(e,t,c,r)}get hasRequiredSupport(){return l(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy]}setGraphicOrigin(e){e.origin={type:"catalog",layer:this.layer}}}export{n as CatalogFootprintLayerAdapter};
|
|
@@ -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 has from"../../../../../core/has.js";import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{exceedsMinimumSnapshotCoverage as s}from"./featureServiceUtils.js";import{addFloorFilter as o,hasFloorFilter as i}from"./floorFilterUtils.js";import{getServiceGeometryType as a}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as l,getLayerDeconflictionEnabled as n,createLabelVVEvaluator as p}from"./labelingUtils.js";import{createFeatureSourceSchema as d}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as u}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as y}from"../support/rendererUtils.js";class c{constructor(e){this.layer=e}getLabelingDeconflictionInfo(e){const t=this.layer,
|
|
5
|
+
import has from"../../../../../core/has.js";import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{exceedsMinimumSnapshotCoverage as s}from"./featureServiceUtils.js";import{addFloorFilter as o,hasFloorFilter as i}from"./floorFilterUtils.js";import{getServiceGeometryType as a}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as l,getLayerDeconflictionEnabled as n,createLabelVVEvaluator as p}from"./labelingUtils.js";import{createFeatureSourceSchema as d}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as u}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as y}from"../support/rendererUtils.js";class c{constructor(e){this.layer=e}getLabelingDeconflictionInfo(e){const t=this.layer,s=l(t,e)??n(t),o=r(t,e),i=[...t.labelingInfo||[],...o?.labelingInfo||[]];return[{vvEvaluators:{0:p(t.renderer)},deconflictionEnabled:s,labelingInfo:i}]}async createServiceOptions(r){const o=this.layer,{capabilities:i,editingInfo:l,objectIdField:n,typeIdField:p,globalIdField:d,datesInUnknownTimezone:u,dateFieldsTimeZone:y,orderBy:c,subtypeField:m,refreshInterval:f}=o,h=o.fieldsIndex.toJSON(),b=a(o),g=o.timeInfo?.toJSON(),I=o.spatialReference.toJSON(),F=o.types?.map((e=>e.toJSON())),S=e(this.layer.parsedUrl);this.layer.dynamicDataSource&&(S.query={layer:JSON.stringify({source:this.layer.dynamicDataSource})});let x=this.layer.objectIdField;if(c?.length){const e=!c[0].valueExpression&&c[0].field;e&&(x=e)}const j=!(null!=l?.lastEditDate)&&f>0,R=!!has("featurelayer-snapshot-enabled")&&"point"===o.geometryType&&i?.query.supportsPagination&&!i?.operations.supportsEditing&&!j,E=R&&s(r,o.fullExtent),C=t(S.path),T=r.spatialReference.toJSON();return{type:"feature-service",source:S,isSourceHosted:C,orderByFields:x,outSpatialReference:T,metadata:{typeIdField:p??void 0,types:F,timeReferenceUnknownClient:u,dateFieldsTimeZone:y,subtypeField:m,globalIdField:d,fieldsIndex:h,geometryType:b,objectIdField:n,timeInfo:g,spatialReference:I,outSpatialReference:T,subtypes:this.layer.subtypes?.map((e=>e.toJSON()))},queryMetadata:{maxRecordCount:i.query.maxRecordCount,supportsCompactGeometry:i.query.supportsCompactGeometry,supportsDefaultSpatialReference:i.query.supportsDefaultSpatialReference,supportsFormatPBF:i.query.supportsFormatPBF,supportsMaxRecordCountFactor:i.query.supportsMaxRecordCountFactor,supportsQuantization:i.query.supportsQuantization,lastEditDate:l?.lastEditDate?.getTime(),snapshotInfo:{supportsSnapshotMinThreshold:R,supportsSnapshotMaxThreshold:E,snapshotCountThresholds:{min:has("featurelayer-snapshot-point-min-threshold"),max:has("featurelayer-snapshot-point-max-threshold")}}}}}createSourceSchema(e,t){const{apiKey:r,definitionExpression:s,displayFilterInfo:o,customParameters:i,gdbVersion:a,historicMoment:l,subtypeCode:n,subtypeField:p,timeExtent:u}=this.layer;return d({definitionExpression:s,displayFilterInfo:o,customParameters:i,gdbVersion:a,historicMoment:l,subtypeCode:n,subtypeField:p,timeExtent:u},e,t,r)}createProcessorSchema(e,t,s){const{fields:o,renderer:i,geometryType:a,labelingInfo:l,labelsVisible:n,orderBy:p,objectIdField:d,trackInfo:y}=this.layer,c={fields:o.map((e=>e.toJSON())),renderer:i?.clone(),layerId:this.layer.id,featureReduction:r(this.layer,t),geometryType:a,labelingInfo:l,labelsVisible:n,objectIdField:d,orderBy:p??"default",trackInfo:y};return u(e,t,c,s)}get hasRequiredSupport(){return y(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,t){return o(this.layer,e,t)}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>r(this.layer,e),()=>i(this.layer,e)?e.floors:null,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.subtypeCode,()=>this.layer.trackInfo]}}export{c as FeatureLayerAdapter};
|
|
@@ -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{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as o,getLayerDeconflictionEnabled as i,createLabelVVEvaluator as n}from"./labelingUtils.js";import{createFeatureSourceSchema as
|
|
5
|
+
import e from"../../../../../core/Error.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as o,getLayerDeconflictionEnabled as i,createLabelVVEvaluator as n}from"./labelingUtils.js";import{createFeatureSourceSchema as l}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as s}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as a}from"../support/rendererUtils.js";function u(t){if(!("openPorts"in t))throw new e("source-not-supported")}class p{constructor(e){this.layer=e}getLabelingDeconflictionInfo(e){const r=this.layer,l=o(r,e)??i(r),s=t(r,e),a=[...r.labelingInfo||[],...s?.labelingInfo||[]];return[{vvEvaluators:{0:n(r.renderer)},deconflictionEnabled:l,labelingInfo:a}]}async createServiceOptions(e){const t=this.layer,{capabilities:o,objectIdField:i}=t,n=t.fieldsIndex.toJSON(),l=r(t),s=t.timeInfo?.toJSON(),a=t.spatialReference.toJSON();u(t.source);const p=await t.source.openPorts(),c=i,d=e.spatialReference.toJSON();return{type:"memory",source:p,orderByFields:c,outSpatialReference:d,metadata:{fieldsIndex:n,geometryType:l,objectIdField:i,timeInfo:s,spatialReference:a,outSpatialReference:d,subtypes:null,subtypeField:null,globalIdField:null,typeIdField:null,types:null,timeReferenceUnknownClient:"datesInUnknownTimezone"in t?t.datesInUnknownTimezone:null,dateFieldsTimeZone:"dateFieldsTimeZone"in t?t.dateFieldsTimeZone:null},queryMetadata:{maxRecordCount:o.query.maxRecordCount,supportsCompactGeometry:o.query.supportsCompactGeometry,supportsDefaultSpatialReference:o.query.supportsDefaultSpatialReference,supportsFormatPBF:o.query.supportsFormatPBF,supportsMaxRecordCountFactor:o.query.supportsMaxRecordCountFactor,supportsQuantization:o.query.supportsQuantization,lastEditDate:null,snapshotInfo:null}}}createSourceSchema(e,t){const{definitionExpression:r,timeExtent:o,displayFilterInfo:i}=this.layer;return l({customParameters:null,definitionExpression:r,displayFilterInfo:i,timeExtent:o},e,t,null)}createProcessorSchema(e,r,o){const{fields:i,renderer:n,geometryType:l,labelingInfo:a,labelsVisible:u,orderBy:p,objectIdField:c}=this.layer,d="trackInfo"in this.layer?this.layer.trackInfo:null,y={fields:i.map((e=>e.toJSON())),renderer:n?.clone(),layerId:this.layer.id,featureReduction:t(this.layer,r),geometryType:l,labelingInfo:a,labelsVisible:u,objectIdField:c,orderBy:p??"default",trackInfo:d};return s(e,r,y,o)}get hasRequiredSupport(){return a(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.definitionExpression,()=>this.layer.displayFilterInfo,()=>this.layer.orderBy,()=>"outFields"in this.layer?this.layer.outFields:null,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>"trackInfo"in this.layer?this.layer.trackInfo:null]}}export{p as InMemoryLayerAdapter};
|
|
@@ -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{sqlAnd as e}from"../../../../../core/sql.js";import{systemIsSpatialFieldName as r}from"../../../../../layers/knowledgeGraph/constants.js";import t from"../../../../../layers/support/FeatureFilter.js";import{getEffectiveFeatureReduction as o}from"./featureReductionUtils.js";import{getServiceGeometryType as s}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as i,getLayerDeconflictionEnabled as a,createLabelVVEvaluator as l}from"./labelingUtils.js";import{createFeatureSourceSchema as n}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as p}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as u}from"../support/rendererUtils.js";class c{constructor(e){this.layer=e}getLabelingDeconflictionInfo(e){const r=this.layer,t=i(r,e)??a(r);return[{vvEvaluators:{0:l(r.renderer)},deconflictionEnabled:t}]}async createServiceOptions(e){const r=this.layer,{capabilities:t,objectIdField:o}=r,i=r.fieldsIndex.toJSON(),a=s(r),l=r.spatialReference.toJSON(),n=await r.source.openPorts(),p=o,u=e.spatialReference.toJSON();return{type:"memory",source:n,orderByFields:p,outSpatialReference:u,metadata:{fieldsIndex:i,geometryType:a,objectIdField:o,spatialReference:l,outSpatialReference:u,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:r.timeInfo?.toJSON(),timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,lastEditDate:null,snapshotInfo:null}}}createSourceSchema(e,r){const{definitionExpression:t,displayFilterInfo:o}=this.layer;return n({definitionExpression:t,displayFilterInfo:o,customParameters:null},e,r,null)}createProcessorSchema(e,r,t){const{fields:s,renderer:i,geometryType:a,labelingInfo:l,labelsVisible:n,objectIdField:u}=this.layer,c={fields:s.map((e=>e.toJSON())),renderer:i?.clone(),featureReduction:o(this.layer,r),geometryType:a,labelingInfo:l,labelsVisible:n,objectIdField:u,orderBy:"default"};return p(e,r,c,t)}get hasRequiredSupport(){return u(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>o(this.layer,e),()=>d(this.layer)]}hasFilters(e){return d(this.layer)}addFilters(o,s){if(d(this.layer)){const s=e(o?.where,`${r}=1`);if(!s)return o;o??=new t,o.where=s}return o}}function d(e){return"link-chart"===e.parentCompositeLayer.type&&"hidden"===e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode}export{c as KnowledgeGraphSublayerAdapter};
|
|
5
|
+
import{sqlAnd as e}from"../../../../../core/sql.js";import{systemIsSpatialFieldName as r}from"../../../../../layers/knowledgeGraph/constants.js";import t from"../../../../../layers/support/FeatureFilter.js";import{getEffectiveFeatureReduction as o}from"./featureReductionUtils.js";import{getServiceGeometryType as s}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as i,getLayerDeconflictionEnabled as a,createLabelVVEvaluator as l}from"./labelingUtils.js";import{createFeatureSourceSchema as n}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as p}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as u}from"../support/rendererUtils.js";class c{constructor(e){this.layer=e}getLabelingDeconflictionInfo(e){const r=this.layer,t=i(r,e)??a(r);return[{vvEvaluators:{0:l(r.renderer)},deconflictionEnabled:t}]}async createServiceOptions(e){const r=this.layer,{capabilities:t,objectIdField:o}=r,i=r.fieldsIndex.toJSON(),a=s(r),l=r.spatialReference.toJSON(),n=await r.source.openPorts(),p=o,u=e.spatialReference.toJSON();return{type:"memory",source:n,orderByFields:p,outSpatialReference:u,metadata:{fieldsIndex:i,geometryType:a,objectIdField:o,spatialReference:l,outSpatialReference:u,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:r.timeInfo?.toJSON(),timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,lastEditDate:null,snapshotInfo:null}}}createSourceSchema(e,r){const{definitionExpression:t,displayFilterInfo:o}=this.layer;return n({definitionExpression:t,displayFilterInfo:o,customParameters:null},e,r,null)}createProcessorSchema(e,r,t){const{fields:s,renderer:i,geometryType:a,labelingInfo:l,labelsVisible:n,objectIdField:u}=this.layer,c={fields:s.map((e=>e.toJSON())),renderer:i?.clone(),layerId:this.layer.id,featureReduction:o(this.layer,r),geometryType:a,labelingInfo:l,labelsVisible:n,objectIdField:u,orderBy:"default"};return p(e,r,c,t)}get hasRequiredSupport(){return u(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>o(this.layer,e),()=>d(this.layer)]}hasFilters(e){return d(this.layer)}addFilters(o,s){if(d(this.layer)){const s=e(o?.where,`${r}=1`);if(!s)return o;o??=new t,o.where=s}return o}}function d(e){return"link-chart"===e.parentCompositeLayer.type&&"hidden"===e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode}export{c as KnowledgeGraphSublayerAdapter};
|
|
@@ -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{clone as e}from"../../../../../core/lang.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as o,getLayerDeconflictionEnabled as s,createLabelVVEvaluator as a}from"./labelingUtils.js";import{createFeatureSourceSchema as l}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as i}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as n}from"../support/rendererUtils.js";class u{constructor(e){this.layer=e}getLabelingDeconflictionInfo(e){const t=this.layer,r=o(t,e)??s(t);return[{vvEvaluators:{0:a(t.renderer)},deconflictionEnabled:r}]}async createServiceOptions(t){const o=this.layer,{capabilities:s,objectIdField:a}=o,l=o.fieldsIndex.toJSON(),i=r(o),n=o.timeInfo?.toJSON(),u=o.spatialReference.toJSON(),c=o.source.getSource(),p=this.layer.objectIdField,d=e(s);d.query.maxRecordCount=c.maxRecordCount;const m=t.spatialReference.toJSON();return{type:"ogc",source:c,orderByFields:p,outSpatialReference:m,metadata:{fieldsIndex:l,geometryType:i,objectIdField:a,timeInfo:n,spatialReference:u,outSpatialReference:m,globalIdField:null,subtypeField:null,subtypes:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:d.query.maxRecordCount,supportsCompactGeometry:d.query.supportsCompactGeometry,supportsDefaultSpatialReference:d.query.supportsDefaultSpatialReference,supportsFormatPBF:d.query.supportsFormatPBF,supportsMaxRecordCountFactor:d.query.supportsMaxRecordCountFactor,supportsQuantization:d.query.supportsQuantization,lastEditDate:null,snapshotInfo:null}}}createSourceSchema(e,t){const{customParameters:r,timeExtent:o,apiKey:s}=this.layer;return l({customParameters:r,timeExtent:o},e,t,s)}createProcessorSchema(e,r,o){const{fields:s,renderer:a,geometryType:l,labelingInfo:n,labelsVisible:u,orderBy:c,objectIdField:p}=this.layer,d={fields:s.map((e=>e.toJSON())),renderer:a?.clone(),featureReduction:t(this.layer,r),geometryType:l,labelingInfo:n,labelsVisible:u,objectIdField:p,orderBy:c??"default"};return i(e,r,d,o)}get hasRequiredSupport(){return n(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>t(this.layer,e),()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.renderer]}}export{u as OGCFeatureLayerAdapter};
|
|
5
|
+
import{clone as e}from"../../../../../core/lang.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as o,getLayerDeconflictionEnabled as s,createLabelVVEvaluator as a}from"./labelingUtils.js";import{createFeatureSourceSchema as l}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as i}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as n}from"../support/rendererUtils.js";class u{constructor(e){this.layer=e}getLabelingDeconflictionInfo(e){const t=this.layer,r=o(t,e)??s(t);return[{vvEvaluators:{0:a(t.renderer)},deconflictionEnabled:r}]}async createServiceOptions(t){const o=this.layer,{capabilities:s,objectIdField:a}=o,l=o.fieldsIndex.toJSON(),i=r(o),n=o.timeInfo?.toJSON(),u=o.spatialReference.toJSON(),c=o.source.getSource(),p=this.layer.objectIdField,d=e(s);d.query.maxRecordCount=c.maxRecordCount;const m=t.spatialReference.toJSON();return{type:"ogc",source:c,orderByFields:p,outSpatialReference:m,metadata:{fieldsIndex:l,geometryType:i,objectIdField:a,timeInfo:n,spatialReference:u,outSpatialReference:m,globalIdField:null,subtypeField:null,subtypes:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:d.query.maxRecordCount,supportsCompactGeometry:d.query.supportsCompactGeometry,supportsDefaultSpatialReference:d.query.supportsDefaultSpatialReference,supportsFormatPBF:d.query.supportsFormatPBF,supportsMaxRecordCountFactor:d.query.supportsMaxRecordCountFactor,supportsQuantization:d.query.supportsQuantization,lastEditDate:null,snapshotInfo:null}}}createSourceSchema(e,t){const{customParameters:r,timeExtent:o,apiKey:s}=this.layer;return l({customParameters:r,timeExtent:o},e,t,s)}createProcessorSchema(e,r,o){const{fields:s,renderer:a,geometryType:l,labelingInfo:n,labelsVisible:u,orderBy:c,objectIdField:p}=this.layer,d={fields:s.map((e=>e.toJSON())),renderer:a?.clone(),layerId:this.layer.id,featureReduction:t(this.layer,r),geometryType:l,labelingInfo:n,labelsVisible:u,objectIdField:p,orderBy:c??"default"};return i(e,r,d,o)}get hasRequiredSupport(){return n(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>t(this.layer,e),()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.renderer]}}export{u as OGCFeatureLayerAdapter};
|
|
@@ -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 has from"../../../../../core/has.js";import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as
|
|
5
|
+
import has from"../../../../../core/has.js";import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{exceedsMinimumSnapshotCoverage as o}from"./featureServiceUtils.js";import{addFloorFilter as s,hasFloorFilter as i}from"./floorFilterUtils.js";import{getServiceGeometryType as a}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as l,getLayerDeconflictionEnabled as n,createLabelVVEvaluator as p}from"./labelingUtils.js";import{createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as d}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as c}from"../support/rendererUtils.js";class m{constructor(e){this.layer=e}getLabelingDeconflictionInfo(e){const r=this.layer,t=l(r,e)??n(r);return[{vvEvaluators:{0:p(r.renderer)},deconflictionEnabled:t}]}async createServiceOptions(t){const s=this.layer,{capabilities:i,objectIdField:l,globalIdField:n,orderBy:p,refreshInterval:u}=s,d=s.fieldsIndex.toJSON(),c=a(s),m=s.timeInfo?.toJSON(),y=s.spatialReference.toJSON(),f=e(this.layer.parsedUrl);let h=this.layer.objectIdField;if(p?.length){const e=!p[0].valueExpression&&p[0].field;e&&(h=e)}const b=u>0,F=!!has("featurelayer-snapshot-enabled")&&"point"===s.geometryType&&i?.query.supportsPagination&&!i?.operations.supportsEditing&&!b,I=F&&o(t,s.fullExtent),S=r(f.path),g=t.spatialReference.toJSON();return{type:"feature-service",source:f,isSourceHosted:S,orderByFields:h,outSpatialReference:g,metadata:{globalIdField:n,fieldsIndex:d,geometryType:c,objectIdField:l,timeInfo:m,spatialReference:y,outSpatialReference:g,timeReferenceUnknownClient:s.datesInUnknownTimezone,dateFieldsTimeZone:s.dateFieldsTimeZone,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:i.query.maxRecordCount,supportsCompactGeometry:i.query.supportsCompactGeometry,supportsDefaultSpatialReference:i.query.supportsDefaultSpatialReference,supportsFormatPBF:i.query.supportsFormatPBF,supportsMaxRecordCountFactor:i.query.supportsMaxRecordCountFactor,supportsQuantization:i.query.supportsQuantization,lastEditDate:null,snapshotInfo:{supportsSnapshotMinThreshold:F,supportsSnapshotMaxThreshold:I,snapshotCountThresholds:{min:has("featurelayer-snapshot-point-min-threshold"),max:has("featurelayer-snapshot-point-max-threshold")}}}}}createSourceSchema(e,r){const{definitionExpression:t,displayFilterInfo:o,customParameters:s,timeExtent:i}=this.layer;return u({definitionExpression:t,displayFilterInfo:o,customParameters:s,timeExtent:i},e,r,null)}createProcessorSchema(e,r,o){const{fields:s,renderer:i,geometryType:a,labelingInfo:l,labelsVisible:n,orderBy:p,objectIdField:u}=this.layer,c={fields:s.map((e=>e.toJSON())),renderer:i?.clone(),layerId:this.layer.id,featureReduction:t(this.layer,r),geometryType:a,labelingInfo:l,labelsVisible:n,objectIdField:u,orderBy:p??"default"};return d(e,r,c,o)}get hasRequiredSupport(){return c(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,r){return s(this.layer,e,r)}getUpdateHashProperties(e){return[()=>this.layer.outFields,()=>this.layer.orderBy,()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>i(this.layer,e)?e.floors:null]}}export{m as OrientedImageryLayerAdapter};
|
|
@@ -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{toParquetGeometryInfoJSON as e}from"../../../../../layers/support/parquetLayerUtils.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{getServiceGeometryType as
|
|
5
|
+
import{toParquetGeometryInfoJSON as e}from"../../../../../layers/support/parquetLayerUtils.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{getServiceGeometryType as l}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as t,getLayerDeconflictionEnabled as i,createLabelVVEvaluator as s}from"./labelingUtils.js";import{createSimpleProcessorSchema as a}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as o}from"../support/rendererUtils.js";class n{constructor(e){this.layer=e}get hasRequiredSupport(){return o(this.layer.renderer)}get timeOptions(){return null}getLabelingDeconflictionInfo(e){const l=this.layer,a=t(l,e)??i(l),o=r(l,e),n=[...l.labelingInfo||[],...o?.labelingInfo||[]];return[{vvEvaluators:{0:s(l.renderer)},deconflictionEnabled:a,labelingInfo:n}]}getUpdateHashProperties(e){return[()=>this.layer.outFields,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>r(this.layer,e),()=>this.layer.customParameters,()=>this.layer.orderBy,()=>this.layer.renderer,()=>this.layer.popupTemplate]}async createServiceOptions(r){const t=l(this.layer),i=r.spatialReference.toJSON();return{type:"parquet",source:{urls:this.layer.urls.items},outSpatialReference:i,geometryInfo:e(this.layer.source.geometryInfo),metadata:{spatialReference:this.layer.spatialReference,outSpatialReference:i,fieldsIndex:this.layer.fieldsIndex.toJSON(),objectIdField:this.layer.objectIdField,geometryType:t,types:null,subtypes:null,timeInfo:null,typeIdField:null,subtypeField:null,globalIdField:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}}}createSourceSchema(e,r){return{type:"parquet",mutable:{sourceRefreshVersion:r,availableFields:e.availableFields.includes("*")?this.layer.fields.map((e=>e.name)):e.availableFields,dataFilter:{customParameters:this.layer.customParameters??null}}}}createProcessorSchema(e,l,t){const i={fields:this.layer.fields.map((e=>e.toJSON())),renderer:this.layer.renderer?.clone(),layerId:this.layer.id,featureReduction:r(this.layer,l),geometryType:this.layer.geometryType,labelingInfo:this.layer.labelingInfo,labelsVisible:this.layer.labelsVisible,objectIdField:this.layer.objectIdField,orderBy:this.layer.orderBy};return a(e,l,i,t)}}export{n as ParquetLayerAdapter};
|
|
@@ -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{getEffectiveFeatureReduction as e}from"./featureReductionUtils.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as r,getLayerDeconflictionEnabled as i,createLabelVVEvaluator as l}from"./labelingUtils.js";import{createSimpleProcessorSchema as n}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as
|
|
5
|
+
import{getEffectiveFeatureReduction as e}from"./featureReductionUtils.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as r,getLayerDeconflictionEnabled as i,createLabelVVEvaluator as l}from"./labelingUtils.js";import{createSimpleProcessorSchema as n}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as o}from"../support/rendererUtils.js";class s{constructor(e){this.layer=e}getLabelingDeconflictionInfo(t){const n=this.layer,o=r(n,t)??i(n),s=e(n,t),a=[...n.labelingInfo||[],...s?.labelingInfo||[]];return[{vvEvaluators:{0:l(n.renderer)},deconflictionEnabled:o,labelingInfo:a}]}async createServiceOptions(e){const r=this.layer,{objectIdField:i}=r,l=t(r),n=r.timeInfo?.toJSON()||null,o=r.spatialReference?r.spatialReference.toJSON():null,s=e.spatialReference.toJSON();return{type:"stream",source:this.layer.parsedUrl,outSpatialReference:s,metadata:{fieldsIndex:this.layer.fieldsIndex.toJSON(),geometryType:l,objectIdField:i,timeInfo:n,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,spatialReference:o,outSpatialReference:s,subtypeField:null,subtypes:null,globalIdField:null,typeIdField:null,types:null}}}createSourceSchema(e,t){const{definitionExpression:r,geometryDefinition:i,customParameters:l}=this.layer;return{type:"stream",mutable:{sourceRefreshVersion:t,availableFields:e.availableFields,dataFilter:{geometryDefinition:i?.toJSON(),definitionExpression:r,customParameters:l??null,maxReconnectionAttempts:this.layer.maxReconnectionAttempts,maxReconnectionInterval:this.layer.maxReconnectionInterval,purgeOptions:this.layer.purgeOptions.toJSON()}}}}createProcessorSchema(t,r,i){const{fields:l,renderer:o,geometryType:s,labelingInfo:a,labelsVisible:c,objectIdField:d,trackInfo:m}=this.layer,p={fields:l.map((e=>e.toJSON())),renderer:o?.clone(),layerId:this.layer.id,featureReduction:e(this.layer,r),geometryType:s,labelingInfo:a,labelsVisible:c,objectIdField:d,orderBy:"default",trackInfo:m};return n(t,r,p,i)}get hasRequiredSupport(){return o(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(t){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>e(this.layer,t),()=>this.layer.customParameters,()=>this.layer.geometryDefinition,()=>this.layer.definitionExpression,()=>this.layer.trackInfo]}}export{s as StreamLayerAdapter};
|
|
@@ -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 has from"../../../../../core/has.js";import{clone as e}from"../../../../../core/lang.js";import{floatEqualAbsolute as t}from"../../../../../core/mathUtils.js";import{sqlAnd as r}from"../../../../../core/sql.js";import{isHostedAgolService as s}from"../../../../../layers/support/arcgisLayerUrl.js";import a from"../../../../../layers/support/FeatureFilter.js";import{exceedsMinimumSnapshotCoverage as i}from"./featureServiceUtils.js";import{addFloorFilter as o,hasFloorFilter as l}from"./floorFilterUtils.js";import{getServiceGeometryType as n}from"./geometryUtils.js";import{getLayerDeconflictionEnabled as p}from"./labelingUtils.js";import{createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSubtypeProcessorSchema as
|
|
5
|
+
import has from"../../../../../core/has.js";import{clone as e}from"../../../../../core/lang.js";import{floatEqualAbsolute as t}from"../../../../../core/mathUtils.js";import{sqlAnd as r}from"../../../../../core/sql.js";import{isHostedAgolService as s}from"../../../../../layers/support/arcgisLayerUrl.js";import a from"../../../../../layers/support/FeatureFilter.js";import{exceedsMinimumSnapshotCoverage as i}from"./featureServiceUtils.js";import{addFloorFilter as o,hasFloorFilter as l}from"./floorFilterUtils.js";import{getServiceGeometryType as n}from"./geometryUtils.js";import{getLayerDeconflictionEnabled as p}from"./labelingUtils.js";import{createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSubtypeProcessorSchema as y}from"../schema/processor/SubtypeProcessorSchema.js";class m{constructor(e){this.layer=e}getLabelingDeconflictionInfo(e){const t=this.layer;return[{vvEvaluators:{},deconflictionEnabled:t.sublayers.some((e=>p(e))),labelingInfo:t.sublayers.toArray().filter((e=>!!e.labelingInfo)).flatMap((e=>e.labelingInfo))}]}async createServiceOptions(t){const r=this.layer,{capabilities:a,datesInUnknownTimezone:o,dateFieldsTimeZone:l,editingInfo:p,globalIdField:u,objectIdField:y,refreshInterval:m,subtypeField:c}=r,d=r.fieldsIndex.toJSON(),h=n(r),f=r.timeInfo?.toJSON(),b=r.spatialReference.toJSON(),S=e(this.layer.parsedUrl),g=y,F=!(null!=p?.lastEditDate)&&m>0,I=!!has("featurelayer-snapshot-enabled")&&"point"===r.geometryType&&a?.query.supportsPagination&&!a?.operations.supportsEditing&&!F,x=I&&i(t,r.fullExtent),j=s(S.path),R=t.spatialReference.toJSON();return{type:"feature-service",source:S,isSourceHosted:j,orderByFields:g,outSpatialReference:R,metadata:{timeReferenceUnknownClient:o,dateFieldsTimeZone:l,subtypeField:c,globalIdField:u,fieldsIndex:d,geometryType:h,objectIdField:y,timeInfo:f,spatialReference:b,outSpatialReference:R,subtypes:this.layer.subtypes?.map((e=>e.toJSON())),typeIdField:null,types:null},queryMetadata:{maxRecordCount:a.query.maxRecordCount,supportsCompactGeometry:a.query.supportsCompactGeometry,supportsDefaultSpatialReference:a.query.supportsDefaultSpatialReference,supportsFormatPBF:a.query.supportsFormatPBF,supportsMaxRecordCountFactor:a.query.supportsMaxRecordCountFactor,supportsQuantization:a.query.supportsQuantization,lastEditDate:p?.lastEditDate?.getTime(),snapshotInfo:{supportsSnapshotMinThreshold:I,supportsSnapshotMaxThreshold:x,snapshotCountThresholds:{min:has("featurelayer-snapshot-point-min-threshold"),max:has("featurelayer-snapshot-point-max-threshold")}}}}}createSourceSchema(e,t){const{definitionExpression:r,customParameters:s,gdbVersion:a,historicMoment:i,subtypeField:o,timeExtent:l,apiKey:n,displayFilterInfo:p}=this.layer,y={queryScaleRanges:this.layer.sublayers.items.map((e=>({subtypeCode:e.subtypeCode,minScale:e.minScale,maxScale:e.maxScale}))),definitionExpression:r,displayFilterInfo:p,customParameters:s,gdbVersion:a,historicMoment:i,subtypeField:o,timeExtent:l};return u(y,e,t,n)}createProcessorSchema(e,t,r){const s={layerId:this.layer.id,subtypeField:this.layer.subtypeField,sublayers:Array.from(this.layer.sublayers,(e=>({featureReduction:null,geometryType:this.layer.geometryType,labelingInfo:e.labelingInfo,labelsVisible:e.labelsVisible,renderer:e.renderer,subtypeCode:e.subtypeCode,orderBy:null})))};return y(e,t,s,r)}addFilters(e,t){e=o(this.layer,e,t);const s=this.layer.sublayers.filter((e=>!c(e,t))).map((e=>e.subtypeCode));if(!s.length)return e;e??=new a;const i=`NOT ${this.layer.subtypeField} IN (${s.join(",")})`;return e.where=r(e.where,i),e}get hasRequiredSupport(){return!0}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>l(this.layer,e)?e.floors:null,()=>this.layer.outFields,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>this.layer.sublayers.map((({renderer:e,labelsVisible:t,labelingInfo:r,visible:s,minScale:a,maxScale:i})=>({renderer:e,labelsVisible:t,labelingInfo:r,visible:s,minScale:a,maxScale:i})))]}setGraphicOrigin(e){const t=this.layer.fieldsIndex.get(this.layer.subtypeField),r=e.attributes[t.name],s=this.layer.sublayers.find((e=>e.subtypeCode===r));e.layer=e.sourceLayer=s}}function c(e,r){return e.visible&&(0===e.minScale||t(r.scale,e.minScale)||r.scale<e.minScale)&&(0===e.maxScale||t(r.scale,e.maxScale)||r.scale>e.maxScale)}export{m as SubtypeGroupLayerAdapter};
|
|
@@ -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{numericHash as e}from"../../../../../../core/string.js";import{validateLabelingInfo as s}from"../../../../../../layers/support/labelingInfo.js";import{getServiceGeometryType as l}from"../../layerAdapters/geometryUtils.js";import{createSymbolMeshSchemas as a}from"./symbols/SymbolSchema.js";async function o(e,a,o){const r=a.labelsVisible&&a.labelingInfo||[],i=l(a),t=s(r,i);return{type:"label",classes:await Promise.all(t.map(((s,l)=>n(e,s,a.labelsVisible,a.layerId,l,i,o))))}}async function n(s,l,o,n,r,i,t){const m=e(`${n} ${r}`),c=await a(l,{path:`${r}`,schemaOptions:s,uniforms:t,labelClassId:m});return{maxScale:l.maxScale,minScale:l.minScale,deconflictionEnabled:"none"!==l.deconflictionStrategy&&o,expression:l.labelExpressionInfo?.expression??l.labelExpression,where:l.where,meshes:c,labelClassId:m,geometryType:i}}export{o as createLabelMatcherSchema};
|
|
@@ -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{pt2px as e}from"../../../../../../core/screenUtils.js";import r from"../../../../../../layers/support/OrderByInfo.js";import{TechniqueType as t}from"../../../../engine/webgl/shaderGraph/techniques/TechniqueType.js";import{createLabelMatcherSchema as s}from"./LabelMatcherSchema.js";import{createMatcherSchema as i}from"./MatcherSchema.js";import{createStorageSchema as n,createTrackStorageSchema as a}from"./StorageSchema.js";import{createVisualVariableUniforms as
|
|
5
|
+
import{pt2px as e}from"../../../../../../core/screenUtils.js";import r from"../../../../../../layers/support/OrderByInfo.js";import{TechniqueType as t}from"../../../../engine/webgl/shaderGraph/techniques/TechniqueType.js";import{createLabelMatcherSchema as s}from"./LabelMatcherSchema.js";import{createMatcherSchema as i}from"./MatcherSchema.js";import{createStorageSchema as n,createTrackStorageSchema as a}from"./StorageSchema.js";import{createVisualVariableUniforms as l}from"./VisualVariablesSchema.js";async function o(e,r){const t=r.renderer,n=l(t);return{symbology:await i(e,t),labels:await s(e,r,n)}}async function u(e,r,t,s){const i=t.featureReduction;if(i)switch(i.type){case"binning":return f(i,e,r,t,s);case"cluster":return p(i,e,r,t,s)}if(t.trackInfo?.enabled)return d(t.trackInfo,e,r,t,s);const a=b(t.orderBy,t.renderer,t.objectIdField),l=n(t.renderer,r.filters),u=await o(e,t),c=g(u.symbology);return{storage:l,mesh:{properties:{sortKey:a,timeZone:r.timeZone,returnMeshObjectId:c,displayRefreshVersion:s,currentUser:r.currentUser},strategy:{type:"feature"},factory:u},expressionProperties:{timeExtent:r.timeExtent?.toJSON()}}}function c(e,r){return e.fields.map((e=>({...e.toJSON(),type:y(e,r)})))}function y(e,r){const{onStatisticExpression:t,onStatisticField:s,statisticType:i}=e;switch(i){case"min":case"max":case"avg":case"avg_angle":case"sum":case"count":return"esriFieldTypeDouble";case"mode":{if(t){const{returnType:e}=t;return e?"string"===e?"esriFieldTypeString":"esriFieldTypeDouble":"esriFieldTypeString"}const e=r.find((e=>e.name===s));return e?e.type:"esriFieldTypeString"}}}async function f(r,t,a,o,u){const y=c(r,o.fields),f=r.renderer,p=await i(t,f),d=n(f,[null,null]),b=l(f),m=await s(t,{geometryType:"polygon",layerId:o.layerId,labelingInfo:r.labelingInfo,labelsVisible:r.labelsVisible},b),v=g(p),h="geohash"===r.binType?{type:"geohash",fixBinLevel:r.fixedBinLevel??3}:{type:"grid",size:e(r.size),fixedBinLevel:r.fixedBinLevel};return{storage:d,mesh:{properties:{sortKey:null,timeZone:a.timeZone,returnMeshObjectId:v,displayRefreshVersion:u,currentUser:a.currentUser},strategy:{type:"binning",fields:y,index:h,featureFilter:a.filters[0]},factory:{labels:m,symbology:p}},expressionProperties:{timeExtent:a.timeExtent?.toJSON()}}}async function p(r,t,a,o,u){const y=c(r,o.fields),f={type:"cluster",feature:await i(t,r.effectiveFeatureRenderer),cluster:await i(t,r.effectiveClusterRenderer)},p=l(r.effectiveFeatureRenderer),d={type:"cluster",feature:await s(t,o,p),cluster:await s(t,{geometryType:"point",layerId:o.layerId,labelingInfo:r.labelingInfo,labelsVisible:r.labelsVisible},p)},b=n(r.effectiveFeatureRenderer,[null,null]),m=g(f);return{storage:b,mesh:{properties:{sortKey:null,timeZone:a.timeZone,displayRefreshVersion:u,returnMeshObjectId:m,currentUser:a.currentUser},strategy:{type:"cluster",fields:y,featureFilter:a.filters[0],clusterRadius:e(r.clusterRadius/2)},factory:{labels:d,symbology:f}},expressionProperties:{timeExtent:a.timeExtent?.toJSON()}}}async function d(e,r,t,n,o){const u=c(e,n.fields),y={type:"track",previousObservation:await i(r,e.previousObservations.renderer),latestObservation:await i(r,e.latestObservations.renderer),trackLine:await i(r,e.trackLines.renderer)},f={type:"track",previousObservation:await s(r,{geometryType:n.geometryType,layerId:n.layerId,labelingInfo:e.previousObservations.labelingInfo,labelsVisible:e.previousObservations.labelsVisible},l(e.previousObservations.renderer)),latestObservation:await s(r,{geometryType:n.geometryType,layerId:n.layerId,labelingInfo:e.latestObservations.labelingInfo,labelsVisible:e.latestObservations.labelsVisible},l(e.latestObservations.renderer)),trackLine:await s(r,{geometryType:"polyline",layerId:n.layerId,labelingInfo:e.trackLines.labelingInfo,labelsVisible:e.trackLines.labelsVisible},l(e.trackLines.renderer))},p=a(e,[null,null]),d=g(y);return{storage:p,mesh:{properties:{sortKey:null,timeZone:t.timeZone,returnMeshObjectId:d,displayRefreshVersion:o,currentUser:t.currentUser},strategy:{type:"track",featureFilter:t.filters[0],fields:u,maxDisplayDuration:e.maxDisplayDuration?.toMilliseconds()??0,maxDisplayObservationsPerTrack:e.maxDisplayObservationsPerTrack,showLatestObservation:e.latestObservations.visible,showPreviousObservations:e.previousObservations.visible,showTrackLine:e.trackLines.visible,timeField:e.timeField},factory:{labels:f,symbology:y}},expressionProperties:{timeExtent:t.timeExtent?.toJSON()}}}function b(e,t,s){const i=null!=t&&"unique-value"===t.type&&t.orderByClassesEnabled;if("default"!==e||i||(e=[new r({field:s,order:"descending"})]),"default"!==e&&e?.length){e.length;const r=e[0],t="ascending"===r.order?"asc":"desc";return r.field?{field:r.field,order:t}:r.valueExpression?{expression:r.valueExpression,order:t}:null}if(i){return{byRenderer:!0,order:"asc"}}return null}function m(e){return e.techniqueType===t.AnimatedMarker}function g(e){if("simple"===e.type&&e.meshes.some(m))return!0;if("interval"===e.type){if(e.intervals.some((e=>e.meshes.some(m))))return!0;if(e.backgroundFill.some(m))return!0}if("map"===e.type){if(e.map.some((e=>e.symbol.some(m))))return!0;if(e.backgroundFill.some(m))return!0}return!1}export{u as createSimpleProcessorSchema,c as getAggregateFields};
|
|
@@ -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{createLabelMatcherSchema as e}from"./LabelMatcherSchema.js";import{createMatcherSchema as r}from"./MatcherSchema.js";import{createVVBindings as t}from"./StorageSchema.js";import{createVisualVariableUniforms as s}from"./VisualVariablesSchema.js";import{getWebGLCapabilities as
|
|
5
|
+
import{createLabelMatcherSchema as e}from"./LabelMatcherSchema.js";import{createMatcherSchema as r}from"./MatcherSchema.js";import{createVVBindings as t}from"./StorageSchema.js";import{createVisualVariableUniforms as s}from"./VisualVariablesSchema.js";import{getWebGLCapabilities as a}from"../../../../../webgl/capabilities.js";async function i(e,{subtypeField:t,sublayers:s}){const a=await Promise.all(s.map((({renderer:t})=>r(e,t))));return{type:"subtype",subtypeField:t,renderers:s.reduce(((e,{subtypeCode:r},t)=>({...e,[r]:a[t]})),{})}}function n(e,r){const s=a();return{type:"multi",filters:e.filters,capabilities:{maxTextureSize:s.maxTextureSize},keyField:r.subtypeField,target:"feature",bindings:r.sublayers.reduce(((e,{renderer:r,subtypeCode:s})=>{const a=t(r);return{...e,[s]:a}}),{})}}async function o(r,{subtypeField:t,sublayers:a,layerId:i}){const n=await Promise.all(a.map((t=>{const a=s(t.renderer),n={...t,geometryType:t.geometryType??null,layerId:i};return e(r,n,a)})));return{type:"subtype",subtypeField:t,renderers:a.reduce(((e,{subtypeCode:r},t)=>({...e,[r]:n[t]})),{})}}async function u(e,r,t,s){return{storage:n(r,t),mesh:{properties:{timeZone:r.timeZone,displayRefreshVersion:s,returnMeshObjectId:!1,sortKey:null,currentUser:r.currentUser},strategy:{type:"feature"},factory:{symbology:await i(e,t),labels:await o(e,t)}},expressionProperties:{timeExtent:r.timeExtent?.toJSON()}}}export{u as createSubtypeProcessorSchema};
|
|
@@ -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{CIMSymbolHelper as e}from"../../../../../../../symbols/cim/CIMSymbolHelper.js";import{defaultCIMValues as a}from"../../../../../../../symbols/cim/defaultCIMValues.js";import{Alignment as i}from"../../../../../../../symbols/cim/enums.js";import{Techniques as l}from"../../../../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{noVisualVariables as o,getMaxSizeVVSize as t}from"../VisualVariablesSchema.js";import{hasSizeVVUniform as r}from"./utils.js";function n(e){return e.minScale||e.maxScale?{minScale:e.minScale??0,maxScale:e.maxScale??0}:null}function s(e){if(null==e)return null;if(Array.isArray(e)){const[a,i,l,o]=e;return[a,i,l,255*o]}return"string"==typeof e?e:{...e,defaultValue:s(e?.defaultValue)}}async function c(a,i){const{cimResourceManager:l,cimAnalyzer:o,scaleExpression:t}=i.schemaOptions;await Promise.all(e.fetchResources(a.symbol,l,[]));const r=o.analyzeSymbolReference(a,!1),s={scaleInfo:n(a),scaleExpression:t},c=[];for(const e of r)switch(e.type){case"marker":c.push(...u(e,i,s));break;case"fill":c.push(...z(e,i,s));break;case"gradientFill":c.push(...d(e,i,s));break;case"line":c.push(...y(e,i,s));break;case"gradientStroke":c.push(...R(e,i,s));break;case"text":c.push(...P(e,i,s))}return c}function u(e,a,i){const{uniforms:t,schemaOptions:r}=a,{store:n}=r,s=e.isOutline?{...o,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue,visualVariableRotation:t.visualVariableRotation};if(e.animationParams){return f(n.ensureInstance(l.animatedMarker,{uniforms:s,optionalAttributes:{zoomRange:!0}}),e,o,i)}return p(n.ensureInstance(l.marker,{uniforms:s,optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,t,i)}function f(e,a,l,o){if(!a.animationParams)return[];return[e.createMeshInfo({pixelDimensions:a.pixelDimensions,texelDimensions:a.texelDimensions,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null,sprite:a.spriteRasterizationParam,animations:a.animationParams,scaleInfo:o.scaleInfo,scaleSymbolsProportionally:a.scaleSymbolsProportionally,strokeWidth:a.outlineWidth,isMapAligned:a.alignment===i.MAP,colorLocked:a.colorLocked,isStroke:a.isStroke,baseSize:a.baseSize,referenceSize:a.referenceSize,angleToLine:!!a.markerPlacement&&(a.markerPlacement.placement&&"angleToLine"in a.markerPlacement.placement&&a.markerPlacement.placement.angleToLine),sizeRatio:a.sizeRatio})]}function p(e,i,l,{scaleInfo:o,scaleExpression:n}){const c=r(l);return[e.createMeshInfo({size:i.size,scaleX:i.scaleX,anchorX:i.anchorPoint.x,anchorY:i.anchorPoint.y,angle:i.rotation,color:s(i.color)??[0,0,0,0],colorLocked:i.colorLocked,frameHeight:i.frameHeight,widthRatio:i.widthRatio,scaleInfo:o,offsetX:i.offsetX,offsetY:i.offsetY,outlineColor:s(i.outlineColor)??[0,0,0,0],outlineSize:i.outlineWidth,referenceSize:i.referenceSize||a.CIMVectorMarker.size,rotateClockwise:i.rotateClockwise,scaleFactor:n??1,sizeRatio:i.sizeRatio,alignment:i.alignment,isAbsoluteAnchorPoint:i.isAbsoluteAnchorPoint,scaleSymbolsProportionally:i.scaleSymbolsProportionally,sprite:i.spriteRasterizationParam,hasSizeVV:c,placement:i.markerPlacement,effects:i.effects?{type:"cim-effect-infos",effectInfos:i.effects}:null,transforms:i.transform,minPixelBuffer:t(l)})]}function m(e,a,i){const{uniforms:o,schemaOptions:t}=a,{store:r}=t;return V(r.ensureInstance(l.fill,{uniforms:{visualVariableColor:e.colorLocked?null:o.visualVariableColor,visualVariableOpacity:o.visualVariableOpacity},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function S(e,a,i){const{uniforms:o,schemaOptions:t}=a,{store:r}=t;return b(r.ensureInstance(l.outlineFill,{uniforms:{visualVariableColor:e.colorLocked?null:o.visualVariableColor,visualVariableOpacity:o.visualVariableOpacity,visualVariableSizeMinMaxValue:null,visualVariableSizeScaleStops:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function b(e,a,i){const l=s(a.color)??[0,0,0,0];return[e.createMeshInfo({color:l,outlineColor:l,width:.75,referenceWidth:.75,capType:"round",joinType:"round",miterLimit:4,hasSizeVV:!1,scaleInfo:i.scaleInfo,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function V(e,a,{scaleInfo:i}){return[e.createMeshInfo({color:s(a.color)??[0,0,0,0],scaleInfo:i,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function z(e,a,i){if(!e.spriteRasterizationParam)return e.addAAOutline?S(e,a,i):m(e,a,i);const{uniforms:o,schemaOptions:t}=a,{store:r}=t;return h(r.ensureInstance(l.complexFill,{uniforms:{visualVariableColor:e.colorLocked?null:o.visualVariableColor,visualVariableOpacity:o.visualVariableOpacity},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,null!=o.visualVariableColor,i)}function h(e,a,i,{scaleInfo:l}){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const o=!!a.hasUnresolvedReplacementColor&&(!i||a.colorLocked),t=a.sampleAlphaOnly&&!o,r=a.spriteRasterizationParam;return[e.createMeshInfo({color:s(a.color)??[0,0,0,0],height:a.height,aspectRatio:a.scaleX,offsetX:a.offsetX,offsetY:a.offsetY,scaleX:1,scaleY:1,angle:a.angle,applyRandomOffset:a.applyRandomOffset,sampleAlphaOnly:t,scaleProportionally:"CIMHatchFill"===r.resource.type,sprite:r,scaleInfo:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function d(e,a,i){const{uniforms:o,schemaOptions:t}=a,{store:r}=t;return v(r.ensureInstance(l.gradientFill,{uniforms:{visualVariableColor:null,visualVariableOpacity:o.visualVariableOpacity},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function v(e,a,{scaleInfo:i}){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const l=a.spriteRasterizationParam;return[e.createMeshInfo({color:s(a.color)??[0,0,0,0],angle:a.angle,gradientMethod:a.gradientMethod,gradientSize:a.gradientSize,gradientSizeUnits:a.gradientSizeUnits,gradientType:a.gradientType,sprite:l,scaleInfo:i,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function y(e,a,i){const{uniforms:t,schemaOptions:r}=a,{store:n}=r,s=e.isOutline?{...o,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue},c={uniforms:s,optionalAttributes:{zoomRange:!!i.scaleInfo}},u=!!(s.visualVariableSizeMinMaxValue||s.visualVariableSizeScaleStops||s.visualVariableSizeStops||s.visualVariableSizeUnitValue);if(!e.spriteRasterizationParam){return g(n.ensureInstance(l.line,c),e,u,i)}return M(n.ensureInstance(l.texturedLine,c),e,u,i)}function I(e,a,{scaleInfo:i}){return{color:s(e.color)??[0,0,0,0],width:e.width,referenceWidth:e.referenceWidth,capType:e.cap,joinType:e.join,miterLimit:e.miterLimit,scaleInfo:i,hasSizeVV:a,effects:e.effects?{type:"cim-effect-infos",effectInfos:e.effects}:null}}function g(e,a,i,l){if(a.spriteRasterizationParam)throw new Error("InternalError: Sprite should not be defined");const o=I(a,i,l);return[e.createMeshInfo(o)]}function M(e,a,i,l){const{spriteRasterizationParam:o,scaleDash:t,sampleAlphaOnly:r}=a;if(!o)throw new Error("InternalError: Sprite should be defined");return[e.createMeshInfo({...I(a,i,l),offsetAlongLine:a.offsetAlongLine??0,shouldScaleDash:t??!1,shouldSampleAlphaOnly:r,isSDF:"CIMPictureStroke"!==o.resource.type&&"CIMGradientStroke"!==o.resource.type,sprite:o})]}function R(e,a,i){const{uniforms:t,schemaOptions:r}=a,{store:n}=r;return O(n.ensureInstance(l.gradientStroke,{uniforms:e.isOutline?{...o,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:null,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function O(e,a,i){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const l=a.spriteRasterizationParam;return[e.createMeshInfo({...I(a,!1,i),gradientMethod:a.gradientMethod,gradientSize:a.gradientSize,gradientSizeUnits:a.gradientSizeUnits,gradientType:a.gradientType,sprite:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function P(e,a,i){const{uniforms:o,schemaOptions:t}=a,{store:r}=t;return k(r.ensureInstance(l.text,{uniforms:{visualVariableColor:e.colorLocked?null:o.visualVariableColor,visualVariableOpacity:o.visualVariableOpacity,visualVariableRotation:o.visualVariableRotation,visualVariableSizeMinMaxValue:o.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:o.visualVariableSizeScaleStops,visualVariableSizeStops:o.visualVariableSizeStops,visualVariableSizeUnitValue:o.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!!i.scaleInfo,referenceSymbol:!1,clipAngle:!1}}),e,o,i)}function k(e,a,i,{scaleInfo:l,scaleExpression:o}){return[e.createMeshInfo({boxBackgroundColor:s(a.backgroundColor),boxBorderLineColor:s(a.borderLineColor),boxBorderLineSize:a.borderLineWidth??0,color:s(a.color)??[0,0,0,0],offsetX:a.offsetX,offsetY:a.offsetY,postAngle:a.angle,fontSize:a.size,referenceSize:a.referenceSize,decoration:a.decoration,haloColor:s(a.haloColor)??[0,0,0,0],haloSize:a.haloSize??0,outlineColor:s(a.outlineColor)??[0,0,0,0],outlineSize:a.outlineSize,lineWidth:a.lineWidth||512,lineHeightRatio:1,horizontalAlignment:a.horizontalAlignment??"center",verticalAlignment:a.verticalAlignment??"baseline",useCIMAngleBehavior:!1,glyphs:a.textRasterizationParam,scaleInfo:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null,placement:a.markerPlacement,transforms:a.transform,scaleFactor:o??1,minPixelBuffer:t(i),repeatLabel:null,repeatLabelDistance:null,allowOverrun:null,labelPosition:null})]}export{f as createAnimatedMarkerMeshInfos,h as createComplexFillMeshInfos,p as createComplexMarkerMeshInfos,V as createComplexSimpleFillMeshInfos,g as createComplexSimpleLineMeshInfos,b as createComplexSimpleOutlineFillMeshInfos,c as createComplexSymbolInstances,k as createComplexTextMeshInfos,M as createComplexTexturedLineMeshInfos,v as createGradientFillMeshInfos,O as createGradientStrokeMeshInfos,n as getScaleInfo};
|
|
5
|
+
import{CIMSymbolHelper as e}from"../../../../../../../symbols/cim/CIMSymbolHelper.js";import{defaultCIMValues as a}from"../../../../../../../symbols/cim/defaultCIMValues.js";import{Alignment as i}from"../../../../../../../symbols/cim/enums.js";import{Techniques as l}from"../../../../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{noVisualVariables as o,getMaxSizeVVSize as t}from"../VisualVariablesSchema.js";import{hasSizeVVUniform as r}from"./utils.js";function n(e){return e.minScale||e.maxScale?{minScale:e.minScale??0,maxScale:e.maxScale??0}:null}function s(e){if(null==e)return null;if(Array.isArray(e)){const[a,i,l,o]=e;return[a,i,l,255*o]}return"string"==typeof e?e:{...e,defaultValue:s(e?.defaultValue)}}async function c(a,i){const{cimResourceManager:l,cimAnalyzer:o,scaleExpression:t}=i.schemaOptions;await Promise.all(e.fetchResources(a.symbol,l,[]));const r=o.analyzeSymbolReference(a,!1),s={scaleInfo:n(a),scaleExpression:t},c=[];for(const e of r)switch(e.type){case"marker":c.push(...u(e,i,s));break;case"fill":c.push(...z(e,i,s));break;case"gradientFill":c.push(...d(e,i,s));break;case"line":c.push(...y(e,i,s));break;case"gradientStroke":c.push(...R(e,i,s));break;case"text":c.push(...C(e,i,s))}return c}function u(e,a,i){const{uniforms:t,schemaOptions:r}=a,{store:n}=r,s=e.isOutline?{...o,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue,visualVariableRotation:t.visualVariableRotation};if(e.animationParams){return f(n.ensureInstance(l.animatedMarker,{uniforms:s,optionalAttributes:{zoomRange:!0}}),e,o,i)}return p(n.ensureInstance(l.marker,{uniforms:s,optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,t,i)}function f(e,a,l,o){if(!a.animationParams)return[];return[e.createMeshInfo({pixelDimensions:a.pixelDimensions,texelDimensions:a.texelDimensions,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null,sprite:a.spriteRasterizationParam,animations:a.animationParams,scaleInfo:o.scaleInfo,scaleSymbolsProportionally:a.scaleSymbolsProportionally,strokeWidth:a.outlineWidth,isMapAligned:a.alignment===i.MAP,colorLocked:a.colorLocked,isStroke:a.isStroke,baseSize:a.baseSize,referenceSize:a.referenceSize,angleToLine:!!a.markerPlacement&&(a.markerPlacement.placement&&"angleToLine"in a.markerPlacement.placement&&a.markerPlacement.placement.angleToLine),sizeRatio:a.sizeRatio})]}function p(e,i,l,{scaleInfo:o,scaleExpression:n}){const c=r(l);return[e.createMeshInfo({size:i.size,scaleX:i.scaleX,anchorX:i.anchorPoint.x,anchorY:i.anchorPoint.y,angle:i.rotation,color:s(i.color)??[0,0,0,0],colorLocked:i.colorLocked,frameHeight:i.frameHeight,widthRatio:i.widthRatio,scaleInfo:o,offsetX:i.offsetX,offsetY:i.offsetY,outlineColor:s(i.outlineColor)??[0,0,0,0],outlineSize:i.outlineWidth,referenceSize:i.referenceSize||a.CIMVectorMarker.size,rotateClockwise:i.rotateClockwise,scaleFactor:n??1,sizeRatio:i.sizeRatio,alignment:i.alignment,isAbsoluteAnchorPoint:i.isAbsoluteAnchorPoint,scaleSymbolsProportionally:i.scaleSymbolsProportionally,sprite:i.spriteRasterizationParam,hasSizeVV:c,placement:i.markerPlacement,effects:i.effects?{type:"cim-effect-infos",effectInfos:i.effects}:null,transforms:i.transform,minPixelBuffer:t(l)})]}function m(e,a,i){const{uniforms:o,schemaOptions:t}=a,{store:r}=t;return V(r.ensureInstance(l.fill,{uniforms:{visualVariableColor:e.colorLocked?null:o.visualVariableColor,visualVariableOpacity:o.visualVariableOpacity},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function S(e,a,i){const{uniforms:o,schemaOptions:t}=a,{store:r}=t;return b(r.ensureInstance(l.outlineFill,{uniforms:{visualVariableColor:e.colorLocked?null:o.visualVariableColor,visualVariableOpacity:o.visualVariableOpacity,visualVariableSizeMinMaxValue:null,visualVariableSizeScaleStops:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function b(e,a,i){const l=s(a.color)??[0,0,0,0];return[e.createMeshInfo({color:l,outlineColor:l,width:.75,referenceWidth:.75,capType:"round",joinType:"round",miterLimit:4,hasSizeVV:!1,scaleInfo:i.scaleInfo,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function V(e,a,{scaleInfo:i}){return[e.createMeshInfo({color:s(a.color)??[0,0,0,0],scaleInfo:i,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function z(e,a,i){if(!e.spriteRasterizationParam)return e.addAAOutline?S(e,a,i):m(e,a,i);const{uniforms:o,schemaOptions:t}=a,{store:r}=t;return h(r.ensureInstance(l.complexFill,{uniforms:{visualVariableColor:e.colorLocked?null:o.visualVariableColor,visualVariableOpacity:o.visualVariableOpacity},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,null!=o.visualVariableColor,i)}function h(e,a,i,{scaleInfo:l}){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const o=!!a.hasUnresolvedReplacementColor&&(!i||a.colorLocked),t=a.sampleAlphaOnly&&!o,r=a.spriteRasterizationParam;return[e.createMeshInfo({color:s(a.color)??[0,0,0,0],height:a.height,aspectRatio:a.scaleX,offsetX:a.offsetX,offsetY:a.offsetY,scaleX:1,scaleY:1,angle:a.angle,applyRandomOffset:a.applyRandomOffset,sampleAlphaOnly:t,scaleProportionally:"CIMHatchFill"===r.resource.type,sprite:r,scaleInfo:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function d(e,a,i){const{uniforms:o,schemaOptions:t}=a,{store:r}=t;return v(r.ensureInstance(l.gradientFill,{uniforms:{visualVariableColor:null,visualVariableOpacity:o.visualVariableOpacity},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function v(e,a,{scaleInfo:i}){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const l=a.spriteRasterizationParam;return[e.createMeshInfo({color:s(a.color)??[0,0,0,0],angle:a.angle,gradientMethod:a.gradientMethod,gradientSize:a.gradientSize,gradientSizeUnits:a.gradientSizeUnits,gradientType:a.gradientType,sprite:l,scaleInfo:i,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function y(e,a,i){const{uniforms:t,schemaOptions:r}=a,{store:n}=r,s=e.isOutline?{...o,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue},c={uniforms:s,optionalAttributes:{zoomRange:!!i.scaleInfo}},u=!!(s.visualVariableSizeMinMaxValue||s.visualVariableSizeScaleStops||s.visualVariableSizeStops||s.visualVariableSizeUnitValue);if(!e.spriteRasterizationParam){return g(n.ensureInstance(l.line,c),e,u,i)}return M(n.ensureInstance(l.texturedLine,c),e,u,i)}function I(e,a,{scaleInfo:i}){return{color:s(e.color)??[0,0,0,0],width:e.width,referenceWidth:e.referenceWidth,capType:e.cap,joinType:e.join,miterLimit:e.miterLimit,scaleInfo:i,hasSizeVV:a,effects:e.effects?{type:"cim-effect-infos",effectInfos:e.effects}:null}}function g(e,a,i,l){if(a.spriteRasterizationParam)throw new Error("InternalError: Sprite should not be defined");const o=I(a,i,l);return[e.createMeshInfo(o)]}function M(e,a,i,l){const{spriteRasterizationParam:o,scaleDash:t,sampleAlphaOnly:r}=a;if(!o)throw new Error("InternalError: Sprite should be defined");return[e.createMeshInfo({...I(a,i,l),offsetAlongLine:a.offsetAlongLine??0,shouldScaleDash:t??!1,shouldSampleAlphaOnly:r,isSDF:"CIMPictureStroke"!==o.resource.type&&"CIMGradientStroke"!==o.resource.type,sprite:o})]}function R(e,a,i){const{uniforms:t,schemaOptions:r}=a,{store:n}=r;return O(n.ensureInstance(l.gradientStroke,{uniforms:e.isOutline?{...o,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:null,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function O(e,a,i){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const l=a.spriteRasterizationParam;return[e.createMeshInfo({...I(a,!1,i),gradientMethod:a.gradientMethod,gradientSize:a.gradientSize,gradientSizeUnits:a.gradientSizeUnits,gradientType:a.gradientType,sprite:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function C(e,a,i){const{uniforms:o,schemaOptions:t}=a,{store:r}=t;return P(r.ensureInstance(l.text,{uniforms:{visualVariableColor:e.colorLocked?null:o.visualVariableColor,visualVariableOpacity:o.visualVariableOpacity,visualVariableRotation:o.visualVariableRotation,visualVariableSizeMinMaxValue:o.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:o.visualVariableSizeScaleStops,visualVariableSizeStops:o.visualVariableSizeStops,visualVariableSizeUnitValue:o.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!!i.scaleInfo,referenceSymbol:!1,clipAngle:!1,visibility:!1}}),e,o,i)}function P(e,a,i,{scaleInfo:l,scaleExpression:o}){return[e.createMeshInfo({boxBackgroundColor:s(a.backgroundColor),boxBorderLineColor:s(a.borderLineColor),boxBorderLineSize:a.borderLineWidth??0,color:s(a.color)??[0,0,0,0],offsetX:a.offsetX,offsetY:a.offsetY,postAngle:a.angle,fontSize:a.size,referenceSize:a.referenceSize,decoration:a.decoration,haloColor:s(a.haloColor)??[0,0,0,0],haloSize:a.haloSize??0,outlineColor:s(a.outlineColor)??[0,0,0,0],outlineSize:a.outlineSize,lineWidth:a.lineWidth||512,lineHeightRatio:1,horizontalAlignment:a.horizontalAlignment??"center",verticalAlignment:a.verticalAlignment??"baseline",useCIMAngleBehavior:!1,glyphs:a.textRasterizationParam,scaleInfo:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null,placement:a.markerPlacement,transforms:a.transform,scaleFactor:o??1,minPixelBuffer:t(i),repeatLabel:null,repeatLabelDistance:null,allowOverrun:null,labelPosition:null,labelClassId:-1})]}export{f as createAnimatedMarkerMeshInfos,h as createComplexFillMeshInfos,p as createComplexMarkerMeshInfos,V as createComplexSimpleFillMeshInfos,g as createComplexSimpleLineMeshInfos,b as createComplexSimpleOutlineFillMeshInfos,c as createComplexSymbolInstances,P as createComplexTextMeshInfos,M as createComplexTexturedLineMeshInfos,v as createGradientFillMeshInfos,O as createGradientStrokeMeshInfos,n as getScaleInfo};
|
|
@@ -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{pt2px as a}from"../../../../../../../core/screenUtils.js";import{generateGradient as i}from"../../../../../../../renderers/support/heatmapUtils.js";import l from"../../../../../../../symbols/SimpleFillSymbol.js";import r from"../../../../../../../symbols/SimpleLineSymbol.js";import t from"../../../../../../../symbols/SimpleMarkerSymbol.js";import{CIMSymbolHelper as o,slsDashToTemplateArray as s}from"../../../../../../../symbols/cim/CIMSymbolHelper.js";import{Alignment as n,ExtremityPlacement as u}from"../../../../../../../symbols/cim/enums.js";import{getSDFInfo as c}from"../../../../../../../symbols/cim/SDFHelper.js";import{getAlignmentFromPlacement as p}from"../../../../../engine/webgl/alignmentUtils.js";import{writeColor as f}from"../../../../../engine/webgl/color.js";import{dotDensityMaxFields as b}from"../../../../../engine/webgl/definitions.js";import{Techniques as m}from"../../../../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{premultiplyColor as S}from"../schemaUtils.js";import{createVisualVariableUniforms as V,getMaxSizeVVSize as y,noVisualVariables as v}from"../VisualVariablesSchema.js";import{createComplexSymbolInstances as h}from"./ComplexSymbolSchema.js";import{hasSizeVVUniform as z,hasRotationVVUniform as d}from"./utils.js";async function g(a,i){if(!a)return[];switch(a.type){case"simple-fill":return U(a,i);case"picture-fill":return P(a,i);case"simple-marker":return w(a,i);case"picture-marker":return A(a,i);case"simple-line":return F(a,i,!1);case"text":return L(a,i);case"label":return R(a,i);case"cim":return h(a.data,i);case"web-style":{const e=await a.fetchCIMSymbol();return h(e.data,i)}case"line-3d":return e.getLogger("esri.views.layers.FeatureLayerView").warn("unsupported-symbol",`Symbol of type "${a.type}" unsupported in MapView. Defaulting to simple-line`),F(new r,i,!1);case"point-3d":return e.getLogger("esri.views.layers.FeatureLayerView").warn("unsupported-symbol",`Symbol of type "${a.type}" unsupported in MapView. Defaulting to simple-marker`),w(new t,i);case"polygon-3d":return e.getLogger("esri.views.layers.FeatureLayerView").warn("unsupported-symbol",`Symbol of type "${a.type}" unsupported in MapView. Defaulting to simple-fill`),U(new l,i);case"mesh-3d":case"label-3d":return e.getLogger("esri.views.layers.FeatureLayerView").warn("unsupported-symbol",`Symbol of type "${a.type}" unsupported in MapView. Ignoring`),[];case"CIMSymbolReference":throw new Error("InternalError: CIMSymbolReference should already be resolved")}}async function M(e,a){const{schemaOptions:i}=a,{store:r}=i,t=new Array(b),o=new Array(b/4);for(let l=0;l<b;l++){const a=l<e.attributes.length?e.attributes[l].color:null;t[l]=[0,0,0,0],f(t[l],a)}for(let l=0;l<b/4;l++)o[l]=[0,0,0,0],o[l][0]=4*l<e.attributes.length?1:0,o[l][1]=4*l+1<e.attributes.length?1:0,o[l][2]=4*l+2<e.attributes.length?1:0,o[l][3]=4*l+3<e.attributes.length?1:0;const s={uniforms:{isActive:o,colors:t,dotValue:e.dotValue,dotScale:e.referenceScale,blending:e.dotBlendingEnabled,dotSize:e.dotSize,seed:e.seed},optionalAttributes:{}},n=r.ensureInstance(m.dotDensity,s).createMeshInfo({effects:null}),u=[],c=new l({color:e.backgroundColor??[0,0,0,0],outline:null}),p=await g(c,a);if(u.push(...p),u.push(n),e.outline){const i=F(e.outline,a,!0);u.push(...i)}return u}async function x(e,l){const{store:r}=l,{radius:t,minDensity:o,maxDensity:s,referenceScale:n,field:u,valueExpression:c,colorStops:p}=e,f=i(p);return[r.ensureInstance(m.heatmap,{uniforms:{radius:a(t),minDensity:o,maxDensity:s,referenceScale:n,isFieldActive:!(!u&&!c),gradient:f,gradientHash:f.join(",")},optionalAttributes:{}}).createMeshInfo({effects:null})]}async function C(e,i){const{store:l}=i,r=e.outline?.width||0,t=V(e),o=l.ensureInstance(m.pieChart,{uniforms:{shader:{outlineWidth:Math.round(a(r)),defaultColor:S(e.defaultColor),outlineColor:S(e.outline?.color),othersColor:S(e.othersCategory?.color),donutRatio:e.holePercentage,sectorThreshold:e.othersCategory?.threshold||0,colors:e.attributes.map((e=>S(e.color))),visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue,hittestUniforms:null},numberOfFields:e.attributes.length},optionalAttributes:{}}).createMeshInfo({size:e.size,outlineWidth:r,effects:null,scaleInfo:null,minPixelBuffer:y(t)});return[...e.backgroundFillSymbol?await U(e.backgroundFillSymbol,{schemaOptions:i,path:"",uniforms:v}):[],o]}function I(e){if("path"===e.style){if(null==e.path)throw new Error("Symbol with a style of type path must define a path");return{type:"sprite-rasterization-param",overrides:[],resource:{type:"path",path:e.path,asFill:!0}}}const a=o.fromSimpleMarker(e);if("outline"in e&&e.outline&&"none"!==e.outline.style){if("solid"!==e.outline.style){if(!a||!a.symbolLayers)throw new Error("Error handling marker! ");return{type:"sprite-rasterization-param",resource:a.symbolLayers[0],overrides:[]}}}return{type:"sprite-rasterization-param",resource:c(a),overrides:[]}}async function w(e,a){const{uniforms:i,schemaOptions:l}=a,{store:r}=l;if("path"===e.style||e.outline&&"solid"!==e.outline.style&&"none"!==e.outline.style){const l=o.fromSimpleMarker(e);if(!l||!l.symbolLayers)throw new Error("Error handling marker! ");if(i.visualVariableRotation&&(l.angleAlignment="Map"),"path"!==e.style){const e=l.symbolLayers[0];if(z(a.uniforms)){const i=y(a.uniforms,0,1);if(i>e.size){const a=i/e.size;e.size=i;const l=e.markerGraphics?.[0].symbol;(l.symbolLayers&&l.symbolLayers[0]).width*=a}}}return h({type:"CIMSymbolReference",symbol:l},a)}const t=r.ensureInstance(m.marker,{uniforms:{visualVariableColor:i.visualVariableColor,visualVariableOpacity:i.visualVariableOpacity,visualVariableSizeMinMaxValue:i.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:i.visualVariableSizeScaleStops,visualVariableSizeStops:i.visualVariableSizeStops,visualVariableSizeUnitValue:i.visualVariableSizeUnitValue,visualVariableRotation:i.visualVariableRotation},optionalAttributes:{zoomRange:!1}}),s=I(e);let u=e.color?.toArray()??[0,0,0,0];"CIMVectorMarker"===s.resource.type&&(u=[255,255,255,255]);const c="triangle"===e.style?124/116:1,p=e.size,f=p*c,b=null!=i.visualVariableColor&&("cross"===e.style||"x"===e.style);return[t.createMeshInfo({type:"simple",color:u,height:p,width:f,offsetX:e.xoffset,offsetY:e.yoffset,angle:e.angle,alignment:d(i)?n.MAP:n.SCREEN,outlineColor:e.outline?.color?.toArray()??[0,0,0,0],outlineSize:e.outline?.width??1,referenceSize:p,sprite:s,overrideOutlineColor:b,hasSizeVV:z(i),placement:null,effects:null,transforms:null,scaleInfo:null,minPixelBuffer:y(i)})]}function A(e,a){const{uniforms:i,schemaOptions:l}=a,{store:r}=l,t=r.ensureInstance(m.marker,{uniforms:{visualVariableColor:i.visualVariableColor,visualVariableOpacity:i.visualVariableOpacity,visualVariableSizeMinMaxValue:i.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:i.visualVariableSizeScaleStops,visualVariableSizeStops:i.visualVariableSizeStops,visualVariableSizeUnitValue:i.visualVariableSizeUnitValue,visualVariableRotation:i.visualVariableRotation},optionalAttributes:{zoomRange:!1}}),s=o.createPictureMarkerRasterizationParam(e);if(!s)return[];return[t.createMeshInfo({type:"picture",color:[255,255,255,255],height:e.height,width:e.width,offsetX:e.xoffset,offsetY:e.yoffset,angle:e.angle,alignment:d(i)?n.MAP:n.SCREEN,outlineColor:null,outlineSize:0,referenceSize:e.height,sprite:s,overrideOutlineColor:!1,hasSizeVV:z(i),placement:null,effects:null,transforms:null,scaleInfo:null,minPixelBuffer:y(i)})]}function O(e,a,i){const{uniforms:l,schemaOptions:r}=i,{store:t}=r,o=t.ensureInstance(m.marker,{uniforms:{visualVariableColor:l.visualVariableColor,visualVariableOpacity:l.visualVariableOpacity,visualVariableSizeMinMaxValue:l.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:l.visualVariableSizeScaleStops,visualVariableSizeStops:l.visualVariableSizeStops,visualVariableSizeUnitValue:l.visualVariableSizeUnitValue,visualVariableRotation:l.visualVariableRotation},optionalAttributes:{zoomRange:!1}}),s=I(e),c=6,p=c*a.width,f=p,b=e.color?.toArray()??a.color?.toArray()??[0,0,0,0],S="cross"===e.style||"x"===e.style;let V;switch(e.placement){case"begin-end":V=u.Both;break;case"begin":V=u.JustBegin;break;case"end":V=u.JustEnd;break;default:V=u.None}const v={type:"cim-marker-placement-param",placement:{type:"CIMMarkerPlacementAtExtremities",angleToLine:!0,offset:0,extremityPlacement:V,offsetAlongLine:0},overrides:[]};return[o.createMeshInfo({type:"simple",color:b,height:f,width:p,offsetX:0,offsetY:0,angle:0,alignment:d(l)?n.MAP:n.SCREEN,outlineColor:b,outlineSize:S?a.width:0,referenceSize:f/c,sprite:s,overrideOutlineColor:S&&null!=l.visualVariableColor,hasSizeVV:z(l),placement:v,transforms:null,effects:null,scaleInfo:null,minPixelBuffer:y(l)})]}function L(e,a){const{uniforms:i,schemaOptions:l}=a,{store:r}=l;return[r.ensureInstance(m.text,{uniforms:{visualVariableColor:i.visualVariableColor,visualVariableOpacity:i.visualVariableOpacity,visualVariableRotation:i.visualVariableRotation,visualVariableSizeMinMaxValue:i.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:i.visualVariableSizeScaleStops,visualVariableSizeStops:i.visualVariableSizeStops,visualVariableSizeUnitValue:i.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!1,clipAngle:!1,referenceSymbol:!1}}).createMeshInfo({boxBackgroundColor:e.backgroundColor?.toArray(),boxBorderLineColor:e.borderLineColor?.toArray(),boxBorderLineSize:e.borderLineSize??0,color:e.color?.toArray()??[0,0,0,0],offsetX:e.xoffset,offsetY:e.yoffset,postAngle:e.angle,fontSize:e.font.size,decoration:e.font.decoration,haloColor:e.haloColor?.toArray()??[0,0,0,0],haloSize:e.haloSize??0,outlineColor:[0,0,0,0],outlineSize:0,lineWidth:e.lineWidth,lineHeightRatio:e.lineHeight,horizontalAlignment:e.horizontalAlignment,verticalAlignment:e.verticalAlignment,useCIMAngleBehavior:!1,glyphs:{type:"text-rasterization-param",resource:{type:"text",font:e.font.toJSON(),textString:e.text,symbol:o.createCIMTextSymbolfromTextSymbol(e)},overrides:[]},referenceSize:null,effects:null,placement:null,scaleInfo:null,transforms:null,scaleFactor:1,minPixelBuffer:y(i),repeatLabel:null,repeatLabelDistance:null,allowOverrun:null,labelPosition:null})]}function R(e,i){const{schemaOptions:l,uniforms:r}=i,{store:t}=l,s=e.symbol,{allowOverrun:n,repeatLabel:u,repeatLabelDistance:c}=e,f={maxScale:e.maxScale??0,minScale:e.minScale??0},b=t.ensureInstance(m.label,{uniforms:{visualVariableColor:null,visualVariableOpacity:null,visualVariableRotation:r.visualVariableRotation,visualVariableSizeMinMaxValue:r.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:r.visualVariableSizeScaleStops,visualVariableSizeStops:r.visualVariableSizeStops,visualVariableSizeUnitValue:r.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!0,clipAngle:!0,referenceSymbol:!0}}),S=e.labelPlacement,[V,v]=p(S);return[b.createMeshInfo({boxBackgroundColor:s.backgroundColor?.toArray(),boxBorderLineColor:s.borderLineColor?.toArray(),boxBorderLineSize:s.borderLineSize??0,color:s.color?.toArray()??[0,0,0,0],offsetX:s.xoffset,offsetY:s.yoffset,postAngle:s.angle,fontSize:s.font.size,decoration:s.font.decoration,outlineColor:[0,0,0,0],outlineSize:0,haloColor:s.haloColor?.toArray()??[0,0,0,0],haloSize:s.haloSize??0,lineWidth:s.lineWidth,lineHeightRatio:s.lineHeight,horizontalAlignment:V,verticalAlignment:v,repeatLabel:u,repeatLabelDistance:a(c),allowOverrun:n,labelPosition:e.labelPosition,scaleInfo:f,minPixelBuffer:y(r),useCIMAngleBehavior:!1,glyphs:{type:"text-rasterization-param",resource:{type:"text",font:s.font.toJSON(),textString:s.text,symbol:o.createCIMTextSymbolfromTextSymbol(s),primitiveName:"label-override"},useLegacyLabelEvaluationRules:null==e.labelExpressionInfo?.expression,overrides:[{valueExpressionInfo:{type:"CIMExpressionInfo",expression:e.labelExpressionInfo?.expression??e.labelExpression,returnType:"String"},primitiveName:"label-override",propertyName:"textString",defaultValue:""}]},referenceSize:null,effects:null,placement:null,transforms:null,scaleFactor:1})]}function k(e,a){const i=e.width;return{outlineColor:e.color?.toArray()||[0,0,0,1],width:i,referenceWidth:i,capType:e.cap??"round",joinType:e.join??"round",miterLimit:e.miterLimit,hasSizeVV:a}}function E(e,a){const{uniforms:i,schemaOptions:l}=a,{store:r}=l,t=e.color?.toArray()??[0,0,0,0],o={type:"sprite-rasterization-param",resource:{type:"fill-style",style:e.style},overrides:[]};if("solid"===e.outline?.style){return[r.ensureInstance(m.patternOutlineFill,{uniforms:{visualVariableColor:i.visualVariableColor,visualVariableOpacity:i.visualVariableOpacity,visualVariableSizeScaleStops:i.visualVariableSizeOutlineScaleStops,visualVariableSizeMinMaxValue:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null},optionalAttributes:{zoomRange:!1}}).createMeshInfo({color:t,...k(e.outline,!!i.visualVariableSizeOutlineScaleStops),sprite:o,scaleInfo:null,effects:null})]}const s=[],n=r.ensureInstance(m.patternFill,{uniforms:{visualVariableColor:i.visualVariableColor,visualVariableOpacity:i.visualVariableOpacity},optionalAttributes:{zoomRange:!1}}).createMeshInfo({color:e.color?.toArray()??[0,0,0,0],sprite:o,scaleInfo:null,effects:null});return s.push(n),e.outline&&s.push(...F(e.outline,a,!0)),s}function j(e,a){const{uniforms:i,schemaOptions:l}=a,{store:r}=l,t=e.color?.toArray()??[0,0,0,0];if("none"!==e.style&&"solid"===e.outline?.style){return[r.ensureInstance(m.outlineFill,{uniforms:{visualVariableColor:i.visualVariableColor,visualVariableOpacity:i.visualVariableOpacity,visualVariableSizeScaleStops:i.visualVariableSizeOutlineScaleStops,visualVariableSizeMinMaxValue:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null},optionalAttributes:{zoomRange:!1}}).createMeshInfo({color:t,...k(e.outline,!!i.visualVariableSizeOutlineScaleStops),scaleInfo:null,effects:null})]}const o=[];if("none"!==e.style){const e=r.ensureInstance(m.fill,{uniforms:{visualVariableColor:i.visualVariableColor,visualVariableOpacity:i.visualVariableOpacity},optionalAttributes:{zoomRange:!1}}).createMeshInfo({color:t,scaleInfo:null,effects:null});o.push(e)}return e.outline&&o.push(...F(e.outline,a,!0)),o}async function U(e,a){if("cim"===e.type)return h(e.data,a);const{style:i}=e;return i&&"none"!==i&&"solid"!==i?E(e,a):j(e,a)}function P(e,a){const{outline:i}=e,{uniforms:l,schemaOptions:r}=a,{store:t}=r,s=[],n=o.createPictureFillRasterizationParam(e);if(!n)return[];const{width:u,height:c,xoffset:p,yoffset:f,xscale:b,yscale:S}=e,V={color:[255,255,255,255],sprite:n,height:c,aspectRatio:u/c,offsetX:p,offsetY:f,scaleX:b,scaleY:S,angle:0,applyRandomOffset:!1,sampleAlphaOnly:!1,scaleProportionally:!1,effects:null,scaleInfo:null};if("solid"===i?.style){return[t.ensureInstance(m.complexOutlineFill,{uniforms:{visualVariableColor:l.visualVariableColor,visualVariableOpacity:l.visualVariableOpacity,visualVariableSizeScaleStops:l.visualVariableSizeOutlineScaleStops,visualVariableSizeMinMaxValue:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null},optionalAttributes:{zoomRange:!1}}).createMeshInfo({...V,...k(i,!!l.visualVariableSizeOutlineScaleStops)})]}const y=t.ensureInstance(m.complexFill,{uniforms:{visualVariableColor:l.visualVariableColor,visualVariableOpacity:l.visualVariableOpacity},optionalAttributes:{zoomRange:!1}});return s.push(y.createMeshInfo(V)),i&&s.push(...F(i,a,!0)),s}function F(e,a,i){const{color:l,style:r,width:t,cap:o,join:n}=e,{schemaOptions:u}=a,{store:c}=u,p=[],f=i?{...v,visualVariableSizeScaleStops:a.uniforms.visualVariableSizeOutlineScaleStops}:a.uniforms,b={uniforms:{visualVariableColor:f.visualVariableColor,visualVariableOpacity:f.visualVariableOpacity,visualVariableSizeMinMaxValue:f.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:f.visualVariableSizeScaleStops,visualVariableSizeStops:f.visualVariableSizeStops,visualVariableSizeUnitValue:f.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!1}},S={color:l?.toArray()??[0,0,0,0],width:t,referenceWidth:t,capType:o,joinType:n,miterLimit:e.miterLimit,hasSizeVV:z(f),effects:null,scaleInfo:null};if(null==r||"solid"===r){const e=c.ensureInstance(m.line,b).createMeshInfo(S);p.push(e)}else if("none"!==r){const e=c.ensureInstance(m.texturedLine,b).createMeshInfo({...S,offsetAlongLine:0,shouldScaleDash:!0,shouldSampleAlphaOnly:!1,isSDF:!0,sprite:{type:"sprite-rasterization-param",resource:{type:"dash",dashTemplate:s(r,o)},overrides:[]}});p.push(e)}return null!=e.marker&&p.push(...O(e.marker,e,a)),p}export{M as createDotDensityMeshSchemas,x as createHeatmapMeshSchemas,F as createLineInstance,C as createPieChartMeshSchemas,g as createSymbolMeshSchemas};
|
|
5
|
+
import e from"../../../../../../../core/Logger.js";import{pt2px as i}from"../../../../../../../core/screenUtils.js";import{generateGradient as a}from"../../../../../../../renderers/support/heatmapUtils.js";import l from"../../../../../../../symbols/SimpleFillSymbol.js";import r from"../../../../../../../symbols/SimpleLineSymbol.js";import t from"../../../../../../../symbols/SimpleMarkerSymbol.js";import{CIMSymbolHelper as o,slsDashToTemplateArray as s}from"../../../../../../../symbols/cim/CIMSymbolHelper.js";import{Alignment as n,ExtremityPlacement as u}from"../../../../../../../symbols/cim/enums.js";import{getSDFInfo as c}from"../../../../../../../symbols/cim/SDFHelper.js";import{getAlignmentFromPlacement as p}from"../../../../../engine/webgl/alignmentUtils.js";import{writeColor as f}from"../../../../../engine/webgl/color.js";import{dotDensityMaxFields as b}from"../../../../../engine/webgl/definitions.js";import{Techniques as m}from"../../../../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{premultiplyColor as S}from"../schemaUtils.js";import{createVisualVariableUniforms as V,getMaxSizeVVSize as y,noVisualVariables as v}from"../VisualVariablesSchema.js";import{createComplexSymbolInstances as h}from"./ComplexSymbolSchema.js";import{hasSizeVVUniform as z,hasRotationVVUniform as d}from"./utils.js";async function g(i,a){if(!i)return[];switch(i.type){case"simple-fill":return U(i,a);case"picture-fill":return P(i,a);case"simple-marker":return w(i,a);case"picture-marker":return A(i,a);case"simple-line":return F(i,a,!1);case"text":return L(i,a);case"label":return R(i,a);case"cim":return h(i.data,a);case"web-style":{const e=await i.fetchCIMSymbol();return h(e.data,a)}case"line-3d":return e.getLogger("esri.views.layers.FeatureLayerView").warn("unsupported-symbol",`Symbol of type "${i.type}" unsupported in MapView. Defaulting to simple-line`),F(new r,a,!1);case"point-3d":return e.getLogger("esri.views.layers.FeatureLayerView").warn("unsupported-symbol",`Symbol of type "${i.type}" unsupported in MapView. Defaulting to simple-marker`),w(new t,a);case"polygon-3d":return e.getLogger("esri.views.layers.FeatureLayerView").warn("unsupported-symbol",`Symbol of type "${i.type}" unsupported in MapView. Defaulting to simple-fill`),U(new l,a);case"mesh-3d":case"label-3d":return e.getLogger("esri.views.layers.FeatureLayerView").warn("unsupported-symbol",`Symbol of type "${i.type}" unsupported in MapView. Ignoring`),[];case"CIMSymbolReference":throw new Error("InternalError: CIMSymbolReference should already be resolved")}}async function M(e,i){const{schemaOptions:a}=i,{store:r}=a,t=new Array(b),o=new Array(b/4);for(let l=0;l<b;l++){const i=l<e.attributes.length?e.attributes[l].color:null;t[l]=[0,0,0,0],f(t[l],i)}for(let l=0;l<b/4;l++)o[l]=[0,0,0,0],o[l][0]=4*l<e.attributes.length?1:0,o[l][1]=4*l+1<e.attributes.length?1:0,o[l][2]=4*l+2<e.attributes.length?1:0,o[l][3]=4*l+3<e.attributes.length?1:0;const s={uniforms:{isActive:o,colors:t,dotValue:e.dotValue,dotScale:e.referenceScale,blending:e.dotBlendingEnabled,dotSize:e.dotSize,seed:e.seed},optionalAttributes:{}},n=r.ensureInstance(m.dotDensity,s).createMeshInfo({effects:null}),u=[],c=new l({color:e.backgroundColor??[0,0,0,0],outline:null}),p=await g(c,i);if(u.push(...p),u.push(n),e.outline){const a=F(e.outline,i,!0);u.push(...a)}return u}async function C(e,l){const{store:r}=l,{radius:t,minDensity:o,maxDensity:s,referenceScale:n,field:u,valueExpression:c,colorStops:p}=e,f=a(p);return[r.ensureInstance(m.heatmap,{uniforms:{radius:i(t),minDensity:o,maxDensity:s,referenceScale:n,isFieldActive:!(!u&&!c),gradient:f,gradientHash:f.join(",")},optionalAttributes:{}}).createMeshInfo({effects:null})]}async function x(e,a){const{store:l}=a,r=e.outline?.width||0,t=V(e),o=l.ensureInstance(m.pieChart,{uniforms:{shader:{outlineWidth:Math.round(i(r)),defaultColor:S(e.defaultColor),outlineColor:S(e.outline?.color),othersColor:S(e.othersCategory?.color),donutRatio:e.holePercentage,sectorThreshold:e.othersCategory?.threshold||0,colors:e.attributes.map((e=>S(e.color))),visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue,hittestUniforms:null},numberOfFields:e.attributes.length},optionalAttributes:{}}).createMeshInfo({size:e.size,outlineWidth:r,effects:null,scaleInfo:null,minPixelBuffer:y(t)});return[...e.backgroundFillSymbol?await U(e.backgroundFillSymbol,{schemaOptions:a,path:"",uniforms:v}):[],o]}function I(e){if("path"===e.style){if(null==e.path)throw new Error("Symbol with a style of type path must define a path");return{type:"sprite-rasterization-param",overrides:[],resource:{type:"path",path:e.path,asFill:!0}}}const i=o.fromSimpleMarker(e);if("outline"in e&&e.outline&&"none"!==e.outline.style){if("solid"!==e.outline.style){if(!i||!i.symbolLayers)throw new Error("Error handling marker! ");return{type:"sprite-rasterization-param",resource:i.symbolLayers[0],overrides:[]}}}return{type:"sprite-rasterization-param",resource:c(i),overrides:[]}}async function w(e,i){const{uniforms:a,schemaOptions:l}=i,{store:r}=l;if("path"===e.style||e.outline&&"solid"!==e.outline.style&&"none"!==e.outline.style){const l=o.fromSimpleMarker(e);if(!l||!l.symbolLayers)throw new Error("Error handling marker! ");if(a.visualVariableRotation&&(l.angleAlignment="Map"),"path"!==e.style){const e=l.symbolLayers[0];if(z(i.uniforms)){const a=y(i.uniforms,0,1);if(a>e.size){const i=a/e.size;e.size=a;const l=e.markerGraphics?.[0].symbol;(l.symbolLayers&&l.symbolLayers[0]).width*=i}}}return h({type:"CIMSymbolReference",symbol:l},i)}const t=r.ensureInstance(m.marker,{uniforms:{visualVariableColor:a.visualVariableColor,visualVariableOpacity:a.visualVariableOpacity,visualVariableSizeMinMaxValue:a.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:a.visualVariableSizeScaleStops,visualVariableSizeStops:a.visualVariableSizeStops,visualVariableSizeUnitValue:a.visualVariableSizeUnitValue,visualVariableRotation:a.visualVariableRotation},optionalAttributes:{zoomRange:!1}}),s=I(e);let u=e.color?.toArray()??[0,0,0,0];"CIMVectorMarker"===s.resource.type&&(u=[255,255,255,255]);const c="triangle"===e.style?124/116:1,p=e.size,f=p*c,b=null!=a.visualVariableColor&&("cross"===e.style||"x"===e.style);return[t.createMeshInfo({type:"simple",color:u,height:p,width:f,offsetX:e.xoffset,offsetY:e.yoffset,angle:e.angle,alignment:d(a)?n.MAP:n.SCREEN,outlineColor:e.outline?.color?.toArray()??[0,0,0,0],outlineSize:e.outline?.width??1,referenceSize:p,sprite:s,overrideOutlineColor:b,hasSizeVV:z(a),placement:null,effects:null,transforms:null,scaleInfo:null,minPixelBuffer:y(a)})]}function A(e,i){const{uniforms:a,schemaOptions:l}=i,{store:r}=l,t=r.ensureInstance(m.marker,{uniforms:{visualVariableColor:a.visualVariableColor,visualVariableOpacity:a.visualVariableOpacity,visualVariableSizeMinMaxValue:a.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:a.visualVariableSizeScaleStops,visualVariableSizeStops:a.visualVariableSizeStops,visualVariableSizeUnitValue:a.visualVariableSizeUnitValue,visualVariableRotation:a.visualVariableRotation},optionalAttributes:{zoomRange:!1}}),s=o.createPictureMarkerRasterizationParam(e);if(!s)return[];return[t.createMeshInfo({type:"picture",color:[255,255,255,255],height:e.height,width:e.width,offsetX:e.xoffset,offsetY:e.yoffset,angle:e.angle,alignment:d(a)?n.MAP:n.SCREEN,outlineColor:null,outlineSize:0,referenceSize:e.height,sprite:s,overrideOutlineColor:!1,hasSizeVV:z(a),placement:null,effects:null,transforms:null,scaleInfo:null,minPixelBuffer:y(a)})]}function O(e,i,a){const{uniforms:l,schemaOptions:r}=a,{store:t}=r,o=t.ensureInstance(m.marker,{uniforms:{visualVariableColor:l.visualVariableColor,visualVariableOpacity:l.visualVariableOpacity,visualVariableSizeMinMaxValue:l.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:l.visualVariableSizeScaleStops,visualVariableSizeStops:l.visualVariableSizeStops,visualVariableSizeUnitValue:l.visualVariableSizeUnitValue,visualVariableRotation:l.visualVariableRotation},optionalAttributes:{zoomRange:!1}}),s=I(e),c=6,p=c*i.width,f=p,b=e.color?.toArray()??i.color?.toArray()??[0,0,0,0],S="cross"===e.style||"x"===e.style;let V;switch(e.placement){case"begin-end":V=u.Both;break;case"begin":V=u.JustBegin;break;case"end":V=u.JustEnd;break;default:V=u.None}const v={type:"cim-marker-placement-param",placement:{type:"CIMMarkerPlacementAtExtremities",angleToLine:!0,offset:0,extremityPlacement:V,offsetAlongLine:0},overrides:[]};return[o.createMeshInfo({type:"simple",color:b,height:f,width:p,offsetX:0,offsetY:0,angle:0,alignment:d(l)?n.MAP:n.SCREEN,outlineColor:b,outlineSize:S?i.width:0,referenceSize:f/c,sprite:s,overrideOutlineColor:S&&null!=l.visualVariableColor,hasSizeVV:z(l),placement:v,transforms:null,effects:null,scaleInfo:null,minPixelBuffer:y(l)})]}function L(e,i){const{uniforms:a,schemaOptions:l}=i,{store:r}=l;return[r.ensureInstance(m.text,{uniforms:{visualVariableColor:a.visualVariableColor,visualVariableOpacity:a.visualVariableOpacity,visualVariableRotation:a.visualVariableRotation,visualVariableSizeMinMaxValue:a.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:a.visualVariableSizeScaleStops,visualVariableSizeStops:a.visualVariableSizeStops,visualVariableSizeUnitValue:a.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!1,clipAngle:!1,referenceSymbol:!1,visibility:!1}}).createMeshInfo({boxBackgroundColor:e.backgroundColor?.toArray(),boxBorderLineColor:e.borderLineColor?.toArray(),boxBorderLineSize:e.borderLineSize??0,color:e.color?.toArray()??[0,0,0,0],offsetX:e.xoffset,offsetY:e.yoffset,postAngle:e.angle,fontSize:e.font.size,decoration:e.font.decoration,haloColor:e.haloColor?.toArray()??[0,0,0,0],haloSize:e.haloSize??0,outlineColor:[0,0,0,0],outlineSize:0,lineWidth:e.lineWidth,lineHeightRatio:e.lineHeight,horizontalAlignment:e.horizontalAlignment,verticalAlignment:e.verticalAlignment,useCIMAngleBehavior:!1,glyphs:{type:"text-rasterization-param",resource:{type:"text",font:e.font.toJSON(),textString:e.text,symbol:o.createCIMTextSymbolfromTextSymbol(e)},overrides:[]},referenceSize:null,effects:null,placement:null,scaleInfo:null,transforms:null,scaleFactor:1,minPixelBuffer:y(a),repeatLabel:null,repeatLabelDistance:null,allowOverrun:null,labelPosition:null,labelClassId:-1})]}function R(e,a){const{schemaOptions:l,uniforms:r}=a,{store:t}=l,s=e.symbol,{allowOverrun:n,repeatLabel:u,repeatLabelDistance:c}=e,f={maxScale:e.maxScale??0,minScale:e.minScale??0},b=t.ensureInstance(m.label,{uniforms:{visualVariableColor:null,visualVariableOpacity:null,visualVariableRotation:r.visualVariableRotation,visualVariableSizeMinMaxValue:r.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:r.visualVariableSizeScaleStops,visualVariableSizeStops:r.visualVariableSizeStops,visualVariableSizeUnitValue:r.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!0,clipAngle:!0,referenceSymbol:!0,visibility:!0}}),S=e.labelPlacement,[V,v]=p(S);return[b.createMeshInfo({boxBackgroundColor:s.backgroundColor?.toArray(),boxBorderLineColor:s.borderLineColor?.toArray(),boxBorderLineSize:s.borderLineSize??0,color:s.color?.toArray()??[0,0,0,0],offsetX:s.xoffset,offsetY:s.yoffset,postAngle:s.angle,fontSize:s.font.size,decoration:s.font.decoration,outlineColor:[0,0,0,0],outlineSize:0,haloColor:s.haloColor?.toArray()??[0,0,0,0],haloSize:s.haloSize??0,lineWidth:s.lineWidth,lineHeightRatio:s.lineHeight,horizontalAlignment:V,verticalAlignment:v,repeatLabel:u,repeatLabelDistance:i(c),allowOverrun:n,labelPosition:e.labelPosition,scaleInfo:f,minPixelBuffer:y(r),useCIMAngleBehavior:!1,glyphs:{type:"text-rasterization-param",resource:{type:"text",font:s.font.toJSON(),textString:s.text,symbol:o.createCIMTextSymbolfromTextSymbol(s),primitiveName:"label-override"},useLegacyLabelEvaluationRules:null==e.labelExpressionInfo?.expression,overrides:[{valueExpressionInfo:{type:"CIMExpressionInfo",expression:e.labelExpressionInfo?.expression??e.labelExpression,returnType:"String"},primitiveName:"label-override",propertyName:"textString",defaultValue:""}]},referenceSize:null,effects:null,placement:null,transforms:null,scaleFactor:1,labelClassId:a.labelClassId})]}function k(e,i){const a=e.width;return{outlineColor:e.color?.toArray()||[0,0,0,1],width:a,referenceWidth:a,capType:e.cap??"round",joinType:e.join??"round",miterLimit:e.miterLimit,hasSizeVV:i}}function E(e,i){const{uniforms:a,schemaOptions:l}=i,{store:r}=l,t=e.color?.toArray()??[0,0,0,0],o={type:"sprite-rasterization-param",resource:{type:"fill-style",style:e.style},overrides:[]};if("solid"===e.outline?.style){return[r.ensureInstance(m.patternOutlineFill,{uniforms:{visualVariableColor:a.visualVariableColor,visualVariableOpacity:a.visualVariableOpacity,visualVariableSizeScaleStops:a.visualVariableSizeOutlineScaleStops,visualVariableSizeMinMaxValue:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null},optionalAttributes:{zoomRange:!1}}).createMeshInfo({color:t,...k(e.outline,!!a.visualVariableSizeOutlineScaleStops),sprite:o,scaleInfo:null,effects:null})]}const s=[],n=r.ensureInstance(m.patternFill,{uniforms:{visualVariableColor:a.visualVariableColor,visualVariableOpacity:a.visualVariableOpacity},optionalAttributes:{zoomRange:!1}}).createMeshInfo({color:e.color?.toArray()??[0,0,0,0],sprite:o,scaleInfo:null,effects:null});return s.push(n),e.outline&&s.push(...F(e.outline,i,!0)),s}function j(e,i){const{uniforms:a,schemaOptions:l}=i,{store:r}=l,t=e.color?.toArray()??[0,0,0,0];if("none"!==e.style&&"solid"===e.outline?.style){return[r.ensureInstance(m.outlineFill,{uniforms:{visualVariableColor:a.visualVariableColor,visualVariableOpacity:a.visualVariableOpacity,visualVariableSizeScaleStops:a.visualVariableSizeOutlineScaleStops,visualVariableSizeMinMaxValue:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null},optionalAttributes:{zoomRange:!1}}).createMeshInfo({color:t,...k(e.outline,!!a.visualVariableSizeOutlineScaleStops),scaleInfo:null,effects:null})]}const o=[];if("none"!==e.style){const e=r.ensureInstance(m.fill,{uniforms:{visualVariableColor:a.visualVariableColor,visualVariableOpacity:a.visualVariableOpacity},optionalAttributes:{zoomRange:!1}}).createMeshInfo({color:t,scaleInfo:null,effects:null});o.push(e)}return e.outline&&o.push(...F(e.outline,i,!0)),o}async function U(e,i){if("cim"===e.type)return h(e.data,i);const{style:a}=e;return a&&"none"!==a&&"solid"!==a?E(e,i):j(e,i)}function P(e,i){const{outline:a}=e,{uniforms:l,schemaOptions:r}=i,{store:t}=r,s=[],n=o.createPictureFillRasterizationParam(e);if(!n)return[];const{width:u,height:c,xoffset:p,yoffset:f,xscale:b,yscale:S}=e,V={color:[255,255,255,255],sprite:n,height:c,aspectRatio:u/c,offsetX:p,offsetY:f,scaleX:b,scaleY:S,angle:0,applyRandomOffset:!1,sampleAlphaOnly:!1,scaleProportionally:!1,effects:null,scaleInfo:null};if("solid"===a?.style){return[t.ensureInstance(m.complexOutlineFill,{uniforms:{visualVariableColor:l.visualVariableColor,visualVariableOpacity:l.visualVariableOpacity,visualVariableSizeScaleStops:l.visualVariableSizeOutlineScaleStops,visualVariableSizeMinMaxValue:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null},optionalAttributes:{zoomRange:!1}}).createMeshInfo({...V,...k(a,!!l.visualVariableSizeOutlineScaleStops)})]}const y=t.ensureInstance(m.complexFill,{uniforms:{visualVariableColor:l.visualVariableColor,visualVariableOpacity:l.visualVariableOpacity},optionalAttributes:{zoomRange:!1}});return s.push(y.createMeshInfo(V)),a&&s.push(...F(a,i,!0)),s}function F(e,i,a){const{color:l,style:r,width:t,cap:o,join:n}=e,{schemaOptions:u}=i,{store:c}=u,p=[],f=a?{...v,visualVariableSizeScaleStops:i.uniforms.visualVariableSizeOutlineScaleStops}:i.uniforms,b={uniforms:{visualVariableColor:f.visualVariableColor,visualVariableOpacity:f.visualVariableOpacity,visualVariableSizeMinMaxValue:f.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:f.visualVariableSizeScaleStops,visualVariableSizeStops:f.visualVariableSizeStops,visualVariableSizeUnitValue:f.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!1}},S={color:l?.toArray()??[0,0,0,0],width:t,referenceWidth:t,capType:o,joinType:n,miterLimit:e.miterLimit,hasSizeVV:z(f),effects:null,scaleInfo:null};if(null==r||"solid"===r){const e=c.ensureInstance(m.line,b).createMeshInfo(S);p.push(e)}else if("none"!==r){const e=c.ensureInstance(m.texturedLine,b).createMeshInfo({...S,offsetAlongLine:0,shouldScaleDash:!0,shouldSampleAlphaOnly:!1,isSDF:!0,sprite:{type:"sprite-rasterization-param",resource:{type:"dash",dashTemplate:s(r,o)},overrides:[]}});p.push(e)}return null!=e.marker&&p.push(...O(e.marker,e,i)),p}export{M as createDotDensityMeshSchemas,C as createHeatmapMeshSchemas,F as createLineInstance,x as createPieChartMeshSchemas,g as createSymbolMeshSchemas};
|