@arcgis/core 5.2.0-next.163 → 5.2.0-next.165
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/Graphic.d.ts +47 -14
- package/PopupTemplate.js +1 -1
- package/WebScene.d.ts +3 -0
- package/analysis/LineOfSightAnalysis.d.ts +1 -1
- package/analysis/LineOfSightAnalysisObserver.d.ts +5 -4
- package/analysis/LineOfSightAnalysisTarget.d.ts +4 -4
- package/analysis/Viewshed.d.ts +4 -4
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{97d6ef9e34a43ad2e556.js → 02e10f44edf911832c2a.js} +1 -1
- package/assets/esri/core/workers/chunks/{97b5f4302fb867c829f4.js → 07f7177bfaf9de73bc25.js} +1 -1
- package/assets/esri/core/workers/chunks/{612345f17f5eeb99ea8f.js → 0d9c4c6c571ce26d356b.js} +1 -1
- package/assets/esri/core/workers/chunks/{8e19629899a5becf8e19.js → 150e7a7bd5df25693da7.js} +1 -1
- package/assets/esri/core/workers/chunks/{12a7997a40c77f5c9160.js → 151e5799ede763a03ee2.js} +1 -1
- package/assets/esri/core/workers/chunks/196979cc6a765be3c5cd.js +1 -0
- package/assets/esri/core/workers/chunks/1ab59a97ffa49e9e1659.js +1 -0
- package/assets/esri/core/workers/chunks/{8715661a838361d4211a.js → 1b24a40c0fa197014873.js} +1 -1
- package/assets/esri/core/workers/chunks/{83f29a159b8b5197e76a.js → 266c90d8d56a2da42fcf.js} +1 -1
- package/assets/esri/core/workers/chunks/{b1d989b72203113a06fe.js → 2a36fe3f3f257a779a1b.js} +1 -1
- package/assets/esri/core/workers/chunks/{fcaf9450642fcef83286.js → 3048e74e6246324ce6fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{95b82cbbe355266c65d7.js → 30af63b3b750142faadb.js} +1 -1
- package/assets/esri/core/workers/chunks/{74137ffec5265628c33b.js → 36c780a9527c75b36725.js} +1 -1
- package/assets/esri/core/workers/chunks/{6a0ec102962d2c7b4368.js → 40d803584eeade4df433.js} +1 -1
- package/assets/esri/core/workers/chunks/{a546ec82ba149e12f7bf.js → 41773d858e212468db88.js} +1 -1
- package/assets/esri/core/workers/chunks/{129e04d24ced77c9bb6d.js → 49b967d89d2841cea675.js} +1 -1
- package/assets/esri/core/workers/chunks/{b59aaf30c7fe2c8d1aaa.js → 4b99b4cf729881e616bc.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e096537a3a5555a4a93.js → 4cb751dc8d00bdaeb04c.js} +1 -1
- package/assets/esri/core/workers/chunks/{a09d2e1e2540921e4717.js → 4d3d7ec407ee5cd5f036.js} +1 -1
- package/assets/esri/core/workers/chunks/{85bba551057366cd00ae.js → 4db829a0238024736fe6.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c626f525f3483c03477.js → 548b8f74a6883e364931.js} +1 -1
- package/assets/esri/core/workers/chunks/{25a3bd8bede2d07d3a54.js → 5af8fb4ec2c72697e35b.js} +1 -1
- package/assets/esri/core/workers/chunks/{340256866f524cb069f6.js → 5d2f043ebe1051326c56.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f46acfda693c70abbdd.js → 61552b4b8111a8624d84.js} +1 -1
- package/assets/esri/core/workers/chunks/{e653c81ffb3d818645dd.js → 632fdf1d95ad69109427.js} +1 -1
- package/assets/esri/core/workers/chunks/{434a8ba841a59e0deab9.js → 67e533748435253aaba6.js} +1 -1
- package/assets/esri/core/workers/chunks/69d5f8ef78b9b8b3d33d.js +1 -0
- package/assets/esri/core/workers/chunks/{feb41abc03d677df6f73.js → 6b9961261241fdce0e94.js} +1 -1
- package/assets/esri/core/workers/chunks/6f897b4e7ddd1dd1672b.js +1 -0
- package/assets/esri/core/workers/chunks/{8aa80b892fde552577e8.js → 700b1d5bc67b7e1b3ff3.js} +1 -1
- package/assets/esri/core/workers/chunks/{e251921bc5367258c4d2.js → 710b8251a59884aee31e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f528ac5c648ca6a98582.js → 711cfb84659cb4437679.js} +1 -1
- package/assets/esri/core/workers/chunks/{af349c7bc8ef41a0e1bd.js → 7748c2886d0122b40eeb.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a7b02037151767542f1.js → 7dbf4c7480bf9c72820d.js} +1 -1
- package/assets/esri/core/workers/chunks/{1bca39e0e651426bdbb5.js → 7dfbc31f3b56728485a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{c19f238b55ff2893f7c2.js → 82a022cc21364c9a8539.js} +1 -1
- package/assets/esri/core/workers/chunks/{5cb26bbaa08114aec5ce.js → 89cc1a5539b82fb46216.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ab57cb1bfd3dc8d3c2a.js → 8b8118ab56cc808b5a71.js} +1 -1
- package/assets/esri/core/workers/chunks/{542e5640ea1b80ef801a.js → 9189dfe19a2a2ccd5173.js} +1 -1
- package/assets/esri/core/workers/chunks/{f74ae0eff3f08978e607.js → 9f358c7b052cdc0ac06f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ee08ae5b73439a1ff666.js → a163c6005aba3378edaa.js} +1 -1
- package/assets/esri/core/workers/chunks/{ec9a2425b4a498054a19.js → a17673e691ced46a90d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{72bd866df89b8d92e247.js → a43b33955aa78a2a8deb.js} +1 -1
- package/assets/esri/core/workers/chunks/{46c5371c7a627537098c.js → a88f346786b04bd194dc.js} +6 -6
- package/assets/esri/core/workers/chunks/{092e311cb7aea92a6a26.js → acb265a22be5e12f38e5.js} +1 -1
- package/assets/esri/core/workers/chunks/ad96132bc89671e595f3.js +1 -0
- package/assets/esri/core/workers/chunks/{9e8f012a56237fc8285f.js → aea44253c80493ef5755.js} +1 -1
- package/assets/esri/core/workers/chunks/b5b9d42e1f84ee82429c.js +1 -0
- package/assets/esri/core/workers/chunks/c046c4fc934bc6f54c69.js +1 -0
- package/assets/esri/core/workers/chunks/{c72a904e01dc8c17d992.js → c47d095434d09b5f10c6.js} +1 -1
- package/assets/esri/core/workers/chunks/c4b7111dcedd9d6e1c2a.js +1 -0
- package/assets/esri/core/workers/chunks/{81cad8d2f62a5f671c55.js → cb4db5489388559d6bd9.js} +1 -1
- package/assets/esri/core/workers/chunks/{bbd44ac63d2a317d8ed9.js → cc794bb94ebc1cb66024.js} +1 -1
- package/assets/esri/core/workers/chunks/{be308db5b61a7246edfe.js → cc94bf05b235e65291fc.js} +1 -1
- package/assets/esri/core/workers/chunks/d4af9faa5d901274fad2.js +1 -0
- package/assets/esri/core/workers/chunks/d77c68e0fc3b259bf4f9.js +1 -0
- package/assets/esri/core/workers/chunks/{fc5a36e54929e03efa86.js → dba5f44c4e4a3f075df2.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f43e06dcfe56229bb0f.js → debe45e792212682b304.js} +1 -1
- package/assets/esri/core/workers/chunks/{8414ffd937c1099e0bbc.js → e6d10136bc08aef255ff.js} +1 -1
- package/assets/esri/core/workers/chunks/{45fd2b456a6997584ca1.js → f8379cd45f750f28a3d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{709e019885822b1f6f3e.js → f905f1a1aa4c123cbe83.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2fcbc494333376192aa.js → f9c80e9fc349db4873e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{e0351753f6b4d1adf11e.js → fc0dbb588a4062615cb6.js} +1 -1
- package/assets/esri/core/workers/chunks/feb4f8c807bb0dca488f.js +1 -0
- package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
- package/chunks/GlobalIllumination.glsl.js +17 -47
- package/config.js +1 -1
- package/core/workers/WorkerFallback.js +4 -2
- package/core/workers/workerFactory.js +1 -1
- package/core/workers/workers.js +4 -2
- package/form/elements/inputs.d.ts +126 -25
- package/form/elements/inputs.js +1 -1
- package/form/elements.d.ts +1 -0
- package/geometry/support/clipRay.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/graphic/AnnotationFeatureGraphicOrigin.d.ts +49 -9
- package/graphic/BuildingGraphicOrigin.d.ts +49 -0
- package/graphic/CSVGraphicOrigin.d.ts +42 -9
- package/graphic/CatalogGraphicOrigin.d.ts +42 -9
- package/graphic/DimensionFeatureGraphicOrigin.d.ts +42 -9
- package/graphic/FeatureGraphicOrigin.d.ts +42 -9
- package/graphic/GeoJSONGraphicOrigin.d.ts +42 -9
- package/graphic/GeoRSSGraphicOrigin.d.ts +42 -9
- package/graphic/GraphicOrigin.d.ts +52 -12
- package/graphic/ImageryGraphicOrigin.d.ts +42 -9
- package/graphic/ImageryTileGraphicOrigin.d.ts +42 -9
- package/graphic/KMLGraphicOrigin.d.ts +47 -10
- package/graphic/KnowledgeGraphGraphicOrigin.d.ts +49 -1
- package/graphic/LinkChartGraphicOrigin.d.ts +49 -1
- package/graphic/MapImageGraphicOrigin.d.ts +49 -1
- package/graphic/MapNotesGraphicOrigin.d.ts +48 -1
- package/graphic/OGCFeatureGraphicOrigin.d.ts +42 -9
- package/graphic/OrientedImageryGraphicOrigin.d.ts +42 -9
- package/graphic/ParquetGraphicOrigin.d.ts +42 -9
- package/graphic/PointCloudGraphicOrigin.d.ts +43 -0
- package/graphic/SceneGraphicOrigin.d.ts +43 -0
- package/graphic/SketchGraphicOrigin.d.ts +43 -0
- package/graphic/StreamGraphicOrigin.d.ts +43 -0
- package/graphic/SubtypeGroupGraphicOrigin.d.ts +49 -1
- package/graphic/TileGraphicOrigin.d.ts +49 -1
- package/graphic/VectorTileGraphicOrigin.d.ts +43 -14
- package/graphic/VoxelGraphicOrigin.d.ts +43 -0
- package/graphic/WCSGraphicOrigin.d.ts +43 -0
- package/graphic/WFSGraphicOrigin.d.ts +42 -9
- package/graphic/getGraphicOriginTitle.d.ts +21 -3
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.d.ts +2 -1
- package/layers/GeoJSONLayer.d.ts +2 -107
- package/layers/ParquetLayer.d.ts +24 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/SceneLayer.d.ts +40 -16
- package/layers/ViewshedLayer.d.ts +10 -4
- package/layers/WMSLayer.d.ts +2 -69
- package/layers/mixins/ReloadableLayer.js +1 -1
- package/layers/mixins/SublayersOwner.js +1 -1
- package/layers/mixins/TemporalLayer.d.ts +70 -48
- package/layers/mixins/TiledImagery.d.ts +0 -11
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/save/imageryUtils.js +1 -1
- package/layers/save/mapImageLayerUtils.js +1 -1
- package/layers/save/mediaLayerUtils.js +1 -1
- package/layers/save/parquetLayerUtils.js +2 -0
- package/layers/save/streamLayerUtils.js +1 -1
- package/layers/support/LabelClass.d.ts +8 -2
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/layersMapping.js +1 -1
- package/package.json +2 -2
- package/popup/content.d.ts +38 -1
- package/popup/content.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/webScene.js +1 -1
- package/smartMapping/popup/support/clusterUtils.js +1 -1
- package/smartMapping/popup/support/utils.js +2 -2
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/regenerateUtils.js +1 -1
- package/support/timeUtils.d.ts +11 -0
- package/symbols/cim/CIMCursor.js +1 -1
- package/tables/elements.d.ts +1 -0
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
- package/views/2d/engine/webgl/animations/instructions.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/3d/environment/SunLighting.d.ts +0 -1
- package/views/3d/environment/SunLighting.js +1 -1
- package/views/3d/environment/VirtualLighting.d.ts +0 -1
- package/views/3d/environment/VirtualLighting.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +5 -5
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +9 -4
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.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/TriangleMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/worldSizedRibbonLineIntersectionUtils.js +2 -0
- package/views/layers/LineOfSightLayerView.d.ts +2 -2
- package/views/layers/ViewshedLayerView.d.ts +2 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/views/selection/types.d.ts +43 -3
- package/views/support/layerViewUtils.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/support/selectionUtils.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/webscene/Slide.d.ts +1 -2
- package/widgets/DirectionalPad/VisibleElements.d.ts +5 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +3 -3
- package/widgets/UtilityNetworkValidateTopology.d.ts +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +6 -0
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/ItemBase.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +6 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar.d.ts +8 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0cb50bc2b2125c5fedf2.js +0 -1
- package/assets/esri/core/workers/chunks/1fe24ffcd88280d84fbe.js +0 -1
- package/assets/esri/core/workers/chunks/2f04b8679c9f15390517.js +0 -1
- package/assets/esri/core/workers/chunks/42045cf46497828cd3c0.js +0 -1
- package/assets/esri/core/workers/chunks/72071ea5de89720fbe42.js +0 -1
- package/assets/esri/core/workers/chunks/9de5ad77bc37ec142218.js +0 -1
- package/assets/esri/core/workers/chunks/c19cd5a03b6d480fe53b.js +0 -1
- package/assets/esri/core/workers/chunks/d1f98c5249c487eb96f1.js +0 -1
- package/assets/esri/core/workers/chunks/e01fc1c31bc023dd0e33.js +0 -1
- package/assets/esri/core/workers/chunks/e077e321a3109c2fbbe2.js +0 -1
|
@@ -4,10 +4,58 @@ import type Sublayer from "../layers/support/Sublayer.js";
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Provides information about the [TileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/TileLayer/) from which a graphic originates.
|
|
7
|
-
*
|
|
7
|
+
* The [layer](https://developers.arcgis.com/javascript/latest/references/core/graphic/TileGraphicOrigin/#layer) property references the TileLayer, and the
|
|
8
|
+
* [sublayer](https://developers.arcgis.com/javascript/latest/references/core/graphic/TileGraphicOrigin/#sublayer) property references the [Sublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/) that contains the graphic.
|
|
8
9
|
* You can access the graphic's origin through the graphic's [origin](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#origin) property.
|
|
9
10
|
*
|
|
11
|
+
* Before accessing the layer properties, use [isTileGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isTileGraphicOrigin/) to check
|
|
12
|
+
* whether the graphic's origin is a TileGraphicOrigin.
|
|
13
|
+
*
|
|
14
|
+
* If you only need the title of the originating sublayer, use [getGraphicOriginTitle](https://developers.arcgis.com/javascript/latest/references/core/graphic/getGraphicOriginTitle/).
|
|
15
|
+
* To get the popup template applicable to the graphic, call [Graphic.getEffectivePopupTemplate()](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#getEffectivePopupTemplate) on the graphic
|
|
16
|
+
* instead of accessing the sublayer's template directly.
|
|
17
|
+
*
|
|
10
18
|
* @since 5.0
|
|
19
|
+
* @example
|
|
20
|
+
* Access the layer and sublayer of a graphic that originated from a MapImageLayer.
|
|
21
|
+
* ```js
|
|
22
|
+
* import { isMapImageGraphicOrigin } from "@arcgis/core/graphic/isMapImageGraphicOrigin.js";
|
|
23
|
+
*
|
|
24
|
+
* const origin = graphic.origin;
|
|
25
|
+
*
|
|
26
|
+
* // Check whether the graphic came from a MapImageLayer
|
|
27
|
+
* if (isMapImageGraphicOrigin(origin)) {
|
|
28
|
+
* console.log(origin.layer.title);
|
|
29
|
+
* console.log(origin.sublayer.title);
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
* @example
|
|
33
|
+
* Access the vector tile style layer associated with a graphic returned by hitTest().
|
|
34
|
+
* ```js
|
|
35
|
+
* import { isVectorTileGraphicOrigin } from "@arcgis/core/graphic/isVectorTileGraphicOrigin.js";
|
|
36
|
+
*
|
|
37
|
+
* viewElement.addEventListener("arcgisViewClick", async (event) => {
|
|
38
|
+
* // Get hit-test results from the VectorTileLayer at the clicked location
|
|
39
|
+
* const response = await view.hitTest(event.detail, { include: vectorTileLayer });
|
|
40
|
+
*
|
|
41
|
+
* for (const result of response.results) {
|
|
42
|
+
* // Only graphic results contain a graphic with origin information
|
|
43
|
+
* if (result.type !== "graphic") {
|
|
44
|
+
* continue;
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* const graphic = result.graphic;
|
|
48
|
+
* const origin = graphic.origin;
|
|
49
|
+
*
|
|
50
|
+
* // Check whether the graphic came from a VectorTileLayer
|
|
51
|
+
* if (isVectorTileGraphicOrigin(origin)) {
|
|
52
|
+
* // layerId identifies a style layer within the VectorTileLayer
|
|
53
|
+
* const styleLayer = origin.layer.getStyleLayer(origin.layerId);
|
|
54
|
+
* console.log(styleLayer);
|
|
55
|
+
* }
|
|
56
|
+
* }
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
11
59
|
*/
|
|
12
60
|
export default class TileGraphicOrigin extends GraphicOrigin {
|
|
13
61
|
constructor(layer: TileLayer, sublayer: Sublayer);
|
|
@@ -11,24 +11,53 @@ import type VectorTileLayer from "../layers/VectorTileLayer.js";
|
|
|
11
11
|
* Spatial information about the actual feature represented in the style layer is returned only
|
|
12
12
|
* if the style layer is a [symbol layer](https://maplibre.org/maplibre-style-spec/layers/#symbol). Otherwise, the graphic's geometry is `null`.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* // Search for all features only on included layers at the clicked location
|
|
18
|
-
* view.hitTest(event, {include: vectorTileLayer}).then((response) => {
|
|
19
|
-
* // if graphics are returned from vector tile layer, do something with results
|
|
20
|
-
* if (response.results.length){
|
|
21
|
-
* response.results.forEach((result, i) => {
|
|
22
|
-
* const layerId = result.graphic?.origin?.layerId;
|
|
23
|
-
* const styleLayer = vectorTileLayer.getStyleLayer(layerId);
|
|
24
|
-
* // update vector tile layer's style
|
|
25
|
-
* });
|
|
26
|
-
* }
|
|
27
|
-
* })
|
|
14
|
+
* Before accessing the layer properties, use [isVectorTileGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isVectorTileGraphicOrigin/) to check
|
|
15
|
+
* whether the graphic's origin is a VectorTileGraphicOrigin.
|
|
16
|
+
*
|
|
28
17
|
* @since 4.34
|
|
29
18
|
* @see [MapView.hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest)
|
|
30
19
|
* @see [Map component hitTest()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#hitTest)
|
|
31
20
|
* @see [Sample - VectorTileLayer hitTest](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-hittest/)
|
|
21
|
+
* @example
|
|
22
|
+
* Access the layer and sublayer of a graphic that originated from a MapImageLayer.
|
|
23
|
+
* ```js
|
|
24
|
+
* import { isMapImageGraphicOrigin } from "@arcgis/core/graphic/isMapImageGraphicOrigin.js";
|
|
25
|
+
*
|
|
26
|
+
* const origin = graphic.origin;
|
|
27
|
+
*
|
|
28
|
+
* // Check whether the graphic came from a MapImageLayer
|
|
29
|
+
* if (isMapImageGraphicOrigin(origin)) {
|
|
30
|
+
* console.log(origin.layer.title);
|
|
31
|
+
* console.log(origin.sublayer.title);
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
* @example
|
|
35
|
+
* Access the vector tile style layer associated with a graphic returned by hitTest().
|
|
36
|
+
* ```js
|
|
37
|
+
* import { isVectorTileGraphicOrigin } from "@arcgis/core/graphic/isVectorTileGraphicOrigin.js";
|
|
38
|
+
*
|
|
39
|
+
* viewElement.addEventListener("arcgisViewClick", async (event) => {
|
|
40
|
+
* // Get hit-test results from the VectorTileLayer at the clicked location
|
|
41
|
+
* const response = await view.hitTest(event.detail, { include: vectorTileLayer });
|
|
42
|
+
*
|
|
43
|
+
* for (const result of response.results) {
|
|
44
|
+
* // Only graphic results contain a graphic with origin information
|
|
45
|
+
* if (result.type !== "graphic") {
|
|
46
|
+
* continue;
|
|
47
|
+
* }
|
|
48
|
+
*
|
|
49
|
+
* const graphic = result.graphic;
|
|
50
|
+
* const origin = graphic.origin;
|
|
51
|
+
*
|
|
52
|
+
* // Check whether the graphic came from a VectorTileLayer
|
|
53
|
+
* if (isVectorTileGraphicOrigin(origin)) {
|
|
54
|
+
* // layerId identifies a style layer within the VectorTileLayer
|
|
55
|
+
* const styleLayer = origin.layer.getStyleLayer(origin.layerId);
|
|
56
|
+
* console.log(styleLayer);
|
|
57
|
+
* }
|
|
58
|
+
* }
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
32
61
|
*/
|
|
33
62
|
export default class VectorTileGraphicOrigin extends GraphicOrigin {
|
|
34
63
|
constructor(layer: VectorTileLayer, layerId: string, layerIndex: number);
|
|
@@ -6,9 +6,52 @@ import type VoxelLayer from "../layers/VoxelLayer.js";
|
|
|
6
6
|
* The [origin](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#origin) information may be available when a graphic is returned from methods such as
|
|
7
7
|
* [hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#hitTest).
|
|
8
8
|
*
|
|
9
|
+
* Before accessing the layer properties, use [isVoxelGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isVoxelGraphicOrigin/) to check
|
|
10
|
+
* whether the graphic's origin is a VoxelGraphicOrigin.
|
|
11
|
+
*
|
|
9
12
|
* @since 5.0
|
|
10
13
|
* @see [SceneView.hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#hitTest)
|
|
11
14
|
* @see [Scene component hitTest()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#hitTest)
|
|
15
|
+
* @example
|
|
16
|
+
* Access the layer and sublayer of a graphic that originated from a MapImageLayer.
|
|
17
|
+
* ```js
|
|
18
|
+
* import { isMapImageGraphicOrigin } from "@arcgis/core/graphic/isMapImageGraphicOrigin.js";
|
|
19
|
+
*
|
|
20
|
+
* const origin = graphic.origin;
|
|
21
|
+
*
|
|
22
|
+
* // Check whether the graphic came from a MapImageLayer
|
|
23
|
+
* if (isMapImageGraphicOrigin(origin)) {
|
|
24
|
+
* console.log(origin.layer.title);
|
|
25
|
+
* console.log(origin.sublayer.title);
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
* @example
|
|
29
|
+
* Access the vector tile style layer associated with a graphic returned by hitTest().
|
|
30
|
+
* ```js
|
|
31
|
+
* import { isVectorTileGraphicOrigin } from "@arcgis/core/graphic/isVectorTileGraphicOrigin.js";
|
|
32
|
+
*
|
|
33
|
+
* viewElement.addEventListener("arcgisViewClick", async (event) => {
|
|
34
|
+
* // Get hit-test results from the VectorTileLayer at the clicked location
|
|
35
|
+
* const response = await view.hitTest(event.detail, { include: vectorTileLayer });
|
|
36
|
+
*
|
|
37
|
+
* for (const result of response.results) {
|
|
38
|
+
* // Only graphic results contain a graphic with origin information
|
|
39
|
+
* if (result.type !== "graphic") {
|
|
40
|
+
* continue;
|
|
41
|
+
* }
|
|
42
|
+
*
|
|
43
|
+
* const graphic = result.graphic;
|
|
44
|
+
* const origin = graphic.origin;
|
|
45
|
+
*
|
|
46
|
+
* // Check whether the graphic came from a VectorTileLayer
|
|
47
|
+
* if (isVectorTileGraphicOrigin(origin)) {
|
|
48
|
+
* // layerId identifies a style layer within the VectorTileLayer
|
|
49
|
+
* const styleLayer = origin.layer.getStyleLayer(origin.layerId);
|
|
50
|
+
* console.log(styleLayer);
|
|
51
|
+
* }
|
|
52
|
+
* }
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
12
55
|
*/
|
|
13
56
|
export default class VoxelGraphicOrigin extends GraphicOrigin {
|
|
14
57
|
constructor(layer: VoxelLayer);
|
|
@@ -5,7 +5,50 @@ import type WCSLayer from "../layers/WCSLayer.js";
|
|
|
5
5
|
* Provides information about the [WCSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WCSLayer/) from which a graphic originates.
|
|
6
6
|
* You can access the graphic's origin through the graphic's [origin](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#origin) property.
|
|
7
7
|
*
|
|
8
|
+
* Before accessing the layer properties, use [isWCSGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isWCSGraphicOrigin/) to check
|
|
9
|
+
* whether the graphic's origin is a WCSGraphicOrigin.
|
|
10
|
+
*
|
|
8
11
|
* @since 5.0
|
|
12
|
+
* @example
|
|
13
|
+
* Access the layer and sublayer of a graphic that originated from a MapImageLayer.
|
|
14
|
+
* ```js
|
|
15
|
+
* import { isMapImageGraphicOrigin } from "@arcgis/core/graphic/isMapImageGraphicOrigin.js";
|
|
16
|
+
*
|
|
17
|
+
* const origin = graphic.origin;
|
|
18
|
+
*
|
|
19
|
+
* // Check whether the graphic came from a MapImageLayer
|
|
20
|
+
* if (isMapImageGraphicOrigin(origin)) {
|
|
21
|
+
* console.log(origin.layer.title);
|
|
22
|
+
* console.log(origin.sublayer.title);
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
* @example
|
|
26
|
+
* Access the vector tile style layer associated with a graphic returned by hitTest().
|
|
27
|
+
* ```js
|
|
28
|
+
* import { isVectorTileGraphicOrigin } from "@arcgis/core/graphic/isVectorTileGraphicOrigin.js";
|
|
29
|
+
*
|
|
30
|
+
* viewElement.addEventListener("arcgisViewClick", async (event) => {
|
|
31
|
+
* // Get hit-test results from the VectorTileLayer at the clicked location
|
|
32
|
+
* const response = await view.hitTest(event.detail, { include: vectorTileLayer });
|
|
33
|
+
*
|
|
34
|
+
* for (const result of response.results) {
|
|
35
|
+
* // Only graphic results contain a graphic with origin information
|
|
36
|
+
* if (result.type !== "graphic") {
|
|
37
|
+
* continue;
|
|
38
|
+
* }
|
|
39
|
+
*
|
|
40
|
+
* const graphic = result.graphic;
|
|
41
|
+
* const origin = graphic.origin;
|
|
42
|
+
*
|
|
43
|
+
* // Check whether the graphic came from a VectorTileLayer
|
|
44
|
+
* if (isVectorTileGraphicOrigin(origin)) {
|
|
45
|
+
* // layerId identifies a style layer within the VectorTileLayer
|
|
46
|
+
* const styleLayer = origin.layer.getStyleLayer(origin.layerId);
|
|
47
|
+
* console.log(styleLayer);
|
|
48
|
+
* }
|
|
49
|
+
* }
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
9
52
|
*/
|
|
10
53
|
export default class WCSGraphicOrigin extends GraphicOrigin {
|
|
11
54
|
constructor(layer: WCSLayer);
|
|
@@ -6,6 +6,9 @@ import type WFSLayer from "../layers/WFSLayer.js";
|
|
|
6
6
|
* The [origin](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#origin) information may be available when a graphic is returned from methods such as
|
|
7
7
|
* [hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest) or [queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/#queryFeatures).
|
|
8
8
|
*
|
|
9
|
+
* Before accessing the layer properties, use [isWFSGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isWFSGraphicOrigin/) to check
|
|
10
|
+
* whether the graphic's origin is a WFSGraphicOrigin.
|
|
11
|
+
*
|
|
9
12
|
* @since 5.0
|
|
10
13
|
* @see [MapView.hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest)
|
|
11
14
|
* @see [SceneView.hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#hitTest)
|
|
@@ -14,15 +17,45 @@ import type WFSLayer from "../layers/WFSLayer.js";
|
|
|
14
17
|
* @see [WFSLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/#queryFeatures)
|
|
15
18
|
* @see [WFSLayerView.queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/WFSLayerView/#queryFeatures)
|
|
16
19
|
* @example
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
20
|
+
* Access the layer and sublayer of a graphic that originated from a MapImageLayer.
|
|
21
|
+
* ```js
|
|
22
|
+
* import { isMapImageGraphicOrigin } from "@arcgis/core/graphic/isMapImageGraphicOrigin.js";
|
|
23
|
+
*
|
|
24
|
+
* const origin = graphic.origin;
|
|
25
|
+
*
|
|
26
|
+
* // Check whether the graphic came from a MapImageLayer
|
|
27
|
+
* if (isMapImageGraphicOrigin(origin)) {
|
|
28
|
+
* console.log(origin.layer.title);
|
|
29
|
+
* console.log(origin.sublayer.title);
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
* @example
|
|
33
|
+
* Access the vector tile style layer associated with a graphic returned by hitTest().
|
|
34
|
+
* ```js
|
|
35
|
+
* import { isVectorTileGraphicOrigin } from "@arcgis/core/graphic/isVectorTileGraphicOrigin.js";
|
|
36
|
+
*
|
|
37
|
+
* viewElement.addEventListener("arcgisViewClick", async (event) => {
|
|
38
|
+
* // Get hit-test results from the VectorTileLayer at the clicked location
|
|
39
|
+
* const response = await view.hitTest(event.detail, { include: vectorTileLayer });
|
|
40
|
+
*
|
|
41
|
+
* for (const result of response.results) {
|
|
42
|
+
* // Only graphic results contain a graphic with origin information
|
|
43
|
+
* if (result.type !== "graphic") {
|
|
44
|
+
* continue;
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* const graphic = result.graphic;
|
|
48
|
+
* const origin = graphic.origin;
|
|
49
|
+
*
|
|
50
|
+
* // Check whether the graphic came from a VectorTileLayer
|
|
51
|
+
* if (isVectorTileGraphicOrigin(origin)) {
|
|
52
|
+
* // layerId identifies a style layer within the VectorTileLayer
|
|
53
|
+
* const styleLayer = origin.layer.getStyleLayer(origin.layerId);
|
|
54
|
+
* console.log(styleLayer);
|
|
55
|
+
* }
|
|
56
|
+
* }
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
26
59
|
*/
|
|
27
60
|
export default class WFSGraphicOrigin extends GraphicOrigin {
|
|
28
61
|
constructor(layer: WFSLayer);
|
|
@@ -1,10 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides utility method for getting the title of the layer or sublayer a graphic came from.
|
|
3
|
+
*
|
|
4
|
+
* @since 5.2
|
|
5
|
+
*/
|
|
1
6
|
import type GraphicOrigin from "./GraphicOrigin.js";
|
|
2
7
|
|
|
3
8
|
/**
|
|
4
|
-
* Returns
|
|
9
|
+
* Returns a title that identifies the [origin](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#origin) of a graphic.
|
|
10
|
+
* Use the returned title to show users which layer or sublayer a graphic came from when displaying query or hitTest results.
|
|
11
|
+
*
|
|
12
|
+
* If the origin's sublayer has a `title` property, the function returns that value. Otherwise, it returns the origin's layer title if the layer has a `title` property.
|
|
13
|
+
* For example, for a graphic from a sublayer titled "Roads" in a layer titled "Transportation", the function returns "Roads".
|
|
5
14
|
*
|
|
6
|
-
* @param origin - The graphic
|
|
7
|
-
* @returns The
|
|
15
|
+
* @param origin - The origin information associated with a graphic. See [Graphic.origin](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#origin).
|
|
16
|
+
* @returns The sublayer's title if it has a `title` property, otherwise the layer's title
|
|
17
|
+
* if it has a `title` property, or `undefined` if neither has one.
|
|
8
18
|
* @since 5.2
|
|
19
|
+
* @example
|
|
20
|
+
* Get the origin title of a graphic returned by a hit test or query.
|
|
21
|
+
* ```js
|
|
22
|
+
* if (graphic.origin) {
|
|
23
|
+
* const title = getGraphicOriginTitle(graphic.origin);
|
|
24
|
+
* console.log(title);
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
9
27
|
*/
|
|
10
28
|
export function getGraphicOriginTitle(origin: GraphicOrigin): string | null | undefined;
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`5.2.0-next.
|
|
2
|
+
import"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`5.2.0-next.165`;let r;function i(e){r=e}function a(t){let n=r?.findCredential(t);return n?.token?e(t,`token`,n.token):t}globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}});export{a as addTokenParameter,n as fullVersion,r as id,i as setId,t as version};
|
|
@@ -63,12 +63,13 @@ export interface GaussianSplatLayerProperties extends LayerProperties, APIKeyMix
|
|
|
63
63
|
* Gaussian splats are optimized during a training process. When rendered together, Gaussian splats blend to form a smooth,
|
|
64
64
|
* photorealistic 3D representation.
|
|
65
65
|
*
|
|
66
|
-
* Unlike mesh-based
|
|
66
|
+
* Unlike mesh-based layers, which define surfaces through connected polygons, Gaussian Splat layers have no explicit surface representation. Depending on the source data and reconstruction, the resulting surface may contain minor outliers or holes. These artifacts are often not visually prominent, but can affect analytical tools. Analysis results reflect the underlying Gaussian Splat representation. As a result, surface noise or reconstruction artifacts that are subtle in the visualization may become more apparent and analysis boundaries may appear less sharply defined than in comparable results generated from integrated mesh layers.
|
|
67
67
|
*
|
|
68
68
|
* > [!WARNING]
|
|
69
69
|
* >
|
|
70
70
|
* > **Known Limitations**
|
|
71
71
|
* >
|
|
72
|
+
* > * Currently, Volume Measurement is not supported.
|
|
72
73
|
* > * When using the [Slice component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-slice/), the slice plane will, contrary to the behavior described in [`tiltEnabled`](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-slice/#tiltEnabled), not automatically align to the underlying surface of a Gaussian Splat layer due to the absence of surface normals.
|
|
73
74
|
* > * Gaussian splat layers are not guaranteed to always draw correctly in a local scene using WGS84 as spatial reference
|
|
74
75
|
* > (WKID 4326).
|
package/layers/GeoJSONLayer.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type FeatureTemplate from "./support/FeatureTemplate.js";
|
|
|
6
6
|
import type Field from "./support/Field.js";
|
|
7
7
|
import type FieldsIndex from "./support/FieldsIndex.js";
|
|
8
8
|
import type LabelClass from "./support/LabelClass.js";
|
|
9
|
-
import type TimeInfo from "./support/TimeInfo.js";
|
|
10
9
|
import type PortalItem from "../portal/PortalItem.js";
|
|
11
10
|
import type AttributeBinsFeatureSet from "../rest/support/AttributeBinsFeatureSet.js";
|
|
12
11
|
import type FeatureSet from "../rest/support/FeatureSet.js";
|
|
@@ -43,7 +42,6 @@ import type { TimeZone } from "../time/types.js";
|
|
|
43
42
|
import type { ObjectId } from "../views/types.js";
|
|
44
43
|
import type { TimeExtentProperties } from "../time/TimeExtent.js";
|
|
45
44
|
import type { TimeIntervalProperties } from "../time/TimeInterval.js";
|
|
46
|
-
import type { TimeInfoProperties } from "./support/TimeInfo.js";
|
|
47
45
|
import type { AttributeTableTemplateProperties } from "../tables/AttributeTableTemplate.js";
|
|
48
46
|
import type { ElevationInfoProperties } from "../symbols/support/ElevationInfo.js";
|
|
49
47
|
import type { FieldProperties } from "./support/Field.js";
|
|
@@ -400,58 +398,6 @@ export interface GeoJSONLayerProperties extends LayerProperties, PortalLayerProp
|
|
|
400
398
|
* });
|
|
401
399
|
*/
|
|
402
400
|
timeExtent?: TimeExtentProperties | null;
|
|
403
|
-
/**
|
|
404
|
-
* TimeInfo provides information such as date fields that store [start](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField)
|
|
405
|
-
* and [end](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#endField) time
|
|
406
|
-
* for each feature and the [TimeInfo.fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent)
|
|
407
|
-
* for the layer. The `timeInfo` property, along with its `startField` and `endField` properties, must be set at the
|
|
408
|
-
* time of layer initialization if it is being set for a [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/).
|
|
409
|
-
* The timeInfo parameters cannot be changed after the layer is [loaded](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/#loaded).
|
|
410
|
-
* The [TimeInfo.fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent) for `timeInfo` is
|
|
411
|
-
* automatically calculated based on its `startField` and `endField` properties.
|
|
412
|
-
*
|
|
413
|
-
* @since 4.11
|
|
414
|
-
* @example
|
|
415
|
-
* // create geojson layer from usgs earthquakes geojson feed
|
|
416
|
-
* const geojsonLayer = new GeoJSONLayer({
|
|
417
|
-
* url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson",
|
|
418
|
-
* copyright: "USGS Earthquakes",
|
|
419
|
-
* fields: [
|
|
420
|
-
* { "name": "mag", "type": "double" },
|
|
421
|
-
* { "name": "place", "type": "string" },
|
|
422
|
-
* { "name": "time", "type": "date" }, // date field
|
|
423
|
-
* { "name": "depth", "type": "double" }
|
|
424
|
-
* ],
|
|
425
|
-
* // timeInfo can be used to do temporal queries
|
|
426
|
-
* // set the startField.
|
|
427
|
-
* // timeExtent is automatically calculated from the start and end date fields
|
|
428
|
-
* // The date values must be in milliseconds number from the UNIX epoch specified in UTC.
|
|
429
|
-
* timeInfo: {
|
|
430
|
-
* startField: "time"
|
|
431
|
-
* }
|
|
432
|
-
* });
|
|
433
|
-
* @example
|
|
434
|
-
* // create geojson layer from usgs earthquakes geojson feed
|
|
435
|
-
* const geojsonLayer = new GeoJSONLayer({
|
|
436
|
-
* url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson",
|
|
437
|
-
* copyright: "USGS Earthquakes",
|
|
438
|
-
* fields: [
|
|
439
|
-
* { "name": "mag", "type": "double" },
|
|
440
|
-
* { "name": "place", "type": "string" },
|
|
441
|
-
* { "name": "time", "type": "date" }, // date field
|
|
442
|
-
* { "name": "depth", "type": "double" }
|
|
443
|
-
* ],
|
|
444
|
-
* // timeInfo can be used to do temporal queries
|
|
445
|
-
* // set the startField and endField.
|
|
446
|
-
* // timeExtent is automatically calculated from the
|
|
447
|
-
* // the start and end date fields
|
|
448
|
-
* // The date values must be in milliseconds number from the UNIX epoch specified in UTC.
|
|
449
|
-
* timeInfo: {
|
|
450
|
-
* startField: "time"
|
|
451
|
-
* }
|
|
452
|
-
* });
|
|
453
|
-
*/
|
|
454
|
-
timeInfo?: TimeInfoProperties | null;
|
|
455
401
|
/**
|
|
456
402
|
* A temporary offset of the time data based on a certain [TimeInterval](https://developers.arcgis.com/javascript/latest/references/core/time/TimeInterval/). This allows
|
|
457
403
|
* users to overlay features from two or more time-aware layers with different time extents.
|
|
@@ -484,6 +430,7 @@ export interface GeoJSONLayerProperties extends LayerProperties, PortalLayerProp
|
|
|
484
430
|
* }
|
|
485
431
|
* }
|
|
486
432
|
* });
|
|
433
|
+
* @see [Sample - Time Bar with actions and layer timeOffset](https://developers.arcgis.com/javascript/latest/sample-code/time-bar-time-offset/)
|
|
487
434
|
* @example
|
|
488
435
|
* // Offset a CSV Layer containing hurricanes from 2015 so that they appear in 2019 (+4 years).
|
|
489
436
|
* let layer = new CSVLayer({
|
|
@@ -1214,59 +1161,6 @@ export default class GeoJSONLayer extends GeoJSONLayerSuperclass {
|
|
|
1214
1161
|
*/
|
|
1215
1162
|
get timeExtent(): TimeExtent | null | undefined;
|
|
1216
1163
|
set timeExtent(value: TimeExtentProperties | null | undefined);
|
|
1217
|
-
/**
|
|
1218
|
-
* TimeInfo provides information such as date fields that store [start](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField)
|
|
1219
|
-
* and [end](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#endField) time
|
|
1220
|
-
* for each feature and the [TimeInfo.fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent)
|
|
1221
|
-
* for the layer. The `timeInfo` property, along with its `startField` and `endField` properties, must be set at the
|
|
1222
|
-
* time of layer initialization if it is being set for a [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/).
|
|
1223
|
-
* The timeInfo parameters cannot be changed after the layer is [loaded](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/#loaded).
|
|
1224
|
-
* The [TimeInfo.fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent) for `timeInfo` is
|
|
1225
|
-
* automatically calculated based on its `startField` and `endField` properties.
|
|
1226
|
-
*
|
|
1227
|
-
* @since 4.11
|
|
1228
|
-
* @example
|
|
1229
|
-
* // create geojson layer from usgs earthquakes geojson feed
|
|
1230
|
-
* const geojsonLayer = new GeoJSONLayer({
|
|
1231
|
-
* url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson",
|
|
1232
|
-
* copyright: "USGS Earthquakes",
|
|
1233
|
-
* fields: [
|
|
1234
|
-
* { "name": "mag", "type": "double" },
|
|
1235
|
-
* { "name": "place", "type": "string" },
|
|
1236
|
-
* { "name": "time", "type": "date" }, // date field
|
|
1237
|
-
* { "name": "depth", "type": "double" }
|
|
1238
|
-
* ],
|
|
1239
|
-
* // timeInfo can be used to do temporal queries
|
|
1240
|
-
* // set the startField.
|
|
1241
|
-
* // timeExtent is automatically calculated from the start and end date fields
|
|
1242
|
-
* // The date values must be in milliseconds number from the UNIX epoch specified in UTC.
|
|
1243
|
-
* timeInfo: {
|
|
1244
|
-
* startField: "time"
|
|
1245
|
-
* }
|
|
1246
|
-
* });
|
|
1247
|
-
* @example
|
|
1248
|
-
* // create geojson layer from usgs earthquakes geojson feed
|
|
1249
|
-
* const geojsonLayer = new GeoJSONLayer({
|
|
1250
|
-
* url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson",
|
|
1251
|
-
* copyright: "USGS Earthquakes",
|
|
1252
|
-
* fields: [
|
|
1253
|
-
* { "name": "mag", "type": "double" },
|
|
1254
|
-
* { "name": "place", "type": "string" },
|
|
1255
|
-
* { "name": "time", "type": "date" }, // date field
|
|
1256
|
-
* { "name": "depth", "type": "double" }
|
|
1257
|
-
* ],
|
|
1258
|
-
* // timeInfo can be used to do temporal queries
|
|
1259
|
-
* // set the startField and endField.
|
|
1260
|
-
* // timeExtent is automatically calculated from the
|
|
1261
|
-
* // the start and end date fields
|
|
1262
|
-
* // The date values must be in milliseconds number from the UNIX epoch specified in UTC.
|
|
1263
|
-
* timeInfo: {
|
|
1264
|
-
* startField: "time"
|
|
1265
|
-
* }
|
|
1266
|
-
* });
|
|
1267
|
-
*/
|
|
1268
|
-
get timeInfo(): TimeInfo | null | undefined;
|
|
1269
|
-
set timeInfo(value: TimeInfoProperties | null | undefined);
|
|
1270
1164
|
/**
|
|
1271
1165
|
* A temporary offset of the time data based on a certain [TimeInterval](https://developers.arcgis.com/javascript/latest/references/core/time/TimeInterval/). This allows
|
|
1272
1166
|
* users to overlay features from two or more time-aware layers with different time extents.
|
|
@@ -1299,6 +1193,7 @@ export default class GeoJSONLayer extends GeoJSONLayerSuperclass {
|
|
|
1299
1193
|
* }
|
|
1300
1194
|
* }
|
|
1301
1195
|
* });
|
|
1196
|
+
* @see [Sample - Time Bar with actions and layer timeOffset](https://developers.arcgis.com/javascript/latest/sample-code/time-bar-time-offset/)
|
|
1302
1197
|
* @example
|
|
1303
1198
|
* // Offset a CSV Layer containing hurricanes from 2015 so that they appear in 2019 (+4 years).
|
|
1304
1199
|
* let layer = new CSVLayer({
|
package/layers/ParquetLayer.d.ts
CHANGED
|
@@ -6,13 +6,14 @@ import type Layer from "./Layer.js";
|
|
|
6
6
|
import type Field from "./support/Field.js";
|
|
7
7
|
import type FieldsIndex from "./support/FieldsIndex.js";
|
|
8
8
|
import type LabelClass from "./support/LabelClass.js";
|
|
9
|
+
import type PortalItem from "../portal/PortalItem.js";
|
|
9
10
|
import type FeatureSet from "../rest/support/FeatureSet.js";
|
|
10
11
|
import type Query from "../rest/support/Query.js";
|
|
11
12
|
import type { ClonableMixin } from "../core/Clonable.js";
|
|
12
13
|
import type { MultiOriginJSONSupportMixin } from "../core/MultiOriginJSONSupport.js";
|
|
13
14
|
import type { AbortOptions } from "../core/promiseUtils.js";
|
|
14
15
|
import type { LayerEvents, LayerProperties } from "./Layer.js";
|
|
15
|
-
import type { FeatureLayerCapabilities, FieldDomainOptions } from "./types.js";
|
|
16
|
+
import type { FeatureLayerCapabilities, FieldDomainOptions, LayerSaveAsOptions, LayerSaveOptions } from "./types.js";
|
|
16
17
|
import type { BlendLayer, BlendLayerProperties } from "./mixins/BlendLayer.js";
|
|
17
18
|
import type { CustomParametersMixin, CustomParametersMixinProperties } from "./mixins/CustomParametersMixin.js";
|
|
18
19
|
import type { DataSeriesLayer, DataSeriesLayerProperties } from "./mixins/DataSeriesLayer.js";
|
|
@@ -25,6 +26,7 @@ import type { RefreshableLayer, RefreshableLayerEvents, RefreshEvent, Refreshabl
|
|
|
25
26
|
import type { ScaleRangeLayer, ScaleRangeLayerProperties } from "./mixins/ScaleRangeLayer.js";
|
|
26
27
|
import type { ParquetGeometryType } from "./support/parquetUtils.js";
|
|
27
28
|
import type { DomainUnion, ParquetDataUnion, ParquetGeometryEncodingUnion } from "./support/types.js";
|
|
29
|
+
import type { PortalItemProperties } from "../portal/PortalItem.js";
|
|
28
30
|
import type { RendererUnion } from "../renderers/types.js";
|
|
29
31
|
import type { QueryProperties } from "../rest/support/Query.js";
|
|
30
32
|
import type { CreatePopupTemplateOptions } from "../support/popupUtils.js";
|
|
@@ -1004,5 +1006,26 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
|
|
|
1004
1006
|
* @see [refresh event](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#event-refresh)
|
|
1005
1007
|
*/
|
|
1006
1008
|
refresh(): void;
|
|
1009
|
+
/**
|
|
1010
|
+
* Saves the layer to its existing portal item in the [Portal](https://developers.arcgis.com/javascript/latest/references/core/portal/Portal/) authenticated within the user's current session. If the layer is not saved to a [PortalItem](https://developers.arcgis.com/javascript/latest/references/core/portal/PortalItem/), then you should use [saveAs()](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#saveAs).
|
|
1011
|
+
*
|
|
1012
|
+
* @param options - Various options for saving the layer.
|
|
1013
|
+
* @returns When resolved, returns the portal item to which the layer is saved.
|
|
1014
|
+
* @since 5.2
|
|
1015
|
+
* @example const portalItem = await layer.save();
|
|
1016
|
+
*/
|
|
1017
|
+
save(options?: LayerSaveOptions): Promise<PortalItem>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Saves the layer to a new portal item in the [Portal](https://developers.arcgis.com/javascript/latest/references/core/portal/Portal/) authenticated within the user's current session.
|
|
1020
|
+
*
|
|
1021
|
+
* @param portalItem - The portal item to which the layer will be saved.
|
|
1022
|
+
* @param options - Various options for saving the layer.
|
|
1023
|
+
* @returns When resolved, returns the portal item to which the layer is saved.
|
|
1024
|
+
* @since 5.2
|
|
1025
|
+
* @example
|
|
1026
|
+
* const portalItem = new PortalItem();
|
|
1027
|
+
* await layer.saveAs(portalItem);
|
|
1028
|
+
*/
|
|
1029
|
+
saveAs(portalItem: PortalItemProperties, options?: LayerSaveAsOptions): Promise<PortalItem>;
|
|
1007
1030
|
}
|
|
1008
1031
|
declare const ParquetLayerSuperclass: typeof Layer & typeof ClonableMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof PortalLayer & typeof OperationalLayer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof DataSeriesLayer & typeof OrderedLayer & typeof BlendLayer & typeof FeatureEffectLayer & typeof FeatureReductionLayer
|
package/layers/ParquetLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as n}from"../core/Clonable.js";import r from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import a from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONSupportMixin as ee}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as s}from"../core/object.js";import{throwIfAbortError as c}from"../core/promiseUtils.js";import{on as l}from"../core/reactiveUtils.js";import{getFilename as u}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{reader as f}from"../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../core/accessorSupport/decorators/writer.js";import{createTypeReader as h}from"../core/accessorSupport/extensions/serializableProperty/reader.js";import g from"../geometry/Extent.js";import _ from"../geometry/SpatialReference.js";import v from"../graphic/ParquetGraphicOrigin.js";import y from"./Layer.js";import{ParquetSource as b}from"./graphics/sources/ParquetSource.js";import{BlendLayer as x}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{DataSeriesLayer as C}from"./mixins/DataSeriesLayer.js";import{FeatureEffectLayer as w}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as T}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as E}from"./mixins/OperationalLayer.js";import{OrderedLayer as D}from"./mixins/OrderedLayer.js";import{PortalLayer as O}from"./mixins/PortalLayer.js";import{RefreshableLayer as k}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as A}from"./mixins/ScaleRangeLayer.js";import{labelsVisible as j,legendEnabled as M,popupEnabled as N}from"./support/commonProperties.js";import te from"./support/FeatureTemplate.js";import P from"./support/Field.js";import{defineFieldProperties as F}from"./support/fieldProperties.js";import{fixRendererFields as I}from"./support/fieldUtils.js";import L from"./support/GeometryEncodingLocation.js";import R from"./support/GeometryEncodingWkb.js";import z from"./support/LabelClass.js";import{reader as B}from"./support/labelingInfo.js";import V from"./support/ParquetFilesData.js";import{parquetGeometryTypeKebabDict as H}from"./support/parquetUtils.js";import U from"./support/PortalItemData.js";import{rendererTypes as W}from"../renderers/support/typeUtils.js";import G from"../rest/support/Query.js";import{createPopupTemplate as K}from"../support/popupUtils.js";import{utc as q}from"../time/constants.js";const J=F(),Y=`__OBJECTID`,X={key:`type`,base:null,typeMap:{files:V,"portal-item":U},errorContext:`parquet-data`},Z=h({types:X}),Q={types:{key:`type`,base:null,typeMap:{wkb:R,location:L}},json:{name:`layerDefinition.geometryEncoding`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`geometryEncoding`}}}}};let $=class extends T(w(x(D(C(A(k(E(O(ee(S(n(y)))))))))))){constructor(e){super(e),this._emptyUrls=new r,this.charts=null,this.copyright=null,this.definitionExpression=null,this.returnM=void 0,this.returnZ=void 0,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new v(this),this.hasM=!1,this.hasZ=!1,this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=Y,this.operationalLayerType=`ParquetLayer`,this.outFields=null,this.persistenceEnabled=!!has(`parquetlayer-persistence-enabled`),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type=`parquet`,this.data=null}initialize(){this.addHandles(l(()=>this.source,`source-changed`,()=>{this.emit(`refresh`,{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){let t=this.loadFromPortal({supportedTypes:[`Parquet Feature Layer`],supportsData:!0},e).catch(c).then(()=>this._load(e));return this.addResolvingPromise(t),this}get capabilities(){return this.source?.capabilities}get dateFieldsTimeZone(){return q}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,n,r){let i=e.filter(e=>e.name!==Y||e.type!==`oid`).map(e=>e.toJSON(r));s(n,i,t)}get isTable(){return this.geometryEncoding==null&&this.displayOptimization==null}set renderer(e){I(e,this.fieldsIndex),this._set(`renderer`,e)}get title(){let e=this._get(`title`);if(e&&this.originOf(`title`)!==`defaults`)return e;switch(this.data?.type){case`files`:{let t=this.data.urls?.at(0);e=t?u(t,[`parquet`]):null;break}case`portal-item`:e=this.data.portalItem?.title}return e||`Parquet`}set title(e){this._set(`title`,e)}readData(e,t,n){if(!(`itemId`in t&&t.itemId))return Z(e,t,n)}writeData(e,t,n,r){if(!e)return;if(e.type===`portal-item`&&e.portalItem?.type!==`Parquet Feature Layer`){r.messages?.push(new a(`parquet-layer:unsupported-data`,`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));return}let i=e.write({},r);i&&(t.source=i)}get urls(){return this.data?.type===`files`?this.data.urls:this._emptyUrls}set urls(e){i(o.getLogger(this),`urls`,{replacement:`data`,version:`5.1`,warnOnce:!0}),this.data=new V({urls:this._normalizeUrls(e)})}refresh(e){super.refresh(e)}createPopupTemplate(e){return K(this,e)}createQuery(){let e=new G;return e.returnGeometry=!0,e.outFields=[`*`],e.where=this.definitionExpression||`1=1`,e}async createSource(e){let t=new b({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();let n=await this.source.queryFeatures(this._normalizeQuery(e),t),r=this.graphicOrigin;if(n?.features)for(let e of n.features)e.layer=e.sourceLayer=this,e.origin=r;return n}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}async hasDataChanged(){if(this.data?.type===`portal-item`){let e=this.data.portalItem,t=e.modified?.getTime();if(await e.reload(),t===e.modified?.getTime())return!1}return await this.source.reload(null),!0}_normalizeQuery(e){return G.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new r(e):e??new r}async _load(e){this.portalItem?.url&&(this.data=new U({portalItem:this.portalItem.clone()})),this.data?.type===`portal-item`&&await this.data.portalItem.load();let t=await this.createSource(e);this._set(`source`,t),this.read(t.sourceJSON,{origin:`service`}),[`fields`].forEach(e=>this.revertToOrigin(e,`service`)),I(this.renderer,this.fieldsIndex),this.spatialReference??=_.WGS84}};e([d({readOnly:!0,json:{read:!1,write:!1}})],$.prototype,`capabilities`,null),e([d({json:{origins:{"web-scene":{write:!1}},write:!0}})],$.prototype,`charts`,void 0),e([d({type:String})],$.prototype,`copyright`,void 0),e([d({readOnly:!0})],$.prototype,`dateFieldsTimeZone`,null),e([d({readOnly:!0})],$.prototype,`defaultPopupTemplate`,null),e([d({type:String,json:{name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],$.prototype,`definitionExpression`,void 0),e([d({type:Boolean})],$.prototype,`returnM`,void 0),e([d({type:Boolean})],$.prototype,`returnZ`,void 0),e([d()],$.prototype,`displayOptimization`,void 0),e([d({type:[P],json:{name:`layerDefinition.fields`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:`fields`}}}})],$.prototype,`fields`,void 0),e([m(`fields`)],$.prototype,`writeFields`,null),e([d(J.fieldsIndex)],$.prototype,`fieldsIndex`,void 0),e([d(Q)],$.prototype,`geometryEncoding`,void 0),e([d({type:g,json:{name:`extent`}})],$.prototype,`fullExtent`,void 0),e([d({type:H.apiValues,json:{name:`layerDefinition.geometryType`,read:{reader:H.read},write:{writer:H.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`geometryType`,reader:H.read}}}}})],$.prototype,`geometryType`,void 0),e([d({readOnly:!0,clonable:!1})],$.prototype,`graphicOrigin`,void 0),e([d({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],$.prototype,`hasM`,void 0),e([d({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],$.prototype,`hasZ`,void 0),e([d(j)],$.prototype,`labelsVisible`,void 0),e([d({type:[z],json:{name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:B},write:!0}})],$.prototype,`labelingInfo`,void 0),e([d(M)],$.prototype,`legendEnabled`,void 0),e([d()],$.prototype,`file`,void 0),e([d({type:String,readOnly:!0})],$.prototype,`objectIdField`,void 0),e([d({type:[`ParquetLayer`]})],$.prototype,`operationalLayerType`,void 0),e([d(J.outFields)],$.prototype,`outFields`,void 0),e([d(N)],$.prototype,`popupEnabled`,void 0),e([d({type:t,json:{name:`popupInfo`,write:!0}})],$.prototype,`popupTemplate`,void 0),e([d({types:W,json:{name:`layerDefinition.drawingInfo.renderer`,write:!0,origins:{service:{read:{source:`drawingInfo.renderer`}}}}})],$.prototype,`renderer`,null),e([d({type:b,readOnly:!0,cast:null,json:{read:!1}})],$.prototype,`source`,void 0),e([d({type:_,json:{name:`layerDefinition.spatialReference`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`extent.spatialReference`}}}}})],$.prototype,`spatialReference`,void 0),e([d({type:[te]})],$.prototype,`templates`,void 0),e([d()],$.prototype,`title`,null),e([d({json:{read:!1},readOnly:!0})],$.prototype,`type`,void 0),e([d({types:X,json:{name:`source`,origins:{"web-map":{read:{source:`source`},write:{target:`source`,ignoreOrigin:!0}}}}})],$.prototype,`data`,void 0),e([f(`web-map`,`data`)],$.prototype,`readData`,null),e([m(`web-map`,`data`)],$.prototype,`writeData`,null),e([d({type:r.ofType(String),json:{read:!1,write:!1}})],$.prototype,`urls`,null),$=e([p(`esri.layers.ParquetLayer`)],$);export{$ as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as n}from"../core/Clonable.js";import r from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import a from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONSupportMixin as ee}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as s}from"../core/object.js";import{debounce as c,throwIfAbortError as l}from"../core/promiseUtils.js";import{on as u}from"../core/reactiveUtils.js";import{getFilename as d}from"../core/urlUtils.js";import{property as f}from"../core/accessorSupport/decorators/property.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{writer as h}from"../core/accessorSupport/decorators/writer.js";import{createTypeReader as g}from"../core/accessorSupport/extensions/serializableProperty/reader.js";import _ from"../geometry/Extent.js";import v from"../geometry/SpatialReference.js";import te from"../graphic/ParquetGraphicOrigin.js";import y from"./Layer.js";import{ParquetSource as b}from"./graphics/sources/ParquetSource.js";import{BlendLayer as x}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{DataSeriesLayer as C}from"./mixins/DataSeriesLayer.js";import{FeatureEffectLayer as w}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as T}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as E}from"./mixins/OperationalLayer.js";import{OrderedLayer as D}from"./mixins/OrderedLayer.js";import{PortalLayer as O}from"./mixins/PortalLayer.js";import{RefreshableLayer as k}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as A}from"./mixins/ScaleRangeLayer.js";import{labelsVisible as j,legendEnabled as M,popupEnabled as N}from"./support/commonProperties.js";import P from"./support/FeatureTemplate.js";import ne from"./support/Field.js";import{defineFieldProperties as F}from"./support/fieldProperties.js";import{fixRendererFields as I}from"./support/fieldUtils.js";import L from"./support/GeometryEncodingLocation.js";import R from"./support/GeometryEncodingWkb.js";import z from"./support/LabelClass.js";import{reader as B}from"./support/labelingInfo.js";import V from"./support/ParquetFilesData.js";import{parquetGeometryTypeKebabDict as H}from"./support/parquetUtils.js";import U from"./support/PortalItemData.js";import{rendererTypes as W}from"../renderers/support/typeUtils.js";import G from"../rest/support/Query.js";import{createPopupTemplate as K}from"../support/popupUtils.js";import{utc as q}from"../time/constants.js";const J=`Parquet Feature Layer`,Y=F(),X=`__OBJECTID`,Z={key:`type`,base:null,typeMap:{files:V,"portal-item":U},errorContext:`parquet-data`},re=g({types:Z}),ie={types:{key:`type`,base:null,typeMap:{wkb:R,location:L}},json:{name:`layerDefinition.geometryEncoding`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`geometryEncoding`}}}}};function Q(e){return!!(e?.type===J&&e.url)}let $=class extends T(w(x(D(C(A(k(E(O(ee(S(n(y)))))))))))){constructor(e){super(e),this._emptyUrls=new r,this.charts=null,this.copyright=null,this.definitionExpression=null,this.returnM=void 0,this.returnZ=void 0,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new te(this),this.hasM=!1,this.hasZ=!1,this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=X,this.operationalLayerType=`ParquetLayer`,this.outFields=null,this.persistenceEnabled=!!has(`parquetlayer-persistence-enabled`),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type=`parquet`,this.data=null,this._debouncedSaveOperations=c(async(e,t,n)=>{let{save:r,saveAs:i}=await import(`./save/parquetLayerUtils.js`);switch(e){case 0:return r(this,t);case 1:return i(this,n,t)}})}initialize(){this.addHandles(u(()=>this.source,`source-changed`,()=>{this.emit(`refresh`,{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){let t=this.loadFromPortal({supportedTypes:[J],supportsData:!0},e).catch(l).then(()=>this._load(e));return this.addResolvingPromise(t),this}get capabilities(){return this.source?.capabilities}get dateFieldsTimeZone(){return q}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,n,r){let i=e.filter(e=>e.name!==X||e.type!==`oid`).map(e=>e.toJSON(r));s(n,i,t)}get isTable(){return this.geometryEncoding==null&&this.displayOptimization==null}set renderer(e){I(e,this.fieldsIndex),this._set(`renderer`,e)}get title(){let e=this._get(`title`);if(e&&this.originOf(`title`)!==`defaults`)return e;switch(this.data?.type){case`files`:{let t=this.data.urls?.at(0);e=t?d(t,[`parquet`]):null;break}case`portal-item`:e=this.data.portalItem?.title}return e||`Parquet`}set title(e){this._set(`title`,e)}readData(e,t,n){if(!(`itemId`in t&&t.itemId))return re(e,t,n)}writeData(e,t,n,r){if(!e)return;if(e.type===`portal-item`&&e.portalItem?.type!==J){r.messages?.push(new a(`parquet-layer:unsupported-data`,`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));return}let i=e.write({},r);i&&(t.source=i)}get urls(){return this.data?.type===`files`?this.data.urls:this._emptyUrls}set urls(e){i(o.getLogger(this),`urls`,{replacement:`data`,version:`5.1`,warnOnce:!0}),this.data=new V({urls:this._normalizeUrls(e)})}refresh(e){super.refresh(e)}createPopupTemplate(e){return K(this,e)}createQuery(){let e=new G;return e.returnGeometry=!0,e.outFields=[`*`],e.where=this.definitionExpression||`1=1`,e}async createSource(e){let t=new b({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();let n=await this.source.queryFeatures(this._normalizeQuery(e),t),r=this.graphicOrigin;if(n?.features)for(let e of n.features)e.layer=e.sourceLayer=this,e.origin=r;return n}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async hasDataChanged(){if(this.data?.type===`portal-item`){let e=this.data.portalItem,t=e.modified?.getTime();if(await e.reload(),t===e.modified?.getTime())return!1}return await this.source.reload(null),!0}_normalizeQuery(e){return G.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new r(e):e??new r}async _load(e){Q(this.portalItem)&&(this.data=new U({portalItem:this.portalItem.clone()})),this.data?.type===`portal-item`&&await this.data.portalItem.load();let t=await this.createSource(e);this._set(`source`,t),this.read(t.sourceJSON,{origin:`service`}),[`fields`].forEach(e=>this.revertToOrigin(e,`service`)),I(this.renderer,this.fieldsIndex),this.spatialReference??=v.WGS84}};e([f({readOnly:!0,json:{read:!1,write:!1}})],$.prototype,`capabilities`,null),e([f({json:{origins:{"web-scene":{write:!1}},write:!0}})],$.prototype,`charts`,void 0),e([f({type:String})],$.prototype,`copyright`,void 0),e([f({readOnly:!0})],$.prototype,`dateFieldsTimeZone`,null),e([f({readOnly:!0})],$.prototype,`defaultPopupTemplate`,null),e([f({type:String,json:{name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],$.prototype,`definitionExpression`,void 0),e([f({type:Boolean})],$.prototype,`returnM`,void 0),e([f({type:Boolean})],$.prototype,`returnZ`,void 0),e([f()],$.prototype,`displayOptimization`,void 0),e([f({type:[ne],json:{name:`layerDefinition.fields`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:`fields`}}}})],$.prototype,`fields`,void 0),e([h(`fields`)],$.prototype,`writeFields`,null),e([f(Y.fieldsIndex)],$.prototype,`fieldsIndex`,void 0),e([f(ie)],$.prototype,`geometryEncoding`,void 0),e([f({type:_,json:{name:`extent`}})],$.prototype,`fullExtent`,void 0),e([f({type:H.apiValues,json:{name:`layerDefinition.geometryType`,read:{reader:H.read},write:{writer:H.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`geometryType`,reader:H.read}}}}})],$.prototype,`geometryType`,void 0),e([f({readOnly:!0,clonable:!1})],$.prototype,`graphicOrigin`,void 0),e([f({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],$.prototype,`hasM`,void 0),e([f({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],$.prototype,`hasZ`,void 0),e([f(j)],$.prototype,`labelsVisible`,void 0),e([f({type:[z],json:{name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:B},write:!0}})],$.prototype,`labelingInfo`,void 0),e([f(M)],$.prototype,`legendEnabled`,void 0),e([f({type:[`show`,`hide`],json:{origins:{"portal-item":{read:!1,write:!1}}}})],$.prototype,`listMode`,void 0),e([f()],$.prototype,`file`,void 0),e([f({type:String,readOnly:!0})],$.prototype,`objectIdField`,void 0),e([f({type:[`ParquetLayer`],json:{origins:{"portal-item":{name:`layerType`,write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}}})],$.prototype,`operationalLayerType`,void 0),e([f(Y.outFields)],$.prototype,`outFields`,void 0),e([f(N)],$.prototype,`popupEnabled`,void 0),e([f({type:t,json:{name:`popupInfo`,write:!0}})],$.prototype,`popupTemplate`,void 0),e([f({types:W,json:{name:`layerDefinition.drawingInfo.renderer`,write:{overridePolicy(e,t){return{enabled:!0,ignoreOrigin:this.originIdOf(t)<3}}},origins:{service:{read:{source:`drawingInfo.renderer`}}}}})],$.prototype,`renderer`,null),e([f({type:b,readOnly:!0,cast:null,json:{read:!1}})],$.prototype,`source`,void 0),e([f({type:v,json:{name:`layerDefinition.spatialReference`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`extent.spatialReference`}}}}})],$.prototype,`spatialReference`,void 0),e([f({type:[P]})],$.prototype,`templates`,void 0),e([f()],$.prototype,`title`,null),e([f({json:{read:!1},readOnly:!0})],$.prototype,`type`,void 0),e([f({types:Z,json:{name:`source`,write:{ignoreOrigin:!0,overridePolicy(e,t,n){let r=e?.type===`portal-item`&&Q(e.portalItem)?e.portalItem:null;return{enabled:r?.id==null||r.id!==n?.portalItem?.id,ignoreOrigin:!0}}}}})],$.prototype,`data`,void 0),e([p(`data`)],$.prototype,`readData`,null),e([h(`data`)],$.prototype,`writeData`,null),e([f({type:r.ofType(String),json:{read:!1,write:!1}})],$.prototype,`urls`,null),$=e([m(`esri.layers.ParquetLayer`)],$);export{$ as default};
|