ol-wfst 4.3.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +240 -173
- package/dist/@types.d.ts +25 -9
- package/dist/@types.d.ts.map +1 -1
- package/dist/Geoserver.d.ts +6 -4
- package/dist/Geoserver.d.ts.map +1 -1
- package/dist/WfsLayer.d.ts +10 -6
- package/dist/WfsLayer.d.ts.map +1 -1
- package/dist/WmsLayer.d.ts +34 -4
- package/dist/WmsLayer.d.ts.map +1 -1
- package/dist/css/ol-wfst.bootstrap5.css +102 -90
- package/dist/css/ol-wfst.bootstrap5.min.css +1 -1
- package/dist/css/ol-wfst.css +432 -54
- package/dist/css/ol-wfst.min.css +1 -1
- package/dist/defaults.d.ts.map +1 -1
- package/dist/jsx-runtime.d.ts +4 -0
- package/dist/jsx-runtime.d.ts.map +1 -0
- package/dist/modules/EditControlChanges.d.ts +2 -1
- package/dist/modules/EditControlChanges.d.ts.map +1 -1
- package/dist/modules/EditFieldsModal.d.ts +10 -6
- package/dist/modules/EditFieldsModal.d.ts.map +1 -1
- package/dist/modules/EditOverlay.d.ts +1 -1
- package/dist/modules/EditOverlay.d.ts.map +1 -1
- package/dist/modules/ExtendLineOverlay.d.ts +12 -0
- package/dist/modules/ExtendLineOverlay.d.ts.map +1 -0
- package/dist/modules/LayersControl.d.ts +5 -0
- package/dist/modules/LayersControl.d.ts.map +1 -1
- package/dist/modules/QueryOverlay.d.ts +21 -0
- package/dist/modules/QueryOverlay.d.ts.map +1 -0
- package/dist/modules/base/BaseLayer.d.ts +7 -3
- package/dist/modules/base/BaseLayer.d.ts.map +1 -1
- package/dist/modules/base/WfsSource.d.ts.map +1 -1
- package/dist/modules/editLayer.d.ts.map +1 -1
- package/dist/modules/errors.d.ts +1 -1
- package/dist/modules/errors.d.ts.map +1 -1
- package/dist/modules/helpers.d.ts.map +1 -1
- package/dist/modules/i18n/en.d.ts.map +1 -1
- package/dist/modules/i18n/es.d.ts.map +1 -1
- package/dist/modules/i18n/index.d.ts.map +1 -1
- package/dist/modules/i18n/zh.d.ts.map +1 -1
- package/dist/modules/loading.d.ts.map +1 -1
- package/dist/modules/state.d.ts +9 -1
- package/dist/modules/state.d.ts.map +1 -1
- package/dist/modules/styleFunction.d.ts +36 -3
- package/dist/modules/styleFunction.d.ts.map +1 -1
- package/dist/ol-wfst.d.ts +243 -6
- package/dist/ol-wfst.d.ts.map +1 -1
- package/dist/ol-wfst.js +1855 -386
- 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/@types.d.ts +25 -9
- package/lib/@types.d.ts.map +1 -1
- package/lib/Geoserver.d.ts +6 -4
- package/lib/Geoserver.d.ts.map +1 -1
- package/lib/WfsLayer.d.ts +10 -6
- package/lib/WfsLayer.d.ts.map +1 -1
- package/lib/WmsLayer.d.ts +34 -4
- package/lib/WmsLayer.d.ts.map +1 -1
- package/lib/defaults.d.ts.map +1 -1
- package/lib/jsx-runtime.d.ts +4 -0
- package/lib/jsx-runtime.d.ts.map +1 -0
- package/lib/modules/EditControlChanges.d.ts +2 -1
- package/lib/modules/EditControlChanges.d.ts.map +1 -1
- package/lib/modules/EditFieldsModal.d.ts +10 -6
- package/lib/modules/EditFieldsModal.d.ts.map +1 -1
- package/lib/modules/EditOverlay.d.ts +1 -1
- package/lib/modules/EditOverlay.d.ts.map +1 -1
- package/lib/modules/ExtendLineOverlay.d.ts +12 -0
- package/lib/modules/ExtendLineOverlay.d.ts.map +1 -0
- package/lib/modules/LayersControl.d.ts +5 -0
- package/lib/modules/LayersControl.d.ts.map +1 -1
- package/lib/modules/QueryOverlay.d.ts +21 -0
- package/lib/modules/QueryOverlay.d.ts.map +1 -0
- package/lib/modules/base/BaseLayer.d.ts +7 -3
- package/lib/modules/base/BaseLayer.d.ts.map +1 -1
- package/lib/modules/base/WfsSource.d.ts.map +1 -1
- package/lib/modules/editLayer.d.ts.map +1 -1
- package/lib/modules/errors.d.ts +1 -1
- package/lib/modules/errors.d.ts.map +1 -1
- package/lib/modules/helpers.d.ts.map +1 -1
- package/lib/modules/i18n/en.d.ts.map +1 -1
- package/lib/modules/i18n/es.d.ts.map +1 -1
- package/lib/modules/i18n/index.d.ts.map +1 -1
- package/lib/modules/i18n/zh.d.ts.map +1 -1
- package/lib/modules/loading.d.ts.map +1 -1
- package/lib/modules/state.d.ts +9 -1
- package/lib/modules/state.d.ts.map +1 -1
- package/lib/modules/styleFunction.d.ts +36 -3
- package/lib/modules/styleFunction.d.ts.map +1 -1
- package/lib/ol-wfst.d.ts +243 -6
- package/lib/ol-wfst.d.ts.map +1 -1
- package/lib/ol-wfst.js +1857 -384
- package/lib/ol-wfst.js.map +1 -1
- package/lib/style/css/ol-gisify.css +432 -54
- package/lib/style/css/ol-wfst.bootstrap5.css +102 -90
- package/lib/style/scss/_variables.scss +2 -1
- package/lib/style/scss/ol-wfst.scss +441 -42
- package/package.json +3 -3
- package/dist/myPragma.d.ts +0 -2
- package/dist/myPragma.d.ts.map +0 -1
- package/lib/myPragma.d.ts +0 -2
- package/lib/myPragma.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
|
|
15
15
|
Tiny WFS-T client to insert (drawing/uploading), modify and delete features on GeoServers using [OpenLayers](https://openlayers.org/). Layers with these types of geometries are supported: _GeometryCollection_ (in this case, you can choose the geometry type of each element to draw), _Point_, _MultiPoint_, _LineString_, _MultiLineString_, _Polygon_ and _MultiPolygon_.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Supports multi-feature editing in a single transaction: select several features at once and modify both their geometry or their attributes together. The edit form inputs can be customized via hooks (`beforeShowFieldsModal`) to replace the default ones with your own — create selects, validation, prefilled values, etc.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
Tested with OpenLayers version 5, 6, 7, 8, 9 and 10.
|
|
20
|
+
|
|
21
|
+
<img src="screenshots/example-1.jpg" alt="Selecting" style="width:50%; float:left;">
|
|
22
|
+
<img src="screenshots/example-2.jpg" alt="Editing fields" style="width:50%; float:left;">
|
|
21
23
|
|
|
22
24
|
## Usage
|
|
23
25
|
|
|
@@ -109,6 +111,44 @@ const wmsLayer = new WmsLayer({
|
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
return feature;
|
|
114
|
+
},
|
|
115
|
+
beforeShowFieldsModal: function (field, value, formElement) {
|
|
116
|
+
// Transform default input to a custom select
|
|
117
|
+
if (field.name === 'source') {
|
|
118
|
+
const createSelect = (name, options) => {
|
|
119
|
+
const createOption = (opt) => {
|
|
120
|
+
const option = document.createElement('option');
|
|
121
|
+
option.value = opt.value;
|
|
122
|
+
option.label = opt.label;
|
|
123
|
+
|
|
124
|
+
if (opt.value === value) {
|
|
125
|
+
option.selected = true;
|
|
126
|
+
}
|
|
127
|
+
return option;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const select = document.createElement('select');
|
|
131
|
+
select.className = 'ol-wfst--input-field-input';
|
|
132
|
+
select.name = name;
|
|
133
|
+
|
|
134
|
+
options.forEach((opt) => {
|
|
135
|
+
select.appendChild(createOption(opt));
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
return select;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
return createSelect('source', [
|
|
142
|
+
{ label: 'Select source', value: '' },
|
|
143
|
+
{ label: 'Option 1', value: 'option1' },
|
|
144
|
+
{ label: 'Option 2', value: 'option2' }
|
|
145
|
+
]);
|
|
146
|
+
} else if (field.name === 'registroid') {
|
|
147
|
+
// add default class to the HTMLElement in a particular field
|
|
148
|
+
formElement.classList.add('custom-field-class');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return formElement;
|
|
112
152
|
}
|
|
113
153
|
});
|
|
114
154
|
|
|
@@ -203,9 +243,9 @@ wfsLayer.getSource().on([...])
|
|
|
203
243
|
|
|
204
244
|
### Some considerations
|
|
205
245
|
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
246
|
+
- If the features/vertex appear to be slightly offset after adding them, check the _Number of Decimals_ in your Workplace, you may have to increment that to have a more accurete preview.
|
|
247
|
+
- You can configure a _Basic Authentication_ or an _HTTP Header Proxy Authentication_ with this client, but in some cases is recommended setting that on an reverse proxy on the backend.
|
|
248
|
+
- If you don't use a reverse proxy, remember configure [cors](https://docs.geoserver.org/latest/en/user/production/container.html#enable-cors)
|
|
209
249
|
|
|
210
250
|
## Changelog
|
|
211
251
|
|
|
@@ -220,14 +260,14 @@ See [CHANGELOG](./CHANGELOG.md) for details of changes in each release.
|
|
|
220
260
|
Load `ol-wfst.js` after OpenLayers. The available classes are `Wfst`, `Wfst.Geoserver`, `Wfst.WfsLayer` and `Wfst.WmsLayer`.
|
|
221
261
|
|
|
222
262
|
```HTML
|
|
223
|
-
<script src="https://unpkg.com/ol-wfst@
|
|
263
|
+
<script src="https://unpkg.com/ol-wfst@5.0.0"></script>
|
|
224
264
|
```
|
|
225
265
|
|
|
226
266
|
#### CSS
|
|
227
267
|
|
|
228
268
|
```HTML
|
|
229
|
-
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@
|
|
230
|
-
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@
|
|
269
|
+
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@5.0.0/dist/css/ol-wfst.min.css" />
|
|
270
|
+
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@5.0.0/dist/css/ol-wfst.bootstrap5.min.css" />
|
|
231
271
|
```
|
|
232
272
|
|
|
233
273
|
### Parcel, Webpack, etc.
|
|
@@ -266,107 +306,112 @@ TypeScript types are shipped with the project in the dist directory and should b
|
|
|
266
306
|
|
|
267
307
|
#### Table of Contents
|
|
268
308
|
|
|
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
|
-
-
|
|
336
|
-
-
|
|
337
|
-
-
|
|
338
|
-
-
|
|
339
|
-
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
-
|
|
343
|
-
|
|
344
|
-
-
|
|
345
|
-
-
|
|
346
|
-
-
|
|
347
|
-
-
|
|
348
|
-
-
|
|
349
|
-
-
|
|
350
|
-
|
|
351
|
-
-
|
|
352
|
-
-
|
|
353
|
-
-
|
|
354
|
-
-
|
|
355
|
-
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
-
|
|
359
|
-
|
|
360
|
-
-
|
|
361
|
-
-
|
|
362
|
-
-
|
|
363
|
-
-
|
|
364
|
-
-
|
|
365
|
-
-
|
|
366
|
-
-
|
|
367
|
-
-
|
|
368
|
-
-
|
|
369
|
-
|
|
309
|
+
- [BaseGeoserverVendor](#basegeoservervendor)
|
|
310
|
+
- [key](#key)
|
|
311
|
+
- [cql\_filter](#cql_filter)
|
|
312
|
+
- [sortBy](#sortby)
|
|
313
|
+
- [featureid](#featureid)
|
|
314
|
+
- [filter](#filter)
|
|
315
|
+
- [format\_options](#format_options)
|
|
316
|
+
- [maxFeatures](#maxfeatures)
|
|
317
|
+
- [startIndex](#startindex)
|
|
318
|
+
- [propertyname](#propertyname)
|
|
319
|
+
- [Wfst](#wfst)
|
|
320
|
+
- [Parameters](#parameters)
|
|
321
|
+
- [getLayers](#getlayers)
|
|
322
|
+
- [getLayerByName](#getlayerbyname)
|
|
323
|
+
- [Parameters](#parameters-1)
|
|
324
|
+
- [activateQueryMode](#activatequerymode)
|
|
325
|
+
- [Parameters](#parameters-2)
|
|
326
|
+
- [activateDrawMode](#activatedrawmode)
|
|
327
|
+
- [Parameters](#parameters-3)
|
|
328
|
+
- [activateEditMode](#activateeditmode)
|
|
329
|
+
- [Parameters](#parameters-4)
|
|
330
|
+
- [Geoserver](#geoserver)
|
|
331
|
+
- [Parameters](#parameters-5)
|
|
332
|
+
- [getCapabilities](#getcapabilities)
|
|
333
|
+
- [getParsedCapabilities](#getparsedcapabilities)
|
|
334
|
+
- [setUrl](#seturl)
|
|
335
|
+
- [Parameters](#parameters-6)
|
|
336
|
+
- [getUrl](#geturl)
|
|
337
|
+
- [setHeaders](#setheaders)
|
|
338
|
+
- [Parameters](#parameters-7)
|
|
339
|
+
- [getHeaders](#getheaders)
|
|
340
|
+
- [setCredentials](#setcredentials)
|
|
341
|
+
- [Parameters](#parameters-8)
|
|
342
|
+
- [getCredentials](#getcredentials)
|
|
343
|
+
- [setAdvanced](#setadvanced)
|
|
344
|
+
- [Parameters](#parameters-9)
|
|
345
|
+
- [getAdvanced](#getadvanced)
|
|
346
|
+
- [hasTransaction](#hastransaction)
|
|
347
|
+
- [hasLockFeature](#haslockfeature)
|
|
348
|
+
- [getUseLockFeature](#getuselockfeature)
|
|
349
|
+
- [setUseLockFeature](#setuselockfeature)
|
|
350
|
+
- [Parameters](#parameters-10)
|
|
351
|
+
- [isLoaded](#isloaded)
|
|
352
|
+
- [getState](#getstate)
|
|
353
|
+
- [getAndUpdateCapabilities](#getandupdatecapabilities)
|
|
354
|
+
- [\_removeFeatures](#_removefeatures)
|
|
355
|
+
- [Parameters](#parameters-11)
|
|
356
|
+
- [lockFeature](#lockfeature)
|
|
357
|
+
- [Parameters](#parameters-12)
|
|
358
|
+
- [WfsLayer](#wfslayer)
|
|
359
|
+
- [Parameters](#parameters-13)
|
|
360
|
+
- [refresh](#refresh)
|
|
361
|
+
- [setCustomParam](#setcustomparam)
|
|
362
|
+
- [Parameters](#parameters-14)
|
|
363
|
+
- [WmsLayer](#wmslayer)
|
|
364
|
+
- [Parameters](#parameters-15)
|
|
365
|
+
- [refresh](#refresh-1)
|
|
366
|
+
- [setCustomParam](#setcustomparam-1)
|
|
367
|
+
- [Parameters](#parameters-16)
|
|
368
|
+
- [Options](#options)
|
|
369
|
+
- [processUpload](#processupload)
|
|
370
|
+
- [Parameters](#parameters-17)
|
|
371
|
+
- [layers](#layers)
|
|
372
|
+
- [active](#active)
|
|
373
|
+
- [evtType](#evttype)
|
|
374
|
+
- [showControl](#showcontrol)
|
|
375
|
+
- [fullscreen](#fullscreen)
|
|
376
|
+
- [modal](#modal)
|
|
377
|
+
- [language](#language)
|
|
378
|
+
- [i18n](#i18n)
|
|
379
|
+
- [showUpload](#showupload)
|
|
380
|
+
- [uploadFormats](#uploadformats)
|
|
381
|
+
- [LayerOptions](#layeroptions)
|
|
382
|
+
- [beforeTransactFeature](#beforetransactfeature)
|
|
383
|
+
- [Parameters](#parameters-18)
|
|
384
|
+
- [name](#name)
|
|
385
|
+
- [geoserver](#geoserver-1)
|
|
386
|
+
- [label](#label)
|
|
387
|
+
- [geoserverVendor](#geoservervendor)
|
|
388
|
+
- [strategy](#strategy)
|
|
389
|
+
- [beforeShowFieldsModal](#beforeshowfieldsmodal)
|
|
390
|
+
- [GeoserverOptions](#geoserveroptions)
|
|
391
|
+
- [url](#url)
|
|
392
|
+
- [advanced](#advanced)
|
|
393
|
+
- [headers](#headers)
|
|
394
|
+
- [credentials](#credentials)
|
|
395
|
+
- [useLockFeature](#uselockfeature)
|
|
396
|
+
- [GeoServerAdvanced](#geoserveradvanced)
|
|
397
|
+
- [WfsGeoserverVendor](#wfsgeoservervendor)
|
|
398
|
+
- [strict](#strict)
|
|
399
|
+
- [WmsGeoserverVendor](#wmsgeoservervendor)
|
|
400
|
+
- [buffer](#buffer)
|
|
401
|
+
- [env](#env)
|
|
402
|
+
- [clip](#clip)
|
|
403
|
+
- [styles](#styles)
|
|
404
|
+
- [transparent](#transparent)
|
|
405
|
+
- [bgcolor](#bgcolor)
|
|
406
|
+
- [time](#time)
|
|
407
|
+
- [sld](#sld)
|
|
408
|
+
- [sld\_body](#sld_body)
|
|
409
|
+
- [IProperty](#iproperty)
|
|
410
|
+
- [IGeoserverDescribeFeatureType](#igeoserverdescribefeaturetype)
|
|
411
|
+
- [\_parsed](#_parsed)
|
|
412
|
+
- [I18n](#i18n-1)
|
|
413
|
+
- [labels](#labels)
|
|
414
|
+
- [errors](#errors)
|
|
370
415
|
|
|
371
416
|
### BaseGeoserverVendor
|
|
372
417
|
|
|
@@ -374,7 +419,7 @@ TypeScript types are shipped with the project in the dist directory and should b
|
|
|
374
419
|
|
|
375
420
|
Add any other param
|
|
376
421
|
|
|
377
|
-
####
|
|
422
|
+
#### cql\_filter
|
|
378
423
|
|
|
379
424
|
<https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#cql-filter>
|
|
380
425
|
|
|
@@ -398,7 +443,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
398
443
|
|
|
399
444
|
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
400
445
|
|
|
401
|
-
####
|
|
446
|
+
#### format\_options
|
|
402
447
|
|
|
403
448
|
WMS: <https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#format-options>
|
|
404
449
|
WFS: <https://docs.geoserver.org/latest/en/user/services/wfs/vendor.html#format-options>
|
|
@@ -435,7 +480,7 @@ choose the geometry type of each element to draw), "Point", "MultiPoint",
|
|
|
435
480
|
|
|
436
481
|
#### Parameters
|
|
437
482
|
|
|
438
|
-
-
|
|
483
|
+
- `options` **[Options](#options)?** Wfst options, see [Wfst Options](#options) for more details.
|
|
439
484
|
|
|
440
485
|
#### getLayers
|
|
441
486
|
|
|
@@ -449,17 +494,29 @@ Get a layer
|
|
|
449
494
|
|
|
450
495
|
##### Parameters
|
|
451
496
|
|
|
452
|
-
-
|
|
497
|
+
- `layerName` (optional, default `''`)
|
|
453
498
|
|
|
454
499
|
Returns **([WfsLayer](#wfslayer) | [WmsLayer](#wmslayer))** 
|
|
455
500
|
|
|
501
|
+
#### activateQueryMode
|
|
502
|
+
|
|
503
|
+
Activate/deactivate the query mode: while it is active, clicking a
|
|
504
|
+
feature of the active layer shows its info in a popup instead of
|
|
505
|
+
selecting it for editing.
|
|
506
|
+
|
|
507
|
+
##### Parameters
|
|
508
|
+
|
|
509
|
+
- `bool` (optional, default `true`)
|
|
510
|
+
|
|
511
|
+
Returns **void** 
|
|
512
|
+
|
|
456
513
|
#### activateDrawMode
|
|
457
514
|
|
|
458
515
|
Activate/deactivate the draw mode
|
|
459
516
|
|
|
460
517
|
##### Parameters
|
|
461
518
|
|
|
462
|
-
-
|
|
519
|
+
- `layer` **([WfsLayer](#wfslayer) | [WmsLayer](#wmslayer) | `false`)** 
|
|
463
520
|
|
|
464
521
|
Returns **void** 
|
|
465
522
|
|
|
@@ -469,7 +526,7 @@ Activate/desactivate the edit mode
|
|
|
469
526
|
|
|
470
527
|
##### Parameters
|
|
471
528
|
|
|
472
|
-
-
|
|
529
|
+
- `bool` (optional, default `true`)
|
|
473
530
|
|
|
474
531
|
Returns **void** 
|
|
475
532
|
|
|
@@ -479,7 +536,7 @@ Returns **void** 
|
|
|
479
536
|
|
|
480
537
|
#### Parameters
|
|
481
538
|
|
|
482
|
-
-
|
|
539
|
+
- `options` **[GeoserverOptions](#geoserveroptions)** 
|
|
483
540
|
|
|
484
541
|
#### getCapabilities
|
|
485
542
|
|
|
@@ -495,8 +552,8 @@ Returns **any** 
|
|
|
495
552
|
|
|
496
553
|
##### Parameters
|
|
497
554
|
|
|
498
|
-
-
|
|
499
|
-
-
|
|
555
|
+
- `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
556
|
+
- `opt_silent` (optional, default `false`)
|
|
500
557
|
|
|
501
558
|
Returns **void** 
|
|
502
559
|
|
|
@@ -508,8 +565,8 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
508
565
|
|
|
509
566
|
##### Parameters
|
|
510
567
|
|
|
511
|
-
-
|
|
512
|
-
-
|
|
568
|
+
- `headers` **HeadersInit** (optional, default `{}`)
|
|
569
|
+
- `opt_silent` (optional, default `false`)
|
|
513
570
|
|
|
514
571
|
Returns **void** 
|
|
515
572
|
|
|
@@ -521,8 +578,8 @@ Returns **HeadersInit** 
|
|
|
521
578
|
|
|
522
579
|
##### Parameters
|
|
523
580
|
|
|
524
|
-
-
|
|
525
|
-
-
|
|
581
|
+
- `credentials` **RequestCredentials** (optional, default `null`)
|
|
582
|
+
- `opt_silent` (optional, default `false`)
|
|
526
583
|
|
|
527
584
|
Returns **void** 
|
|
528
585
|
|
|
@@ -534,8 +591,8 @@ Returns **RequestCredentials** 
|
|
|
534
591
|
|
|
535
592
|
##### Parameters
|
|
536
593
|
|
|
537
|
-
-
|
|
538
|
-
-
|
|
594
|
+
- `advanced` **[GeoServerAdvanced](#geoserveradvanced)** (optional, default `{}`)
|
|
595
|
+
- `opt_silent` (optional, default `false`)
|
|
539
596
|
|
|
540
597
|
Returns **void** 
|
|
541
598
|
|
|
@@ -559,8 +616,8 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
559
616
|
|
|
560
617
|
##### Parameters
|
|
561
618
|
|
|
562
|
-
-
|
|
563
|
-
-
|
|
619
|
+
- `useLockFeature` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
620
|
+
- `opt_silent` (optional, default `false`)
|
|
564
621
|
|
|
565
622
|
Returns **void** 
|
|
566
623
|
|
|
@@ -581,18 +638,19 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
581
638
|
|
|
582
639
|
##### Parameters
|
|
583
640
|
|
|
584
|
-
-
|
|
641
|
+
- `features` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<Feature\<Geometry>>** 
|
|
585
642
|
|
|
586
643
|
#### lockFeature
|
|
587
644
|
|
|
588
|
-
Lock
|
|
589
|
-
to avoid changes from multiples
|
|
645
|
+
Lock one or several features in the geoserver. Useful before editing,
|
|
646
|
+
to avoid changes from multiples users. Locking several features at once
|
|
647
|
+
with a single request keeps the lock covered by one LockId
|
|
590
648
|
|
|
591
649
|
##### Parameters
|
|
592
650
|
|
|
593
|
-
-
|
|
594
|
-
-
|
|
595
|
-
-
|
|
651
|
+
- `featureIds` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number))>)** 
|
|
652
|
+
- `layerName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
653
|
+
- `retry` (optional, default `0`)
|
|
596
654
|
|
|
597
655
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** 
|
|
598
656
|
|
|
@@ -605,7 +663,7 @@ Layer to retrieve WFS features from geoservers
|
|
|
605
663
|
|
|
606
664
|
#### Parameters
|
|
607
665
|
|
|
608
|
-
-
|
|
666
|
+
- `options` **[LayerOptions](#layeroptions)** 
|
|
609
667
|
|
|
610
668
|
#### refresh
|
|
611
669
|
|
|
@@ -615,13 +673,13 @@ Use this to update Geoserver Wms Vendors (<https://docs.geoserver.org/latest/en/
|
|
|
615
673
|
and other arguements (<https://docs.geoserver.org/stable/en/user/services/wms/reference.html#getmap>)
|
|
616
674
|
in all the getMap requests.
|
|
617
675
|
|
|
618
|
-
Example: you can use this to change the style of the WMS, add a custom sld, set a
|
|
676
|
+
Example: you can use this to change the style of the WMS, add a custom sld, set a cql\_filter, etc.
|
|
619
677
|
|
|
620
678
|
##### Parameters
|
|
621
679
|
|
|
622
|
-
-
|
|
623
|
-
-
|
|
624
|
-
-
|
|
680
|
+
- `paramName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
681
|
+
- `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Use `undefined` or `null` to remove the param (optional, default `null`)
|
|
682
|
+
- `refresh` (optional, default `true`)
|
|
625
683
|
|
|
626
684
|
Returns **URLSearchParams** 
|
|
627
685
|
|
|
@@ -634,7 +692,7 @@ Layer to retrieve WMS information from geoservers
|
|
|
634
692
|
|
|
635
693
|
#### Parameters
|
|
636
694
|
|
|
637
|
-
-
|
|
695
|
+
- `options` **[LayerOptions](#layeroptions)** 
|
|
638
696
|
|
|
639
697
|
#### refresh
|
|
640
698
|
|
|
@@ -644,19 +702,19 @@ Use this to update Geoserver Wfs Vendors (<https://docs.geoserver.org/latest/en/
|
|
|
644
702
|
and other arguements (<https://docs.geoserver.org/stable/en/user/services/wfs/reference.html>)
|
|
645
703
|
in all the getFeature requests.
|
|
646
704
|
|
|
647
|
-
Example: you can use this to set a
|
|
705
|
+
Example: you can use this to set a cql\_filter, limit the numbers of features, etc.
|
|
648
706
|
|
|
649
707
|
##### Parameters
|
|
650
708
|
|
|
651
|
-
-
|
|
652
|
-
-
|
|
653
|
-
-
|
|
709
|
+
- `paramName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
710
|
+
- `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** (optional, default `null`)
|
|
711
|
+
- `refresh` (optional, default `true`)
|
|
654
712
|
|
|
655
713
|
Returns **URLSearchParams** 
|
|
656
714
|
|
|
657
715
|
### Options
|
|
658
716
|
|
|
659
|
-
|
|
717
|
+
_**\[interface]**_ - Wfst Options specified when creating a Wfst instance
|
|
660
718
|
|
|
661
719
|
Default values:
|
|
662
720
|
|
|
@@ -666,6 +724,7 @@ Default values:
|
|
|
666
724
|
evtType: 'singleclick',
|
|
667
725
|
active: true,
|
|
668
726
|
showControl: true,
|
|
727
|
+
fullscreen: true,
|
|
669
728
|
language: 'en',
|
|
670
729
|
i18n: {...}, // according to language selection
|
|
671
730
|
uploadFormats: '.geojson,.json,.kml',
|
|
@@ -681,7 +740,7 @@ will be used to extract them.
|
|
|
681
740
|
|
|
682
741
|
##### Parameters
|
|
683
742
|
|
|
684
|
-
-
|
|
743
|
+
- `file` **File** 
|
|
685
744
|
|
|
686
745
|
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<Feature\<Geometry>>** 
|
|
687
746
|
|
|
@@ -709,6 +768,12 @@ Show/hide the control map
|
|
|
709
768
|
|
|
710
769
|
Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
|
|
711
770
|
|
|
771
|
+
#### fullscreen
|
|
772
|
+
|
|
773
|
+
Show/hide the fullscreen button on the map
|
|
774
|
+
|
|
775
|
+
Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
|
|
776
|
+
|
|
712
777
|
#### modal
|
|
713
778
|
|
|
714
779
|
Modal configuration
|
|
@@ -742,9 +807,9 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
742
807
|
|
|
743
808
|
### LayerOptions
|
|
744
809
|
|
|
745
|
-
**Extends Omit\<[VectorLayerOptions](https://openlayers.org/en/latest/apidoc/module-ol_layer_Vector-VectorLayer.html)\<any>, 'source'>**
|
|
810
|
+
**Extends Omit\<[VectorLayerOptions](https://openlayers.org/en/latest/apidoc/module-ol_layer_Vector-VectorLayer.html)\<any, any>, 'source'>**
|
|
746
811
|
|
|
747
|
-
|
|
812
|
+
_**\[interface]**_ - Parameters to create the layers and connect to the GeoServer
|
|
748
813
|
|
|
749
814
|
You can use all the parameters supported by OpenLayers
|
|
750
815
|
|
|
@@ -767,8 +832,8 @@ Use this to insert custom properties, modify the feature, etc.
|
|
|
767
832
|
|
|
768
833
|
##### Parameters
|
|
769
834
|
|
|
770
|
-
-
|
|
771
|
-
-
|
|
835
|
+
- `feature` **Feature\<Geometry>** 
|
|
836
|
+
- `transaction` **TransactionType** 
|
|
772
837
|
|
|
773
838
|
Returns **Feature\<Geometry>** 
|
|
774
839
|
|
|
@@ -804,9 +869,16 @@ By default `all` strategy is used
|
|
|
804
869
|
|
|
805
870
|
Type: LoadingStrategy
|
|
806
871
|
|
|
872
|
+
#### beforeShowFieldsModal
|
|
873
|
+
|
|
874
|
+
Hook to customize the html elements showed in the fields modal
|
|
875
|
+
Return `null` to hide the field from the modal
|
|
876
|
+
|
|
877
|
+
Type: function (field: [IProperty](#iproperty), value: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), formElement: [HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)): ([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | null)
|
|
878
|
+
|
|
807
879
|
### GeoserverOptions
|
|
808
880
|
|
|
809
|
-
|
|
881
|
+
_**\[interface]**_
|
|
810
882
|
|
|
811
883
|
#### url
|
|
812
884
|
|
|
@@ -846,9 +918,9 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob
|
|
|
846
918
|
|
|
847
919
|
### GeoServerAdvanced
|
|
848
920
|
|
|
849
|
-
|
|
921
|
+
_**\[interface]**_
|
|
850
922
|
|
|
851
|
-
-
|
|
923
|
+
- Default values:
|
|
852
924
|
|
|
853
925
|
```javascript
|
|
854
926
|
{
|
|
@@ -870,7 +942,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob
|
|
|
870
942
|
|
|
871
943
|
**Extends BaseGeoserverVendor**
|
|
872
944
|
|
|
873
|
-
|
|
945
|
+
_**\[interface]**_ - WFS geoserver options
|
|
874
946
|
<https://docs.geoserver.org/latest/en/user/services/wfs/vendor.html>
|
|
875
947
|
|
|
876
948
|
#### strict
|
|
@@ -883,7 +955,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob
|
|
|
883
955
|
|
|
884
956
|
**Extends BaseGeoserverVendor**
|
|
885
957
|
|
|
886
|
-
|
|
958
|
+
_**\[interface]**_ - WMS geoserver options
|
|
887
959
|
<https://docs.geoserver.org/latest/en/user/services/wms/vendor.html>
|
|
888
960
|
|
|
889
961
|
#### buffer
|
|
@@ -938,31 +1010,35 @@ XML file which controls or enhances map layers and styling
|
|
|
938
1010
|
|
|
939
1011
|
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
940
1012
|
|
|
941
|
-
####
|
|
1013
|
+
#### sld\_body
|
|
942
1014
|
|
|
943
1015
|
A URL-encoded StyledLayerDescriptor XML document which controls or enhances map layers and styling
|
|
944
1016
|
|
|
945
1017
|
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
946
1018
|
|
|
1019
|
+
### IProperty
|
|
1020
|
+
|
|
1021
|
+
_**\[interface]**_ - Geoserver original layer properties response on DescribeFeature request
|
|
1022
|
+
|
|
947
1023
|
### IGeoserverDescribeFeatureType
|
|
948
1024
|
|
|
949
|
-
|
|
1025
|
+
_**\[interface]**_ - Geoserver original response on DescribeFeature request
|
|
950
1026
|
|
|
951
1027
|
#### \_parsed
|
|
952
1028
|
|
|
953
1029
|
DescribeFeature request parsed
|
|
954
1030
|
|
|
955
|
-
Type: {namespace: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), properties:
|
|
1031
|
+
Type: {namespace: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), properties: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[IProperty](#iproperty)>, geomType: GeometryType, geomField: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}
|
|
956
1032
|
|
|
957
1033
|
### I18n
|
|
958
1034
|
|
|
959
|
-
|
|
1035
|
+
_**\[interface]**_ - Custom Language specified when creating a WFST instance
|
|
960
1036
|
|
|
961
1037
|
#### labels
|
|
962
1038
|
|
|
963
1039
|
Labels section
|
|
964
1040
|
|
|
965
|
-
Type: {select: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, addElement: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, editElement: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, save: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, delete: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, cancel: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, apply: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, upload: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, editMode: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, confirmDelete: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, geomTypeNotSupported: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, editFields: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, editGeom: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, selectDrawType: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, uploadToLayer: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, uploadFeatures: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, validFeatures: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, invalidFeatures: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, loading: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, toggleVisibility: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, close: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?}
|
|
1041
|
+
Type: {select: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, selectBox: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, selectFreehand: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, query: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, featureInfo: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, addElement: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, editElement: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, save: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, delete: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, cancel: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, apply: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, upload: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, editMode: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, confirmDelete: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, confirmDeleteElements: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, geomTypeNotSupported: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, editFields: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, editGeom: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, continueLine: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, selectDrawType: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, uploadToLayer: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, uploadFeatures: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, validFeatures: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, invalidFeatures: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, loading: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, toggleVisibility: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, fullscreen: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, close: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, multipleValues: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, editElements: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, multipleEditNotice: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, geoserverLayers: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?}
|
|
966
1042
|
|
|
967
1043
|
#### errors
|
|
968
1044
|
|
|
@@ -972,17 +1048,8 @@ Type: {capabilities: [string](https://developer.mozilla.org/docs/Web/JavaScript/
|
|
|
972
1048
|
|
|
973
1049
|
## TODO
|
|
974
1050
|
|
|
975
|
-
-
|
|
976
|
-
-
|
|
977
|
-
-
|
|
978
|
-
-
|
|
979
|
-
-
|
|
980
|
-
- Add customizables styles
|
|
981
|
-
- Improve scss (add variables)
|
|
982
|
-
- Add cookies to persist widget controller state
|
|
983
|
-
- Geometry type _LinearRing_ support
|
|
984
|
-
- Tests!
|
|
985
|
-
- Improve comments and documentation
|
|
986
|
-
- Improve interface
|
|
987
|
-
- Change svg imports to preserve svg structure
|
|
988
|
-
- Improve style on editing and drawing features
|
|
1051
|
+
- Add `Don't show again` option in the error modal
|
|
1052
|
+
- Add customizables styles
|
|
1053
|
+
- Improve scss (add variables)
|
|
1054
|
+
- Tests!
|
|
1055
|
+
- Improve comments and documentation
|