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.
- package/LICENSE.md +1 -1
- package/README.md +10 -11
- package/dist/@enums.d.ts +16 -16
- package/dist/@types.d.ts +200 -200
- package/dist/Geoserver.d.ts +274 -274
- package/dist/Geoserver.d.ts.map +1 -1
- package/dist/WfsLayer.d.ts +52 -52
- package/dist/WfsLayer.d.ts.map +1 -1
- package/dist/WmsLayer.d.ts +68 -61
- package/dist/WmsLayer.d.ts.map +1 -1
- package/dist/css/ol-wfst.bootstrap5.css +227 -38
- package/dist/css/ol-wfst.bootstrap5.min.css +1 -1
- package/dist/css/ol-wfst.css +24 -39
- package/dist/css/ol-wfst.min.css +1 -1
- package/dist/defaults.d.ts +3 -3
- package/dist/index-umd.d.ts +3 -0
- package/dist/index-umd.d.ts.map +1 -0
- package/dist/modules/EditControlChanges.d.ts +17 -17
- package/dist/modules/EditFieldsModal.d.ts +18 -18
- package/dist/modules/EditOverlay.d.ts +7 -7
- package/dist/modules/LayersControl.d.ts +37 -33
- package/dist/modules/LayersControl.d.ts.map +1 -1
- package/dist/modules/Uploads.d.ts +49 -49
- package/dist/modules/base/BaseLayer.d.ts +61 -61
- package/dist/modules/base/WfsSource.d.ts +48 -47
- package/dist/modules/base/WfsSource.d.ts.map +1 -1
- package/dist/modules/base/WmsSource.d.ts +46 -46
- package/dist/modules/editLayer.d.ts +3 -3
- package/dist/modules/errors.d.ts +11 -11
- package/dist/modules/helpers.d.ts +6 -6
- package/dist/modules/i18n/en.d.ts +2 -2
- package/dist/modules/i18n/es.d.ts +2 -2
- package/dist/modules/i18n/index.d.ts +14 -14
- package/dist/modules/i18n/zh.d.ts +2 -2
- package/dist/modules/loading.d.ts +2 -2
- package/dist/modules/state.d.ts +21 -21
- package/dist/modules/styleFunction.d.ts +12 -12
- package/dist/myPragma.d.ts +1 -1
- package/dist/ol-wfst.d.ts +334 -336
- package/dist/ol-wfst.d.ts.map +1 -1
- package/dist/ol-wfst.js +2656 -2599
- package/dist/ol-wfst.js.map +1 -1
- package/dist/ol-wfst.min.js +3 -3
- package/dist/ol-wfst.min.js.map +1 -1
- package/lib/@enums.d.ts +16 -16
- package/lib/@types.d.ts +200 -200
- package/lib/Geoserver.d.ts +274 -274
- package/lib/Geoserver.d.ts.map +1 -1
- package/lib/WfsLayer.d.ts +52 -52
- package/lib/WfsLayer.d.ts.map +1 -1
- package/lib/WmsLayer.d.ts +68 -61
- package/lib/WmsLayer.d.ts.map +1 -1
- package/lib/defaults.d.ts +3 -3
- package/lib/index-umd.d.ts +3 -0
- package/lib/index-umd.d.ts.map +1 -0
- package/lib/modules/EditControlChanges.d.ts +17 -17
- package/lib/modules/EditFieldsModal.d.ts +18 -18
- package/lib/modules/EditOverlay.d.ts +7 -7
- package/lib/modules/LayersControl.d.ts +37 -33
- package/lib/modules/LayersControl.d.ts.map +1 -1
- package/lib/modules/Uploads.d.ts +49 -49
- package/lib/modules/base/BaseLayer.d.ts +61 -61
- package/lib/modules/base/WfsSource.d.ts +48 -47
- package/lib/modules/base/WfsSource.d.ts.map +1 -1
- package/lib/modules/base/WmsSource.d.ts +46 -46
- package/lib/modules/editLayer.d.ts +3 -3
- package/lib/modules/errors.d.ts +11 -11
- package/lib/modules/helpers.d.ts +6 -6
- package/lib/modules/i18n/en.d.ts +2 -2
- package/lib/modules/i18n/es.d.ts +2 -2
- package/lib/modules/i18n/index.d.ts +14 -14
- package/lib/modules/i18n/zh.d.ts +2 -2
- package/lib/modules/loading.d.ts +2 -2
- package/lib/modules/state.d.ts +21 -21
- package/lib/modules/styleFunction.d.ts +12 -12
- package/lib/myPragma.d.ts +1 -1
- package/lib/ol-wfst.d.ts +334 -336
- package/lib/ol-wfst.d.ts.map +1 -1
- package/lib/ol-wfst.js +2651 -2593
- package/lib/ol-wfst.js.map +1 -1
- package/lib/style/css/ol-gisify.css +24 -39
- package/lib/style/css/ol-wfst.bootstrap5.css +227 -38
- package/lib/style/scss/-ol-wfst.bootstrap5.scss +3 -0
- package/lib/style/scss/ol-wfst.scss +81 -58
- package/package.json +15 -16
- package/CHANGELOG.md +0 -123
- package/dist/tsconfig.tsbuildinfo +0 -1
- 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 {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* @
|
|
40
|
-
* @fires
|
|
41
|
-
* @fires
|
|
42
|
-
* @fires
|
|
43
|
-
* @fires
|
|
44
|
-
* @
|
|
45
|
-
* @
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
protected
|
|
51
|
-
protected
|
|
52
|
-
protected
|
|
53
|
-
protected
|
|
54
|
-
protected
|
|
55
|
-
protected
|
|
56
|
-
protected
|
|
57
|
-
protected
|
|
58
|
-
protected
|
|
59
|
-
protected
|
|
60
|
-
protected
|
|
61
|
-
protected
|
|
62
|
-
protected
|
|
63
|
-
protected
|
|
64
|
-
protected
|
|
65
|
-
protected
|
|
66
|
-
protected
|
|
67
|
-
protected
|
|
68
|
-
protected
|
|
69
|
-
protected
|
|
70
|
-
protected
|
|
71
|
-
protected
|
|
72
|
-
protected
|
|
73
|
-
protected
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* @
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
*
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
*
|
|
141
|
-
* @
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
*
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
*
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
*
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
* @param
|
|
184
|
-
* @
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
*
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
*
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
*
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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
|