ol-wfst 4.2.0 → 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 +20 -21
- package/dist/@enums.d.ts +17 -0
- package/dist/@enums.d.ts.map +1 -0
- package/dist/@types.d.ts +201 -0
- package/dist/@types.d.ts.map +1 -0
- package/dist/Geoserver.d.ts +275 -0
- package/dist/Geoserver.d.ts.map +1 -0
- package/dist/WfsLayer.d.ts +53 -0
- package/dist/WfsLayer.d.ts.map +1 -0
- package/dist/WmsLayer.d.ts +69 -0
- package/dist/WmsLayer.d.ts.map +1 -0
- package/dist/css/ol-wfst.bootstrap5.css +18 -18
- 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 +4 -0
- package/dist/defaults.d.ts.map +1 -0
- package/dist/index-umd.d.ts +3 -0
- package/dist/index-umd.d.ts.map +1 -0
- package/dist/modules/EditControlChanges.d.ts +18 -0
- package/dist/modules/EditControlChanges.d.ts.map +1 -0
- package/dist/modules/EditFieldsModal.d.ts +19 -0
- package/dist/modules/EditFieldsModal.d.ts.map +1 -0
- package/dist/modules/EditOverlay.d.ts +8 -0
- package/dist/modules/EditOverlay.d.ts.map +1 -0
- package/dist/modules/LayersControl.d.ts +38 -0
- package/dist/modules/LayersControl.d.ts.map +1 -0
- package/dist/modules/Uploads.d.ts +50 -0
- package/dist/modules/Uploads.d.ts.map +1 -0
- package/dist/modules/base/BaseLayer.d.ts +62 -0
- package/dist/modules/base/BaseLayer.d.ts.map +1 -0
- package/dist/modules/base/WfsSource.d.ts +49 -0
- package/dist/modules/base/WfsSource.d.ts.map +1 -0
- package/dist/modules/base/WmsSource.d.ts +47 -0
- package/dist/modules/base/WmsSource.d.ts.map +1 -0
- package/dist/modules/editLayer.d.ts +4 -0
- package/dist/modules/editLayer.d.ts.map +1 -0
- package/dist/modules/errors.d.ts +12 -0
- package/dist/modules/errors.d.ts.map +1 -0
- package/dist/modules/helpers.d.ts +7 -0
- package/dist/modules/helpers.d.ts.map +1 -0
- package/dist/modules/i18n/en.d.ts +3 -0
- package/dist/modules/i18n/en.d.ts.map +1 -0
- package/dist/modules/i18n/es.d.ts +3 -0
- package/dist/modules/i18n/es.d.ts.map +1 -0
- package/dist/modules/i18n/index.d.ts +15 -0
- package/dist/modules/i18n/index.d.ts.map +1 -0
- package/dist/modules/i18n/zh.d.ts +3 -0
- package/dist/modules/i18n/zh.d.ts.map +1 -0
- package/dist/modules/loading.d.ts +3 -0
- package/dist/modules/loading.d.ts.map +1 -0
- package/dist/modules/state.d.ts +22 -0
- package/dist/modules/state.d.ts.map +1 -0
- package/dist/modules/styleFunction.d.ts +13 -0
- package/dist/modules/styleFunction.d.ts.map +1 -0
- package/dist/myPragma.d.ts +2 -0
- package/dist/myPragma.d.ts.map +1 -0
- package/dist/ol-wfst.d.ts +335 -0
- package/dist/ol-wfst.d.ts.map +1 -0
- package/dist/ol-wfst.js +24 -11
- 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/Geoserver.d.ts.map +1 -1
- package/lib/modules/LayersControl.d.ts +8 -4
- package/lib/modules/LayersControl.d.ts.map +1 -1
- package/lib/modules/base/WfsSource.d.ts +2 -1
- package/lib/modules/base/WfsSource.d.ts.map +1 -1
- package/lib/ol-wfst.d.ts +19 -21
- package/lib/ol-wfst.d.ts.map +1 -1
- package/lib/ol-wfst.js +24 -11
- 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 +18 -18
- package/lib/style/scss/ol-wfst.scss +80 -58
- package/package.json +5 -5
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
</a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
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:
|
|
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
|
-
Tested with OpenLayers version 5, 6, 7 and
|
|
17
|
+
Tested with OpenLayers version 5, 6, 7, 8 and 9.
|
|
18
18
|
|
|
19
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;">
|
|
@@ -126,7 +126,6 @@ map.addControl(wfst);
|
|
|
126
126
|
See \[#wfsSource]
|
|
127
127
|
|
|
128
128
|
```js
|
|
129
|
-
|
|
130
129
|
wmsLayer.setCustomParam('cql_filter', `id = 28`);
|
|
131
130
|
wmsLayer.setCustomParam('env', `tags=true`);
|
|
132
131
|
```
|
|
@@ -221,14 +220,14 @@ See [CHANGELOG](./CHANGELOG.md) for details of changes in each release.
|
|
|
221
220
|
Load `ol-wfst.js` after OpenLayers. The available classes are `Wfst`, `Wfst.Geoserver`, `Wfst.WfsLayer` and `Wfst.WmsLayer`.
|
|
222
221
|
|
|
223
222
|
```HTML
|
|
224
|
-
<script src="https://unpkg.com/ol-wfst@4.
|
|
223
|
+
<script src="https://unpkg.com/ol-wfst@4.3.0"></script>
|
|
225
224
|
```
|
|
226
225
|
|
|
227
226
|
#### CSS
|
|
228
227
|
|
|
229
228
|
```HTML
|
|
230
|
-
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@4.
|
|
231
|
-
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@4.
|
|
229
|
+
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@4.3.0/dist/css/ol-wfst.min.css" />
|
|
230
|
+
<link rel="stylesheet" href="https://unpkg.com/ol-wfst@4.3.0/dist/css/ol-wfst.bootstrap5.min.css" />
|
|
232
231
|
```
|
|
233
232
|
|
|
234
233
|
### Parcel, Webpack, etc.
|
|
@@ -428,7 +427,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
428
427
|
|
|
429
428
|
**Extends ol/control/[Control](https://openlayers.org/en/latest/apidoc/module-ol_control_Control-Control.html)~[Control](https://openlayers.org/en/latest/apidoc/module-ol_control_Control-Control.html)**
|
|
430
429
|
|
|
431
|
-
Tiny
|
|
430
|
+
Tiny WFS-T client to insert (drawing/uploading), modify and delete
|
|
432
431
|
features on GeoServers using OpenLayers. Layers with these types
|
|
433
432
|
of geometries are supported: "GeometryCollection" (in this case, you can
|
|
434
433
|
choose the geometry type of each element to draw), "Point", "MultiPoint",
|
|
@@ -973,17 +972,17 @@ Type: {capabilities: [string](https://developer.mozilla.org/docs/Web/JavaScript/
|
|
|
973
972
|
|
|
974
973
|
## TODO
|
|
975
974
|
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
975
|
+
- ~~Add support to diferent layer styles~~
|
|
976
|
+
- ~~Improve widget controller: visibility toggle~~
|
|
977
|
+
- ~~Add events~~
|
|
978
|
+
- Add `Don't show again` option in the error modal
|
|
979
|
+
- Allow selection of multiples features and bulk edit
|
|
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
|
package/dist/@enums.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum GeometryType {
|
|
2
|
+
Point = "Point",
|
|
3
|
+
LineString = "LineString",
|
|
4
|
+
LinearRing = "LinearRing",
|
|
5
|
+
Polygon = "Polygon",
|
|
6
|
+
MultiPoint = "MultiPoint",
|
|
7
|
+
MultiLineString = "MultiLineString",
|
|
8
|
+
MultiPolygon = "MultiPolygon",
|
|
9
|
+
GeometryCollection = "GeometryCollection",
|
|
10
|
+
Circle = "Circle"
|
|
11
|
+
}
|
|
12
|
+
export declare enum TransactionType {
|
|
13
|
+
Insert = "insert",
|
|
14
|
+
Delete = "delete",
|
|
15
|
+
Update = "update"
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=@enums.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"@enums.d.ts","sourceRoot":"","sources":["../src/@enums.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACpB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,eAAe,oBAAoB;IACnC,YAAY,iBAAiB;IAC7B,kBAAkB,uBAAuB;IACzC,MAAM,WAAW;CACpB;AAED,oBAAY,eAAe;IACvB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CACpB"}
|
package/dist/@types.d.ts
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { GeometryType } from './@enums';
|
|
2
|
+
import WfsLayer from './WfsLayer';
|
|
3
|
+
import WmsLayer from './WmsLayer';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface BaseGeoserverVendor {
|
|
8
|
+
/**
|
|
9
|
+
* https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#cql-filter
|
|
10
|
+
*/
|
|
11
|
+
cql_filter?: string;
|
|
12
|
+
/**
|
|
13
|
+
* https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#sortBy
|
|
14
|
+
*/
|
|
15
|
+
sortBy?: string;
|
|
16
|
+
/**
|
|
17
|
+
* https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#featureid
|
|
18
|
+
*/
|
|
19
|
+
featureid?: string;
|
|
20
|
+
/**
|
|
21
|
+
* https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#filter
|
|
22
|
+
*/
|
|
23
|
+
filter?: string;
|
|
24
|
+
/**
|
|
25
|
+
* WMS: https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#format-options
|
|
26
|
+
* WFS: https://docs.geoserver.org/latest/en/user/services/wfs/vendor.html#format-options
|
|
27
|
+
*/
|
|
28
|
+
format_options?: string;
|
|
29
|
+
/**
|
|
30
|
+
* https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#maxfeatures-and-startindex
|
|
31
|
+
*/
|
|
32
|
+
maxFeatures?: string | number;
|
|
33
|
+
/**
|
|
34
|
+
* https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#maxfeatures-and-startindex
|
|
35
|
+
*/
|
|
36
|
+
startIndex?: string | number;
|
|
37
|
+
/**
|
|
38
|
+
* https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#propertyname
|
|
39
|
+
*/
|
|
40
|
+
propertyname?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Add any other param
|
|
43
|
+
*/
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* **_[interface]_** - WFS geoserver options
|
|
48
|
+
* https://docs.geoserver.org/latest/en/user/services/wfs/vendor.html
|
|
49
|
+
* @public
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
export interface WfsGeoserverVendor extends BaseGeoserverVendor {
|
|
53
|
+
/**
|
|
54
|
+
* https://docs.geoserver.org/latest/en/user/services/wfs/vendor.html#xml-request-validation
|
|
55
|
+
*/
|
|
56
|
+
strict?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* **_[interface]_** - WMS geoserver options
|
|
60
|
+
* https://docs.geoserver.org/latest/en/user/services/wms/vendor.html
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
export interface WmsGeoserverVendor extends BaseGeoserverVendor {
|
|
64
|
+
/**
|
|
65
|
+
* https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#buffer
|
|
66
|
+
*/
|
|
67
|
+
buffer?: string | number;
|
|
68
|
+
/**
|
|
69
|
+
* https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#env
|
|
70
|
+
*/
|
|
71
|
+
env?: string;
|
|
72
|
+
/**
|
|
73
|
+
* https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#clip
|
|
74
|
+
*/
|
|
75
|
+
clip?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Styles in which layers are to be rendered.
|
|
78
|
+
* Value is a comma-separated list of style names, or empty if default styling is required.
|
|
79
|
+
* Style names may be empty in the list, to use default layer styling.
|
|
80
|
+
*/
|
|
81
|
+
styles?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Whether the map background should be transparent. Values are true or false. Default is false
|
|
84
|
+
*/
|
|
85
|
+
transparent?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Background color for the map image. Value is in the form RRGGBB. Default is FFFFFF (white).
|
|
88
|
+
*/
|
|
89
|
+
bgcolor?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Time value or range for map data.
|
|
92
|
+
* See [Time Support in GeoServer WMS](https://docs.geoserver.org/stable/en/user/services/wms/time.html#wms-time) for more information.
|
|
93
|
+
*/
|
|
94
|
+
time?: string;
|
|
95
|
+
/**
|
|
96
|
+
* A URL referencing a [StyledLayerDescriptor](https://docs.geoserver.org/stable/en/user/styling/index.html#styling)
|
|
97
|
+
* XML file which controls or enhances map layers and styling
|
|
98
|
+
*/
|
|
99
|
+
sld?: string;
|
|
100
|
+
/**
|
|
101
|
+
* A URL-encoded StyledLayerDescriptor XML document which controls or enhances map layers and styling
|
|
102
|
+
*/
|
|
103
|
+
sld_body?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface ExceptionGeoserver {
|
|
106
|
+
code: string;
|
|
107
|
+
locator: string;
|
|
108
|
+
text: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* **_[interface]_** - Geoserver original response on DescribeFeature request
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
export interface IGeoserverDescribeFeatureType {
|
|
115
|
+
exceptions?: ExceptionGeoserver[];
|
|
116
|
+
elementFormDefault: string;
|
|
117
|
+
targetNamespace: string;
|
|
118
|
+
targetPrefix: string;
|
|
119
|
+
featureTypes: Array<{
|
|
120
|
+
typeName: string;
|
|
121
|
+
properties: Array<{
|
|
122
|
+
name: string;
|
|
123
|
+
nillable: boolean;
|
|
124
|
+
maxOccurs: number;
|
|
125
|
+
minOccurs: number;
|
|
126
|
+
type: string;
|
|
127
|
+
localType: string;
|
|
128
|
+
}>;
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* DescribeFeature request parsed
|
|
132
|
+
*/
|
|
133
|
+
_parsed: {
|
|
134
|
+
namespace: string;
|
|
135
|
+
properties: any;
|
|
136
|
+
geomType: GeometryType;
|
|
137
|
+
geomField: string;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* **_[interface]_**
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
144
|
+
export interface IWfstLayersList {
|
|
145
|
+
[key: string]: WfsLayer | WmsLayer;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* **_[interface]_**
|
|
149
|
+
* @private
|
|
150
|
+
*/
|
|
151
|
+
export interface IGeoserverOptions {
|
|
152
|
+
hasTransaction?: boolean;
|
|
153
|
+
hasLockFeature?: boolean;
|
|
154
|
+
useLockFeature?: boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* **_[interface]_** - Custom Language specified when creating a WFST instance
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
export interface I18n {
|
|
161
|
+
/** Labels section */
|
|
162
|
+
labels?: {
|
|
163
|
+
select?: string;
|
|
164
|
+
addElement?: string;
|
|
165
|
+
editElement?: string;
|
|
166
|
+
save?: string;
|
|
167
|
+
delete?: string;
|
|
168
|
+
cancel?: string;
|
|
169
|
+
apply?: string;
|
|
170
|
+
upload?: string;
|
|
171
|
+
editMode?: string;
|
|
172
|
+
confirmDelete?: string;
|
|
173
|
+
geomTypeNotSupported?: string;
|
|
174
|
+
editFields?: string;
|
|
175
|
+
editGeom?: string;
|
|
176
|
+
selectDrawType?: string;
|
|
177
|
+
uploadToLayer?: string;
|
|
178
|
+
uploadFeatures?: string;
|
|
179
|
+
validFeatures?: string;
|
|
180
|
+
invalidFeatures?: string;
|
|
181
|
+
loading?: string;
|
|
182
|
+
toggleVisibility?: string;
|
|
183
|
+
close?: string;
|
|
184
|
+
};
|
|
185
|
+
/** Errors section */
|
|
186
|
+
errors?: {
|
|
187
|
+
capabilities?: string;
|
|
188
|
+
wfst?: string;
|
|
189
|
+
layer?: string;
|
|
190
|
+
layerNotFound?: string;
|
|
191
|
+
layerNotVisible?: string;
|
|
192
|
+
noValidGeometry?: string;
|
|
193
|
+
geoserver?: string;
|
|
194
|
+
badFormat?: string;
|
|
195
|
+
badFile?: string;
|
|
196
|
+
lockFeature?: string;
|
|
197
|
+
transaction?: string;
|
|
198
|
+
getFeatures?: string;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=@types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"@types.d.ts","sourceRoot":"","sources":["../src/@types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,QAAQ,MAAM,Y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
3
|
+
import { ProjectionLike } from 'ol/proj.js';
|
|
4
|
+
import Circle from 'ol/geom/Circle.js';
|
|
5
|
+
import Geometry from 'ol/geom/Geometry.js';
|
|
6
|
+
import GeometryCollection from 'ol/geom/GeometryCollection.js';
|
|
7
|
+
import Feature from 'ol/Feature.js';
|
|
8
|
+
import GeoJSON from 'ol/format/GeoJSON.js';
|
|
9
|
+
import KML from 'ol/format/KML.js';
|
|
10
|
+
import WFS from 'ol/format/WFS.js';
|
|
11
|
+
import { State } from 'ol/source/Source.js';
|
|
12
|
+
import BaseEvent from 'ol/events/Event.js';
|
|
13
|
+
import { CombinedOnSignature, EventTypes, OnSignature } from 'ol/Observable.js';
|
|
14
|
+
import { EventsKey } from 'ol/events.js';
|
|
15
|
+
import { TransactionResponse } from 'ol/format/WFS.js';
|
|
16
|
+
import { TransactionType } from './@enums';
|
|
17
|
+
/**
|
|
18
|
+
* @fires change:capabilities
|
|
19
|
+
* @extends {ol/Object~BaseObject}
|
|
20
|
+
* @param options
|
|
21
|
+
*/
|
|
22
|
+
export default class Geoserver extends BaseObject {
|
|
23
|
+
protected _options: GeoserverOptions;
|
|
24
|
+
protected _countRequests: number;
|
|
25
|
+
protected _insertFeatures: Array<Feature<Geometry>>;
|
|
26
|
+
protected _updateFeatures: Array<Feature<Geometry>>;
|
|
27
|
+
protected _deleteFeatures: Array<Feature<Geometry>>;
|
|
28
|
+
protected _formatWFS: WFS;
|
|
29
|
+
protected _formatGeoJSON: GeoJSON;
|
|
30
|
+
protected _formatKml: KML;
|
|
31
|
+
protected _xs: XMLSerializer;
|
|
32
|
+
protected state_: State;
|
|
33
|
+
on: OnSignature<EventTypes, BaseEvent, EventsKey> & OnSignature<GeoserverEventTypes | ObjectEventTypes, ObjectEvent, EventsKey> & CombinedOnSignature<GeoserverEventTypes | ObjectEventTypes | EventTypes, EventsKey>;
|
|
34
|
+
once: OnSignature<EventTypes, BaseEvent, EventsKey> & OnSignature<GeoserverEventTypes | ObjectEventTypes, ObjectEvent, EventsKey> & CombinedOnSignature<GeoserverEventTypes | ObjectEventTypes | EventTypes, EventsKey>;
|
|
35
|
+
un: OnSignature<EventTypes, BaseEvent, void> & OnSignature<GeoserverEventTypes | ObjectEventTypes, ObjectEvent, void> & CombinedOnSignature<GeoserverEventTypes | ObjectEventTypes | EventTypes, void>;
|
|
36
|
+
constructor(options: GeoserverOptions);
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @returns
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
getCapabilities(): XMLDocument;
|
|
43
|
+
/**
|
|
44
|
+
* Only work for `2.0.0` getCapabilities version
|
|
45
|
+
* @returns
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
getParsedCapabilities(): any;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param url
|
|
52
|
+
* @param opt_silent
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
setUrl(url: string, opt_silent?: boolean): void;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
60
|
+
getUrl(): string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @param headers
|
|
64
|
+
* @param opt_silent
|
|
65
|
+
* @returns
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
setHeaders(headers?: HeadersInit, opt_silent?: boolean): void;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @returns
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
getHeaders(): HeadersInit;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @param credentials
|
|
78
|
+
* @param opt_silent
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
setCredentials(credentials?: RequestCredentials, opt_silent?: boolean): void;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @returns
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
getCredentials(): RequestCredentials;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @returns
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
setAdvanced(advanced?: GeoServerAdvanced, opt_silent?: boolean): void;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @returns
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
getAdvanced(): GeoServerAdvanced;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @returns
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
hasTransaction(): boolean;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @returns
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
hasLockFeature(): boolean;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @returns
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
117
|
+
getUseLockFeature(): boolean;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @returns
|
|
121
|
+
* @public
|
|
122
|
+
*/
|
|
123
|
+
setUseLockFeature(useLockFeature: boolean, opt_silent?: boolean): void;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @returns
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
isLoaded(): boolean;
|
|
130
|
+
/**
|
|
131
|
+
*
|
|
132
|
+
* @returns
|
|
133
|
+
*/
|
|
134
|
+
getState(): State;
|
|
135
|
+
/**
|
|
136
|
+
* Get the capabilities from the GeoServer and check
|
|
137
|
+
* all the available operations.
|
|
138
|
+
*
|
|
139
|
+
* @fires getcapabilities
|
|
140
|
+
* @public
|
|
141
|
+
*/
|
|
142
|
+
getAndUpdateCapabilities(): Promise<XMLDocument>;
|
|
143
|
+
/**
|
|
144
|
+
*
|
|
145
|
+
* @private
|
|
146
|
+
*/
|
|
147
|
+
_checkGeoserverCapabilities(): void;
|
|
148
|
+
/**
|
|
149
|
+
* Make the WFS Transactions
|
|
150
|
+
*
|
|
151
|
+
* @param transactionType
|
|
152
|
+
* @param features
|
|
153
|
+
* @param layerName
|
|
154
|
+
* @private
|
|
155
|
+
*/
|
|
156
|
+
transact(transactionType: TransactionType, features: Array<Feature<Geometry>> | Feature<Geometry>, layerName: string): Promise<TransactionResponse | false>;
|
|
157
|
+
/**
|
|
158
|
+
* @privatwe
|
|
159
|
+
*/
|
|
160
|
+
_removeFeatures(features: Feature<Geometry>[]): void;
|
|
161
|
+
/**
|
|
162
|
+
*
|
|
163
|
+
* @param feature
|
|
164
|
+
* @param geom
|
|
165
|
+
* @private
|
|
166
|
+
*/
|
|
167
|
+
_transformCircleToPolygon(feature: Feature<Geometry>, geom: Circle): void;
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
* @param feature
|
|
171
|
+
* @private
|
|
172
|
+
* @param geom
|
|
173
|
+
*/
|
|
174
|
+
_transformGeoemtryCollectionToGeometries(feature: Feature<Geometry>, geom: GeometryCollection): void;
|
|
175
|
+
/**
|
|
176
|
+
*
|
|
177
|
+
* @param feature
|
|
178
|
+
* @returns
|
|
179
|
+
* @private
|
|
180
|
+
*/
|
|
181
|
+
_cloneFeature(feature: Feature<Geometry>): Feature<Geometry>;
|
|
182
|
+
/**
|
|
183
|
+
* Lock a feature in the geoserver. Useful before editing a geometry,
|
|
184
|
+
* to avoid changes from multiples suers
|
|
185
|
+
*
|
|
186
|
+
* @param featureId
|
|
187
|
+
* @param layerName
|
|
188
|
+
* @param retry
|
|
189
|
+
* @public
|
|
190
|
+
*/
|
|
191
|
+
lockFeature(featureId: string | number, layerName: string, retry?: number): Promise<string>;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* **_[interface]_**
|
|
195
|
+
* @public
|
|
196
|
+
*/
|
|
197
|
+
export interface GeoserverOptions {
|
|
198
|
+
/**
|
|
199
|
+
* Url for OWS services. This endpoint will recive the WFS, WFST and WMS requests
|
|
200
|
+
*
|
|
201
|
+
*/
|
|
202
|
+
url: string;
|
|
203
|
+
/**
|
|
204
|
+
* Advanced options for geoserver requests
|
|
205
|
+
*
|
|
206
|
+
*/
|
|
207
|
+
advanced?: GeoServerAdvanced;
|
|
208
|
+
/**
|
|
209
|
+
* Http headers for GeoServer requests
|
|
210
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Request/headers
|
|
211
|
+
*
|
|
212
|
+
*/
|
|
213
|
+
headers?: HeadersInit;
|
|
214
|
+
/**
|
|
215
|
+
* Credentials for fetch requests
|
|
216
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials
|
|
217
|
+
*
|
|
218
|
+
* Default is 'same-origin'
|
|
219
|
+
*/
|
|
220
|
+
credentials?: RequestCredentials;
|
|
221
|
+
/**
|
|
222
|
+
* Use LockFeatue request on GeoServer when selecting features. Prevents a feature from being edited
|
|
223
|
+
* through a persistent feature lock. This is not always supportedd by the GeoServer.
|
|
224
|
+
* See https://docs.geoserver.org/stable/en/user/services/wfs/reference.html
|
|
225
|
+
*/
|
|
226
|
+
useLockFeature?: boolean;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* **_[interface]_**
|
|
230
|
+
*
|
|
231
|
+
* * Default values:
|
|
232
|
+
* ```javascript
|
|
233
|
+
* {
|
|
234
|
+
* getCapabilitiesVersion: '2.0.0',
|
|
235
|
+
* getFeatureVersion: '1.0.0',
|
|
236
|
+
* describeFeatureTypeVersion: '1.1.0',
|
|
237
|
+
* lockFeatureVersion: '1.1.0',
|
|
238
|
+
* wfsTransactionVersion: '1.1.0',
|
|
239
|
+
* projection: 'EPSG:3857',
|
|
240
|
+
* lockFeatureParams: {
|
|
241
|
+
* expiry: 5,
|
|
242
|
+
* lockId: 'Geoserver',
|
|
243
|
+
* releaseAction: 'SOME'
|
|
244
|
+
* }
|
|
245
|
+
* }
|
|
246
|
+
* @public
|
|
247
|
+
*/
|
|
248
|
+
export interface GeoServerAdvanced {
|
|
249
|
+
getCapabilitiesVersion?: string;
|
|
250
|
+
getFeatureVersion?: string;
|
|
251
|
+
lockFeatureVersion?: string;
|
|
252
|
+
describeFeatureTypeVersion?: string;
|
|
253
|
+
wfsTransactionVersion?: string;
|
|
254
|
+
projection?: ProjectionLike;
|
|
255
|
+
lockFeatureParams?: {
|
|
256
|
+
expiry?: number | string;
|
|
257
|
+
lockId?: string;
|
|
258
|
+
releaseAction?: string;
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
export declare enum GeoserverProperty {
|
|
262
|
+
CAPABILITIES = "capabilities",
|
|
263
|
+
PARSED_CAPABILITIES = "parsedCapabilities",
|
|
264
|
+
URL = "url",
|
|
265
|
+
HEADERS = "headers",
|
|
266
|
+
CREDENTIALS = "credentials",
|
|
267
|
+
ADVANCED = "advanced",
|
|
268
|
+
HASTRASNACTION = "hasTransaction",
|
|
269
|
+
HASLOCKFEATURE = "hasLockFeature",
|
|
270
|
+
HASDESCRIBEFEATURETYPE = "hasDescribeFeatureType",
|
|
271
|
+
USELOCKFEATURE = "useLockFeature",
|
|
272
|
+
ISLOADED = "isLoaded"
|
|
273
|
+
}
|
|
274
|
+
export type GeoserverEventTypes = `change:${GeoserverProperty.CAPABILITIES}` | `change:${GeoserverProperty.PARSED_CAPABILITIES}` | `change:${GeoserverProperty.URL}` | `change:${GeoserverProperty.HEADERS}` | `change:${GeoserverProperty.CREDENTIALS}` | `change:${GeoserverProperty.ADVANCED}` | `change:${GeoserverProperty.HASTRASNACTION}` | `change:${GeoserverProperty.HASLOCKFEATURE}` | `change:${GeoserverProperty.HASDESCRIBEFEATURETYPE}` | `change:${GeoserverProperty.USELOCKFEATURE}` | `change:${GeoserverProperty.ISLOADED}`;
|
|
275
|
+
//# sourceMappingURL=Geoserver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Geoserver.d.ts","sourceRoot":"","sources":["../src/Geoserver.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,EAAE,EAAE,WAA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AiB,CAAC,WAAW,EAAE,GACzC,UAAU,iBAAiB,CAAC,QAAQ,EAAE,GACtC,UAAU,iBAAiB,CAAC,cAAc,EAAE,GAC5C,UAAU,iBAAiB,CAAC,cAAc,EAAE,GAC5C,UAAU,iBAAiB,CAAC,sBAAsB,EAAE,GACpD,UAAU,iBAAiB,CAAC,cAAc,EAAE,GAC5C,UAAU,iBAAiB,CAAC,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import Feature from 'ol/Feature.js';
|
|
2
|
+
import Geometry from 'ol/geom/Geometry.js';
|
|
3
|
+
import VectorLayer from 'ol/layer/Vector.js';
|
|
4
|
+
import BaseEvent from 'ol/events/Event.js';
|
|
5
|
+
import { CombinedOnSignature, EventTypes, OnSignature } from 'ol/Observable.js';
|
|
6
|
+
import { EventsKey } from 'ol/events.js';
|
|
7
|
+
import { LayerRenderEventTypes } from 'ol/render/EventType.js';
|
|
8
|
+
import { BaseLayerObjectEventTypes } from 'ol/layer/Base.js';
|
|
9
|
+
import { ObjectEvent } from 'ol/Object.js';
|
|
10
|
+
import RenderEvent from 'ol/render/Event.js';
|
|
11
|
+
import BaseLayer, { BaseLayerEventTypes } from './modules/base/BaseLayer';
|
|
12
|
+
import WfsSource from './modules/base/WfsSource';
|
|
13
|
+
import { LayerOptions } from './ol-wfst';
|
|
14
|
+
import { TransactionType } from './@enums';
|
|
15
|
+
declare const WfsLayer_base: import("ts-mixer/dist/types/types").Class<any[], BaseLayer & VectorLayer<WfsSource>, typeof BaseLayer & {
|
|
16
|
+
new (options?: import("ol/layer/BaseVector").Options<WfsSource>): VectorLayer<WfsSource>;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Layer to retrieve WFS features from geoservers
|
|
20
|
+
* https://docs.geoserver.org/stable/en/user/services/wfs/reference.html
|
|
21
|
+
*
|
|
22
|
+
* @fires layerRendered
|
|
23
|
+
* @extends {ol/layer/Vector~VectorLayer}
|
|
24
|
+
* @param options
|
|
25
|
+
*/
|
|
26
|
+
export default class WfsLayer extends WfsLayer_base {
|
|
27
|
+
private _loadingCount;
|
|
28
|
+
private _loadedCount;
|
|
29
|
+
beforeTransactFeature: (feature: Feature<Geometry>, transaction: TransactionType) => Feature<Geometry>;
|
|
30
|
+
on: OnSignature<EventTypes, BaseEvent, EventsKey> & OnSignature<BaseLayerEventTypes | BaseLayerObjectEventTypes | 'change:source' | 'sourceready', ObjectEvent, EventsKey> & OnSignature<LayerRenderEventTypes, RenderEvent, EventsKey> & CombinedOnSignature<EventTypes | BaseLayerEventTypes | BaseLayerObjectEventTypes | 'change:source' | 'sourceready' | LayerRenderEventTypes, EventsKey>;
|
|
31
|
+
once: OnSignature<EventTypes, BaseEvent, EventsKey> & OnSignature<BaseLayerEventTypes | BaseLayerObjectEventTypes | 'change:source' | 'sourceready', ObjectEvent, EventsKey> & OnSignature<LayerRenderEventTypes, RenderEvent, EventsKey> & CombinedOnSignature<EventTypes | BaseLayerEventTypes | BaseLayerObjectEventTypes | 'change:source' | 'sourceready' | LayerRenderEventTypes, EventsKey>;
|
|
32
|
+
un: OnSignature<EventTypes, BaseEvent, void> & OnSignature<BaseLayerEventTypes | BaseLayerObjectEventTypes | 'change:source' | 'sourceready', ObjectEvent, void> & OnSignature<LayerRenderEventTypes, RenderEvent, void> & CombinedOnSignature<EventTypes | BaseLayerEventTypes | BaseLayerObjectEventTypes | 'change:source' | 'sourceready' | LayerRenderEventTypes, void>;
|
|
33
|
+
constructor(options: LayerOptions);
|
|
34
|
+
/**
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
refresh(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Use this to update Geoserver Wms Vendors (https://docs.geoserver.org/latest/en/user/services/wms/vendor.html)
|
|
40
|
+
* and other arguements (https://docs.geoserver.org/stable/en/user/services/wms/reference.html#getmap)
|
|
41
|
+
* in all the getMap requests.
|
|
42
|
+
*
|
|
43
|
+
* Example: you can use this to change the style of the WMS, add a custom sld, set a cql_filter, etc.
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
46
|
+
* @param paramName
|
|
47
|
+
* @param value Use `undefined` or `null` to remove the param
|
|
48
|
+
* @param refresh
|
|
49
|
+
*/
|
|
50
|
+
setCustomParam(paramName: string, value?: string, refresh?: boolean): URLSearchParams;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=WfsLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WfsLayer.d.ts","sourceRoot":"","sources":["../src/WfsLayer.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAI7C,OAAO,SAAS,EAAE,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;;;;AAG3C;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,aAAwC;IAC1E,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,YAAY,CAAK;IAElB,qBAAqB,EAAE,CAC1B,OAA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