@vertigis/viewer-spec 56.24.0 → 56.26.0

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.
Files changed (268) hide show
  1. package/analytics/AnalyticsContext.d.ts +29 -29
  2. package/analytics/AnalyticsContext.js +1 -1
  3. package/analytics/CommonAction.d.ts +90 -90
  4. package/analytics/CommonAction.js +1 -1
  5. package/analytics/MobileAction.d.ts +113 -113
  6. package/analytics/MobileAction.js +1 -1
  7. package/analytics/WebAction.d.ts +102 -102
  8. package/analytics/WebAction.js +1 -1
  9. package/app-config/AppConfig.d.ts +55 -55
  10. package/app-config/ItemConfig.d.ts +18 -18
  11. package/app-config/common/AnalyticsModelProperties.d.ts +10 -10
  12. package/app-config/common/ApplicationModelProperties.d.ts +15 -15
  13. package/app-config/common/BasemapPickerModelProperties.d.ts +6 -6
  14. package/app-config/common/BookmarksModelProperties.d.ts +17 -17
  15. package/app-config/common/BrandingColors.d.ts +102 -102
  16. package/app-config/common/BrandingModelProperties.d.ts +23 -23
  17. package/app-config/common/BrandingThemeProperties.d.ts +35 -35
  18. package/app-config/common/CompassModelProperties.d.ts +6 -6
  19. package/app-config/common/ComponentModelProperties.d.ts +14 -14
  20. package/app-config/common/CoordinateFormat.d.ts +4 -4
  21. package/app-config/common/CoordinateModelProperties.d.ts +43 -43
  22. package/app-config/common/DialogModelProperties.d.ts +6 -6
  23. package/app-config/common/EventListenerModelProperties.d.ts +44 -44
  24. package/app-config/common/ExpandModelProperties.d.ts +6 -6
  25. package/app-config/common/FeatureDetailsModelProperties.d.ts +27 -27
  26. package/app-config/common/GeolocationModelProperties.d.ts +6 -6
  27. package/app-config/common/HighlightModelProperties.d.ts +68 -68
  28. package/app-config/common/ImageModelProperties.d.ts +14 -14
  29. package/app-config/common/ItemRef.d.ts +4 -4
  30. package/app-config/common/LayerListModelProperties.d.ts +6 -6
  31. package/app-config/common/LayerPresetsModelProperties.d.ts +14 -14
  32. package/app-config/common/LayoutProperties.d.ts +33 -33
  33. package/app-config/common/LegendModelProperties.d.ts +6 -6
  34. package/app-config/common/LicensingModelProperties.d.ts +10 -10
  35. package/app-config/common/MapCoordinatesModelProperties.d.ts +6 -6
  36. package/app-config/common/MapModelProperties.d.ts +7 -7
  37. package/app-config/common/MenuModelProperties.d.ts +13 -13
  38. package/app-config/common/ModelProperties.d.ts +6 -6
  39. package/app-config/common/PanelModelProperties.d.ts +6 -6
  40. package/app-config/common/RegionModelProperties.d.ts +25 -25
  41. package/app-config/common/ResultsModelProperties.d.ts +13 -13
  42. package/app-config/common/ScalebarModelProperties.d.ts +6 -6
  43. package/app-config/common/SearchModelProperties.d.ts +26 -26
  44. package/app-config/common/ServiceModelProperties.d.ts +6 -6
  45. package/app-config/common/SplitModelProperties.d.ts +6 -6
  46. package/app-config/common/StackModelProperties.d.ts +6 -6
  47. package/app-config/common/TextModelProperties.d.ts +10 -10
  48. package/app-config/common/TranslatableText.d.ts +35 -35
  49. package/app-config/common/UserModelProperties.d.ts +6 -6
  50. package/app-config/common/WorkflowEventsProperties.d.ts +11 -11
  51. package/app-config/common/WorkflowModelProperties.d.ts +44 -44
  52. package/app-config/common/ZoomModelProperties.d.ts +6 -6
  53. package/app-config/common/colors.d.ts +6 -6
  54. package/app-config/index.d.ts +2 -2
  55. package/app-config/mobile/AddFeatureModelProperties.d.ts +6 -6
  56. package/app-config/mobile/AddRelatedFeatureModelProperties.d.ts +6 -6
  57. package/app-config/mobile/BasemapModelProperties.d.ts +11 -11
  58. package/app-config/mobile/CoordinateModelProperties.d.ts +10 -10
  59. package/app-config/mobile/FeatureDetailsModelProperties.d.ts +26 -26
  60. package/app-config/mobile/GeometryToolbarModelProperties.d.ts +6 -6
  61. package/app-config/mobile/GnssDeviceSelectionModelProperties.d.ts +6 -6
  62. package/app-config/mobile/GnssDeviceSettingsModelProperties.d.ts +6 -6
  63. package/app-config/mobile/GnssMetadataModelProperties.d.ts +6 -6
  64. package/app-config/mobile/MapModelProperties.d.ts +52 -52
  65. package/app-config/mobile/OfflineModelProperties.d.ts +48 -48
  66. package/app-config/mobile/PortalExtensionSettingsProperties.d.ts +27 -27
  67. package/app-config/mobile/ScrollModelProperties.d.ts +6 -6
  68. package/app-config/mobile/SearchModelProperties.d.ts +14 -14
  69. package/app-config/mobile/SelectLayerSettingsModelProperties.d.ts +11 -11
  70. package/app-config/mobile/TaskbarModelProperties.d.ts +6 -6
  71. package/app-config/mobile/UpdateFeatureModelProperties.d.ts +6 -6
  72. package/app-config/mobile/VertigisMobileModelProperties.d.ts +67 -67
  73. package/app-config/schema/common-app-config.schema.json +1 -1
  74. package/app-config/schema/web-app-config.schema.json +1 -1
  75. package/app-config/web/AddressModelProperties.d.ts +6 -6
  76. package/app-config/web/BasemapModelProperties.d.ts +10 -10
  77. package/app-config/web/BasemapPickerModelProperties.d.ts +7 -7
  78. package/app-config/web/BookmarksModelProperties.d.ts +7 -7
  79. package/app-config/web/BrandingModelProperties.d.ts +14 -14
  80. package/app-config/web/ChartModelProperties.d.ts +58 -58
  81. package/app-config/web/CompassModelProperties.d.ts +7 -7
  82. package/app-config/web/ComponentModelProperties.d.ts +12 -12
  83. package/app-config/web/CoordinateModelProperties.d.ts +50 -50
  84. package/app-config/web/DataLinkSourceProperties.d.ts +15 -15
  85. package/app-config/web/DialogModelProperties.d.ts +7 -7
  86. package/app-config/web/DrawModelProperties.d.ts +94 -94
  87. package/app-config/web/FeatureDetailsModelProperties.d.ts +19 -19
  88. package/app-config/web/FeatureInfoModelProperties.d.ts +38 -38
  89. package/app-config/web/FeatureListProperties.d.ts +12 -12
  90. package/app-config/web/FeatureSetProperties.d.ts +16 -16
  91. package/app-config/web/FeatureSummaryModelProperties.d.ts +27 -27
  92. package/app-config/web/GeolocationModelProperties.d.ts +7 -7
  93. package/app-config/web/GeometryModelProperties.d.ts +27 -27
  94. package/app-config/web/HasVisibilityFilters.d.ts +36 -36
  95. package/app-config/web/ImageModelProperties.d.ts +7 -7
  96. package/app-config/web/KpiCardModelProperties.d.ts +146 -146
  97. package/app-config/web/LayerListModelProperties.d.ts +18 -18
  98. package/app-config/web/LayerPresetsModelProperties.d.ts +7 -7
  99. package/app-config/web/LegendModelProperties.d.ts +7 -7
  100. package/app-config/web/Map3dToggleModelProperties.d.ts +6 -6
  101. package/app-config/web/MapCoordinatesModelProperties.d.ts +50 -50
  102. package/app-config/web/MapModelProperties.d.ts +93 -87
  103. package/app-config/web/MeasurementModelProperties.d.ts +36 -36
  104. package/app-config/web/MenuItemModelProperties.d.ts +7 -7
  105. package/app-config/web/MenuModelProperties.d.ts +13 -13
  106. package/app-config/web/ModelProperties.d.ts +7 -7
  107. package/app-config/web/PanelModelProperties.d.ts +7 -7
  108. package/app-config/web/PortalModelProperties.d.ts +11 -11
  109. package/app-config/web/PrintFormModelProperties.d.ts +42 -42
  110. package/app-config/web/PrintModelProperties.d.ts +11 -11
  111. package/app-config/web/ProjectModelProperties.d.ts +12 -12
  112. package/app-config/web/QueryBuilderModelProperties.d.ts +22 -22
  113. package/app-config/web/ReportModelProperties.d.ts +15 -15
  114. package/app-config/web/ResultsModelProperties.d.ts +101 -101
  115. package/app-config/web/ResultsServiceModelProperties.d.ts +48 -48
  116. package/app-config/web/ScaleInputModelProperties.d.ts +6 -6
  117. package/app-config/web/ScalebarModelProperties.d.ts +22 -22
  118. package/app-config/web/SearchModelProperties.d.ts +22 -22
  119. package/app-config/web/SearchServiceProperties.d.ts +25 -25
  120. package/app-config/web/SharedProjectsModelProperties.d.ts +53 -53
  121. package/app-config/web/SharedStorageModelProperties.d.ts +30 -30
  122. package/app-config/web/SnappingProperties.d.ts +101 -101
  123. package/app-config/web/SplitModelProperties.d.ts +7 -7
  124. package/app-config/web/StackModelProperties.d.ts +7 -7
  125. package/app-config/web/TabsModelProperties.d.ts +6 -6
  126. package/app-config/web/TextModelProperties.d.ts +7 -7
  127. package/app-config/web/TopologyProperties.d.ts +67 -0
  128. package/app-config/web/TopologyProperties.js +1 -0
  129. package/app-config/web/UserModelProperties.d.ts +12 -12
  130. package/app-config/web/UserPreferencesModelProperties.d.ts +10 -10
  131. package/app-config/web/VertigisWebModelProperties.d.ts +74 -74
  132. package/app-config/web/WorkflowModelProperties.d.ts +13 -13
  133. package/app-config/web/ZoomModelProperties.d.ts +7 -7
  134. package/messaging/Command.d.ts +76 -76
  135. package/messaging/CommandRegistry.d.ts +25 -25
  136. package/messaging/CommandRegistry.js +1 -1
  137. package/messaging/DotNetTypes.d.ts +4 -4
  138. package/messaging/Event.d.ts +26 -26
  139. package/messaging/EventRegistry.d.ts +25 -25
  140. package/messaging/EventRegistry.js +1 -1
  141. package/messaging/Message.d.ts +50 -50
  142. package/messaging/MessageBus.d.ts +54 -54
  143. package/messaging/Operation.d.ts +77 -77
  144. package/messaging/OperationRegistry.d.ts +26 -26
  145. package/messaging/OperationRegistry.js +1 -1
  146. package/messaging/common.d.ts +354 -354
  147. package/messaging/mobile.d.ts +6 -6
  148. package/messaging/registry/Commands.d.ts +78 -78
  149. package/messaging/registry/Commands.js +1 -1
  150. package/messaging/registry/Events.d.ts +62 -62
  151. package/messaging/registry/Events.js +1 -1
  152. package/messaging/registry/Operations.d.ts +69 -69
  153. package/messaging/registry/Operations.js +1 -1
  154. package/messaging/registry/app-config.d.ts +12 -12
  155. package/messaging/registry/app-config.js +1 -1
  156. package/messaging/registry/app.d.ts +264 -264
  157. package/messaging/registry/app.js +1 -1
  158. package/messaging/registry/arcade.d.ts +115 -115
  159. package/messaging/registry/arcade.js +1 -1
  160. package/messaging/registry/auth.d.ts +151 -151
  161. package/messaging/registry/auth.js +1 -1
  162. package/messaging/registry/basemap.d.ts +74 -74
  163. package/messaging/registry/basemap.js +1 -1
  164. package/messaging/registry/bookmark.d.ts +42 -42
  165. package/messaging/registry/bookmark.js +1 -1
  166. package/messaging/registry/charts.d.ts +81 -81
  167. package/messaging/registry/charts.js +1 -1
  168. package/messaging/registry/debugConsole.d.ts +26 -26
  169. package/messaging/registry/debugConsole.js +1 -1
  170. package/messaging/registry/device.d.ts +28 -28
  171. package/messaging/registry/device.js +1 -1
  172. package/messaging/registry/display.d.ts +17 -17
  173. package/messaging/registry/display.js +1 -1
  174. package/messaging/registry/drawing.d.ts +149 -149
  175. package/messaging/registry/drawing.js +1 -1
  176. package/messaging/registry/edit.d.ts +371 -371
  177. package/messaging/registry/edit.js +1 -1
  178. package/messaging/registry/file.d.ts +156 -156
  179. package/messaging/registry/file.js +1 -1
  180. package/messaging/registry/filter-builder.d.ts +73 -73
  181. package/messaging/registry/filter-builder.js +1 -1
  182. package/messaging/registry/geocode.d.ts +87 -87
  183. package/messaging/registry/geocode.js +1 -1
  184. package/messaging/registry/geolocation.d.ts +499 -499
  185. package/messaging/registry/geolocation.js +1 -1
  186. package/messaging/registry/geometry-toolbar.d.ts +29 -29
  187. package/messaging/registry/geometry-toolbar.js +1 -1
  188. package/messaging/registry/geometry.d.ts +278 -278
  189. package/messaging/registry/geometry.js +1 -1
  190. package/messaging/registry/highlights.d.ts +86 -86
  191. package/messaging/registry/highlights.js +1 -1
  192. package/messaging/registry/input.d.ts +22 -22
  193. package/messaging/registry/input.js +1 -1
  194. package/messaging/registry/iwtm.d.ts +11 -11
  195. package/messaging/registry/iwtm.js +1 -1
  196. package/messaging/registry/kpi.d.ts +98 -98
  197. package/messaging/registry/kpi.js +1 -1
  198. package/messaging/registry/layer-comparison.d.ts +104 -104
  199. package/messaging/registry/layer-comparison.js +1 -1
  200. package/messaging/registry/layer-presets.d.ts +49 -49
  201. package/messaging/registry/layer-presets.js +1 -1
  202. package/messaging/registry/layers.d.ts +196 -196
  203. package/messaging/registry/layers.js +1 -1
  204. package/messaging/registry/layout.d.ts +49 -49
  205. package/messaging/registry/layout.js +1 -1
  206. package/messaging/registry/licensing.d.ts +38 -38
  207. package/messaging/registry/licensing.js +1 -1
  208. package/messaging/registry/location-marker.d.ts +171 -171
  209. package/messaging/registry/location-marker.js +1 -1
  210. package/messaging/registry/logViewer.d.ts +17 -17
  211. package/messaging/registry/logViewer.js +1 -1
  212. package/messaging/registry/map.d.ts +1275 -1275
  213. package/messaging/registry/map.js +1 -1
  214. package/messaging/registry/measurement.d.ts +168 -168
  215. package/messaging/registry/measurement.js +1 -1
  216. package/messaging/registry/messaging.d.ts +23 -23
  217. package/messaging/registry/messaging.js +1 -1
  218. package/messaging/registry/network.d.ts +46 -46
  219. package/messaging/registry/network.js +1 -1
  220. package/messaging/registry/offline.d.ts +508 -507
  221. package/messaging/registry/offline.js +1 -1
  222. package/messaging/registry/panel.d.ts +115 -115
  223. package/messaging/registry/panel.js +1 -1
  224. package/messaging/registry/photos.d.ts +47 -47
  225. package/messaging/registry/photos.js +1 -1
  226. package/messaging/registry/portal.d.ts +94 -94
  227. package/messaging/registry/portal.js +1 -1
  228. package/messaging/registry/printing.d.ts +166 -166
  229. package/messaging/registry/printing.js +1 -1
  230. package/messaging/registry/project.d.ts +144 -144
  231. package/messaging/registry/project.js +1 -1
  232. package/messaging/registry/query-builder.d.ts +83 -83
  233. package/messaging/registry/query-builder.js +1 -1
  234. package/messaging/registry/region.d.ts +23 -23
  235. package/messaging/registry/region.js +1 -1
  236. package/messaging/registry/reports.d.ts +135 -135
  237. package/messaging/registry/reports.js +1 -1
  238. package/messaging/registry/results.d.ts +671 -671
  239. package/messaging/registry/results.js +1 -1
  240. package/messaging/registry/search.d.ts +74 -74
  241. package/messaging/registry/search.js +1 -1
  242. package/messaging/registry/settings.d.ts +38 -38
  243. package/messaging/registry/settings.js +1 -1
  244. package/messaging/registry/shortcut.d.ts +41 -41
  245. package/messaging/registry/shortcut.js +1 -1
  246. package/messaging/registry/sketching.d.ts +1019 -960
  247. package/messaging/registry/sketching.js +1 -1
  248. package/messaging/registry/studioAnalytics.d.ts +25 -25
  249. package/messaging/registry/studioAnalytics.js +1 -1
  250. package/messaging/registry/system.d.ts +277 -277
  251. package/messaging/registry/system.js +1 -1
  252. package/messaging/registry/tasks.d.ts +323 -323
  253. package/messaging/registry/tasks.js +1 -1
  254. package/messaging/registry/ui.d.ts +518 -518
  255. package/messaging/registry/ui.js +1 -1
  256. package/messaging/registry/viewer.d.ts +145 -145
  257. package/messaging/registry/viewer.js +1 -1
  258. package/messaging/registry/workflow.d.ts +170 -170
  259. package/messaging/registry/workflow.js +1 -1
  260. package/messaging/schema/common-action.schema.json +6437 -12158
  261. package/messaging/schema/common-event.schema.json +107 -803
  262. package/messaging/schema/mobile-action.schema.json +7719 -16138
  263. package/messaging/schema/mobile-event.schema.json +181 -2422
  264. package/messaging/schema/web-action.schema.json +8415 -23272
  265. package/messaging/schema/web-event.schema.json +183 -1937
  266. package/package.json +20 -20
  267. package/version.d.ts +4 -4
  268. package/version.js +4 -4
@@ -1,960 +1,1019 @@
1
- import type Graphic from "@arcgis/core/Graphic";
2
- import type Geometry from "@arcgis/core/geometry/Geometry";
3
- import type Point from "@arcgis/core/geometry/Point";
4
- import type LineSymbol3D from "@arcgis/core/symbols/LineSymbol3D";
5
- import type PictureFillSymbol from "@arcgis/core/symbols/PictureFillSymbol";
6
- import type PictureMarkerSymbol from "@arcgis/core/symbols/PictureMarkerSymbol";
7
- import type PointSymbol3D from "@arcgis/core/symbols/PointSymbol3D";
8
- import type PolygonSymbol3D from "@arcgis/core/symbols/PolygonSymbol3D";
9
- import type SimpleFillSymbol from "@arcgis/core/symbols/SimpleFillSymbol";
10
- import type SimpleLineSymbol from "@arcgis/core/symbols/SimpleLineSymbol";
11
- import type SimpleMarkerSymbol from "@arcgis/core/symbols/SimpleMarkerSymbol";
12
- import type Symbol from "@arcgis/core/symbols/Symbol";
13
- import type TextSymbol from "@arcgis/core/symbols/TextSymbol";
14
- import type { LineSymbol3DJson, PictureFillSymbolJson, PictureMarkerSymbolJson, PointSymbol3DJson, PolygonSymbol3DJson, SimpleFillSymbolJson, SimpleLineSymbolJson, SimpleMarkerSymbolJson, SymbolJson } from "@vertigis/arcgis-extensions/json/SymbolJson.js";
15
- import type { MapExtension } from "@vertigis/arcgis-extensions/mapping/MapExtension";
16
- import type { SnappingProperties } from "app-config/web/SnappingProperties.js";
17
- import type { Command } from "../Command.js";
18
- import { CommandRegistry } from "../CommandRegistry.js";
19
- import type { Event } from "../Event.js";
20
- import { EventRegistry } from "../EventRegistry.js";
21
- import type { Operation } from "../Operation.js";
22
- import { OperationRegistry } from "../OperationRegistry.js";
23
- import type { FeaturesLike, GeometryLike, GraphicsLike, HasMaps, Maps, MapsLike } from "../common.js";
24
- import type { EditSymbolResult } from "./drawing.js";
25
- import type { GeodeticCurveType, LengthUnits, LengthUnitsMobile, ReferenceLine } from "./geometry.js";
26
- /**
27
- * A representation of a 2D vector or point.
28
- */
29
- export interface Vector2D {
30
- /**
31
- * The x component.
32
- */
33
- x: number;
34
- /**
35
- * The y component.
36
- */
37
- y: number;
38
- }
39
- /**
40
- * A set of symbols that can be used to sketch geometries.
41
- */
42
- export interface SymbolSet {
43
- /**
44
- * The symbol used to draw points.
45
- */
46
- pointSymbol?: SimpleMarkerSymbol | SimpleMarkerSymbolJson | PictureMarkerSymbol | PictureMarkerSymbolJson;
47
- /**
48
- * The symbol used to draw 3D points.
49
- */
50
- pointSymbol3D?: PointSymbol3D | PointSymbol3DJson;
51
- /**
52
- * The symbol used to draw lines.
53
- */
54
- lineSymbol?: SimpleLineSymbol | SimpleLineSymbolJson;
55
- /**
56
- * The symbol used to draw 3D lines.
57
- */
58
- lineSymbol3D?: LineSymbol3D | LineSymbol3DJson;
59
- /**
60
- * The symbol used to draw polygons.
61
- */
62
- polygonSymbol?: SimpleFillSymbol | SimpleFillSymbolJson | PictureFillSymbol | PictureFillSymbolJson;
63
- /**
64
- * The symbol used to draw 3D polygons.
65
- */
66
- polygonSymbol3D?: PolygonSymbol3D | PolygonSymbol3DJson;
67
- }
68
- /**
69
- * The type of tool used for sketching.
70
- */
71
- export declare enum SketchTool {
72
- POINT = "point",
73
- MULTIPOINT = "multipoint",
74
- /**
75
- * Not supported in VertiGIS Studio Mobile.
76
- */
77
- LINE = "line",
78
- POLYLINE = "polyline",
79
- POLYGON = "polygon",
80
- EXTENT = "extent",
81
- /**
82
- * Not supported in VertiGIS Studio Mobile.
83
- */
84
- SQUARE = "square",
85
- /**
86
- * Not supported in VertiGIS Studio Mobile.
87
- */
88
- CIRCLE = "circle"
89
- }
90
- /**
91
- * Indicates whether a new point should be added before or after the active
92
- * point in a sketch.
93
- */
94
- export type AddNodeOrder = "add-after-active" | "add-before-active";
95
- /**
96
- * Deprecated - use "sketching.move-point" with {@link MovePointArgs}.
97
- *
98
- * @deprecated
99
- */
100
- export interface MoveNodeArgs extends HasMaps {
101
- /**
102
- * The point to move, which must already exist within the active sketch. If
103
- * not provided, the active point will be used.
104
- */
105
- node?: Point;
106
- /**
107
- * The new position for the point.
108
- */
109
- position: Geometry;
110
- }
111
- /**
112
- * The arguments for the "sketching.move-point" command.
113
- */
114
- export interface MovePointArgs extends HasMaps {
115
- /**
116
- * The point to move, which must already exist within the active sketch. If
117
- * this property is undefined and no geometry and pointIndex are specified,
118
- * the active point(s) will be moved.
119
- */
120
- point?: Point;
121
- /**
122
- * The geometry where the point exists, if multiple are present in an active
123
- * editing session. This property is required if pointIndex and/or partIndex
124
- * are defined.
125
- */
126
- geometry?: Geometry;
127
- /**
128
- * The index of the point. If this property is defined, the 'geometry'
129
- * property must also be defined.
130
- */
131
- pointIndex?: number;
132
- /**
133
- * The part of the geometry where the point exists. Required for polyline
134
- * and polygon geometry types when the geometry and pointIndex properties
135
- * are defined.
136
- */
137
- partIndex?: number;
138
- /**
139
- * The new point that will replace the target point within an active sketch
140
- * or edit geometry. If this property is defined, the distance property will
141
- * be ignored.
142
- */
143
- newPoint?: Point;
144
- /**
145
- * An amount to move the point(s) on the X and Y axes. If the newPoint
146
- * property is defined, this property will be ignored.
147
- */
148
- distance?: Vector2D;
149
- /**
150
- * The units of the above distance. Optional, will default to the units used
151
- * by the measurement service associated with the map.
152
- */
153
- units?: LengthUnits;
154
- }
155
- /**
156
- * Deprecated - use "sketching.set-active-points" with
157
- * {@link SetActivePointsArgs}.
158
- *
159
- * @deprecated
160
- */
161
- export interface SwitchActiveNodeArgs extends HasMaps {
162
- /**
163
- * The new point that will become the active point of an active sketch.
164
- */
165
- node: Point;
166
- }
167
- /**
168
- * The arguments for the "sketching.set-active-points" command.
169
- */
170
- export interface SetActivePointsArgs extends HasMaps {
171
- /**
172
- * The new point(s) that will become active in the sketch or editing
173
- * session. Sketching only supports one active point; if multiple are
174
- * specified, then only the first will be set as active.
175
- */
176
- points?: Point | Point[];
177
- /**
178
- * The geometry where the new active point exists, if multiple are present
179
- * in an active editing session. This property is required if pointIndex
180
- * and/or partIndex are defined.
181
- */
182
- geometry?: Geometry;
183
- /**
184
- * The index of the new active point. If this property is defined, the
185
- * geometry property must be defined.
186
- */
187
- pointIndex?: number;
188
- /**
189
- * The part of the geometry where the new active point exists. Required for
190
- * polyline and polygon geometry types when the geometry and pointIndex
191
- * properties are defined.
192
- */
193
- partIndex?: number;
194
- }
195
- /**
196
- * Arguments for the "sketching.capture-geometry" operation.
197
- */
198
- export interface CaptureGeometryArgs {
199
- /**
200
- * The maps to activate drawing on. By default it will be all maps.
201
- */
202
- maps?: MapsLike;
203
- /**
204
- * The geometry/shape to use for sketching. * Multiple sketch tools are only
205
- * supported by VertiGIS Studio Web. When multiple sketch tools are
206
- * provided, the sketch will begin with the first one in the list. If
207
- * "point" is the first of multiple options in the list, click actions will
208
- * create points while click-and-drag actions will automatically begin the
209
- * freehand variation of the next included geometry type.
210
- */
211
- geometryType: SketchTool | SketchTool[];
212
- /**
213
- * An optional symbol to use. SymbolSets are not supported by VertiGIS
214
- * Studio Mobile.
215
- */
216
- symbol?: SymbolJson | SymbolSet;
217
- /**
218
- * The maximum number of segments permitted for a polyline or polygon
219
- * sketch. Default is no limit. Mobile only.
220
- */
221
- maxSegments?: number;
222
- /**
223
- * The settings to be applied to the sketch. Mobile only.
224
- */
225
- editorSettings?: GeometryEditorSettings;
226
- /**
227
- * Disables freehand sketching during the draw session. Web only.
228
- */
229
- disableFreehand?: boolean;
230
- /**
231
- * Web only. Additional settings that are specific to sketching plugins,
232
- * keyed by plugin ID. The only currently supported plugin is "snapping". A
233
- * boolean value can also be assigned to completely disable, or enable with
234
- * default settings.
235
- */
236
- pluginSettings?: Record<string, boolean | Record<string, unknown>>;
237
- }
238
- /**
239
- * Result of the "sketching.capture-geometry" operation.
240
- */
241
- export interface CaptureGeometryResult {
242
- /**
243
- * The geometry that was captured.
244
- */
245
- geometry: Geometry;
246
- /**
247
- * The map that the user sketched the geometry on. Unavailable in VertiGIS
248
- * Studio Mobile.
249
- */
250
- maps: MapsLike;
251
- /**
252
- * The symbol that was used. Unavailable in VertiGIS Studio Web.
253
- */
254
- symbol?: Symbol;
255
- }
256
- /**
257
- * A generic context for operations that act on geometries.
258
- */
259
- export interface GeometryOperationBase {
260
- /**
261
- * The maps to activate editing on. By default it will be all maps.
262
- */
263
- maps?: MapsLike;
264
- /**
265
- * The geometries to edit.
266
- */
267
- geometry?: GeometryLike;
268
- /**
269
- * The graphics containing geometries to edit. The graphics will pass
270
- * through and be assigned the altered geometries. Not supported in Mobile.
271
- */
272
- graphics?: GraphicsLike;
273
- /**
274
- * The features containing geometries to edit. The features will pass
275
- * through and be assigned the altered geometries. Not supported in Mobile.
276
- */
277
- features?: FeaturesLike;
278
- /**
279
- * Flag all inputs as measured geometries. Geometry operations will show
280
- * measurements for in progress operations. Not supported in Mobile.
281
- */
282
- isMeasurement?: boolean;
283
- /**
284
- * An optional symbol to use while editing.
285
- */
286
- symbol?: SimpleLineSymbol | PictureFillSymbol | PictureMarkerSymbol | SimpleFillSymbol | SimpleMarkerSymbol | TextSymbol | Symbol;
287
- }
288
- /**
289
- * Arguments for the "sketching.edit-geometry" operation.
290
- */
291
- export interface EditGeometryArgs extends GeometryOperationBase {
292
- /**
293
- * The options for this edit operation. Not supported in Mobile. Web only.
294
- *
295
- * @webOnly
296
- */
297
- options?: EditGeometryOptions;
298
- /**
299
- * Web only. Additional settings that are specific to sketching plugins,
300
- * keyed by plugin ID. The only currently supported plugin is "snapping". A
301
- * boolean value can also be assigned to completely disable, or enable with
302
- * default settings.
303
- */
304
- pluginSettings?: Record<string, boolean | Record<string, unknown>>;
305
- }
306
- /**
307
- * Options for the "sketching.edit-geometry operation.
308
- *
309
- * @webOnly
310
- */
311
- export interface EditGeometryOptions {
312
- /**
313
- * Whether to allow deletion of the edited geometry. Defaults to false.
314
- */
315
- enableDelete?: boolean;
316
- /**
317
- * Whether to allow rotation of the edited geometry. Defaults to true.
318
- */
319
- enableRotation?: boolean;
320
- /**
321
- * Whether to allow scaling of the edited geometry. Defaults to true.
322
- */
323
- enableScaling?: boolean;
324
- /**
325
- * Whether to allow the user to toggle to the non-default scale mode.
326
- * Defaults to true.
327
- */
328
- enableScaleModeToggle?: boolean;
329
- /**
330
- * Whether to allow the user to add, move, and remove vertices from a
331
- * geometry. Defaults to true.
332
- */
333
- enableVertexEditing?: boolean;
334
- /**
335
- * Setting "free" allows independent scaling on the x and y axis,
336
- * "preserve-aspect-ratio" constrains scaling to the original aspect ratio.
337
- * Defaults to "preserve-aspect-ratio".
338
- */
339
- scaleMode?: "free" | "preserve-aspect-ratio";
340
- /**
341
- * Whether the resulting geometry is validated before it's returned from the
342
- * operation. If the geometry is invalid upon completion, an error is
343
- * thrown. Defaults to true.
344
- */
345
- validateGeometry?: boolean;
346
- /**
347
- * Where to anchor the geometry when performing a free scale operation.
348
- * Defaults to "center".
349
- */
350
- anchor?: "center" | "opposite";
351
- }
352
- /**
353
- * Result of the "sketching.edit-geometry" operation.
354
- */
355
- export interface EditGeometryResult extends GeometryOperationBase {
356
- }
357
- /**
358
- * Arguments for the "sketching.move-geometry" operation.
359
- */
360
- export interface MoveGeometryArgs extends GeometryOperationBase {
361
- /**
362
- * An amount to move the geometry on the X and Y axes.
363
- */
364
- distance: Vector2D;
365
- /**
366
- * The units of the above distance. Optional, will default to the units used
367
- * by the measurement service associated with the map.
368
- */
369
- units?: LengthUnits;
370
- }
371
- /**
372
- * Arguments for the "sketching.scale-geometry" operation.
373
- */
374
- export interface ScaleGeometryArgs extends GeometryOperationBase {
375
- /**
376
- * The amount to scale the geometry, specified either uniformly or
377
- * independently on the x and y axis. Point geometries will not be modified
378
- * by this operation.
379
- */
380
- scale: Vector2D | number;
381
- }
382
- /**
383
- * Arguments for the "sketching.rotate-geometry" operation.
384
- */
385
- export interface RotateGeometryArgs extends GeometryOperationBase {
386
- /**
387
- * The number of degrees to rotate the geometry.
388
- */
389
- degrees: number;
390
- /**
391
- * The origin around which to rotate the geometry. Defaults to the centroid.
392
- */
393
- origin?: Point;
394
- }
395
- /**
396
- * Arguments for the "sketching.stop" operation.
397
- */
398
- export interface StopGeometryEditArgs {
399
- /**
400
- * The maps on which to stop editing geometry.
401
- */
402
- maps: MapsLike;
403
- /**
404
- * Whether to validate the geometry before returning it. Defaults to true if
405
- * not set.
406
- */
407
- validateGeometry?: boolean;
408
- }
409
- /**
410
- * Arguments for the "sketching.add-point" command.
411
- */
412
- export interface AddPointArgs extends HasMaps {
413
- /**
414
- * The new point to be added.
415
- */
416
- newPoint: Point;
417
- /**
418
- * The geometry to add the point to, if multiple are present in an active
419
- * editing session. Not supported by Mobile.
420
- */
421
- geometry?: Geometry;
422
- }
423
- /**
424
- * Arguments for the "sketching.insert-point" command.
425
- */
426
- export interface InsertPointArgs extends HasMaps {
427
- /**
428
- * The index of the part to which the point will be added. If null, the last
429
- * part will be used.
430
- */
431
- partIndex?: number;
432
- /**
433
- * The index at which the point will be added. If null, the point will be
434
- * added as the last point.
435
- */
436
- pointIndex?: number;
437
- /**
438
- * The new point to be added.
439
- */
440
- newPoint: Point;
441
- /**
442
- * The geometry to add the point to, if multiple are present in an active
443
- * editing session. Not supported by Mobile.
444
- */
445
- geometry?: Geometry;
446
- }
447
- /**
448
- * Deprecated - Mobile users should rather use "geometry.add-point"; Web users
449
- * should use "sketching.add-point" with {@link AddPointArgs} or
450
- * "sketching.insert-point" with {@link InsertPointArgs} instead.
451
- *
452
- * @deprecated
453
- */
454
- export interface AddNodeToGeometryArgs extends HasMaps {
455
- /**
456
- * The initial geometry to add the point to. Can be null.
457
- */
458
- geometry: Geometry;
459
- /**
460
- * The type of geometry to create if the initial geometry is null. In
461
- * VertiGIS Studio Mobile, this value must be 'polygon' or 'polyline'. In
462
- * VertiGIS Studio Web, this value may also be null if the point being added
463
- * is intended to be added to the active sketch.
464
- */
465
- geometryType: string;
466
- /**
467
- * A point geometry to add to the initial geometry. In VertiGIS Studio Web,
468
- * this value may be null if the intention is to add a point at the position
469
- * of the active point of an active sketch.
470
- */
471
- node: Geometry;
472
- /**
473
- * Indicates whether the new point should be added before or after the
474
- * active point in the sketch. Not supported by VertiGIS Studio Mobile.
475
- */
476
- nodeOrder?: AddNodeOrder;
477
- }
478
- /**
479
- * Arguments for the "sketching.delete" command.
480
- */
481
- export interface DeleteGeometryArgs extends HasMaps {
482
- /**
483
- * The point to remove from the geometry. If this property is defined, the
484
- * 'pointIndex' and 'partIndex' properties are ignored. If no point nor
485
- * pointIndex/partIndex are specified, any active points will be deleted. If
486
- * there are no active points, the entire geometry will be deleted.
487
- */
488
- point?: Point;
489
- /**
490
- * The geometry to remove a point from. If this property is not specified,
491
- * any active vertices will be deleted.
492
- */
493
- geometry?: Geometry;
494
- /**
495
- * The index of the point that should be removed from the geometry. If this
496
- * property is defined, the geometry property must also be defined.
497
- */
498
- pointIndex?: number;
499
- /**
500
- * The index of the part of the geometry that the point should be removed
501
- * from. Required for polyline and polygon geometry types when the geometry
502
- * and pointIndex properties are defined.
503
- */
504
- partIndex?: number;
505
- }
506
- /**
507
- * Arguments for the "sketching.set-geometry-mode" command.
508
- */
509
- export interface SetGeometryModeArgs extends HasMaps {
510
- /**
511
- * The geometry mode to switch to. VertiGIS Studio Mobile only supports
512
- * "line" and "area".
513
- */
514
- editorGeometryMode: EditorGeometryMode | SketchTool;
515
- }
516
- /**
517
- * Arguments for the "sketching.set-interaction-mode" command.
518
- */
519
- export interface SetInteractionModeArgs extends HasMaps {
520
- /**
521
- * The interaction mode to switch to.
522
- */
523
- editorInteractionMode: EditorInteractionMode;
524
- }
525
- /**
526
- * Arguments for the "sketching.start-streaming" command.
527
- */
528
- export interface StartStreamingArgs extends HasMaps {
529
- /**
530
- * An optional value indicating, in seconds, how often points should be
531
- * recorded.
532
- */
533
- interval?: number;
534
- }
535
- /**
536
- * The editor geometry mode.
537
- */
538
- export type EditorGeometryMode = "line" | "area";
539
- /**
540
- * The editor interaction mode.
541
- */
542
- export type EditorInteractionMode = "centerCrosshairMode" | "pointerMode";
543
- /**
544
- * Settings for a sketch.
545
- */
546
- export interface GeometryEditorSettings {
547
- /**
548
- * Whether snapping should be enabled.
549
- */
550
- snappingEnabled?: boolean;
551
- /**
552
- * Whether bearing labels should be shown on the map.
553
- */
554
- showBearings?: boolean;
555
- /**
556
- * The editor geometry mode.
557
- */
558
- editorGeometryMode?: EditorGeometryMode;
559
- /**
560
- * The editor interaction mode.
561
- */
562
- editorInteractionMode?: EditorInteractionMode;
563
- /**
564
- * Whether the sketch is using freehand or segment sketching.
565
- */
566
- freehand?: boolean;
567
- /**
568
- * Whether the sketch should stop when double clicking.
569
- */
570
- finishOnDoubleClick?: boolean;
571
- /**
572
- * Whether the sketch should commit its geometry if another sketch is
573
- * activated.
574
- */
575
- finishIfInterrupted?: boolean;
576
- }
577
- /**
578
- * Result returned from the 'sketching.get-active-points' operation.
579
- */
580
- export interface GetActivePointsResult extends GetActiveSketchResult {
581
- }
582
- /**
583
- * Result returned from the 'sketching.get-active-sketch' operation.
584
- */
585
- export interface GetActiveSketchResult {
586
- /**
587
- * The active graphic(s).
588
- */
589
- graphics: Graphic[] | undefined;
590
- /**
591
- * The map associated with the graphics.
592
- */
593
- maps: MapExtension;
594
- }
595
- /**
596
- * Specifies if a desired point comes before or after a given reference point.
597
- */
598
- export type PointOffset = "before" | "after";
599
- /**
600
- * Arguments for the 'sketching.get-adjacent-point' operation.
601
- */
602
- export interface GetAdjacentPointArgs extends HasMaps {
603
- /**
604
- * A point geometry that represents a vertex within an active editing
605
- * graphic.
606
- */
607
- referencePoint: Point;
608
- /**
609
- * Specifies if the desired point comes before or after the referencePoint.
610
- * Defaults to 'after'.
611
- */
612
- relativeOffset?: PointOffset;
613
- }
614
- /**
615
- * Arguments for the "sketching.set-constraints" command.
616
- */
617
- export interface SetConstraintsArgs extends HasMaps {
618
- /**
619
- * The constraint for the length of the line between the selected vertex and
620
- * the new point.
621
- */
622
- length?: number;
623
- /**
624
- * The constraint for the angle of the line between the selected vertex and
625
- * the new point, relative to the reference line. Remains unchanged until
626
- * set to a different value, or cleared.
627
- */
628
- angle?: number;
629
- /**
630
- * A reference line that the angle will be relative to. Defaults to 'north'.
631
- * Remains unchanged until set again.
632
- */
633
- referenceLine?: ReferenceLine;
634
- /**
635
- * Indicates whether constraints will be automatically cleared after a
636
- * vertex is added or updated. If not set (value is null), then the value
637
- * will remain unchanged with this operation. If the value has never been
638
- * set, the default is false. Remains unchanged until set to a different
639
- * value.
640
- */
641
- autoClear?: boolean;
642
- /**
643
- * The units to be used for length. If not specified, the units of the map's
644
- * spatial reference will be used.
645
- */
646
- units?: LengthUnitsMobile;
647
- /**
648
- * Indicates whether the distance calculations will be geodetic or planar.
649
- * Default is true.
650
- */
651
- geodetic?: boolean;
652
- /**
653
- * The geodetic curve type used when calculating the new point. Only applies
654
- * when geodetic is set to true. Defaults to geodesic.
655
- */
656
- geodeticCurveType?: GeodeticCurveType;
657
- }
658
- /**
659
- * Arguments for the "sketching.clear-constraints" command.
660
- */
661
- export interface ClearConstraintsArgs extends HasMaps {
662
- /**
663
- * Indicates whether the length constraint should be cleared. Defaults to
664
- * true if not specified.
665
- */
666
- clearLengthConstraint?: boolean;
667
- /**
668
- * Indicates whether the angle constraint should be cleared. Defaults to
669
- * true if not specified.
670
- */
671
- clearAngleConstraint?: boolean;
672
- }
673
- /**
674
- * Arguments for the "sketching.set-snapping-configuration" command.
675
- */
676
- export interface SetSnappingConfigurationArgs extends HasMaps {
677
- /**
678
- * The snapping properties to set.
679
- */
680
- config: SnappingProperties;
681
- /**
682
- * Whether the config should be replace, or merged. Defaults to "merge".
683
- */
684
- mode?: "replace" | "merge";
685
- }
686
- export declare class SketchingOperations extends OperationRegistry {
687
- protected readonly _prefix = "sketching";
688
- /**
689
- * Allows the user to create geometry by sketching on a map. Returns the
690
- * geometry that was drawn, along with the map that it was drawn on.
691
- */
692
- get captureGeometry(): Operation<CaptureGeometryArgs, CaptureGeometryResult>;
693
- /**
694
- * Allows the user to edit the symbology used by the graphics actively being
695
- * edited. Web only.
696
- *
697
- * @webOnly
698
- */
699
- get editActiveSymbol(): Operation<void, EditSymbolResult | undefined>;
700
- /**
701
- * Allows the user to edit an existing geometry by drawing on a map. Returns
702
- * the geometry that was edited, or the supplied feature with the altered
703
- * geometry applied, along with the map that it was drawn on.
704
- */
705
- get editGeometry(): Operation<EditGeometryArgs, EditGeometryResult>;
706
- /**
707
- * Allows the user to move an existing geometry by a specified amount.
708
- * Returns the altered geometry or the supplied feature with altered
709
- * geometry applied. Will also pass through any map or symbol associated
710
- * with the command chain, but only the map is required for this operation.
711
- * Web only.
712
- *
713
- * @webOnly
714
- */
715
- get moveGeometry(): Operation<MoveGeometryArgs, GeometryOperationBase>;
716
- /**
717
- * Allows the user to scale and mirror an existing geometry on either axis.
718
- * Returns the altered geometry or the supplied feature with altered
719
- * geometry applied. Will also pass through any map or symbol associated
720
- * with the command chain, but they are not required for this operation. Web
721
- * only.
722
- *
723
- * @webOnly
724
- */
725
- get scaleGeometry(): Operation<ScaleGeometryArgs, GeometryOperationBase>;
726
- /**
727
- * Allows the user to rotate an existing geometry. Returns the altered
728
- * geometry or the supplied feature with altered geometry applied. Will also
729
- * pass through any map or symbol associated with the command chain, but
730
- * they are not required for this operation. Web only.
731
- *
732
- * @webOnly
733
- */
734
- get rotateGeometry(): Operation<RotateGeometryArgs, GeometryOperationBase>;
735
- /**
736
- * Stops geometry capturing or editing on a given map. Returns the current
737
- * geometry. If validateGeometry parameter is true and geometry is invalid,
738
- * the operation will return null.
739
- */
740
- get stop(): Operation<StopGeometryEditArgs | void, CaptureGeometryResult>;
741
- /**
742
- * Deprecated - Mobile users should rather use "geometry.add-point"; Web
743
- * users should use "sketching.add-point" or "sketching.insert-point"
744
- * instead.
745
- *
746
- * @deprecated
747
- */
748
- get addNodeToGeometry(): Operation<AddNodeToGeometryArgs, Geometry>;
749
- /**
750
- * Returns the active sketch graphic from a map. Web only.
751
- *
752
- * @webOnly
753
- */
754
- get getActiveSketch(): Operation<void, GetActiveSketchResult>;
755
- /**
756
- * Deprecated - use 'sketching.get-active-points' instead. Web only.
757
- *
758
- * @deprecated
759
- * @webOnly
760
- */
761
- get getActiveNode(): Operation<Maps, GetActivePointsResult>;
762
- /**
763
- * Returns the active point graphics of the active sketch or edit session on
764
- * a map. Web only.
765
- *
766
- * @webOnly
767
- */
768
- get getActivePoints(): Operation<Maps, GetActivePointsResult>;
769
- /**
770
- * Return the adjacent point graphic(s), relative to a given vertex that's a
771
- * part of an active editing or sketching session. This operation is only
772
- * supported for Polyline and Polygon geometries. Web only.
773
- *
774
- * @webOnly
775
- */
776
- get getAdjacentPoint(): Operation<GetAdjacentPointArgs, GetActiveSketchResult>;
777
- /**
778
- * Checks whether streaming is active. Mobile only.
779
- *
780
- * @mobileOnly
781
- */
782
- get isStreaming(): Operation<HasMaps, boolean>;
783
- }
784
- export declare class SketchingCommands extends CommandRegistry {
785
- protected readonly _prefix = "sketching";
786
- /**
787
- * Set the snapping default to 'on' for all subsequent operations. Web only.
788
- *
789
- * @webOnly
790
- */
791
- get activateSnapping(): Command<void>;
792
- /**
793
- * Cancels the current geometry edit or capture operation. Web only.
794
- *
795
- * @webOnly
796
- */
797
- get cancel(): Command<void>;
798
- /**
799
- * Set the snapping default to 'off' for all subsequent operations. Web
800
- * only.
801
- *
802
- * @webOnly
803
- */
804
- get deactivateSnapping(): Command<void>;
805
- /**
806
- * Undoes the last edit while editing a geometry.
807
- */
808
- get undo(): Command<HasMaps>;
809
- /**
810
- * Redoes the last undone edit while editing a geometry.
811
- */
812
- get redo(): Command<HasMaps>;
813
- /**
814
- * Sets the geometry mode of the geometry editor.
815
- */
816
- get setGeometryMode(): Command<SetGeometryModeArgs>;
817
- /**
818
- * Sets the global snapping configuration.
819
- */
820
- get setSnappingConfiguration(): Command<SetSnappingConfigurationArgs>;
821
- /**
822
- * Adds a point at the center of the map while editing a geometry. Works in
823
- * centerCrosshair mode only. Mobile only.
824
- *
825
- * @mobileOnly
826
- */
827
- get addPointAtCenter(): Command<HasMaps>;
828
- /**
829
- * Adds a point at the user's current location while editing a geometry.
830
- * Mobile only.
831
- *
832
- * @mobileOnly
833
- */
834
- get addPointAtCurrentLocation(): Command<HasMaps>;
835
- /**
836
- * Sets a point at the user's current location while editing a geometry. In
837
- * this context, "set" means to either add a point at the current location,
838
- * or update the currently selected point to be the user's current location,
839
- * depending on what edit mode the user is in. Mobile only.
840
- *
841
- * @mobileOnly
842
- */
843
- get setPointAtCurrentLocation(): Command<HasMaps>;
844
- /**
845
- * If a point is supplied while a sketching or editing operation is active,
846
- * the vertex at that point will be deleted from the current geometry. If no
847
- * point is supplied, any active points in the session will be deleted. If
848
- * there are no active points in the session, the entire geometry will be
849
- * deleted.
850
- */
851
- get delete(): Command<void | DeleteGeometryArgs>;
852
- /**
853
- * Deprecated - use 'sketching.move-point' instead. Web only.
854
- *
855
- * @deprecated
856
- * @webOnly
857
- */
858
- get moveNode(): Command<MoveNodeArgs>;
859
- /**
860
- * Moves a point within an active sketch to a new location. Web only.
861
- *
862
- * @webOnly
863
- */
864
- get movePoint(): Command<MovePointArgs>;
865
- /**
866
- * Deprecated - use 'sketching.set-active-points' instead. Web only.
867
- *
868
- * @deprecated
869
- * @webOnly
870
- */
871
- get switchActiveNode(): Command<SwitchActiveNodeArgs>;
872
- /**
873
- * Switches the active point of an active sketch. Web only.
874
- *
875
- * @webOnly
876
- */
877
- get setActivePoints(): Command<SetActivePointsArgs>;
878
- /**
879
- * Sets the interaction mode of the geometry editor. Mobile only.
880
- *
881
- * @mobileOnly
882
- */
883
- get setInteractionMode(): Command<SetInteractionModeArgs>;
884
- /**
885
- * Enables free scaling while editing geometries. Web only.
886
- *
887
- * @webOnly
888
- */
889
- get enableFreeScaleMode(): Command<void>;
890
- /**
891
- * Disables free scaling while editing geometries. Web only.
892
- *
893
- * @webOnly
894
- */
895
- get disableFreeScaleMode(): Command<void>;
896
- /**
897
- * Enables more precise inputs while editing geometries. Web only.
898
- *
899
- * @webOnly
900
- */
901
- get enablePrecisionMode(): Command<void>;
902
- /**
903
- * Disables more precise inputs while editing geometries. Web only.
904
- *
905
- * @webOnly
906
- */
907
- get disablePrecisionMode(): Command<void>;
908
- /**
909
- * Sets constraints on the active sketch. Mobile only.
910
- *
911
- * @mobileOnly
912
- */
913
- get setConstraints(): Command<SetConstraintsArgs>;
914
- /**
915
- * Clears constraints that have been previously set. Mobile only.
916
- *
917
- * @mobileOnly
918
- */
919
- get clearConstraints(): Command<ClearConstraintsArgs>;
920
- /**
921
- * Inserts a point into a polygon, polyline, or multipoint at the specified
922
- * index. If the partIndex is null, then the last part is used. If the
923
- * pointIndex is null, then the new point is inserted at the end.
924
- */
925
- get insertPoint(): Command<InsertPointArgs>;
926
- /**
927
- * Adds a point to polygon, polyline, or multipoint using the selected index
928
- * as the point to insert after.
929
- */
930
- get addPoint(): Command<AddPointArgs>;
931
- /**
932
- * Starts streaming: recording your location at regular intervals and adding
933
- * the collected points to the currently active geometry editor. Mobile
934
- * only.
935
- *
936
- * @mobileOnly
937
- */
938
- get startStreaming(): Command<StartStreamingArgs>;
939
- /**
940
- * Stops streaming. Mobile only.
941
- *
942
- * @mobileOnly
943
- */
944
- get stopStreaming(): Command<HasMaps>;
945
- }
946
- export declare class SketchingEvents extends EventRegistry {
947
- protected readonly _prefix = "sketching";
948
- /**
949
- * Raised when streaming has begun. Mobile only.
950
- *
951
- * @mobileOnly
952
- */
953
- get streamingStarted(): Event<HasMaps>;
954
- /**
955
- * Raised when streaming has stopped. Mobile only.
956
- *
957
- * @mobileOnly
958
- */
959
- get streamingStopped(): Event<HasMaps>;
960
- }
1
+ import type Graphic from "@arcgis/core/Graphic";
2
+ import type Geometry from "@arcgis/core/geometry/Geometry";
3
+ import type Point from "@arcgis/core/geometry/Point";
4
+ import type LineSymbol3D from "@arcgis/core/symbols/LineSymbol3D";
5
+ import type PictureFillSymbol from "@arcgis/core/symbols/PictureFillSymbol";
6
+ import type PictureMarkerSymbol from "@arcgis/core/symbols/PictureMarkerSymbol";
7
+ import type PointSymbol3D from "@arcgis/core/symbols/PointSymbol3D";
8
+ import type PolygonSymbol3D from "@arcgis/core/symbols/PolygonSymbol3D";
9
+ import type SimpleFillSymbol from "@arcgis/core/symbols/SimpleFillSymbol";
10
+ import type SimpleLineSymbol from "@arcgis/core/symbols/SimpleLineSymbol";
11
+ import type SimpleMarkerSymbol from "@arcgis/core/symbols/SimpleMarkerSymbol";
12
+ import type Symbol from "@arcgis/core/symbols/Symbol";
13
+ import type TextSymbol from "@arcgis/core/symbols/TextSymbol";
14
+ import type { Feature } from "@vertigis/arcgis-extensions/data/Feature.js";
15
+ import type { LineSymbol3DJson, PictureFillSymbolJson, PictureMarkerSymbolJson, PointSymbol3DJson, PolygonSymbol3DJson, SimpleFillSymbolJson, SimpleLineSymbolJson, SimpleMarkerSymbolJson, SymbolJson } from "@vertigis/arcgis-extensions/json/SymbolJson.js";
16
+ import type { MapExtension } from "@vertigis/arcgis-extensions/mapping/MapExtension";
17
+ import type { SnappingProperties } from "app-config/web/SnappingProperties.js";
18
+ import type { TopologyProperties } from "app-config/web/TopologyProperties.js";
19
+ import type { Command } from "../Command.js";
20
+ import { CommandRegistry } from "../CommandRegistry.js";
21
+ import type { Event } from "../Event.js";
22
+ import { EventRegistry } from "../EventRegistry.js";
23
+ import type { Operation } from "../Operation.js";
24
+ import { OperationRegistry } from "../OperationRegistry.js";
25
+ import type { FeaturesLike, GeometryLike, GraphicsLike, HasMaps, Maps, MapsLike } from "../common.js";
26
+ import type { EditSymbolResult } from "./drawing.js";
27
+ import type { GeodeticCurveType, LengthUnits, LengthUnitsMobile, ReferenceLine } from "./geometry.js";
28
+ /**
29
+ * A representation of a 2D vector or point.
30
+ */
31
+ export interface Vector2D {
32
+ /**
33
+ * The x component.
34
+ */
35
+ x: number;
36
+ /**
37
+ * The y component.
38
+ */
39
+ y: number;
40
+ }
41
+ /**
42
+ * A set of symbols that can be used to sketch geometries.
43
+ */
44
+ export interface SymbolSet {
45
+ /**
46
+ * The symbol used to draw points.
47
+ */
48
+ pointSymbol?: SimpleMarkerSymbol | SimpleMarkerSymbolJson | PictureMarkerSymbol | PictureMarkerSymbolJson;
49
+ /**
50
+ * The symbol used to draw 3D points.
51
+ */
52
+ pointSymbol3D?: PointSymbol3D | PointSymbol3DJson;
53
+ /**
54
+ * The symbol used to draw lines.
55
+ */
56
+ lineSymbol?: SimpleLineSymbol | SimpleLineSymbolJson;
57
+ /**
58
+ * The symbol used to draw 3D lines.
59
+ */
60
+ lineSymbol3D?: LineSymbol3D | LineSymbol3DJson;
61
+ /**
62
+ * The symbol used to draw polygons.
63
+ */
64
+ polygonSymbol?: SimpleFillSymbol | SimpleFillSymbolJson | PictureFillSymbol | PictureFillSymbolJson;
65
+ /**
66
+ * The symbol used to draw 3D polygons.
67
+ */
68
+ polygonSymbol3D?: PolygonSymbol3D | PolygonSymbol3DJson;
69
+ }
70
+ /**
71
+ * The type of tool used for sketching.
72
+ */
73
+ export declare enum SketchTool {
74
+ POINT = "point",
75
+ MULTIPOINT = "multipoint",
76
+ /**
77
+ * Not supported in VertiGIS Studio Mobile.
78
+ */
79
+ LINE = "line",
80
+ POLYLINE = "polyline",
81
+ POLYGON = "polygon",
82
+ EXTENT = "extent",
83
+ /**
84
+ * Not supported in VertiGIS Studio Mobile.
85
+ */
86
+ SQUARE = "square",
87
+ /**
88
+ * Not supported in VertiGIS Studio Mobile.
89
+ */
90
+ CIRCLE = "circle"
91
+ }
92
+ /**
93
+ * Indicates whether a new point should be added before or after the active
94
+ * point in a sketch.
95
+ */
96
+ export type AddNodeOrder = "add-after-active" | "add-before-active";
97
+ /**
98
+ * Deprecated - use "sketching.move-point" with {@link MovePointArgs}.
99
+ *
100
+ * @deprecated
101
+ */
102
+ export interface MoveNodeArgs extends HasMaps {
103
+ /**
104
+ * The point to move, which must already exist within the active sketch. If
105
+ * not provided, the active point will be used.
106
+ */
107
+ node?: Point;
108
+ /**
109
+ * The new position for the point.
110
+ */
111
+ position: Geometry;
112
+ }
113
+ /**
114
+ * The arguments for the "sketching.move-point" command.
115
+ */
116
+ export interface MovePointArgs extends HasMaps {
117
+ /**
118
+ * The point to move, which must already exist within the active sketch. If
119
+ * this property is undefined and no geometry and pointIndex are specified,
120
+ * the active point(s) will be moved.
121
+ */
122
+ point?: Point;
123
+ /**
124
+ * The geometry where the point exists, if multiple are present in an active
125
+ * editing session. This property is required if pointIndex and/or partIndex
126
+ * are defined.
127
+ */
128
+ geometry?: Geometry;
129
+ /**
130
+ * The index of the point. If this property is defined, the 'geometry'
131
+ * property must also be defined.
132
+ */
133
+ pointIndex?: number;
134
+ /**
135
+ * The part of the geometry where the point exists. Required for polyline
136
+ * and polygon geometry types when the geometry and pointIndex properties
137
+ * are defined.
138
+ */
139
+ partIndex?: number;
140
+ /**
141
+ * The new point that will replace the target point within an active sketch
142
+ * or edit geometry. If this property is defined, the distance property will
143
+ * be ignored.
144
+ */
145
+ newPoint?: Point;
146
+ /**
147
+ * An amount to move the point(s) on the X and Y axes. If the newPoint
148
+ * property is defined, this property will be ignored.
149
+ */
150
+ distance?: Vector2D;
151
+ /**
152
+ * The units of the above distance. Optional, will default to the units used
153
+ * by the measurement service associated with the map.
154
+ */
155
+ units?: LengthUnits;
156
+ }
157
+ /**
158
+ * Deprecated - use "sketching.set-active-points" with
159
+ * {@link SetActivePointsArgs}.
160
+ *
161
+ * @deprecated
162
+ */
163
+ export interface SwitchActiveNodeArgs extends HasMaps {
164
+ /**
165
+ * The new point that will become the active point of an active sketch.
166
+ */
167
+ node: Point;
168
+ }
169
+ /**
170
+ * The arguments for the "sketching.set-active-points" command.
171
+ */
172
+ export interface SetActivePointsArgs extends HasMaps {
173
+ /**
174
+ * The new point(s) that will become active in the sketch or editing
175
+ * session. Sketching only supports one active point; if multiple are
176
+ * specified, then only the first will be set as active.
177
+ */
178
+ points?: Point | Point[];
179
+ /**
180
+ * The geometry where the new active point exists, if multiple are present
181
+ * in an active editing session. This property is required if pointIndex
182
+ * and/or partIndex are defined.
183
+ */
184
+ geometry?: Geometry;
185
+ /**
186
+ * The index of the new active point. If this property is defined, the
187
+ * geometry property must be defined.
188
+ */
189
+ pointIndex?: number;
190
+ /**
191
+ * The part of the geometry where the new active point exists. Required for
192
+ * polyline and polygon geometry types when the geometry and pointIndex
193
+ * properties are defined.
194
+ */
195
+ partIndex?: number;
196
+ }
197
+ /**
198
+ * Arguments for the "sketching.capture-geometry" operation.
199
+ */
200
+ export interface CaptureGeometryArgs {
201
+ /**
202
+ * The maps to activate drawing on. By default it will be all maps.
203
+ */
204
+ maps?: MapsLike;
205
+ /**
206
+ * The geometry/shape to use for sketching. * Multiple sketch tools are only
207
+ * supported by VertiGIS Studio Web. When multiple sketch tools are
208
+ * provided, the sketch will begin with the first one in the list. If
209
+ * "point" is the first of multiple options in the list, click actions will
210
+ * create points while click-and-drag actions will automatically begin the
211
+ * freehand variation of the next included geometry type.
212
+ */
213
+ geometryType: SketchTool | SketchTool[];
214
+ /**
215
+ * An optional symbol to use. SymbolSets are not supported by VertiGIS
216
+ * Studio Mobile.
217
+ */
218
+ symbol?: SymbolJson | SymbolSet;
219
+ /**
220
+ * The maximum number of segments permitted for a polyline or polygon
221
+ * sketch. Default is no limit. Mobile only.
222
+ */
223
+ maxSegments?: number;
224
+ /**
225
+ * The settings to be applied to the sketch. Mobile only.
226
+ */
227
+ editorSettings?: GeometryEditorSettings;
228
+ /**
229
+ * Disables freehand sketching during the draw session. Web only.
230
+ */
231
+ disableFreehand?: boolean;
232
+ /**
233
+ * Web only. Additional settings that are specific to sketching plugins,
234
+ * keyed by plugin ID. The only currently supported plugin is "snapping". A
235
+ * boolean value can also be assigned to completely disable, or enable with
236
+ * default settings.
237
+ */
238
+ pluginSettings?: Record<string, boolean | Record<string, unknown>>;
239
+ }
240
+ /**
241
+ * Result of the "sketching.capture-geometry" operation.
242
+ */
243
+ export interface CaptureGeometryResult {
244
+ /**
245
+ * The geometry that was captured.
246
+ */
247
+ geometry: Geometry;
248
+ /**
249
+ * The map that the user sketched the geometry on. Unavailable in VertiGIS
250
+ * Studio Mobile.
251
+ */
252
+ maps: MapsLike;
253
+ /**
254
+ * The symbol that was used. Unavailable in VertiGIS Studio Web.
255
+ */
256
+ symbol?: Symbol;
257
+ }
258
+ /**
259
+ * A generic context for operations that act on geometries.
260
+ */
261
+ export interface GeometryOperationBase {
262
+ /**
263
+ * The maps to activate editing on. By default it will be all maps.
264
+ */
265
+ maps?: MapsLike;
266
+ /**
267
+ * The geometries to edit.
268
+ */
269
+ geometry?: GeometryLike;
270
+ /**
271
+ * The graphics containing geometries to edit. The graphics will pass
272
+ * through and be assigned the altered geometries. Not supported in Mobile.
273
+ */
274
+ graphics?: GraphicsLike;
275
+ /**
276
+ * The features containing geometries to edit. The features will pass
277
+ * through and be assigned the altered geometries. Not supported in Mobile.
278
+ */
279
+ features?: FeaturesLike;
280
+ /**
281
+ * Flag all inputs as measured geometries. Geometry operations will show
282
+ * measurements for in progress operations. Not supported in Mobile.
283
+ */
284
+ isMeasurement?: boolean;
285
+ /**
286
+ * An optional symbol to use while editing.
287
+ */
288
+ symbol?: SimpleLineSymbol | PictureFillSymbol | PictureMarkerSymbol | SimpleFillSymbol | SimpleMarkerSymbol | TextSymbol | Symbol;
289
+ }
290
+ /**
291
+ * Arguments for the "sketching.edit-geometry" operation.
292
+ */
293
+ export interface EditGeometryArgs extends GeometryOperationBase {
294
+ /**
295
+ * The options for this edit operation. Not supported in Mobile. Web only.
296
+ *
297
+ * @webOnly
298
+ */
299
+ options?: EditGeometryOptions;
300
+ /**
301
+ * Web only. Additional settings that are specific to sketching plugins,
302
+ * keyed by plugin ID. The only currently supported plugin is "snapping". A
303
+ * boolean value can also be assigned to completely disable, or enable with
304
+ * default settings.
305
+ */
306
+ pluginSettings?: Record<string, boolean | Record<string, unknown>>;
307
+ }
308
+ /**
309
+ * Options for the "sketching.edit-geometry operation.
310
+ *
311
+ * @webOnly
312
+ */
313
+ export interface EditGeometryOptions {
314
+ /**
315
+ * Whether to allow deletion of the edited geometry. Defaults to false.
316
+ */
317
+ enableDelete?: boolean;
318
+ /**
319
+ * Whether to allow rotation of the edited geometry. Defaults to true.
320
+ */
321
+ enableRotation?: boolean;
322
+ /**
323
+ * Whether to allow scaling of the edited geometry. Defaults to true.
324
+ */
325
+ enableScaling?: boolean;
326
+ /**
327
+ * Whether to allow the user to toggle to the non-default scale mode.
328
+ * Defaults to true.
329
+ */
330
+ enableScaleModeToggle?: boolean;
331
+ /**
332
+ * Whether to allow the user to add, move, and remove vertices from a
333
+ * geometry. Defaults to true.
334
+ */
335
+ enableVertexEditing?: boolean;
336
+ /**
337
+ * Setting "free" allows independent scaling on the x and y axis,
338
+ * "preserve-aspect-ratio" constrains scaling to the original aspect ratio.
339
+ * Defaults to "preserve-aspect-ratio".
340
+ */
341
+ scaleMode?: "free" | "preserve-aspect-ratio";
342
+ /**
343
+ * Whether the resulting geometry is validated before it's returned from the
344
+ * operation. If the geometry is invalid upon completion, an error is
345
+ * thrown. Defaults to true.
346
+ */
347
+ validateGeometry?: boolean;
348
+ /**
349
+ * Where to anchor the geometry when performing a free scale operation.
350
+ * Defaults to "center".
351
+ */
352
+ anchor?: "center" | "opposite";
353
+ }
354
+ /**
355
+ * Result of the "sketching.edit-geometry" operation.
356
+ */
357
+ export interface EditGeometryResult extends GeometryOperationBase {
358
+ /**
359
+ * Any coincident Features that were included in the geometry editing
360
+ * session, if topological editing was enabled. Web only.
361
+ */
362
+ coincidentFeatures?: Feature[];
363
+ /**
364
+ * Any coincident Graphics that were included in the geometry editing
365
+ * session, if topological editing was enabled. Web only.
366
+ */
367
+ coincidentGraphics?: CoincidentEditingGraphicResult[];
368
+ }
369
+ /**
370
+ * The result of a Graphic being coincidentally edited as a part of a editing
371
+ * session with topological editing enabled. Web Only.
372
+ */
373
+ export interface CoincidentEditingGraphicResult {
374
+ /**
375
+ * The coincident graphic that was included in an editing session with
376
+ * topological editing enabled.
377
+ */
378
+ graphic: Graphic;
379
+ /**
380
+ * A copy of the original geometry of the Graphic, before it was edited.
381
+ */
382
+ originalGeometry: Geometry;
383
+ }
384
+ /**
385
+ * Arguments for the "sketching.move-geometry" operation.
386
+ */
387
+ export interface MoveGeometryArgs extends GeometryOperationBase {
388
+ /**
389
+ * An amount to move the geometry on the X and Y axes.
390
+ */
391
+ distance: Vector2D;
392
+ /**
393
+ * The units of the above distance. Optional, will default to the units used
394
+ * by the measurement service associated with the map.
395
+ */
396
+ units?: LengthUnits;
397
+ }
398
+ /**
399
+ * Arguments for the "sketching.scale-geometry" operation.
400
+ */
401
+ export interface ScaleGeometryArgs extends GeometryOperationBase {
402
+ /**
403
+ * The amount to scale the geometry, specified either uniformly or
404
+ * independently on the x and y axis. Point geometries will not be modified
405
+ * by this operation.
406
+ */
407
+ scale: Vector2D | number;
408
+ }
409
+ /**
410
+ * Arguments for the "sketching.rotate-geometry" operation.
411
+ */
412
+ export interface RotateGeometryArgs extends GeometryOperationBase {
413
+ /**
414
+ * The number of degrees to rotate the geometry.
415
+ */
416
+ degrees: number;
417
+ /**
418
+ * The origin around which to rotate the geometry. Defaults to the centroid.
419
+ */
420
+ origin?: Point;
421
+ }
422
+ /**
423
+ * Arguments for the "sketching.stop" operation.
424
+ */
425
+ export interface StopGeometryEditArgs {
426
+ /**
427
+ * The maps on which to stop editing geometry.
428
+ */
429
+ maps: MapsLike;
430
+ /**
431
+ * Whether to validate the geometry before returning it. Defaults to true if
432
+ * not set.
433
+ */
434
+ validateGeometry?: boolean;
435
+ }
436
+ /**
437
+ * Arguments for the "sketching.add-point" command.
438
+ */
439
+ export interface AddPointArgs extends HasMaps {
440
+ /**
441
+ * The new point to be added.
442
+ */
443
+ newPoint: Point;
444
+ /**
445
+ * The geometry to add the point to, if multiple are present in an active
446
+ * editing session. Not supported by Mobile.
447
+ */
448
+ geometry?: Geometry;
449
+ }
450
+ /**
451
+ * Arguments for the "sketching.insert-point" command.
452
+ */
453
+ export interface InsertPointArgs extends HasMaps {
454
+ /**
455
+ * The index of the part to which the point will be added. If null, the last
456
+ * part will be used.
457
+ */
458
+ partIndex?: number;
459
+ /**
460
+ * The index at which the point will be added. If null, the point will be
461
+ * added as the last point.
462
+ */
463
+ pointIndex?: number;
464
+ /**
465
+ * The new point to be added.
466
+ */
467
+ newPoint: Point;
468
+ /**
469
+ * The geometry to add the point to, if multiple are present in an active
470
+ * editing session. Not supported by Mobile.
471
+ */
472
+ geometry?: Geometry;
473
+ }
474
+ /**
475
+ * Deprecated - Mobile users should rather use "geometry.add-point"; Web users
476
+ * should use "sketching.add-point" with {@link AddPointArgs} or
477
+ * "sketching.insert-point" with {@link InsertPointArgs} instead.
478
+ *
479
+ * @deprecated
480
+ */
481
+ export interface AddNodeToGeometryArgs extends HasMaps {
482
+ /**
483
+ * The initial geometry to add the point to. Can be null.
484
+ */
485
+ geometry: Geometry;
486
+ /**
487
+ * The type of geometry to create if the initial geometry is null. In
488
+ * VertiGIS Studio Mobile, this value must be 'polygon' or 'polyline'. In
489
+ * VertiGIS Studio Web, this value may also be null if the point being added
490
+ * is intended to be added to the active sketch.
491
+ */
492
+ geometryType: string;
493
+ /**
494
+ * A point geometry to add to the initial geometry. In VertiGIS Studio Web,
495
+ * this value may be null if the intention is to add a point at the position
496
+ * of the active point of an active sketch.
497
+ */
498
+ node: Geometry;
499
+ /**
500
+ * Indicates whether the new point should be added before or after the
501
+ * active point in the sketch. Not supported by VertiGIS Studio Mobile.
502
+ */
503
+ nodeOrder?: AddNodeOrder;
504
+ }
505
+ /**
506
+ * Arguments for the "sketching.delete" command.
507
+ */
508
+ export interface DeleteGeometryArgs extends HasMaps {
509
+ /**
510
+ * The point to remove from the geometry. If this property is defined, the
511
+ * 'pointIndex' and 'partIndex' properties are ignored. If no point nor
512
+ * pointIndex/partIndex are specified, any active points will be deleted. If
513
+ * there are no active points, the entire geometry will be deleted.
514
+ */
515
+ point?: Point;
516
+ /**
517
+ * The geometry to remove a point from. If this property is not specified,
518
+ * any active vertices will be deleted.
519
+ */
520
+ geometry?: Geometry;
521
+ /**
522
+ * The index of the point that should be removed from the geometry. If this
523
+ * property is defined, the geometry property must also be defined.
524
+ */
525
+ pointIndex?: number;
526
+ /**
527
+ * The index of the part of the geometry that the point should be removed
528
+ * from. Required for polyline and polygon geometry types when the geometry
529
+ * and pointIndex properties are defined.
530
+ */
531
+ partIndex?: number;
532
+ }
533
+ /**
534
+ * Arguments for the "sketching.set-geometry-mode" command.
535
+ */
536
+ export interface SetGeometryModeArgs extends HasMaps {
537
+ /**
538
+ * The geometry mode to switch to. VertiGIS Studio Mobile only supports
539
+ * "line" and "area".
540
+ */
541
+ editorGeometryMode: EditorGeometryMode | SketchTool;
542
+ }
543
+ /**
544
+ * Arguments for the "sketching.set-interaction-mode" command.
545
+ */
546
+ export interface SetInteractionModeArgs extends HasMaps {
547
+ /**
548
+ * The interaction mode to switch to.
549
+ */
550
+ editorInteractionMode: EditorInteractionMode;
551
+ }
552
+ /**
553
+ * Arguments for the "sketching.start-streaming" command.
554
+ */
555
+ export interface StartStreamingArgs extends HasMaps {
556
+ /**
557
+ * An optional value indicating, in seconds, how often points should be
558
+ * recorded.
559
+ */
560
+ interval?: number;
561
+ }
562
+ /**
563
+ * The editor geometry mode.
564
+ */
565
+ export type EditorGeometryMode = "line" | "area";
566
+ /**
567
+ * The editor interaction mode.
568
+ */
569
+ export type EditorInteractionMode = "centerCrosshairMode" | "pointerMode";
570
+ /**
571
+ * Settings for a sketch.
572
+ */
573
+ export interface GeometryEditorSettings {
574
+ /**
575
+ * Whether snapping should be enabled.
576
+ */
577
+ snappingEnabled?: boolean;
578
+ /**
579
+ * Whether bearing labels should be shown on the map.
580
+ */
581
+ showBearings?: boolean;
582
+ /**
583
+ * The editor geometry mode.
584
+ */
585
+ editorGeometryMode?: EditorGeometryMode;
586
+ /**
587
+ * The editor interaction mode.
588
+ */
589
+ editorInteractionMode?: EditorInteractionMode;
590
+ /**
591
+ * Whether the sketch is using freehand or segment sketching.
592
+ */
593
+ freehand?: boolean;
594
+ /**
595
+ * Whether the sketch should stop when double clicking.
596
+ */
597
+ finishOnDoubleClick?: boolean;
598
+ /**
599
+ * Whether the sketch should commit its geometry if another sketch is
600
+ * activated.
601
+ */
602
+ finishIfInterrupted?: boolean;
603
+ }
604
+ /**
605
+ * Result returned from the 'sketching.get-active-points' operation.
606
+ */
607
+ export interface GetActivePointsResult extends GetActiveSketchResult {
608
+ }
609
+ /**
610
+ * Result returned from the 'sketching.get-active-sketch' operation.
611
+ */
612
+ export interface GetActiveSketchResult {
613
+ /**
614
+ * The active graphic(s).
615
+ */
616
+ graphics: Graphic[] | undefined;
617
+ /**
618
+ * The map associated with the graphics.
619
+ */
620
+ maps: MapExtension;
621
+ }
622
+ /**
623
+ * Specifies if a desired point comes before or after a given reference point.
624
+ */
625
+ export type PointOffset = "before" | "after";
626
+ /**
627
+ * Arguments for the 'sketching.get-adjacent-point' operation.
628
+ */
629
+ export interface GetAdjacentPointArgs extends HasMaps {
630
+ /**
631
+ * A point geometry that represents a vertex within an active editing
632
+ * graphic.
633
+ */
634
+ referencePoint: Point;
635
+ /**
636
+ * Specifies if the desired point comes before or after the referencePoint.
637
+ * Defaults to 'after'.
638
+ */
639
+ relativeOffset?: PointOffset;
640
+ }
641
+ /**
642
+ * Arguments for the "sketching.set-constraints" command.
643
+ */
644
+ export interface SetConstraintsArgs extends HasMaps {
645
+ /**
646
+ * The constraint for the length of the line between the selected vertex and
647
+ * the new point.
648
+ */
649
+ length?: number;
650
+ /**
651
+ * The constraint for the angle of the line between the selected vertex and
652
+ * the new point, relative to the reference line. Remains unchanged until
653
+ * set to a different value, or cleared.
654
+ */
655
+ angle?: number;
656
+ /**
657
+ * A reference line that the angle will be relative to. Defaults to 'north'.
658
+ * Remains unchanged until set again.
659
+ */
660
+ referenceLine?: ReferenceLine;
661
+ /**
662
+ * Indicates whether constraints will be automatically cleared after a
663
+ * vertex is added or updated. If not set (value is null), then the value
664
+ * will remain unchanged with this operation. If the value has never been
665
+ * set, the default is false. Remains unchanged until set to a different
666
+ * value.
667
+ */
668
+ autoClear?: boolean;
669
+ /**
670
+ * The units to be used for length. If not specified, the units of the map's
671
+ * spatial reference will be used.
672
+ */
673
+ units?: LengthUnitsMobile;
674
+ /**
675
+ * Indicates whether the distance calculations will be geodetic or planar.
676
+ * Default is true.
677
+ */
678
+ geodetic?: boolean;
679
+ /**
680
+ * The geodetic curve type used when calculating the new point. Only applies
681
+ * when geodetic is set to true. Defaults to geodesic.
682
+ */
683
+ geodeticCurveType?: GeodeticCurveType;
684
+ }
685
+ /**
686
+ * Arguments for the "sketching.clear-constraints" command.
687
+ */
688
+ export interface ClearConstraintsArgs extends HasMaps {
689
+ /**
690
+ * Indicates whether the length constraint should be cleared. Defaults to
691
+ * true if not specified.
692
+ */
693
+ clearLengthConstraint?: boolean;
694
+ /**
695
+ * Indicates whether the angle constraint should be cleared. Defaults to
696
+ * true if not specified.
697
+ */
698
+ clearAngleConstraint?: boolean;
699
+ }
700
+ /**
701
+ * Arguments for the "sketching.set-snapping-configuration" command.
702
+ */
703
+ export interface SetSnappingConfigurationArgs extends HasMaps {
704
+ /**
705
+ * The snapping properties to set.
706
+ */
707
+ config: SnappingProperties;
708
+ /**
709
+ * Whether the config should be replace, or merged. Defaults to "merge".
710
+ */
711
+ mode?: "replace" | "merge";
712
+ }
713
+ /**
714
+ * Arguments for the "sketching.set-topology-configuration" command.
715
+ */
716
+ export interface SetTopologyConfigurationArgs extends HasMaps {
717
+ /**
718
+ * The topology properties to set.
719
+ */
720
+ config: TopologyProperties;
721
+ /**
722
+ * Whether the config should be replace, or merged. Defaults to "merge".
723
+ */
724
+ mode?: "replace" | "merge";
725
+ }
726
+ export declare class SketchingOperations extends OperationRegistry {
727
+ protected readonly _prefix = "sketching";
728
+ /**
729
+ * Allows the user to create geometry by sketching on a map. Returns the
730
+ * geometry that was drawn, along with the map that it was drawn on.
731
+ */
732
+ get captureGeometry(): Operation<CaptureGeometryArgs, CaptureGeometryResult>;
733
+ /**
734
+ * Allows the user to edit the symbology used by the graphics actively being
735
+ * edited. Web only.
736
+ *
737
+ * @webOnly
738
+ */
739
+ get editActiveSymbol(): Operation<void, EditSymbolResult | undefined>;
740
+ /**
741
+ * Allows the user to edit an existing geometry by drawing on a map. Returns
742
+ * the geometry that was edited, or the supplied feature with the altered
743
+ * geometry applied, along with the map that it was drawn on.
744
+ */
745
+ get editGeometry(): Operation<EditGeometryArgs, EditGeometryResult>;
746
+ /**
747
+ * Allows the user to move an existing geometry by a specified amount.
748
+ * Returns the altered geometry or the supplied feature with altered
749
+ * geometry applied. Will also pass through any map or symbol associated
750
+ * with the command chain, but only the map is required for this operation.
751
+ * Web only.
752
+ *
753
+ * @webOnly
754
+ */
755
+ get moveGeometry(): Operation<MoveGeometryArgs, GeometryOperationBase>;
756
+ /**
757
+ * Allows the user to scale and mirror an existing geometry on either axis.
758
+ * Returns the altered geometry or the supplied feature with altered
759
+ * geometry applied. Will also pass through any map or symbol associated
760
+ * with the command chain, but they are not required for this operation. Web
761
+ * only.
762
+ *
763
+ * @webOnly
764
+ */
765
+ get scaleGeometry(): Operation<ScaleGeometryArgs, GeometryOperationBase>;
766
+ /**
767
+ * Allows the user to rotate an existing geometry. Returns the altered
768
+ * geometry or the supplied feature with altered geometry applied. Will also
769
+ * pass through any map or symbol associated with the command chain, but
770
+ * they are not required for this operation. Web only.
771
+ *
772
+ * @webOnly
773
+ */
774
+ get rotateGeometry(): Operation<RotateGeometryArgs, GeometryOperationBase>;
775
+ /**
776
+ * Stops geometry capturing or editing on a given map. Returns the current
777
+ * geometry. If validateGeometry parameter is true and geometry is invalid,
778
+ * the operation will return null.
779
+ */
780
+ get stop(): Operation<StopGeometryEditArgs | void, CaptureGeometryResult>;
781
+ /**
782
+ * Deprecated - Mobile users should rather use "geometry.add-point"; Web
783
+ * users should use "sketching.add-point" or "sketching.insert-point"
784
+ * instead.
785
+ *
786
+ * @deprecated
787
+ */
788
+ get addNodeToGeometry(): Operation<AddNodeToGeometryArgs, Geometry>;
789
+ /**
790
+ * Returns the active sketch graphic from a map. Web only.
791
+ *
792
+ * @webOnly
793
+ */
794
+ get getActiveSketch(): Operation<void, GetActiveSketchResult>;
795
+ /**
796
+ * Deprecated - use 'sketching.get-active-points' instead. Web only.
797
+ *
798
+ * @deprecated
799
+ * @webOnly
800
+ */
801
+ get getActiveNode(): Operation<Maps, GetActivePointsResult>;
802
+ /**
803
+ * Returns the active point graphics of the active sketch or edit session on
804
+ * a map. Web only.
805
+ *
806
+ * @webOnly
807
+ */
808
+ get getActivePoints(): Operation<Maps, GetActivePointsResult>;
809
+ /**
810
+ * Return the adjacent point graphic(s), relative to a given vertex that's a
811
+ * part of an active editing or sketching session. This operation is only
812
+ * supported for Polyline and Polygon geometries. Web only.
813
+ *
814
+ * @webOnly
815
+ */
816
+ get getAdjacentPoint(): Operation<GetAdjacentPointArgs, GetActiveSketchResult>;
817
+ /**
818
+ * Checks whether streaming is active. Mobile only.
819
+ *
820
+ * @mobileOnly
821
+ */
822
+ get isStreaming(): Operation<HasMaps, boolean>;
823
+ }
824
+ export declare class SketchingCommands extends CommandRegistry {
825
+ protected readonly _prefix = "sketching";
826
+ /**
827
+ * Set the snapping default to 'on' for all subsequent operations. Web only.
828
+ *
829
+ * @webOnly
830
+ */
831
+ get activateSnapping(): Command<void>;
832
+ /**
833
+ * Set the topology default to 'on' for all subsequent operations. Web only.
834
+ *
835
+ * @webOnly
836
+ */
837
+ get activateTopology(): Command<void>;
838
+ /**
839
+ * Cancels the current geometry edit or capture operation. Web only.
840
+ *
841
+ * @webOnly
842
+ */
843
+ get cancel(): Command<void>;
844
+ /**
845
+ * Set the snapping default to 'off' for all subsequent operations. Web
846
+ * only.
847
+ *
848
+ * @webOnly
849
+ */
850
+ get deactivateSnapping(): Command<void>;
851
+ /**
852
+ * Set the topology default to 'off' for all subsequent operations. Web
853
+ * only.
854
+ *
855
+ * @webOnly
856
+ */
857
+ get deactivateTopology(): Command<void>;
858
+ /**
859
+ * Undoes the last edit while editing a geometry.
860
+ */
861
+ get undo(): Command<HasMaps>;
862
+ /**
863
+ * Redoes the last undone edit while editing a geometry.
864
+ */
865
+ get redo(): Command<HasMaps>;
866
+ /**
867
+ * Sets the geometry mode of the geometry editor.
868
+ */
869
+ get setGeometryMode(): Command<SetGeometryModeArgs>;
870
+ /**
871
+ * Sets the global snapping configuration.
872
+ */
873
+ get setSnappingConfiguration(): Command<SetSnappingConfigurationArgs>;
874
+ /**
875
+ * Sets the global snapping configuration. Web only.
876
+ *
877
+ * @webOnly
878
+ */
879
+ get setTopologyConfiguration(): Command<SetTopologyConfigurationArgs>;
880
+ /**
881
+ * Adds a point at the center of the map while editing a geometry. Works in
882
+ * centerCrosshair mode only. Mobile only.
883
+ *
884
+ * @mobileOnly
885
+ */
886
+ get addPointAtCenter(): Command<HasMaps>;
887
+ /**
888
+ * Adds a point at the user's current location while editing a geometry.
889
+ * Mobile only.
890
+ *
891
+ * @mobileOnly
892
+ */
893
+ get addPointAtCurrentLocation(): Command<HasMaps>;
894
+ /**
895
+ * Sets a point at the user's current location while editing a geometry. In
896
+ * this context, "set" means to either add a point at the current location,
897
+ * or update the currently selected point to be the user's current location,
898
+ * depending on what edit mode the user is in. Mobile only.
899
+ *
900
+ * @mobileOnly
901
+ */
902
+ get setPointAtCurrentLocation(): Command<HasMaps>;
903
+ /**
904
+ * If a point is supplied while a sketching or editing operation is active,
905
+ * the vertex at that point will be deleted from the current geometry. If no
906
+ * point is supplied, any active points in the session will be deleted. If
907
+ * there are no active points in the session, the entire geometry will be
908
+ * deleted.
909
+ */
910
+ get delete(): Command<void | DeleteGeometryArgs>;
911
+ /**
912
+ * Deprecated - use 'sketching.move-point' instead. Web only.
913
+ *
914
+ * @deprecated
915
+ * @webOnly
916
+ */
917
+ get moveNode(): Command<MoveNodeArgs>;
918
+ /**
919
+ * Moves a point within an active sketch to a new location. Web only.
920
+ *
921
+ * @webOnly
922
+ */
923
+ get movePoint(): Command<MovePointArgs>;
924
+ /**
925
+ * Deprecated - use 'sketching.set-active-points' instead. Web only.
926
+ *
927
+ * @deprecated
928
+ * @webOnly
929
+ */
930
+ get switchActiveNode(): Command<SwitchActiveNodeArgs>;
931
+ /**
932
+ * Switches the active point of an active sketch. Web only.
933
+ *
934
+ * @webOnly
935
+ */
936
+ get setActivePoints(): Command<SetActivePointsArgs>;
937
+ /**
938
+ * Sets the interaction mode of the geometry editor. Mobile only.
939
+ *
940
+ * @mobileOnly
941
+ */
942
+ get setInteractionMode(): Command<SetInteractionModeArgs>;
943
+ /**
944
+ * Enables free scaling while editing geometries. Web only.
945
+ *
946
+ * @webOnly
947
+ */
948
+ get enableFreeScaleMode(): Command<void>;
949
+ /**
950
+ * Disables free scaling while editing geometries. Web only.
951
+ *
952
+ * @webOnly
953
+ */
954
+ get disableFreeScaleMode(): Command<void>;
955
+ /**
956
+ * Enables more precise inputs while editing geometries. Web only.
957
+ *
958
+ * @webOnly
959
+ */
960
+ get enablePrecisionMode(): Command<void>;
961
+ /**
962
+ * Disables more precise inputs while editing geometries. Web only.
963
+ *
964
+ * @webOnly
965
+ */
966
+ get disablePrecisionMode(): Command<void>;
967
+ /**
968
+ * Sets constraints on the active sketch. Mobile only.
969
+ *
970
+ * @mobileOnly
971
+ */
972
+ get setConstraints(): Command<SetConstraintsArgs>;
973
+ /**
974
+ * Clears constraints that have been previously set. Mobile only.
975
+ *
976
+ * @mobileOnly
977
+ */
978
+ get clearConstraints(): Command<ClearConstraintsArgs>;
979
+ /**
980
+ * Inserts a point into a polygon, polyline, or multipoint at the specified
981
+ * index. If the partIndex is null, then the last part is used. If the
982
+ * pointIndex is null, then the new point is inserted at the end.
983
+ */
984
+ get insertPoint(): Command<InsertPointArgs>;
985
+ /**
986
+ * Adds a point to polygon, polyline, or multipoint using the selected index
987
+ * as the point to insert after.
988
+ */
989
+ get addPoint(): Command<AddPointArgs>;
990
+ /**
991
+ * Starts streaming: recording your location at regular intervals and adding
992
+ * the collected points to the currently active geometry editor. Mobile
993
+ * only.
994
+ *
995
+ * @mobileOnly
996
+ */
997
+ get startStreaming(): Command<StartStreamingArgs>;
998
+ /**
999
+ * Stops streaming. Mobile only.
1000
+ *
1001
+ * @mobileOnly
1002
+ */
1003
+ get stopStreaming(): Command<HasMaps>;
1004
+ }
1005
+ export declare class SketchingEvents extends EventRegistry {
1006
+ protected readonly _prefix = "sketching";
1007
+ /**
1008
+ * Raised when streaming has begun. Mobile only.
1009
+ *
1010
+ * @mobileOnly
1011
+ */
1012
+ get streamingStarted(): Event<HasMaps>;
1013
+ /**
1014
+ * Raised when streaming has stopped. Mobile only.
1015
+ *
1016
+ * @mobileOnly
1017
+ */
1018
+ get streamingStopped(): Event<HasMaps>;
1019
+ }