@vertigis/viewer-spec 43.6.0 → 45.2.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.
@@ -1,4 +1,5 @@
1
1
  import type { CancelToken } from "@vertigis/arcgis-extensions/support/Cancellable";
2
+ import type { Event } from "./Event.js";
2
3
  import type { Message, MessageExecuteOptions } from "./Message.js";
3
4
  /**
4
5
  * A named operation. Operations compute a value, but don't generally alter the
@@ -9,6 +10,15 @@ export interface Operation<T = void, TResult = undefined> extends Message {
9
10
  * The name of the operation.
10
11
  */
11
12
  name: string;
13
+ /**
14
+ * An event that is published whenever canExecute might return a new value.
15
+ * Implementations are responsible for calling publish() as appropriate.
16
+ */
17
+ readonly canExecuteChanged: Event;
18
+ /**
19
+ * Indicates whether the operation has been initialized.
20
+ */
21
+ readonly isInitialized: boolean;
12
22
  /**
13
23
  * Executes the operation and returns its result.
14
24
  *
@@ -17,6 +27,18 @@ export interface Operation<T = void, TResult = undefined> extends Message {
17
27
  * behavior.
18
28
  */
19
29
  execute: (argument: T, options?: CancelToken | MessageExecuteOptions) => Promise<TResult>;
30
+ /**
31
+ * Determines whether the operation can execute with the given arguments.
32
+ *
33
+ * @param argument The operation arguments.
34
+ */
35
+ canExecute(argument?: T): boolean;
36
+ /**
37
+ * Initializes the operation if it is not already initialized. Attempting to
38
+ * execute an operation will automatically initialize it, however calling
39
+ * canExecute() will always return false until the operation is initialized.
40
+ */
41
+ initialize(): Promise<void>;
20
42
  }
21
43
  /**
22
44
  * Context that will be passed in to each behavior for an operation.
@@ -1,5 +1,6 @@
1
1
  import { OperationRegistry } from "../OperationRegistry.js";
2
2
  import { AppOperations } from "./app.js";
3
+ import { ArcadeOperations } from "./arcade.js";
3
4
  import { AuthOperations } from "./auth.js";
4
5
  import { BasemapOperations } from "./basemap.js";
5
6
  import { ChartOperations } from "./charts.js";
@@ -24,6 +25,7 @@ import { TasksOperations } from "./tasks.js";
24
25
  import { UIOperations } from "./ui.js";
25
26
  import { ViewerOperations } from "./viewer.js";
26
27
  export declare class Operations extends OperationRegistry {
28
+ readonly arcade: ArcadeOperations;
27
29
  readonly auth: AuthOperations;
28
30
  readonly app: AppOperations;
29
31
  readonly basemap: BasemapOperations;
@@ -1 +1 @@
1
- import{OperationRegistry}from"../OperationRegistry.js";import{AppOperations}from"./app.js";import{AuthOperations}from"./auth.js";import{BasemapOperations}from"./basemap.js";import{ChartOperations}from"./charts.js";import{DebugConsoleOperations}from"./debugConsole.js";import{DrawingOperations}from"./drawing.js";import{FileOperations}from"./file.js";import{GeocodeOperations}from"./geocode.js";import{GeolocationOperations}from"./geolocation.js";import{GeometryOperations}from"./geometry.js";import{HighlightsOperations}from"./highlights.js";import{KpiOperations}from"./kpi.js";import{LogViewerOperations}from"./logViewer.js";import{MapOperations}from"./map.js";import{MeasurementOperations}from"./measurement.js";import{MessagingOperations}from"./messaging.js";import{NetworkOperations}from"./network.js";import{OfflineOperations}from"./offline.js";import{ResultsOperations}from"./results.js";import{SketchingOperations}from"./sketching.js";import{SystemOperations}from"./system.js";import{TasksOperations}from"./tasks.js";import{UIOperations}from"./ui.js";import{ViewerOperations}from"./viewer.js";export class Operations extends OperationRegistry{constructor(){super(...arguments),this.auth=new AuthOperations(this._messages),this.app=new AppOperations(this._messages),this.basemap=new BasemapOperations(this._messages),this.charts=new ChartOperations(this._messages),this.drawing=new DrawingOperations(this._messages),this.file=new FileOperations(this._messages),this.geocode=new GeocodeOperations(this._messages),this.geolocation=new GeolocationOperations(this._messages),this.geometry=new GeometryOperations(this._messages),this.highlights=new HighlightsOperations(this._messages),this.kpi=new KpiOperations(this._messages),this.logViewer=new LogViewerOperations(this._messages),this.map=new MapOperations(this._messages),this.measurement=new MeasurementOperations(this._messages),this.messaging=new MessagingOperations(this._messages),this.network=new NetworkOperations(this._messages),this.offline=new OfflineOperations(this._messages),this.sketching=new SketchingOperations(this._messages),this.system=new SystemOperations(this._messages),this.results=new ResultsOperations(this._messages),this.tasks=new TasksOperations(this._messages),this.ui=new UIOperations(this._messages),this.viewer=new ViewerOperations(this._messages),this.debugConsole=new DebugConsoleOperations(this._messages)}}
1
+ import{OperationRegistry}from"../OperationRegistry.js";import{AppOperations}from"./app.js";import{ArcadeOperations}from"./arcade.js";import{AuthOperations}from"./auth.js";import{BasemapOperations}from"./basemap.js";import{ChartOperations}from"./charts.js";import{DebugConsoleOperations}from"./debugConsole.js";import{DrawingOperations}from"./drawing.js";import{FileOperations}from"./file.js";import{GeocodeOperations}from"./geocode.js";import{GeolocationOperations}from"./geolocation.js";import{GeometryOperations}from"./geometry.js";import{HighlightsOperations}from"./highlights.js";import{KpiOperations}from"./kpi.js";import{LogViewerOperations}from"./logViewer.js";import{MapOperations}from"./map.js";import{MeasurementOperations}from"./measurement.js";import{MessagingOperations}from"./messaging.js";import{NetworkOperations}from"./network.js";import{OfflineOperations}from"./offline.js";import{ResultsOperations}from"./results.js";import{SketchingOperations}from"./sketching.js";import{SystemOperations}from"./system.js";import{TasksOperations}from"./tasks.js";import{UIOperations}from"./ui.js";import{ViewerOperations}from"./viewer.js";export class Operations extends OperationRegistry{constructor(){super(...arguments),this.arcade=new ArcadeOperations(this._messages),this.auth=new AuthOperations(this._messages),this.app=new AppOperations(this._messages),this.basemap=new BasemapOperations(this._messages),this.charts=new ChartOperations(this._messages),this.drawing=new DrawingOperations(this._messages),this.file=new FileOperations(this._messages),this.geocode=new GeocodeOperations(this._messages),this.geolocation=new GeolocationOperations(this._messages),this.geometry=new GeometryOperations(this._messages),this.highlights=new HighlightsOperations(this._messages),this.kpi=new KpiOperations(this._messages),this.logViewer=new LogViewerOperations(this._messages),this.map=new MapOperations(this._messages),this.measurement=new MeasurementOperations(this._messages),this.messaging=new MessagingOperations(this._messages),this.network=new NetworkOperations(this._messages),this.offline=new OfflineOperations(this._messages),this.sketching=new SketchingOperations(this._messages),this.system=new SystemOperations(this._messages),this.results=new ResultsOperations(this._messages),this.tasks=new TasksOperations(this._messages),this.ui=new UIOperations(this._messages),this.viewer=new ViewerOperations(this._messages),this.debugConsole=new DebugConsoleOperations(this._messages)}}
@@ -0,0 +1,100 @@
1
+ import type { ItemRef } from "app-config/common/ItemRef.js";
2
+ import type { Operation } from "../Operation.js";
3
+ import { OperationRegistry } from "../OperationRegistry.js";
4
+ import type { Model } from "../common.js";
5
+ /**
6
+ * The arguments for the arcade.run operation.
7
+ */
8
+ export interface RunArcadeArgs {
9
+ /**
10
+ * The stringified Arcade script to run. If this property is included, the
11
+ * operation will return the result of the script.
12
+ */
13
+ executeScript?: string;
14
+ /**
15
+ * The stringified Arcade script used to determine whether or not the
16
+ * executeScript can/should be run. If no executeScript is provided and the
17
+ * canExecuteScript returns a truthy value, the operation will return its
18
+ * input arguments; otherwise, if the canEecuteScript returns a falsey
19
+ * value, it will throw a {@link Cancellation}.
20
+ */
21
+ canExecuteScript?: string;
22
+ /**
23
+ * An arguments object that provides named variables and associated values,
24
+ * which can be referenced from within the executeScript and
25
+ * canExecuteScript.
26
+ *
27
+ * NOTE: All variable keys must consist of only lowercase letters;
28
+ * camel-cased context variables will break the script when they are
29
+ * referenced at runtime.
30
+ */
31
+ arguments?: Record<string, unknown | ItemPropertyPath>;
32
+ /**
33
+ * Properties used to set a series of watch handles and/or event listeners
34
+ * on an item that will trigger the canExecuteChanged event for the
35
+ * 'arcade.run' operation.
36
+ */
37
+ watchHandles?: WatchEventHandleProperties[];
38
+ }
39
+ /**
40
+ * An object containing a propertyPath that used to retrieve a property value
41
+ * from the given item.
42
+ */
43
+ export interface ItemPropertyPath {
44
+ /**
45
+ * The item from which to access a property value.
46
+ */
47
+ item: ItemRef | Model;
48
+ /**
49
+ * The path to a property on an item.
50
+ */
51
+ propertyPath: string;
52
+ }
53
+ export declare class ArcadeOperations extends OperationRegistry {
54
+ /**
55
+ * Runs a stringified Arcade script. If only a string is passed in as an
56
+ * argument, it is interpreted as an executeScript. If an executeSript is
57
+ * provided, the operation will return its result. If only a canExecute
58
+ * script is provided and it returns a truthy result, the operation will
59
+ * return its input arguments. If a canExecuteScript returns a falsey value,
60
+ * the operation will throw a {@link Cancellation}.
61
+ *
62
+ * @webOnly
63
+ *
64
+ */
65
+ get run(): Operation<RunArcadeArgs | string, unknown>;
66
+ }
67
+ /**
68
+ * Properties used to set a series of watch handles and/or event listeners on
69
+ * an item.
70
+ */
71
+ export interface WatchEventHandleProperties {
72
+ /**
73
+ * The item whose properties will be watched for changes and/or events.
74
+ */
75
+ item: ItemRef | Model;
76
+ /**
77
+ * One or more properties on the item that will be watched for changes
78
+ * and/or events. Any strings will be used as propertyPaths that will be
79
+ * watched for changes; for this to work, the item and all properties
80
+ * referenced within the path (except for the last) must implement
81
+ * {@link Observable}.
82
+ */
83
+ watch: string | WatchEventProperty | (string | WatchEventProperty)[];
84
+ }
85
+ /**
86
+ * Properties on an item to watch, with an optional event name to listen for.
87
+ */
88
+ export interface WatchEventProperty {
89
+ /**
90
+ * The path used to target a property on an item that will be watched for
91
+ * events. The watched property must implement {@link Evented}; this will
92
+ * effectively do `item[propertyPath].on(eventName)`.
93
+ */
94
+ propertyPath?: string;
95
+ /**
96
+ * The name of the event to listen for. If no propertyPath is included, the
97
+ * listener will go directly on the watched item.
98
+ */
99
+ eventName: string;
100
+ }
@@ -0,0 +1 @@
1
+ import{OperationRegistry}from"../OperationRegistry.js";export class ArcadeOperations extends OperationRegistry{get run(){return this._messages.operation("arcade.run")}}
@@ -245,6 +245,13 @@ export declare class GeometryOperations extends OperationRegistry {
245
245
  get removePoint(): Operation<RemovePointArgs, Geometry>;
246
246
  }
247
247
  export declare class GeometryCommands extends CommandRegistry {
248
+ /**
249
+ * Display the geometry settings dialog. This allows you to configure buffer
250
+ * distance and buffer units.
251
+ *
252
+ * @webOnly
253
+ */
254
+ get displaySettings(): Command<HasUITarget>;
248
255
  /**
249
256
  * Sets the default buffer distance for the viewer session. The buffer
250
257
  * distance must be a number > 0.
@@ -258,11 +265,4 @@ export declare class GeometryCommands extends CommandRegistry {
258
265
  * @webOnly
259
266
  */
260
267
  get setBufferUnits(): Command<LengthUnits>;
261
- /**
262
- * Show the geometry settings dialog. This allows you to configure buffer
263
- * distance and buffer units.
264
- *
265
- * @webOnly
266
- */
267
- get showSettings(): Command<HasUITarget>;
268
268
  }
@@ -1 +1 @@
1
- import{CommandRegistry}from"../CommandRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";export class GeometryOperations extends OperationRegistry{get project(){return this._messages.operation("geometry.project")}get addPixelTolerance(){return this._messages.operation("geometry.add-pixel-tolerance")}get buffer(){return this._messages.operation("geometry.buffer")}get getBufferDistance(){return this._messages.operation("geometry.get-buffer-distance")}get getBufferUnits(){return this._messages.operation("geometry.get-buffer-units")}get addPoint(){return this._messages.operation("geometry.add-point")}get addPart(){return this._messages.operation("geometry.add-part")}get calculatePoint(){return this._messages.operation("geometry.calculate-point")}get removePoint(){return this._messages.operation("geometry.remove-point")}}export class GeometryCommands extends CommandRegistry{get setBufferDistance(){return this._messages.command("geometry.set-buffer-distance")}get setBufferUnits(){return this._messages.command("geometry.set-buffer-units")}get showSettings(){return this._messages.command("geometry.show-settings")}}
1
+ import{CommandRegistry}from"../CommandRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";export class GeometryOperations extends OperationRegistry{get project(){return this._messages.operation("geometry.project")}get addPixelTolerance(){return this._messages.operation("geometry.add-pixel-tolerance")}get buffer(){return this._messages.operation("geometry.buffer")}get getBufferDistance(){return this._messages.operation("geometry.get-buffer-distance")}get getBufferUnits(){return this._messages.operation("geometry.get-buffer-units")}get addPoint(){return this._messages.operation("geometry.add-point")}get addPart(){return this._messages.operation("geometry.add-part")}get calculatePoint(){return this._messages.operation("geometry.calculate-point")}get removePoint(){return this._messages.operation("geometry.remove-point")}}export class GeometryCommands extends CommandRegistry{get displaySettings(){return this._messages.command("geometry.display-settings")}get setBufferDistance(){return this._messages.command("geometry.set-buffer-distance")}get setBufferUnits(){return this._messages.command("geometry.set-buffer-units")}}
@@ -564,6 +564,11 @@ export interface StartSketchArgs {
564
564
  * The settings to be applied to the geometry editor.
565
565
  */
566
566
  editorSettings: GeometryEditorSettings;
567
+ /**
568
+ * The maximum number of segments permitted for a polyline or polygon
569
+ * sketch. Default is no limit. Mobile only.
570
+ */
571
+ maxSegments?: number;
567
572
  }
568
573
  /**
569
574
  * Result of the "map.get-coordinate-transformation" operation.
@@ -38,6 +38,13 @@ export interface GeometryModeArgs extends MapExtensionArgs {
38
38
  export interface CreateMeasurementGraphicsResult extends CreateGraphicsResult {
39
39
  }
40
40
  export declare class MeasurementCommands extends CommandRegistry {
41
+ /**
42
+ * Display the measurements settings dialog. This allows you to configure
43
+ * measurements system, area and length units.
44
+ *
45
+ * @webOnly
46
+ */
47
+ get displaySettings(): Command<HasUITarget>;
41
48
  /**
42
49
  * Sets the value of the default point, line, or polygon symbol. The symbol
43
50
  * can be configured with an instance of the Esri symbol or with the Esri
@@ -60,13 +67,6 @@ export declare class MeasurementCommands extends CommandRegistry {
60
67
  * @webOnly
61
68
  */
62
69
  get setLengthUnits(): Command<LengthMeasurementUnits | undefined>;
63
- /**
64
- * Show the measurements settings dialog. This allows you to configure
65
- * measurements system, area and length units.
66
- *
67
- * @webOnly
68
- */
69
- get showSettings(): Command<HasUITarget>;
70
70
  /**
71
71
  * Starts drawing a measurement on the map. If a drawing has previously been
72
72
  * started and stopped it will be resumed.
@@ -1 +1 @@
1
- import{CommandRegistry}from"../CommandRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";var GeometryMode;!function(e){e.LINE="line",e.AREA="area"}(GeometryMode||(GeometryMode={}));export class MeasurementCommands extends CommandRegistry{get setDefaultSymbol(){return this._messages.command("measurement.set-default-symbol")}get setAreaUnits(){return this._messages.command("measurement.set-area-units")}get setLengthUnits(){return this._messages.command("measurement.set-length-units")}get showSettings(){return this._messages.command("measurement.show-settings")}get start(){return this._messages.command("measurement.start")}get stop(){return this._messages.command("measurement.stop")}get clear(){return this._messages.command("measurement.clear")}get setGeometryMode(){return this._messages.command("measurement.set-geometry-mode")}}export class MeasurementOperations extends OperationRegistry{get createGraphics(){return this._messages.operation("measurement.create-graphics")}get captureGeometry(){return this._messages.operation("measurement.capture-geometry")}get getDefaultSymbol(){return this._messages.operation("measurement.get-default-symbol")}get getDefaultSymbol3D(){return this._messages.operation("measurement.get-default-symbol-3d")}get getAreaUnits(){return this._messages.operation("measurement.get-area-units")}get getLengthUnits(){return this._messages.operation("measurement.get-length-units")}}
1
+ import{CommandRegistry}from"../CommandRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";var GeometryMode;!function(e){e.LINE="line",e.AREA="area"}(GeometryMode||(GeometryMode={}));export class MeasurementCommands extends CommandRegistry{get displaySettings(){return this._messages.command("measurement.display-settings")}get setDefaultSymbol(){return this._messages.command("measurement.set-default-symbol")}get setAreaUnits(){return this._messages.command("measurement.set-area-units")}get setLengthUnits(){return this._messages.command("measurement.set-length-units")}get start(){return this._messages.command("measurement.start")}get stop(){return this._messages.command("measurement.stop")}get clear(){return this._messages.command("measurement.clear")}get setGeometryMode(){return this._messages.command("measurement.set-geometry-mode")}}export class MeasurementOperations extends OperationRegistry{get createGraphics(){return this._messages.operation("measurement.create-graphics")}get captureGeometry(){return this._messages.operation("measurement.capture-geometry")}get getDefaultSymbol(){return this._messages.operation("measurement.get-default-symbol")}get getDefaultSymbol3D(){return this._messages.operation("measurement.get-default-symbol-3d")}get getAreaUnits(){return this._messages.operation("measurement.get-area-units")}get getLengthUnits(){return this._messages.operation("measurement.get-length-units")}}
@@ -24,11 +24,13 @@ import type { Symbol as SymbolJson } from "@vertigis/arcgis-extensions/portal/Sy
24
24
  import type { ItemRef } from "../../app-config/common/ItemRef.js";
25
25
  import type { Command } from "../Command.js";
26
26
  import { CommandRegistry } from "../CommandRegistry.js";
27
+ import type { Event } from "../Event.js";
28
+ import { EventRegistry } from "../EventRegistry.js";
27
29
  import type { Operation } from "../Operation.js";
28
30
  import { OperationRegistry } from "../OperationRegistry.js";
29
31
  import type { FeaturesLike, GeometryLike, GraphicsLike, HasMaps, MapsLike } from "../common.js";
30
32
  import type { EditSymbolResult } from "./drawing.js";
31
- import type { LengthUnits } from "./geometry.js";
33
+ import type { GeodeticCurveType, LengthUnits, LengthUnitsMobile, ReferenceLine } from "./geometry.js";
32
34
  /**
33
35
  * A representation of a 2D vector or point.
34
36
  */
@@ -145,6 +147,11 @@ export interface CaptureGeometryArgs {
145
147
  * Mobile.
146
148
  */
147
149
  symbol?: SymbolJson | SymbolSet;
150
+ /**
151
+ * The maximum number of segments permitted for a polyline or polygon
152
+ * sketch. Default is no limit. Mobile only.
153
+ */
154
+ maxSegments?: number;
148
155
  }
149
156
  /**
150
157
  * Result of the "sketching.capture-geometry" operation.
@@ -355,6 +362,15 @@ export interface SetInteractionModeArgs extends HasMaps {
355
362
  */
356
363
  editorInteractionMode: EditorInteractionMode;
357
364
  }
365
+ /**
366
+ * Arguments for the "sketching.start-streaming" command.
367
+ */
368
+ export interface StartStreamingArgs extends HasMaps {
369
+ /**
370
+ * An optional value indicating, in seconds, how often points should be recorded.
371
+ */
372
+ interval?: number;
373
+ }
358
374
  /**
359
375
  * The editor geometry mode.
360
376
  */
@@ -399,6 +415,93 @@ export interface GetActiveSketchResult {
399
415
  */
400
416
  maps: MapExtension;
401
417
  }
418
+ /**
419
+ * Arguments for the "sketching.set-constraints" command.
420
+ */
421
+ export interface SetConstraintsArgs extends HasMaps {
422
+ /**
423
+ * The constraint for the length of the line between the selected vertex and
424
+ * the new point.
425
+ */
426
+ length?: number;
427
+ /**
428
+ * The constraint for the angle of the line between the selected vertex and
429
+ * the new point, relative to the reference line. Remains unchanged until
430
+ * set to a different value, or cleared.
431
+ */
432
+ angle?: number;
433
+ /**
434
+ * A reference line that the angle will be relative to. Defaults to 'north'.
435
+ * Remains unchanged until set again.
436
+ */
437
+ referenceLine?: ReferenceLine;
438
+ /**
439
+ * Indicates whether constraints will be automatically cleared after a
440
+ * vertex is added or updated. If not set (value is null), then the value
441
+ * will remain unchanged with this operation. If the value has never been
442
+ * set, the default is false. Remains unchanged until set to a different
443
+ * value.
444
+ */
445
+ autoClear?: boolean;
446
+ /**
447
+ * The units to be used for length. If not specified, the units of the map's
448
+ * spatial reference will be used.
449
+ */
450
+ units?: LengthUnitsMobile;
451
+ /**
452
+ * Indicates whether the distance calculations will be geodetic or planar.
453
+ * Default is true.
454
+ */
455
+ geodetic?: boolean;
456
+ /**
457
+ * The geodetic curve type used when calculating the new point. Only applies
458
+ * when geodetic is set to true. Defaults to geodesic.
459
+ * */
460
+ geodeticCurveType?: GeodeticCurveType;
461
+ }
462
+ /**
463
+ * Arguments for the "sketching.clear-constraints" command.
464
+ */
465
+ export interface ClearConstraintsArgs extends HasMaps {
466
+ /**
467
+ * Indicates whether the length constraint should be cleared. Defaults to
468
+ * true if not specified.
469
+ */
470
+ clearLengthConstraint?: boolean;
471
+ /**
472
+ * Indicates whether the angle constraint should be cleared. Defaults to
473
+ * true if not specified.
474
+ */
475
+ clearAngleConstraint?: boolean;
476
+ }
477
+ /**
478
+ * Arguments for the "sketching.add-point" command.
479
+ */
480
+ export interface AddPointArgs extends HasMaps {
481
+ /**
482
+ * The new point to be added.
483
+ */
484
+ newPoint: Point;
485
+ }
486
+ /**
487
+ * Arguments for the "sketching.insert-point" command.
488
+ */
489
+ export interface InsertPointArgs extends HasMaps {
490
+ /**
491
+ * The index of the part to which the point will be added. If null, the last
492
+ * part will be used.
493
+ */
494
+ partIndex?: number;
495
+ /**
496
+ * The index at which the point will be added. If null, the point will be
497
+ * added as the last point.
498
+ */
499
+ pointIndex?: number;
500
+ /**
501
+ * The new point to be added.
502
+ */
503
+ newPoint: Point;
504
+ }
402
505
  export declare class SketchingOperations extends OperationRegistry {
403
506
  /**
404
507
  * Allows the user to create geometry by sketching on a map. Returns the
@@ -472,6 +575,12 @@ export declare class SketchingOperations extends OperationRegistry {
472
575
  * @webOnly
473
576
  */
474
577
  get getActiveNode(): Operation<ItemRef, GetActiveSketchResult>;
578
+ /**
579
+ * Checks whether streaming is active.
580
+ *
581
+ * @mobileOnly
582
+ */
583
+ get isStreaming(): Operation<HasMaps, boolean>;
475
584
  }
476
585
  export declare class SketchingCommands extends CommandRegistry {
477
586
  /**
@@ -506,9 +615,10 @@ export declare class SketchingCommands extends CommandRegistry {
506
615
  */
507
616
  get addPointAtCurrentLocation(): Command<HasMaps>;
508
617
  /**
509
- * Sets a point at the user's current location while editing a geometry. In this context, "set" means
510
- * to either add a point at the current location, or update the currently selected point to be the user's
511
- * current location, depending on what edit mode the user is in.
618
+ * Sets a point at the user's current location while editing a geometry. In
619
+ * this context, "set" means to either add a point at the current location,
620
+ * or update the currently selected point to be the user's current
621
+ * location, depending on what edit mode the user is in.
512
622
  *
513
623
  * @mobileOnly
514
624
  */
@@ -562,4 +672,54 @@ export declare class SketchingCommands extends CommandRegistry {
562
672
  * @webOnly
563
673
  */
564
674
  get disablePrecisionMode(): Command<void>;
675
+ /**
676
+ * Sets constraints on the active sketch.
677
+ *
678
+ * @mobileOnly
679
+ */
680
+ get setConstraints(): Command<SetConstraintsArgs>;
681
+ /**
682
+ * Clears constraints that have been previously set.
683
+ *
684
+ * @mobileOnly
685
+ */
686
+ get clearConstraints(): Command<ClearConstraintsArgs>;
687
+ /**
688
+ * Inserts a point into a polygon or polyline at the specified index. If the
689
+ * partIndex is null, then the last part is used. If the pointIndex is null,
690
+ * then the new point is inserted at the end.
691
+ */
692
+ get insertPoint(): Command<InsertPointArgs>;
693
+ /**
694
+ * Adds a point to polygon or polyline using the selected index as the point
695
+ * to insert after.
696
+ */
697
+ get addPoint(): Command<AddPointArgs>;
698
+ /**
699
+ * Starts streaming: recording your location at regular intervals and
700
+ * adding the collected points to the currently active geometry editor.
701
+ *
702
+ * @mobileOnly
703
+ */
704
+ get startStreaming(): Command<StartStreamingArgs>;
705
+ /**
706
+ * Stops streaming.
707
+ *
708
+ * @mobileOnly
709
+ */
710
+ get stopStreaming(): Command<HasMaps>;
711
+ }
712
+ export declare class SketchingEvents extends EventRegistry {
713
+ /**
714
+ * Raised when streaming has begun.
715
+ *
716
+ * @mobileOnly
717
+ */
718
+ get streamingStarted(): Event<HasMaps>;
719
+ /**
720
+ * Raised when streaming has stopped.
721
+ *
722
+ * @mobileOnly
723
+ */
724
+ get streamingStopped(): Event<HasMaps>;
565
725
  }
@@ -1 +1 @@
1
- import{CommandRegistry}from"../CommandRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";export var SketchTool;!function(e){e.POINT="point",e.MULTIPOINT="multipoint",e.LINE="line",e.POLYLINE="polyline",e.POLYGON="polygon",e.EXTENT="extent",e.SQUARE="square",e.CIRCLE="circle"}(SketchTool||(SketchTool={}));export class SketchingOperations extends OperationRegistry{get captureGeometry(){return this._messages.operation("sketching.capture-geometry")}get editActiveSymbol(){return this._messages.operation("sketching.edit-active-symbol")}get editGeometry(){return this._messages.operation("sketching.edit-geometry")}get moveGeometry(){return this._messages.operation("sketching.move-geometry")}get scaleGeometry(){return this._messages.operation("sketching.scale-geometry")}get rotateGeometry(){return this._messages.operation("sketching.rotate-geometry")}get stop(){return this._messages.operation("sketching.stop")}get addNodeToGeometry(){return this._messages.operation("sketching.add-node-to-geometry")}get getActiveSketch(){return this._messages.operation("sketching.get-active-sketch")}get getActiveNode(){return this._messages.operation("sketching.get-active-node")}}export class SketchingCommands extends CommandRegistry{get cancel(){return this._messages.command("sketching.cancel")}get undo(){return this._messages.command("sketching.undo")}get redo(){return this._messages.command("sketching.redo")}get setGeometryMode(){return this._messages.command("sketching.set-geometry-mode")}get addPointAtCenter(){return this._messages.command("sketching.add-point-at-center")}get addPointAtCurrentLocation(){return this._messages.command("sketching.add-point-at-current-location")}get setPointAtCurrentLocation(){return this._messages.command("sketching.set-point-at-current-location")}get delete(){return this._messages.command("sketching.delete")}get moveNode(){return this._messages.command("sketching.move-node")}get switchActiveNode(){return this._messages.command("sketching.switch-active-node")}get setInteractionMode(){return this._messages.command("sketching.set-interaction-mode")}get enableFreeScaleMode(){return this._messages.command("sketching.enable-free-scale-mode")}get disableFreeScaleMode(){return this._messages.command("sketching.disable-free-scale-mode")}get enablePrecisionMode(){return this._messages.command("sketching.enable-precision-mode")}get disablePrecisionMode(){return this._messages.command("sketching.disable-precision-mode")}}
1
+ import{CommandRegistry}from"../CommandRegistry.js";import{EventRegistry}from"../EventRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";export var SketchTool;!function(e){e.POINT="point",e.MULTIPOINT="multipoint",e.LINE="line",e.POLYLINE="polyline",e.POLYGON="polygon",e.EXTENT="extent",e.SQUARE="square",e.CIRCLE="circle"}(SketchTool||(SketchTool={}));export class SketchingOperations extends OperationRegistry{get captureGeometry(){return this._messages.operation("sketching.capture-geometry")}get editActiveSymbol(){return this._messages.operation("sketching.edit-active-symbol")}get editGeometry(){return this._messages.operation("sketching.edit-geometry")}get moveGeometry(){return this._messages.operation("sketching.move-geometry")}get scaleGeometry(){return this._messages.operation("sketching.scale-geometry")}get rotateGeometry(){return this._messages.operation("sketching.rotate-geometry")}get stop(){return this._messages.operation("sketching.stop")}get addNodeToGeometry(){return this._messages.operation("sketching.add-node-to-geometry")}get getActiveSketch(){return this._messages.operation("sketching.get-active-sketch")}get getActiveNode(){return this._messages.operation("sketching.get-active-node")}get isStreaming(){return this._messages.operation("sketching.is-streaming")}}export class SketchingCommands extends CommandRegistry{get cancel(){return this._messages.command("sketching.cancel")}get undo(){return this._messages.command("sketching.undo")}get redo(){return this._messages.command("sketching.redo")}get setGeometryMode(){return this._messages.command("sketching.set-geometry-mode")}get addPointAtCenter(){return this._messages.command("sketching.add-point-at-center")}get addPointAtCurrentLocation(){return this._messages.command("sketching.add-point-at-current-location")}get setPointAtCurrentLocation(){return this._messages.command("sketching.set-point-at-current-location")}get delete(){return this._messages.command("sketching.delete")}get moveNode(){return this._messages.command("sketching.move-node")}get switchActiveNode(){return this._messages.command("sketching.switch-active-node")}get setInteractionMode(){return this._messages.command("sketching.set-interaction-mode")}get enableFreeScaleMode(){return this._messages.command("sketching.enable-free-scale-mode")}get disableFreeScaleMode(){return this._messages.command("sketching.disable-free-scale-mode")}get enablePrecisionMode(){return this._messages.command("sketching.enable-precision-mode")}get disablePrecisionMode(){return this._messages.command("sketching.disable-precision-mode")}get setConstraints(){return this._messages.command("sketching.set-constraints")}get clearConstraints(){return this._messages.command("sketching.clear-constraints")}get insertPoint(){return this._messages.command("sketching.insert-point")}get addPoint(){return this._messages.command("sketching.add-point")}get startStreaming(){return this._messages.command("sketching.start-streaming")}get stopStreaming(){return this._messages.command("sketching.stop-streaming")}}export class SketchingEvents extends EventRegistry{get streamingStarted(){return this._messages.event("sketching.streaming-started")}get streamingStopped(){return this._messages.event("sketching.streaming-stopped")}}
@@ -493,6 +493,24 @@
493
493
  ],
494
494
  "type": "object"
495
495
  },
496
+ "AddPointArgs": {
497
+ "additionalProperties": false,
498
+ "description": "Arguments for the \"sketching.add-point\" command.",
499
+ "properties": {
500
+ "maps": {
501
+ "$ref": "MapsLike",
502
+ "description": "Map(s) to use for the command/operation."
503
+ },
504
+ "newPoint": {
505
+ "$ref": "#/definitions/esri.Point",
506
+ "description": "The new point to be added."
507
+ }
508
+ },
509
+ "required": [
510
+ "newPoint"
511
+ ],
512
+ "type": "object"
513
+ },
496
514
  "AlertCommandArgs": {
497
515
  "additionalProperties": false,
498
516
  "description": "Arguments for the 'ui.alert' command.",
@@ -555,6 +573,10 @@
555
573
  "$ref": "MapsLike",
556
574
  "description": "The maps to activate drawing on. By default it will be all maps."
557
575
  },
576
+ "maxSegments": {
577
+ "description": "The maximum number of segments permitted for a polyline or polygon sketch. Default is no limit. Mobile only.",
578
+ "type": "number"
579
+ },
558
580
  "symbol": {
559
581
  "anyOf": [
560
582
  {
@@ -1220,6 +1242,32 @@
1220
1242
  ],
1221
1243
  "type": "object"
1222
1244
  },
1245
+ "InsertPointArgs": {
1246
+ "additionalProperties": false,
1247
+ "description": "Arguments for the \"sketching.insert-point\" command.",
1248
+ "properties": {
1249
+ "maps": {
1250
+ "$ref": "MapsLike",
1251
+ "description": "Map(s) to use for the command/operation."
1252
+ },
1253
+ "newPoint": {
1254
+ "$ref": "#/definitions/esri.Point",
1255
+ "description": "The new point to be added."
1256
+ },
1257
+ "partIndex": {
1258
+ "description": "The index of the part to which the point will be added. If null, the last part will be used.",
1259
+ "type": "number"
1260
+ },
1261
+ "pointIndex": {
1262
+ "description": "The index at which the point will be added. If null, the point will be added as the last point.",
1263
+ "type": "number"
1264
+ }
1265
+ },
1266
+ "required": [
1267
+ "newPoint"
1268
+ ],
1269
+ "type": "object"
1270
+ },
1223
1271
  "JobParameters": {
1224
1272
  "additionalProperties": false,
1225
1273
  "description": "A set of parameters used to run a job.",
@@ -11135,6 +11183,15 @@
11135
11183
  "sketching.add-node-to-geometry:output": {
11136
11184
  "$ref": "#/definitions/esri.Geometry"
11137
11185
  },
11186
+ "sketching.add-point": {
11187
+ "description": "Adds a point to polygon or polyline using the selected index as the point to insert after.",
11188
+ "enum": [
11189
+ "sketching.add-point"
11190
+ ]
11191
+ },
11192
+ "sketching.add-point:input": {
11193
+ "$ref": "#/definitions/AddPointArgs"
11194
+ },
11138
11195
  "sketching.capture-geometry": {
11139
11196
  "description": "Allows the user to create geometry by sketching on a map. Returns the geometry that was drawn, along with the map that it was drawn on.",
11140
11197
  "enum": [
@@ -11168,6 +11225,15 @@
11168
11225
  "sketching.edit-geometry:output": {
11169
11226
  "$ref": "#/definitions/EditGeometryResult"
11170
11227
  },
11228
+ "sketching.insert-point": {
11229
+ "description": "Inserts a point into a polygon or polyline at the specified index. If the partIndex is null, then the last part is used. If the pointIndex is null, then the new point is inserted at the end.",
11230
+ "enum": [
11231
+ "sketching.insert-point"
11232
+ ]
11233
+ },
11234
+ "sketching.insert-point:input": {
11235
+ "$ref": "#/definitions/InsertPointArgs"
11236
+ },
11171
11237
  "sketching.redo": {
11172
11238
  "description": "Redoes the last undone edit while editing a geometry.",
11173
11239
  "enum": [
@@ -11830,6 +11896,22 @@
11830
11896
  ],
11831
11897
  "type": "object"
11832
11898
  },
11899
+ {
11900
+ "additionalProperties": false,
11901
+ "properties": {
11902
+ "arguments": {
11903
+ "$ref": "#/definitions/sketching.add-point:input"
11904
+ },
11905
+ "name": {
11906
+ "$ref": "#/definitions/sketching.add-point"
11907
+ }
11908
+ },
11909
+ "required": [
11910
+ "name",
11911
+ "arguments"
11912
+ ],
11913
+ "type": "object"
11914
+ },
11833
11915
  {
11834
11916
  "additionalProperties": false,
11835
11917
  "properties": {
@@ -11846,6 +11928,22 @@
11846
11928
  ],
11847
11929
  "type": "object"
11848
11930
  },
11931
+ {
11932
+ "additionalProperties": false,
11933
+ "properties": {
11934
+ "arguments": {
11935
+ "$ref": "#/definitions/sketching.insert-point:input"
11936
+ },
11937
+ "name": {
11938
+ "$ref": "#/definitions/sketching.insert-point"
11939
+ }
11940
+ },
11941
+ "required": [
11942
+ "name",
11943
+ "arguments"
11944
+ ],
11945
+ "type": "object"
11946
+ },
11849
11947
  {
11850
11948
  "additionalProperties": false,
11851
11949
  "properties": {
@@ -12092,9 +12190,15 @@
12092
12190
  {
12093
12191
  "$ref": "#/definitions/search.clear"
12094
12192
  },
12193
+ {
12194
+ "$ref": "#/definitions/sketching.add-point"
12195
+ },
12095
12196
  {
12096
12197
  "$ref": "#/definitions/sketching.delete"
12097
12198
  },
12199
+ {
12200
+ "$ref": "#/definitions/sketching.insert-point"
12201
+ },
12098
12202
  {
12099
12203
  "$ref": "#/definitions/sketching.redo"
12100
12204
  },