@vertigis/viewer-spec 46.4.1 → 47.1.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.
@@ -7,10 +7,11 @@ import type { Event } from "../Event.js";
7
7
  import { EventRegistry } from "../EventRegistry.js";
8
8
  import type { Operation } from "../Operation.js";
9
9
  import { OperationRegistry } from "../OperationRegistry.js";
10
- import type { HasFeatures, HasGeometry, HasLayers, HasMaps, HasUITarget, MapsLike } from "../common.js";
10
+ import type { Features, File, HasFeatures, HasGeometry, HasLayers, HasMaps, HasUITarget, MapsLike } from "../common.js";
11
11
  import type { EditGeometryOptions } from "./sketching.js";
12
12
  /**
13
- * Arguments for the "edit.add-attachment" command.
13
+ * Arguments for the "edit.add-attachment" command. Supported by both Web and
14
+ * Mobile.
14
15
  */
15
16
  export interface AddAttachmentArgs {
16
17
  /**
@@ -34,6 +35,42 @@ export interface AddAttachmentArgs {
34
35
  */
35
36
  data: number[];
36
37
  }
38
+ /**
39
+ * VertiGIS Studio Web's arguments for the "edit.add-attachment" command. Not
40
+ * supported by Mobile.
41
+ */
42
+ export interface WebAddAttachmentArgs {
43
+ /**
44
+ * The feature(s) to add the attachment(s) to. If multiple features are
45
+ * specified, the attachment(s) will be added to all features.
46
+ */
47
+ features: Features;
48
+ /**
49
+ * The blob(s) that contains the file attachment(s). If multiple attachments
50
+ * are specified, all attachment will be added to the feature(s).
51
+ */
52
+ blobs: File | File[];
53
+ }
54
+ /**
55
+ * Arguments for the "edit.delete-attachment" command.
56
+ */
57
+ export interface DeleteAttachmentArgs {
58
+ /**
59
+ * The feature(s) to remove the attachment(s) from.
60
+ */
61
+ features: Features;
62
+ /**
63
+ * The attachment(s) to remove from the feature(s). This property can be
64
+ * populated with the title(s) or ID(s) of the attachments(s). Any and all
65
+ * matching attachments found on the input features will be deleted. Web
66
+ * only.
67
+ */
68
+ attachments?: string[];
69
+ /**
70
+ * The attachment to remove from the feature(s). Mobile only.
71
+ */
72
+ gcxAttachment?: Attachment;
73
+ }
37
74
  /**
38
75
  * Arguments for various attachment events.
39
76
  */
@@ -131,9 +168,13 @@ export declare class EditCommands extends CommandRegistry {
131
168
  * Create and add an attachment to a provided feature, using the given
132
169
  * attachment data.
133
170
  *
134
- * @mobileOnly
135
171
  */
136
- get addAttachment(): Command<AddAttachmentArgs>;
172
+ get addAttachment(): Command<AddAttachmentArgs | WebAddAttachmentArgs>;
173
+ /**
174
+ * Deletes attachments from feature(s).
175
+ *
176
+ */
177
+ get deleteAttachment(): Command<DeleteAttachmentArgs>;
137
178
  /**
138
179
  * Adds a feature to a particular layer. `Feature[]` and
139
180
  * `EditCommandArgs` are not supported on Mobile.
@@ -1 +1 @@
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")}}
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 deleteAttachment(){return this._messages.command("edit.delete-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")}}
@@ -56,6 +56,19 @@ export interface ZoomToViewpointArgs {
56
56
  */
57
57
  viewpoint: ViewpointLike | string;
58
58
  }
59
+ /**
60
+ * The result of getting a Viewpoint.
61
+ */
62
+ export interface GetViewpointResult {
63
+ /**
64
+ * The map(s) used in the operation.
65
+ */
66
+ maps?: MapsLike;
67
+ /**
68
+ * The viewpoint.
69
+ */
70
+ viewpoint: Viewpoint;
71
+ }
59
72
  /**
60
73
  * Arguments for the map.zoom-to-layer-extent and
61
74
  * map.zoom-to-layer-visible-scale commands.
@@ -963,19 +976,21 @@ export declare class MapOperations extends OperationRegistry {
963
976
  /**
964
977
  * Returns the initial viewpoint for the active map or scene of the
965
978
  * specified map. If no map extension is specified, returns the initial
966
- * viewpoint for the first available map.
979
+ * viewpoint for the first available map. Also returns the map(s) used for
980
+ * the operation.
967
981
  *
968
982
  * @webOnly
969
983
  */
970
- get getInitialViewpoint(): Operation<Maps | void, Viewpoint>;
984
+ get getInitialViewpoint(): Operation<Maps | void, GetViewpointResult>;
971
985
  /**
972
986
  * Returns the current viewpoint for the active map or scene of the
973
987
  * specified map. If no map extension is specified, returns the viewpoint
974
- * for the first available map.
988
+ * for the first available map. Also returns the map(s) used for the
989
+ * operation.
975
990
  *
976
991
  * @webOnly
977
992
  */
978
- get getViewpoint(): Operation<Maps | void, Viewpoint>;
993
+ get getViewpoint(): Operation<Maps | void, GetViewpointResult>;
979
994
  /**
980
995
  * If a map extension ID is specified, returns the spatial reference for
981
996
  * that map. If no map extension ID is specified, returns the spatial
@@ -1,5 +1,7 @@
1
1
  import type { Command } from "../Command.js";
2
2
  import { CommandRegistry } from "../CommandRegistry.js";
3
+ import type { Event } from "../Event.js";
4
+ import { EventRegistry } from "../EventRegistry.js";
3
5
  import type { Operation } from "../Operation.js";
4
6
  import { OperationRegistry } from "../OperationRegistry.js";
5
7
  import type { Blob, File, HasFeatures, HasGeometry, HasLayers, HasMaps, HasUITarget } from "../common.js";
@@ -82,6 +84,34 @@ export interface OpenUrlArgs {
82
84
  */
83
85
  numberFormatterLocale?: string;
84
86
  }
87
+ /**
88
+ * Arguments for the system.disable-background-location-updates command.
89
+ */
90
+ export interface BackgroundLocationUpdatesArgs {
91
+ /**
92
+ * The task ID for enabling and disabling background location updates. Once
93
+ * enabled using a certain task ID, background location updates can only be
94
+ * stopped once they are disabled with that same task ID.
95
+ *
96
+ * Cannot be set to null, but if this argument is not provided, a preset
97
+ * default value will be used.
98
+ */
99
+ taskId?: string;
100
+ }
101
+ /**
102
+ * Arguments for the system.enable-background-location-updates command.
103
+ */
104
+ export interface EnableBackgroundLocationUpdateArgs extends BackgroundLocationUpdatesArgs {
105
+ /**
106
+ * The title used in the sticky notification on Android. If null or an empty
107
+ * string, a default title will be used.
108
+ */
109
+ androidNotificationTitle?: string;
110
+ /**
111
+ * The message used in the sticky notification on Android.
112
+ */
113
+ androidNotificationMessage?: string;
114
+ }
85
115
  export declare class SystemCommands extends CommandRegistry {
86
116
  /**
87
117
  * Displays a sharing link to the user.
@@ -121,6 +151,22 @@ export declare class SystemCommands extends CommandRegistry {
121
151
  * @mobileOnly
122
152
  */
123
153
  get keepScreenOn(): Command<boolean>;
154
+ /**
155
+ * Enables background location updates. While enabled, the application will
156
+ * continue to execute code while running in the background.
157
+ *
158
+ * Note for iOS: If the user has not accepted location permissions for the
159
+ * app, no code will be allowed to execute in the background.
160
+ *
161
+ * @mobileOnly
162
+ */
163
+ get enableBackgroundLocationUpdates(): Command<EnableBackgroundLocationUpdateArgs>;
164
+ /**
165
+ * Disables background location updates.
166
+ *
167
+ * @mobileOnly
168
+ */
169
+ get disableBackgroundLocationUpdates(): Command<BackgroundLocationUpdatesArgs>;
124
170
  }
125
171
  export declare class SystemOperations extends OperationRegistry {
126
172
  /**
@@ -143,3 +189,17 @@ export declare class SystemOperations extends OperationRegistry {
143
189
  */
144
190
  get getSharingLink(): Operation<void, string>;
145
191
  }
192
+ export declare class SystemEvents extends EventRegistry {
193
+ /**
194
+ * Raised when background location updates are enabled.
195
+ *
196
+ * @mobileOnly
197
+ */
198
+ get backgroundLocationUpdatesEnabled(): Event;
199
+ /**
200
+ * Raised when background location updates are disabled.
201
+ *
202
+ * @mobileOnly
203
+ */
204
+ get backgroundLocationUpdatesDisabled(): Event;
205
+ }
@@ -1 +1 @@
1
- import{CommandRegistry}from"../CommandRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";export class SystemCommands extends CommandRegistry{get displaySharingLink(){return this._messages.command("system.display-sharing-link")}get downloadFile(){return this._messages.command("system.download-file")}get openUrl(){return this._messages.command("system.open-url")}get keepScreenOn(){return this._messages.command("system.keep-screen-on")}}export class SystemOperations extends OperationRegistry{get readUrl(){return this._messages.operation("system.read-url")}get readFile(){return this._messages.operation("system.read-file")}get getSharingLink(){return this._messages.operation("system.get-sharing-link")}}
1
+ import{CommandRegistry}from"../CommandRegistry.js";import{EventRegistry}from"../EventRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";export class SystemCommands extends CommandRegistry{get displaySharingLink(){return this._messages.command("system.display-sharing-link")}get downloadFile(){return this._messages.command("system.download-file")}get openUrl(){return this._messages.command("system.open-url")}get keepScreenOn(){return this._messages.command("system.keep-screen-on")}get enableBackgroundLocationUpdates(){return this._messages.command("system.enable-background-location-updates")}get disableBackgroundLocationUpdates(){return this._messages.command("system.disable-background-location-updates")}}export class SystemOperations extends OperationRegistry{get readUrl(){return this._messages.operation("system.read-url")}get readFile(){return this._messages.operation("system.read-file")}get getSharingLink(){return this._messages.operation("system.get-sharing-link")}}export class SystemEvents extends EventRegistry{get backgroundLocationUpdatesEnabled(){return this._messages.event("system.background-location-updates-enabled")}get backgroundLocationUpdatesDisabled(){return this._messages.event("system.background-location-updates-disabled")}}