ol-wfst 3.0.2 → 3.0.3
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/CHANGELOG.md +4 -1
- package/README.md +3 -3
- package/dist/ol-wfst.d.ts +7 -0
- package/dist/ol-wfst.d.ts.map +1 -1
- package/dist/ol-wfst.js +3522 -3514
- package/dist/ol-wfst.js.map +1 -1
- package/dist/ol-wfst.min.js +16 -16
- package/dist/ol-wfst.min.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/lib/ol-wfst.d.ts +7 -0
- package/lib/ol-wfst.d.ts.map +1 -1
- package/lib/ol-wfst.js +106 -98
- package/lib/ol-wfst.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/lib/ol-wfst.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import TileState from 'ol/TileState';
|
|
2
|
-
import { GeometryCollection, Circle as Circle$1, Polygon, MultiLineString, MultiPolygon, MultiPoint } from 'ol/geom';
|
|
3
|
-
import { Style, Circle, Fill, Stroke } from 'ol/style';
|
|
4
|
-
import { Control } from 'ol/control';
|
|
5
|
-
import { Modify, Snap, Select, Draw } from 'ol/interaction';
|
|
6
|
-
import { Collection, Feature, Overlay } from 'ol';
|
|
7
|
-
import { WFS, GeoJSON, KML } from 'ol/format';
|
|
8
|
-
import { Vector, Tile } from 'ol/layer';
|
|
9
|
-
import { Vector as Vector$1, TileWMS } from 'ol/source';
|
|
10
|
-
import { bbox, all } from 'ol/loadingstrategy';
|
|
11
|
-
import { fromCircle } from 'ol/geom/Polygon';
|
|
12
|
-
import { getCenter } from 'ol/extent';
|
|
13
|
-
import { primaryAction, never } from 'ol/events/condition';
|
|
14
|
-
import { transformExtent } from 'ol/proj';
|
|
15
|
-
import { unByKey } from 'ol/Observable';
|
|
16
|
-
import Modal from 'modal-vanilla';
|
|
17
|
-
|
|
1
|
+
import TileState from 'ol/TileState';
|
|
2
|
+
import { GeometryCollection, Circle as Circle$1, Polygon, MultiLineString, MultiPolygon, MultiPoint } from 'ol/geom';
|
|
3
|
+
import { Style, Circle, Fill, Stroke } from 'ol/style';
|
|
4
|
+
import { Control } from 'ol/control';
|
|
5
|
+
import { Modify, Snap, Select, Draw } from 'ol/interaction';
|
|
6
|
+
import { Collection, Feature, Overlay } from 'ol';
|
|
7
|
+
import { WFS, GeoJSON, KML } from 'ol/format';
|
|
8
|
+
import { Vector, Tile } from 'ol/layer';
|
|
9
|
+
import { Vector as Vector$1, TileWMS } from 'ol/source';
|
|
10
|
+
import { bbox, all } from 'ol/loadingstrategy';
|
|
11
|
+
import { fromCircle } from 'ol/geom/Polygon';
|
|
12
|
+
import { getCenter } from 'ol/extent';
|
|
13
|
+
import { primaryAction, never } from 'ol/events/condition';
|
|
14
|
+
import { transformExtent } from 'ol/proj';
|
|
15
|
+
import { unByKey } from 'ol/Observable';
|
|
16
|
+
import Modal from 'modal-vanilla';
|
|
17
|
+
|
|
18
18
|
/*! *****************************************************************************
|
|
19
19
|
Copyright (c) Microsoft Corporation.
|
|
20
20
|
|
|
@@ -38,20 +38,20 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
38
38
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
39
39
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
40
|
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
var img = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='768' height='768' viewBox='0 0 768 768'%3e %3cpath d='M663 225l-58.5 58.5-120-120 58.5-58.5q9-9 22.5-9t22.5 9l75 75q9 9 9 22.5t-9 22.5zM96 552l354-354 120 120-354 354h-120v-120z'%3e%3c/path%3e%3c/svg%3e";
|
|
44
|
-
|
|
45
|
-
var img$1 = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='448' height='448' viewBox='0 0 448 448'%3e %3cpath d='M222 296l29-29-38-38-29 29v14h24v24h14zM332 116c-2.25-2.25-6-2-8.25 0.25l-87.5 87.5c-2.25 2.25-2.5 6-0.25 8.25s6 2 8.25-0.25l87.5-87.5c2.25-2.25 2.5-6 0.25-8.25zM352 264.5v47.5c0 39.75-32.25 72-72 72h-208c-39.75 0-72-32.25-72-72v-208c0-39.75 32.25-72 72-72h208c10 0 20 2 29.25 6.25 2.25 1 4 3.25 4.5 5.75 0.5 2.75-0.25 5.25-2.25 7.25l-12.25 12.25c-2.25 2.25-5.25 3-8 2-3.75-1-7.5-1.5-11.25-1.5h-208c-22 0-40 18-40 40v208c0 22 18 40 40 40h208c22 0 40-18 40-40v-31.5c0-2 0.75-4 2.25-5.5l16-16c2.5-2.5 5.75-3 8.75-1.75s5 4 5 7.25zM328 80l72 72-168 168h-72v-72zM439 113l-23 23-72-72 23-23c9.25-9.25 24.75-9.25 34 0l38 38c9.25 9.25 9.25 24.75 0 34z'%3e%3c/path%3e%3c/svg%3e";
|
|
46
|
-
|
|
47
|
-
var img$2 = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='541' height='512' viewBox='0 0 541 512'%3e %3cpath fill='black' d='M103.306 228.483l129.493-125.249c-17.662-4.272-31.226-18.148-34.98-35.663l-0.055-0.307-129.852 125.248c17.812 4.15 31.53 18.061 35.339 35.662l0.056 0.308z'%3e%3c/path%3e %3cpath fill='black' d='M459.052 393.010c-13.486-8.329-22.346-23.018-22.373-39.779v-0.004c-0.053-0.817-0.082-1.772-0.082-2.733s0.030-1.916 0.089-2.863l-0.007 0.13-149.852 71.94c9.598 8.565 15.611 20.969 15.611 34.779 0 0.014 0 0.029 0 0.043v-0.002c-0.048 5.164-0.94 10.104-2.544 14.711l0.098-0.322z'%3e%3c/path%3e %3cpath fill='black' d='M290.207 57.553c-0.009 15.55-7.606 29.324-19.289 37.819l-0.135 0.093 118.054 46.69c-0.216-1.608-0.346-3.48-0.36-5.379v-0.017c0.033-16.948 9.077-31.778 22.596-39.953l0.209-0.118-122.298-48.056c0.659 2.633 1.098 5.693 1.221 8.834l0.002 0.087z'%3e%3c/path%3e %3cpath fill='black' d='M241.36 410.132l-138.629-160.067c-4.734 17.421-18.861 30.61-36.472 33.911l-0.29 0.045 143.881 166.255c1.668-18.735 14.197-34.162 31.183-40.044l0.327-0.099z'%3e%3c/path%3e %3cpath fill='black' d='M243.446 115.105c-31.785 0-57.553-25.767-57.553-57.553s25.767-57.553 57.553-57.553c31.785 0 57.552 25.767 57.552 57.553v0c0 31.786-25.767 57.553-57.553 57.553v0zM243.446 21.582c-19.866 0-35.97 16.105-35.97 35.97s16.105 35.97 35.97 35.97c19.866 0 35.97-16.105 35.97-35.97v0c0-19.866-16.104-35.97-35.97-35.97v0z'%3e%3c/path%3e %3cpath fill='black' d='M483.224 410.78c-31.786 0-57.553-25.767-57.553-57.553s25.767-57.553 57.553-57.553c31.786 0 57.552 25.767 57.552 57.553v0c0 31.786-25.767 57.553-57.553 57.553v0zM483.224 317.257c-19.866 0-35.97 16.104-35.97 35.97s16.105 35.97 35.97 35.97c19.866 0 35.97-16.105 35.97-35.97v0c0-19.866-16.105-35.97-35.97-35.97v0z'%3e%3c/path%3e %3cpath fill='black' d='M57.553 295.531c-31.785 0-57.553-25.767-57.553-57.553s25.767-57.553 57.553-57.553c31.785 0 57.553 25.767 57.553 57.553v0c0 31.786-25.767 57.553-57.553 57.553v0zM57.553 202.008c-19.866 0-35.97 16.105-35.97 35.97s16.105 35.97 35.97 35.97c19.866 0 35.97-16.105 35.97-35.97v0c-0.041-19.835-16.13-35.898-35.97-35.898 0 0 0 0 0 0v0z'%3e%3c/path%3e %3cpath fill='black' d='M256.036 512.072c-31.786 0-57.553-25.767-57.553-57.553s25.767-57.553 57.553-57.553c31.786 0 57.553 25.767 57.553 57.553v0c0 31.786-25.767 57.553-57.553 57.553v0zM256.036 418.55c-19.866 0-35.97 16.104-35.97 35.97s16.105 35.97 35.97 35.97c19.866 0 35.97-16.105 35.97-35.97v0c0-19.866-16.105-35.97-35.97-35.97v0z'%3e%3c/path%3e %3cpath fill='black' d='M435.24 194.239c-31.786 0-57.553-25.767-57.553-57.553s25.767-57.553 57.553-57.553c31.786 0 57.553 25.767 57.553 57.553v0c0 31.785-25.767 57.553-57.553 57.553v0zM435.24 100.716c-19.866 0-35.97 16.105-35.97 35.97s16.105 35.97 35.97 35.97c19.866 0 35.97-16.105 35.97-35.97v0c0-19.866-16.105-35.97-35.97-35.97v0z'%3e%3c/path%3e%3c/svg%3e";
|
|
48
|
-
|
|
49
|
-
var img$3 = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 512 512'%3e%3cpath d='M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z'%3e%3c/path%3e%3c/svg%3e";
|
|
50
|
-
|
|
51
|
-
var img$4 = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='768' height='768' viewBox='0 0 768 768'%3e%3cpath d='M384 288q39 0 67.5 28.5t28.5 67.5-28.5 67.5-67.5 28.5-67.5-28.5-28.5-67.5 28.5-67.5 67.5-28.5zM384 544.5q66 0 113.25-47.25t47.25-113.25-47.25-113.25-113.25-47.25-113.25 47.25-47.25 113.25 47.25 113.25 113.25 47.25zM384 144q118.5 0 214.5 66t138 174q-42 108-138 174t-214.5 66-214.5-66-138-174q42-108 138-174t214.5-66z'%3e%3c/path%3e%3c/svg%3e";
|
|
52
|
-
|
|
53
|
-
var img$5 = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='768' height='768' viewBox='0 0 768 768'%3e%3cpath d='M379.5 288h4.5q39 0 67.5 28.5t28.5 67.5v6zM241.5 313.5q-18 36-18 70.5 0 66 47.25 113.25t113.25 47.25q34.5 0 70.5-18l-49.5-49.5q-12 3-21 3-39 0-67.5-28.5t-28.5-67.5q0-9 3-21zM64.5 136.5l40.5-40.5 567 567-40.5 40.5q-7.5-7.5-47.25-46.5t-60.75-60q-64.5 27-139.5 27-118.5 0-214.5-66t-138-174q16.5-39 51.75-86.25t68.25-72.75q-18-18-50.25-51t-36.75-37.5zM384 223.5q-30 0-58.5 12l-69-69q58.5-22.5 127.5-22.5 118.5 0 213.75 66t137.25 174q-36 88.5-109.5 151.5l-93-93q12-28.5 12-58.5 0-66-47.25-113.25t-113.25-47.25z'%3e%3c/path%3e%3c/svg%3e";
|
|
54
|
-
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
var img = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='768' height='768' viewBox='0 0 768 768'%3e %3cpath d='M663 225l-58.5 58.5-120-120 58.5-58.5q9-9 22.5-9t22.5 9l75 75q9 9 9 22.5t-9 22.5zM96 552l354-354 120 120-354 354h-120v-120z'%3e%3c/path%3e%3c/svg%3e";
|
|
44
|
+
|
|
45
|
+
var img$1 = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='448' height='448' viewBox='0 0 448 448'%3e %3cpath d='M222 296l29-29-38-38-29 29v14h24v24h14zM332 116c-2.25-2.25-6-2-8.25 0.25l-87.5 87.5c-2.25 2.25-2.5 6-0.25 8.25s6 2 8.25-0.25l87.5-87.5c2.25-2.25 2.5-6 0.25-8.25zM352 264.5v47.5c0 39.75-32.25 72-72 72h-208c-39.75 0-72-32.25-72-72v-208c0-39.75 32.25-72 72-72h208c10 0 20 2 29.25 6.25 2.25 1 4 3.25 4.5 5.75 0.5 2.75-0.25 5.25-2.25 7.25l-12.25 12.25c-2.25 2.25-5.25 3-8 2-3.75-1-7.5-1.5-11.25-1.5h-208c-22 0-40 18-40 40v208c0 22 18 40 40 40h208c22 0 40-18 40-40v-31.5c0-2 0.75-4 2.25-5.5l16-16c2.5-2.5 5.75-3 8.75-1.75s5 4 5 7.25zM328 80l72 72-168 168h-72v-72zM439 113l-23 23-72-72 23-23c9.25-9.25 24.75-9.25 34 0l38 38c9.25 9.25 9.25 24.75 0 34z'%3e%3c/path%3e%3c/svg%3e";
|
|
46
|
+
|
|
47
|
+
var img$2 = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='541' height='512' viewBox='0 0 541 512'%3e %3cpath fill='black' d='M103.306 228.483l129.493-125.249c-17.662-4.272-31.226-18.148-34.98-35.663l-0.055-0.307-129.852 125.248c17.812 4.15 31.53 18.061 35.339 35.662l0.056 0.308z'%3e%3c/path%3e %3cpath fill='black' d='M459.052 393.010c-13.486-8.329-22.346-23.018-22.373-39.779v-0.004c-0.053-0.817-0.082-1.772-0.082-2.733s0.030-1.916 0.089-2.863l-0.007 0.13-149.852 71.94c9.598 8.565 15.611 20.969 15.611 34.779 0 0.014 0 0.029 0 0.043v-0.002c-0.048 5.164-0.94 10.104-2.544 14.711l0.098-0.322z'%3e%3c/path%3e %3cpath fill='black' d='M290.207 57.553c-0.009 15.55-7.606 29.324-19.289 37.819l-0.135 0.093 118.054 46.69c-0.216-1.608-0.346-3.48-0.36-5.379v-0.017c0.033-16.948 9.077-31.778 22.596-39.953l0.209-0.118-122.298-48.056c0.659 2.633 1.098 5.693 1.221 8.834l0.002 0.087z'%3e%3c/path%3e %3cpath fill='black' d='M241.36 410.132l-138.629-160.067c-4.734 17.421-18.861 30.61-36.472 33.911l-0.29 0.045 143.881 166.255c1.668-18.735 14.197-34.162 31.183-40.044l0.327-0.099z'%3e%3c/path%3e %3cpath fill='black' d='M243.446 115.105c-31.785 0-57.553-25.767-57.553-57.553s25.767-57.553 57.553-57.553c31.785 0 57.552 25.767 57.552 57.553v0c0 31.786-25.767 57.553-57.553 57.553v0zM243.446 21.582c-19.866 0-35.97 16.105-35.97 35.97s16.105 35.97 35.97 35.97c19.866 0 35.97-16.105 35.97-35.97v0c0-19.866-16.104-35.97-35.97-35.97v0z'%3e%3c/path%3e %3cpath fill='black' d='M483.224 410.78c-31.786 0-57.553-25.767-57.553-57.553s25.767-57.553 57.553-57.553c31.786 0 57.552 25.767 57.552 57.553v0c0 31.786-25.767 57.553-57.553 57.553v0zM483.224 317.257c-19.866 0-35.97 16.104-35.97 35.97s16.105 35.97 35.97 35.97c19.866 0 35.97-16.105 35.97-35.97v0c0-19.866-16.105-35.97-35.97-35.97v0z'%3e%3c/path%3e %3cpath fill='black' d='M57.553 295.531c-31.785 0-57.553-25.767-57.553-57.553s25.767-57.553 57.553-57.553c31.785 0 57.553 25.767 57.553 57.553v0c0 31.786-25.767 57.553-57.553 57.553v0zM57.553 202.008c-19.866 0-35.97 16.105-35.97 35.97s16.105 35.97 35.97 35.97c19.866 0 35.97-16.105 35.97-35.97v0c-0.041-19.835-16.13-35.898-35.97-35.898 0 0 0 0 0 0v0z'%3e%3c/path%3e %3cpath fill='black' d='M256.036 512.072c-31.786 0-57.553-25.767-57.553-57.553s25.767-57.553 57.553-57.553c31.786 0 57.553 25.767 57.553 57.553v0c0 31.786-25.767 57.553-57.553 57.553v0zM256.036 418.55c-19.866 0-35.97 16.104-35.97 35.97s16.105 35.97 35.97 35.97c19.866 0 35.97-16.105 35.97-35.97v0c0-19.866-16.105-35.97-35.97-35.97v0z'%3e%3c/path%3e %3cpath fill='black' d='M435.24 194.239c-31.786 0-57.553-25.767-57.553-57.553s25.767-57.553 57.553-57.553c31.786 0 57.553 25.767 57.553 57.553v0c0 31.785-25.767 57.553-57.553 57.553v0zM435.24 100.716c-19.866 0-35.97 16.105-35.97 35.97s16.105 35.97 35.97 35.97c19.866 0 35.97-16.105 35.97-35.97v0c0-19.866-16.105-35.97-35.97-35.97v0z'%3e%3c/path%3e%3c/svg%3e";
|
|
48
|
+
|
|
49
|
+
var img$3 = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 512 512'%3e%3cpath d='M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z'%3e%3c/path%3e%3c/svg%3e";
|
|
50
|
+
|
|
51
|
+
var img$4 = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='768' height='768' viewBox='0 0 768 768'%3e%3cpath d='M384 288q39 0 67.5 28.5t28.5 67.5-28.5 67.5-67.5 28.5-67.5-28.5-28.5-67.5 28.5-67.5 67.5-28.5zM384 544.5q66 0 113.25-47.25t47.25-113.25-47.25-113.25-113.25-47.25-113.25 47.25-47.25 113.25 47.25 113.25 113.25 47.25zM384 144q118.5 0 214.5 66t138 174q-42 108-138 174t-214.5 66-214.5-66-138-174q42-108 138-174t214.5-66z'%3e%3c/path%3e%3c/svg%3e";
|
|
52
|
+
|
|
53
|
+
var img$5 = "data:image/svg+xml,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' width='768' height='768' viewBox='0 0 768 768'%3e%3cpath d='M379.5 288h4.5q39 0 67.5 28.5t28.5 67.5v6zM241.5 313.5q-18 36-18 70.5 0 66 47.25 113.25t113.25 47.25q34.5 0 70.5-18l-49.5-49.5q-12 3-21 3-39 0-67.5-28.5t-28.5-67.5q0-9 3-21zM64.5 136.5l40.5-40.5 567 567-40.5 40.5q-7.5-7.5-47.25-46.5t-60.75-60q-64.5 27-139.5 27-118.5 0-214.5-66t-138-174q16.5-39 51.75-86.25t68.25-72.75q-18-18-50.25-51t-36.75-37.5zM384 223.5q-30 0-58.5 12l-69-69q58.5-22.5 127.5-22.5 118.5 0 213.75 66t137.25 174q-36 88.5-109.5 151.5l-93-93q12-28.5 12-58.5 0-66-47.25-113.25t-113.25-47.25z'%3e%3c/path%3e%3c/svg%3e";
|
|
54
|
+
|
|
55
55
|
var GeometryType;
|
|
56
56
|
(function (GeometryType) {
|
|
57
57
|
GeometryType["Point"] = "Point";
|
|
@@ -63,8 +63,8 @@ var GeometryType;
|
|
|
63
63
|
GeometryType["MultiPolygon"] = "MultiPolygon";
|
|
64
64
|
GeometryType["GeometryCollection"] = "GeometryCollection";
|
|
65
65
|
GeometryType["Circle"] = "Circle";
|
|
66
|
-
})(GeometryType || (GeometryType = {}));
|
|
67
|
-
|
|
66
|
+
})(GeometryType || (GeometryType = {}));
|
|
67
|
+
|
|
68
68
|
const es = {
|
|
69
69
|
labels: {
|
|
70
70
|
select: 'Seleccionar',
|
|
@@ -101,8 +101,8 @@ const es = {
|
|
|
101
101
|
transaction: 'Error al hacer transacción con el GeoServer. HTTP status:',
|
|
102
102
|
getFeatures: 'Error al obtener elemento desde el GeoServer. HTTP status:'
|
|
103
103
|
}
|
|
104
|
-
};
|
|
105
|
-
|
|
104
|
+
};
|
|
105
|
+
|
|
106
106
|
const en = {
|
|
107
107
|
labels: {
|
|
108
108
|
select: 'Select',
|
|
@@ -139,8 +139,8 @@ const en = {
|
|
|
139
139
|
transaction: 'Error when doing Transaction with GeoServer. HTTP status:',
|
|
140
140
|
getFeatures: 'Error getting elements from GeoServer. HTTP status:'
|
|
141
141
|
}
|
|
142
|
-
};
|
|
143
|
-
|
|
142
|
+
};
|
|
143
|
+
|
|
144
144
|
const zh = {
|
|
145
145
|
labels: {
|
|
146
146
|
select: '选择',
|
|
@@ -177,15 +177,15 @@ const zh = {
|
|
|
177
177
|
transaction: 'GeoServer处理事务出错. HTTP状态码:',
|
|
178
178
|
getFeatures: '从GeoServer获取元素出错. HTTP状态码:'
|
|
179
179
|
}
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
var i18n = /*#__PURE__*/Object.freeze({
|
|
183
|
-
__proto__: null,
|
|
184
|
-
es: es,
|
|
185
|
-
en: en,
|
|
186
|
-
zh: zh
|
|
187
|
-
});
|
|
188
|
-
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
var i18n = /*#__PURE__*/Object.freeze({
|
|
183
|
+
__proto__: null,
|
|
184
|
+
es: es,
|
|
185
|
+
en: en,
|
|
186
|
+
zh: zh
|
|
187
|
+
});
|
|
188
|
+
|
|
189
189
|
// https://docs.geoserver.org/latest/en/user/services/wfs/axis_order.html
|
|
190
190
|
// Axis ordering: latitude/longitude
|
|
191
191
|
const DEFAULT_GEOSERVER_SRS = 'EPSG:3857';
|
|
@@ -237,6 +237,7 @@ class Wfst extends Control {
|
|
|
237
237
|
projection: DEFAULT_GEOSERVER_SRS
|
|
238
238
|
},
|
|
239
239
|
headers: {},
|
|
240
|
+
credentials: 'same-origin',
|
|
240
241
|
layers: null,
|
|
241
242
|
evtType: 'singleclick',
|
|
242
243
|
active: true,
|
|
@@ -348,7 +349,8 @@ class Wfst extends Control {
|
|
|
348
349
|
const url_fetch = this._options.geoServerUrl + '?' + params.toString();
|
|
349
350
|
try {
|
|
350
351
|
const response = yield fetch(url_fetch, {
|
|
351
|
-
headers: this._options.headers
|
|
352
|
+
headers: this._options.headers,
|
|
353
|
+
credentials: this._options.credentials
|
|
352
354
|
});
|
|
353
355
|
if (!response.ok) {
|
|
354
356
|
throw new Error('');
|
|
@@ -414,7 +416,8 @@ class Wfst extends Control {
|
|
|
414
416
|
});
|
|
415
417
|
const url_fetch = geoServerUrl + '?' + params.toString();
|
|
416
418
|
const response = yield fetch(url_fetch, {
|
|
417
|
-
headers: this._options.headers
|
|
419
|
+
headers: this._options.headers,
|
|
420
|
+
credentials: this._options.credentials
|
|
418
421
|
});
|
|
419
422
|
if (!response.ok) {
|
|
420
423
|
throw new Error('');
|
|
@@ -503,7 +506,8 @@ class Wfst extends Control {
|
|
|
503
506
|
tileLoadFunction: (tile, src) => __awaiter(this, void 0, void 0, function* () {
|
|
504
507
|
try {
|
|
505
508
|
const response = yield fetch(src, {
|
|
506
|
-
headers: this._options.headers
|
|
509
|
+
headers: this._options.headers,
|
|
510
|
+
credentials: this._options.credentials
|
|
507
511
|
});
|
|
508
512
|
if (!response.ok) {
|
|
509
513
|
throw new Error('');
|
|
@@ -578,7 +582,8 @@ class Wfst extends Control {
|
|
|
578
582
|
'?' +
|
|
579
583
|
params.toString();
|
|
580
584
|
const response = yield fetch(url_fetch, {
|
|
581
|
-
headers: this._options.headers
|
|
585
|
+
headers: this._options.headers,
|
|
586
|
+
credentials: this._options.credentials
|
|
582
587
|
});
|
|
583
588
|
if (!response.ok) {
|
|
584
589
|
throw new Error('');
|
|
@@ -759,7 +764,8 @@ class Wfst extends Control {
|
|
|
759
764
|
});
|
|
760
765
|
try {
|
|
761
766
|
const response = yield fetch(url, {
|
|
762
|
-
headers: this._options.headers
|
|
767
|
+
headers: this._options.headers,
|
|
768
|
+
credentials: this._options.credentials
|
|
763
769
|
});
|
|
764
770
|
if (!response.ok) {
|
|
765
771
|
throw new Error(this._i18n.errors.getFeatures +
|
|
@@ -922,27 +928,27 @@ class Wfst extends Control {
|
|
|
922
928
|
const layerName = layerParams.name;
|
|
923
929
|
const layerLabel = `<span title="${this._geoServerData[layerName].geomType}">${layerParams.label || layerName}</span>`;
|
|
924
930
|
const visible = 'visible' in layerParams ? layerParams.visible : true;
|
|
925
|
-
return `
|
|
926
|
-
<div class="wfst--layer-control
|
|
927
|
-
${visible ? 'ol-wfst--visible-on' : ''}
|
|
931
|
+
return `
|
|
932
|
+
<div class="wfst--layer-control
|
|
933
|
+
${visible ? 'ol-wfst--visible-on' : ''}
|
|
928
934
|
${layerName === this._layerToInsertElements
|
|
929
935
|
? 'ol-wfst--selected-on'
|
|
930
|
-
: ''}
|
|
931
|
-
" data-layer="${layerName}">
|
|
932
|
-
<div class="ol-wfst--tools-control-visible">
|
|
933
|
-
<span class="ol-wfst--tools-control-visible-btn ol-wfst--visible-btn-on" title="${this._i18n.labels.toggleVisibility}">
|
|
934
|
-
<img src="${img$4}"/>
|
|
935
|
-
</span>
|
|
936
|
-
<span class="ol-wfst--tools-control-visible-btn ol-wfst--visible-btn-off" title="${this._i18n.labels.toggleVisibility}">
|
|
937
|
-
<img src="${img$5}"/>
|
|
938
|
-
</span>
|
|
939
|
-
</div>
|
|
940
|
-
<label for="wfst--${layerName}">
|
|
936
|
+
: ''}
|
|
937
|
+
" data-layer="${layerName}">
|
|
938
|
+
<div class="ol-wfst--tools-control-visible">
|
|
939
|
+
<span class="ol-wfst--tools-control-visible-btn ol-wfst--visible-btn-on" title="${this._i18n.labels.toggleVisibility}">
|
|
940
|
+
<img src="${img$4}"/>
|
|
941
|
+
</span>
|
|
942
|
+
<span class="ol-wfst--tools-control-visible-btn ol-wfst--visible-btn-off" title="${this._i18n.labels.toggleVisibility}">
|
|
943
|
+
<img src="${img$5}"/>
|
|
944
|
+
</span>
|
|
945
|
+
</div>
|
|
946
|
+
<label for="wfst--${layerName}">
|
|
941
947
|
<input value="${layerName}" id="wfst--${layerName}" type="radio" class="ol-wfst--tools-control-input" name="wfst--select-layer" ${layerName === this._layerToInsertElements
|
|
942
948
|
? 'checked="checked"'
|
|
943
|
-
: ''}>
|
|
944
|
-
${layerLabel}
|
|
945
|
-
</label>
|
|
949
|
+
: ''}>
|
|
950
|
+
${layerLabel}
|
|
951
|
+
</label>
|
|
946
952
|
</div>`;
|
|
947
953
|
};
|
|
948
954
|
let htmlLayers = '';
|
|
@@ -1127,7 +1133,8 @@ class Wfst extends Control {
|
|
|
1127
1133
|
const url_fetch = this._options.geoServerUrl + '?' + params.toString();
|
|
1128
1134
|
try {
|
|
1129
1135
|
const response = yield fetch(url_fetch, {
|
|
1130
|
-
headers: this._options.headers
|
|
1136
|
+
headers: this._options.headers,
|
|
1137
|
+
credentials: this._options.credentials
|
|
1131
1138
|
});
|
|
1132
1139
|
if (!response.ok) {
|
|
1133
1140
|
throw new Error(this._i18n.errors.lockFeature);
|
|
@@ -1334,7 +1341,8 @@ class Wfst extends Control {
|
|
|
1334
1341
|
const response = yield fetch(this._options.geoServerUrl, {
|
|
1335
1342
|
method: 'POST',
|
|
1336
1343
|
body: payload,
|
|
1337
|
-
headers: headers
|
|
1344
|
+
headers: headers,
|
|
1345
|
+
credentials: this._options.credentials
|
|
1338
1346
|
});
|
|
1339
1347
|
if (!response.ok) {
|
|
1340
1348
|
throw new Error(this._i18n.errors.transaction + ' ' + response.status);
|
|
@@ -1782,13 +1790,13 @@ class Wfst extends Control {
|
|
|
1782
1790
|
* @private
|
|
1783
1791
|
*/
|
|
1784
1792
|
_initUploadFileModal(content, featuresToInsert) {
|
|
1785
|
-
const footer = `
|
|
1786
|
-
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">
|
|
1787
|
-
${this._i18n.labels.cancel}
|
|
1788
|
-
</button>
|
|
1789
|
-
<button type="button" class="btn btn-sm btn-primary" data-action="save" data-dismiss="modal">
|
|
1790
|
-
${this._i18n.labels.upload}
|
|
1791
|
-
</button>
|
|
1793
|
+
const footer = `
|
|
1794
|
+
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">
|
|
1795
|
+
${this._i18n.labels.cancel}
|
|
1796
|
+
</button>
|
|
1797
|
+
<button type="button" class="btn btn-sm btn-primary" data-action="save" data-dismiss="modal">
|
|
1798
|
+
${this._i18n.labels.upload}
|
|
1799
|
+
</button>
|
|
1792
1800
|
`;
|
|
1793
1801
|
const modal = new Modal(Object.assign(Object.assign({}, this._options.modal), { header: true, headerClose: false, title: this._i18n.labels.uploadFeatures +
|
|
1794
1802
|
' ' +
|
|
@@ -1941,11 +1949,11 @@ class Wfst extends Control {
|
|
|
1941
1949
|
else {
|
|
1942
1950
|
this._resetStateButtons();
|
|
1943
1951
|
this.activateEditMode();
|
|
1944
|
-
const content = `
|
|
1945
|
-
${this._i18n.labels.validFeatures}: ${validFeaturesCount}<br>
|
|
1952
|
+
const content = `
|
|
1953
|
+
${this._i18n.labels.validFeatures}: ${validFeaturesCount}<br>
|
|
1946
1954
|
${invalidFeaturesCount
|
|
1947
1955
|
? `${this._i18n.labels.invalidFeatures}: ${invalidFeaturesCount}`
|
|
1948
|
-
: ''}
|
|
1956
|
+
: ''}
|
|
1949
1957
|
`;
|
|
1950
1958
|
this._editLayer.getSource().addFeatures(featuresToInsert);
|
|
1951
1959
|
this._initUploadFileModal(content, featuresToInsert);
|
|
@@ -2142,25 +2150,25 @@ class Wfst extends Control {
|
|
|
2142
2150
|
type = 'text';
|
|
2143
2151
|
}
|
|
2144
2152
|
if (type) {
|
|
2145
|
-
content += `
|
|
2146
|
-
<div class="ol-wfst--input-field-container">
|
|
2147
|
-
<label class="ol-wfst--input-field-label" for="${key}">${key}</label>
|
|
2148
|
-
<input placeholder="NULL" class="ol-wfst--input-field-input" type="${type}" name="${key}" value="${properties[key] || ''}">
|
|
2153
|
+
content += `
|
|
2154
|
+
<div class="ol-wfst--input-field-container">
|
|
2155
|
+
<label class="ol-wfst--input-field-label" for="${key}">${key}</label>
|
|
2156
|
+
<input placeholder="NULL" class="ol-wfst--input-field-input" type="${type}" name="${key}" value="${properties[key] || ''}">
|
|
2149
2157
|
</div>`;
|
|
2150
2158
|
}
|
|
2151
2159
|
}
|
|
2152
2160
|
});
|
|
2153
2161
|
content += '</form>';
|
|
2154
|
-
const footer = `
|
|
2155
|
-
<button type="button" class="btn btn-sm btn-link btn-third" data-action="delete" data-dismiss="modal">
|
|
2156
|
-
${this._i18n.labels.delete}
|
|
2157
|
-
</button>
|
|
2158
|
-
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">
|
|
2159
|
-
${this._i18n.labels.cancel}
|
|
2160
|
-
</button>
|
|
2161
|
-
<button type="button" class="btn btn-sm btn-primary" data-action="save" data-dismiss="modal">
|
|
2162
|
-
${this._i18n.labels.save}
|
|
2163
|
-
</button>
|
|
2162
|
+
const footer = `
|
|
2163
|
+
<button type="button" class="btn btn-sm btn-link btn-third" data-action="delete" data-dismiss="modal">
|
|
2164
|
+
${this._i18n.labels.delete}
|
|
2165
|
+
</button>
|
|
2166
|
+
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">
|
|
2167
|
+
${this._i18n.labels.cancel}
|
|
2168
|
+
</button>
|
|
2169
|
+
<button type="button" class="btn btn-sm btn-primary" data-action="save" data-dismiss="modal">
|
|
2170
|
+
${this._i18n.labels.save}
|
|
2171
|
+
</button>
|
|
2164
2172
|
`;
|
|
2165
2173
|
const modal = new Modal(Object.assign(Object.assign({}, this._options.modal), { header: true, headerClose: true, title: `${this._i18n.labels.editElement} ${this._editFeature.getId()} `, content: content, footer: footer })).show();
|
|
2166
2174
|
modal.on('dismiss', (modal, event) => {
|
|
@@ -2222,7 +2230,7 @@ const deepObjectAssign = (target, ...sources) => {
|
|
|
2222
2230
|
});
|
|
2223
2231
|
});
|
|
2224
2232
|
return target;
|
|
2225
|
-
};
|
|
2226
|
-
|
|
2227
|
-
export default Wfst;
|
|
2228
|
-
//# sourceMappingURL=ol-wfst.js.map
|
|
2233
|
+
};
|
|
2234
|
+
|
|
2235
|
+
export default Wfst;
|
|
2236
|
+
//# sourceMappingURL=ol-wfst.js.map
|