ol-wfst 3.0.4 → 3.0.5
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 +71 -67
- package/README.md +30 -5
- package/dist/css/ol-wfst.bootstrap5.css +364 -481
- package/dist/css/ol-wfst.bootstrap5.min.css +1 -1
- package/dist/css/ol-wfst.css +3 -0
- package/dist/ol-wfst.d.ts +25 -8
- package/dist/ol-wfst.d.ts.map +1 -1
- package/dist/ol-wfst.js +191 -166
- 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/dist/tsconfig.tsbuildinfo +1 -1
- package/lib/ol-wfst.d.ts +25 -8
- package/lib/ol-wfst.d.ts.map +1 -1
- package/lib/ol-wfst.js +47 -30
- package/lib/ol-wfst.js.map +1 -1
- package/lib/style/css/ol-gisify.css +3 -0
- package/lib/style/css/ol-wfst.bootstrap5.css +364 -481
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +70 -70
package/dist/ol-wfst.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('ol/geom'), require('ol/style'), require('ol/control'), require('ol/interaction'), require('ol/format'), require('ol/layer'), require('ol/source'), require('ol/loadingstrategy'), require('ol/geom/Polygon'), require('ol/extent'), require('ol/events/condition'), require('ol/proj'), require('ol/Observable')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['ol/geom', 'ol/style', 'ol/control', 'ol/interaction', 'ol/format', 'ol/layer', 'ol/source', 'ol/loadingstrategy', 'ol/geom/Polygon', 'ol/extent', 'ol/events/condition', 'ol/proj', 'ol/Observable'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Wfst = factory(global.ol.geom, global.ol.style, global.ol.control, global.ol.interaction, global.ol.format, global.ol.layer, global.ol.source, global.ol.loadingstrategy, global.ol.geom.Polygon, global.ol.extent, global.ol.events.condition, global.ol.proj, global.ol.Observable));
|
|
5
|
-
}(this, (function (geom, style, control, interaction, format, layer, source, loadingstrategy, Polygon, extent, condition, proj, Observable$
|
|
5
|
+
})(this, (function (geom, style, control, interaction, format, layer, source, loadingstrategy, Polygon, extent, condition, proj, Observable$2) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
* OpenLayers version.
|
|
73
73
|
* @type {string}
|
|
74
74
|
*/
|
|
75
|
-
var VERSION = '6.
|
|
75
|
+
var VERSION = '6.15.1';
|
|
76
76
|
|
|
77
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
77
|
+
var __extends$6 = (undefined && undefined.__extends) || (function () {
|
|
78
78
|
var extendStatics = function (d, b) {
|
|
79
79
|
extendStatics = Object.setPrototypeOf ||
|
|
80
80
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -95,13 +95,13 @@
|
|
|
95
95
|
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error.
|
|
96
96
|
*/
|
|
97
97
|
var AssertionError = /** @class */ (function (_super) {
|
|
98
|
-
__extends(AssertionError, _super);
|
|
98
|
+
__extends$6(AssertionError, _super);
|
|
99
99
|
/**
|
|
100
100
|
* @param {number} code Error code.
|
|
101
101
|
*/
|
|
102
102
|
function AssertionError(code) {
|
|
103
103
|
var _this = this;
|
|
104
|
-
var path =
|
|
104
|
+
var path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0];
|
|
105
105
|
var message = 'Assertion failed. See https://openlayers.org/en/' +
|
|
106
106
|
path +
|
|
107
107
|
'/doc/errors/#' +
|
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
}
|
|
128
128
|
return AssertionError;
|
|
129
129
|
}(Error));
|
|
130
|
+
var AssertionError$1 = AssertionError;
|
|
130
131
|
|
|
131
132
|
/**
|
|
132
133
|
* @module ol/events/Event
|
|
@@ -184,6 +185,7 @@
|
|
|
184
185
|
};
|
|
185
186
|
return BaseEvent;
|
|
186
187
|
}());
|
|
188
|
+
var Event = BaseEvent;
|
|
187
189
|
|
|
188
190
|
/**
|
|
189
191
|
* @module ol/ObjectEventType
|
|
@@ -235,6 +237,7 @@
|
|
|
235
237
|
Disposable.prototype.disposeInternal = function () { };
|
|
236
238
|
return Disposable;
|
|
237
239
|
}());
|
|
240
|
+
var Disposable$1 = Disposable;
|
|
238
241
|
|
|
239
242
|
/**
|
|
240
243
|
* @module ol/functions
|
|
@@ -299,7 +302,7 @@
|
|
|
299
302
|
return !property;
|
|
300
303
|
}
|
|
301
304
|
|
|
302
|
-
var __extends$
|
|
305
|
+
var __extends$5 = (undefined && undefined.__extends) || (function () {
|
|
303
306
|
var extendStatics = function (d, b) {
|
|
304
307
|
extendStatics = Object.setPrototypeOf ||
|
|
305
308
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -333,7 +336,7 @@
|
|
|
333
336
|
* returns false.
|
|
334
337
|
*/
|
|
335
338
|
var Target = /** @class */ (function (_super) {
|
|
336
|
-
__extends$
|
|
339
|
+
__extends$5(Target, _super);
|
|
337
340
|
/**
|
|
338
341
|
* @param {*} [opt_target] Default event target for dispatched events.
|
|
339
342
|
*/
|
|
@@ -386,45 +389,45 @@
|
|
|
386
389
|
* @api
|
|
387
390
|
*/
|
|
388
391
|
Target.prototype.dispatchEvent = function (event) {
|
|
389
|
-
|
|
390
|
-
var
|
|
391
|
-
var
|
|
392
|
+
var isString = typeof event === 'string';
|
|
393
|
+
var type = isString ? event : event.type;
|
|
394
|
+
var listeners = this.listeners_ && this.listeners_[type];
|
|
395
|
+
if (!listeners) {
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
var evt = isString ? new Event(event) : /** @type {Event} */ (event);
|
|
392
399
|
if (!evt.target) {
|
|
393
400
|
evt.target = this.eventTarget_ || this;
|
|
394
401
|
}
|
|
395
|
-
var
|
|
402
|
+
var dispatching = this.dispatching_ || (this.dispatching_ = {});
|
|
403
|
+
var pendingRemovals = this.pendingRemovals_ || (this.pendingRemovals_ = {});
|
|
404
|
+
if (!(type in dispatching)) {
|
|
405
|
+
dispatching[type] = 0;
|
|
406
|
+
pendingRemovals[type] = 0;
|
|
407
|
+
}
|
|
408
|
+
++dispatching[type];
|
|
396
409
|
var propagate;
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
if (!(type in dispatching)) {
|
|
401
|
-
dispatching[type] = 0;
|
|
402
|
-
pendingRemovals[type] = 0;
|
|
410
|
+
for (var i = 0, ii = listeners.length; i < ii; ++i) {
|
|
411
|
+
if ('handleEvent' in listeners[i]) {
|
|
412
|
+
propagate = /** @type {import("../events.js").ListenerObject} */ (listeners[i]).handleEvent(evt);
|
|
403
413
|
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
if ('handleEvent' in listeners[i]) {
|
|
407
|
-
propagate = /** @type {import("../events.js").ListenerObject} */ (listeners[i]).handleEvent(evt);
|
|
408
|
-
}
|
|
409
|
-
else {
|
|
410
|
-
propagate = /** @type {import("../events.js").ListenerFunction} */ (listeners[i]).call(this, evt);
|
|
411
|
-
}
|
|
412
|
-
if (propagate === false || evt.propagationStopped) {
|
|
413
|
-
propagate = false;
|
|
414
|
-
break;
|
|
415
|
-
}
|
|
414
|
+
else {
|
|
415
|
+
propagate = /** @type {import("../events.js").ListenerFunction} */ (listeners[i]).call(this, evt);
|
|
416
416
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
delete pendingRemovals[type];
|
|
421
|
-
while (pr--) {
|
|
422
|
-
this.removeEventListener(type, VOID);
|
|
423
|
-
}
|
|
424
|
-
delete dispatching[type];
|
|
417
|
+
if (propagate === false || evt.propagationStopped) {
|
|
418
|
+
propagate = false;
|
|
419
|
+
break;
|
|
425
420
|
}
|
|
426
|
-
return propagate;
|
|
427
421
|
}
|
|
422
|
+
if (--dispatching[type] === 0) {
|
|
423
|
+
var pr = pendingRemovals[type];
|
|
424
|
+
delete pendingRemovals[type];
|
|
425
|
+
while (pr--) {
|
|
426
|
+
this.removeEventListener(type, VOID);
|
|
427
|
+
}
|
|
428
|
+
delete dispatching[type];
|
|
429
|
+
}
|
|
430
|
+
return propagate;
|
|
428
431
|
};
|
|
429
432
|
/**
|
|
430
433
|
* Clean up.
|
|
@@ -479,7 +482,8 @@
|
|
|
479
482
|
}
|
|
480
483
|
};
|
|
481
484
|
return Target;
|
|
482
|
-
}(Disposable));
|
|
485
|
+
}(Disposable$1));
|
|
486
|
+
var Target$1 = Target;
|
|
483
487
|
|
|
484
488
|
/**
|
|
485
489
|
* @module ol/events/EventType
|
|
@@ -522,7 +526,7 @@
|
|
|
522
526
|
* @module ol/events
|
|
523
527
|
*/
|
|
524
528
|
/**
|
|
525
|
-
* Key to use with {@link module:ol/Observable
|
|
529
|
+
* Key to use with {@link module:ol/Observable.unByKey}.
|
|
526
530
|
* @typedef {Object} EventsKey
|
|
527
531
|
* @property {ListenerFunction} listener Listener.
|
|
528
532
|
* @property {import("./events/Target.js").EventTargetLike} target Target.
|
|
@@ -616,7 +620,7 @@
|
|
|
616
620
|
}
|
|
617
621
|
}
|
|
618
622
|
|
|
619
|
-
var __extends$
|
|
623
|
+
var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
620
624
|
var extendStatics = function (d, b) {
|
|
621
625
|
extendStatics = Object.setPrototypeOf ||
|
|
622
626
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -661,7 +665,7 @@
|
|
|
661
665
|
* @api
|
|
662
666
|
*/
|
|
663
667
|
var Observable = /** @class */ (function (_super) {
|
|
664
|
-
__extends$
|
|
668
|
+
__extends$4(Observable, _super);
|
|
665
669
|
function Observable() {
|
|
666
670
|
var _this = _super.call(this) || this;
|
|
667
671
|
_this.on =
|
|
@@ -754,7 +758,7 @@
|
|
|
754
758
|
}
|
|
755
759
|
};
|
|
756
760
|
return Observable;
|
|
757
|
-
}(Target));
|
|
761
|
+
}(Target$1));
|
|
758
762
|
/**
|
|
759
763
|
* Listen for a certain type of event.
|
|
760
764
|
* @function
|
|
@@ -801,6 +805,7 @@
|
|
|
801
805
|
unlistenByKey(/** @type {import("./events.js").EventsKey} */ (key));
|
|
802
806
|
}
|
|
803
807
|
}
|
|
808
|
+
var Observable$1 = Observable;
|
|
804
809
|
|
|
805
810
|
var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
806
811
|
var extendStatics = function (d, b) {
|
|
@@ -846,7 +851,7 @@
|
|
|
846
851
|
return _this;
|
|
847
852
|
}
|
|
848
853
|
return ObjectEvent;
|
|
849
|
-
}(
|
|
854
|
+
}(Event));
|
|
850
855
|
/***
|
|
851
856
|
* @template Return
|
|
852
857
|
* @typedef {import("./Observable").OnSignature<import("./Observable").EventTypes, import("./events/Event.js").default, Return> &
|
|
@@ -859,7 +864,7 @@
|
|
|
859
864
|
* instantiated in apps.
|
|
860
865
|
* Most non-trivial classes inherit from this.
|
|
861
866
|
*
|
|
862
|
-
* This extends {@link module:ol/Observable} with observable
|
|
867
|
+
* This extends {@link module:ol/Observable~Observable} with observable
|
|
863
868
|
* properties, where each property is observable as well as the object as a
|
|
864
869
|
* whole.
|
|
865
870
|
*
|
|
@@ -971,24 +976,28 @@
|
|
|
971
976
|
*/
|
|
972
977
|
BaseObject.prototype.notify = function (key, oldValue) {
|
|
973
978
|
var eventType;
|
|
974
|
-
eventType = "change:"
|
|
975
|
-
this.
|
|
979
|
+
eventType = "change:".concat(key);
|
|
980
|
+
if (this.hasListener(eventType)) {
|
|
981
|
+
this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));
|
|
982
|
+
}
|
|
976
983
|
eventType = ObjectEventType.PROPERTYCHANGE;
|
|
977
|
-
this.
|
|
984
|
+
if (this.hasListener(eventType)) {
|
|
985
|
+
this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));
|
|
986
|
+
}
|
|
978
987
|
};
|
|
979
988
|
/**
|
|
980
989
|
* @param {string} key Key name.
|
|
981
990
|
* @param {import("./events.js").Listener} listener Listener.
|
|
982
991
|
*/
|
|
983
992
|
BaseObject.prototype.addChangeListener = function (key, listener) {
|
|
984
|
-
this.addEventListener("change:"
|
|
993
|
+
this.addEventListener("change:".concat(key), listener);
|
|
985
994
|
};
|
|
986
995
|
/**
|
|
987
996
|
* @param {string} key Key name.
|
|
988
997
|
* @param {import("./events.js").Listener} listener Listener.
|
|
989
998
|
*/
|
|
990
999
|
BaseObject.prototype.removeChangeListener = function (key, listener) {
|
|
991
|
-
this.removeEventListener("change:"
|
|
1000
|
+
this.removeEventListener("change:".concat(key), listener);
|
|
992
1001
|
};
|
|
993
1002
|
/**
|
|
994
1003
|
* Sets a value.
|
|
@@ -1052,7 +1061,8 @@
|
|
|
1052
1061
|
}
|
|
1053
1062
|
};
|
|
1054
1063
|
return BaseObject;
|
|
1055
|
-
}(Observable));
|
|
1064
|
+
}(Observable$1));
|
|
1065
|
+
var BaseObject$1 = BaseObject;
|
|
1056
1066
|
|
|
1057
1067
|
/**
|
|
1058
1068
|
* @module ol/CollectionEventType
|
|
@@ -1075,7 +1085,7 @@
|
|
|
1075
1085
|
REMOVE: 'remove',
|
|
1076
1086
|
};
|
|
1077
1087
|
|
|
1078
|
-
var __extends$
|
|
1088
|
+
var __extends$2 = (undefined && undefined.__extends) || (function () {
|
|
1079
1089
|
var extendStatics = function (d, b) {
|
|
1080
1090
|
extendStatics = Object.setPrototypeOf ||
|
|
1081
1091
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -1094,7 +1104,7 @@
|
|
|
1094
1104
|
* @enum {string}
|
|
1095
1105
|
* @private
|
|
1096
1106
|
*/
|
|
1097
|
-
var Property = {
|
|
1107
|
+
var Property$1 = {
|
|
1098
1108
|
LENGTH: 'length',
|
|
1099
1109
|
};
|
|
1100
1110
|
/**
|
|
@@ -1103,7 +1113,7 @@
|
|
|
1103
1113
|
* type.
|
|
1104
1114
|
*/
|
|
1105
1115
|
var CollectionEvent = /** @class */ (function (_super) {
|
|
1106
|
-
__extends$
|
|
1116
|
+
__extends$2(CollectionEvent, _super);
|
|
1107
1117
|
/**
|
|
1108
1118
|
* @param {import("./CollectionEventType.js").default} type Type.
|
|
1109
1119
|
* @param {*} [opt_element] Element.
|
|
@@ -1126,7 +1136,7 @@
|
|
|
1126
1136
|
return _this;
|
|
1127
1137
|
}
|
|
1128
1138
|
return CollectionEvent;
|
|
1129
|
-
}(
|
|
1139
|
+
}(Event));
|
|
1130
1140
|
/***
|
|
1131
1141
|
* @template Return
|
|
1132
1142
|
* @typedef {import("./Observable").OnSignature<import("./Observable").EventTypes, import("./events/Event.js").default, Return> &
|
|
@@ -1154,7 +1164,7 @@
|
|
|
1154
1164
|
* @api
|
|
1155
1165
|
*/
|
|
1156
1166
|
var Collection = /** @class */ (function (_super) {
|
|
1157
|
-
__extends$
|
|
1167
|
+
__extends$2(Collection, _super);
|
|
1158
1168
|
/**
|
|
1159
1169
|
* @param {Array<T>} [opt_array] Array.
|
|
1160
1170
|
* @param {Options} [opt_options] Collection options.
|
|
@@ -1254,7 +1264,7 @@
|
|
|
1254
1264
|
* @api
|
|
1255
1265
|
*/
|
|
1256
1266
|
Collection.prototype.getLength = function () {
|
|
1257
|
-
return this.get(Property.LENGTH);
|
|
1267
|
+
return this.get(Property$1.LENGTH);
|
|
1258
1268
|
};
|
|
1259
1269
|
/**
|
|
1260
1270
|
* Insert an element at the provided index.
|
|
@@ -1350,7 +1360,7 @@
|
|
|
1350
1360
|
* @private
|
|
1351
1361
|
*/
|
|
1352
1362
|
Collection.prototype.updateLength_ = function () {
|
|
1353
|
-
this.set(Property.LENGTH, this.array_.length);
|
|
1363
|
+
this.set(Property$1.LENGTH, this.array_.length);
|
|
1354
1364
|
};
|
|
1355
1365
|
/**
|
|
1356
1366
|
* @private
|
|
@@ -1360,12 +1370,13 @@
|
|
|
1360
1370
|
Collection.prototype.assertUnique_ = function (elem, opt_except) {
|
|
1361
1371
|
for (var i = 0, ii = this.array_.length; i < ii; ++i) {
|
|
1362
1372
|
if (this.array_[i] === elem && i !== opt_except) {
|
|
1363
|
-
throw new AssertionError(58);
|
|
1373
|
+
throw new AssertionError$1(58);
|
|
1364
1374
|
}
|
|
1365
1375
|
}
|
|
1366
1376
|
};
|
|
1367
1377
|
return Collection;
|
|
1368
|
-
}(BaseObject));
|
|
1378
|
+
}(BaseObject$1));
|
|
1379
|
+
var Collection$1 = Collection;
|
|
1369
1380
|
|
|
1370
1381
|
/**
|
|
1371
1382
|
* @module ol/asserts
|
|
@@ -1376,11 +1387,11 @@
|
|
|
1376
1387
|
*/
|
|
1377
1388
|
function assert(assertion, errorCode) {
|
|
1378
1389
|
if (!assertion) {
|
|
1379
|
-
throw new AssertionError(errorCode);
|
|
1390
|
+
throw new AssertionError$1(errorCode);
|
|
1380
1391
|
}
|
|
1381
1392
|
}
|
|
1382
1393
|
|
|
1383
|
-
var __extends$
|
|
1394
|
+
var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
1384
1395
|
var extendStatics = function (d, b) {
|
|
1385
1396
|
extendStatics = Object.setPrototypeOf ||
|
|
1386
1397
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -1399,7 +1410,7 @@
|
|
|
1399
1410
|
* @typedef {typeof Feature|typeof import("./render/Feature.js").default} FeatureClass
|
|
1400
1411
|
*/
|
|
1401
1412
|
/**
|
|
1402
|
-
* @typedef {Feature
|
|
1413
|
+
* @typedef {Feature|import("./render/Feature.js").default} FeatureLike
|
|
1403
1414
|
*/
|
|
1404
1415
|
/***
|
|
1405
1416
|
* @template Return
|
|
@@ -1421,7 +1432,7 @@
|
|
|
1421
1432
|
* Features can be styled individually with `setStyle`; otherwise they use the
|
|
1422
1433
|
* style of their vector layer.
|
|
1423
1434
|
*
|
|
1424
|
-
* Note that attribute properties are set as {@link module:ol/Object} properties on
|
|
1435
|
+
* Note that attribute properties are set as {@link module:ol/Object~BaseObject} properties on
|
|
1425
1436
|
* the feature object, so they are observable, and have get/set accessors.
|
|
1426
1437
|
*
|
|
1427
1438
|
* Typically, a feature has a single geometry property. You can set the
|
|
@@ -1455,10 +1466,10 @@
|
|
|
1455
1466
|
* ```
|
|
1456
1467
|
*
|
|
1457
1468
|
* @api
|
|
1458
|
-
* @template {import("./geom/Geometry.js").default} Geometry
|
|
1469
|
+
* @template {import("./geom/Geometry.js").default} [Geometry=import("./geom/Geometry.js").default]
|
|
1459
1470
|
*/
|
|
1460
1471
|
var Feature = /** @class */ (function (_super) {
|
|
1461
|
-
__extends$
|
|
1472
|
+
__extends$1(Feature, _super);
|
|
1462
1473
|
/**
|
|
1463
1474
|
* @param {Geometry|ObjectWithGeometry<Geometry>} [opt_geometryOrProperties]
|
|
1464
1475
|
* You may pass a Geometry object directly, or an object literal containing
|
|
@@ -1661,7 +1672,7 @@
|
|
|
1661
1672
|
this.handleGeometryChanged_();
|
|
1662
1673
|
};
|
|
1663
1674
|
return Feature;
|
|
1664
|
-
}(BaseObject));
|
|
1675
|
+
}(BaseObject$1));
|
|
1665
1676
|
/**
|
|
1666
1677
|
* Convert the provided object into a feature style function. Functions passed
|
|
1667
1678
|
* through unchanged. Arrays of Style or single style objects wrapped
|
|
@@ -1692,6 +1703,7 @@
|
|
|
1692
1703
|
};
|
|
1693
1704
|
}
|
|
1694
1705
|
}
|
|
1706
|
+
var Feature$1 = Feature;
|
|
1695
1707
|
|
|
1696
1708
|
/**
|
|
1697
1709
|
* @module ol/extent
|
|
@@ -1743,7 +1755,7 @@
|
|
|
1743
1755
|
}
|
|
1744
1756
|
/**
|
|
1745
1757
|
* @param {Node} node The node to remove.
|
|
1746
|
-
* @return {Node} The node that was removed or null.
|
|
1758
|
+
* @return {Node|null} The node that was removed or null.
|
|
1747
1759
|
*/
|
|
1748
1760
|
function removeNode(node) {
|
|
1749
1761
|
return node && node.parentNode ? node.parentNode.removeChild(node) : null;
|
|
@@ -1808,33 +1820,24 @@
|
|
|
1808
1820
|
* @api
|
|
1809
1821
|
*/
|
|
1810
1822
|
MOVEEND: 'moveend',
|
|
1823
|
+
/**
|
|
1824
|
+
* Triggered when loading of additional map data (tiles, images, features) starts.
|
|
1825
|
+
* @event module:ol/MapEvent~MapEvent#loadstart
|
|
1826
|
+
* @api
|
|
1827
|
+
*/
|
|
1828
|
+
LOADSTART: 'loadstart',
|
|
1829
|
+
/**
|
|
1830
|
+
* Triggered when loading of additional map data has completed.
|
|
1831
|
+
* @event module:ol/MapEvent~MapEvent#loadend
|
|
1832
|
+
* @api
|
|
1833
|
+
*/
|
|
1834
|
+
LOADEND: 'loadend',
|
|
1811
1835
|
};
|
|
1812
1836
|
/***
|
|
1813
|
-
* @typedef {'postrender'|'movestart'|'moveend'} Types
|
|
1814
|
-
*/
|
|
1815
|
-
|
|
1816
|
-
/**
|
|
1817
|
-
* @module ol/OverlayPositioning
|
|
1818
|
-
*/
|
|
1819
|
-
/**
|
|
1820
|
-
* Overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,
|
|
1821
|
-
* `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,
|
|
1822
|
-
* `'top-center'`, `'top-right'`
|
|
1823
|
-
* @enum {string}
|
|
1837
|
+
* @typedef {'postrender'|'movestart'|'moveend'|'loadstart'|'loadend'} Types
|
|
1824
1838
|
*/
|
|
1825
|
-
var OverlayPositioning = {
|
|
1826
|
-
BOTTOM_LEFT: 'bottom-left',
|
|
1827
|
-
BOTTOM_CENTER: 'bottom-center',
|
|
1828
|
-
BOTTOM_RIGHT: 'bottom-right',
|
|
1829
|
-
CENTER_LEFT: 'center-left',
|
|
1830
|
-
CENTER_CENTER: 'center-center',
|
|
1831
|
-
CENTER_RIGHT: 'center-right',
|
|
1832
|
-
TOP_LEFT: 'top-left',
|
|
1833
|
-
TOP_CENTER: 'top-center',
|
|
1834
|
-
TOP_RIGHT: 'top-right',
|
|
1835
|
-
};
|
|
1836
1839
|
|
|
1837
|
-
var __extends
|
|
1840
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1838
1841
|
var extendStatics = function (d, b) {
|
|
1839
1842
|
extendStatics = Object.setPrototypeOf ||
|
|
1840
1843
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -1849,6 +1852,12 @@
|
|
|
1849
1852
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1850
1853
|
};
|
|
1851
1854
|
})();
|
|
1855
|
+
/**
|
|
1856
|
+
* @typedef {'bottom-left' | 'bottom-center' | 'bottom-right' | 'center-left' | 'center-center' | 'center-right' | 'top-left' | 'top-center' | 'top-right'} Positioning
|
|
1857
|
+
* The overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,
|
|
1858
|
+
* `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,
|
|
1859
|
+
* `'top-center'`, or `'top-right'`.
|
|
1860
|
+
*/
|
|
1852
1861
|
/**
|
|
1853
1862
|
* @typedef {Object} Options
|
|
1854
1863
|
* @property {number|string} [id] Set the overlay id. The overlay id can be used
|
|
@@ -1861,7 +1870,7 @@
|
|
|
1861
1870
|
* shifts the overlay down.
|
|
1862
1871
|
* @property {import("./coordinate.js").Coordinate} [position] The overlay position
|
|
1863
1872
|
* in map projection.
|
|
1864
|
-
* @property {
|
|
1873
|
+
* @property {Positioning} [positioning='top-left'] Defines how
|
|
1865
1874
|
* the overlay is actually positioned with respect to its `position` property.
|
|
1866
1875
|
* Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,
|
|
1867
1876
|
* `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,
|
|
@@ -1912,7 +1921,7 @@
|
|
|
1912
1921
|
* @enum {string}
|
|
1913
1922
|
* @protected
|
|
1914
1923
|
*/
|
|
1915
|
-
var Property
|
|
1924
|
+
var Property = {
|
|
1916
1925
|
ELEMENT: 'element',
|
|
1917
1926
|
MAP: 'map',
|
|
1918
1927
|
OFFSET: 'offset',
|
|
@@ -1950,7 +1959,7 @@
|
|
|
1950
1959
|
* @api
|
|
1951
1960
|
*/
|
|
1952
1961
|
var Overlay = /** @class */ (function (_super) {
|
|
1953
|
-
__extends
|
|
1962
|
+
__extends(Overlay, _super);
|
|
1954
1963
|
/**
|
|
1955
1964
|
* @param {Options} options Overlay options.
|
|
1956
1965
|
*/
|
|
@@ -2026,18 +2035,16 @@
|
|
|
2026
2035
|
* @type {?import("./events.js").EventsKey}
|
|
2027
2036
|
*/
|
|
2028
2037
|
_this.mapPostrenderListenerKey = null;
|
|
2029
|
-
_this.addChangeListener(Property
|
|
2030
|
-
_this.addChangeListener(Property
|
|
2031
|
-
_this.addChangeListener(Property
|
|
2032
|
-
_this.addChangeListener(Property
|
|
2033
|
-
_this.addChangeListener(Property
|
|
2038
|
+
_this.addChangeListener(Property.ELEMENT, _this.handleElementChanged);
|
|
2039
|
+
_this.addChangeListener(Property.MAP, _this.handleMapChanged);
|
|
2040
|
+
_this.addChangeListener(Property.OFFSET, _this.handleOffsetChanged);
|
|
2041
|
+
_this.addChangeListener(Property.POSITION, _this.handlePositionChanged);
|
|
2042
|
+
_this.addChangeListener(Property.POSITIONING, _this.handlePositioningChanged);
|
|
2034
2043
|
if (options.element !== undefined) {
|
|
2035
2044
|
_this.setElement(options.element);
|
|
2036
2045
|
}
|
|
2037
2046
|
_this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);
|
|
2038
|
-
_this.setPositioning(options.positioning
|
|
2039
|
-
? /** @type {import("./OverlayPositioning.js").default} */ (options.positioning)
|
|
2040
|
-
: OverlayPositioning.TOP_LEFT);
|
|
2047
|
+
_this.setPositioning(options.positioning || 'top-left');
|
|
2041
2048
|
if (options.position !== undefined) {
|
|
2042
2049
|
_this.setPosition(options.position);
|
|
2043
2050
|
}
|
|
@@ -2050,7 +2057,7 @@
|
|
|
2050
2057
|
* @api
|
|
2051
2058
|
*/
|
|
2052
2059
|
Overlay.prototype.getElement = function () {
|
|
2053
|
-
return /** @type {HTMLElement|undefined} */ (this.get(Property
|
|
2060
|
+
return /** @type {HTMLElement|undefined} */ (this.get(Property.ELEMENT));
|
|
2054
2061
|
};
|
|
2055
2062
|
/**
|
|
2056
2063
|
* Get the overlay identifier which is set on constructor.
|
|
@@ -2062,13 +2069,13 @@
|
|
|
2062
2069
|
};
|
|
2063
2070
|
/**
|
|
2064
2071
|
* Get the map associated with this overlay.
|
|
2065
|
-
* @return {import("./PluggableMap.js").default|
|
|
2072
|
+
* @return {import("./PluggableMap.js").default|null} The map that the
|
|
2066
2073
|
* overlay is part of.
|
|
2067
2074
|
* @observable
|
|
2068
2075
|
* @api
|
|
2069
2076
|
*/
|
|
2070
2077
|
Overlay.prototype.getMap = function () {
|
|
2071
|
-
return /** @type {import("./PluggableMap.js").default|
|
|
2078
|
+
return /** @type {import("./PluggableMap.js").default|null} */ (this.get(Property.MAP) || null);
|
|
2072
2079
|
};
|
|
2073
2080
|
/**
|
|
2074
2081
|
* Get the offset of this overlay.
|
|
@@ -2077,7 +2084,7 @@
|
|
|
2077
2084
|
* @api
|
|
2078
2085
|
*/
|
|
2079
2086
|
Overlay.prototype.getOffset = function () {
|
|
2080
|
-
return /** @type {Array<number>} */ (this.get(Property
|
|
2087
|
+
return /** @type {Array<number>} */ (this.get(Property.OFFSET));
|
|
2081
2088
|
};
|
|
2082
2089
|
/**
|
|
2083
2090
|
* Get the current position of this overlay.
|
|
@@ -2087,17 +2094,17 @@
|
|
|
2087
2094
|
* @api
|
|
2088
2095
|
*/
|
|
2089
2096
|
Overlay.prototype.getPosition = function () {
|
|
2090
|
-
return /** @type {import("./coordinate.js").Coordinate|undefined} */ (this.get(Property
|
|
2097
|
+
return /** @type {import("./coordinate.js").Coordinate|undefined} */ (this.get(Property.POSITION));
|
|
2091
2098
|
};
|
|
2092
2099
|
/**
|
|
2093
2100
|
* Get the current positioning of this overlay.
|
|
2094
|
-
* @return {
|
|
2101
|
+
* @return {Positioning} How the overlay is positioned
|
|
2095
2102
|
* relative to its point on the map.
|
|
2096
2103
|
* @observable
|
|
2097
2104
|
* @api
|
|
2098
2105
|
*/
|
|
2099
2106
|
Overlay.prototype.getPositioning = function () {
|
|
2100
|
-
return /** @type {
|
|
2107
|
+
return /** @type {Positioning} */ (this.get(Property.POSITIONING));
|
|
2101
2108
|
};
|
|
2102
2109
|
/**
|
|
2103
2110
|
* @protected
|
|
@@ -2166,17 +2173,17 @@
|
|
|
2166
2173
|
* @api
|
|
2167
2174
|
*/
|
|
2168
2175
|
Overlay.prototype.setElement = function (element) {
|
|
2169
|
-
this.set(Property
|
|
2176
|
+
this.set(Property.ELEMENT, element);
|
|
2170
2177
|
};
|
|
2171
2178
|
/**
|
|
2172
2179
|
* Set the map to be associated with this overlay.
|
|
2173
|
-
* @param {import("./PluggableMap.js").default|
|
|
2174
|
-
* overlay is part of.
|
|
2180
|
+
* @param {import("./PluggableMap.js").default|null} map The map that the
|
|
2181
|
+
* overlay is part of. Pass `null` to just remove the overlay from the current map.
|
|
2175
2182
|
* @observable
|
|
2176
2183
|
* @api
|
|
2177
2184
|
*/
|
|
2178
2185
|
Overlay.prototype.setMap = function (map) {
|
|
2179
|
-
this.set(Property
|
|
2186
|
+
this.set(Property.MAP, map);
|
|
2180
2187
|
};
|
|
2181
2188
|
/**
|
|
2182
2189
|
* Set the offset for this overlay.
|
|
@@ -2185,7 +2192,7 @@
|
|
|
2185
2192
|
* @api
|
|
2186
2193
|
*/
|
|
2187
2194
|
Overlay.prototype.setOffset = function (offset) {
|
|
2188
|
-
this.set(Property
|
|
2195
|
+
this.set(Property.OFFSET, offset);
|
|
2189
2196
|
};
|
|
2190
2197
|
/**
|
|
2191
2198
|
* Set the position for this overlay. If the position is `undefined` the
|
|
@@ -2196,7 +2203,7 @@
|
|
|
2196
2203
|
* @api
|
|
2197
2204
|
*/
|
|
2198
2205
|
Overlay.prototype.setPosition = function (position) {
|
|
2199
|
-
this.set(Property
|
|
2206
|
+
this.set(Property.POSITION, position);
|
|
2200
2207
|
};
|
|
2201
2208
|
/**
|
|
2202
2209
|
* Pan the map so that the overlay is entirely visible in the current viewport
|
|
@@ -2216,7 +2223,7 @@
|
|
|
2216
2223
|
*/
|
|
2217
2224
|
Overlay.prototype.panIntoView = function (opt_panIntoViewOptions) {
|
|
2218
2225
|
var map = this.getMap();
|
|
2219
|
-
if (!map || !map.getTargetElement() || !this.get(Property
|
|
2226
|
+
if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {
|
|
2220
2227
|
return;
|
|
2221
2228
|
}
|
|
2222
2229
|
var mapRect = this.getRect(map.getTargetElement(), map.getSize());
|
|
@@ -2281,13 +2288,13 @@
|
|
|
2281
2288
|
};
|
|
2282
2289
|
/**
|
|
2283
2290
|
* Set the positioning for this overlay.
|
|
2284
|
-
* @param {
|
|
2291
|
+
* @param {Positioning} positioning how the overlay is
|
|
2285
2292
|
* positioned relative to its point on the map.
|
|
2286
2293
|
* @observable
|
|
2287
2294
|
* @api
|
|
2288
2295
|
*/
|
|
2289
2296
|
Overlay.prototype.setPositioning = function (positioning) {
|
|
2290
|
-
this.set(Property
|
|
2297
|
+
this.set(Property.POSITIONING, positioning);
|
|
2291
2298
|
};
|
|
2292
2299
|
/**
|
|
2293
2300
|
* Modify the visibility of the element.
|
|
@@ -2329,27 +2336,27 @@
|
|
|
2329
2336
|
var y = Math.round(pixel[1] + offset[1]) + 'px';
|
|
2330
2337
|
var posX = '0%';
|
|
2331
2338
|
var posY = '0%';
|
|
2332
|
-
if (positioning ==
|
|
2333
|
-
positioning ==
|
|
2334
|
-
positioning ==
|
|
2339
|
+
if (positioning == 'bottom-right' ||
|
|
2340
|
+
positioning == 'center-right' ||
|
|
2341
|
+
positioning == 'top-right') {
|
|
2335
2342
|
posX = '-100%';
|
|
2336
2343
|
}
|
|
2337
|
-
else if (positioning ==
|
|
2338
|
-
positioning ==
|
|
2339
|
-
positioning ==
|
|
2344
|
+
else if (positioning == 'bottom-center' ||
|
|
2345
|
+
positioning == 'center-center' ||
|
|
2346
|
+
positioning == 'top-center') {
|
|
2340
2347
|
posX = '-50%';
|
|
2341
2348
|
}
|
|
2342
|
-
if (positioning ==
|
|
2343
|
-
positioning ==
|
|
2344
|
-
positioning ==
|
|
2349
|
+
if (positioning == 'bottom-left' ||
|
|
2350
|
+
positioning == 'bottom-center' ||
|
|
2351
|
+
positioning == 'bottom-right') {
|
|
2345
2352
|
posY = '-100%';
|
|
2346
2353
|
}
|
|
2347
|
-
else if (positioning ==
|
|
2348
|
-
positioning ==
|
|
2349
|
-
positioning ==
|
|
2354
|
+
else if (positioning == 'center-left' ||
|
|
2355
|
+
positioning == 'center-center' ||
|
|
2356
|
+
positioning == 'center-right') {
|
|
2350
2357
|
posY = '-50%';
|
|
2351
2358
|
}
|
|
2352
|
-
var transform = "translate("
|
|
2359
|
+
var transform = "translate(".concat(posX, ", ").concat(posY, ") translate(").concat(x, ", ").concat(y, ")");
|
|
2353
2360
|
if (this.rendered.transform_ != transform) {
|
|
2354
2361
|
this.rendered.transform_ = transform;
|
|
2355
2362
|
style.transform = transform;
|
|
@@ -2365,7 +2372,8 @@
|
|
|
2365
2372
|
return this.options;
|
|
2366
2373
|
};
|
|
2367
2374
|
return Overlay;
|
|
2368
|
-
}(BaseObject));
|
|
2375
|
+
}(BaseObject$1));
|
|
2376
|
+
var Overlay$1 = Overlay;
|
|
2369
2377
|
|
|
2370
2378
|
var domain;
|
|
2371
2379
|
|
|
@@ -3219,7 +3227,7 @@
|
|
|
3219
3227
|
}
|
|
3220
3228
|
|
|
3221
3229
|
_setEvents() {
|
|
3222
|
-
|
|
3230
|
+
this._options;
|
|
3223
3231
|
let html = this._html;
|
|
3224
3232
|
|
|
3225
3233
|
this._events.keydownHandler = this._handleKeydownEvent.bind(this);
|
|
@@ -3435,17 +3443,17 @@
|
|
|
3435
3443
|
|
|
3436
3444
|
var modalVanilla = require$$0.default;
|
|
3437
3445
|
|
|
3438
|
-
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";
|
|
3446
|
+
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='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";
|
|
3439
3447
|
|
|
3440
|
-
var img$
|
|
3448
|
+
var img$4 = "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";
|
|
3441
3449
|
|
|
3442
|
-
var img$
|
|
3450
|
+
var img$3 = "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";
|
|
3443
3451
|
|
|
3444
|
-
var img$
|
|
3452
|
+
var img$2 = "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";
|
|
3445
3453
|
|
|
3446
|
-
var img$
|
|
3454
|
+
var img$1 = "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";
|
|
3447
3455
|
|
|
3448
|
-
var img
|
|
3456
|
+
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='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";
|
|
3449
3457
|
|
|
3450
3458
|
var GeometryType;
|
|
3451
3459
|
(function (GeometryType) {
|
|
@@ -3605,6 +3613,7 @@
|
|
|
3605
3613
|
* @fires modifyend
|
|
3606
3614
|
* @fires drawstart
|
|
3607
3615
|
* @fires drawend
|
|
3616
|
+
* @fires load
|
|
3608
3617
|
* @extends {ol/control/Control~Control}
|
|
3609
3618
|
* @param opt_options Wfst options, see [Wfst Options](#options) for more details.
|
|
3610
3619
|
*/
|
|
@@ -3614,6 +3623,7 @@
|
|
|
3614
3623
|
target: null,
|
|
3615
3624
|
element: controlElement
|
|
3616
3625
|
});
|
|
3626
|
+
this._initialized = false;
|
|
3617
3627
|
// Check if the selected language exists
|
|
3618
3628
|
this._i18n =
|
|
3619
3629
|
opt_options.language && opt_options.language in i18n
|
|
@@ -3658,7 +3668,7 @@
|
|
|
3658
3668
|
}
|
|
3659
3669
|
};
|
|
3660
3670
|
this._options = deepObjectAssign(defaultOptions, opt_options);
|
|
3661
|
-
this._mapLayers =
|
|
3671
|
+
this._mapLayers = {};
|
|
3662
3672
|
this._countRequests = 0;
|
|
3663
3673
|
this._isEditModeOn = false;
|
|
3664
3674
|
// GeoServer
|
|
@@ -3684,6 +3694,17 @@
|
|
|
3684
3694
|
this._controlWidgetToolsDiv.className = 'ol-wfst--tools-control';
|
|
3685
3695
|
this._initAsyncOperations();
|
|
3686
3696
|
}
|
|
3697
|
+
/**
|
|
3698
|
+
* Gat all the layers in the ol-wfst instance
|
|
3699
|
+
* If a name is provided, only returns that layer
|
|
3700
|
+
* @public
|
|
3701
|
+
*/
|
|
3702
|
+
getLayers(layerName = '') {
|
|
3703
|
+
if (layerName && layerName in this._mapLayers) {
|
|
3704
|
+
return this._mapLayers[layerName];
|
|
3705
|
+
}
|
|
3706
|
+
return Object.values(this._mapLayers);
|
|
3707
|
+
}
|
|
3687
3708
|
/**
|
|
3688
3709
|
* @private
|
|
3689
3710
|
*/
|
|
@@ -3699,10 +3720,6 @@
|
|
|
3699
3720
|
/**
|
|
3700
3721
|
* Connect to the GeoServer and retrieve metadata about the service (GetCapabilities).
|
|
3701
3722
|
* Get each layer specs (DescribeFeatureType) and create the layers and map controls.
|
|
3702
|
-
*
|
|
3703
|
-
* @param layers
|
|
3704
|
-
* @param showControl
|
|
3705
|
-
* @param active
|
|
3706
3723
|
* @private
|
|
3707
3724
|
*/
|
|
3708
3725
|
_initAsyncOperations() {
|
|
@@ -3710,7 +3727,9 @@
|
|
|
3710
3727
|
try {
|
|
3711
3728
|
// @ts-expect-error
|
|
3712
3729
|
this.on('allDescribeFeatureTypeLoaded', this._onLoad);
|
|
3713
|
-
this.
|
|
3730
|
+
if (this._isVisible) {
|
|
3731
|
+
this._showLoading();
|
|
3732
|
+
}
|
|
3714
3733
|
yield this._connectToGeoServerAndGetCapabilities();
|
|
3715
3734
|
if (this._options.layers) {
|
|
3716
3735
|
yield this._getGeoserverLayersData(this._options.layers, this._options.geoServerUrl);
|
|
@@ -3805,8 +3824,7 @@
|
|
|
3805
3824
|
const getLayerData = (layerName) => __awaiter(this, void 0, void 0, function* () {
|
|
3806
3825
|
const params = new URLSearchParams({
|
|
3807
3826
|
service: 'wfs',
|
|
3808
|
-
version: this._options.geoServerAdvanced
|
|
3809
|
-
.describeFeatureTypeVersion,
|
|
3827
|
+
version: this._options.geoServerAdvanced.describeFeatureTypeVersion,
|
|
3810
3828
|
request: 'DescribeFeatureType',
|
|
3811
3829
|
typeName: layerName,
|
|
3812
3830
|
outputFormat: 'application/json',
|
|
@@ -3997,8 +4015,7 @@
|
|
|
3997
4015
|
featureProjection: this._view
|
|
3998
4016
|
.getProjection()
|
|
3999
4017
|
.getCode(),
|
|
4000
|
-
dataProjection: this._options.geoServerAdvanced
|
|
4001
|
-
.projection
|
|
4018
|
+
dataProjection: this._options.geoServerAdvanced.projection
|
|
4002
4019
|
});
|
|
4003
4020
|
features.forEach((feature) => {
|
|
4004
4021
|
feature.set('_layerName_', layerName,
|
|
@@ -4085,7 +4102,7 @@
|
|
|
4085
4102
|
* @private
|
|
4086
4103
|
*/
|
|
4087
4104
|
const prepareWfsInteraction = () => {
|
|
4088
|
-
this._collectionModify = new Collection();
|
|
4105
|
+
this._collectionModify = new Collection$1();
|
|
4089
4106
|
// Interaction to select wfs layer elements
|
|
4090
4107
|
this.interactionWfsSelect = new interaction.Select({
|
|
4091
4108
|
hitTolerance: 10,
|
|
@@ -4335,10 +4352,10 @@
|
|
|
4335
4352
|
" data-layer="${layerName}">
|
|
4336
4353
|
<div class="ol-wfst--tools-control-visible">
|
|
4337
4354
|
<span class="ol-wfst--tools-control-visible-btn ol-wfst--visible-btn-on" title="${this._i18n.labels.toggleVisibility}">
|
|
4338
|
-
<img src="${img$
|
|
4355
|
+
<img src="${img$1}"/>
|
|
4339
4356
|
</span>
|
|
4340
4357
|
<span class="ol-wfst--tools-control-visible-btn ol-wfst--visible-btn-off" title="${this._i18n.labels.toggleVisibility}">
|
|
4341
|
-
<img src="${img
|
|
4358
|
+
<img src="${img}"/>
|
|
4342
4359
|
</span>
|
|
4343
4360
|
</div>
|
|
4344
4361
|
<label for="wfst--${layerName}">
|
|
@@ -4402,7 +4419,7 @@
|
|
|
4402
4419
|
uploadButton.className =
|
|
4403
4420
|
'ol-wfst--tools-control-btn ol-wfst--tools-control-btn-upload';
|
|
4404
4421
|
uploadButton.htmlFor = 'ol-wfst--upload';
|
|
4405
|
-
uploadButton.innerHTML = `<img src="${img$
|
|
4422
|
+
uploadButton.innerHTML = `<img src="${img$2}"/> `;
|
|
4406
4423
|
uploadButton.title = this._i18n.labels.uploadToLayer;
|
|
4407
4424
|
// Hidden Input form
|
|
4408
4425
|
const uploadInput = document.createElement('input');
|
|
@@ -4426,7 +4443,7 @@
|
|
|
4426
4443
|
drawButton.className =
|
|
4427
4444
|
'ol-wfst--tools-control-btn ol-wfst--tools-control-btn-draw';
|
|
4428
4445
|
drawButton.type = 'button';
|
|
4429
|
-
drawButton.innerHTML = `<img src="${img}"/>`;
|
|
4446
|
+
drawButton.innerHTML = `<img src="${img$5}"/>`;
|
|
4430
4447
|
drawButton.title = this._i18n.labels.addElement;
|
|
4431
4448
|
drawButton.onclick = () => {
|
|
4432
4449
|
if (this._isDrawModeOn) {
|
|
@@ -4502,10 +4519,18 @@
|
|
|
4502
4519
|
}
|
|
4503
4520
|
/**
|
|
4504
4521
|
* Hide loading
|
|
4522
|
+
* @fires load
|
|
4505
4523
|
* @private
|
|
4506
4524
|
*/
|
|
4507
4525
|
_hideLoading() {
|
|
4508
|
-
|
|
4526
|
+
// run only once
|
|
4527
|
+
if (!this._initialized) {
|
|
4528
|
+
this.dispatchEvent('load');
|
|
4529
|
+
this._initialized = true;
|
|
4530
|
+
}
|
|
4531
|
+
if (this._modalLoading) {
|
|
4532
|
+
this._modalLoading.classList.remove('ol-wfst--tools-control--loading-show');
|
|
4533
|
+
}
|
|
4509
4534
|
}
|
|
4510
4535
|
/**
|
|
4511
4536
|
* Lock a feature in the geoserver before edit
|
|
@@ -4619,7 +4644,7 @@
|
|
|
4619
4644
|
const featureProperties = feature.getProperties();
|
|
4620
4645
|
delete featureProperties.boundedBy;
|
|
4621
4646
|
delete featureProperties._layerName_;
|
|
4622
|
-
const clone = new Feature(featureProperties);
|
|
4647
|
+
const clone = new Feature$1(featureProperties);
|
|
4623
4648
|
clone.setId(feature.getId());
|
|
4624
4649
|
return clone;
|
|
4625
4650
|
};
|
|
@@ -4769,12 +4794,12 @@
|
|
|
4769
4794
|
this._editLayer.getSource().removeFeature(feature);
|
|
4770
4795
|
}
|
|
4771
4796
|
}
|
|
4772
|
-
const
|
|
4773
|
-
if (
|
|
4774
|
-
refreshWfsLayer(
|
|
4797
|
+
const wlayer = this._mapLayers[layerName];
|
|
4798
|
+
if (wlayer instanceof layer.Vector) {
|
|
4799
|
+
refreshWfsLayer(wlayer);
|
|
4775
4800
|
}
|
|
4776
|
-
else if (
|
|
4777
|
-
refreshWmsLayer(
|
|
4801
|
+
else if (wlayer instanceof layer.Tile) {
|
|
4802
|
+
refreshWmsLayer(wlayer);
|
|
4778
4803
|
}
|
|
4779
4804
|
this._hideLoading();
|
|
4780
4805
|
this._insertFeatures = [];
|
|
@@ -4890,7 +4915,7 @@
|
|
|
4890
4915
|
return;
|
|
4891
4916
|
}
|
|
4892
4917
|
if (this._keySelect) {
|
|
4893
|
-
Observable$
|
|
4918
|
+
Observable$2.unByKey(this._keySelect);
|
|
4894
4919
|
}
|
|
4895
4920
|
const layerName = feature.get('_layerName_');
|
|
4896
4921
|
this._transactWFS('delete', feature, layerName);
|
|
@@ -5142,7 +5167,7 @@
|
|
|
5142
5167
|
*/
|
|
5143
5168
|
_addFeatureToEdit(feature, coordinate = null, layerName = null) {
|
|
5144
5169
|
const prepareOverlay = () => {
|
|
5145
|
-
const svgFields = `<img src="${img$
|
|
5170
|
+
const svgFields = `<img src="${img$4}"/>`;
|
|
5146
5171
|
const editFieldsEl = document.createElement('div');
|
|
5147
5172
|
editFieldsEl.className = 'ol-wfst--edit-button-cnt';
|
|
5148
5173
|
editFieldsEl.innerHTML = `<button class="ol-wfst--edit-button" type="button" title="${this._i18n.labels.editFields}">${svgFields}</button>`;
|
|
@@ -5151,7 +5176,7 @@
|
|
|
5151
5176
|
};
|
|
5152
5177
|
const buttons = document.createElement('div');
|
|
5153
5178
|
buttons.append(editFieldsEl);
|
|
5154
|
-
const svgGeom = `<img src="${img$
|
|
5179
|
+
const svgGeom = `<img src="${img$3}"/>`;
|
|
5155
5180
|
const editGeomEl = document.createElement('div');
|
|
5156
5181
|
editGeomEl.className = 'ol-wfst--edit-button-cnt';
|
|
5157
5182
|
editGeomEl.innerHTML = `<button class="ol-wfst--edit-button" type="button" title="${this._i18n.labels.editGeom}">${svgGeom}</button>`;
|
|
@@ -5160,7 +5185,7 @@
|
|
|
5160
5185
|
};
|
|
5161
5186
|
buttons.append(editGeomEl);
|
|
5162
5187
|
const position = coordinate || extent.getCenter(feature.getGeometry().getExtent());
|
|
5163
|
-
const buttonsOverlay = new Overlay({
|
|
5188
|
+
const buttonsOverlay = new Overlay$1({
|
|
5164
5189
|
id: feature.getId(),
|
|
5165
5190
|
position: position,
|
|
5166
5191
|
positioning: 'center-center',
|
|
@@ -5652,5 +5677,5 @@
|
|
|
5652
5677
|
|
|
5653
5678
|
return Wfst;
|
|
5654
5679
|
|
|
5655
|
-
}))
|
|
5680
|
+
}));
|
|
5656
5681
|
//# sourceMappingURL=ol-wfst.js.map
|