@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 [MapImageLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MapImageLayer/) from which a graphic originates.
|
|
7
|
-
*
|
|
7
|
+
* The [layer](https://developers.arcgis.com/javascript/latest/references/core/graphic/MapImageGraphicOrigin/#layer) property references the MapImageLayer, and the
|
|
8
|
+
* [sublayer](https://developers.arcgis.com/javascript/latest/references/core/graphic/MapImageGraphicOrigin/#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 [isMapImageGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isMapImageGraphicOrigin/) to check
|
|
12
|
+
* whether the graphic's origin is a MapImageGraphicOrigin.
|
|
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 MapImageGraphicOrigin extends GraphicOrigin {
|
|
13
61
|
constructor(layer: MapImageLayer, sublayer: Sublayer);
|
|
@@ -4,13 +4,60 @@ import type MapNotesLayer from "../layers/MapNotesLayer.js";
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Provides information about the [MapNotesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MapNotesLayer/) from which a graphic originates.
|
|
7
|
-
*
|
|
7
|
+
* The [layer](https://developers.arcgis.com/javascript/latest/references/core/graphic/MapNotesGraphicOrigin/#layer) property references the MapNotesLayer, and the
|
|
8
|
+
* [sublayer](https://developers.arcgis.com/javascript/latest/references/core/graphic/MapNotesGraphicOrigin/#sublayer) property references the child [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/) that contains the graphic.
|
|
8
9
|
* 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
|
|
9
10
|
* [hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest).
|
|
10
11
|
*
|
|
12
|
+
* Before accessing the layer properties, use [isMapNotesGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isMapNotesGraphicOrigin/) to check
|
|
13
|
+
* whether the graphic's origin is a MapNotesGraphicOrigin.
|
|
14
|
+
*
|
|
15
|
+
* If you only need the title of the child GraphicsLayer, use [getGraphicOriginTitle](https://developers.arcgis.com/javascript/latest/references/core/graphic/getGraphicOriginTitle/).
|
|
16
|
+
* 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.
|
|
17
|
+
*
|
|
11
18
|
* @since 5.0
|
|
12
19
|
* @see [MapView.hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest)
|
|
13
20
|
* @see [Map component hitTest()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#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
|
+
* ```
|
|
14
61
|
*/
|
|
15
62
|
export default class MapNotesGraphicOrigin extends GraphicOrigin {
|
|
16
63
|
constructor(layer: MapNotesLayer, sublayer: GraphicsLayer);
|
|
@@ -6,6 +6,9 @@ import type OGCFeatureLayer from "../layers/OGCFeatureLayer.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/views/layers/OGCFeatureLayerView/#queryFeatures).
|
|
8
8
|
*
|
|
9
|
+
* Before accessing the layer properties, use [isOGCFeatureGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isOGCFeatureGraphicOrigin/) to check
|
|
10
|
+
* whether the graphic's origin is an OGCFeatureGraphicOrigin.
|
|
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)
|
|
@@ -13,15 +16,45 @@ import type OGCFeatureLayer from "../layers/OGCFeatureLayer.js";
|
|
|
13
16
|
* @see [Scene component hitTest()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#hitTest)
|
|
14
17
|
* @see [OGCFeatureLayerView.queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/OGCFeatureLayerView/#queryFeatures)
|
|
15
18
|
* @example
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
19
|
+
* Access the layer and sublayer of a graphic that originated from a MapImageLayer.
|
|
20
|
+
* ```js
|
|
21
|
+
* import { isMapImageGraphicOrigin } from "@arcgis/core/graphic/isMapImageGraphicOrigin.js";
|
|
22
|
+
*
|
|
23
|
+
* const origin = graphic.origin;
|
|
24
|
+
*
|
|
25
|
+
* // Check whether the graphic came from a MapImageLayer
|
|
26
|
+
* if (isMapImageGraphicOrigin(origin)) {
|
|
27
|
+
* console.log(origin.layer.title);
|
|
28
|
+
* console.log(origin.sublayer.title);
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
* @example
|
|
32
|
+
* Access the vector tile style layer associated with a graphic returned by hitTest().
|
|
33
|
+
* ```js
|
|
34
|
+
* import { isVectorTileGraphicOrigin } from "@arcgis/core/graphic/isVectorTileGraphicOrigin.js";
|
|
35
|
+
*
|
|
36
|
+
* viewElement.addEventListener("arcgisViewClick", async (event) => {
|
|
37
|
+
* // Get hit-test results from the VectorTileLayer at the clicked location
|
|
38
|
+
* const response = await view.hitTest(event.detail, { include: vectorTileLayer });
|
|
39
|
+
*
|
|
40
|
+
* for (const result of response.results) {
|
|
41
|
+
* // Only graphic results contain a graphic with origin information
|
|
42
|
+
* if (result.type !== "graphic") {
|
|
43
|
+
* continue;
|
|
44
|
+
* }
|
|
45
|
+
*
|
|
46
|
+
* const graphic = result.graphic;
|
|
47
|
+
* const origin = graphic.origin;
|
|
48
|
+
*
|
|
49
|
+
* // Check whether the graphic came from a VectorTileLayer
|
|
50
|
+
* if (isVectorTileGraphicOrigin(origin)) {
|
|
51
|
+
* // layerId identifies a style layer within the VectorTileLayer
|
|
52
|
+
* const styleLayer = origin.layer.getStyleLayer(origin.layerId);
|
|
53
|
+
* console.log(styleLayer);
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
25
58
|
*/
|
|
26
59
|
export default class OGCFeatureGraphicOrigin extends GraphicOrigin {
|
|
27
60
|
constructor(layer: OGCFeatureLayer);
|
|
@@ -6,6 +6,9 @@ import type OrientedImageryLayer from "../layers/OrientedImageryLayer.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/OrientedImageryLayer/#queryFeatures).
|
|
8
8
|
*
|
|
9
|
+
* Before accessing the layer properties, use [isOrientedImageryGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isOrientedImageryGraphicOrigin/) to check
|
|
10
|
+
* whether the graphic's origin is an OrientedImageryGraphicOrigin.
|
|
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)
|
|
@@ -13,15 +16,45 @@ import type OrientedImageryLayer from "../layers/OrientedImageryLayer.js";
|
|
|
13
16
|
* @see [Scene component hitTest()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#hitTest)
|
|
14
17
|
* @see [OrientedImageryLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#queryFeatures)
|
|
15
18
|
* @example
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
19
|
+
* Access the layer and sublayer of a graphic that originated from a MapImageLayer.
|
|
20
|
+
* ```js
|
|
21
|
+
* import { isMapImageGraphicOrigin } from "@arcgis/core/graphic/isMapImageGraphicOrigin.js";
|
|
22
|
+
*
|
|
23
|
+
* const origin = graphic.origin;
|
|
24
|
+
*
|
|
25
|
+
* // Check whether the graphic came from a MapImageLayer
|
|
26
|
+
* if (isMapImageGraphicOrigin(origin)) {
|
|
27
|
+
* console.log(origin.layer.title);
|
|
28
|
+
* console.log(origin.sublayer.title);
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
* @example
|
|
32
|
+
* Access the vector tile style layer associated with a graphic returned by hitTest().
|
|
33
|
+
* ```js
|
|
34
|
+
* import { isVectorTileGraphicOrigin } from "@arcgis/core/graphic/isVectorTileGraphicOrigin.js";
|
|
35
|
+
*
|
|
36
|
+
* viewElement.addEventListener("arcgisViewClick", async (event) => {
|
|
37
|
+
* // Get hit-test results from the VectorTileLayer at the clicked location
|
|
38
|
+
* const response = await view.hitTest(event.detail, { include: vectorTileLayer });
|
|
39
|
+
*
|
|
40
|
+
* for (const result of response.results) {
|
|
41
|
+
* // Only graphic results contain a graphic with origin information
|
|
42
|
+
* if (result.type !== "graphic") {
|
|
43
|
+
* continue;
|
|
44
|
+
* }
|
|
45
|
+
*
|
|
46
|
+
* const graphic = result.graphic;
|
|
47
|
+
* const origin = graphic.origin;
|
|
48
|
+
*
|
|
49
|
+
* // Check whether the graphic came from a VectorTileLayer
|
|
50
|
+
* if (isVectorTileGraphicOrigin(origin)) {
|
|
51
|
+
* // layerId identifies a style layer within the VectorTileLayer
|
|
52
|
+
* const styleLayer = origin.layer.getStyleLayer(origin.layerId);
|
|
53
|
+
* console.log(styleLayer);
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
25
58
|
*/
|
|
26
59
|
export default class OrientedImageryGraphicOrigin extends GraphicOrigin {
|
|
27
60
|
constructor(layer: OrientedImageryLayer);
|
|
@@ -6,19 +6,52 @@ import type ParquetLayer from "../layers/ParquetLayer.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).
|
|
8
8
|
*
|
|
9
|
+
* Before accessing the layer properties, use [isParquetGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isParquetGraphicOrigin/) to check
|
|
10
|
+
* whether the graphic's origin is a ParquetGraphicOrigin.
|
|
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 [Map component hitTest()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#hitTest)
|
|
12
15
|
* @example
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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
|
+
* ```
|
|
22
55
|
*/
|
|
23
56
|
export default class ParquetGraphicOrigin extends GraphicOrigin {
|
|
24
57
|
constructor(layer: ParquetLayer);
|
|
@@ -6,9 +6,52 @@ import type PointCloudLayer from "../layers/PointCloudLayer.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) or [PointCloudLayerView.queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/PointCloudLayerView/#queryFeatures).
|
|
8
8
|
*
|
|
9
|
+
* Before accessing the layer properties, use [isPointCloudGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isPointCloudGraphicOrigin/) to check
|
|
10
|
+
* whether the graphic's origin is a PointCloudGraphicOrigin.
|
|
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 PointCloudGraphicOrigin extends GraphicOrigin {
|
|
14
57
|
constructor(layer: PointCloudLayer);
|
|
@@ -6,11 +6,54 @@ import type SceneLayer from "../layers/SceneLayer.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) or [queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/#queryFeatures).
|
|
8
8
|
*
|
|
9
|
+
* Before accessing the layer properties, use [isSceneGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isSceneGraphicOrigin/) to check
|
|
10
|
+
* whether the graphic's origin is a SceneGraphicOrigin.
|
|
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)
|
|
12
15
|
* @see [SceneLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/#queryFeatures)
|
|
13
16
|
* @see [SceneLayerView.queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/SceneLayerView/#queryFeatures)
|
|
17
|
+
* @example
|
|
18
|
+
* Access the layer and sublayer of a graphic that originated from a MapImageLayer.
|
|
19
|
+
* ```js
|
|
20
|
+
* import { isMapImageGraphicOrigin } from "@arcgis/core/graphic/isMapImageGraphicOrigin.js";
|
|
21
|
+
*
|
|
22
|
+
* const origin = graphic.origin;
|
|
23
|
+
*
|
|
24
|
+
* // Check whether the graphic came from a MapImageLayer
|
|
25
|
+
* if (isMapImageGraphicOrigin(origin)) {
|
|
26
|
+
* console.log(origin.layer.title);
|
|
27
|
+
* console.log(origin.sublayer.title);
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
* @example
|
|
31
|
+
* Access the vector tile style layer associated with a graphic returned by hitTest().
|
|
32
|
+
* ```js
|
|
33
|
+
* import { isVectorTileGraphicOrigin } from "@arcgis/core/graphic/isVectorTileGraphicOrigin.js";
|
|
34
|
+
*
|
|
35
|
+
* viewElement.addEventListener("arcgisViewClick", async (event) => {
|
|
36
|
+
* // Get hit-test results from the VectorTileLayer at the clicked location
|
|
37
|
+
* const response = await view.hitTest(event.detail, { include: vectorTileLayer });
|
|
38
|
+
*
|
|
39
|
+
* for (const result of response.results) {
|
|
40
|
+
* // Only graphic results contain a graphic with origin information
|
|
41
|
+
* if (result.type !== "graphic") {
|
|
42
|
+
* continue;
|
|
43
|
+
* }
|
|
44
|
+
*
|
|
45
|
+
* const graphic = result.graphic;
|
|
46
|
+
* const origin = graphic.origin;
|
|
47
|
+
*
|
|
48
|
+
* // Check whether the graphic came from a VectorTileLayer
|
|
49
|
+
* if (isVectorTileGraphicOrigin(origin)) {
|
|
50
|
+
* // layerId identifies a style layer within the VectorTileLayer
|
|
51
|
+
* const styleLayer = origin.layer.getStyleLayer(origin.layerId);
|
|
52
|
+
* console.log(styleLayer);
|
|
53
|
+
* }
|
|
54
|
+
* }
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
14
57
|
*/
|
|
15
58
|
export default class SceneGraphicOrigin extends GraphicOrigin {
|
|
16
59
|
constructor(layer: SceneLayer);
|
|
@@ -6,9 +6,52 @@ import type SketchLayer from "../layers/SketchLayer.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).
|
|
8
8
|
*
|
|
9
|
+
* Before accessing the layer properties, use [isSketchGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isSketchGraphicOrigin/) to check
|
|
10
|
+
* whether the graphic's origin is a SketchGraphicOrigin.
|
|
11
|
+
*
|
|
9
12
|
* @since 5.2
|
|
10
13
|
* @see [MapView.hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest)
|
|
11
14
|
* @see [Map component hitTest()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#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 SketchGraphicOrigin extends GraphicOrigin {
|
|
14
57
|
constructor(layer: SketchLayer);
|
|
@@ -6,12 +6,55 @@ import type StreamLayer from "../layers/StreamLayer.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/views/layers/StreamLayerView/#queryFeatures).
|
|
8
8
|
*
|
|
9
|
+
* Before accessing the layer properties, use [isStreamGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isStreamGraphicOrigin/) to check
|
|
10
|
+
* whether the graphic's origin is a StreamGraphicOrigin.
|
|
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)
|
|
12
15
|
* @see [Map component hitTest()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#hitTest)
|
|
13
16
|
* @see [Scene component hitTest()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#hitTest)
|
|
14
17
|
* @see [StreamLayerView.queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/StreamLayerView/#queryFeatures)
|
|
18
|
+
* @example
|
|
19
|
+
* Access the layer and sublayer of a graphic that originated from a MapImageLayer.
|
|
20
|
+
* ```js
|
|
21
|
+
* import { isMapImageGraphicOrigin } from "@arcgis/core/graphic/isMapImageGraphicOrigin.js";
|
|
22
|
+
*
|
|
23
|
+
* const origin = graphic.origin;
|
|
24
|
+
*
|
|
25
|
+
* // Check whether the graphic came from a MapImageLayer
|
|
26
|
+
* if (isMapImageGraphicOrigin(origin)) {
|
|
27
|
+
* console.log(origin.layer.title);
|
|
28
|
+
* console.log(origin.sublayer.title);
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
* @example
|
|
32
|
+
* Access the vector tile style layer associated with a graphic returned by hitTest().
|
|
33
|
+
* ```js
|
|
34
|
+
* import { isVectorTileGraphicOrigin } from "@arcgis/core/graphic/isVectorTileGraphicOrigin.js";
|
|
35
|
+
*
|
|
36
|
+
* viewElement.addEventListener("arcgisViewClick", async (event) => {
|
|
37
|
+
* // Get hit-test results from the VectorTileLayer at the clicked location
|
|
38
|
+
* const response = await view.hitTest(event.detail, { include: vectorTileLayer });
|
|
39
|
+
*
|
|
40
|
+
* for (const result of response.results) {
|
|
41
|
+
* // Only graphic results contain a graphic with origin information
|
|
42
|
+
* if (result.type !== "graphic") {
|
|
43
|
+
* continue;
|
|
44
|
+
* }
|
|
45
|
+
*
|
|
46
|
+
* const graphic = result.graphic;
|
|
47
|
+
* const origin = graphic.origin;
|
|
48
|
+
*
|
|
49
|
+
* // Check whether the graphic came from a VectorTileLayer
|
|
50
|
+
* if (isVectorTileGraphicOrigin(origin)) {
|
|
51
|
+
* // layerId identifies a style layer within the VectorTileLayer
|
|
52
|
+
* const styleLayer = origin.layer.getStyleLayer(origin.layerId);
|
|
53
|
+
* console.log(styleLayer);
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
15
58
|
*/
|
|
16
59
|
export default class StreamGraphicOrigin extends GraphicOrigin {
|
|
17
60
|
constructor(layer: StreamLayer);
|
|
@@ -4,14 +4,62 @@ import type SubtypeSublayer from "../layers/support/SubtypeSublayer.js";
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Provides information about the [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SubtypeGroupLayer/) from which a graphic originates.
|
|
7
|
-
*
|
|
7
|
+
* The [layer](https://developers.arcgis.com/javascript/latest/references/core/graphic/SubtypeGroupGraphicOrigin/#layer) property references the SubtypeGroupLayer, and the
|
|
8
|
+
* origin includes the [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/) that contains the graphic.
|
|
8
9
|
* 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
|
|
9
10
|
* [hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest) or [queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/#queryFeatures).
|
|
10
11
|
*
|
|
12
|
+
* Before accessing the layer properties, use [isSubtypeGroupGraphicOrigin](https://developers.arcgis.com/javascript/latest/references/core/graphic/isSubtypeGroupGraphicOrigin/) to check
|
|
13
|
+
* whether the graphic's origin is a SubtypeGroupGraphicOrigin.
|
|
14
|
+
*
|
|
15
|
+
* If you only need the title of the originating subtype sublayer, use [getGraphicOriginTitle](https://developers.arcgis.com/javascript/latest/references/core/graphic/getGraphicOriginTitle/).
|
|
16
|
+
* 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
|
|
17
|
+
* instead of accessing the subtype sublayer's template directly.
|
|
18
|
+
*
|
|
11
19
|
* @since 5.0
|
|
12
20
|
* @see [MapView.hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest)
|
|
13
21
|
* @see [Map component hitTest()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#hitTest)
|
|
14
22
|
* @see [SubtypeSublayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/#queryFeatures)
|
|
23
|
+
* @example
|
|
24
|
+
* Access the layer and sublayer of a graphic that originated from a MapImageLayer.
|
|
25
|
+
* ```js
|
|
26
|
+
* import { isMapImageGraphicOrigin } from "@arcgis/core/graphic/isMapImageGraphicOrigin.js";
|
|
27
|
+
*
|
|
28
|
+
* const origin = graphic.origin;
|
|
29
|
+
*
|
|
30
|
+
* // Check whether the graphic came from a MapImageLayer
|
|
31
|
+
* if (isMapImageGraphicOrigin(origin)) {
|
|
32
|
+
* console.log(origin.layer.title);
|
|
33
|
+
* console.log(origin.sublayer.title);
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
* @example
|
|
37
|
+
* Access the vector tile style layer associated with a graphic returned by hitTest().
|
|
38
|
+
* ```js
|
|
39
|
+
* import { isVectorTileGraphicOrigin } from "@arcgis/core/graphic/isVectorTileGraphicOrigin.js";
|
|
40
|
+
*
|
|
41
|
+
* viewElement.addEventListener("arcgisViewClick", async (event) => {
|
|
42
|
+
* // Get hit-test results from the VectorTileLayer at the clicked location
|
|
43
|
+
* const response = await view.hitTest(event.detail, { include: vectorTileLayer });
|
|
44
|
+
*
|
|
45
|
+
* for (const result of response.results) {
|
|
46
|
+
* // Only graphic results contain a graphic with origin information
|
|
47
|
+
* if (result.type !== "graphic") {
|
|
48
|
+
* continue;
|
|
49
|
+
* }
|
|
50
|
+
*
|
|
51
|
+
* const graphic = result.graphic;
|
|
52
|
+
* const origin = graphic.origin;
|
|
53
|
+
*
|
|
54
|
+
* // Check whether the graphic came from a VectorTileLayer
|
|
55
|
+
* if (isVectorTileGraphicOrigin(origin)) {
|
|
56
|
+
* // layerId identifies a style layer within the VectorTileLayer
|
|
57
|
+
* const styleLayer = origin.layer.getStyleLayer(origin.layerId);
|
|
58
|
+
* console.log(styleLayer);
|
|
59
|
+
* }
|
|
60
|
+
* }
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
15
63
|
*/
|
|
16
64
|
export default class SubtypeGroupGraphicOrigin extends GraphicOrigin {
|
|
17
65
|
constructor(sublayer: SubtypeSublayer);
|