ol-wfst 4.1.1 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +10 -11
  3. package/dist/@enums.d.ts +16 -16
  4. package/dist/@types.d.ts +200 -200
  5. package/dist/Geoserver.d.ts +274 -274
  6. package/dist/Geoserver.d.ts.map +1 -1
  7. package/dist/WfsLayer.d.ts +52 -52
  8. package/dist/WfsLayer.d.ts.map +1 -1
  9. package/dist/WmsLayer.d.ts +68 -61
  10. package/dist/WmsLayer.d.ts.map +1 -1
  11. package/dist/css/ol-wfst.bootstrap5.css +227 -38
  12. package/dist/css/ol-wfst.bootstrap5.min.css +1 -1
  13. package/dist/css/ol-wfst.css +24 -39
  14. package/dist/css/ol-wfst.min.css +1 -1
  15. package/dist/defaults.d.ts +3 -3
  16. package/dist/index-umd.d.ts +3 -0
  17. package/dist/index-umd.d.ts.map +1 -0
  18. package/dist/modules/EditControlChanges.d.ts +17 -17
  19. package/dist/modules/EditFieldsModal.d.ts +18 -18
  20. package/dist/modules/EditOverlay.d.ts +7 -7
  21. package/dist/modules/LayersControl.d.ts +37 -33
  22. package/dist/modules/LayersControl.d.ts.map +1 -1
  23. package/dist/modules/Uploads.d.ts +49 -49
  24. package/dist/modules/base/BaseLayer.d.ts +61 -61
  25. package/dist/modules/base/WfsSource.d.ts +48 -47
  26. package/dist/modules/base/WfsSource.d.ts.map +1 -1
  27. package/dist/modules/base/WmsSource.d.ts +46 -46
  28. package/dist/modules/editLayer.d.ts +3 -3
  29. package/dist/modules/errors.d.ts +11 -11
  30. package/dist/modules/helpers.d.ts +6 -6
  31. package/dist/modules/i18n/en.d.ts +2 -2
  32. package/dist/modules/i18n/es.d.ts +2 -2
  33. package/dist/modules/i18n/index.d.ts +14 -14
  34. package/dist/modules/i18n/zh.d.ts +2 -2
  35. package/dist/modules/loading.d.ts +2 -2
  36. package/dist/modules/state.d.ts +21 -21
  37. package/dist/modules/styleFunction.d.ts +12 -12
  38. package/dist/myPragma.d.ts +1 -1
  39. package/dist/ol-wfst.d.ts +334 -336
  40. package/dist/ol-wfst.d.ts.map +1 -1
  41. package/dist/ol-wfst.js +2656 -2599
  42. package/dist/ol-wfst.js.map +1 -1
  43. package/dist/ol-wfst.min.js +3 -3
  44. package/dist/ol-wfst.min.js.map +1 -1
  45. package/lib/@enums.d.ts +16 -16
  46. package/lib/@types.d.ts +200 -200
  47. package/lib/Geoserver.d.ts +274 -274
  48. package/lib/Geoserver.d.ts.map +1 -1
  49. package/lib/WfsLayer.d.ts +52 -52
  50. package/lib/WfsLayer.d.ts.map +1 -1
  51. package/lib/WmsLayer.d.ts +68 -61
  52. package/lib/WmsLayer.d.ts.map +1 -1
  53. package/lib/defaults.d.ts +3 -3
  54. package/lib/index-umd.d.ts +3 -0
  55. package/lib/index-umd.d.ts.map +1 -0
  56. package/lib/modules/EditControlChanges.d.ts +17 -17
  57. package/lib/modules/EditFieldsModal.d.ts +18 -18
  58. package/lib/modules/EditOverlay.d.ts +7 -7
  59. package/lib/modules/LayersControl.d.ts +37 -33
  60. package/lib/modules/LayersControl.d.ts.map +1 -1
  61. package/lib/modules/Uploads.d.ts +49 -49
  62. package/lib/modules/base/BaseLayer.d.ts +61 -61
  63. package/lib/modules/base/WfsSource.d.ts +48 -47
  64. package/lib/modules/base/WfsSource.d.ts.map +1 -1
  65. package/lib/modules/base/WmsSource.d.ts +46 -46
  66. package/lib/modules/editLayer.d.ts +3 -3
  67. package/lib/modules/errors.d.ts +11 -11
  68. package/lib/modules/helpers.d.ts +6 -6
  69. package/lib/modules/i18n/en.d.ts +2 -2
  70. package/lib/modules/i18n/es.d.ts +2 -2
  71. package/lib/modules/i18n/index.d.ts +14 -14
  72. package/lib/modules/i18n/zh.d.ts +2 -2
  73. package/lib/modules/loading.d.ts +2 -2
  74. package/lib/modules/state.d.ts +21 -21
  75. package/lib/modules/styleFunction.d.ts +12 -12
  76. package/lib/myPragma.d.ts +1 -1
  77. package/lib/ol-wfst.d.ts +334 -336
  78. package/lib/ol-wfst.d.ts.map +1 -1
  79. package/lib/ol-wfst.js +2651 -2593
  80. package/lib/ol-wfst.js.map +1 -1
  81. package/lib/style/css/ol-gisify.css +24 -39
  82. package/lib/style/css/ol-wfst.bootstrap5.css +227 -38
  83. package/lib/style/scss/-ol-wfst.bootstrap5.scss +3 -0
  84. package/lib/style/scss/ol-wfst.scss +81 -58
  85. package/package.json +15 -16
  86. package/CHANGELOG.md +0 -123
  87. package/dist/tsconfig.tsbuildinfo +0 -1
  88. package/lib/tsconfig.tsbuildinfo +0 -1
package/dist/ol-wfst.d.ts CHANGED
@@ -1,337 +1,335 @@
1
- import Geometry from 'ol/geom/Geometry.js';
2
- import Control from 'ol/control/Control.js';
3
- import Draw from 'ol/interaction/Draw.js';
4
- import Modify from 'ol/interaction/Modify.js';
5
- import Select from 'ol/interaction/Select.js';
6
- import Snap from 'ol/interaction/Snap.js';
7
- import { EventsKey } from 'ol/events.js';
8
- import Collection from 'ol/Collection.js';
9
- import Feature from 'ol/Feature.js';
10
- import Overlay from 'ol/Overlay.js';
11
- import View from 'ol/View.js';
12
- import Map from 'ol/Map.js';
13
- import BaseEvent from 'ol/events/Event.js';
14
- import { LoadingStrategy } from 'ol/source/Vector.js';
15
- import { FeatureLike } from 'ol/Feature.js';
16
- import { Options as VectorLayerOptions } from 'ol/layer/BaseVector.js';
17
- import { CombinedOnSignature, EventTypes, OnSignature } from 'ol/Observable.js';
18
- import { Coordinate } from 'ol/coordinate.js';
19
- import { ObjectEvent } from 'ol/Object.js';
20
- import { Types as ObjectEventTypes } from 'ol/ObjectEventType.js';
21
- import WfsLayer from './WfsLayer';
22
- import WmsLayer from './WmsLayer';
23
- import LayersControl from './modules/LayersControl';
24
- import Uploads from './modules/Uploads';
25
- import { TransactionType } from './@enums';
26
- import { I18n, IGeoserverDescribeFeatureType, WfsGeoserverVendor, WmsGeoserverVendor } from './@types';
27
- import EditControlChangesEl from './modules/EditControlChanges';
28
- import { EditFieldsModal } from './modules/EditFieldsModal';
29
- import Geoserver from './Geoserver';
30
- import './assets/scss/-ol-wfst.bootstrap5.scss';
31
- import './assets/scss/ol-wfst.scss';
32
- /**
33
- * Tiny WFST-T client to insert (drawing/uploading), modify and delete
34
- * features on GeoServers using OpenLayers. Layers with these types
35
- * of geometries are supported: "GeometryCollection" (in this case, you can
36
- * choose the geometry type of each element to draw), "Point", "MultiPoint",
37
- * "LineString", "MultiLineString", "Polygon" and "MultiPolygon".
38
- *
39
- * @constructor
40
- * @fires modifystart
41
- * @fires modifyend
42
- * @fires drawstart
43
- * @fires drawend
44
- * @fires load
45
- * @fires describeFeatureType
46
- * @extends {ol/control/Control~Control}
47
- * @param options Wfst options, see [Wfst Options](#options) for more details.
48
- */
49
- export default class Wfst extends Control {
50
- protected _options: Options;
51
- protected _i18n: I18n;
52
- protected _map: Map;
53
- protected _view: View;
54
- protected _viewport: HTMLElement;
55
- protected _initialized: boolean;
56
- protected _layersControl: LayersControl;
57
- protected _overlay: Overlay;
58
- protected _interactionWfsSelect: Select;
59
- protected _interactionSelectModify: Select;
60
- protected _collectionModify: Collection<any>;
61
- protected _interactionModify: Modify;
62
- protected _interactionSnap: Snap;
63
- protected _interactionDraw: Draw;
64
- protected _keyClickWms: EventsKey | EventsKey[];
65
- protected _keyRemove: EventsKey;
66
- protected _keySelect: EventsKey;
67
- protected _controlApplyDiscardChanges: EditControlChangesEl;
68
- protected _controlWidgetToolsDiv: HTMLElement;
69
- protected _selectDraw: HTMLSelectElement;
70
- protected _currentZoom: number;
71
- protected _lastZoom: number;
72
- protected _editFeature: Feature<Geometry>;
73
- protected _editFeatureOriginal: Feature<Geometry>;
74
- protected _uploads: Uploads;
75
- protected _editFields: EditFieldsModal;
76
- on: OnSignature<EventTypes, BaseEvent, EventsKey> & OnSignature<WfstEventTypes, WfstEvent, EventsKey> & OnSignature<ObjectEventTypes, ObjectEvent, EventsKey> & CombinedOnSignature<WfstEventTypes | ObjectEventTypes | EventTypes, EventsKey>;
77
- once: OnSignature<EventTypes, BaseEvent, EventsKey> & OnSignature<WfstEventTypes, WfstEvent, EventsKey> & OnSignature<ObjectEventTypes, ObjectEvent, EventsKey> & CombinedOnSignature<WfstEventTypes | ObjectEventTypes | EventTypes, EventsKey>;
78
- un: OnSignature<EventTypes, BaseEvent, void> & OnSignature<WfstEventTypes, WfstEvent, EventsKey> & OnSignature<ObjectEventTypes, ObjectEvent, void> & CombinedOnSignature<WfstEventTypes | ObjectEventTypes | EventTypes, void>;
79
- constructor(options?: Options);
80
- /**
81
- * Get all the layers in the ol-wfst instance
82
- * @public
83
- */
84
- getLayers(): Array<WfsLayer | WmsLayer>;
85
- /**
86
- * Get a layer
87
- * @public
88
- */
89
- getLayerByName(layerName?: string): WfsLayer | WmsLayer;
90
- /**
91
- * Connect to the GeoServer and retrieve metadata about the service (GetCapabilities).
92
- * Get each layer specs (DescribeFeatureType) and create the layers and map controls.
93
- * @fires describeFeatureType
94
- * @private
95
- */
96
- _initMapAndLayers(): Promise<void>;
97
- /**
98
- * @private
99
- */
100
- _init(): void;
101
- /**
102
- * Create the edit layer to allow modify elements, add interactions,
103
- * map controls and keyboard handlers.
104
- *
105
- * @param showControl
106
- * @param active
107
- * @private
108
- */
109
- _createMapElements(showControl: boolean, active: boolean): Promise<void>;
110
- /**
111
- * @private
112
- */
113
- _addInteractions(): void;
114
- /**
115
- * Layer to store temporary the elements to be edited
116
- * @private
117
- */
118
- _prepareEditLayer(): void;
119
- /**
120
- * @private
121
- */
122
- _addMapEvents(): void;
123
- /**
124
- * Add map handlers
125
- * @private
126
- */
127
- _addInteractionHandlers(): void;
128
- /**
129
- * Add the widget on the map to allow change the tools and select active layers
130
- * @private
131
- */
132
- _addMapControl(): void;
133
- /**
134
- *
135
- * @param feature
136
- * @private
137
- */
138
- _deselectEditFeature(feature: FeatureLike): void;
139
- /**
140
- *
141
- * @param feature
142
- * @param layerName
143
- * @private
144
- */
145
- _restoreFeatureToLayer(feature: Feature<Geometry>, layerName?: string): void;
146
- /**
147
- * @param feature
148
- * @private
149
- */
150
- _removeFeatureFromTmpLayer(feature: Feature<Geometry>): void;
151
- /**
152
- * Trigger on deselecting a feature from in the Edit layer
153
- *
154
- * @private
155
- */
156
- _onDeselectFeatureEvent(): void;
157
- /**
158
- * Trigger on removing a feature from the Edit layer
159
- *
160
- * @private
161
- */
162
- _onRemoveFeatureEvent(): void;
163
- /**
164
- *
165
- * @param feature
166
- * @private
167
- */
168
- _editModeOn(feature: Feature<Geometry>): void;
169
- /**
170
- * @private
171
- */
172
- _editModeOff(): void;
173
- /**
174
- * Remove a feature from the edit Layer and from the Geoserver
175
- *
176
- * @param feature
177
- * @private
178
- */
179
- _deleteFeature(feature: Feature<Geometry>, confirm: boolean): void;
180
- /**
181
- * Add a feature to the Edit Layer to allow editing, and creates an Overlay Helper to show options
182
- *
183
- * @param feature
184
- * @param coordinate
185
- * @param layerName
186
- * @private
187
- */
188
- _addFeatureToEditMode(feature: Feature<Geometry>, coordinate?: Coordinate, layerName?: any): void;
189
- /**
190
- * Activate/deactivate the draw mode
191
- *
192
- * @param layer
193
- * @public
194
- */
195
- activateDrawMode(layer: WfsLayer | WmsLayer | false): void;
196
- /**
197
- * Activate/desactivate the edit mode
198
- *
199
- * @param bool
200
- * @public
201
- */
202
- activateEditMode(bool?: boolean): void;
203
- /**
204
- * Remove the overlay helper atttached to a specify feature
205
- * @param feature
206
- * @private
207
- */
208
- _removeOverlayHelper(feature: FeatureLike): void;
209
- }
210
- /**
211
- * **_[interface]_** - Wfst Options specified when creating a Wfst instance
212
- *
213
- * Default values:
214
- * ```javascript
215
- * {
216
- * layers: null,
217
- * evtType: 'singleclick',
218
- * active: true,
219
- * showControl: true,
220
- * language: 'en',
221
- * i18n: {...}, // according to language selection
222
- * uploadFormats: '.geojson,.json,.kml',
223
- * processUpload: null,
224
- * }
225
- * ```
226
- */
227
- interface Options {
228
- /**
229
- * Layers to be loaded from the geoserver
230
- */
231
- layers?: Array<WfsLayer | WmsLayer>;
232
- /**
233
- * Init active
234
- */
235
- active?: boolean;
236
- /**
237
- * The click event to allow selection of Features to be edited
238
- */
239
- evtType?: 'singleclick' | 'dblclick';
240
- /**
241
- * Show/hide the control map
242
- */
243
- showControl?: boolean;
244
- /**
245
- * Modal configuration
246
- */
247
- modal?: {
248
- animateClass?: string;
249
- animateInClass?: string;
250
- transition?: number;
251
- backdropTransition?: number;
252
- templates?: {
253
- dialog?: string | HTMLElement;
254
- headerClose?: string | HTMLElement;
255
- };
256
- };
257
- /**
258
- * Language to be used
259
- */
260
- language?: 'es' | 'en' | 'zh';
261
- /**
262
- * Custom translations
263
- */
264
- i18n?: I18n;
265
- /**
266
- * Show/hide the upload button
267
- */
268
- showUpload?: boolean;
269
- /**
270
- * Accepted extension formats on upload
271
- * Example: ".json,.geojson"
272
- */
273
- uploadFormats?: string;
274
- /**
275
- * Triggered to allow implement custom functions or to parse other formats than default
276
- * by filtering the extension. If this doesn't return features, the default function
277
- * will be used to extract them.
278
- */
279
- processUpload?(file: File): Array<Feature<Geometry>>;
280
- }
281
- /**
282
- * **_[interface]_** - Parameters to create the layers and connect to the GeoServer
283
- *
284
- * You can use all the parameters supported by OpenLayers
285
- *
286
- * Default values:
287
- * ```javascript
288
- * {
289
- * name: null,
290
- * geoserver: null,
291
- * label: null, // `name` if not provided
292
- * strategy: all,
293
- * geoserverVendor: null
294
- * }
295
- * ```
296
- */
297
- interface LayerOptions extends Omit<VectorLayerOptions<any>, 'source'> {
298
- /**
299
- * Layer name in the GeoServer
300
- */
301
- name: string;
302
- /**
303
- * Geoserver Object
304
- */
305
- geoserver: Geoserver;
306
- /**
307
- * Label to be displayed in the widget control
308
- */
309
- label?: string;
310
- /**
311
- * Available geoserver options
312
- */
313
- geoserverVendor?: WfsGeoserverVendor | WmsGeoserverVendor;
314
- /**
315
- * Strategy function for loading features.
316
- * Only for WFS
317
- * By default `all` strategy is used
318
- */
319
- strategy?: LoadingStrategy;
320
- /**
321
- * Triggered before inserting new features to the Geoserver.
322
- * Use this to insert custom properties, modify the feature, etc.
323
- */
324
- beforeTransactFeature?(feature: Feature<Geometry>, transaction: TransactionType): Feature<Geometry>;
325
- }
326
- declare class WfstEvent extends BaseEvent {
327
- data: IGeoserverDescribeFeatureType;
328
- layer: WfsLayer | WmsLayer;
329
- constructor(options: {
330
- type: WfstEventTypes;
331
- layer: WfsLayer | WmsLayer;
332
- data: IGeoserverDescribeFeatureType;
333
- });
334
- }
335
- type WfstEventTypes = 'describeFeatureType';
336
- export { Options, WfstEventTypes, WfstEvent, I18n, LayerOptions, Geoserver, WmsLayer, WfsLayer };
1
+ import Geometry from 'ol/geom/Geometry.js';
2
+ import Control from 'ol/control/Control.js';
3
+ import Draw from 'ol/interaction/Draw.js';
4
+ import Modify from 'ol/interaction/Modify.js';
5
+ import Select from 'ol/interaction/Select.js';
6
+ import Snap from 'ol/interaction/Snap.js';
7
+ import { EventsKey } from 'ol/events.js';
8
+ import Collection from 'ol/Collection.js';
9
+ import Feature from 'ol/Feature.js';
10
+ import Overlay from 'ol/Overlay.js';
11
+ import View from 'ol/View.js';
12
+ import Map from 'ol/Map.js';
13
+ import BaseEvent from 'ol/events/Event.js';
14
+ import { LoadingStrategy } from 'ol/source/Vector.js';
15
+ import { Options as VectorLayerOptions } from 'ol/layer/BaseVector.js';
16
+ import { CombinedOnSignature, EventTypes, OnSignature } from 'ol/Observable.js';
17
+ import { ObjectEvent } from 'ol/Object.js';
18
+ import { Types as ObjectEventTypes } from 'ol/ObjectEventType.js';
19
+ import WfsLayer from './WfsLayer';
20
+ import WmsLayer from './WmsLayer';
21
+ import LayersControl from './modules/LayersControl';
22
+ import Uploads from './modules/Uploads';
23
+ import { TransactionType } from './@enums';
24
+ import { I18n, IGeoserverDescribeFeatureType, WfsGeoserverVendor, WmsGeoserverVendor } from './@types';
25
+ import EditControlChangesEl from './modules/EditControlChanges';
26
+ import { EditFieldsModal } from './modules/EditFieldsModal';
27
+ import Geoserver from './Geoserver';
28
+ import './assets/scss/-ol-wfst.bootstrap5.scss';
29
+ import './assets/scss/ol-wfst.scss';
30
+ /**
31
+ * Tiny WFS-T client to insert (drawing/uploading), modify and delete
32
+ * features on GeoServers using OpenLayers. Layers with these types
33
+ * of geometries are supported: "GeometryCollection" (in this case, you can
34
+ * choose the geometry type of each element to draw), "Point", "MultiPoint",
35
+ * "LineString", "MultiLineString", "Polygon" and "MultiPolygon".
36
+ *
37
+ * @constructor
38
+ * @fires modifystart
39
+ * @fires modifyend
40
+ * @fires drawstart
41
+ * @fires drawend
42
+ * @fires load
43
+ * @fires describeFeatureType
44
+ * @extends {ol/control/Control~Control}
45
+ * @param options Wfst options, see [Wfst Options](#options) for more details.
46
+ */
47
+ export default class Wfst extends Control {
48
+ protected _options: Options;
49
+ protected _i18n: I18n;
50
+ protected _map: Map;
51
+ protected _view: View;
52
+ protected _viewport: HTMLElement;
53
+ protected _initialized: boolean;
54
+ protected _layersControl: LayersControl;
55
+ protected _overlay: Overlay;
56
+ protected _interactionWfsSelect: Select;
57
+ protected _interactionSelectModify: Select;
58
+ protected _collectionModify: Collection<any>;
59
+ protected _interactionModify: Modify;
60
+ protected _interactionSnap: Snap;
61
+ protected _interactionDraw: Draw;
62
+ protected _keyClickWms: EventsKey | EventsKey[];
63
+ protected _keyRemove: EventsKey;
64
+ protected _keySelect: EventsKey;
65
+ protected _controlApplyDiscardChanges: EditControlChangesEl;
66
+ protected _controlWidgetToolsDiv: HTMLElement;
67
+ protected _selectDraw: HTMLSelectElement;
68
+ protected _currentZoom: number;
69
+ protected _lastZoom: number;
70
+ protected _editFeature: Feature<Geometry>;
71
+ protected _editFeatureOriginal: Feature<Geometry>;
72
+ protected _uploads: Uploads;
73
+ protected _editFields: EditFieldsModal;
74
+ on: OnSignature<EventTypes, BaseEvent, EventsKey> & OnSignature<WfstEventTypes, WfstEvent, EventsKey> & OnSignature<ObjectEventTypes, ObjectEvent, EventsKey> & CombinedOnSignature<WfstEventTypes | ObjectEventTypes | EventTypes, EventsKey>;
75
+ once: OnSignature<EventTypes, BaseEvent, EventsKey> & OnSignature<WfstEventTypes, WfstEvent, EventsKey> & OnSignature<ObjectEventTypes, ObjectEvent, EventsKey> & CombinedOnSignature<WfstEventTypes | ObjectEventTypes | EventTypes, EventsKey>;
76
+ un: OnSignature<EventTypes, BaseEvent, void> & OnSignature<WfstEventTypes, WfstEvent, EventsKey> & OnSignature<ObjectEventTypes, ObjectEvent, void> & CombinedOnSignature<WfstEventTypes | ObjectEventTypes | EventTypes, void>;
77
+ constructor(options?: Options);
78
+ /**
79
+ * Get all the layers in the ol-wfst instance
80
+ * @public
81
+ */
82
+ getLayers(): Array<WfsLayer | WmsLayer>;
83
+ /**
84
+ * Get a layer
85
+ * @public
86
+ */
87
+ getLayerByName(layerName?: string): WfsLayer | WmsLayer;
88
+ /**
89
+ * Connect to the GeoServer and retrieve metadata about the service (GetCapabilities).
90
+ * Get each layer specs (DescribeFeatureType) and create the layers and map controls.
91
+ * @fires describeFeatureType
92
+ * @private
93
+ */
94
+ private _initMapAndLayers;
95
+ /**
96
+ * @private
97
+ */
98
+ private _init;
99
+ /**
100
+ * Create the edit layer to allow modify elements, add interactions,
101
+ * map controls and keyboard handlers.
102
+ *
103
+ * @param showControl
104
+ * @param active
105
+ * @private
106
+ */
107
+ private _createMapElements;
108
+ /**
109
+ * @private
110
+ */
111
+ private _addInteractions;
112
+ /**
113
+ * Layer to store temporary the elements to be edited
114
+ * @private
115
+ */
116
+ private _prepareEditLayer;
117
+ /**
118
+ * @private
119
+ */
120
+ private _addMapEvents;
121
+ /**
122
+ * Add map handlers
123
+ * @private
124
+ */
125
+ private _addInteractionHandlers;
126
+ /**
127
+ * Add the widget on the map to allow change the tools and select active layers
128
+ * @private
129
+ */
130
+ private _addMapControl;
131
+ /**
132
+ *
133
+ * @param feature
134
+ * @private
135
+ */
136
+ private _deselectEditFeature;
137
+ /**
138
+ *
139
+ * @param feature
140
+ * @param layerName
141
+ * @private
142
+ */
143
+ private _restoreFeatureToLayer;
144
+ /**
145
+ * @param feature
146
+ * @private
147
+ */
148
+ private _removeFeatureFromTmpLayer;
149
+ /**
150
+ * Trigger on deselecting a feature from in the Edit layer
151
+ *
152
+ * @private
153
+ */
154
+ private _onDeselectFeatureEvent;
155
+ /**
156
+ * Trigger on removing a feature from the Edit layer
157
+ *
158
+ * @private
159
+ */
160
+ private _onRemoveFeatureEvent;
161
+ /**
162
+ *
163
+ * @param feature
164
+ * @private
165
+ */
166
+ private _editModeOn;
167
+ /**
168
+ * @private
169
+ */
170
+ private _editModeOff;
171
+ /**
172
+ * Remove a feature from the edit Layer and from the Geoserver
173
+ *
174
+ * @param feature
175
+ * @private
176
+ */
177
+ private _deleteFeature;
178
+ /**
179
+ * Add a feature to the Edit Layer to allow editing, and creates an Overlay Helper to show options
180
+ *
181
+ * @param feature
182
+ * @param coordinate
183
+ * @param layerName
184
+ * @private
185
+ */
186
+ private _addFeatureToEditMode;
187
+ /**
188
+ * Activate/deactivate the draw mode
189
+ *
190
+ * @param layer
191
+ * @public
192
+ */
193
+ activateDrawMode(layer: WfsLayer | WmsLayer | false): void;
194
+ /**
195
+ * Activate/desactivate the edit mode
196
+ *
197
+ * @param bool
198
+ * @public
199
+ */
200
+ activateEditMode(bool?: boolean): void;
201
+ /**
202
+ * Remove the overlay helper atttached to a specify feature
203
+ * @param feature
204
+ * @private
205
+ */
206
+ private _removeOverlayHelper;
207
+ }
208
+ /**
209
+ * **_[interface]_** - Wfst Options specified when creating a Wfst instance
210
+ *
211
+ * Default values:
212
+ * ```javascript
213
+ * {
214
+ * layers: null,
215
+ * evtType: 'singleclick',
216
+ * active: true,
217
+ * showControl: true,
218
+ * language: 'en',
219
+ * i18n: {...}, // according to language selection
220
+ * uploadFormats: '.geojson,.json,.kml',
221
+ * processUpload: null,
222
+ * }
223
+ * ```
224
+ */
225
+ interface Options {
226
+ /**
227
+ * Layers to be loaded from the geoserver
228
+ */
229
+ layers?: Array<WfsLayer | WmsLayer>;
230
+ /**
231
+ * Init active
232
+ */
233
+ active?: boolean;
234
+ /**
235
+ * The click event to allow selection of Features to be edited
236
+ */
237
+ evtType?: 'singleclick' | 'dblclick';
238
+ /**
239
+ * Show/hide the control map
240
+ */
241
+ showControl?: boolean;
242
+ /**
243
+ * Modal configuration
244
+ */
245
+ modal?: {
246
+ animateClass?: string;
247
+ animateInClass?: string;
248
+ transition?: number;
249
+ backdropTransition?: number;
250
+ templates?: {
251
+ dialog?: string | HTMLElement;
252
+ headerClose?: string | HTMLElement;
253
+ };
254
+ };
255
+ /**
256
+ * Language to be used
257
+ */
258
+ language?: 'es' | 'en' | 'zh';
259
+ /**
260
+ * Custom translations
261
+ */
262
+ i18n?: I18n;
263
+ /**
264
+ * Show/hide the upload button
265
+ */
266
+ showUpload?: boolean;
267
+ /**
268
+ * Accepted extension formats on upload
269
+ * Example: ".json,.geojson"
270
+ */
271
+ uploadFormats?: string;
272
+ /**
273
+ * Triggered to allow implement custom functions or to parse other formats than default
274
+ * by filtering the extension. If this doesn't return features, the default function
275
+ * will be used to extract them.
276
+ */
277
+ processUpload?(file: File): Array<Feature<Geometry>>;
278
+ }
279
+ /**
280
+ * **_[interface]_** - Parameters to create the layers and connect to the GeoServer
281
+ *
282
+ * You can use all the parameters supported by OpenLayers
283
+ *
284
+ * Default values:
285
+ * ```javascript
286
+ * {
287
+ * name: null,
288
+ * geoserver: null,
289
+ * label: null, // `name` if not provided
290
+ * strategy: all,
291
+ * geoserverVendor: null
292
+ * }
293
+ * ```
294
+ */
295
+ interface LayerOptions extends Omit<VectorLayerOptions<any>, 'source'> {
296
+ /**
297
+ * Layer name in the GeoServer
298
+ */
299
+ name: string;
300
+ /**
301
+ * Geoserver Object
302
+ */
303
+ geoserver: Geoserver;
304
+ /**
305
+ * Label to be displayed in the widget control
306
+ */
307
+ label?: string;
308
+ /**
309
+ * Available geoserver options
310
+ */
311
+ geoserverVendor?: WfsGeoserverVendor | WmsGeoserverVendor;
312
+ /**
313
+ * Strategy function for loading features.
314
+ * Only for WFS
315
+ * By default `all` strategy is used
316
+ */
317
+ strategy?: LoadingStrategy;
318
+ /**
319
+ * Triggered before inserting new features to the Geoserver.
320
+ * Use this to insert custom properties, modify the feature, etc.
321
+ */
322
+ beforeTransactFeature?(feature: Feature<Geometry>, transaction: TransactionType): Feature<Geometry>;
323
+ }
324
+ declare class WfstEvent extends BaseEvent {
325
+ data: IGeoserverDescribeFeatureType;
326
+ layer: WfsLayer | WmsLayer;
327
+ constructor(options: {
328
+ type: WfstEventTypes;
329
+ layer: WfsLayer | WmsLayer;
330
+ data: IGeoserverDescribeFeatureType;
331
+ });
332
+ }
333
+ type WfstEventTypes = 'describeFeatureType';
334
+ export { Options, WfstEventTypes, WfstEvent, I18n, LayerOptions, Geoserver, WmsLayer, WfsLayer };
337
335
  //# sourceMappingURL=ol-wfst.d.ts.map