ol-wfst 4.1.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +20 -20
  2. package/dist/css/ol-wfst.bootstrap5.css +212 -23
  3. package/dist/css/ol-wfst.bootstrap5.min.css +1 -1
  4. package/dist/ol-wfst.js +2643 -2599
  5. package/dist/ol-wfst.js.map +1 -1
  6. package/dist/ol-wfst.min.js +3 -3
  7. package/dist/ol-wfst.min.js.map +1 -1
  8. package/dist/tsconfig.tsbuildinfo +1 -1
  9. package/lib/@enums.d.ts +16 -16
  10. package/lib/@types.d.ts +200 -200
  11. package/lib/Geoserver.d.ts +274 -274
  12. package/lib/WfsLayer.d.ts +52 -52
  13. package/lib/WfsLayer.d.ts.map +1 -1
  14. package/lib/WmsLayer.d.ts +68 -61
  15. package/lib/WmsLayer.d.ts.map +1 -1
  16. package/lib/defaults.d.ts +3 -3
  17. package/lib/index-umd.d.ts +3 -0
  18. package/lib/index-umd.d.ts.map +1 -0
  19. package/lib/modules/EditControlChanges.d.ts +17 -17
  20. package/lib/modules/EditFieldsModal.d.ts +18 -18
  21. package/lib/modules/EditOverlay.d.ts +7 -7
  22. package/lib/modules/LayersControl.d.ts +33 -33
  23. package/lib/modules/Uploads.d.ts +49 -49
  24. package/lib/modules/base/BaseLayer.d.ts +61 -61
  25. package/lib/modules/base/WfsSource.d.ts +47 -47
  26. package/lib/modules/base/WmsSource.d.ts +46 -46
  27. package/lib/modules/editLayer.d.ts +3 -3
  28. package/lib/modules/errors.d.ts +11 -11
  29. package/lib/modules/helpers.d.ts +6 -6
  30. package/lib/modules/i18n/en.d.ts +2 -2
  31. package/lib/modules/i18n/es.d.ts +2 -2
  32. package/lib/modules/i18n/index.d.ts +14 -14
  33. package/lib/modules/i18n/zh.d.ts +2 -2
  34. package/lib/modules/loading.d.ts +2 -2
  35. package/lib/modules/state.d.ts +21 -21
  36. package/lib/modules/styleFunction.d.ts +12 -12
  37. package/lib/myPragma.d.ts +1 -1
  38. package/lib/ol-wfst.d.ts +336 -336
  39. package/lib/ol-wfst.d.ts.map +1 -1
  40. package/lib/ol-wfst.js +2638 -2593
  41. package/lib/ol-wfst.js.map +1 -1
  42. package/lib/style/css/ol-wfst.bootstrap5.css +212 -23
  43. package/lib/style/scss/-ol-wfst.bootstrap5.scss +3 -0
  44. package/lib/style/scss/ol-wfst.scss +1 -0
  45. package/lib/tsconfig.tsbuildinfo +1 -1
  46. package/package.json +12 -13
  47. package/CHANGELOG.md +0 -123
  48. package/dist/@enums.d.ts +0 -17
  49. package/dist/@enums.d.ts.map +0 -1
  50. package/dist/@types.d.ts +0 -201
  51. package/dist/@types.d.ts.map +0 -1
  52. package/dist/Geoserver.d.ts +0 -275
  53. package/dist/Geoserver.d.ts.map +0 -1
  54. package/dist/WfsLayer.d.ts +0 -53
  55. package/dist/WfsLayer.d.ts.map +0 -1
  56. package/dist/WmsLayer.d.ts +0 -62
  57. package/dist/WmsLayer.d.ts.map +0 -1
  58. package/dist/defaults.d.ts +0 -4
  59. package/dist/defaults.d.ts.map +0 -1
  60. package/dist/modules/EditControlChanges.d.ts +0 -18
  61. package/dist/modules/EditControlChanges.d.ts.map +0 -1
  62. package/dist/modules/EditFieldsModal.d.ts +0 -19
  63. package/dist/modules/EditFieldsModal.d.ts.map +0 -1
  64. package/dist/modules/EditOverlay.d.ts +0 -8
  65. package/dist/modules/EditOverlay.d.ts.map +0 -1
  66. package/dist/modules/LayersControl.d.ts +0 -34
  67. package/dist/modules/LayersControl.d.ts.map +0 -1
  68. package/dist/modules/Uploads.d.ts +0 -50
  69. package/dist/modules/Uploads.d.ts.map +0 -1
  70. package/dist/modules/base/BaseLayer.d.ts +0 -62
  71. package/dist/modules/base/BaseLayer.d.ts.map +0 -1
  72. package/dist/modules/base/WfsSource.d.ts +0 -48
  73. package/dist/modules/base/WfsSource.d.ts.map +0 -1
  74. package/dist/modules/base/WmsSource.d.ts +0 -47
  75. package/dist/modules/base/WmsSource.d.ts.map +0 -1
  76. package/dist/modules/editLayer.d.ts +0 -4
  77. package/dist/modules/editLayer.d.ts.map +0 -1
  78. package/dist/modules/errors.d.ts +0 -12
  79. package/dist/modules/errors.d.ts.map +0 -1
  80. package/dist/modules/helpers.d.ts +0 -7
  81. package/dist/modules/helpers.d.ts.map +0 -1
  82. package/dist/modules/i18n/en.d.ts +0 -3
  83. package/dist/modules/i18n/en.d.ts.map +0 -1
  84. package/dist/modules/i18n/es.d.ts +0 -3
  85. package/dist/modules/i18n/es.d.ts.map +0 -1
  86. package/dist/modules/i18n/index.d.ts +0 -15
  87. package/dist/modules/i18n/index.d.ts.map +0 -1
  88. package/dist/modules/i18n/zh.d.ts +0 -3
  89. package/dist/modules/i18n/zh.d.ts.map +0 -1
  90. package/dist/modules/loading.d.ts +0 -3
  91. package/dist/modules/loading.d.ts.map +0 -1
  92. package/dist/modules/state.d.ts +0 -22
  93. package/dist/modules/state.d.ts.map +0 -1
  94. package/dist/modules/styleFunction.d.ts +0 -13
  95. package/dist/modules/styleFunction.d.ts.map +0 -1
  96. package/dist/myPragma.d.ts +0 -2
  97. package/dist/myPragma.d.ts.map +0 -1
  98. package/dist/ol-wfst.d.ts +0 -337
  99. package/dist/ol-wfst.d.ts.map +0 -1
@@ -1,275 +1,275 @@
1
- import BaseObject, { ObjectEvent } from 'ol/Object.js';
2
- import { Types as ObjectEventTypes } from 'ol/ObjectEventType.js';
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}`;
1
+ import BaseObject, { ObjectEvent } from 'ol/Object.js';
2
+ import { Types as ObjectEventTypes } from 'ol/ObjectEventType.js';
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
275
  //# sourceMappingURL=Geoserver.d.ts.map
package/lib/WfsLayer.d.ts CHANGED
@@ -1,53 +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
- }, false>;
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 {};
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
53
  //# sourceMappingURL=WfsLayer.d.ts.map