@vertigis/viewer-spec 43.4.1 → 45.0.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.
- package/layout/schema/layout-web.xsd +43 -0
- package/messaging/Operation.d.ts +22 -0
- package/messaging/registry/Operations.d.ts +2 -0
- package/messaging/registry/Operations.js +1 -1
- package/messaging/registry/arcade.d.ts +100 -0
- package/messaging/registry/arcade.js +1 -0
- package/messaging/registry/geometry.d.ts +174 -7
- package/messaging/registry/geometry.js +1 -1
- package/messaging/registry/measurement.d.ts +7 -7
- package/messaging/registry/measurement.js +1 -1
- package/messaging/registry/sketching.d.ts +48 -4
- package/messaging/registry/sketching.js +1 -1
- package/messaging/schema/common-action.schema.json +10 -3
- package/messaging/schema/mobile-action.schema.json +336 -3
- package/messaging/schema/web-action.schema.json +211 -23
- package/package.json +3 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -47,6 +47,49 @@
|
|
|
47
47
|
</complexType>
|
|
48
48
|
</element>
|
|
49
49
|
|
|
50
|
+
<element name="geometry-toolbar" substitutionGroup="base:component">
|
|
51
|
+
<annotation>
|
|
52
|
+
<documentation xml:lang="en">
|
|
53
|
+
A geometry toolbar consisting of a collection of widgets and a
|
|
54
|
+
configurable toolbar that is displayed while geometry edits are being
|
|
55
|
+
performed.
|
|
56
|
+
</documentation>
|
|
57
|
+
</annotation>
|
|
58
|
+
<complexType>
|
|
59
|
+
<complexContent>
|
|
60
|
+
<extension base="base:Component">
|
|
61
|
+
<attribute name="orientation">
|
|
62
|
+
<annotation>
|
|
63
|
+
<documentation xml:lang="en">
|
|
64
|
+
Determines the orientation of the widgets and toolbar menu items.
|
|
65
|
+
</documentation>
|
|
66
|
+
</annotation>
|
|
67
|
+
<simpleType>
|
|
68
|
+
<restriction base="string">
|
|
69
|
+
<enumeration value="vertical"/>
|
|
70
|
+
<enumeration value="horizontal"/>
|
|
71
|
+
</restriction>
|
|
72
|
+
</simpleType>
|
|
73
|
+
</attribute>
|
|
74
|
+
<attribute name="size">
|
|
75
|
+
<annotation>
|
|
76
|
+
<documentation xml:lang="en">
|
|
77
|
+
The size of the geometry toolbar.
|
|
78
|
+
</documentation>
|
|
79
|
+
</annotation>
|
|
80
|
+
<simpleType>
|
|
81
|
+
<restriction base="string">
|
|
82
|
+
<enumeration value="small"/>
|
|
83
|
+
<enumeration value="medium"/>
|
|
84
|
+
<enumeration value="large"/>
|
|
85
|
+
</restriction>
|
|
86
|
+
</simpleType>
|
|
87
|
+
</attribute>
|
|
88
|
+
</extension>
|
|
89
|
+
</complexContent>
|
|
90
|
+
</complexType>
|
|
91
|
+
</element>
|
|
92
|
+
|
|
50
93
|
<element name="inline" substitutionGroup="base:component">
|
|
51
94
|
<annotation>
|
|
52
95
|
<documentation xml:lang="en">
|
package/messaging/Operation.d.ts
CHANGED
|
@@ -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")}}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type Geometry from "@arcgis/core/geometry/Geometry";
|
|
2
|
+
import type Point from "@arcgis/core/geometry/Point";
|
|
3
|
+
import type Polygon from "@arcgis/core/geometry/Polygon";
|
|
4
|
+
import type Polyline from "@arcgis/core/geometry/Polyline";
|
|
2
5
|
import type SpatialReference from "@arcgis/core/geometry/SpatialReference";
|
|
3
6
|
import type GeographicTransformation from "@arcgis/core/geometry/support/GeographicTransformation";
|
|
4
7
|
import type { Command } from "../Command.js";
|
|
@@ -29,6 +32,10 @@ export interface ProjectArgs {
|
|
|
29
32
|
* The units for distance buffers supported by ArcGIS.
|
|
30
33
|
*/
|
|
31
34
|
export declare type LengthUnits = "meters" | "feet" | "kilometers" | "miles" | "nautical-miles" | "yards";
|
|
35
|
+
/**
|
|
36
|
+
* The units for distance supported by Mobile.
|
|
37
|
+
*/
|
|
38
|
+
export declare type LengthUnitsMobile = LengthUnits | "millimeters" | "centimeters" | "inches" | "mm" | "cm" | "m" | "km" | "in" | "ft" | "yd" | "mi" | "nm";
|
|
32
39
|
/**
|
|
33
40
|
* The result of a geometry.buffer operation.
|
|
34
41
|
*/
|
|
@@ -42,6 +49,142 @@ export interface BufferResult {
|
|
|
42
49
|
*/
|
|
43
50
|
maps?: MapsLike;
|
|
44
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Arguments for the geometry.add-point operation.
|
|
54
|
+
*/
|
|
55
|
+
export interface AddPointArgs {
|
|
56
|
+
/**
|
|
57
|
+
* The starting geometry.
|
|
58
|
+
*/
|
|
59
|
+
geometry: Polyline | Polygon;
|
|
60
|
+
/**
|
|
61
|
+
* The index of the part to which the point will be added.
|
|
62
|
+
* If null, the last part will be used.
|
|
63
|
+
*/
|
|
64
|
+
partIndex?: number;
|
|
65
|
+
/**
|
|
66
|
+
* The index at which the point will be added.
|
|
67
|
+
* If null, the point will be added as the last point.
|
|
68
|
+
*/
|
|
69
|
+
pointIndex?: number;
|
|
70
|
+
/**
|
|
71
|
+
* The new point to be added to 'geometry'. The spatial reference must
|
|
72
|
+
* match 'geometry' or an error will be thrown.
|
|
73
|
+
*/
|
|
74
|
+
newPoint: Point;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Arguments for the geometry.add-part operation.
|
|
78
|
+
*/
|
|
79
|
+
export interface AddPartArgs {
|
|
80
|
+
/**
|
|
81
|
+
* The starting geometry.
|
|
82
|
+
*/
|
|
83
|
+
geometry: Polyline | Polygon;
|
|
84
|
+
/**
|
|
85
|
+
* The new part to be added to 'geometry'.
|
|
86
|
+
*/
|
|
87
|
+
part: Point[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A reference line used by the geometry.get-point operation.
|
|
91
|
+
*/
|
|
92
|
+
export interface ReferenceLine {
|
|
93
|
+
/**
|
|
94
|
+
* The geometry that contains the reference line.
|
|
95
|
+
*/
|
|
96
|
+
geometry: Polyline | Polygon;
|
|
97
|
+
/**
|
|
98
|
+
* The index of the part in 'geometry' that contains the reference line.
|
|
99
|
+
* If null, the last part will be used.
|
|
100
|
+
*/
|
|
101
|
+
partIndex?: number;
|
|
102
|
+
/**
|
|
103
|
+
* The index of the segment that will be used as the reference line.
|
|
104
|
+
* If null, the last segment will be used.
|
|
105
|
+
*/
|
|
106
|
+
segmentIndex?: number;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* The different types of curves that can be used for geodetic distance
|
|
110
|
+
* calculations.
|
|
111
|
+
*/
|
|
112
|
+
export declare type GeodeticCurveType = "geodesic" | "loxodrome" | "normal-section" | "great-elliptic";
|
|
113
|
+
/**
|
|
114
|
+
* Arguments for the geometry.calculate-point operation.
|
|
115
|
+
*/
|
|
116
|
+
export interface CalculatePointArgs {
|
|
117
|
+
/**
|
|
118
|
+
* The units to be used for 'distance' and 'offset'.
|
|
119
|
+
* Defaults to the default units of the map.
|
|
120
|
+
*/
|
|
121
|
+
units: LengthUnitsMobile;
|
|
122
|
+
/**
|
|
123
|
+
* The reference line that will be used to calculate the new point.
|
|
124
|
+
*/
|
|
125
|
+
referenceLine: ReferenceLine;
|
|
126
|
+
/**
|
|
127
|
+
* The distance that will be used to calculate the new point.
|
|
128
|
+
*
|
|
129
|
+
* If using 'offset', this indicates the distance along
|
|
130
|
+
* the reference line.
|
|
131
|
+
*
|
|
132
|
+
* If using 'angle', this indicates the distance directly
|
|
133
|
+
* from the new point to the start point of the reference line.
|
|
134
|
+
*
|
|
135
|
+
* Cannot be negative.
|
|
136
|
+
*/
|
|
137
|
+
distance: number;
|
|
138
|
+
/**
|
|
139
|
+
* The offset that will be used to calculate the new point.
|
|
140
|
+
* The 'offset' corresponds to the distance perpendicularly away from the
|
|
141
|
+
* reference line.
|
|
142
|
+
*
|
|
143
|
+
* Positive values will result in a point to the right of the reference
|
|
144
|
+
* line, negative values will be to the left.
|
|
145
|
+
*
|
|
146
|
+
* Exactly one of 'offset' and 'angle' must be set.
|
|
147
|
+
*/
|
|
148
|
+
offset?: number;
|
|
149
|
+
/**
|
|
150
|
+
* The angle, relative to the angle of the reference line, that
|
|
151
|
+
* will be used to calculate the new point. Positive angles are
|
|
152
|
+
* calculated clockwise from the angle of the reference line,
|
|
153
|
+
* negative angles are calculated counter-clockwise.
|
|
154
|
+
*
|
|
155
|
+
* Exactly one of 'offset' and 'angle' must be set.
|
|
156
|
+
*/
|
|
157
|
+
angle?: number;
|
|
158
|
+
/**
|
|
159
|
+
* Gets or sets a value indicating whether the distance calculations will
|
|
160
|
+
* be geodetic or planar. Defaults to true.
|
|
161
|
+
*/
|
|
162
|
+
geodetic?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Gets or sets the geodetic curve type used when calculating the new point.
|
|
165
|
+
* Only applies when 'geodetic' is true. Defaults to 'geodesic'.
|
|
166
|
+
*/
|
|
167
|
+
geodeticCurveType: GeodeticCurveType;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Arguments for the geometry.remove-point operation.
|
|
171
|
+
*/
|
|
172
|
+
export interface RemovePointArgs {
|
|
173
|
+
/**
|
|
174
|
+
* The starting geometry.
|
|
175
|
+
*/
|
|
176
|
+
geometry: Polyline | Polygon;
|
|
177
|
+
/**
|
|
178
|
+
* The index of the part from which the point will be removed.
|
|
179
|
+
* If null, the last part will be used.
|
|
180
|
+
*/
|
|
181
|
+
partIndex?: number;
|
|
182
|
+
/**
|
|
183
|
+
* The index of the point to be removed.
|
|
184
|
+
* If null, the last point wil be removed.
|
|
185
|
+
*/
|
|
186
|
+
pointIndex?: number;
|
|
187
|
+
}
|
|
45
188
|
export declare class GeometryOperations extends OperationRegistry {
|
|
46
189
|
/**
|
|
47
190
|
* Projects a set of geometries to a new spatial reference.
|
|
@@ -76,8 +219,39 @@ export declare class GeometryOperations extends OperationRegistry {
|
|
|
76
219
|
* @webOnly
|
|
77
220
|
*/
|
|
78
221
|
get getBufferUnits(): Operation<void, LengthUnits>;
|
|
222
|
+
/**
|
|
223
|
+
* Adds a point to a given geometry.
|
|
224
|
+
*
|
|
225
|
+
* @mobileOnly
|
|
226
|
+
*/
|
|
227
|
+
get addPoint(): Operation<AddPointArgs, Geometry>;
|
|
228
|
+
/**
|
|
229
|
+
* Adds a part to a given geometry.
|
|
230
|
+
*
|
|
231
|
+
* @mobileOnly
|
|
232
|
+
*/
|
|
233
|
+
get addPart(): Operation<AddPartArgs, Geometry>;
|
|
234
|
+
/**
|
|
235
|
+
* Calculates a point relative to a given reference line.
|
|
236
|
+
*
|
|
237
|
+
* @mobileOnly
|
|
238
|
+
*/
|
|
239
|
+
get calculatePoint(): Operation<CalculatePointArgs, Point>;
|
|
240
|
+
/**
|
|
241
|
+
* Removes a point from a given geometry.
|
|
242
|
+
*
|
|
243
|
+
* @mobileOnly
|
|
244
|
+
*/
|
|
245
|
+
get removePoint(): Operation<RemovePointArgs, Geometry>;
|
|
79
246
|
}
|
|
80
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>;
|
|
81
255
|
/**
|
|
82
256
|
* Sets the default buffer distance for the viewer session. The buffer
|
|
83
257
|
* distance must be a number > 0.
|
|
@@ -91,11 +265,4 @@ export declare class GeometryCommands extends CommandRegistry {
|
|
|
91
265
|
* @webOnly
|
|
92
266
|
*/
|
|
93
267
|
get setBufferUnits(): Command<LengthUnits>;
|
|
94
|
-
/**
|
|
95
|
-
* Show the geometry settings dialog. This allows you to configure buffer
|
|
96
|
-
* distance and buffer units.
|
|
97
|
-
*
|
|
98
|
-
* @webOnly
|
|
99
|
-
*/
|
|
100
|
-
get showSettings(): Command<HasUITarget>;
|
|
101
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")}}export class GeometryCommands extends CommandRegistry{get
|
|
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")}}
|
|
@@ -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
|
|
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")}}
|
|
@@ -27,6 +27,7 @@ import { CommandRegistry } from "../CommandRegistry.js";
|
|
|
27
27
|
import type { Operation } from "../Operation.js";
|
|
28
28
|
import { OperationRegistry } from "../OperationRegistry.js";
|
|
29
29
|
import type { FeaturesLike, GeometryLike, GraphicsLike, HasMaps, MapsLike } from "../common.js";
|
|
30
|
+
import type { EditSymbolResult } from "./drawing.js";
|
|
30
31
|
import type { LengthUnits } from "./geometry.js";
|
|
31
32
|
/**
|
|
32
33
|
* A representation of a 2D vector or point.
|
|
@@ -201,11 +202,15 @@ export interface GeometryOperationBase {
|
|
|
201
202
|
export interface EditGeometryArgs extends GeometryOperationBase {
|
|
202
203
|
/**
|
|
203
204
|
* The options for this edit operation. Not supported in Mobile.
|
|
205
|
+
*
|
|
206
|
+
* @webOnly
|
|
204
207
|
*/
|
|
205
208
|
options?: EditGeometryOptions;
|
|
206
209
|
}
|
|
207
210
|
/**
|
|
208
211
|
* Options for the "sketching.edit-geometry operation.
|
|
212
|
+
*
|
|
213
|
+
* @webOnly
|
|
209
214
|
*/
|
|
210
215
|
export interface EditGeometryOptions {
|
|
211
216
|
/**
|
|
@@ -400,6 +405,12 @@ export declare class SketchingOperations extends OperationRegistry {
|
|
|
400
405
|
* geometry that was drawn, along with the map that it was drawn on.
|
|
401
406
|
*/
|
|
402
407
|
get captureGeometry(): Operation<CaptureGeometryArgs, CaptureGeometryResult>;
|
|
408
|
+
/**
|
|
409
|
+
* Allows the user to edit the symbology used by the graphics actively being edited.
|
|
410
|
+
*
|
|
411
|
+
* @webOnly
|
|
412
|
+
*/
|
|
413
|
+
get editActiveSymbol(): Operation<void, EditSymbolResult | undefined>;
|
|
403
414
|
/**
|
|
404
415
|
* Allows the user to edit an existing geometry by drawing on a map. Returns
|
|
405
416
|
* the geometry that was edited, or the supplied feature with the altered
|
|
@@ -441,10 +452,12 @@ export declare class SketchingOperations extends OperationRegistry {
|
|
|
441
452
|
* geometry. If validateGeometry parameter is true and geometry is invalid,
|
|
442
453
|
* returns null.
|
|
443
454
|
*/
|
|
444
|
-
get stop(): Operation<StopGeometryEditArgs, CaptureGeometryResult>;
|
|
455
|
+
get stop(): Operation<StopGeometryEditArgs | void, CaptureGeometryResult>;
|
|
445
456
|
/**
|
|
446
457
|
* Adds a point to a given polyline or polygon geometry. Returns the
|
|
447
458
|
* resulting geometry.
|
|
459
|
+
*
|
|
460
|
+
* Deprecated in Mobile, use geometry.add-point instead.
|
|
448
461
|
*/
|
|
449
462
|
get addNodeToGeometry(): Operation<AddNodeToGeometryArgs, Geometry>;
|
|
450
463
|
/**
|
|
@@ -461,6 +474,12 @@ export declare class SketchingOperations extends OperationRegistry {
|
|
|
461
474
|
get getActiveNode(): Operation<ItemRef, GetActiveSketchResult>;
|
|
462
475
|
}
|
|
463
476
|
export declare class SketchingCommands extends CommandRegistry {
|
|
477
|
+
/**
|
|
478
|
+
* Cancels the current geometry edit or capture operation.
|
|
479
|
+
*
|
|
480
|
+
* @webOnly
|
|
481
|
+
*/
|
|
482
|
+
get cancel(): Command<void>;
|
|
464
483
|
/**
|
|
465
484
|
* Undoes the last edit while editing a geometry.
|
|
466
485
|
*/
|
|
@@ -495,9 +514,10 @@ export declare class SketchingCommands extends CommandRegistry {
|
|
|
495
514
|
*/
|
|
496
515
|
get setPointAtCurrentLocation(): Command<HasMaps>;
|
|
497
516
|
/**
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
*
|
|
517
|
+
* If a point is supplied while a sketching or editing operation is active,
|
|
518
|
+
* the vertex at that point will be deleted from the current geometry. If no
|
|
519
|
+
* point is supplied and a geometry editing session is active, the entire
|
|
520
|
+
* geometry will be deleted.
|
|
501
521
|
*/
|
|
502
522
|
get delete(): Command<DeleteGeometryArgs>;
|
|
503
523
|
/**
|
|
@@ -518,4 +538,28 @@ export declare class SketchingCommands extends CommandRegistry {
|
|
|
518
538
|
* @mobileOnly
|
|
519
539
|
*/
|
|
520
540
|
get setInteractionMode(): Command<SetInteractionModeArgs>;
|
|
541
|
+
/**
|
|
542
|
+
* Enables free scaling while editing geometries.
|
|
543
|
+
*
|
|
544
|
+
* @webOnly
|
|
545
|
+
*/
|
|
546
|
+
get enableFreeScaleMode(): Command<void>;
|
|
547
|
+
/**
|
|
548
|
+
* Disables free scaling while editing geometries.
|
|
549
|
+
*
|
|
550
|
+
* @webOnly
|
|
551
|
+
*/
|
|
552
|
+
get disableFreeScaleMode(): Command<void>;
|
|
553
|
+
/**
|
|
554
|
+
* Enables more precise inputs while editing geometries.
|
|
555
|
+
*
|
|
556
|
+
* @webOnly
|
|
557
|
+
*/
|
|
558
|
+
get enablePrecisionMode(): Command<void>;
|
|
559
|
+
/**
|
|
560
|
+
* Disables more precise inputs while editing geometries.
|
|
561
|
+
*
|
|
562
|
+
* @webOnly
|
|
563
|
+
*/
|
|
564
|
+
get disablePrecisionMode(): Command<void>;
|
|
521
565
|
}
|
|
@@ -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 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 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")}}
|
|
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")}}
|
|
@@ -11124,7 +11124,7 @@
|
|
|
11124
11124
|
]
|
|
11125
11125
|
},
|
|
11126
11126
|
"sketching.add-node-to-geometry": {
|
|
11127
|
-
"description": "Adds a point to a given polyline or polygon geometry. Returns the resulting geometry.",
|
|
11127
|
+
"description": "Adds a point to a given polyline or polygon geometry. Returns the resulting geometry. Deprecated in Mobile, use geometry.add-point instead.",
|
|
11128
11128
|
"enum": [
|
|
11129
11129
|
"sketching.add-node-to-geometry"
|
|
11130
11130
|
]
|
|
@@ -11148,7 +11148,7 @@
|
|
|
11148
11148
|
"$ref": "#/definitions/CaptureGeometryResult"
|
|
11149
11149
|
},
|
|
11150
11150
|
"sketching.delete": {
|
|
11151
|
-
"description": "
|
|
11151
|
+
"description": "If a point is supplied while a sketching or editing operation is active, the vertex at that point will be deleted from the current geometry. If no point is supplied and a geometry editing session is active, the entire geometry will be deleted.",
|
|
11152
11152
|
"enum": [
|
|
11153
11153
|
"sketching.delete"
|
|
11154
11154
|
]
|
|
@@ -11193,7 +11193,14 @@
|
|
|
11193
11193
|
]
|
|
11194
11194
|
},
|
|
11195
11195
|
"sketching.stop:input": {
|
|
11196
|
-
"
|
|
11196
|
+
"anyOf": [
|
|
11197
|
+
{
|
|
11198
|
+
"$ref": "#/definitions/StopGeometryEditArgs"
|
|
11199
|
+
},
|
|
11200
|
+
{
|
|
11201
|
+
"type": "null"
|
|
11202
|
+
}
|
|
11203
|
+
]
|
|
11197
11204
|
},
|
|
11198
11205
|
"sketching.stop:output": {
|
|
11199
11206
|
"$ref": "#/definitions/CaptureGeometryResult"
|