@arcgis/core 5.1.0-next.101 → 5.1.0-next.102
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/arcgisGlobal.d.ts +1449 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{99f726f05cf80b0330ed.js → 119b84f5349f90d1dd28.js} +1 -1
- package/assets/esri/core/workers/chunks/15167eeb6d7dbe7e392d.js +1 -0
- package/assets/esri/core/workers/chunks/{156efa014b6edd9ccce9.js → 1ba37706e5d5eaabcb8e.js} +1 -1
- package/assets/esri/core/workers/chunks/{7bb17d0ab1cc2b89c035.js → 1faa8a42d5a437fc40a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{38b1d2ffcc318ac0119d.js → 48fcc10768d93e95a04e.js} +1 -1
- package/assets/esri/core/workers/chunks/{53bf9b0c2b8da12820ea.js → 55ccb8ed7325efb62091.js} +2 -2
- package/assets/esri/core/workers/chunks/{17de1c251242b692cf45.js → 5663df3cd1dfd4b43c73.js} +1 -1
- package/assets/esri/core/workers/chunks/{5b07f3253403fe25ce5b.js → 5bc299f7f89a07a6e6a6.js} +1 -1
- package/assets/esri/core/workers/chunks/{00a25dd4b057cc9f2a7e.js → 6f96ce41c47cae82e687.js} +1 -1
- package/assets/esri/core/workers/chunks/{657268b3fde6da2dd735.js → 86bff154d46f8a562887.js} +1 -1
- package/assets/esri/core/workers/chunks/{22fa4aa2b76573bafe21.js → 9e7c84a3a2abec4d49df.js} +1 -1
- package/assets/esri/core/workers/chunks/{40ffb1aa17cbfae17b23.js → bb5512ecb5300d45d46b.js} +1 -1
- package/assets/esri/core/workers/chunks/{d8c4fb66c733ab2f66d3.js → bb81da98546c4d923e0d.js} +1 -1
- package/assets/esri/core/workers/chunks/{a58662698c69190a12d8.js → de25311b6d13bf1c6089.js} +2 -2
- package/assets/esri/core/workers/chunks/{bafe489e54f34d1841e6.js → e86c073f0b6d395c7a38.js} +1 -1
- package/assets/esri/core/workers/chunks/f5bd0a4f82df5e942b70.js +1 -0
- package/assets/esri/core/workers/chunks/{48a0e7a32ebd44045c8f.js → fa38dc5010f8630a80fe.js} +1 -1
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +125 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +5 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer.json +1 -1
- package/config.js +1 -1
- package/form/elements/inputs/MultipleChoiceInput.d.ts +5 -5
- package/form/elements/inputs/MultipleChoiceInput.js +1 -1
- package/interfaces.d.ts +3 -0
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +29 -39
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/OrientedImageryLayer.d.ts +233 -0
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/VideoLayer.d.ts +35 -9
- package/layers/VideoLayer.js +1 -1
- package/layers/catalog/CatalogFootprintLayer.d.ts +147 -0
- package/layers/support/FeatureReductionBinning.d.ts +87 -9
- package/layers/support/FeatureReductionCluster.d.ts +87 -9
- package/layers/support/FieldConfiguration.d.ts +1 -1
- package/layers/support/SubtypeSublayer.d.ts +147 -0
- package/layers/support/TelemetryData.d.ts +5 -0
- package/layers/support/TelemetryData.js +1 -1
- package/layers/support/TelemetryDisplay.d.ts +10 -2
- package/layers/support/TelemetryDisplay.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/video/types.d.ts +8 -1
- package/layers/video/videoUtils.js +1 -1
- package/package.json +2 -2
- package/portal/jsonTypes.d.ts +7 -0
- package/rest/print.js +1 -1
- package/rest/support/PrintParameters.d.ts +8 -1
- package/rest/support/PrintParameters.js +1 -1
- package/support/revision.js +1 -1
- package/third-party-notices.txt +4 -0
- package/views/2d/engine/webgl/shaderGraph/graph/GlslGraphWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphNode.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/AspectShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CurvatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/SlopeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/surface.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/Viewport2DBaseMixin.js +1 -1
- package/widgets/Attachments/support/attachmentUtils.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +8 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/attachmentUtils.js +2 -0
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/templates/RelationshipElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/types.d.ts +7 -0
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.d.ts +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/types.js +1 -1
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +9 -0
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
- package/widgets/support/forms/formUtils.js +1 -1
- package/assets/esri/core/workers/chunks/43cc82373be791b7cb4c.js +0 -1
- package/assets/esri/core/workers/chunks/c9461568e1002ebac534.js +0 -1
- /package/assets/esri/core/workers/chunks/{53bf9b0c2b8da12820ea.js.LICENSE.txt → 55ccb8ed7325efb62091.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{a58662698c69190a12d8.js.LICENSE.txt → de25311b6d13bf1c6089.js.LICENSE.txt} +0 -0
|
@@ -2,6 +2,7 @@ import type { __FeatureLayerSansType } from "./FeatureLayer.js";
|
|
|
2
2
|
import type SpatialReference from "../geometry/SpatialReference.js";
|
|
3
3
|
import type FeatureLayer from "./FeatureLayer.js";
|
|
4
4
|
import type Field from "./support/Field.js";
|
|
5
|
+
import type FieldConfiguration from "./support/FieldConfiguration.js";
|
|
5
6
|
import type PortalItem from "../portal/PortalItem.js";
|
|
6
7
|
import type FeatureSet from "../rest/support/FeatureSet.js";
|
|
7
8
|
import type { LayerSaveAsOptions, LayerSaveOptions } from "./types.js";
|
|
@@ -47,6 +48,98 @@ export interface OrientedImageryLayerProperties extends FeatureLayerProperties,
|
|
|
47
48
|
* @since 4.29
|
|
48
49
|
*/
|
|
49
50
|
displayField?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* An array of [FieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) objects that control how fields are displayed in popups and other UI elements. Each object specifies options for an individual field, such as its display name, via `alias`, and formatting rules, via `fieldFormat`. Assign this property before the layer loads to ensure the configurations take effect. For more information, see the [FieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) documentation.
|
|
53
|
+
* If no field configurations are provided, they are automatically created when a [popupTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#popupTemplate) is assigned to the layer. If no [popupTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#popupTemplate) is set, you can manually define field configurations to customize how fields are shown.
|
|
54
|
+
* > [!WARNING]
|
|
55
|
+
* >
|
|
56
|
+
* > Support is limited in version 5.1. For details, see the [FieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) documentation.
|
|
57
|
+
*
|
|
58
|
+
* To modify field configurations, clone [fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#fieldConfigurations), make the changes, and then reassign the updated clone back to [fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#fieldConfigurations).
|
|
59
|
+
*
|
|
60
|
+
* @since 5.1
|
|
61
|
+
* @see [OrientedImageryLayer.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#getFieldConfiguration)
|
|
62
|
+
* @see [OrientedImageryLayer.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#getFieldAlias)
|
|
63
|
+
* @example
|
|
64
|
+
* // Adding a new field configuration
|
|
65
|
+
* const addNewConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
66
|
+
* // Check if there is already an existing configuration for fieldName
|
|
67
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
68
|
+
* if (!existingConfig) {
|
|
69
|
+
* const newConfig = new FieldConfiguration({ name: fieldName, alias, fieldFormat });
|
|
70
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
71
|
+
* newConfigs.push(newConfig);
|
|
72
|
+
* layer.fieldConfigurations = newConfigs;
|
|
73
|
+
* }
|
|
74
|
+
* };
|
|
75
|
+
* @example
|
|
76
|
+
* // Updating an existing field configuration
|
|
77
|
+
* const updateConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
78
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
79
|
+
* if (existingConfig) {
|
|
80
|
+
* const newConfig = existingConfig.clone();
|
|
81
|
+
* newConfig.alias = alias;
|
|
82
|
+
* newConfig.fieldFormat = fieldFormat;
|
|
83
|
+
*
|
|
84
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
85
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
86
|
+
* newConfigs[index] = newConfig;
|
|
87
|
+
* layer.fieldConfigurations = newConfigs;
|
|
88
|
+
* }
|
|
89
|
+
* };
|
|
90
|
+
* @example
|
|
91
|
+
* // Deleting an existing field configuration
|
|
92
|
+
* const deleteConfig = (layer, fieldName) => {
|
|
93
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
94
|
+
* if (existingConfig) {
|
|
95
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
96
|
+
* var newConfigs = clone(layer.fieldConfigurations);
|
|
97
|
+
* newConfigs.splice(index, 1);
|
|
98
|
+
* layer.fieldConfigurations = newConfigs;
|
|
99
|
+
* }
|
|
100
|
+
* };
|
|
101
|
+
* @see [FeatureLayer.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#getFieldConfiguration)
|
|
102
|
+
* @see [FeatureLayer.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#getFieldAlias)
|
|
103
|
+
* @example
|
|
104
|
+
* // Adding a new field configuration
|
|
105
|
+
* const addNewConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
106
|
+
* // Check if there is already an existing configuration for fieldName
|
|
107
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
108
|
+
* if (!existingConfig) {
|
|
109
|
+
* const newConfig = new FieldConfiguration({ name: fieldName, alias, fieldFormat });
|
|
110
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
111
|
+
* newConfigs.push(newConfig);
|
|
112
|
+
* layer.fieldConfigurations = newConfigs;
|
|
113
|
+
* }
|
|
114
|
+
* };
|
|
115
|
+
* @example
|
|
116
|
+
* // Updating an existing field configuration
|
|
117
|
+
* const updateConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
118
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
119
|
+
* if (existingConfig) {
|
|
120
|
+
* const newConfig = existingConfig.clone();
|
|
121
|
+
* newConfig.alias = alias;
|
|
122
|
+
* newConfig.fieldFormat = fieldFormat;
|
|
123
|
+
*
|
|
124
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
125
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
126
|
+
* newConfigs[index] = newConfig;
|
|
127
|
+
* layer.fieldConfigurations = newConfigs;
|
|
128
|
+
* }
|
|
129
|
+
* };
|
|
130
|
+
* @example
|
|
131
|
+
* // Deleting an existing field configuration
|
|
132
|
+
* const deleteConfig = (layer, fieldName) => {
|
|
133
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
134
|
+
* if (existingConfig) {
|
|
135
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
136
|
+
* var newConfigs = clone(layer.fieldConfigurations);
|
|
137
|
+
* newConfigs.splice(index, 1);
|
|
138
|
+
* layer.fieldConfigurations = newConfigs;
|
|
139
|
+
* }
|
|
140
|
+
* };
|
|
141
|
+
*/
|
|
142
|
+
fieldConfigurations?: FieldConfiguration[] | null;
|
|
50
143
|
/**
|
|
51
144
|
* An array of fields in the layer. Each field represents an attribute
|
|
52
145
|
* that may contain a value for each feature in the layer. For example,
|
|
@@ -488,6 +581,98 @@ export default class OrientedImageryLayer extends __FeatureLayerSansType {
|
|
|
488
581
|
* layer.farDistance = 60;
|
|
489
582
|
*/
|
|
490
583
|
accessor farDistance: number | null | undefined;
|
|
584
|
+
/**
|
|
585
|
+
* An array of [FieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) objects that control how fields are displayed in popups and other UI elements. Each object specifies options for an individual field, such as its display name, via `alias`, and formatting rules, via `fieldFormat`. Assign this property before the layer loads to ensure the configurations take effect. For more information, see the [FieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) documentation.
|
|
586
|
+
* If no field configurations are provided, they are automatically created when a [popupTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#popupTemplate) is assigned to the layer. If no [popupTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#popupTemplate) is set, you can manually define field configurations to customize how fields are shown.
|
|
587
|
+
* > [!WARNING]
|
|
588
|
+
* >
|
|
589
|
+
* > Support is limited in version 5.1. For details, see the [FieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) documentation.
|
|
590
|
+
*
|
|
591
|
+
* To modify field configurations, clone [fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#fieldConfigurations), make the changes, and then reassign the updated clone back to [fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#fieldConfigurations).
|
|
592
|
+
*
|
|
593
|
+
* @since 5.1
|
|
594
|
+
* @see [OrientedImageryLayer.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#getFieldConfiguration)
|
|
595
|
+
* @see [OrientedImageryLayer.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#getFieldAlias)
|
|
596
|
+
* @example
|
|
597
|
+
* // Adding a new field configuration
|
|
598
|
+
* const addNewConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
599
|
+
* // Check if there is already an existing configuration for fieldName
|
|
600
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
601
|
+
* if (!existingConfig) {
|
|
602
|
+
* const newConfig = new FieldConfiguration({ name: fieldName, alias, fieldFormat });
|
|
603
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
604
|
+
* newConfigs.push(newConfig);
|
|
605
|
+
* layer.fieldConfigurations = newConfigs;
|
|
606
|
+
* }
|
|
607
|
+
* };
|
|
608
|
+
* @example
|
|
609
|
+
* // Updating an existing field configuration
|
|
610
|
+
* const updateConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
611
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
612
|
+
* if (existingConfig) {
|
|
613
|
+
* const newConfig = existingConfig.clone();
|
|
614
|
+
* newConfig.alias = alias;
|
|
615
|
+
* newConfig.fieldFormat = fieldFormat;
|
|
616
|
+
*
|
|
617
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
618
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
619
|
+
* newConfigs[index] = newConfig;
|
|
620
|
+
* layer.fieldConfigurations = newConfigs;
|
|
621
|
+
* }
|
|
622
|
+
* };
|
|
623
|
+
* @example
|
|
624
|
+
* // Deleting an existing field configuration
|
|
625
|
+
* const deleteConfig = (layer, fieldName) => {
|
|
626
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
627
|
+
* if (existingConfig) {
|
|
628
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
629
|
+
* var newConfigs = clone(layer.fieldConfigurations);
|
|
630
|
+
* newConfigs.splice(index, 1);
|
|
631
|
+
* layer.fieldConfigurations = newConfigs;
|
|
632
|
+
* }
|
|
633
|
+
* };
|
|
634
|
+
* @see [FeatureLayer.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#getFieldConfiguration)
|
|
635
|
+
* @see [FeatureLayer.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#getFieldAlias)
|
|
636
|
+
* @example
|
|
637
|
+
* // Adding a new field configuration
|
|
638
|
+
* const addNewConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
639
|
+
* // Check if there is already an existing configuration for fieldName
|
|
640
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
641
|
+
* if (!existingConfig) {
|
|
642
|
+
* const newConfig = new FieldConfiguration({ name: fieldName, alias, fieldFormat });
|
|
643
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
644
|
+
* newConfigs.push(newConfig);
|
|
645
|
+
* layer.fieldConfigurations = newConfigs;
|
|
646
|
+
* }
|
|
647
|
+
* };
|
|
648
|
+
* @example
|
|
649
|
+
* // Updating an existing field configuration
|
|
650
|
+
* const updateConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
651
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
652
|
+
* if (existingConfig) {
|
|
653
|
+
* const newConfig = existingConfig.clone();
|
|
654
|
+
* newConfig.alias = alias;
|
|
655
|
+
* newConfig.fieldFormat = fieldFormat;
|
|
656
|
+
*
|
|
657
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
658
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
659
|
+
* newConfigs[index] = newConfig;
|
|
660
|
+
* layer.fieldConfigurations = newConfigs;
|
|
661
|
+
* }
|
|
662
|
+
* };
|
|
663
|
+
* @example
|
|
664
|
+
* // Deleting an existing field configuration
|
|
665
|
+
* const deleteConfig = (layer, fieldName) => {
|
|
666
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
667
|
+
* if (existingConfig) {
|
|
668
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
669
|
+
* var newConfigs = clone(layer.fieldConfigurations);
|
|
670
|
+
* newConfigs.splice(index, 1);
|
|
671
|
+
* layer.fieldConfigurations = newConfigs;
|
|
672
|
+
* }
|
|
673
|
+
* };
|
|
674
|
+
*/
|
|
675
|
+
accessor fieldConfigurations: FieldConfiguration[] | null | undefined;
|
|
491
676
|
/**
|
|
492
677
|
* An array of fields in the layer. Each field represents an attribute
|
|
493
678
|
* that may contain a value for each feature in the layer. For example,
|
|
@@ -821,6 +1006,54 @@ export default class OrientedImageryLayer extends __FeatureLayerSansType {
|
|
|
821
1006
|
accessor videoPathPrefix: string | null | undefined;
|
|
822
1007
|
/** Suffix used to build the video url path in conjunction with the image attribute. */
|
|
823
1008
|
accessor videoPathSuffix: string | null | undefined;
|
|
1009
|
+
/**
|
|
1010
|
+
* Creates default field configuration objects that define the display properties of fields.
|
|
1011
|
+
* These field configurations are generated from the layer's [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#fields) property.
|
|
1012
|
+
*
|
|
1013
|
+
* @returns An array of field configuration objects, or `null` if the layer does not have any fields that require formatting.
|
|
1014
|
+
* @since 5.1
|
|
1015
|
+
* @see [OrientedImageryLayer.fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#fieldConfigurations)
|
|
1016
|
+
* @returns An array of field configuration objects, or `null` if the layer does not have any fields that require formatting.
|
|
1017
|
+
* @example
|
|
1018
|
+
* const fieldConfigs = layer.createFieldConfigurations();
|
|
1019
|
+
* layer.fieldConfigurations = fieldConfigs;
|
|
1020
|
+
* @see [FeatureLayer.fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#fieldConfigurations)
|
|
1021
|
+
* @example
|
|
1022
|
+
* const fieldConfigs = layer.createFieldConfigurations();
|
|
1023
|
+
* layer.fieldConfigurations = fieldConfigs;
|
|
1024
|
+
*/
|
|
1025
|
+
createFieldConfigurations(): FieldConfiguration[] | null | undefined;
|
|
1026
|
+
/**
|
|
1027
|
+
* Returns the alias of the specified field. Previously, this value was commonly retrieved from [Layer.popupTemplate.fieldInfos[x].label](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/#label) or [Layer.fields[x].alias](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#alias). While these properties are still supported, this method is now the recommended approach for obtaining a field's alias.
|
|
1028
|
+
*
|
|
1029
|
+
* The alias is resolved in the following order:
|
|
1030
|
+
*
|
|
1031
|
+
* 1. [Field configuration alias](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#fieldConfigurations)
|
|
1032
|
+
* 2. [Field alias](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#fields) defined on the field.
|
|
1033
|
+
*
|
|
1034
|
+
* @param fieldName - The name of the field for which to get the alias.
|
|
1035
|
+
* @returns The alias of the specified field.
|
|
1036
|
+
* @since 5.1
|
|
1037
|
+
* @see [OrientedImageryLayer.fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#fieldConfigurations)
|
|
1038
|
+
* @see [OrientedImageryLayer.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#getFieldConfiguration)
|
|
1039
|
+
* @see [FeatureLayer.fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#fieldConfigurations)
|
|
1040
|
+
* @see [FeatureLayer.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#getFieldConfiguration)
|
|
1041
|
+
*/
|
|
1042
|
+
getFieldAlias(fieldName: string): string | null | undefined;
|
|
1043
|
+
/**
|
|
1044
|
+
* Returns the [FieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) for the specified field. The field configuration provides optional formatting and display information for the field.
|
|
1045
|
+
*
|
|
1046
|
+
* Previously, field formatting was commonly retrieved from [Layer.popupTemplate.fieldInfos[x].format](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/#format). This is no longer needed, instead use [Layer.getFieldConfiguration(fieldname).fieldFormat](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/#fieldFormat) to retrieve the field configuration formatting.
|
|
1047
|
+
*
|
|
1048
|
+
* @param fieldName - The name of the field for which to get the configuration.
|
|
1049
|
+
* @returns The field configuration of the specified field.
|
|
1050
|
+
* @since 5.1
|
|
1051
|
+
* @see [OrientedImageryLayer.fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#fieldConfigurations)
|
|
1052
|
+
* @see [OrientedImageryLayer.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/#getFieldAlias)
|
|
1053
|
+
* @see [FeatureLayer.fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#fieldConfigurations)
|
|
1054
|
+
* @see [FeatureLayer.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#getFieldAlias)
|
|
1055
|
+
*/
|
|
1056
|
+
getFieldConfiguration(fieldName: string): FieldConfiguration | null | undefined;
|
|
824
1057
|
/**
|
|
825
1058
|
* Executes a [Query](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/) against the feature service and
|
|
826
1059
|
* returns the number of features that satisfy the query. If no parameters are specified,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../core/Error.js";import{clone as i}from"../core/lang.js";import{setDeepValue as r}from"../core/object.js";import{property as o,subclass as a}from"../core/accessorSupport/decorators.js";import n from"../geometry/SpatialReference.js";import s from"../graphic/OrientedImageryGraphicOrigin.js";import p from"./FeatureLayer.js";import{useViewTimeProperty as l}from"./mixins/TemporalLayer.js";import{getEffectiveElevationSource as d,parseSequenceOrderFields as m,orientedImageryTypeMap as y,timeIntervalUnitTypeMap as u,verticalMeasurementTypeMap as c,isOrientationAccuracy as h,padAccuracyArray as g}from"./orientedImagery/core/utils.js";import f from"./support/Field.js";import v from"../tables/AttributeTableTemplate.js";import j from"../time/TimeExtent.js";const S=new Set(["demPathPrefix","demPathSuffix","depthImagePathPrefix","depthImagePathSuffix","elevationSource","horizontalMeasurementUnit","imageGeometryField","imageReferenceField","referenceIDField","sequenceOrderField","verticalMeasurementUnit","videoPathPrefix","videoPathSuffix","timeAnimation","visibilityTimeExtent"]),P=new Set(["elevationSource"]),I=(e,t)=>!S.has(t)&&e,O=(e,t,i)=>{const r=`orientedImageryProperties.${e}`,o={allowNull:P.has(e),ignoreOrigin:!0};return{name:r,write:t?{...o,target:r,writer:t}:o,read:i?{ignoreOrigin:!0,source:r,reader:i}:{ignoreOrigin:!0}}};function b(e){return e.json?(e.json.origins=e.json.origins??{},e.json.origins["web-scene"]={write:!1,read:!1},e):e}function x(e,t,i,r){const{name:o,write:a,read:n}=O(e,t,i),s={name:o,write:a,read:n,origins:{service:{name:`orientedImageryInfo.${o}`,write:t,read:i},"web-scene":{name:o,write:I(a,e),read:I(n,e)},"web-map":{name:o,write:a,read:n}}};return r&&s.origins?(s.type=r,s.origins["web-map"].type=r,s.origins["web-scene"].type=r,s):s}let w=class extends p{constructor(e){super(e),this.attributeTableTemplate=null,this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.graphicOrigin=new s(this),this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imageGeometryField="ImageGeometry",this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageReferenceField="OIObjectID",this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.referenceIDField="OBJECTID",this.sequenceOrderField="SequenceOrder",this.subtypeField=null,this.subtypes=null,this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit="days",this.useViewTime=!0,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.verticalSearchRange=null,this.videoPathPrefix=null,this.videoPathSuffix=null,this.virtualCacheDirectory=null,this.dataStoreID=null,this.visibilityTimeExtent=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:i}=this;return d(e,t,i)}get effectiveSequenceOrderField(){const{sequenceOrderField:e,fields:t}=this;return m(e,t)}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}findFirstValidLayerId(e){return e.layers?.find(({type:e})=>!!e&&this.supportedSourceTypes.has(e))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new t("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};e([o({type:v,json:{write:!1,read:!1}})],w.prototype,"attributeTableTemplate",void 0),e([o({type:Number,json:x("cameraHeading")})],w.prototype,"cameraHeading",void 0),e([o({type:Number,json:x("cameraHeight")})],w.prototype,"cameraHeight",void 0),e([o({type:Number,json:x("cameraPitch")})],w.prototype,"cameraPitch",void 0),e([o({type:Number,json:x("cameraRoll")})],w.prototype,"cameraRoll",void 0),e([o({type:Number,json:x("coveragePercent")})],w.prototype,"coveragePercent",void 0),e([o({type:String,json:x("demPathPrefix")})],w.prototype,"demPathPrefix",void 0),e([o({type:String,json:x("demPathSuffix")})],w.prototype,"demPathSuffix",void 0),e([o({type:String,json:x("depthImagePathPrefix")})],w.prototype,"depthImagePathPrefix",void 0),e([o({type:String,json:x("depthImagePathSuffix")})],w.prototype,"depthImagePathSuffix",void 0),e([o({type:Object,json:x("elevationSource")})],w.prototype,"elevationSource",void 0),e([o({readOnly:!0})],w.prototype,"effectiveElevationSource",null),e([o({readOnly:!0})],w.prototype,"effectiveSequenceOrderField",null),e([o({type:Number,json:x("farDistance")})],w.prototype,"farDistance",void 0),e([o({type:[f]})],w.prototype,"fields",void 0),e([o()],w.prototype,"geometryType",void 0),e([o({readOnly:!0,clonable:!1})],w.prototype,"graphicOrigin",void 0),e([o({type:Number,json:x("horizontalFieldOfView")})],w.prototype,"horizontalFieldOfView",void 0),e([o({type:String,json:x("horizontalMeasurementUnit")})],w.prototype,"horizontalMeasurementUnit",void 0),e([o({type:String,json:{...x("imageGeometryField"),default:"ImageGeometry"}})],w.prototype,"imageGeometryField",void 0),e([o({type:String,json:x("imagePathPrefix")})],w.prototype,"imagePathPrefix",void 0),e([o({type:String,json:x("imagePathSuffix")})],w.prototype,"imagePathSuffix",void 0),e([o({type:String,json:{...x("imageReferenceField"),default:"OIObjectID"}})],w.prototype,"imageReferenceField",void 0),e([o({type:Number,json:x("imageRotation")})],w.prototype,"imageRotation",void 0),e([o({type:Number,json:x("maximumDistance")})],w.prototype,"maximumDistance",void 0),e([o({type:Number,json:x("nearDistance")})],w.prototype,"nearDistance",void 0),e([o({type:["OrientedImageryLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],w.prototype,"operationalLayerType",void 0),e([o({json:{...x("orientationAccuracy",(e,t,i)=>{r(i,e.join(";"),t)},e=>{const t=e?.split(";")?.map(Number);return h(t)?g(t):[0,0,0,0,0,0,0,0]},String)}})],w.prototype,"orientationAccuracy",void 0),e([o({json:{...x("orientedImageryType",y.write,y.read,y.jsonValues.slice(1))}})],w.prototype,"orientedImageryType",void 0),e([o({type:String,json:{...x("referenceIDField"),default:"OBJECTID"}})],w.prototype,"referenceIDField",void 0),e([o({type:String,json:{...x("sequenceOrderField"),default:"SequenceOrder"}})],w.prototype,"sequenceOrderField",void 0),e([o({type:n})],w.prototype,"spatialReference",void 0),e([o({readOnly:!0})],w.prototype,"subtypeField",void 0),e([o({readOnly:!0})],w.prototype,"subtypes",void 0),e([o({json:{read:!1},value:"oriented-imagery",readOnly:!0})],w.prototype,"type",void 0),e([o({type:u.apiValues,json:{...x("timeIntervalUnit",u.write,u.read,u.jsonValues)}})],w.prototype,"timeIntervalUnit",void 0),e([o(b(i(l)))],w.prototype,"useViewTime",void 0),e([o({type:Number,json:x("verticalFieldOfView")})],w.prototype,"verticalFieldOfView",void 0),e([o({type:c.apiValues,json:{...x("verticalMeasurementUnit",c.write,c.read,c.jsonValues)}})],w.prototype,"verticalMeasurementUnit",void 0),e([o({type:Number,json:x("verticalSearchRange")})],w.prototype,"verticalSearchRange",void 0),e([o({type:String,json:x("videoPathPrefix")})],w.prototype,"videoPathPrefix",void 0),e([o({type:String,json:x("videoPathSuffix")})],w.prototype,"videoPathSuffix",void 0),e([o({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.orientedImageryProperties.virtualCacheDirectory",read:!0}}}})],w.prototype,"virtualCacheDirectory",void 0),e([o({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.dsid",read:!0}}}})],w.prototype,"dataStoreID",void 0),e([o({type:j,json:{origins:{"web-scene":{write:!1,read:!1}}}})],w.prototype,"visibilityTimeExtent",void 0),w=e([a("esri.layers.OrientedImageryLayer")],w);const F=w;export{F as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../core/Error.js";import{clone as i}from"../core/lang.js";import{setDeepValue as r}from"../core/object.js";import{property as o,subclass as a}from"../core/accessorSupport/decorators.js";import n from"../geometry/SpatialReference.js";import s from"../graphic/OrientedImageryGraphicOrigin.js";import p from"./FeatureLayer.js";import{useViewTimeProperty as l}from"./mixins/TemporalLayer.js";import{getEffectiveElevationSource as d,parseSequenceOrderFields as m,orientedImageryTypeMap as y,timeIntervalUnitTypeMap as u,verticalMeasurementTypeMap as c,isOrientationAccuracy as h,padAccuracyArray as g}from"./orientedImagery/core/utils.js";import f from"./support/Field.js";import v from"../tables/AttributeTableTemplate.js";import j from"../time/TimeExtent.js";const S=new Set(["demPathPrefix","demPathSuffix","depthImagePathPrefix","depthImagePathSuffix","elevationSource","horizontalMeasurementUnit","imageGeometryField","imageReferenceField","referenceIDField","sequenceOrderField","verticalMeasurementUnit","videoPathPrefix","videoPathSuffix","timeAnimation","visibilityTimeExtent"]),P=new Set(["elevationSource"]),I=(e,t)=>!S.has(t)&&e,O=(e,t,i)=>{const r=`orientedImageryProperties.${e}`,o={allowNull:P.has(e),ignoreOrigin:!0};return{name:r,write:t?{...o,target:r,writer:t}:o,read:i?{ignoreOrigin:!0,source:r,reader:i}:{ignoreOrigin:!0}}};function b(e){return e.json?(e.json.origins=e.json.origins??{},e.json.origins["web-scene"]={write:!1,read:!1},e):e}function x(e,t,i,r){const{name:o,write:a,read:n}=O(e,t,i),s={name:o,write:a,read:n,origins:{service:{name:`orientedImageryInfo.${o}`,write:t,read:i},"web-scene":{name:o,write:I(a,e),read:I(n,e)},"web-map":{name:o,write:a,read:n}}};return r&&s.origins?(s.type=r,s.origins["web-map"].type=r,s.origins["web-scene"].type=r,s):s}let w=class extends p{constructor(e){super(e),this.attributeTableTemplate=null,this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.graphicOrigin=new s(this),this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imageGeometryField="ImageGeometry",this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageReferenceField="OIObjectID",this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.referenceIDField="OBJECTID",this.sequenceOrderField="SequenceOrder",this.subtypeField=null,this.subtypes=null,this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit="days",this.useViewTime=!0,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.verticalSearchRange=null,this.videoPathPrefix=null,this.videoPathSuffix=null,this.virtualCacheDirectory=null,this.dataStoreID=null,this.visibilityTimeExtent=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:i}=this;return d(e,t,i)}get effectiveSequenceOrderField(){const{sequenceOrderField:e,fields:t}=this;return m(e,t)}get fieldConfigurations(){return super.fieldConfigurations}set fieldConfigurations(e){super.fieldConfigurations=e}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}findFirstValidLayerId(e){return e.layers?.find(({type:e})=>!!e&&this.supportedSourceTypes.has(e))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new t("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};e([o({type:v,json:{write:!1,read:!1}})],w.prototype,"attributeTableTemplate",void 0),e([o({type:Number,json:x("cameraHeading")})],w.prototype,"cameraHeading",void 0),e([o({type:Number,json:x("cameraHeight")})],w.prototype,"cameraHeight",void 0),e([o({type:Number,json:x("cameraPitch")})],w.prototype,"cameraPitch",void 0),e([o({type:Number,json:x("cameraRoll")})],w.prototype,"cameraRoll",void 0),e([o({type:Number,json:x("coveragePercent")})],w.prototype,"coveragePercent",void 0),e([o({type:String,json:x("demPathPrefix")})],w.prototype,"demPathPrefix",void 0),e([o({type:String,json:x("demPathSuffix")})],w.prototype,"demPathSuffix",void 0),e([o({type:String,json:x("depthImagePathPrefix")})],w.prototype,"depthImagePathPrefix",void 0),e([o({type:String,json:x("depthImagePathSuffix")})],w.prototype,"depthImagePathSuffix",void 0),e([o({type:Object,json:x("elevationSource")})],w.prototype,"elevationSource",void 0),e([o({readOnly:!0})],w.prototype,"effectiveElevationSource",null),e([o({readOnly:!0})],w.prototype,"effectiveSequenceOrderField",null),e([o({type:Number,json:x("farDistance")})],w.prototype,"farDistance",void 0),e([o({type:[f]})],w.prototype,"fields",void 0),e([o()],w.prototype,"geometryType",void 0),e([o({readOnly:!0,clonable:!1})],w.prototype,"graphicOrigin",void 0),e([o({type:Number,json:x("horizontalFieldOfView")})],w.prototype,"horizontalFieldOfView",void 0),e([o({type:String,json:x("horizontalMeasurementUnit")})],w.prototype,"horizontalMeasurementUnit",void 0),e([o({type:String,json:{...x("imageGeometryField"),default:"ImageGeometry"}})],w.prototype,"imageGeometryField",void 0),e([o({type:String,json:x("imagePathPrefix")})],w.prototype,"imagePathPrefix",void 0),e([o({type:String,json:x("imagePathSuffix")})],w.prototype,"imagePathSuffix",void 0),e([o({type:String,json:{...x("imageReferenceField"),default:"OIObjectID"}})],w.prototype,"imageReferenceField",void 0),e([o({type:Number,json:x("imageRotation")})],w.prototype,"imageRotation",void 0),e([o({type:Number,json:x("maximumDistance")})],w.prototype,"maximumDistance",void 0),e([o({type:Number,json:x("nearDistance")})],w.prototype,"nearDistance",void 0),e([o({type:["OrientedImageryLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],w.prototype,"operationalLayerType",void 0),e([o({json:{...x("orientationAccuracy",(e,t,i)=>{r(i,e.join(";"),t)},e=>{const t=e?.split(";")?.map(Number);return h(t)?g(t):[0,0,0,0,0,0,0,0]},String)}})],w.prototype,"orientationAccuracy",void 0),e([o({json:{...x("orientedImageryType",y.write,y.read,y.jsonValues.slice(1))}})],w.prototype,"orientedImageryType",void 0),e([o({type:String,json:{...x("referenceIDField"),default:"OBJECTID"}})],w.prototype,"referenceIDField",void 0),e([o({type:String,json:{...x("sequenceOrderField"),default:"SequenceOrder"}})],w.prototype,"sequenceOrderField",void 0),e([o({type:n})],w.prototype,"spatialReference",void 0),e([o({readOnly:!0})],w.prototype,"subtypeField",void 0),e([o({readOnly:!0})],w.prototype,"subtypes",void 0),e([o({json:{read:!1},value:"oriented-imagery",readOnly:!0})],w.prototype,"type",void 0),e([o({type:u.apiValues,json:{...x("timeIntervalUnit",u.write,u.read,u.jsonValues)}})],w.prototype,"timeIntervalUnit",void 0),e([o(b(i(l)))],w.prototype,"useViewTime",void 0),e([o({type:Number,json:x("verticalFieldOfView")})],w.prototype,"verticalFieldOfView",void 0),e([o({type:c.apiValues,json:{...x("verticalMeasurementUnit",c.write,c.read,c.jsonValues)}})],w.prototype,"verticalMeasurementUnit",void 0),e([o({type:Number,json:x("verticalSearchRange")})],w.prototype,"verticalSearchRange",void 0),e([o({type:String,json:x("videoPathPrefix")})],w.prototype,"videoPathPrefix",void 0),e([o({type:String,json:x("videoPathSuffix")})],w.prototype,"videoPathSuffix",void 0),e([o({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.orientedImageryProperties.virtualCacheDirectory",read:!0}}}})],w.prototype,"virtualCacheDirectory",void 0),e([o({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.dsid",read:!0}}}})],w.prototype,"dataStoreID",void 0),e([o({type:j,json:{origins:{"web-scene":{write:!1,read:!1}}}})],w.prototype,"visibilityTimeExtent",void 0),w=e([a("esri.layers.OrientedImageryLayer")],w);const F=w;export{F as default};
|
package/layers/VideoLayer.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type Color from "../Color.js";
|
|
2
1
|
import type Extent from "../geometry/Extent.js";
|
|
3
2
|
import type SpatialReference from "../geometry/SpatialReference.js";
|
|
4
3
|
import type Layer from "./Layer.js";
|
|
@@ -11,6 +10,7 @@ import type PictureMarkerSymbol from "../symbols/PictureMarkerSymbol.js";
|
|
|
11
10
|
import type SimpleFillSymbol from "../symbols/SimpleFillSymbol.js";
|
|
12
11
|
import type SimpleLineSymbol from "../symbols/SimpleLineSymbol.js";
|
|
13
12
|
import type SimpleMarkerSymbol from "../symbols/SimpleMarkerSymbol.js";
|
|
13
|
+
import type { ColorLike } from "../Color.js";
|
|
14
14
|
import type { MultiOriginJSONSupportMixin } from "../core/MultiOriginJSONSupport.js";
|
|
15
15
|
import type { VideoLayerCapabilities } from "./types.js";
|
|
16
16
|
import type { BlendLayer, BlendLayerProperties } from "./mixins/BlendLayer.js";
|
|
@@ -19,15 +19,15 @@ import type { OperationalLayer, OperationalLayerProperties } from "./mixins/Oper
|
|
|
19
19
|
import type { PortalLayer, PortalLayerProperties } from "./mixins/PortalLayer.js";
|
|
20
20
|
import type { ScaleRangeLayer, ScaleRangeLayerProperties } from "./mixins/ScaleRangeLayer.js";
|
|
21
21
|
import type { Effect } from "./support/FeatureEffect.js";
|
|
22
|
-
import type { LivestreamStatus, SensorOrientationInfo, VideoMetadataEntry, VideoState } from "./video/types.js";
|
|
23
|
-
import type { Codecs, VideoCameraInfo, VideoGroundControlPoint, VideoQuality, VideoServiceLayerInfo, VideoSourceType } from "../portal/jsonTypes.js";
|
|
22
|
+
import type { Coverage, LivestreamStatus, SensorOrientationInfo, VideoMetadataEntry, VideoState } from "./video/types.js";
|
|
23
|
+
import type { Codecs, TelemetryElementFilter, VideoCameraInfo, VideoGroundControlPoint, VideoQuality, VideoServiceLayerInfo, VideoSourceType } from "../portal/jsonTypes.js";
|
|
24
24
|
import type { SimpleMarkerSymbolProperties } from "../symbols/SimpleMarkerSymbol.js";
|
|
25
25
|
import type { SimpleFillSymbolProperties } from "../symbols/SimpleFillSymbol.js";
|
|
26
26
|
import type { ExtentProperties } from "../geometry/Extent.js";
|
|
27
27
|
import type { PlaybackInfoProperties } from "./support/PlaybackInfo.js";
|
|
28
|
+
import type { SimpleLineSymbolProperties } from "../symbols/SimpleLineSymbol.js";
|
|
28
29
|
import type { CIMSymbolProperties } from "../symbols/CIMSymbol.js";
|
|
29
30
|
import type { PictureMarkerSymbolProperties } from "../symbols/PictureMarkerSymbol.js";
|
|
30
|
-
import type { SimpleLineSymbolProperties } from "../symbols/SimpleLineSymbol.js";
|
|
31
31
|
import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
|
|
32
32
|
import type { TelemetryDisplayProperties } from "./support/TelemetryDisplay.js";
|
|
33
33
|
import type { LayerProperties } from "./Layer.js";
|
|
@@ -75,6 +75,12 @@ export interface VideoLayerProperties extends LayerProperties, CustomParametersM
|
|
|
75
75
|
* @since 4.33
|
|
76
76
|
*/
|
|
77
77
|
playbackInfo?: PlaybackInfoProperties | null;
|
|
78
|
+
/**
|
|
79
|
+
* A [SimpleLineSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleLineSymbol/) used for representing the sensor path from collection start to end.
|
|
80
|
+
*
|
|
81
|
+
* @since 5.1
|
|
82
|
+
*/
|
|
83
|
+
sensorPathSymbol?: (SimpleLineSymbolProperties & { type: "simple-line" });
|
|
78
84
|
/**
|
|
79
85
|
* A [SimpleLineSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleLineSymbol/) used for representing the line of sight from the sensor to the center of the frame coverage area.
|
|
80
86
|
*
|
|
@@ -131,6 +137,7 @@ export interface VideoLayerProperties extends LayerProperties, CustomParametersM
|
|
|
131
137
|
* frameOutline: true,
|
|
132
138
|
* lineOfSight: false,
|
|
133
139
|
* sensorLocation: false,
|
|
140
|
+
* sensorPath: false,
|
|
134
141
|
* sensorTrail: false,
|
|
135
142
|
* });
|
|
136
143
|
*/
|
|
@@ -222,6 +229,12 @@ export default class VideoLayer extends VideoLayerSuperclass {
|
|
|
222
229
|
* videoLayer.copyright = "© 2024 Esri";
|
|
223
230
|
*/
|
|
224
231
|
accessor copyright: string | null | undefined;
|
|
232
|
+
/**
|
|
233
|
+
* Geographic path followed by the video sensor in the collection.
|
|
234
|
+
*
|
|
235
|
+
* @since 5.1
|
|
236
|
+
*/
|
|
237
|
+
get coverage(): Coverage | null | undefined;
|
|
225
238
|
/** The date the video layer was created. */
|
|
226
239
|
get created(): Date | null | undefined;
|
|
227
240
|
/** The current time of the video layer in seconds. */
|
|
@@ -394,6 +407,13 @@ export default class VideoLayer extends VideoLayerSuperclass {
|
|
|
394
407
|
* uhd | 3840x2160 | Ultra High Definition
|
|
395
408
|
*/
|
|
396
409
|
get qualities(): VideoQuality[] | null | undefined;
|
|
410
|
+
/**
|
|
411
|
+
* A [SimpleLineSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleLineSymbol/) used for representing the sensor path from collection start to end.
|
|
412
|
+
*
|
|
413
|
+
* @since 5.1
|
|
414
|
+
*/
|
|
415
|
+
get sensorPathSymbol(): SimpleLineSymbol;
|
|
416
|
+
set sensorPathSymbol(value: (SimpleLineSymbolProperties & { type: "simple-line" }));
|
|
397
417
|
/**
|
|
398
418
|
* A [SimpleLineSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleLineSymbol/) used for representing the line of sight from the sensor to the center of the frame coverage area.
|
|
399
419
|
*
|
|
@@ -500,6 +520,7 @@ export default class VideoLayer extends VideoLayerSuperclass {
|
|
|
500
520
|
* frameOutline: true,
|
|
501
521
|
* lineOfSight: false,
|
|
502
522
|
* sensorLocation: false,
|
|
523
|
+
* sensorPath: false,
|
|
503
524
|
* sensorTrail: false,
|
|
504
525
|
* });
|
|
505
526
|
*/
|
|
@@ -581,14 +602,19 @@ export default class VideoLayer extends VideoLayerSuperclass {
|
|
|
581
602
|
*/
|
|
582
603
|
setCurrentTime(timestamp: number): void;
|
|
583
604
|
/**
|
|
584
|
-
* Updates the
|
|
605
|
+
* Updates the color configuration for telemetry display elements.
|
|
585
606
|
*
|
|
586
|
-
* @param color - The color to
|
|
607
|
+
* @param color - The new color to apply to the telemetry symbols.
|
|
608
|
+
* @param options - Optional list of element names that should skip this color update.
|
|
609
|
+
* Defaults to an empty array (all elements are updated).
|
|
610
|
+
* @example
|
|
611
|
+
* // Update color for all telemetry elements
|
|
612
|
+
* updateTelemetryColor(myColor);
|
|
587
613
|
* @example
|
|
588
|
-
* //
|
|
589
|
-
*
|
|
614
|
+
* // Update everything except path and trail symbols
|
|
615
|
+
* updateTelemetryColor(myColor, ["sensorPath", "sensorTrail"]);
|
|
590
616
|
*/
|
|
591
|
-
updateTelemetryColor(color:
|
|
617
|
+
updateTelemetryColor(color: ColorLike, options?: TelemetryElementFilter): void;
|
|
592
618
|
}
|
|
593
619
|
declare const VideoLayerSuperclass: typeof Layer & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof PortalLayer & typeof OperationalLayer & typeof ScaleRangeLayer & typeof BlendLayer
|
|
594
620
|
|
package/layers/VideoLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../Color.js";import r from"../request.js";import{deprecatedProperty as o}from"../core/deprecate.js";import i from"../core/Error.js";import s from"../core/Logger.js";import{clamp as l}from"../core/mathUtils.js";import{MultiOriginJSONSupportMixin as n}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{watch as p,initial as y,whenOnce as m}from"../core/reactiveUtils.js";import{property as u,subclass as d}from"../core/accessorSupport/decorators.js";import{Integer as c}from"../core/accessorSupport/ensureType.js";import h from"../geometry/Extent.js";import f from"../geometry/Polyline.js";import v from"../geometry/SpatialReference.js";import g from"./Layer.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{BlendLayer as b,effectProperty as O}from"./mixins/BlendLayer.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{parse as L,cleanTitle as P,titleFromUrlAndName as C}from"./support/arcgisLayerUrl.js";import{opacity as x,id as U}from"./support/commonProperties.js";import{normalizeParsedUrlObject as E,urlProperty as M}from"./support/multiLayerServiceUtils.js";import N from"./support/PlaybackInfo.js";import{getVideoLayerCapabilities as k}from"./support/serviceCapabilitiesUtils.js";import F from"./support/TelemetryData.js";import V from"./support/TelemetryDisplay.js";import H from"./support/VideoFrame.js";import J from"./support/VideoTimeExtent.js";import _ from"./video/VideoController.js";import{getFrameHorizonPoints as G,getGroundControlPoints as R,getTelemetryData as z,getServiceLayersInfo as A,getStyledTelemetrySymbol as q,getSensorTrailPoints as D,readVideoTimeExtent as B}from"./video/videoUtils.js";import W from"../symbols/CIMSymbol.js";import Q from"../symbols/PictureMarkerSymbol.js";import Z from"../symbols/SimpleFillSymbol.js";import K from"../symbols/SimpleLineSymbol.js";import X from"../symbols/SimpleMarkerSymbol.js";import Y from"../symbols/Symbol.js";import{write as $}from"../symbols/support/jsonUtils.js";import{addLayerUnsupportedError as ee}from"../webdoc/support/unsupportedErrors.js";import{reader as te}from"../core/accessorSupport/decorators/reader.js";function re(e,t){return{ignoreOrigin:this.originIdOf(t)<3}}const oe=new t([255,127,0]),ie=new t([0,0,0,.05]),se=new X({angle:0,color:oe,size:10,style:"cross"}),le=new Z({color:ie,outline:new K({color:oe,width:2})}),ne=new K({color:oe,width:1}),ae=new X({angle:0,color:oe,outline:{color:[255,255,255],width:1.33},size:10,style:"circle"}),pe=new K({color:oe,width:1}),ye={types:{base:Y,key:"type",typeMap:{"simple-marker":X,"picture-marker":Q,cim:W}},json:{name:"drawingInfo.sensorSymbol",write:{writer:$,overridePolicy:re}}};function me(e,t){return{type:t,json:{name:e,write:{overridePolicy:re}}}}let ue=class extends(b(I(S(T(w(n(j(g)))))))){constructor(e){super(e),this._trailPoints=[],this.cameraInfo=null,this.capabilities=null,this.codecs=null,this.connectionInfo=null,this.controller=new _,this.copyright=null,this.created=null,this.customParameters=null,this.description=null,this.elevationSource=null,this.frame=null,this.frameCenterSymbol=se.clone(),this.frameCount=null,this.frameEffect=null,this.frameOpacity=1,this.frameOutlineSymbol=le.clone(),this.fullExtent=null,this.fullTimeExtent=null,this.initialExtent=null,this.layerId=null,this.operationalLayerType="ArcGISVideoLayer",this.playbackInfo=null,this.posterUrl=null,this.qualities=null,this.sensorSymbolOrientation={source:"platformHeading",symbolOffset:0},this.sensorSymbol=ae.clone(),this.sensorSightLineSymbol=ne.clone(),this.sensorTrailSymbol=pe.clone(),this.serviceItemId=null,this.sourceJSON=null,this.sourceQuality=null,this.sourceType=null,this.spatialReference=v.WGS84,this.start=0,this.telemetryDisplay=new V,this.sublayerTitleMode="item-title",this.type="video",this.url=null,this.version=null,this.videoLayersInfo=null}initialize(){this.addHandles([p(()=>this.metadata,()=>{this.notifyChange("telemetry"),this.notifyChange("groundControlPoints"),this.notifyChange("frameHorizonPoints")}),p(()=>this.telemetry?.sensorLocation,e=>this._setSensorTrail(e),y)]),m(()=>this.loaded&&"can-play"===this.state&&this.duration>0).then(()=>{this.start>=0&&this.start<=this.duration&&this.setCurrentTime(this.start)})}destroy(){this.removeAllHandles(),this.controller&&this.controller.destroy()}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Video Service"],supportsData:!0},e).catch(a).then(()=>this._fetchService(t));return this.addResolvingPromise(r),Promise.resolve(this)}get autoplay(){return this.controller?.autoplay??!1}set autoplay(e){this.controller.autoplay=e}get buffered(){return this.controller.buffered}readCapabilitiesFromService(e,t){return k(t)}readConnectionInfo(e,t){const r=Object.values(t.connectionUrl);return r?.length&&(this.controller.playerUrl=r[0]),t.connectionUrl}get currentTime(){return this.controller.currentTime}get duration(){return this.controller.duration}get ended(){return this.controller.ended}get frameHorizonPoints(){return G(this.metadata)}get groundControlPoints(){return R(this.metadata)}get isLive(){return this.controller?.isLive??!1}get livestreamStatus(){return this.controller?.livestreamStatus}get loop(){return this.controller.loop}set loop(e){this.controller.loop=e}get metadata(){return this.controller?.currentMetadata}get mimeType(){return this.controller?.mimeType}get muted(){return this.controller.muted}set muted(e){this.controller.muted=e}get parsedUrl(){return E(this)}get playbackRate(){return this.controller.rate}set playbackRate(e){this.controller.rate=e}get playerUrl(){return this.controller.playerUrl}get playing(){return this.controller.playing}get started(){return this.controller?.started??!1}get state(){return this.controller.state}get telemetry(){return z(this.metadata)}readTitleFromService(e,t){const{url:r}=this,o=t.name||(r?L(r)?.title:void 0);switch(this.sublayerTitleMode){case"item-title":if(r)return C(r,o);break;case"item-title-and-service-name":{const e=this.portalItem?.title;if(e&&e!==o)return P(e)+(o?" - "+P(o):"");break}}return o?P(o):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}get videoElement(){return this.controller?.element}get videoHeight(){return this.controller?.videoHeight}readLayerInfosFromService(e,t){return A(t)}get videoTimeExtent(){return o(s.getLogger(this),"videoTimeExtent",{replacement:"fullTimeExtent",version:"4.33",warnOnce:!0}),this.fullTimeExtent}get videoWidth(){return this.controller?.videoWidth}get volume(){return this.controller?.volume??0}set volume(e){this.controller.volume=e}get waiting(){return this.controller.waiting}play(){this.controller.play()}pause(){this.controller.pause()}reset(){this._trailPoints=[],this.controller.reset()}setCurrentTime(e){if(this.duration<0)return;const t=l(e,0,this.duration);this.controller.setCurrentTime(t)}toGround(e,t){return this.controller?.sensorModel?.metadataSupportsTransforms?this.controller.sensorModel.transformImageToGeo(e,t):null}toVideo(e){if(!this.controller?.sensorModel?.metadataSupportsTransforms)return null;const t=this.controller.sensorModel.transformGeoToImage(e.x,e.y,e.z);return{x:t[0],y:t[1]}}updateTelemetryColor(e){this.frameCenterSymbol=q(this.frameCenterSymbol,e)??se,this.frameOutlineSymbol=q(this.frameOutlineSymbol,e,ie)??le,this.sensorSightLineSymbol=q(this.sensorSightLineSymbol,e)??ne,this.sensorTrailSymbol=q(this.sensorTrailSymbol,e)??pe,this.sensorSymbol=q(this.sensorSymbol,e)??ae}write(e,t){return null==this.layerId?(ee(t,this,"the ArcGIS server version must be greater than 11.2."),null):super.write(e,t)}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:o}=await r(this.url,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:e});if(o&&(this.url=this.url.replace(/^http:/i,"https:")),!t?.currentVersion)return t.currentVersion="11.2",this.sourceJSON=t,void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});if(this.layerId??=t.layers?.[0]?.id??null,null==this.layerId)throw new i("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");const{data:s}=await r(this.parsedUrl.path,{query:{f:"json",...this.customParameters},signal:e});this.sourceJSON={...t,...s},this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl})}_setSensorTrail(e){if(!e)return;const t=D(e,this._trailPoints);this._trailPoints=[...t];const r=this._trailPoints.map(e=>e.toArray()),o=new f({hasZ:e.hasZ,paths:[r]});this.telemetry.sensorTrail=o.clone()}};e([u({type:Boolean,json:{write:{ignoreOrigin:!0}}})],ue.prototype,"autoplay",null),e([u({readOnly:!0})],ue.prototype,"buffered",null),e([u({readOnly:!0})],ue.prototype,"cameraInfo",void 0),e([u({readOnly:!0,json:{read:!1}})],ue.prototype,"capabilities",void 0),e([te("service","capabilities",["supportsAppend","supportsCoverageQuery","supportsExportClip","supportsExportFrameset","supportsMensuration","supportsPreviews","supportsUpdate"])],ue.prototype,"readCapabilitiesFromService",null),e([u({readOnly:!0})],ue.prototype,"codecs",void 0),e([u({readOnly:!0})],ue.prototype,"connectionInfo",void 0),e([te("connectionInfo",["connectionUrl"])],ue.prototype,"readConnectionInfo",null),e([u()],ue.prototype,"controller",void 0),e([u({type:String})],ue.prototype,"copyright",void 0),e([u({readOnly:!0,type:Date})],ue.prototype,"created",void 0),e([u({type:Number})],ue.prototype,"currentTime",null),e([u({json:{write:!1}})],ue.prototype,"customParameters",void 0),e([u({type:String})],ue.prototype,"description",void 0),e([u({type:Number})],ue.prototype,"duration",null),e([u({readOnly:!0})],ue.prototype,"elevationSource",void 0),e([u({type:Boolean})],ue.prototype,"ended",null),e([u({type:H})],ue.prototype,"frame",void 0),e([u(me("drawingInfo.frameCenterSymbol",X))],ue.prototype,"frameCenterSymbol",void 0),e([u({readOnly:!0,type:c})],ue.prototype,"frameCount",void 0),e([u(O)],ue.prototype,"frameEffect",void 0),e([u(x)],ue.prototype,"frameOpacity",void 0),e([u(me("drawingInfo.frameOutlineSymbol",Z))],ue.prototype,"frameOutlineSymbol",void 0),e([u({type:h})],ue.prototype,"fullExtent",void 0),e([u({readOnly:!0})],ue.prototype,"frameHorizonPoints",null),e([u({readOnly:!0,json:{read:{reader:B,source:"time"}},type:J})],ue.prototype,"fullTimeExtent",void 0),e([u({readOnly:!0})],ue.prototype,"groundControlPoints",null),e([u(U)],ue.prototype,"id",void 0),e([u({type:h})],ue.prototype,"initialExtent",void 0),e([u({readOnly:!0})],ue.prototype,"isLive",null),e([u({type:c,json:{read:!1,origins:{service:{read:{source:"id"}}}}})],ue.prototype,"layerId",void 0),e([u({readOnly:!0})],ue.prototype,"livestreamStatus",null),e([u({type:Boolean})],ue.prototype,"loop",null),e([u({readOnly:!0})],ue.prototype,"metadata",null),e([u({readOnly:!0})],ue.prototype,"mimeType",null),e([u({type:Boolean,json:{write:{ignoreOrigin:!0}}})],ue.prototype,"muted",null),e([u({type:["ArcGISVideoLayer"]})],ue.prototype,"operationalLayerType",void 0),e([u({readOnly:!0})],ue.prototype,"parsedUrl",null),e([u({type:N})],ue.prototype,"playbackInfo",void 0),e([u({type:Number})],ue.prototype,"playbackRate",null),e([u({readOnly:!0,type:String})],ue.prototype,"playerUrl",null),e([u({readOnly:!0})],ue.prototype,"playing",null),e([u({readOnly:!0,json:{read:{source:"poster"}}})],ue.prototype,"posterUrl",void 0),e([u({readOnly:!0})],ue.prototype,"qualities",void 0),e([u()],ue.prototype,"sensorSymbolOrientation",void 0),e([u(ye)],ue.prototype,"sensorSymbol",void 0),e([u(me("drawingInfo.sensorSightLineSymbol",K))],ue.prototype,"sensorSightLineSymbol",void 0),e([u(me("drawingInfo.sensorTrailSymbol",K))],ue.prototype,"sensorTrailSymbol",void 0),e([u({readOnly:!0})],ue.prototype,"serviceItemId",void 0),e([u()],ue.prototype,"sourceJSON",void 0),e([u({readOnly:!0})],ue.prototype,"sourceQuality",void 0),e([u({readOnly:!0,json:{name:"serviceType"}})],ue.prototype,"sourceType",void 0),e([u({type:v})],ue.prototype,"spatialReference",void 0),e([u({json:{write:!0}})],ue.prototype,"start",void 0),e([u({readOnly:!0})],ue.prototype,"started",null),e([u({readOnly:!0,type:String})],ue.prototype,"state",null),e([u({readOnly:!0,type:F})],ue.prototype,"telemetry",null),e([u({type:V,nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],ue.prototype,"telemetryDisplay",void 0),e([te("service","title",["name"])],ue.prototype,"readTitleFromService",null),e([te("portal-item","title")],ue.prototype,"readTitleFromPortalItem",null),e([u({type:String})],ue.prototype,"sublayerTitleMode",void 0),e([u({readOnly:!0})],ue.prototype,"type",void 0),e([u(M())],ue.prototype,"url",void 0),e([u({readOnly:!0,type:Number,json:{read:{source:"currentVersion"}}})],ue.prototype,"version",void 0),e([u({readOnly:!0})],ue.prototype,"videoElement",null),e([u({readOnly:!0})],ue.prototype,"videoHeight",null),e([u({readOnly:!0,json:{read:!1}})],ue.prototype,"videoLayersInfo",void 0),e([te("service","videoLayersInfo",["id","name","poster","serviceType","type"])],ue.prototype,"readLayerInfosFromService",null),e([u({type:J,readOnly:!0})],ue.prototype,"videoTimeExtent",null),e([u({readOnly:!0})],ue.prototype,"videoWidth",null),e([u()],ue.prototype,"volume",null),e([u({readOnly:!0})],ue.prototype,"waiting",null),ue=e([d("esri.layers.VideoLayer")],ue);const de=ue;export{de as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../Color.js";import r from"../request.js";import{deprecatedProperty as o}from"../core/deprecate.js";import i from"../core/Error.js";import s from"../core/Logger.js";import{clamp as l}from"../core/mathUtils.js";import{MultiOriginJSONSupportMixin as n}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{watch as p,initial as m,whenOnce as y}from"../core/reactiveUtils.js";import{property as u,subclass as d}from"../core/accessorSupport/decorators.js";import{Integer as c}from"../core/accessorSupport/ensureType.js";import h from"../geometry/Extent.js";import f from"../geometry/Point.js";import v from"../geometry/Polygon.js";import g from"../geometry/Polyline.js";import S from"../geometry/SpatialReference.js";import b from"./Layer.js";import{ArcGISService as O}from"./mixins/ArcGISService.js";import{BlendLayer as j,effectProperty as T}from"./mixins/BlendLayer.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as P}from"./mixins/OperationalLayer.js";import{PortalLayer as I}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as C}from"./mixins/ScaleRangeLayer.js";import{parse as L,cleanTitle as x,titleFromUrlAndName as U}from"./support/arcgisLayerUrl.js";import{opacity as E,id as M}from"./support/commonProperties.js";import{normalizeParsedUrlObject as N,urlProperty as _}from"./support/multiLayerServiceUtils.js";import k from"./support/PlaybackInfo.js";import{getVideoLayerCapabilities as J}from"./support/serviceCapabilitiesUtils.js";import F from"./support/TelemetryData.js";import V from"./support/TelemetryDisplay.js";import R from"./support/VideoFrame.js";import H from"./support/VideoTimeExtent.js";import G from"./video/VideoController.js";import{getFrameHorizonPoints as q,getGroundControlPoints as z,getTelemetryData as A,getServiceLayersInfo as D,getStyledTelemetrySymbol as Z,getLineOfSight as B,getSensorTrailPoints as Q,readVideoTimeExtent as W}from"./video/videoUtils.js";import $ from"../symbols/CIMSymbol.js";import K from"../symbols/PictureMarkerSymbol.js";import X from"../symbols/SimpleFillSymbol.js";import Y from"../symbols/SimpleLineSymbol.js";import ee from"../symbols/SimpleMarkerSymbol.js";import te from"../symbols/Symbol.js";import{write as re}from"../symbols/support/jsonUtils.js";import{addLayerUnsupportedError as oe}from"../webdoc/support/unsupportedErrors.js";import{reader as ie}from"../core/accessorSupport/decorators/reader.js";function se(e,t){return{ignoreOrigin:this.originIdOf(t)<3}}const le=new t([255,127,0]),ne=new t([0,0,0,.05]),ae=new t([0,0,0]),pe=new ee({angle:0,color:le,size:10,style:"cross"}),me=new X({color:ne,outline:new Y({color:le,width:2})}),ye=new Y({color:ae,style:"dash",width:1}),ue=new Y({color:le,width:1}),de=new ee({angle:0,color:le,outline:{color:[255,255,255],width:1.33},size:10,style:"circle"}),ce=new Y({color:le,width:1}),he={types:{base:te,key:"type",typeMap:{"simple-marker":ee,"picture-marker":K,cim:$}},json:{name:"drawingInfo.sensorSymbol",write:{writer:re,overridePolicy:se}}};function fe(e,t){return{type:t,json:{name:e,write:{overridePolicy:se}}}}let ve=class extends(j(C(O(P(I(n(w(b)))))))){constructor(e){super(e),this._trailPoints=[],this.cameraInfo=null,this.capabilities=null,this.codecs=null,this.connectionInfo=null,this.controller=new G,this.copyright=null,this.coverage=null,this.created=null,this.customParameters=null,this.description=null,this.elevationSource=null,this.frame=null,this.frameCenterSymbol=pe.clone(),this.frameCount=null,this.frameEffect=null,this.frameOpacity=1,this.frameOutlineSymbol=me.clone(),this.fullExtent=null,this.fullTimeExtent=null,this.initialExtent=null,this.layerId=null,this.operationalLayerType="ArcGISVideoLayer",this.playbackInfo=null,this.posterUrl=null,this.qualities=null,this.sensorSymbolOrientation={source:"platformHeading",symbolOffset:0},this.sensorPathSymbol=ye.clone(),this.sensorSymbol=de.clone(),this.sensorSightLineSymbol=ue.clone(),this.sensorTrailSymbol=ce.clone(),this.serviceItemId=null,this.sourceJSON=null,this.sourceQuality=null,this.sourceType=null,this.spatialReference=S.WGS84,this.start=0,this.telemetryDisplay=new V,this.sublayerTitleMode="item-title",this.type="video",this.url=null,this.version=null,this.videoLayersInfo=null}initialize(){this.addHandles([p(()=>this.metadata,()=>{this.notifyChange("telemetry"),this.notifyChange("groundControlPoints"),this.notifyChange("frameHorizonPoints")}),p(()=>this.telemetry?.sensorLocation,e=>{this._setSensorPath(e),this._setSensorTrail(e)},m)]),y(()=>this.loaded&&"can-play"===this.state&&this.duration>0).then(()=>{this.start>=0&&this.start<=this.duration&&this.setCurrentTime(this.start)})}destroy(){this.removeAllHandles(),this.controller&&this.controller.destroy()}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Video Service"],supportsData:!0},e).catch(a).then(()=>this._fetchService(t)).then(()=>this._fetchCoverage(t));return this.addResolvingPromise(r),Promise.resolve(this)}get autoplay(){return this.controller?.autoplay??!1}set autoplay(e){this.controller.autoplay=e}get buffered(){return this.controller.buffered}readCapabilitiesFromService(e,t){return J(t)}readConnectionInfo(e,t){const r=Object.values(t.connectionUrl);return r?.length&&(this.controller.startMode="ondemand"===t.serviceType?"auto":"metadata",this.controller.playerUrl=r[0]),t.connectionUrl}get currentTime(){return this.controller.currentTime}get duration(){return this.controller.duration}get ended(){return this.controller.ended}get frameHorizonPoints(){return q(this.metadata)}get groundControlPoints(){return z(this.metadata)}get isLive(){return this.controller?.isLive??!1}get livestreamStatus(){return this.controller?.livestreamStatus}get loop(){return this.controller.loop}set loop(e){this.controller.loop=e}get metadata(){return this.controller?.currentMetadata}get mimeType(){return this.controller?.mimeType}get muted(){return this.controller.muted}set muted(e){this.controller.muted=e}get parsedUrl(){return N(this)}get playbackRate(){return this.controller.rate}set playbackRate(e){this.controller.rate=e}get playerUrl(){return this.controller.playerUrl}get playing(){return this.controller.playing}get started(){return this.controller?.started??!1}get state(){return this.controller.state}get telemetry(){return A(this.metadata)}readTitleFromService(e,t){const{url:r}=this,o=t.name||(r?L(r)?.title:void 0);switch(this.sublayerTitleMode){case"item-title":if(r)return U(r,o);break;case"item-title-and-service-name":{const e=this.portalItem?.title;if(e&&e!==o)return x(e)+(o?" - "+x(o):"");break}}return o?x(o):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}get videoElement(){return this.controller?.element}get videoHeight(){return this.controller?.videoHeight}readLayerInfosFromService(e,t){return D(t)}get videoTimeExtent(){return o(s.getLogger(this),"videoTimeExtent",{replacement:"fullTimeExtent",version:"4.33",warnOnce:!0}),this.fullTimeExtent}get videoWidth(){return this.controller?.videoWidth}get volume(){return this.controller?.volume??0}set volume(e){this.controller.volume=e}get waiting(){return this.controller.waiting}play(){this.controller.play()}pause(){this.controller.pause()}reset(){this._trailPoints=[],this.controller.reset()}setCurrentTime(e){if(this.duration<0)return;const t=l(e,0,this.duration);this.controller.setCurrentTime(t)}toGround(e,t){return this.controller?.sensorModel?.metadataSupportsTransforms?this.controller.sensorModel.transformImageToGeo(e,t):null}toVideo(e){if(!this.controller?.sensorModel?.metadataSupportsTransforms)return null;const t=this.controller.sensorModel.transformGeoToImage(e.x,e.y,e.z);return{x:t[0],y:t[1]}}updateTelemetryColor(e,r){if(!e)return;const o=new t(e);r&&!r?.frameCenter||(this.frameCenterSymbol=Z(this.frameCenterSymbol,o)??pe),r&&!r?.frameOutline||(this.frameOutlineSymbol=Z(this.frameOutlineSymbol,o,ne)??me),r&&!r?.lineOfSight||(this.sensorSightLineSymbol=Z(this.sensorSightLineSymbol,o)??ue),r&&!r?.sensorLocation||(this.sensorSymbol=Z(this.sensorSymbol,o)??de),r&&!r?.sensorPath||(this.sensorPathSymbol=Z(this.sensorPathSymbol,o)??ye),r&&!r?.sensorTrail||(this.sensorTrailSymbol=Z(this.sensorTrailSymbol,o)??ce)}write(e,t){return null==this.layerId?(oe(t,this,"the ArcGIS server version must be greater than 11.2."),null):super.write(e,t)}async _fetchCoverage(e){if(!this.capabilities?.operations?.supportsCoverageQuery||"number"!=typeof this.layerId)return;const t=`${this.parsedUrl.path}/coverage`,{data:o}=await r(t,{query:{f:"json",...this.customParameters},signal:e}),{area:i=null,sensorPoints:s=null,telemetry:l=null}=o,n={area:null,path:null};if(i?.rings?.length&&(n.area=v.fromJSON(i)),s?.points?.length){const e=s.points;n.path=new g({hasM:!0,hasZ:!0,paths:[e]})}if(l?.start){const{frameCenter:e=null,frameOutline:t=null,sensor:r=null}=l?.start||{};if(t&&(this.telemetry.frameOutline=v.fromJSON(t)),r&&(this.telemetry.sensorLocation=f.fromJSON(r)),e&&(this.telemetry.frameCenter=f.fromJSON(e)),r&&e){const{sensorLocation:e,frameCenter:t}=this.telemetry;this.telemetry.lineOfSight=B(e,t)}}this._set("coverage",n)}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:o}=await r(this.url,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:e});if(o&&(this.url=this.url.replace(/^http:/i,"https:")),!t?.currentVersion)return t.currentVersion="11.2",this.sourceJSON=t,void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});if(this.layerId??=t.layers?.[0]?.id??null,null==this.layerId)throw new i("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");const{data:s}=await r(this.parsedUrl.path,{query:{f:"json",...this.customParameters},signal:e});this.sourceJSON={...t,...s},this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl})}_setSensorTrail(e){if(!e)return;const t=Q(e,this._trailPoints);this._trailPoints=[...t];const r=this._trailPoints.map(e=>e.toArray()),o=new g({hasZ:e.hasZ,paths:[r]});this.telemetry.sensorTrail=o.clone()}_setSensorPath(e){if(!e||"polyline"!==this.coverage?.path?.type)return;const t=this.telemetry?.sensorPath??this.coverage.path.clone(),{spatialReference:r,hasZ:o,hasM:i,paths:s}=t;if(!i)return;const l=t.hasZ?3:2,n=1e3*this.currentTime,a=[];for(const p of s){let e=0;const t=p.length,r=n>500?n+1500:n;for(;e<t&&p[e][l]<=r;)e++;e<p.length&&a.push(...p.slice(e))}this.telemetry.sensorPath=new g({hasZ:o,hasM:i,paths:[a],spatialReference:r})}};e([u({type:Boolean,json:{write:{ignoreOrigin:!0}}})],ve.prototype,"autoplay",null),e([u({readOnly:!0})],ve.prototype,"buffered",null),e([u({readOnly:!0})],ve.prototype,"cameraInfo",void 0),e([u({readOnly:!0,json:{read:!1}})],ve.prototype,"capabilities",void 0),e([ie("service","capabilities",["supportsAppend","supportsCoverageQuery","supportsExportClip","supportsExportFrameset","supportsMensuration","supportsPreviews","supportsUpdate"])],ve.prototype,"readCapabilitiesFromService",null),e([u({readOnly:!0})],ve.prototype,"codecs",void 0),e([u({readOnly:!0})],ve.prototype,"connectionInfo",void 0),e([ie("connectionInfo",["connectionUrl"])],ve.prototype,"readConnectionInfo",null),e([u()],ve.prototype,"controller",void 0),e([u({type:String})],ve.prototype,"copyright",void 0),e([u({readOnly:!0})],ve.prototype,"coverage",void 0),e([u({readOnly:!0,type:Date})],ve.prototype,"created",void 0),e([u({type:Number})],ve.prototype,"currentTime",null),e([u({json:{write:!1}})],ve.prototype,"customParameters",void 0),e([u({type:String})],ve.prototype,"description",void 0),e([u({type:Number})],ve.prototype,"duration",null),e([u({readOnly:!0})],ve.prototype,"elevationSource",void 0),e([u({type:Boolean})],ve.prototype,"ended",null),e([u({type:R})],ve.prototype,"frame",void 0),e([u(fe("drawingInfo.frameCenterSymbol",ee))],ve.prototype,"frameCenterSymbol",void 0),e([u({readOnly:!0,type:c})],ve.prototype,"frameCount",void 0),e([u(T)],ve.prototype,"frameEffect",void 0),e([u(E)],ve.prototype,"frameOpacity",void 0),e([u(fe("drawingInfo.frameOutlineSymbol",X))],ve.prototype,"frameOutlineSymbol",void 0),e([u({type:h})],ve.prototype,"fullExtent",void 0),e([u({readOnly:!0})],ve.prototype,"frameHorizonPoints",null),e([u({readOnly:!0,json:{read:{reader:W,source:"time"}},type:H})],ve.prototype,"fullTimeExtent",void 0),e([u({readOnly:!0})],ve.prototype,"groundControlPoints",null),e([u(M)],ve.prototype,"id",void 0),e([u({type:h})],ve.prototype,"initialExtent",void 0),e([u({readOnly:!0})],ve.prototype,"isLive",null),e([u({type:c,json:{read:!1,origins:{service:{read:{source:"id"}}}}})],ve.prototype,"layerId",void 0),e([u({readOnly:!0})],ve.prototype,"livestreamStatus",null),e([u({type:Boolean})],ve.prototype,"loop",null),e([u({readOnly:!0})],ve.prototype,"metadata",null),e([u({readOnly:!0})],ve.prototype,"mimeType",null),e([u({type:Boolean,json:{write:{ignoreOrigin:!0}}})],ve.prototype,"muted",null),e([u({type:["ArcGISVideoLayer"]})],ve.prototype,"operationalLayerType",void 0),e([u({readOnly:!0})],ve.prototype,"parsedUrl",null),e([u({type:k})],ve.prototype,"playbackInfo",void 0),e([u({type:Number})],ve.prototype,"playbackRate",null),e([u({readOnly:!0,type:String})],ve.prototype,"playerUrl",null),e([u({readOnly:!0})],ve.prototype,"playing",null),e([u({readOnly:!0,json:{read:{source:"poster"}}})],ve.prototype,"posterUrl",void 0),e([u({readOnly:!0})],ve.prototype,"qualities",void 0),e([u()],ve.prototype,"sensorSymbolOrientation",void 0),e([u(fe("drawingInfo.sensorPathSymbol",Y))],ve.prototype,"sensorPathSymbol",void 0),e([u(he)],ve.prototype,"sensorSymbol",void 0),e([u(fe("drawingInfo.sensorSightLineSymbol",Y))],ve.prototype,"sensorSightLineSymbol",void 0),e([u(fe("drawingInfo.sensorTrailSymbol",Y))],ve.prototype,"sensorTrailSymbol",void 0),e([u({readOnly:!0})],ve.prototype,"serviceItemId",void 0),e([u()],ve.prototype,"sourceJSON",void 0),e([u({readOnly:!0})],ve.prototype,"sourceQuality",void 0),e([u({readOnly:!0,json:{name:"serviceType"}})],ve.prototype,"sourceType",void 0),e([u({type:S})],ve.prototype,"spatialReference",void 0),e([u({json:{write:!0}})],ve.prototype,"start",void 0),e([u({readOnly:!0})],ve.prototype,"started",null),e([u({readOnly:!0,type:String})],ve.prototype,"state",null),e([u({readOnly:!0,type:F})],ve.prototype,"telemetry",null),e([u({type:V,nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],ve.prototype,"telemetryDisplay",void 0),e([ie("service","title",["name"])],ve.prototype,"readTitleFromService",null),e([ie("portal-item","title")],ve.prototype,"readTitleFromPortalItem",null),e([u({type:String})],ve.prototype,"sublayerTitleMode",void 0),e([u({readOnly:!0})],ve.prototype,"type",void 0),e([u(_())],ve.prototype,"url",void 0),e([u({readOnly:!0,type:Number,json:{read:{source:"currentVersion"}}})],ve.prototype,"version",void 0),e([u({readOnly:!0})],ve.prototype,"videoElement",null),e([u({readOnly:!0})],ve.prototype,"videoHeight",null),e([u({readOnly:!0,json:{read:!1}})],ve.prototype,"videoLayersInfo",void 0),e([ie("service","videoLayersInfo",["id","name","poster","serviceType","type"])],ve.prototype,"readLayerInfosFromService",null),e([u({type:H,readOnly:!0})],ve.prototype,"videoTimeExtent",null),e([u({readOnly:!0})],ve.prototype,"videoWidth",null),e([u()],ve.prototype,"volume",null),e([u({readOnly:!0})],ve.prototype,"waiting",null),ve=e([d("esri.layers.VideoLayer")],ve);const ge=ve;export{ge as default};
|