ol-wfst 4.0.5 → 4.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.
- package/README.md +367 -359
- package/dist/@types.d.ts +6 -0
- package/dist/@types.d.ts.map +1 -1
- package/dist/Geoserver.d.ts +20 -12
- package/dist/Geoserver.d.ts.map +1 -1
- package/dist/WfsLayer.d.ts +13 -13
- package/dist/WfsLayer.d.ts.map +1 -1
- package/dist/WmsLayer.d.ts +14 -13
- package/dist/WmsLayer.d.ts.map +1 -1
- package/dist/css/ol-wfst.bootstrap5.css +40 -11
- package/dist/css/ol-wfst.bootstrap5.min.css +1 -1
- package/dist/modules/EditControlChanges.d.ts +10 -10
- package/dist/modules/EditControlChanges.d.ts.map +1 -1
- package/dist/modules/EditFieldsModal.d.ts +3 -2
- package/dist/modules/EditFieldsModal.d.ts.map +1 -1
- package/dist/modules/EditOverlay.d.ts +4 -3
- package/dist/modules/EditOverlay.d.ts.map +1 -1
- package/dist/modules/LayersControl.d.ts +2 -3
- package/dist/modules/LayersControl.d.ts.map +1 -1
- package/dist/modules/Uploads.d.ts +6 -3
- package/dist/modules/Uploads.d.ts.map +1 -1
- package/dist/modules/base/BaseLayer.d.ts +5 -5
- package/dist/modules/base/BaseLayer.d.ts.map +1 -1
- package/dist/modules/base/WfsSource.d.ts +1 -1
- package/dist/modules/base/WfsSource.d.ts.map +1 -1
- package/dist/modules/base/WmsSource.d.ts +1 -1
- package/dist/modules/base/WmsSource.d.ts.map +1 -1
- package/dist/modules/editLayer.d.ts +2 -2
- package/dist/modules/editLayer.d.ts.map +1 -1
- package/dist/modules/errors.d.ts +2 -1
- package/dist/modules/errors.d.ts.map +1 -1
- package/dist/modules/state.d.ts +2 -2
- package/dist/modules/state.d.ts.map +1 -1
- package/dist/modules/styleFunction.d.ts +3 -3
- package/dist/modules/styleFunction.d.ts.map +1 -1
- package/dist/ol-wfst.d.ts +21 -15
- package/dist/ol-wfst.d.ts.map +1 -1
- package/dist/ol-wfst.js +219 -2785
- package/dist/ol-wfst.js.map +1 -1
- package/dist/ol-wfst.min.js +1 -1
- package/dist/ol-wfst.min.js.map +1 -1
- package/lib/@types.d.ts +6 -0
- package/lib/@types.d.ts.map +1 -1
- package/lib/Geoserver.d.ts +20 -12
- package/lib/Geoserver.d.ts.map +1 -1
- package/lib/WfsLayer.d.ts +13 -13
- package/lib/WfsLayer.d.ts.map +1 -1
- package/lib/WmsLayer.d.ts +14 -13
- package/lib/WmsLayer.d.ts.map +1 -1
- package/lib/modules/EditControlChanges.d.ts +10 -10
- package/lib/modules/EditControlChanges.d.ts.map +1 -1
- package/lib/modules/EditFieldsModal.d.ts +3 -2
- package/lib/modules/EditFieldsModal.d.ts.map +1 -1
- package/lib/modules/EditOverlay.d.ts +4 -3
- package/lib/modules/EditOverlay.d.ts.map +1 -1
- package/lib/modules/LayersControl.d.ts +2 -3
- package/lib/modules/LayersControl.d.ts.map +1 -1
- package/lib/modules/Uploads.d.ts +6 -3
- package/lib/modules/Uploads.d.ts.map +1 -1
- package/lib/modules/base/BaseLayer.d.ts +5 -5
- package/lib/modules/base/BaseLayer.d.ts.map +1 -1
- package/lib/modules/base/WfsSource.d.ts +1 -1
- package/lib/modules/base/WfsSource.d.ts.map +1 -1
- package/lib/modules/base/WmsSource.d.ts +1 -1
- package/lib/modules/base/WmsSource.d.ts.map +1 -1
- package/lib/modules/editLayer.d.ts +2 -2
- package/lib/modules/editLayer.d.ts.map +1 -1
- package/lib/modules/errors.d.ts +2 -1
- package/lib/modules/errors.d.ts.map +1 -1
- package/lib/modules/state.d.ts +2 -2
- package/lib/modules/state.d.ts.map +1 -1
- package/lib/modules/styleFunction.d.ts +3 -3
- package/lib/modules/styleFunction.d.ts.map +1 -1
- package/lib/ol-wfst.d.ts +21 -15
- package/lib/ol-wfst.d.ts.map +1 -1
- package/lib/ol-wfst.js +151 -236
- package/lib/ol-wfst.js.map +1 -1
- package/lib/style/css/ol-wfst.bootstrap5.css +40 -11
- package/lib/style/scss/-ol-wfst.bootstrap5.scss +10 -10
- package/lib/style/scss/_variables.scss +17 -17
- package/lib/style/scss/ol-wfst.scss +230 -230
- package/package.json +71 -72
- package/CHANGELOG.md +0 -103
package/README.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# OpenLayers WFST
|
|
2
2
|
|
|
3
|
-
<p align="center">
|
|
4
|
-
<a href="https://www.npmjs.com/package/ol-wfst">
|
|
5
|
-
<img src="https://img.shields.io/npm/v/ol-wfst.svg" alt="npm version">
|
|
6
|
-
</a>
|
|
7
|
-
<a href="https://img.shields.io/npm/dm/ol-wfst">
|
|
8
|
-
<img alt="npm" src="https://img.shields.io/npm/dm/ol-wfst">
|
|
9
|
-
</a>
|
|
10
|
-
<a href="https://github.com/gastonzalba/ol-wfst/blob/master/LICENSE">
|
|
11
|
-
<img src="https://img.shields.io/npm/l/ol-wfst.svg" alt="license">
|
|
12
|
-
</a>
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://www.npmjs.com/package/ol-wfst">
|
|
5
|
+
<img src="https://img.shields.io/npm/v/ol-wfst.svg" alt="npm version">
|
|
6
|
+
</a>
|
|
7
|
+
<a href="https://img.shields.io/npm/dm/ol-wfst">
|
|
8
|
+
<img alt="npm" src="https://img.shields.io/npm/dm/ol-wfst">
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://github.com/gastonzalba/ol-wfst/blob/master/LICENSE">
|
|
11
|
+
<img src="https://img.shields.io/npm/l/ol-wfst.svg" alt="license">
|
|
12
|
+
</a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
|
-
Tiny WFST-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:
|
|
15
|
+
Tiny WFST-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
|
Tested with OpenLayers version 5, 6 and 7.
|
|
18
18
|
|
|
19
|
-
<img src="screenshots/example-1.jpg" alt="Drawing" style="width:50%; float:left;">
|
|
19
|
+
<img src="screenshots/example-1.jpg" alt="Drawing" style="width:50%; float:left;">
|
|
20
20
|
<img src="screenshots/example-2.jpg" alt="Editing fields" style="width:50%; float:left;">
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
@@ -24,100 +24,100 @@ Tested with OpenLayers version 5, 6 and 7.
|
|
|
24
24
|
See [Wfst Options](#options) for more details.
|
|
25
25
|
|
|
26
26
|
```javascript
|
|
27
|
-
import Wfst, { Geoserver, WmsLayer, WfsLayer } from 'ol-wfst';
|
|
28
|
-
import { Fill, Stroke, Circle, Style } from 'ol/style';
|
|
29
|
-
|
|
30
|
-
// Style
|
|
31
|
-
import 'ol-wfst/lib/scss/ol-wfst.css';
|
|
32
|
-
import 'ol-wfst/lib/scss/ol-wfst.bootstrap5.css'; // Do not import if you already have boostrap css
|
|
33
|
-
|
|
34
|
-
// Optional credentials
|
|
35
|
-
const password = 123456;
|
|
36
|
-
const username = 'username';
|
|
37
|
-
|
|
38
|
-
const geoserver = {
|
|
39
|
-
url: 'https://mysite.com/geoserver/myworkspace/ows',
|
|
40
|
-
advanced: {
|
|
41
|
-
getCapabilitiesVersion: '1.3.0',
|
|
42
|
-
getFeatureVersion: '1.0.0',
|
|
43
|
-
describeFeatureTypeVersion: '1.1.0',
|
|
44
|
-
lockFeatureVersion: '1.1.0',
|
|
45
|
-
projection: 'EPSG:3857'
|
|
46
|
-
},
|
|
47
|
-
// Maybe you wanna add this on a proxy, at the backend
|
|
48
|
-
headers: { Authorization: 'Basic ' + btoa(username + ':' + password) }
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const wfsLayer = new WfsLayer({
|
|
52
|
-
name: 'myPointsLayer', // Name of the layer on the GeoServer
|
|
53
|
-
label: 'Photos', // Optional Label to be displayed in the controller
|
|
54
|
-
geoserver: geoserver,
|
|
55
|
-
zIndex: 99,
|
|
56
|
-
|
|
57
|
-
// WfsLayers need a custom style
|
|
58
|
-
style: new Style({
|
|
59
|
-
image: new Circle({
|
|
60
|
-
radius: 7,
|
|
61
|
-
fill: new Fill({
|
|
62
|
-
color: '#000000'
|
|
63
|
-
}),
|
|
64
|
-
stroke: new Stroke({
|
|
65
|
-
color: [255, 0, 0],
|
|
66
|
-
width: 2
|
|
67
|
-
})
|
|
68
|
-
})
|
|
69
|
-
}),
|
|
70
|
-
|
|
71
|
-
// See [geoserverVendor](#geoservervendor) for more details.
|
|
72
|
-
geoserverVendor: {
|
|
73
|
-
cql_filter: 'id > 50',
|
|
74
|
-
maxFeatures: 500
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
beforeTransactFeature: function (feature, transactionType) {
|
|
78
|
-
if (transactionType === 'insert') {
|
|
79
|
-
// Maybe add a custom value o perform an action before insert features
|
|
80
|
-
feature.set('customProperty', 'customValue', true);
|
|
81
|
-
} else if (transactionType === 'update') {
|
|
82
|
-
// ... //
|
|
83
|
-
} else if (transactionType === 'delete') {
|
|
84
|
-
// .. //
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return feature;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
const wmsLayer = new WmsLayer({
|
|
92
|
-
name: 'myMultiGeometryLayer',
|
|
93
|
-
label: 'Other elements',
|
|
94
|
-
geoserver: geoserver,
|
|
95
|
-
// See [geoserverVendor](#geoservervendor) for more details.
|
|
96
|
-
geoserverVendor: {
|
|
97
|
-
cql_filter: 'id > 50',
|
|
98
|
-
buffer: 50,
|
|
99
|
-
maxFeatures: 500
|
|
100
|
-
},
|
|
101
|
-
beforeTransactFeature: function (feature, transactionType) {
|
|
102
|
-
if (transactionType === 'insert') {
|
|
103
|
-
// Maybe add a custom value o perform an action before insert features
|
|
104
|
-
feature.set('customProperty', 'customValue', true);
|
|
105
|
-
} else if (transactionType === 'update') {
|
|
106
|
-
// ... //
|
|
107
|
-
} else if (transactionType === 'delete') {
|
|
108
|
-
// .. //
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return feature;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
const wfst = new Wfst({
|
|
116
|
-
layers: [wfsLayer, wmsLayer],
|
|
117
|
-
language: 'en',
|
|
118
|
-
showUpload: true
|
|
119
|
-
});
|
|
120
|
-
|
|
27
|
+
import Wfst, { Geoserver, WmsLayer, WfsLayer } from 'ol-wfst';
|
|
28
|
+
import { Fill, Stroke, Circle, Style } from 'ol/style';
|
|
29
|
+
|
|
30
|
+
// Style
|
|
31
|
+
import 'ol-wfst/lib/scss/ol-wfst.css';
|
|
32
|
+
import 'ol-wfst/lib/scss/ol-wfst.bootstrap5.css'; // Do not import if you already have boostrap css
|
|
33
|
+
|
|
34
|
+
// Optional credentials
|
|
35
|
+
const password = 123456;
|
|
36
|
+
const username = 'username';
|
|
37
|
+
|
|
38
|
+
const geoserver = {
|
|
39
|
+
url: 'https://mysite.com/geoserver/myworkspace/ows',
|
|
40
|
+
advanced: {
|
|
41
|
+
getCapabilitiesVersion: '1.3.0',
|
|
42
|
+
getFeatureVersion: '1.0.0',
|
|
43
|
+
describeFeatureTypeVersion: '1.1.0',
|
|
44
|
+
lockFeatureVersion: '1.1.0',
|
|
45
|
+
projection: 'EPSG:3857'
|
|
46
|
+
},
|
|
47
|
+
// Maybe you wanna add this on a proxy, at the backend
|
|
48
|
+
headers: { Authorization: 'Basic ' + btoa(username + ':' + password) }
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const wfsLayer = new WfsLayer({
|
|
52
|
+
name: 'myPointsLayer', // Name of the layer on the GeoServer
|
|
53
|
+
label: 'Photos', // Optional Label to be displayed in the controller
|
|
54
|
+
geoserver: geoserver,
|
|
55
|
+
zIndex: 99,
|
|
56
|
+
|
|
57
|
+
// WfsLayers need a custom style
|
|
58
|
+
style: new Style({
|
|
59
|
+
image: new Circle({
|
|
60
|
+
radius: 7,
|
|
61
|
+
fill: new Fill({
|
|
62
|
+
color: '#000000'
|
|
63
|
+
}),
|
|
64
|
+
stroke: new Stroke({
|
|
65
|
+
color: [255, 0, 0],
|
|
66
|
+
width: 2
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
}),
|
|
70
|
+
|
|
71
|
+
// See [geoserverVendor](#geoservervendor) for more details.
|
|
72
|
+
geoserverVendor: {
|
|
73
|
+
cql_filter: 'id > 50',
|
|
74
|
+
maxFeatures: 500
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
beforeTransactFeature: function (feature, transactionType) {
|
|
78
|
+
if (transactionType === 'insert') {
|
|
79
|
+
// Maybe add a custom value o perform an action before insert features
|
|
80
|
+
feature.set('customProperty', 'customValue', true);
|
|
81
|
+
} else if (transactionType === 'update') {
|
|
82
|
+
// ... //
|
|
83
|
+
} else if (transactionType === 'delete') {
|
|
84
|
+
// .. //
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return feature;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const wmsLayer = new WmsLayer({
|
|
92
|
+
name: 'myMultiGeometryLayer',
|
|
93
|
+
label: 'Other elements',
|
|
94
|
+
geoserver: geoserver,
|
|
95
|
+
// See [geoserverVendor](#geoservervendor) for more details.
|
|
96
|
+
geoserverVendor: {
|
|
97
|
+
cql_filter: 'id > 50',
|
|
98
|
+
buffer: 50,
|
|
99
|
+
maxFeatures: 500
|
|
100
|
+
},
|
|
101
|
+
beforeTransactFeature: function (feature, transactionType) {
|
|
102
|
+
if (transactionType === 'insert') {
|
|
103
|
+
// Maybe add a custom value o perform an action before insert features
|
|
104
|
+
feature.set('customProperty', 'customValue', true);
|
|
105
|
+
} else if (transactionType === 'update') {
|
|
106
|
+
// ... //
|
|
107
|
+
} else if (transactionType === 'delete') {
|
|
108
|
+
// .. //
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return feature;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const wfst = new Wfst({
|
|
116
|
+
layers: [wfsLayer, wmsLayer],
|
|
117
|
+
language: 'en',
|
|
118
|
+
showUpload: true
|
|
119
|
+
});
|
|
120
|
+
|
|
121
121
|
map.addControl(wfst);
|
|
122
122
|
```
|
|
123
123
|
|
|
@@ -126,23 +126,23 @@ map.addControl(wfst);
|
|
|
126
126
|
See \[#wfsSource]
|
|
127
127
|
|
|
128
128
|
```js
|
|
129
|
-
|
|
130
|
-
wmsLayer.setCustomParam('cql_filter',(`id = 28`);
|
|
129
|
+
|
|
130
|
+
wmsLayer.setCustomParam('cql_filter',(`id = 28`);
|
|
131
131
|
wmsLayer.setCustomParam('env', `tags=true`);
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
### Adding features programatically
|
|
135
135
|
|
|
136
136
|
```js
|
|
137
|
-
const feature = new ol.Feature({
|
|
138
|
-
geometry: new ol.geom.MultiPoint([[`-57.1145}`, `-36.2855`]])
|
|
139
|
-
});
|
|
140
|
-
const inserted = await myWmsLayer.insertFeatures([feature]);
|
|
141
|
-
|
|
142
|
-
if (inserted) {
|
|
143
|
-
alert('Feature inserted');
|
|
144
|
-
} else {
|
|
145
|
-
alert('Feature not inserted');
|
|
137
|
+
const feature = new ol.Feature({
|
|
138
|
+
geometry: new ol.geom.MultiPoint([[`-57.1145}`, `-36.2855`]])
|
|
139
|
+
});
|
|
140
|
+
const inserted = await myWmsLayer.insertFeatures([feature]);
|
|
141
|
+
|
|
142
|
+
if (inserted) {
|
|
143
|
+
alert('Feature inserted');
|
|
144
|
+
} else {
|
|
145
|
+
alert('Feature not inserted');
|
|
146
146
|
}
|
|
147
147
|
```
|
|
148
148
|
|
|
@@ -151,23 +151,23 @@ if (inserted) {
|
|
|
151
151
|
### wfst instance events
|
|
152
152
|
|
|
153
153
|
```js
|
|
154
|
-
wfst.on(
|
|
155
|
-
['modifystart', 'modifyend', 'drawstart', 'drawend', 'load', 'visible'],
|
|
156
|
-
function (evt) {
|
|
157
|
-
console.log(evt);
|
|
158
|
-
}
|
|
159
|
-
);
|
|
160
|
-
|
|
161
|
-
wfst.on(['describeFeatureType'], function (evt) {
|
|
162
|
-
console.log(evt.layer, evt.data);
|
|
154
|
+
wfst.on(
|
|
155
|
+
['modifystart', 'modifyend', 'drawstart', 'drawend', 'load', 'visible'],
|
|
156
|
+
function (evt) {
|
|
157
|
+
console.log(evt);
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
wfst.on(['describeFeatureType'], function (evt) {
|
|
162
|
+
console.log(evt.layer, evt.data);
|
|
163
163
|
});
|
|
164
164
|
```
|
|
165
165
|
|
|
166
166
|
### Geoserver events
|
|
167
167
|
|
|
168
168
|
```js
|
|
169
|
-
geoserver.on(['getCapabilities'], function (evt) {
|
|
170
|
-
console.log(evt.data);
|
|
169
|
+
geoserver.on(['getCapabilities'], function (evt) {
|
|
170
|
+
console.log(evt.data);
|
|
171
171
|
});
|
|
172
172
|
```
|
|
173
173
|
|
|
@@ -176,8 +176,8 @@ geoserver.on(['getCapabilities'], function (evt) {
|
|
|
176
176
|
#### WMS Layer
|
|
177
177
|
|
|
178
178
|
```js
|
|
179
|
-
wmsLayer.on(['change:describeFeatureType'], function (evt) {
|
|
180
|
-
console.log(evt);
|
|
179
|
+
wmsLayer.on(['change:describeFeatureType'], function (evt) {
|
|
180
|
+
console.log(evt);
|
|
181
181
|
});
|
|
182
182
|
```
|
|
183
183
|
|
|
@@ -190,23 +190,23 @@ wmsLayer.getSource().on([...])
|
|
|
190
190
|
#### WFS Layer
|
|
191
191
|
|
|
192
192
|
```js
|
|
193
|
-
wfsLayer.on(['change:describeFeatureType'], function (evt) {
|
|
194
|
-
console.log(evt);
|
|
193
|
+
wfsLayer.on(['change:describeFeatureType'], function (evt) {
|
|
194
|
+
console.log(evt);
|
|
195
195
|
});
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
[VectorSource Events](https://openlayers.org/en/latest/apidoc/module-ol_source_Vector.VectorSourceEvent.html)
|
|
199
199
|
|
|
200
200
|
```js
|
|
201
|
-
wfsLayer.getSource().on([...])
|
|
201
|
+
wfsLayer.getSource().on([...])
|
|
202
202
|
|
|
203
203
|
```
|
|
204
204
|
|
|
205
205
|
### Some considerations
|
|
206
206
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
* 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.
|
|
208
|
+
* 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.
|
|
209
|
+
* If you don't use a reverse proxy, remeber configure [cors](https://docs.geoserver.org/latest/en/user/production/container.html#enable-cors)
|
|
210
210
|
|
|
211
211
|
## Changelog
|
|
212
212
|
|
|
@@ -221,14 +221,14 @@ See [CHANGELOG](./CHANGELOG.md) for details of changes in each release.
|
|
|
221
221
|
Load `ol-wfst.js` after OpenLayers. The available classes are `Wfst`, `Wfst.Geoserver`, `Wfst.WfsLayer` and `Wfst.WmsLayer`.
|
|
222
222
|
|
|
223
223
|
```HTML
|
|
224
|
-
<script src="https://unpkg.com/ol-wfst@4.0
|
|
224
|
+
<script src="https://unpkg.com/ol-wfst@4.1.0"></script>
|
|
225
225
|
```
|
|
226
226
|
|
|
227
227
|
#### CSS
|
|
228
228
|
|
|
229
229
|
```HTML
|
|
230
|
-
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@4.0
|
|
231
|
-
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@4.0
|
|
230
|
+
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@4.1.0/dist/css/ol-wfst.min.css" />
|
|
231
|
+
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@4.1.0/dist/css/ol-wfst.bootstrap5.min.css" />
|
|
232
232
|
```
|
|
233
233
|
|
|
234
234
|
### Parcel, Webpack, etc.
|
|
@@ -248,12 +248,12 @@ import Wfst, { Geoserver, WmsLayer, WfsLayer } from 'ol-wfst';
|
|
|
248
248
|
#### CSS
|
|
249
249
|
|
|
250
250
|
```js
|
|
251
|
-
// scss
|
|
252
|
-
import 'ol-wfst/lib/style/scss/ol-wfst.scss';
|
|
253
|
-
import 'ol-wfst/lib/style/scss/-ol-wfst.bootstrap5.scss';
|
|
254
|
-
|
|
255
|
-
// or css
|
|
256
|
-
import 'ol-wfst/lib/style/css/ol-wfst.css';
|
|
251
|
+
// scss
|
|
252
|
+
import 'ol-wfst/lib/style/scss/ol-wfst.scss';
|
|
253
|
+
import 'ol-wfst/lib/style/scss/-ol-wfst.bootstrap5.scss';
|
|
254
|
+
|
|
255
|
+
// or css
|
|
256
|
+
import 'ol-wfst/lib/style/css/ol-wfst.css';
|
|
257
257
|
import 'ol-wfst/lib/style/css/ol-wfst.bootstrap5.css';
|
|
258
258
|
```
|
|
259
259
|
|
|
@@ -267,104 +267,106 @@ TypeScript types are shipped with the project in the dist directory and should b
|
|
|
267
267
|
|
|
268
268
|
#### Table of Contents
|
|
269
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
|
-
|
|
270
|
+
* [BaseGeoserverVendor](#basegeoservervendor)
|
|
271
|
+
* [key](#key)
|
|
272
|
+
* [cql\_filter](#cql_filter)
|
|
273
|
+
* [sortBy](#sortby)
|
|
274
|
+
* [featureid](#featureid)
|
|
275
|
+
* [filter](#filter)
|
|
276
|
+
* [format\_options](#format_options)
|
|
277
|
+
* [maxFeatures](#maxfeatures)
|
|
278
|
+
* [startIndex](#startindex)
|
|
279
|
+
* [propertyname](#propertyname)
|
|
280
|
+
* [Wfst](#wfst)
|
|
281
|
+
* [Parameters](#parameters)
|
|
282
|
+
* [getLayers](#getlayers)
|
|
283
|
+
* [getLayerByName](#getlayerbyname)
|
|
284
|
+
* [Parameters](#parameters-1)
|
|
285
|
+
* [activateDrawMode](#activatedrawmode)
|
|
286
|
+
* [Parameters](#parameters-2)
|
|
287
|
+
* [activateEditMode](#activateeditmode)
|
|
288
|
+
* [Parameters](#parameters-3)
|
|
289
|
+
* [Geoserver](#geoserver)
|
|
290
|
+
* [Parameters](#parameters-4)
|
|
291
|
+
* [getCapabilities](#getcapabilities)
|
|
292
|
+
* [setUrl](#seturl)
|
|
293
|
+
* [Parameters](#parameters-5)
|
|
294
|
+
* [getUrl](#geturl)
|
|
295
|
+
* [setHeaders](#setheaders)
|
|
296
|
+
* [Parameters](#parameters-6)
|
|
297
|
+
* [getHeaders](#getheaders)
|
|
298
|
+
* [setCredentials](#setcredentials)
|
|
299
|
+
* [Parameters](#parameters-7)
|
|
300
|
+
* [getCredentials](#getcredentials)
|
|
301
|
+
* [setAdvanced](#setadvanced)
|
|
302
|
+
* [Parameters](#parameters-8)
|
|
303
|
+
* [getAdvanced](#getadvanced)
|
|
304
|
+
* [hasTransaction](#hastransaction)
|
|
305
|
+
* [hasLockFeature](#haslockfeature)
|
|
306
|
+
* [getUseLockFeature](#getuselockfeature)
|
|
307
|
+
* [setUseLockFeature](#setuselockfeature)
|
|
308
|
+
* [Parameters](#parameters-9)
|
|
309
|
+
* [isLoaded](#isloaded)
|
|
310
|
+
* [getState](#getstate)
|
|
311
|
+
* [getAndUpdateCapabilities](#getandupdatecapabilities)
|
|
312
|
+
* [\_removeFeatures](#_removefeatures)
|
|
313
|
+
* [Parameters](#parameters-10)
|
|
314
|
+
* [lockFeature](#lockfeature)
|
|
315
|
+
* [Parameters](#parameters-11)
|
|
316
|
+
* [WfsLayer](#wfslayer)
|
|
317
|
+
* [Parameters](#parameters-12)
|
|
318
|
+
* [refresh](#refresh)
|
|
319
|
+
* [setCustomParam](#setcustomparam)
|
|
320
|
+
* [Parameters](#parameters-13)
|
|
321
|
+
* [WmsLayer](#wmslayer)
|
|
322
|
+
* [Parameters](#parameters-14)
|
|
323
|
+
* [refresh](#refresh-1)
|
|
324
|
+
* [setCustomParam](#setcustomparam-1)
|
|
325
|
+
* [Parameters](#parameters-15)
|
|
326
|
+
* [Options](#options)
|
|
327
|
+
* [processUpload](#processupload)
|
|
328
|
+
* [Parameters](#parameters-16)
|
|
329
|
+
* [layers](#layers)
|
|
330
|
+
* [active](#active)
|
|
331
|
+
* [evtType](#evttype)
|
|
332
|
+
* [showControl](#showcontrol)
|
|
333
|
+
* [modal](#modal)
|
|
334
|
+
* [language](#language)
|
|
335
|
+
* [i18n](#i18n)
|
|
336
|
+
* [showUpload](#showupload)
|
|
337
|
+
* [uploadFormats](#uploadformats)
|
|
338
|
+
* [LayerOptions](#layeroptions)
|
|
339
|
+
* [beforeTransactFeature](#beforetransactfeature)
|
|
340
|
+
* [Parameters](#parameters-17)
|
|
341
|
+
* [name](#name)
|
|
342
|
+
* [geoserver](#geoserver-1)
|
|
343
|
+
* [label](#label)
|
|
344
|
+
* [geoserverVendor](#geoservervendor)
|
|
345
|
+
* [strategy](#strategy)
|
|
346
|
+
* [GeoserverOptions](#geoserveroptions)
|
|
347
|
+
* [url](#url)
|
|
348
|
+
* [advanced](#advanced)
|
|
349
|
+
* [headers](#headers)
|
|
350
|
+
* [credentials](#credentials)
|
|
351
|
+
* [useLockFeature](#uselockfeature)
|
|
352
|
+
* [GeoServerAdvanced](#geoserveradvanced)
|
|
353
|
+
* [WfsGeoserverVendor](#wfsgeoservervendor)
|
|
354
|
+
* [strict](#strict)
|
|
355
|
+
* [WmsGeoserverVendor](#wmsgeoservervendor)
|
|
356
|
+
* [buffer](#buffer)
|
|
357
|
+
* [env](#env)
|
|
358
|
+
* [clip](#clip)
|
|
359
|
+
* [styles](#styles)
|
|
360
|
+
* [transparent](#transparent)
|
|
361
|
+
* [bgcolor](#bgcolor)
|
|
362
|
+
* [time](#time)
|
|
363
|
+
* [sld](#sld)
|
|
364
|
+
* [sld\_body](#sld_body)
|
|
365
|
+
* [IGeoserverDescribeFeatureType](#igeoserverdescribefeaturetype)
|
|
366
|
+
* [\_parsed](#_parsed)
|
|
367
|
+
* [I18n](#i18n-1)
|
|
368
|
+
* [labels](#labels)
|
|
369
|
+
* [errors](#errors)
|
|
368
370
|
|
|
369
371
|
### BaseGeoserverVendor
|
|
370
372
|
|
|
@@ -372,7 +374,7 @@ TypeScript types are shipped with the project in the dist directory and should b
|
|
|
372
374
|
|
|
373
375
|
Add any other param
|
|
374
376
|
|
|
375
|
-
####
|
|
377
|
+
#### cql\_filter
|
|
376
378
|
|
|
377
379
|
<https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#cql-filter>
|
|
378
380
|
|
|
@@ -396,9 +398,9 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
396
398
|
|
|
397
399
|
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
398
400
|
|
|
399
|
-
####
|
|
401
|
+
#### format\_options
|
|
400
402
|
|
|
401
|
-
WMS: <https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#format-options>
|
|
403
|
+
WMS: <https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#format-options>
|
|
402
404
|
WFS: <https://docs.geoserver.org/latest/en/user/services/wfs/vendor.html#format-options>
|
|
403
405
|
|
|
404
406
|
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
@@ -423,17 +425,17 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
423
425
|
|
|
424
426
|
### Wfst
|
|
425
427
|
|
|
426
|
-
**Extends ol/control/
|
|
428
|
+
**Extends ol/control/Control~Control**
|
|
427
429
|
|
|
428
|
-
Tiny WFST-T client to insert (drawing/uploading), modify and delete
|
|
429
|
-
features on GeoServers using OpenLayers. Layers with these types
|
|
430
|
-
of geometries are supported: "GeometryCollection" (in this case, you can
|
|
431
|
-
choose the geometry type of each element to draw), "Point", "MultiPoint",
|
|
430
|
+
Tiny WFST-T client to insert (drawing/uploading), modify and delete
|
|
431
|
+
features on GeoServers using OpenLayers. Layers with these types
|
|
432
|
+
of geometries are supported: "GeometryCollection" (in this case, you can
|
|
433
|
+
choose the geometry type of each element to draw), "Point", "MultiPoint",
|
|
432
434
|
"LineString", "MultiLineString", "Polygon" and "MultiPolygon".
|
|
433
435
|
|
|
434
436
|
#### Parameters
|
|
435
437
|
|
|
436
|
-
|
|
438
|
+
* `options` **[Options](#options)?** Wfst options, see [Wfst Options](#options) for more details.
|
|
437
439
|
|
|
438
440
|
#### getLayers
|
|
439
441
|
|
|
@@ -447,7 +449,7 @@ Get a layer
|
|
|
447
449
|
|
|
448
450
|
##### Parameters
|
|
449
451
|
|
|
450
|
-
|
|
452
|
+
* `layerName` (optional, default `''`)
|
|
451
453
|
|
|
452
454
|
Returns **([WfsLayer](#wfslayer) | [WmsLayer](#wmslayer))** 
|
|
453
455
|
|
|
@@ -457,7 +459,7 @@ Activate/deactivate the draw mode
|
|
|
457
459
|
|
|
458
460
|
##### Parameters
|
|
459
461
|
|
|
460
|
-
|
|
462
|
+
* `layer` **([WfsLayer](#wfslayer) | [WmsLayer](#wmslayer) | `false`)** 
|
|
461
463
|
|
|
462
464
|
Returns **void** 
|
|
463
465
|
|
|
@@ -467,17 +469,17 @@ Activate/desactivate the edit mode
|
|
|
467
469
|
|
|
468
470
|
##### Parameters
|
|
469
471
|
|
|
470
|
-
|
|
472
|
+
* `bool` (optional, default `true`)
|
|
471
473
|
|
|
472
474
|
Returns **void** 
|
|
473
475
|
|
|
474
476
|
### Geoserver
|
|
475
477
|
|
|
476
|
-
**Extends ol/Object~
|
|
478
|
+
**Extends ol/Object~BaseObject**
|
|
477
479
|
|
|
478
480
|
#### Parameters
|
|
479
481
|
|
|
480
|
-
|
|
482
|
+
* `options` **[GeoserverOptions](#geoserveroptions)** 
|
|
481
483
|
|
|
482
484
|
#### getCapabilities
|
|
483
485
|
|
|
@@ -487,8 +489,8 @@ Returns **XMLDocument** 
|
|
|
487
489
|
|
|
488
490
|
##### Parameters
|
|
489
491
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
+
* `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
493
|
+
* `opt_silent` (optional, default `false`)
|
|
492
494
|
|
|
493
495
|
Returns **void** 
|
|
494
496
|
|
|
@@ -500,8 +502,8 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
500
502
|
|
|
501
503
|
##### Parameters
|
|
502
504
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
+
* `headers` **HeadersInit** (optional, default `{}`)
|
|
506
|
+
* `opt_silent` (optional, default `false`)
|
|
505
507
|
|
|
506
508
|
Returns **void** 
|
|
507
509
|
|
|
@@ -513,8 +515,8 @@ Returns **HeadersInit** 
|
|
|
513
515
|
|
|
514
516
|
##### Parameters
|
|
515
517
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
+
* `credentials` **RequestCredentials** (optional, default `null`)
|
|
519
|
+
* `opt_silent` (optional, default `false`)
|
|
518
520
|
|
|
519
521
|
Returns **void** 
|
|
520
522
|
|
|
@@ -526,8 +528,8 @@ Returns **RequestCredentials** 
|
|
|
526
528
|
|
|
527
529
|
##### Parameters
|
|
528
530
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
+
* `advanced` **[GeoServerAdvanced](#geoserveradvanced)** (optional, default `{}`)
|
|
532
|
+
* `opt_silent` (optional, default `false`)
|
|
531
533
|
|
|
532
534
|
Returns **void** 
|
|
533
535
|
|
|
@@ -551,8 +553,8 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
551
553
|
|
|
552
554
|
##### Parameters
|
|
553
555
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
+
* `useLockFeature` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
557
|
+
* `opt_silent` (optional, default `false`)
|
|
556
558
|
|
|
557
559
|
Returns **void** 
|
|
558
560
|
|
|
@@ -564,110 +566,116 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
564
566
|
|
|
565
567
|
#### getAndUpdateCapabilities
|
|
566
568
|
|
|
567
|
-
Get the capabilities from the GeoServer and check
|
|
569
|
+
Get the capabilities from the GeoServer and check
|
|
568
570
|
all the available operations.
|
|
569
571
|
|
|
570
572
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<XMLDocument>** 
|
|
571
573
|
|
|
574
|
+
#### \_removeFeatures
|
|
575
|
+
|
|
576
|
+
##### Parameters
|
|
577
|
+
|
|
578
|
+
* `features` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<Feature\<Geometry>>** 
|
|
579
|
+
|
|
572
580
|
#### lockFeature
|
|
573
581
|
|
|
574
|
-
Lock a feature in the geoserver. Useful before editing a geometry,
|
|
582
|
+
Lock a feature in the geoserver. Useful before editing a geometry,
|
|
575
583
|
to avoid changes from multiples suers
|
|
576
584
|
|
|
577
585
|
##### Parameters
|
|
578
586
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
587
|
+
* `featureId` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number))** 
|
|
588
|
+
* `layerName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
589
|
+
* `retry` (optional, default `0`)
|
|
582
590
|
|
|
583
591
|
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)>** 
|
|
584
592
|
|
|
585
593
|
### WfsLayer
|
|
586
594
|
|
|
587
|
-
**Extends ol/layer/Vector~
|
|
595
|
+
**Extends ol/layer/Vector~VectorLayer**
|
|
588
596
|
|
|
589
|
-
Layer to retrieve WFS features from geoservers
|
|
597
|
+
Layer to retrieve WFS features from geoservers
|
|
590
598
|
<https://docs.geoserver.org/stable/en/user/services/wfs/reference.html>
|
|
591
599
|
|
|
592
600
|
#### Parameters
|
|
593
601
|
|
|
594
|
-
|
|
602
|
+
* `options` **[LayerOptions](#layeroptions)** 
|
|
595
603
|
|
|
596
604
|
#### refresh
|
|
597
605
|
|
|
598
606
|
#### setCustomParam
|
|
599
607
|
|
|
600
|
-
Use this to update Geoserver Wms Vendors (<https://docs.geoserver.org/latest/en/user/services/wms/vendor.html>)
|
|
601
|
-
and other arguements (<https://docs.geoserver.org/stable/en/user/services/wms/reference.html#getmap>)
|
|
608
|
+
Use this to update Geoserver Wms Vendors (<https://docs.geoserver.org/latest/en/user/services/wms/vendor.html>)
|
|
609
|
+
and other arguements (<https://docs.geoserver.org/stable/en/user/services/wms/reference.html#getmap>)
|
|
602
610
|
in all the getMap requests.
|
|
603
611
|
|
|
604
|
-
Example: you can use this to change the style of the WMS, add a custom sld, set a
|
|
612
|
+
Example: you can use this to change the style of the WMS, add a custom sld, set a cql\_filter, etc.
|
|
605
613
|
|
|
606
614
|
##### Parameters
|
|
607
615
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
616
|
+
* `paramName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
617
|
+
* `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Use `undefined` or `null` to remove the param (optional, default `null`)
|
|
618
|
+
* `refresh` (optional, default `true`)
|
|
611
619
|
|
|
612
620
|
Returns **URLSearchParams** 
|
|
613
621
|
|
|
614
622
|
### WmsLayer
|
|
615
623
|
|
|
616
|
-
**Extends ol/layer/Tile~
|
|
624
|
+
**Extends ol/layer/Tile~TileLayer**
|
|
617
625
|
|
|
618
|
-
Layer to retrieve WMS information from geoservers
|
|
626
|
+
Layer to retrieve WMS information from geoservers
|
|
619
627
|
<https://docs.geoserver.org/stable/en/user/services/wms/reference.html>
|
|
620
628
|
|
|
621
629
|
#### Parameters
|
|
622
630
|
|
|
623
|
-
|
|
631
|
+
* `options` **[LayerOptions](#layeroptions)** 
|
|
624
632
|
|
|
625
633
|
#### refresh
|
|
626
634
|
|
|
627
635
|
#### setCustomParam
|
|
628
636
|
|
|
629
|
-
Use this to update Geoserver Wfs Vendors (<https://docs.geoserver.org/latest/en/user/services/wfs/vendor.html>)
|
|
630
|
-
and other arguements (<https://docs.geoserver.org/stable/en/user/services/wfs/reference.html>)
|
|
637
|
+
Use this to update Geoserver Wfs Vendors (<https://docs.geoserver.org/latest/en/user/services/wfs/vendor.html>)
|
|
638
|
+
and other arguements (<https://docs.geoserver.org/stable/en/user/services/wfs/reference.html>)
|
|
631
639
|
in all the getFeature requests.
|
|
632
640
|
|
|
633
|
-
Example: you can use this to set a
|
|
641
|
+
Example: you can use this to set a cql\_filter, limit the numbers of features, etc.
|
|
634
642
|
|
|
635
643
|
##### Parameters
|
|
636
644
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
645
|
+
* `paramName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
646
|
+
* `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** (optional, default `null`)
|
|
647
|
+
* `refresh` (optional, default `true`)
|
|
640
648
|
|
|
641
649
|
Returns **URLSearchParams** 
|
|
642
650
|
|
|
643
651
|
### Options
|
|
644
652
|
|
|
645
|
-
|
|
653
|
+
***\[interface]*** - Wfst Options specified when creating a Wfst instance
|
|
646
654
|
|
|
647
655
|
Default values:
|
|
648
656
|
|
|
649
657
|
```javascript
|
|
650
|
-
{
|
|
651
|
-
layers: null,
|
|
652
|
-
evtType: 'singleclick',
|
|
653
|
-
active: true,
|
|
654
|
-
showControl: true,
|
|
655
|
-
language: 'en',
|
|
656
|
-
i18n: {...}, // according to language selection
|
|
657
|
-
uploadFormats: '.geojson,.json,.kml',
|
|
658
|
-
processUpload: null,
|
|
658
|
+
{
|
|
659
|
+
layers: null,
|
|
660
|
+
evtType: 'singleclick',
|
|
661
|
+
active: true,
|
|
662
|
+
showControl: true,
|
|
663
|
+
language: 'en',
|
|
664
|
+
i18n: {...}, // according to language selection
|
|
665
|
+
uploadFormats: '.geojson,.json,.kml',
|
|
666
|
+
processUpload: null,
|
|
659
667
|
}
|
|
660
668
|
```
|
|
661
669
|
|
|
662
670
|
#### processUpload
|
|
663
671
|
|
|
664
|
-
Triggered to allow implement custom functions or to parse other formats than default
|
|
665
|
-
by filtering the extension. If this doesn't return features, the default function
|
|
672
|
+
Triggered to allow implement custom functions or to parse other formats than default
|
|
673
|
+
by filtering the extension. If this doesn't return features, the default function
|
|
666
674
|
will be used to extract them.
|
|
667
675
|
|
|
668
676
|
##### Parameters
|
|
669
677
|
|
|
670
|
-
|
|
678
|
+
* `file` **File** 
|
|
671
679
|
|
|
672
680
|
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<Feature\<Geometry>>** 
|
|
673
681
|
|
|
@@ -721,40 +729,40 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob
|
|
|
721
729
|
|
|
722
730
|
#### uploadFormats
|
|
723
731
|
|
|
724
|
-
Accepted extension formats on upload
|
|
732
|
+
Accepted extension formats on upload
|
|
725
733
|
Example: ".json,.geojson"
|
|
726
734
|
|
|
727
735
|
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
728
736
|
|
|
729
737
|
### LayerOptions
|
|
730
738
|
|
|
731
|
-
**Extends Omit\<
|
|
739
|
+
**Extends Omit\<VectorLayerOptions\<any>, 'source'>**
|
|
732
740
|
|
|
733
|
-
|
|
741
|
+
***\[interface]*** - Parameters to create the layers and connect to the GeoServer
|
|
734
742
|
|
|
735
743
|
You can use all the parameters supported by OpenLayers
|
|
736
744
|
|
|
737
745
|
Default values:
|
|
738
746
|
|
|
739
747
|
```javascript
|
|
740
|
-
{
|
|
741
|
-
name: null,
|
|
742
|
-
geoserver: null,
|
|
743
|
-
label: null, // `name` if not provided
|
|
744
|
-
strategy: all,
|
|
745
|
-
geoserverVendor: null
|
|
748
|
+
{
|
|
749
|
+
name: null,
|
|
750
|
+
geoserver: null,
|
|
751
|
+
label: null, // `name` if not provided
|
|
752
|
+
strategy: all,
|
|
753
|
+
geoserverVendor: null
|
|
746
754
|
}
|
|
747
755
|
```
|
|
748
756
|
|
|
749
757
|
#### beforeTransactFeature
|
|
750
758
|
|
|
751
|
-
Triggered before inserting new features to the Geoserver.
|
|
759
|
+
Triggered before inserting new features to the Geoserver.
|
|
752
760
|
Use this to insert custom properties, modify the feature, etc.
|
|
753
761
|
|
|
754
762
|
##### Parameters
|
|
755
763
|
|
|
756
|
-
|
|
757
|
-
|
|
764
|
+
* `feature` **Feature\<Geometry>** 
|
|
765
|
+
* `transaction` **TransactionType** 
|
|
758
766
|
|
|
759
767
|
Returns **Feature\<Geometry>** 
|
|
760
768
|
|
|
@@ -784,15 +792,15 @@ Type: ([WfsGeoserverVendor](#wfsgeoservervendor) | [WmsGeoserverVendor](#wmsgeos
|
|
|
784
792
|
|
|
785
793
|
#### strategy
|
|
786
794
|
|
|
787
|
-
Strategy function for loading features.
|
|
788
|
-
Only for WFS
|
|
795
|
+
Strategy function for loading features.
|
|
796
|
+
Only for WFS
|
|
789
797
|
By default `all` strategy is used
|
|
790
798
|
|
|
791
799
|
Type: LoadingStrategy
|
|
792
800
|
|
|
793
801
|
### GeoserverOptions
|
|
794
802
|
|
|
795
|
-
|
|
803
|
+
***\[interface]***
|
|
796
804
|
|
|
797
805
|
#### url
|
|
798
806
|
|
|
@@ -808,14 +816,14 @@ Type: [GeoServerAdvanced](#geoserveradvanced)
|
|
|
808
816
|
|
|
809
817
|
#### headers
|
|
810
818
|
|
|
811
|
-
Http headers for GeoServer requests
|
|
819
|
+
Http headers for GeoServer requests
|
|
812
820
|
<https://developer.mozilla.org/en-US/docs/Web/API/Request/headers>
|
|
813
821
|
|
|
814
822
|
Type: HeadersInit
|
|
815
823
|
|
|
816
824
|
#### credentials
|
|
817
825
|
|
|
818
|
-
Credentials for fetch requests
|
|
826
|
+
Credentials for fetch requests
|
|
819
827
|
<https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials>
|
|
820
828
|
|
|
821
829
|
Default is 'same-origin'
|
|
@@ -824,31 +832,31 @@ Type: RequestCredentials
|
|
|
824
832
|
|
|
825
833
|
#### useLockFeature
|
|
826
834
|
|
|
827
|
-
Use LockFeatue request on GeoServer when selecting features. Prevents a feature from being edited
|
|
828
|
-
through a persistent feature lock. This is not always supportedd by the GeoServer.
|
|
835
|
+
Use LockFeatue request on GeoServer when selecting features. Prevents a feature from being edited
|
|
836
|
+
through a persistent feature lock. This is not always supportedd by the GeoServer.
|
|
829
837
|
See <https://docs.geoserver.org/stable/en/user/services/wfs/reference.html>
|
|
830
838
|
|
|
831
839
|
Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
|
|
832
840
|
|
|
833
841
|
### GeoServerAdvanced
|
|
834
842
|
|
|
835
|
-
|
|
843
|
+
***\[interface]***
|
|
836
844
|
|
|
837
|
-
|
|
845
|
+
* Default values:
|
|
838
846
|
|
|
839
847
|
```javascript
|
|
840
|
-
{
|
|
841
|
-
getCapabilitiesVersion: '1.3.0',
|
|
842
|
-
getFeatureVersion: '1.0.0',
|
|
843
|
-
describeFeatureTypeVersion: '1.1.0',
|
|
844
|
-
lockFeatureVersion: '1.1.0',
|
|
845
|
-
wfsTransactionVersion: '1.1.0',
|
|
846
|
-
projection: 'EPSG:3857',
|
|
847
|
-
lockFeatureParams: {
|
|
848
|
-
expiry: 5,
|
|
849
|
-
lockId: 'Geoserver',
|
|
850
|
-
releaseAction: 'SOME'
|
|
851
|
-
}
|
|
848
|
+
{
|
|
849
|
+
getCapabilitiesVersion: '1.3.0',
|
|
850
|
+
getFeatureVersion: '1.0.0',
|
|
851
|
+
describeFeatureTypeVersion: '1.1.0',
|
|
852
|
+
lockFeatureVersion: '1.1.0',
|
|
853
|
+
wfsTransactionVersion: '1.1.0',
|
|
854
|
+
projection: 'EPSG:3857',
|
|
855
|
+
lockFeatureParams: {
|
|
856
|
+
expiry: 5,
|
|
857
|
+
lockId: 'Geoserver',
|
|
858
|
+
releaseAction: 'SOME'
|
|
859
|
+
}
|
|
852
860
|
}
|
|
853
861
|
```
|
|
854
862
|
|
|
@@ -856,7 +864,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob
|
|
|
856
864
|
|
|
857
865
|
**Extends BaseGeoserverVendor**
|
|
858
866
|
|
|
859
|
-
|
|
867
|
+
***\[interface]*** - WFS geoserver options
|
|
860
868
|
<https://docs.geoserver.org/latest/en/user/services/wfs/vendor.html>
|
|
861
869
|
|
|
862
870
|
#### strict
|
|
@@ -869,7 +877,7 @@ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob
|
|
|
869
877
|
|
|
870
878
|
**Extends BaseGeoserverVendor**
|
|
871
879
|
|
|
872
|
-
|
|
880
|
+
***\[interface]*** - WMS geoserver options
|
|
873
881
|
<https://docs.geoserver.org/latest/en/user/services/wms/vendor.html>
|
|
874
882
|
|
|
875
883
|
#### buffer
|
|
@@ -892,8 +900,8 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
892
900
|
|
|
893
901
|
#### styles
|
|
894
902
|
|
|
895
|
-
Styles in which layers are to be rendered.
|
|
896
|
-
Value is a comma-separated list of style names, or empty if default styling is required.
|
|
903
|
+
Styles in which layers are to be rendered.
|
|
904
|
+
Value is a comma-separated list of style names, or empty if default styling is required.
|
|
897
905
|
Style names may be empty in the list, to use default layer styling.
|
|
898
906
|
|
|
899
907
|
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
@@ -912,19 +920,19 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
912
920
|
|
|
913
921
|
#### time
|
|
914
922
|
|
|
915
|
-
Time value or range for map data.
|
|
923
|
+
Time value or range for map data.
|
|
916
924
|
See [Time Support in GeoServer WMS](https://docs.geoserver.org/stable/en/user/services/wms/time.html#wms-time) for more information.
|
|
917
925
|
|
|
918
926
|
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
919
927
|
|
|
920
928
|
#### sld
|
|
921
929
|
|
|
922
|
-
A URL referencing a [StyledLayerDescriptor](https://docs.geoserver.org/stable/en/user/styling/index.html#styling)
|
|
930
|
+
A URL referencing a [StyledLayerDescriptor](https://docs.geoserver.org/stable/en/user/styling/index.html#styling)
|
|
923
931
|
XML file which controls or enhances map layers and styling
|
|
924
932
|
|
|
925
933
|
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
926
934
|
|
|
927
|
-
####
|
|
935
|
+
#### sld\_body
|
|
928
936
|
|
|
929
937
|
A URL-encoded StyledLayerDescriptor XML document which controls or enhances map layers and styling
|
|
930
938
|
|
|
@@ -932,7 +940,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
932
940
|
|
|
933
941
|
### IGeoserverDescribeFeatureType
|
|
934
942
|
|
|
935
|
-
|
|
943
|
+
***\[interface]*** - Geoserver original response on DescribeFeature request
|
|
936
944
|
|
|
937
945
|
#### \_parsed
|
|
938
946
|
|
|
@@ -942,7 +950,7 @@ Type: {namespace: [string](https://developer.mozilla.org/docs/Web/JavaScript/Ref
|
|
|
942
950
|
|
|
943
951
|
### I18n
|
|
944
952
|
|
|
945
|
-
|
|
953
|
+
***\[interface]*** - Custom Language specified when creating a WFST instance
|
|
946
954
|
|
|
947
955
|
#### labels
|
|
948
956
|
|
|
@@ -958,17 +966,17 @@ Type: {capabilities: [string](https://developer.mozilla.org/docs/Web/JavaScript/
|
|
|
958
966
|
|
|
959
967
|
## TODO
|
|
960
968
|
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
969
|
+
* \~~Add support to diferent layer styles~~
|
|
970
|
+
* \~~Improve widget controller: visibility toggle~~
|
|
971
|
+
* \~~Add events~~
|
|
972
|
+
* Add `Don't show again` option in the error modal
|
|
973
|
+
* Allow selection of multiples features and bulk edit
|
|
974
|
+
* Add customizables styles
|
|
975
|
+
* Improve scss (add variables)
|
|
976
|
+
* Add cookies to persist widget controller state
|
|
977
|
+
* Geometry type *LinearRing* support
|
|
978
|
+
* Tests!
|
|
979
|
+
* Improve comments and documentation
|
|
980
|
+
* Improve interface
|
|
981
|
+
* Change svg imports to preserve svg structure
|
|
982
|
+
* Improve style on editing and drawing features
|