@vertigis/viewer-spec 45.2.0 → 46.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.
- package/app-config/schema/common-app-config.schema.json +1 -1
- package/app-config/schema/mobile-app-config.schema.json +1 -1
- package/app-config/schema/web-app-config.schema.json +1 -1
- package/messaging/registry/Operations.d.ts +2 -0
- package/messaging/registry/Operations.js +1 -1
- package/messaging/registry/edit.d.ts +104 -25
- package/messaging/registry/edit.js +1 -1
- package/messaging/registry/sketching.d.ts +227 -55
- package/messaging/registry/sketching.js +1 -1
- package/messaging/registry/system.d.ts +30 -9
- package/messaging/registry/ui.d.ts +5 -4
- package/messaging/schema/common-action.schema.json +584 -11
- package/messaging/schema/common-event.schema.json +36 -0
- package/messaging/schema/mobile-action.schema.json +385 -22
- package/messaging/schema/web-action.schema.json +881 -43
- package/messaging/schema/web-event.schema.json +36 -0
- package/package.json +3 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -6,6 +6,7 @@ import { BasemapOperations } from "./basemap.js";
|
|
|
6
6
|
import { ChartOperations } from "./charts.js";
|
|
7
7
|
import { DebugConsoleOperations } from "./debugConsole.js";
|
|
8
8
|
import { DrawingOperations } from "./drawing.js";
|
|
9
|
+
import { EditOperations } from "./edit.js";
|
|
9
10
|
import { FileOperations } from "./file.js";
|
|
10
11
|
import { GeocodeOperations } from "./geocode.js";
|
|
11
12
|
import { GeolocationOperations } from "./geolocation.js";
|
|
@@ -30,6 +31,7 @@ export declare class Operations extends OperationRegistry {
|
|
|
30
31
|
readonly app: AppOperations;
|
|
31
32
|
readonly basemap: BasemapOperations;
|
|
32
33
|
readonly charts: ChartOperations;
|
|
34
|
+
readonly edit: EditOperations;
|
|
33
35
|
readonly drawing: DrawingOperations;
|
|
34
36
|
readonly file: FileOperations;
|
|
35
37
|
readonly geocode: GeocodeOperations;
|
|
@@ -1 +1 @@
|
|
|
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)}}
|
|
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{EditOperations}from"./edit.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.edit=new EditOperations(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)}}
|
|
@@ -5,7 +5,10 @@ import type { Command } from "../Command.js";
|
|
|
5
5
|
import { CommandRegistry } from "../CommandRegistry.js";
|
|
6
6
|
import type { Event } from "../Event.js";
|
|
7
7
|
import { EventRegistry } from "../EventRegistry.js";
|
|
8
|
-
import type {
|
|
8
|
+
import type { Operation } from "../Operation.js";
|
|
9
|
+
import { OperationRegistry } from "../OperationRegistry.js";
|
|
10
|
+
import type { HasFeatures, HasGeometry, HasLayers, HasMaps, HasUITarget, MapsLike } from "../common.js";
|
|
11
|
+
import type { EditGeometryOptions } from "./sketching.js";
|
|
9
12
|
/**
|
|
10
13
|
* Arguments for the "edit.add-attachment" command.
|
|
11
14
|
*/
|
|
@@ -44,6 +47,85 @@ export interface AttachmentEventArgs {
|
|
|
44
47
|
*/
|
|
45
48
|
attachment: Attachment;
|
|
46
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Options for editing operations that display a UI.
|
|
52
|
+
*/
|
|
53
|
+
export interface EditUIOptions {
|
|
54
|
+
/**
|
|
55
|
+
* Whether to show UI notifications.
|
|
56
|
+
*/
|
|
57
|
+
showNotifications?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* The orientation of the template picker.
|
|
60
|
+
*/
|
|
61
|
+
orientation?: "horizontal" | "vertical";
|
|
62
|
+
/**
|
|
63
|
+
* Whether to show titles on the template picker.
|
|
64
|
+
*/
|
|
65
|
+
showTitles?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A collection of options common to interactive feature editing sessions. Web
|
|
69
|
+
* only.
|
|
70
|
+
*/
|
|
71
|
+
export interface EditOptions {
|
|
72
|
+
/**
|
|
73
|
+
* Whether to allow editing of feature geometry.
|
|
74
|
+
*/
|
|
75
|
+
editGeometry?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether to allow editing of feature attributes.
|
|
78
|
+
*/
|
|
79
|
+
editAttributes?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Whether to allow editing of feature attachments.
|
|
82
|
+
*/
|
|
83
|
+
editAttachments?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Options for the geometry editing session.
|
|
86
|
+
*/
|
|
87
|
+
editGeometryOptions?: EditGeometryOptions;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Arguments for the "edit.create-feature" operation. Also may be supplied to
|
|
91
|
+
* augment an interactive editing session. A valid feature layer is required.
|
|
92
|
+
* The geometry is required for non-tabular features. Web only.
|
|
93
|
+
*/
|
|
94
|
+
export interface CreateFeatureArgs extends HasGeometry, HasLayers, HasMaps, EditUIOptions {
|
|
95
|
+
/**
|
|
96
|
+
* A collection of attributes to apply to the new feature.
|
|
97
|
+
*/
|
|
98
|
+
featureAttributes?: Record<string, unknown>;
|
|
99
|
+
/**
|
|
100
|
+
* The template to use as a starting point for this feature. Requires a
|
|
101
|
+
* layer. The default or first template will be used if not set.
|
|
102
|
+
*/
|
|
103
|
+
templateName?: string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Arguments for the "edit.display-add-features" command. Web only.
|
|
107
|
+
*/
|
|
108
|
+
export interface DisplayAddFeatureArgs extends CreateFeatureArgs, HasMaps, HasUITarget, EditOptions, EditUIOptions {
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Arguments for the "edit.display-update-features" operation. Web only.
|
|
112
|
+
*/
|
|
113
|
+
export interface DisplayUpdateFeatureArgs extends EditCommandArgs, HasGeometry, HasMaps, EditOptions {
|
|
114
|
+
/**
|
|
115
|
+
* A collection of attributes to automatically apply to the updated feature.
|
|
116
|
+
*/
|
|
117
|
+
featureAttributes?: Record<string, unknown>;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Arguments for the "edit.add-features", "edit.update-features" and
|
|
121
|
+
* "edit.delete-features" commands. Web only.
|
|
122
|
+
*/
|
|
123
|
+
export interface EditCommandArgs extends HasFeatures {
|
|
124
|
+
/**
|
|
125
|
+
* Whether to show UI notifications.
|
|
126
|
+
*/
|
|
127
|
+
showNotifications?: boolean;
|
|
128
|
+
}
|
|
47
129
|
export declare class EditCommands extends CommandRegistry {
|
|
48
130
|
/**
|
|
49
131
|
* Create and add an attachment to a provided feature, using the given
|
|
@@ -53,35 +135,38 @@ export declare class EditCommands extends CommandRegistry {
|
|
|
53
135
|
*/
|
|
54
136
|
get addAttachment(): Command<AddAttachmentArgs>;
|
|
55
137
|
/**
|
|
56
|
-
* Adds a feature to a particular layer.
|
|
57
|
-
*
|
|
58
|
-
* @mobileOnly
|
|
138
|
+
* Adds a feature to a particular layer. `Feature[]` and
|
|
139
|
+
* `EditCommandArgs` are not supported on Mobile.
|
|
59
140
|
*/
|
|
60
|
-
get addFeature(): Command<Feature>;
|
|
141
|
+
get addFeature(): Command<Feature | Feature[] | EditCommandArgs>;
|
|
61
142
|
/**
|
|
62
143
|
* Deletes the given feature or features from their feature sources.
|
|
63
|
-
*
|
|
64
|
-
* @mobileOnly
|
|
144
|
+
* `EditCommandArgs` is not supported on Mobile.
|
|
65
145
|
*/
|
|
66
|
-
get deleteFeatures(): Command<Feature | Feature[]>;
|
|
146
|
+
get deleteFeatures(): Command<Feature | Feature[] | EditCommandArgs>;
|
|
67
147
|
/**
|
|
68
|
-
* Display a form for adding a feature.
|
|
69
|
-
*
|
|
70
|
-
* @mobileOnly
|
|
148
|
+
* Display a form for adding a feature. `DisplayAddFeatureArgs` is not
|
|
149
|
+
* supported on Mobile.
|
|
71
150
|
*/
|
|
72
|
-
get displayAddFeature(): Command<FeatureSource>;
|
|
151
|
+
get displayAddFeature(): Command<FeatureSource | DisplayAddFeatureArgs>;
|
|
73
152
|
/**
|
|
74
|
-
* Display a form for updating a feature.
|
|
75
|
-
*
|
|
76
|
-
* @mobileOnly
|
|
153
|
+
* Display a form for updating a feature. `DisplayUpdateFeatureArgs` is not
|
|
154
|
+
* supported on Mobile.
|
|
77
155
|
*/
|
|
78
|
-
get displayUpdateFeature(): Command<Feature>;
|
|
156
|
+
get displayUpdateFeature(): Command<Feature | DisplayUpdateFeatureArgs>;
|
|
157
|
+
/**
|
|
158
|
+
* Updates a feature. `Feature[]` and `EditCommandArgs` are not
|
|
159
|
+
* supported on Mobile.
|
|
160
|
+
*/
|
|
161
|
+
get updateFeature(): Command<Feature | Feature[] | EditCommandArgs>;
|
|
162
|
+
}
|
|
163
|
+
export declare class EditOperations extends OperationRegistry {
|
|
79
164
|
/**
|
|
80
|
-
*
|
|
165
|
+
* Creates a new `Feature` for the supplied layer from the supplied data.
|
|
81
166
|
*
|
|
82
|
-
* @
|
|
167
|
+
* @webOnly
|
|
83
168
|
*/
|
|
84
|
-
get
|
|
169
|
+
get createFeature(): Operation<CreateFeatureArgs, HasFeatures>;
|
|
85
170
|
}
|
|
86
171
|
export declare class EditEvents extends EventRegistry {
|
|
87
172
|
/**
|
|
@@ -104,20 +189,14 @@ export declare class EditEvents extends EventRegistry {
|
|
|
104
189
|
get attachmentDeleted(): Event<AttachmentEventArgs>;
|
|
105
190
|
/**
|
|
106
191
|
* Raised when a feature is added.
|
|
107
|
-
*
|
|
108
|
-
* @mobileOnly
|
|
109
192
|
*/
|
|
110
193
|
get featureAdded(): Event<Feature>;
|
|
111
194
|
/**
|
|
112
195
|
* Raised when a feature is deleted.
|
|
113
|
-
*
|
|
114
|
-
* @mobileOnly
|
|
115
196
|
*/
|
|
116
197
|
get featureDeleted(): Event<Feature>;
|
|
117
198
|
/**
|
|
118
199
|
* Raised when a feature is updated.
|
|
119
|
-
*
|
|
120
|
-
* @mobileOnly
|
|
121
200
|
*/
|
|
122
201
|
get featureUpdated(): Event<Feature>;
|
|
123
202
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CommandRegistry}from"../CommandRegistry.js";import{EventRegistry}from"../EventRegistry.js";export class EditCommands extends CommandRegistry{get addAttachment(){return this._messages.command("edit.add-attachment")}get addFeature(){return this._messages.command("edit.add-feature")}get deleteFeatures(){return this._messages.command("edit.delete-features")}get displayAddFeature(){return this._messages.command("edit.display-add-feature")}get displayUpdateFeature(){return this._messages.command("edit.display-update-feature")}get updateFeature(){return this._messages.command("edit.update-feature")}}export class EditEvents extends EventRegistry{get attachmentAdded(){return this._messages.event("edit.attachment-added")}get attachmentUpdated(){return this._messages.event("edit.attachment-updated")}get attachmentDeleted(){return this._messages.event("edit.attachment-deleted")}get featureAdded(){return this._messages.event("edit.feature-added")}get featureDeleted(){return this._messages.event("edit.feature-deleted")}get featureUpdated(){return this._messages.event("edit.feature-updated")}}
|
|
1
|
+
import{CommandRegistry}from"../CommandRegistry.js";import{EventRegistry}from"../EventRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";export class EditCommands extends CommandRegistry{get addAttachment(){return this._messages.command("edit.add-attachment")}get addFeature(){return this._messages.command("edit.add-feature")}get deleteFeatures(){return this._messages.command("edit.delete-features")}get displayAddFeature(){return this._messages.command("edit.display-add-feature")}get displayUpdateFeature(){return this._messages.command("edit.display-update-feature")}get updateFeature(){return this._messages.command("edit.update-feature")}}export class EditOperations extends OperationRegistry{get createFeature(){return this._messages.operation("edit.create-feature")}}export class EditEvents extends EventRegistry{get attachmentAdded(){return this._messages.event("edit.attachment-added")}get attachmentUpdated(){return this._messages.event("edit.attachment-updated")}get attachmentDeleted(){return this._messages.event("edit.attachment-deleted")}get featureAdded(){return this._messages.event("edit.feature-added")}get featureDeleted(){return this._messages.event("edit.feature-deleted")}get featureUpdated(){return this._messages.event("edit.feature-updated")}}
|
|
@@ -21,14 +21,13 @@ import type { SimpleFillSymbol as SimpleFillSymbolProperties } from "@vertigis/a
|
|
|
21
21
|
import type { SimpleLineSymbol as SimpleLineSymbolProperties } from "@vertigis/arcgis-extensions/portal/SimpleLineSymbol";
|
|
22
22
|
import type { SimpleMarkerSymbol as SimpleMarkerSymbolProperties } from "@vertigis/arcgis-extensions/portal/SimpleMarkerSymbol";
|
|
23
23
|
import type { Symbol as SymbolJson } from "@vertigis/arcgis-extensions/portal/Symbol";
|
|
24
|
-
import type { ItemRef } from "../../app-config/common/ItemRef.js";
|
|
25
24
|
import type { Command } from "../Command.js";
|
|
26
25
|
import { CommandRegistry } from "../CommandRegistry.js";
|
|
27
26
|
import type { Event } from "../Event.js";
|
|
28
27
|
import { EventRegistry } from "../EventRegistry.js";
|
|
29
28
|
import type { Operation } from "../Operation.js";
|
|
30
29
|
import { OperationRegistry } from "../OperationRegistry.js";
|
|
31
|
-
import type { FeaturesLike, GeometryLike, GraphicsLike, HasMaps, MapsLike } from "../common.js";
|
|
30
|
+
import type { FeaturesLike, GeometryLike, GraphicsLike, HasMaps, Maps, MapsLike } from "../common.js";
|
|
32
31
|
import type { EditSymbolResult } from "./drawing.js";
|
|
33
32
|
import type { GeodeticCurveType, LengthUnits, LengthUnitsMobile, ReferenceLine } from "./geometry.js";
|
|
34
33
|
/**
|
|
@@ -101,7 +100,9 @@ export declare enum SketchTool {
|
|
|
101
100
|
*/
|
|
102
101
|
export declare type AddNodeOrder = "add-after-active" | "add-before-active";
|
|
103
102
|
/**
|
|
104
|
-
*
|
|
103
|
+
* Deprecated - use "sketching.move-point" with {@link MovePointArgs}.
|
|
104
|
+
*
|
|
105
|
+
* @deprecated
|
|
105
106
|
*/
|
|
106
107
|
export interface MoveNodeArgs extends HasMaps {
|
|
107
108
|
/**
|
|
@@ -115,7 +116,53 @@ export interface MoveNodeArgs extends HasMaps {
|
|
|
115
116
|
position: Geometry;
|
|
116
117
|
}
|
|
117
118
|
/**
|
|
118
|
-
* The arguments for the "sketching.
|
|
119
|
+
* The arguments for the "sketching.move-point" command.
|
|
120
|
+
*/
|
|
121
|
+
export interface MovePointArgs extends HasMaps {
|
|
122
|
+
/**
|
|
123
|
+
* The point to move, which must already exist within the active sketch. If
|
|
124
|
+
* this property is undefined and no geometry and pointIndex are specified,
|
|
125
|
+
* the active point(s) will be moved.
|
|
126
|
+
*/
|
|
127
|
+
point?: Point;
|
|
128
|
+
/**
|
|
129
|
+
* The geometry where the point exists, if multiple are present in an active
|
|
130
|
+
* editing session. This property is required if pointIndex and/or partIndex
|
|
131
|
+
* are defined.
|
|
132
|
+
*/
|
|
133
|
+
geometry?: Geometry;
|
|
134
|
+
/**
|
|
135
|
+
* The index of the point. If this property is defined, the 'geometry'
|
|
136
|
+
* property must also be defined.
|
|
137
|
+
*/
|
|
138
|
+
pointIndex?: number;
|
|
139
|
+
/**
|
|
140
|
+
* The part of the geometry where the point exists. Required for polyline
|
|
141
|
+
* and polygon geometry types when the geometry and pointIndex properties
|
|
142
|
+
* are defined.
|
|
143
|
+
*/
|
|
144
|
+
partIndex?: number;
|
|
145
|
+
/**
|
|
146
|
+
* The new point that will replace the target point within an active sketch
|
|
147
|
+
* or edit geometry. If this property is defined, the distance property
|
|
148
|
+
* will be ignored.
|
|
149
|
+
*/
|
|
150
|
+
newPoint?: Point;
|
|
151
|
+
/**
|
|
152
|
+
* An amount to move the point(s) on the X and Y axes. If the newPoint
|
|
153
|
+
* property is defined, this property will be ignored.
|
|
154
|
+
*/
|
|
155
|
+
distance?: Vector2D;
|
|
156
|
+
/**
|
|
157
|
+
* The units of the above distance. Optional, will default to the units used
|
|
158
|
+
* by the measurement service associated with the map.
|
|
159
|
+
*/
|
|
160
|
+
units?: LengthUnits;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Deprecated - use "sketching.set-active-points" with {@link SetActivePointsArgs}.
|
|
164
|
+
*
|
|
165
|
+
* @deprecated
|
|
119
166
|
*/
|
|
120
167
|
export interface SwitchActiveNodeArgs extends HasMaps {
|
|
121
168
|
/**
|
|
@@ -123,6 +170,34 @@ export interface SwitchActiveNodeArgs extends HasMaps {
|
|
|
123
170
|
*/
|
|
124
171
|
node: Point;
|
|
125
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* The arguments for the "sketching.set-active-points" command.
|
|
175
|
+
*/
|
|
176
|
+
export interface SetActivePointsArgs extends HasMaps {
|
|
177
|
+
/**
|
|
178
|
+
* The new point(s) that will become active in the sketch or editing
|
|
179
|
+
* session. Sketching only supports one active point; if multiple are
|
|
180
|
+
* specified, then only the first will be set as active.
|
|
181
|
+
*/
|
|
182
|
+
points?: Point | Point[];
|
|
183
|
+
/**
|
|
184
|
+
* The geometry where the new active point exists, if multiple are present
|
|
185
|
+
* in an active editing session. This property is required if pointIndex
|
|
186
|
+
* and/or partIndex are defined.
|
|
187
|
+
*/
|
|
188
|
+
geometry?: Geometry;
|
|
189
|
+
/**
|
|
190
|
+
* The index of the new active point. If this property is defined, the
|
|
191
|
+
* geometry property must be defined.
|
|
192
|
+
*/
|
|
193
|
+
pointIndex?: number;
|
|
194
|
+
/**
|
|
195
|
+
* The part of the geometry where the new active point exists. Required for
|
|
196
|
+
* polyline and polygon geometry types when the geometry and pointIndex
|
|
197
|
+
* properties are defined.
|
|
198
|
+
*/
|
|
199
|
+
partIndex?: number;
|
|
200
|
+
}
|
|
126
201
|
/**
|
|
127
202
|
* Arguments for the "sketching.capture-geometry" operation.
|
|
128
203
|
*/
|
|
@@ -237,12 +312,23 @@ export interface EditGeometryOptions {
|
|
|
237
312
|
* Defaults to true.
|
|
238
313
|
*/
|
|
239
314
|
enableScaleModeToggle?: boolean;
|
|
315
|
+
/**
|
|
316
|
+
* Whether to allow the user to add, move, and remove vertices from a
|
|
317
|
+
* geometry. Defaults to true.
|
|
318
|
+
*/
|
|
319
|
+
enableVertexEditing?: boolean;
|
|
240
320
|
/**
|
|
241
321
|
* Setting "free" allows independent scaling on the x and y axis,
|
|
242
322
|
* "preserve-aspect-ratio" constrains scaling to the original aspect ratio.
|
|
243
323
|
* Defaults to "preserve-aspect-ratio".
|
|
244
324
|
*/
|
|
245
325
|
scaleMode?: "free" | "preserve-aspect-ratio";
|
|
326
|
+
/**
|
|
327
|
+
* Whether the resulting geometry is validated before it's returned from the
|
|
328
|
+
* operation. If the geometry is invalid upon completion, an error is
|
|
329
|
+
* thrown. Defaults to true.
|
|
330
|
+
*/
|
|
331
|
+
validateGeometry?: boolean;
|
|
246
332
|
/**
|
|
247
333
|
* Where to anchor the geometry when performing a free scale operation.
|
|
248
334
|
* Defaults to "center".
|
|
@@ -307,7 +393,49 @@ export interface StopGeometryEditArgs {
|
|
|
307
393
|
validateGeometry?: boolean;
|
|
308
394
|
}
|
|
309
395
|
/**
|
|
310
|
-
* Arguments for the "sketching.add-
|
|
396
|
+
* Arguments for the "sketching.add-point" command.
|
|
397
|
+
*/
|
|
398
|
+
export interface AddPointArgs extends HasMaps {
|
|
399
|
+
/**
|
|
400
|
+
* The new point to be added.
|
|
401
|
+
*/
|
|
402
|
+
newPoint: Point;
|
|
403
|
+
/**
|
|
404
|
+
* The geometry to add the point to, if multiple are present in an active
|
|
405
|
+
* editing session. Not supported by Mobile.
|
|
406
|
+
*/
|
|
407
|
+
geometry?: Geometry;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Arguments for the "sketching.insert-point" command.
|
|
411
|
+
*/
|
|
412
|
+
export interface InsertPointArgs extends HasMaps {
|
|
413
|
+
/**
|
|
414
|
+
* The index of the part to which the point will be added. If null, the last
|
|
415
|
+
* part will be used.
|
|
416
|
+
*/
|
|
417
|
+
partIndex?: number;
|
|
418
|
+
/**
|
|
419
|
+
* The index at which the point will be added. If null, the point will be
|
|
420
|
+
* added as the last point.
|
|
421
|
+
*/
|
|
422
|
+
pointIndex?: number;
|
|
423
|
+
/**
|
|
424
|
+
* The new point to be added.
|
|
425
|
+
*/
|
|
426
|
+
newPoint: Point;
|
|
427
|
+
/**
|
|
428
|
+
* The geometry to add the point to, if multiple are present in an active
|
|
429
|
+
* editing session. Not supported by Mobile.
|
|
430
|
+
*/
|
|
431
|
+
geometry?: Geometry;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Deprecated - Mobile users should rather use "geometry.add-point"; Web users
|
|
435
|
+
* should use "sketching.add-point" with {@link AddPointArgs} or
|
|
436
|
+
* "sketching.insert-point" with {@link InsertPointArgs} instead.
|
|
437
|
+
*
|
|
438
|
+
* @deprecated
|
|
311
439
|
*/
|
|
312
440
|
export interface AddNodeToGeometryArgs extends HasMaps {
|
|
313
441
|
/**
|
|
@@ -338,10 +466,28 @@ export interface AddNodeToGeometryArgs extends HasMaps {
|
|
|
338
466
|
*/
|
|
339
467
|
export interface DeleteGeometryArgs extends HasMaps {
|
|
340
468
|
/**
|
|
341
|
-
* The point to
|
|
342
|
-
*
|
|
469
|
+
* The point to remove from the geometry. If this property is defined, the
|
|
470
|
+
* 'pointIndex' and 'partIndex' properties are ignored. If no point nor
|
|
471
|
+
* pointIndex/partIndex are specified, any active points will be deleted. If
|
|
472
|
+
* there are no active points, the entire geometry will be deleted.
|
|
473
|
+
*/
|
|
474
|
+
point?: Point;
|
|
475
|
+
/**
|
|
476
|
+
* The geometry to remove a point from. If this property is not specified,
|
|
477
|
+
* any active vertices will be deleted.
|
|
478
|
+
*/
|
|
479
|
+
geometry?: Geometry;
|
|
480
|
+
/**
|
|
481
|
+
* The index of the point that should be removed from the geometry. If this
|
|
482
|
+
* property is defined, the geometry property must also be defined.
|
|
343
483
|
*/
|
|
344
|
-
|
|
484
|
+
pointIndex?: number;
|
|
485
|
+
/**
|
|
486
|
+
* The index of the part of the geometry that the point should be removed
|
|
487
|
+
* from. Required for polyline and polygon geometry types when the geometry
|
|
488
|
+
* and pointIndex properties are defined.
|
|
489
|
+
*/
|
|
490
|
+
partIndex?: number;
|
|
345
491
|
}
|
|
346
492
|
/**
|
|
347
493
|
* Arguments for the "sketching.set-geometry-mode" command.
|
|
@@ -402,8 +548,12 @@ export interface GeometryEditorSettings {
|
|
|
402
548
|
editorInteractionMode?: EditorInteractionMode;
|
|
403
549
|
}
|
|
404
550
|
/**
|
|
405
|
-
* Result returned from the 'sketching.get-active-
|
|
406
|
-
|
|
551
|
+
* Result returned from the 'sketching.get-active-points' operation.
|
|
552
|
+
*/
|
|
553
|
+
export interface GetActivePointsResult extends GetActiveSketchResult {
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Result returned from the 'sketching.get-active-sketch' operation.
|
|
407
557
|
*/
|
|
408
558
|
export interface GetActiveSketchResult {
|
|
409
559
|
/**
|
|
@@ -415,6 +565,25 @@ export interface GetActiveSketchResult {
|
|
|
415
565
|
*/
|
|
416
566
|
maps: MapExtension;
|
|
417
567
|
}
|
|
568
|
+
/**
|
|
569
|
+
* Specifies if a desired point comes before or after a given reference point.
|
|
570
|
+
*/
|
|
571
|
+
export declare type PointOffset = "before" | "after";
|
|
572
|
+
/**
|
|
573
|
+
* Arguments for the 'sketching.get-adjacent-point' operation.
|
|
574
|
+
*/
|
|
575
|
+
export interface GetAdjacentPointArgs extends HasMaps {
|
|
576
|
+
/**
|
|
577
|
+
* A point geometry that represents a vertex within an active editing
|
|
578
|
+
* graphic.
|
|
579
|
+
*/
|
|
580
|
+
referencePoint: Point;
|
|
581
|
+
/**
|
|
582
|
+
* Specifies if the desired point comes before or after the referencePoint.
|
|
583
|
+
* Defaults to 'after'.
|
|
584
|
+
*/
|
|
585
|
+
relativeOffset?: PointOffset;
|
|
586
|
+
}
|
|
418
587
|
/**
|
|
419
588
|
* Arguments for the "sketching.set-constraints" command.
|
|
420
589
|
*/
|
|
@@ -474,34 +643,6 @@ export interface ClearConstraintsArgs extends HasMaps {
|
|
|
474
643
|
*/
|
|
475
644
|
clearAngleConstraint?: boolean;
|
|
476
645
|
}
|
|
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
|
-
}
|
|
505
646
|
export declare class SketchingOperations extends OperationRegistry {
|
|
506
647
|
/**
|
|
507
648
|
* Allows the user to create geometry by sketching on a map. Returns the
|
|
@@ -547,20 +688,20 @@ export declare class SketchingOperations extends OperationRegistry {
|
|
|
547
688
|
* they are not required for this operation.
|
|
548
689
|
*
|
|
549
690
|
* @webOnly
|
|
550
|
-
*
|
|
551
691
|
*/
|
|
552
692
|
get rotateGeometry(): Operation<RotateGeometryArgs, GeometryOperationBase>;
|
|
553
693
|
/**
|
|
554
694
|
* Stops geometry capturing or editing on a given map. Returns the current
|
|
555
695
|
* geometry. If validateGeometry parameter is true and geometry is invalid,
|
|
556
|
-
*
|
|
696
|
+
* the operation will return null.
|
|
557
697
|
*/
|
|
558
698
|
get stop(): Operation<StopGeometryEditArgs | void, CaptureGeometryResult>;
|
|
559
699
|
/**
|
|
560
|
-
*
|
|
561
|
-
*
|
|
700
|
+
* Deprecated - Mobile users should rather use "geometry.add-point"; Web
|
|
701
|
+
* users should use "sketching.add-point" or "sketching.insert-point"
|
|
702
|
+
* instead.
|
|
562
703
|
*
|
|
563
|
-
*
|
|
704
|
+
* @deprecated
|
|
564
705
|
*/
|
|
565
706
|
get addNodeToGeometry(): Operation<AddNodeToGeometryArgs, Geometry>;
|
|
566
707
|
/**
|
|
@@ -570,11 +711,27 @@ export declare class SketchingOperations extends OperationRegistry {
|
|
|
570
711
|
*/
|
|
571
712
|
get getActiveSketch(): Operation<void, GetActiveSketchResult>;
|
|
572
713
|
/**
|
|
573
|
-
*
|
|
714
|
+
* Deprecated - use 'sketching.get-active-points' instead.
|
|
715
|
+
*
|
|
716
|
+
* @deprecated
|
|
717
|
+
* @webOnly
|
|
718
|
+
*/
|
|
719
|
+
get getActiveNode(): Operation<Maps, GetActivePointsResult>;
|
|
720
|
+
/**
|
|
721
|
+
* Returns the active point graphics of the active sketch or edit session on
|
|
722
|
+
* a map.
|
|
574
723
|
*
|
|
575
724
|
* @webOnly
|
|
576
725
|
*/
|
|
577
|
-
get
|
|
726
|
+
get getActivePoints(): Operation<Maps, GetActivePointsResult>;
|
|
727
|
+
/**
|
|
728
|
+
* Return the adjacent point graphic(s), relative to a given vertex that's a
|
|
729
|
+
* part of an active editing or sketching session. This operation is only
|
|
730
|
+
* supported for Polyline and Polygon geometries.
|
|
731
|
+
*
|
|
732
|
+
* @webOnly
|
|
733
|
+
*/
|
|
734
|
+
get getAdjacentPoint(): Operation<GetAdjacentPointArgs, GetActiveSketchResult>;
|
|
578
735
|
/**
|
|
579
736
|
* Checks whether streaming is active.
|
|
580
737
|
*
|
|
@@ -626,22 +783,37 @@ export declare class SketchingCommands extends CommandRegistry {
|
|
|
626
783
|
/**
|
|
627
784
|
* If a point is supplied while a sketching or editing operation is active,
|
|
628
785
|
* the vertex at that point will be deleted from the current geometry. If no
|
|
629
|
-
* point is supplied
|
|
630
|
-
* geometry will be
|
|
786
|
+
* point is supplied, any active points in the session will be deleted. If
|
|
787
|
+
* there are no active points in the session, the entire geometry will be
|
|
788
|
+
* deleted.
|
|
631
789
|
*/
|
|
632
|
-
get delete(): Command<DeleteGeometryArgs>;
|
|
790
|
+
get delete(): Command<void | DeleteGeometryArgs>;
|
|
633
791
|
/**
|
|
634
|
-
*
|
|
792
|
+
* Deprecated - use 'sketching.move-point' instead.
|
|
635
793
|
*
|
|
794
|
+
* @deprecated
|
|
636
795
|
* @webOnly
|
|
637
796
|
*/
|
|
638
797
|
get moveNode(): Command<MoveNodeArgs>;
|
|
639
798
|
/**
|
|
640
|
-
*
|
|
799
|
+
* Moves a point within an active sketch to a new location.
|
|
641
800
|
*
|
|
642
801
|
* @webOnly
|
|
643
802
|
*/
|
|
803
|
+
get movePoint(): Command<MovePointArgs>;
|
|
804
|
+
/**
|
|
805
|
+
* Deprecated - use 'sketching.set-active-points' instead.
|
|
806
|
+
*
|
|
807
|
+
* @deprecated
|
|
808
|
+
* @webOnly
|
|
809
|
+
*/
|
|
644
810
|
get switchActiveNode(): Command<SwitchActiveNodeArgs>;
|
|
811
|
+
/**
|
|
812
|
+
* Switches the active point of an active sketch.
|
|
813
|
+
*
|
|
814
|
+
* @webOnly
|
|
815
|
+
*/
|
|
816
|
+
get setActivePoints(): Command<SetActivePointsArgs>;
|
|
645
817
|
/**
|
|
646
818
|
* Sets the interaction mode of the geometry editor.
|
|
647
819
|
*
|
|
@@ -685,14 +857,14 @@ export declare class SketchingCommands extends CommandRegistry {
|
|
|
685
857
|
*/
|
|
686
858
|
get clearConstraints(): Command<ClearConstraintsArgs>;
|
|
687
859
|
/**
|
|
688
|
-
* Inserts a point into a polygon or
|
|
689
|
-
* partIndex is null, then the last part is used. If the
|
|
690
|
-
* then the new point is inserted at the end.
|
|
860
|
+
* Inserts a point into a polygon, polyline, or multipoint at the specified
|
|
861
|
+
* index. If the partIndex is null, then the last part is used. If the
|
|
862
|
+
* pointIndex is null, then the new point is inserted at the end.
|
|
691
863
|
*/
|
|
692
864
|
get insertPoint(): Command<InsertPointArgs>;
|
|
693
865
|
/**
|
|
694
|
-
* Adds a point to polygon or
|
|
695
|
-
* to insert after.
|
|
866
|
+
* Adds a point to polygon, polyline, or multipoint using the selected index
|
|
867
|
+
* as the point to insert after.
|
|
696
868
|
*/
|
|
697
869
|
get addPoint(): Command<AddPointArgs>;
|
|
698
870
|
/**
|
|
@@ -1 +1 @@
|
|
|
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")}}
|
|
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 getActivePoints(){return this._messages.operation("sketching.get-active-points")}get getAdjacentPoint(){return this._messages.operation("sketching.get-adjacent-point")}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 movePoint(){return this._messages.command("sketching.move-point")}get switchActiveNode(){return this._messages.command("sketching.switch-active-node")}get setActivePoints(){return this._messages.command("sketching.set-active-points")}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")}}
|