@nextgis/ngw-leaflet 4.1.0 → 4.1.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/lib/ngw-leaflet.esm-browser.js +996 -771
- package/lib/ngw-leaflet.esm-browser.js.map +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.js +1 -1
- package/lib/ngw-leaflet.global.js +996 -771
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +1 -1
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 4.1.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 4.1.3; author: NextGIS */
|
|
2
2
|
function getElement(el) {
|
|
3
3
|
if (typeof el === "string") {
|
|
4
4
|
let el_ = document.getElementById(el);
|
|
@@ -13,29 +13,29 @@ function getElement(el) {
|
|
|
13
13
|
return el;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
var __defProp$
|
|
17
|
-
var __defProps$
|
|
18
|
-
var __getOwnPropDescs$
|
|
19
|
-
var __getOwnPropSymbols$
|
|
20
|
-
var __hasOwnProp$
|
|
21
|
-
var __propIsEnum$
|
|
22
|
-
var __defNormalProp$
|
|
23
|
-
var __spreadValues$
|
|
16
|
+
var __defProp$1c = Object.defineProperty;
|
|
17
|
+
var __defProps$x = Object.defineProperties;
|
|
18
|
+
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
19
|
+
var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
|
|
20
|
+
var __hasOwnProp$S = Object.prototype.hasOwnProperty;
|
|
21
|
+
var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
|
|
22
|
+
var __defNormalProp$1c = (obj, key, value) => key in obj ? __defProp$1c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23
|
+
var __spreadValues$R = (a, b) => {
|
|
24
24
|
for (var prop in b || (b = {}))
|
|
25
|
-
if (__hasOwnProp$
|
|
26
|
-
__defNormalProp$
|
|
27
|
-
if (__getOwnPropSymbols$
|
|
28
|
-
for (var prop of __getOwnPropSymbols$
|
|
29
|
-
if (__propIsEnum$
|
|
30
|
-
__defNormalProp$
|
|
25
|
+
if (__hasOwnProp$S.call(b, prop))
|
|
26
|
+
__defNormalProp$1c(a, prop, b[prop]);
|
|
27
|
+
if (__getOwnPropSymbols$S)
|
|
28
|
+
for (var prop of __getOwnPropSymbols$S(b)) {
|
|
29
|
+
if (__propIsEnum$S.call(b, prop))
|
|
30
|
+
__defNormalProp$1c(a, prop, b[prop]);
|
|
31
31
|
}
|
|
32
32
|
return a;
|
|
33
33
|
};
|
|
34
|
-
var __spreadProps$
|
|
34
|
+
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
35
35
|
const controlOptions = /* @__PURE__ */ new WeakMap();
|
|
36
36
|
function resolveControlOptions(options = {}) {
|
|
37
37
|
var _a;
|
|
38
|
-
return __spreadProps$
|
|
38
|
+
return __spreadProps$x(__spreadValues$R({}, options), {
|
|
39
39
|
margin: (_a = options.margin) != null ? _a : options.bar
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -76,25 +76,25 @@ function styleInject(css, ref) {
|
|
|
76
76
|
var css_248z$4 = ".webmap-ctrl-bottom-left,.webmap-ctrl-bottom-right,.webmap-ctrl-left,.webmap-ctrl-right,.webmap-ctrl-top-left,.webmap-ctrl-top-right{position:absolute;pointer-events:none;z-index:9999}.webmap-ctrl-left,.webmap-ctrl-right{height:100%}.webmap-ctrl-left{padding-right:0}.webmap-ctrl-right{padding-left:0}.webmap-ctrl-top-left{top:0;left:0}.webmap-ctrl-top-right{top:0;right:0}.webmap-ctrl-bottom-left{bottom:0;left:0}.webmap-ctrl-bottom-right{right:0;bottom:0}.webmap-ctrl,.webmap-ctrl-wrapper{clear:both;pointer-events:auto;transform:translate(0)}.webmap-ctrl-top-left>.webmap-ctrl,.webmap-ctrl-top-left>.webmap-ctrl-wrapper{float:left}.webmap-ctrl-top-right>.webmap-ctrl,.webmap-ctrl-top-right>.webmap-ctrl-wrapper{float:right}.webmap-ctrl-bottom-left>.webmap-ctrl,.webmap-ctrl-bottom-left>.webmap-ctrl-wrapper{float:left}.webmap-ctrl-bottom-right>.webmap-ctrl,.webmap-ctrl-bottom-right>.webmap-ctrl-wrapper{float:right}.webmap-ctrl-top-left>.webmap-ctrl-margin{margin:10px 0 0 10px}.webmap-ctrl-top-right>.webmap-ctrl-margin{margin:10px 10px 0 0}.webmap-ctrl-bottom-left>.webmap-ctrl-margin{margin:0 0 10px 10px}.webmap-ctrl-bottom-right>.webmap-ctrl-margin{margin:0 10px 10px 0}.webmap-ctrl-group{border-radius:4px;background:#fff}.webmap-ctrl .webmap-ctrl-wrapper{clear:none;float:none;margin:0}.webmap-ctrl .webmap-ctrl-wrapper>.webmap-ctrl,.webmap-ctrl>.webmap-ctrl{clear:none;float:none;margin:0!important}.webmap-ctrl-horizontal,.webmap-ctrl-vertical{display:flex}.webmap-ctrl-vertical{flex-direction:column;align-items:var(--webmap-ctrl-align,flex-start)}.webmap-ctrl-horizontal{flex-direction:row;align-items:var(--webmap-ctrl-align,stretch)}.webmap-ctrl:not(.webmap-ctrl-group).webmap-ctrl-horizontal,.webmap-ctrl:not(.webmap-ctrl-group).webmap-ctrl-vertical{gap:var(--webmap-ctrl-gap,0)}.webmap-ctrl-gapless:not(.webmap-ctrl-group){border:2px solid rgba(0,0,0,.1);border-radius:4px;box-sizing:border-box;background:#fff;overflow:hidden}.webmap-ctrl-gapless:not(.webmap-ctrl-group):not(:empty){box-shadow:none}.webmap-ctrl-gapless>.webmap-ctrl-group,.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.webmap-ctrl-group{border-radius:0;border:0!important;box-shadow:none!important}.webmap-ctrl-gapless>.leaflet-bar,.webmap-ctrl-gapless>.maplibregl-ctrl-group,.webmap-ctrl-gapless>.ol-control,.webmap-ctrl-gapless>.webmap-ctrl,.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.leaflet-bar,.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.maplibregl-ctrl-group,.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.ol-control,.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.webmap-ctrl{border:0!important;box-shadow:none!important}.webmap-ctrl-gapless.webmap-ctrl-horizontal>.webmap-ctrl-group:first-child,.webmap-ctrl-gapless.webmap-ctrl-horizontal>.webmap-ctrl-wrapper:first-child>.webmap-ctrl-group{border-radius:4px 0 0 4px}.webmap-ctrl-gapless.webmap-ctrl-horizontal>.webmap-ctrl-group:last-child,.webmap-ctrl-gapless.webmap-ctrl-horizontal>.webmap-ctrl-wrapper:last-child>.webmap-ctrl-group{border-radius:0 4px 4px 0}.webmap-ctrl-gapless.webmap-ctrl-vertical>.webmap-ctrl-group:first-child,.webmap-ctrl-gapless.webmap-ctrl-vertical>.webmap-ctrl-wrapper:first-child>.webmap-ctrl-group{border-radius:4px 4px 0 0}.webmap-ctrl-gapless.webmap-ctrl-vertical>.webmap-ctrl-group:last-child,.webmap-ctrl-gapless.webmap-ctrl-vertical>.webmap-ctrl-wrapper:last-child>.webmap-ctrl-group{border-radius:0 0 4px 4px}.webmap-ctrl-gapless>.webmap-ctrl-group:only-child,.webmap-ctrl-gapless>.webmap-ctrl-wrapper:only-child>.webmap-ctrl-group{border-radius:4px}.webmap-ctrl-horizontal>.webmap-ctrl-wrapper,.webmap-ctrl-vertical>.webmap-ctrl-wrapper{display:flex}.webmap-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.webmap-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}.webmap-ctrl-gapless:not(.webmap-ctrl-group){border-color:ButtonText}}.webmap-ctrl-gapless>.webmap-ctrl-group:not(:empty),.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.webmap-ctrl-group:not(:empty){border:0!important;box-shadow:none!important}.webmap-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.webmap-ctrl-button{line-height:inherit!important;font-weight:400!important}.webmap-ctrl-group button+button{border-top:1px solid #ddd}.webmap-ctrl-group.webmap-ctrl-horizontal>button+button{border-top:0;border-left:1px solid #ddd}.webmap-ctrl-gapless .webmap-ctrl-group button+button,.webmap-ctrl-group.webmap-ctrl-gapless button+button{border-top:0!important;border-left:0!important}.webmap-ctrl-gapless .webmap-ctrl-group button{border:0!important;border-radius:0!important;box-shadow:none!important}.webmap-ctrl button .webmap-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media (-ms-high-contrast:active){.webmap-ctrl-icon{background-color:transparent}.webmap-ctrl-group button+button{border-top:1px solid ButtonText}}.webmap-ctrl button::-moz-focus-inner{border:0;padding:0}.webmap-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.webmap-ctrl button:disabled{cursor:not-allowed}.webmap-ctrl button:disabled .webmap-ctrl-icon{opacity:.25}.webmap-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}.webmap-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.webmap-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.webmap-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.webmap-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.webmap-ctrl-group button:focus:only-child{border-radius:inherit}.webmap-ctrl button.webmap-ctrl-zoom-out .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E\")}.webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E\")}@media (-ms-high-contrast:active){.webmap-ctrl button.webmap-ctrl-zoom-out .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E\")}.webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E\")}}@media (-ms-high-contrast:black-on-white){.webmap-ctrl button.webmap-ctrl-zoom-out .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E\")}.webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E\")}}";
|
|
77
77
|
styleInject(css_248z$4);
|
|
78
78
|
|
|
79
|
-
var __defProp$
|
|
80
|
-
var __defNormalProp$
|
|
81
|
-
var __publicField$
|
|
79
|
+
var __defProp$1b = Object.defineProperty;
|
|
80
|
+
var __defNormalProp$1b = (obj, key, value) => key in obj ? __defProp$1b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
81
|
+
var __publicField$K = (obj, key, value) => __defNormalProp$1b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
82
82
|
class ControlContainer {
|
|
83
83
|
constructor(opt = {}) {
|
|
84
|
-
__publicField$
|
|
85
|
-
__publicField$
|
|
86
|
-
__publicField$
|
|
87
|
-
__publicField$
|
|
88
|
-
__publicField$
|
|
89
|
-
__publicField$
|
|
90
|
-
__publicField$
|
|
91
|
-
__publicField$
|
|
92
|
-
__publicField$
|
|
93
|
-
__publicField$
|
|
94
|
-
__publicField$
|
|
95
|
-
__publicField$
|
|
96
|
-
__publicField$
|
|
97
|
-
__publicField$
|
|
84
|
+
__publicField$K(this, "classPrefix", "webmap");
|
|
85
|
+
__publicField$K(this, "addClass");
|
|
86
|
+
__publicField$K(this, "map");
|
|
87
|
+
__publicField$K(this, "wrapperClass");
|
|
88
|
+
__publicField$K(this, "ownsContainer");
|
|
89
|
+
__publicField$K(this, "_container");
|
|
90
|
+
__publicField$K(this, "_positionsContainers");
|
|
91
|
+
__publicField$K(this, "_targets", /* @__PURE__ */ new Set());
|
|
92
|
+
__publicField$K(this, "_idContainers", /* @__PURE__ */ new Map());
|
|
93
|
+
__publicField$K(this, "_pendingChildren", /* @__PURE__ */ new Map());
|
|
94
|
+
__publicField$K(this, "_orders", /* @__PURE__ */ new WeakMap());
|
|
95
|
+
__publicField$K(this, "_targetOptions", /* @__PURE__ */ new WeakMap());
|
|
96
|
+
__publicField$K(this, "_switchGroups", /* @__PURE__ */ new WeakMap());
|
|
97
|
+
__publicField$K(this, "_switchBindings", /* @__PURE__ */ new WeakMap());
|
|
98
98
|
this.classPrefix = opt.classPrefix || this.classPrefix;
|
|
99
99
|
this.addClass = opt.addClass;
|
|
100
100
|
this.map = opt.map;
|
|
@@ -14700,25 +14700,25 @@ function requireLeafletSrc () {
|
|
|
14700
14700
|
|
|
14701
14701
|
var leafletSrcExports = requireLeafletSrc();
|
|
14702
14702
|
|
|
14703
|
-
var __defProp$
|
|
14704
|
-
var __defProps$
|
|
14705
|
-
var __getOwnPropDescs$
|
|
14706
|
-
var __getOwnPropSymbols$
|
|
14707
|
-
var __hasOwnProp$
|
|
14708
|
-
var __propIsEnum$
|
|
14709
|
-
var __defNormalProp$
|
|
14710
|
-
var __spreadValues$
|
|
14703
|
+
var __defProp$1a = Object.defineProperty;
|
|
14704
|
+
var __defProps$w = Object.defineProperties;
|
|
14705
|
+
var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
|
|
14706
|
+
var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
|
|
14707
|
+
var __hasOwnProp$R = Object.prototype.hasOwnProperty;
|
|
14708
|
+
var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
|
|
14709
|
+
var __defNormalProp$1a = (obj, key, value) => key in obj ? __defProp$1a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14710
|
+
var __spreadValues$Q = (a, b) => {
|
|
14711
14711
|
for (var prop in b || (b = {}))
|
|
14712
|
-
if (__hasOwnProp$
|
|
14713
|
-
__defNormalProp$
|
|
14714
|
-
if (__getOwnPropSymbols$
|
|
14715
|
-
for (var prop of __getOwnPropSymbols$
|
|
14716
|
-
if (__propIsEnum$
|
|
14717
|
-
__defNormalProp$
|
|
14712
|
+
if (__hasOwnProp$R.call(b, prop))
|
|
14713
|
+
__defNormalProp$1a(a, prop, b[prop]);
|
|
14714
|
+
if (__getOwnPropSymbols$R)
|
|
14715
|
+
for (var prop of __getOwnPropSymbols$R(b)) {
|
|
14716
|
+
if (__propIsEnum$R.call(b, prop))
|
|
14717
|
+
__defNormalProp$1a(a, prop, b[prop]);
|
|
14718
14718
|
}
|
|
14719
14719
|
return a;
|
|
14720
14720
|
};
|
|
14721
|
-
var __spreadProps$
|
|
14721
|
+
var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
|
|
14722
14722
|
function createControl(control, options = {}, map) {
|
|
14723
14723
|
const resolvedOptions = resolveControlOptions(options);
|
|
14724
14724
|
const C = leafletSrcExports.Control.extend({
|
|
@@ -14730,7 +14730,7 @@ function createControl(control, options = {}, map) {
|
|
|
14730
14730
|
].filter(Boolean).join(" ");
|
|
14731
14731
|
const element = createControlElement(
|
|
14732
14732
|
control,
|
|
14733
|
-
__spreadProps$
|
|
14733
|
+
__spreadProps$w(__spreadValues$Q({}, resolvedOptions), { addClass }),
|
|
14734
14734
|
map != null ? map : leafletMap
|
|
14735
14735
|
);
|
|
14736
14736
|
if (!resolvedOptions.margin) {
|
|
@@ -14780,32 +14780,32 @@ function createToggleControl$1(options, map) {
|
|
|
14780
14780
|
var css_248z$3 = ".leaflet-bar.webmap-ctrl-group:not(:empty){box-shadow:0 0 2px rgba(0,0,0,.1)}";
|
|
14781
14781
|
styleInject(css_248z$3);
|
|
14782
14782
|
|
|
14783
|
-
var __defProp$
|
|
14784
|
-
var __defProps$
|
|
14785
|
-
var __getOwnPropDescs$
|
|
14786
|
-
var __getOwnPropSymbols$
|
|
14787
|
-
var __hasOwnProp$
|
|
14788
|
-
var __propIsEnum$
|
|
14789
|
-
var __defNormalProp$
|
|
14790
|
-
var __spreadValues$
|
|
14783
|
+
var __defProp$19 = Object.defineProperty;
|
|
14784
|
+
var __defProps$v = Object.defineProperties;
|
|
14785
|
+
var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
|
|
14786
|
+
var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
|
|
14787
|
+
var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
|
|
14788
|
+
var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
|
|
14789
|
+
var __defNormalProp$19 = (obj, key, value) => key in obj ? __defProp$19(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14790
|
+
var __spreadValues$P = (a, b) => {
|
|
14791
14791
|
for (var prop in b || (b = {}))
|
|
14792
|
-
if (__hasOwnProp$
|
|
14793
|
-
__defNormalProp$
|
|
14794
|
-
if (__getOwnPropSymbols$
|
|
14795
|
-
for (var prop of __getOwnPropSymbols$
|
|
14796
|
-
if (__propIsEnum$
|
|
14797
|
-
__defNormalProp$
|
|
14792
|
+
if (__hasOwnProp$Q.call(b, prop))
|
|
14793
|
+
__defNormalProp$19(a, prop, b[prop]);
|
|
14794
|
+
if (__getOwnPropSymbols$Q)
|
|
14795
|
+
for (var prop of __getOwnPropSymbols$Q(b)) {
|
|
14796
|
+
if (__propIsEnum$Q.call(b, prop))
|
|
14797
|
+
__defNormalProp$19(a, prop, b[prop]);
|
|
14798
14798
|
}
|
|
14799
14799
|
return a;
|
|
14800
14800
|
};
|
|
14801
|
-
var __spreadProps$
|
|
14802
|
-
var __publicField$
|
|
14801
|
+
var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
|
|
14802
|
+
var __publicField$J = (obj, key, value) => __defNormalProp$19(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14803
14803
|
class LeafletControlContainer {
|
|
14804
14804
|
constructor(map, options = {}) {
|
|
14805
|
-
__publicField$
|
|
14806
|
-
__publicField$
|
|
14807
|
-
__publicField$
|
|
14808
|
-
__publicField$
|
|
14805
|
+
__publicField$J(this, "map");
|
|
14806
|
+
__publicField$J(this, "controlContainer");
|
|
14807
|
+
__publicField$J(this, "targets", /* @__PURE__ */ new WeakMap());
|
|
14808
|
+
__publicField$J(this, "ids", /* @__PURE__ */ new WeakMap());
|
|
14809
14809
|
this.map = map;
|
|
14810
14810
|
this.controlContainer = this.createControlContainer(options);
|
|
14811
14811
|
this.controlContainer.addTo(map.getContainer());
|
|
@@ -14867,7 +14867,7 @@ class LeafletControlContainer {
|
|
|
14867
14867
|
const mapAny = this.map;
|
|
14868
14868
|
const controlCorners = mapAny._controlCorners || {};
|
|
14869
14869
|
const getCorner = (key, selector) => controlCorners[key] || this.map.getContainer().querySelector(selector) || void 0;
|
|
14870
|
-
return new ControlContainer(__spreadProps$
|
|
14870
|
+
return new ControlContainer(__spreadProps$v(__spreadValues$P({}, options), {
|
|
14871
14871
|
map: this.map,
|
|
14872
14872
|
container: mapAny._controlContainer,
|
|
14873
14873
|
positionContainers: {
|
|
@@ -15752,6 +15752,8 @@ function filterGeometries(data, type) {
|
|
|
15752
15752
|
_data.geometries = _data.geometries.filter(
|
|
15753
15753
|
(g) => geometryFilter(g.type, type)
|
|
15754
15754
|
);
|
|
15755
|
+
} else if (!geometryFilter(data.type, type)) {
|
|
15756
|
+
return false;
|
|
15755
15757
|
}
|
|
15756
15758
|
return data;
|
|
15757
15759
|
}
|
|
@@ -15775,15 +15777,15 @@ function createFeaturePositionOptions(features) {
|
|
|
15775
15777
|
};
|
|
15776
15778
|
}
|
|
15777
15779
|
|
|
15778
|
-
var __defProp$
|
|
15779
|
-
var __defNormalProp$
|
|
15780
|
-
var __publicField$
|
|
15780
|
+
var __defProp$18 = Object.defineProperty;
|
|
15781
|
+
var __defNormalProp$18 = (obj, key, value) => key in obj ? __defProp$18(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15782
|
+
var __publicField$I = (obj, key, value) => __defNormalProp$18(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15781
15783
|
class BaseAdapter {
|
|
15782
15784
|
constructor(map, options) {
|
|
15783
|
-
__publicField$
|
|
15784
|
-
__publicField$
|
|
15785
|
-
__publicField$
|
|
15786
|
-
__publicField$
|
|
15785
|
+
__publicField$I(this, "map", map);
|
|
15786
|
+
__publicField$I(this, "options", options);
|
|
15787
|
+
__publicField$I(this, "layer");
|
|
15788
|
+
__publicField$I(this, "pane", "order-0");
|
|
15787
15789
|
var _a, _b;
|
|
15788
15790
|
if (options.order !== void 0) {
|
|
15789
15791
|
const order = options.order;
|
|
@@ -15821,19 +15823,19 @@ function convertMapClickEvent(evt) {
|
|
|
15821
15823
|
};
|
|
15822
15824
|
}
|
|
15823
15825
|
|
|
15824
|
-
var __defProp$
|
|
15825
|
-
var __getOwnPropSymbols$
|
|
15826
|
-
var __hasOwnProp$
|
|
15827
|
-
var __propIsEnum$
|
|
15828
|
-
var __defNormalProp$
|
|
15829
|
-
var __spreadValues$
|
|
15826
|
+
var __defProp$17 = Object.defineProperty;
|
|
15827
|
+
var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
|
|
15828
|
+
var __hasOwnProp$P = Object.prototype.hasOwnProperty;
|
|
15829
|
+
var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
|
|
15830
|
+
var __defNormalProp$17 = (obj, key, value) => key in obj ? __defProp$17(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15831
|
+
var __spreadValues$O = (a, b) => {
|
|
15830
15832
|
for (var prop in b || (b = {}))
|
|
15831
|
-
if (__hasOwnProp$
|
|
15832
|
-
__defNormalProp$
|
|
15833
|
-
if (__getOwnPropSymbols$
|
|
15834
|
-
for (var prop of __getOwnPropSymbols$
|
|
15835
|
-
if (__propIsEnum$
|
|
15836
|
-
__defNormalProp$
|
|
15833
|
+
if (__hasOwnProp$P.call(b, prop))
|
|
15834
|
+
__defNormalProp$17(a, prop, b[prop]);
|
|
15835
|
+
if (__getOwnPropSymbols$P)
|
|
15836
|
+
for (var prop of __getOwnPropSymbols$P(b)) {
|
|
15837
|
+
if (__propIsEnum$P.call(b, prop))
|
|
15838
|
+
__defNormalProp$17(a, prop, b[prop]);
|
|
15837
15839
|
}
|
|
15838
15840
|
return a;
|
|
15839
15841
|
};
|
|
@@ -15843,7 +15845,7 @@ function createMouseEvent({
|
|
|
15843
15845
|
}) {
|
|
15844
15846
|
const layer_ = source.target;
|
|
15845
15847
|
const feature = layer_.feature;
|
|
15846
|
-
const opt = __spreadValues$
|
|
15848
|
+
const opt = __spreadValues$O({
|
|
15847
15849
|
layer,
|
|
15848
15850
|
feature,
|
|
15849
15851
|
event: convertMapClickEvent(source),
|
|
@@ -15852,30 +15854,30 @@ function createMouseEvent({
|
|
|
15852
15854
|
return opt;
|
|
15853
15855
|
}
|
|
15854
15856
|
|
|
15855
|
-
var __defProp$
|
|
15856
|
-
var __getOwnPropSymbols$
|
|
15857
|
-
var __hasOwnProp$
|
|
15858
|
-
var __propIsEnum$
|
|
15859
|
-
var __defNormalProp$
|
|
15860
|
-
var __spreadValues$
|
|
15857
|
+
var __defProp$16 = Object.defineProperty;
|
|
15858
|
+
var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
|
|
15859
|
+
var __hasOwnProp$O = Object.prototype.hasOwnProperty;
|
|
15860
|
+
var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
|
|
15861
|
+
var __defNormalProp$16 = (obj, key, value) => key in obj ? __defProp$16(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15862
|
+
var __spreadValues$N = (a, b) => {
|
|
15861
15863
|
for (var prop in b || (b = {}))
|
|
15862
|
-
if (__hasOwnProp$
|
|
15863
|
-
__defNormalProp$
|
|
15864
|
-
if (__getOwnPropSymbols$
|
|
15865
|
-
for (var prop of __getOwnPropSymbols$
|
|
15866
|
-
if (__propIsEnum$
|
|
15867
|
-
__defNormalProp$
|
|
15864
|
+
if (__hasOwnProp$O.call(b, prop))
|
|
15865
|
+
__defNormalProp$16(a, prop, b[prop]);
|
|
15866
|
+
if (__getOwnPropSymbols$O)
|
|
15867
|
+
for (var prop of __getOwnPropSymbols$O(b)) {
|
|
15868
|
+
if (__propIsEnum$O.call(b, prop))
|
|
15869
|
+
__defNormalProp$16(a, prop, b[prop]);
|
|
15868
15870
|
}
|
|
15869
15871
|
return a;
|
|
15870
15872
|
};
|
|
15871
|
-
var __publicField$
|
|
15873
|
+
var __publicField$H = (obj, key, value) => __defNormalProp$16(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15872
15874
|
class GeoJsonEvents {
|
|
15873
15875
|
constructor(layer) {
|
|
15874
|
-
__publicField$
|
|
15875
|
-
__publicField$
|
|
15876
|
-
__publicField$
|
|
15877
|
-
__publicField$
|
|
15878
|
-
__publicField$
|
|
15876
|
+
__publicField$H(this, "layer");
|
|
15877
|
+
__publicField$H(this, "_onclick");
|
|
15878
|
+
__publicField$H(this, "_ondblclick");
|
|
15879
|
+
__publicField$H(this, "_mouseout");
|
|
15880
|
+
__publicField$H(this, "_mouseover");
|
|
15879
15881
|
this.layer = layer;
|
|
15880
15882
|
}
|
|
15881
15883
|
handleMouseEvents(layer) {
|
|
@@ -15884,7 +15886,7 @@ class GeoJsonEvents {
|
|
|
15884
15886
|
if (onClick_) {
|
|
15885
15887
|
this._onclick = (e) => {
|
|
15886
15888
|
const selected = !!this.layer._getSelected(layer);
|
|
15887
|
-
onClick_(__spreadValues$
|
|
15889
|
+
onClick_(__spreadValues$N({
|
|
15888
15890
|
selected
|
|
15889
15891
|
}, this._createMouseEvent(e)));
|
|
15890
15892
|
};
|
|
@@ -15894,7 +15896,7 @@ class GeoJsonEvents {
|
|
|
15894
15896
|
this._ondblclick = (e) => {
|
|
15895
15897
|
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
15896
15898
|
const selected = !!this.layer._getSelected(layer);
|
|
15897
|
-
onDoubleClick(__spreadValues$
|
|
15899
|
+
onDoubleClick(__spreadValues$N({
|
|
15898
15900
|
selected
|
|
15899
15901
|
}, this._createMouseEvent(e)));
|
|
15900
15902
|
};
|
|
@@ -16553,19 +16555,19 @@ const typeExpressions = {
|
|
|
16553
16555
|
typeof: evaluateArgs(([arg]) => typeOfValue(arg))
|
|
16554
16556
|
};
|
|
16555
16557
|
|
|
16556
|
-
var __defProp$
|
|
16557
|
-
var __getOwnPropSymbols$
|
|
16558
|
-
var __hasOwnProp$
|
|
16559
|
-
var __propIsEnum$
|
|
16560
|
-
var __defNormalProp$
|
|
16561
|
-
var __spreadValues$
|
|
16558
|
+
var __defProp$15 = Object.defineProperty;
|
|
16559
|
+
var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
|
|
16560
|
+
var __hasOwnProp$N = Object.prototype.hasOwnProperty;
|
|
16561
|
+
var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
|
|
16562
|
+
var __defNormalProp$15 = (obj, key, value) => key in obj ? __defProp$15(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16563
|
+
var __spreadValues$M = (a, b) => {
|
|
16562
16564
|
for (var prop in b || (b = {}))
|
|
16563
|
-
if (__hasOwnProp$
|
|
16564
|
-
__defNormalProp$
|
|
16565
|
-
if (__getOwnPropSymbols$
|
|
16566
|
-
for (var prop of __getOwnPropSymbols$
|
|
16567
|
-
if (__propIsEnum$
|
|
16568
|
-
__defNormalProp$
|
|
16565
|
+
if (__hasOwnProp$N.call(b, prop))
|
|
16566
|
+
__defNormalProp$15(a, prop, b[prop]);
|
|
16567
|
+
if (__getOwnPropSymbols$N)
|
|
16568
|
+
for (var prop of __getOwnPropSymbols$N(b)) {
|
|
16569
|
+
if (__propIsEnum$N.call(b, prop))
|
|
16570
|
+
__defNormalProp$15(a, prop, b[prop]);
|
|
16569
16571
|
}
|
|
16570
16572
|
return a;
|
|
16571
16573
|
};
|
|
@@ -16577,7 +16579,7 @@ function isExpression(value) {
|
|
|
16577
16579
|
}
|
|
16578
16580
|
return false;
|
|
16579
16581
|
}
|
|
16580
|
-
const expressions = __spreadValues$
|
|
16582
|
+
const expressions = __spreadValues$M(__spreadValues$M(__spreadValues$M(__spreadValues$M(__spreadValues$M(__spreadValues$M({}, mathExpressions), typeExpressions), stringExpressions), lookupExpressions), decisionExpressions), interpolationExpressions);
|
|
16581
16583
|
function evaluate(expression, data = {}) {
|
|
16582
16584
|
const [name, ...args] = expression;
|
|
16583
16585
|
const expressionFun = expressions[name];
|
|
@@ -16590,19 +16592,19 @@ function evaluate(expression, data = {}) {
|
|
|
16590
16592
|
throw new Error(`Expression "${name}" is not supported.`);
|
|
16591
16593
|
}
|
|
16592
16594
|
|
|
16593
|
-
var __defProp$
|
|
16594
|
-
var __getOwnPropSymbols$
|
|
16595
|
-
var __hasOwnProp$
|
|
16596
|
-
var __propIsEnum$
|
|
16597
|
-
var __defNormalProp$
|
|
16598
|
-
var __spreadValues$
|
|
16595
|
+
var __defProp$14 = Object.defineProperty;
|
|
16596
|
+
var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
|
|
16597
|
+
var __hasOwnProp$M = Object.prototype.hasOwnProperty;
|
|
16598
|
+
var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
|
|
16599
|
+
var __defNormalProp$14 = (obj, key, value) => key in obj ? __defProp$14(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16600
|
+
var __spreadValues$L = (a, b) => {
|
|
16599
16601
|
for (var prop in b || (b = {}))
|
|
16600
|
-
if (__hasOwnProp$
|
|
16601
|
-
__defNormalProp$
|
|
16602
|
-
if (__getOwnPropSymbols$
|
|
16603
|
-
for (var prop of __getOwnPropSymbols$
|
|
16604
|
-
if (__propIsEnum$
|
|
16605
|
-
__defNormalProp$
|
|
16602
|
+
if (__hasOwnProp$M.call(b, prop))
|
|
16603
|
+
__defNormalProp$14(a, prop, b[prop]);
|
|
16604
|
+
if (__getOwnPropSymbols$M)
|
|
16605
|
+
for (var prop of __getOwnPropSymbols$M(b)) {
|
|
16606
|
+
if (__propIsEnum$M.call(b, prop))
|
|
16607
|
+
__defNormalProp$14(a, prop, b[prop]);
|
|
16606
16608
|
}
|
|
16607
16609
|
return a;
|
|
16608
16610
|
};
|
|
@@ -16635,25 +16637,25 @@ function createExpressionCallback(paint) {
|
|
|
16635
16637
|
for (const p in expressions) {
|
|
16636
16638
|
fromCb[p] = expressions[p](feature);
|
|
16637
16639
|
}
|
|
16638
|
-
return __spreadValues$
|
|
16640
|
+
return __spreadValues$L(__spreadValues$L({}, paint), fromCb);
|
|
16639
16641
|
};
|
|
16640
16642
|
}
|
|
16641
16643
|
return;
|
|
16642
16644
|
}
|
|
16643
16645
|
|
|
16644
|
-
var __defProp$
|
|
16645
|
-
var __getOwnPropSymbols$
|
|
16646
|
-
var __hasOwnProp$
|
|
16647
|
-
var __propIsEnum$
|
|
16648
|
-
var __defNormalProp$
|
|
16649
|
-
var __spreadValues$
|
|
16646
|
+
var __defProp$13 = Object.defineProperty;
|
|
16647
|
+
var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
|
|
16648
|
+
var __hasOwnProp$L = Object.prototype.hasOwnProperty;
|
|
16649
|
+
var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
|
|
16650
|
+
var __defNormalProp$13 = (obj, key, value) => key in obj ? __defProp$13(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16651
|
+
var __spreadValues$K = (a, b) => {
|
|
16650
16652
|
for (var prop in b || (b = {}))
|
|
16651
|
-
if (__hasOwnProp$
|
|
16652
|
-
__defNormalProp$
|
|
16653
|
-
if (__getOwnPropSymbols$
|
|
16654
|
-
for (var prop of __getOwnPropSymbols$
|
|
16655
|
-
if (__propIsEnum$
|
|
16656
|
-
__defNormalProp$
|
|
16653
|
+
if (__hasOwnProp$L.call(b, prop))
|
|
16654
|
+
__defNormalProp$13(a, prop, b[prop]);
|
|
16655
|
+
if (__getOwnPropSymbols$L)
|
|
16656
|
+
for (var prop of __getOwnPropSymbols$L(b)) {
|
|
16657
|
+
if (__propIsEnum$L.call(b, prop))
|
|
16658
|
+
__defNormalProp$13(a, prop, b[prop]);
|
|
16657
16659
|
}
|
|
16658
16660
|
return a;
|
|
16659
16661
|
};
|
|
@@ -16700,7 +16702,7 @@ function isPropertyFilter$1(filter) {
|
|
|
16700
16702
|
return false;
|
|
16701
16703
|
}
|
|
16702
16704
|
function featureFilter(feature, filters) {
|
|
16703
|
-
const properties = __spreadValues$
|
|
16705
|
+
const properties = __spreadValues$K({}, feature.properties);
|
|
16704
16706
|
if (properties) {
|
|
16705
16707
|
properties.$id = feature.id;
|
|
16706
16708
|
return propertiesFilter(properties, filters);
|
|
@@ -16754,19 +16756,19 @@ function isPaintCallback(paint) {
|
|
|
16754
16756
|
return false;
|
|
16755
16757
|
}
|
|
16756
16758
|
|
|
16757
|
-
var __defProp$
|
|
16758
|
-
var __getOwnPropSymbols$
|
|
16759
|
-
var __hasOwnProp$
|
|
16760
|
-
var __propIsEnum$
|
|
16761
|
-
var __defNormalProp$
|
|
16762
|
-
var __spreadValues$
|
|
16759
|
+
var __defProp$12 = Object.defineProperty;
|
|
16760
|
+
var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
|
|
16761
|
+
var __hasOwnProp$K = Object.prototype.hasOwnProperty;
|
|
16762
|
+
var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
|
|
16763
|
+
var __defNormalProp$12 = (obj, key, value) => key in obj ? __defProp$12(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16764
|
+
var __spreadValues$J = (a, b) => {
|
|
16763
16765
|
for (var prop in b || (b = {}))
|
|
16764
|
-
if (__hasOwnProp$
|
|
16765
|
-
__defNormalProp$
|
|
16766
|
-
if (__getOwnPropSymbols$
|
|
16767
|
-
for (var prop of __getOwnPropSymbols$
|
|
16768
|
-
if (__propIsEnum$
|
|
16769
|
-
__defNormalProp$
|
|
16766
|
+
if (__hasOwnProp$K.call(b, prop))
|
|
16767
|
+
__defNormalProp$12(a, prop, b[prop]);
|
|
16768
|
+
if (__getOwnPropSymbols$K)
|
|
16769
|
+
for (var prop of __getOwnPropSymbols$K(b)) {
|
|
16770
|
+
if (__propIsEnum$K.call(b, prop))
|
|
16771
|
+
__defNormalProp$12(a, prop, b[prop]);
|
|
16770
16772
|
}
|
|
16771
16773
|
return a;
|
|
16772
16774
|
};
|
|
@@ -16795,7 +16797,7 @@ function createPropertiesPaint(propertiesPaint) {
|
|
|
16795
16797
|
return (feature) => {
|
|
16796
16798
|
const paint = paintsFilters.find((x) => featureFilter(feature, x[0]));
|
|
16797
16799
|
if (paint) {
|
|
16798
|
-
return __spreadValues$
|
|
16800
|
+
return __spreadValues$J(__spreadValues$J({}, mask), paint[1]);
|
|
16799
16801
|
}
|
|
16800
16802
|
return mask;
|
|
16801
16803
|
};
|
|
@@ -16819,8 +16821,8 @@ function expressionCallback({
|
|
|
16819
16821
|
}
|
|
16820
16822
|
function finalizePaint({ paint, defaultPaint }) {
|
|
16821
16823
|
var _a;
|
|
16822
|
-
let newPaint = __spreadValues$
|
|
16823
|
-
newPaint = __spreadValues$
|
|
16824
|
+
let newPaint = __spreadValues$J({}, defaultPaint);
|
|
16825
|
+
newPaint = __spreadValues$J(__spreadValues$J({}, newPaint), paint);
|
|
16824
16826
|
newPaint.fill = (_a = newPaint.fill) != null ? _a : true;
|
|
16825
16827
|
newPaint.stroke = newPaint.stroke !== void 0 ? newPaint.stroke : !newPaint.fill || !!(newPaint.strokeColor || newPaint.strokeOpacity);
|
|
16826
16828
|
return newPaint;
|
|
@@ -16833,7 +16835,7 @@ function preparePaint({
|
|
|
16833
16835
|
if (!paint) {
|
|
16834
16836
|
throw new Error("paint is empty");
|
|
16835
16837
|
}
|
|
16836
|
-
let newPaint = __spreadValues$
|
|
16838
|
+
let newPaint = __spreadValues$J({}, defaultPaint);
|
|
16837
16839
|
if (isPaintCallback(paint)) {
|
|
16838
16840
|
const getPaintFunction = (feature) => {
|
|
16839
16841
|
const getPaint = preparePaint({
|
|
@@ -16890,41 +16892,41 @@ function preparePaint({
|
|
|
16890
16892
|
return newPaint;
|
|
16891
16893
|
}
|
|
16892
16894
|
|
|
16893
|
-
var __defProp$
|
|
16894
|
-
var __defProps$
|
|
16895
|
-
var __getOwnPropDescs$
|
|
16896
|
-
var __getOwnPropSymbols$
|
|
16897
|
-
var __hasOwnProp$
|
|
16898
|
-
var __propIsEnum$
|
|
16899
|
-
var __defNormalProp$
|
|
16900
|
-
var __spreadValues$
|
|
16895
|
+
var __defProp$11 = Object.defineProperty;
|
|
16896
|
+
var __defProps$u = Object.defineProperties;
|
|
16897
|
+
var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
|
|
16898
|
+
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
16899
|
+
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
16900
|
+
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
16901
|
+
var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16902
|
+
var __spreadValues$I = (a, b) => {
|
|
16901
16903
|
for (var prop in b || (b = {}))
|
|
16902
|
-
if (__hasOwnProp$
|
|
16903
|
-
__defNormalProp$
|
|
16904
|
-
if (__getOwnPropSymbols$
|
|
16905
|
-
for (var prop of __getOwnPropSymbols$
|
|
16906
|
-
if (__propIsEnum$
|
|
16907
|
-
__defNormalProp$
|
|
16904
|
+
if (__hasOwnProp$J.call(b, prop))
|
|
16905
|
+
__defNormalProp$11(a, prop, b[prop]);
|
|
16906
|
+
if (__getOwnPropSymbols$J)
|
|
16907
|
+
for (var prop of __getOwnPropSymbols$J(b)) {
|
|
16908
|
+
if (__propIsEnum$J.call(b, prop))
|
|
16909
|
+
__defNormalProp$11(a, prop, b[prop]);
|
|
16908
16910
|
}
|
|
16909
16911
|
return a;
|
|
16910
16912
|
};
|
|
16911
|
-
var __spreadProps$
|
|
16913
|
+
var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
|
|
16912
16914
|
var __objRest$a = (source, exclude) => {
|
|
16913
16915
|
var target = {};
|
|
16914
16916
|
for (var prop in source)
|
|
16915
|
-
if (__hasOwnProp$
|
|
16917
|
+
if (__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16916
16918
|
target[prop] = source[prop];
|
|
16917
|
-
if (source != null && __getOwnPropSymbols$
|
|
16918
|
-
for (var prop of __getOwnPropSymbols$
|
|
16919
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16919
|
+
if (source != null && __getOwnPropSymbols$J)
|
|
16920
|
+
for (var prop of __getOwnPropSymbols$J(source)) {
|
|
16921
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop))
|
|
16920
16922
|
target[prop] = source[prop];
|
|
16921
16923
|
}
|
|
16922
16924
|
return target;
|
|
16923
16925
|
};
|
|
16924
|
-
var __publicField$
|
|
16926
|
+
var __publicField$G = (obj, key, value) => __defNormalProp$11(obj, key + "" , value);
|
|
16925
16927
|
class GeoJsonPaint {
|
|
16926
16928
|
constructor(layer) {
|
|
16927
|
-
__publicField$
|
|
16929
|
+
__publicField$G(this, "layer");
|
|
16928
16930
|
this.layer = layer;
|
|
16929
16931
|
}
|
|
16930
16932
|
setPaintEachLayer(paint) {
|
|
@@ -17003,7 +17005,7 @@ class GeoJsonPaint {
|
|
|
17003
17005
|
if (html) {
|
|
17004
17006
|
element.innerHTML = html;
|
|
17005
17007
|
}
|
|
17006
|
-
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$
|
|
17008
|
+
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$u(__spreadValues$I({
|
|
17007
17009
|
className: ""
|
|
17008
17010
|
}, toLIconOpt), {
|
|
17009
17011
|
html: element
|
|
@@ -17029,7 +17031,7 @@ class GeoJsonPaint {
|
|
|
17029
17031
|
}
|
|
17030
17032
|
return (_, latlng) => {
|
|
17031
17033
|
const p = PAINT;
|
|
17032
|
-
return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$
|
|
17034
|
+
return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$I(__spreadValues$I({}, p), icon)));
|
|
17033
17035
|
};
|
|
17034
17036
|
}
|
|
17035
17037
|
createPaintOptions(paint) {
|
|
@@ -17051,26 +17053,26 @@ class GeoJsonPaint {
|
|
|
17051
17053
|
}
|
|
17052
17054
|
}
|
|
17053
17055
|
|
|
17054
|
-
var __defProp
|
|
17055
|
-
var __defProps$
|
|
17056
|
-
var __getOwnPropDescs$
|
|
17057
|
-
var __getOwnPropSymbols$
|
|
17058
|
-
var __hasOwnProp$
|
|
17059
|
-
var __propIsEnum$
|
|
17060
|
-
var __defNormalProp
|
|
17061
|
-
var __spreadValues$
|
|
17056
|
+
var __defProp$10 = Object.defineProperty;
|
|
17057
|
+
var __defProps$t = Object.defineProperties;
|
|
17058
|
+
var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
|
|
17059
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
17060
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
17061
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
17062
|
+
var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17063
|
+
var __spreadValues$H = (a, b) => {
|
|
17062
17064
|
for (var prop in b || (b = {}))
|
|
17063
|
-
if (__hasOwnProp$
|
|
17064
|
-
__defNormalProp
|
|
17065
|
-
if (__getOwnPropSymbols$
|
|
17066
|
-
for (var prop of __getOwnPropSymbols$
|
|
17067
|
-
if (__propIsEnum$
|
|
17068
|
-
__defNormalProp
|
|
17065
|
+
if (__hasOwnProp$I.call(b, prop))
|
|
17066
|
+
__defNormalProp$10(a, prop, b[prop]);
|
|
17067
|
+
if (__getOwnPropSymbols$I)
|
|
17068
|
+
for (var prop of __getOwnPropSymbols$I(b)) {
|
|
17069
|
+
if (__propIsEnum$I.call(b, prop))
|
|
17070
|
+
__defNormalProp$10(a, prop, b[prop]);
|
|
17069
17071
|
}
|
|
17070
17072
|
return a;
|
|
17071
17073
|
};
|
|
17072
|
-
var __spreadProps$
|
|
17073
|
-
var __publicField$
|
|
17074
|
+
var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
|
|
17075
|
+
var __publicField$F = (obj, key, value) => __defNormalProp$10(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17074
17076
|
var __async$x = (__this, __arguments, generator) => {
|
|
17075
17077
|
return new Promise((resolve, reject) => {
|
|
17076
17078
|
var fulfilled = (value) => {
|
|
@@ -17094,22 +17096,22 @@ var __async$x = (__this, __arguments, generator) => {
|
|
|
17094
17096
|
class GeoJsonAdapter extends BaseAdapter {
|
|
17095
17097
|
constructor(map, options) {
|
|
17096
17098
|
super(map, options);
|
|
17097
|
-
__publicField$
|
|
17098
|
-
__publicField$
|
|
17099
|
-
__publicField$
|
|
17100
|
-
__publicField$
|
|
17101
|
-
__publicField$
|
|
17102
|
-
__publicField$
|
|
17103
|
-
__publicField$
|
|
17104
|
-
__publicField$
|
|
17105
|
-
__publicField$
|
|
17106
|
-
__publicField$
|
|
17107
|
-
__publicField$
|
|
17108
|
-
__publicField$
|
|
17109
|
-
__publicField$
|
|
17099
|
+
__publicField$F(this, "layer");
|
|
17100
|
+
__publicField$F(this, "selected", false);
|
|
17101
|
+
__publicField$F(this, "type");
|
|
17102
|
+
__publicField$F(this, "_layers", []);
|
|
17103
|
+
__publicField$F(this, "_events");
|
|
17104
|
+
__publicField$F(this, "paint");
|
|
17105
|
+
__publicField$F(this, "selectedPaint");
|
|
17106
|
+
__publicField$F(this, "_selectedLayers", []);
|
|
17107
|
+
__publicField$F(this, "_filteredLayers", []);
|
|
17108
|
+
__publicField$F(this, "_filterFun");
|
|
17109
|
+
__publicField$F(this, "_openedPopup", []);
|
|
17110
|
+
__publicField$F(this, "_paint");
|
|
17111
|
+
__publicField$F(this, "$updateTooltip", debounce(() => {
|
|
17110
17112
|
this.updateTooltip();
|
|
17111
17113
|
}, 300));
|
|
17112
|
-
__publicField$
|
|
17114
|
+
__publicField$F(this, "$unselect", () => {
|
|
17113
17115
|
this.unselect();
|
|
17114
17116
|
});
|
|
17115
17117
|
this._events = new GeoJsonEvents(this);
|
|
@@ -17118,7 +17120,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17118
17120
|
addLayer(options) {
|
|
17119
17121
|
Object.assign(this.options, options);
|
|
17120
17122
|
this.paint = options.paint;
|
|
17121
|
-
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$
|
|
17123
|
+
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$t(__spreadValues$H({}, options.nativeOptions), {
|
|
17122
17124
|
pane: this.pane
|
|
17123
17125
|
}));
|
|
17124
17126
|
this.selectedPaint = options.selectedPaint;
|
|
@@ -17167,7 +17169,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17167
17169
|
}
|
|
17168
17170
|
getSelected() {
|
|
17169
17171
|
return this._selectedLayers.map((x) => {
|
|
17170
|
-
return __spreadValues$
|
|
17172
|
+
return __spreadValues$H({
|
|
17171
17173
|
target: this,
|
|
17172
17174
|
feature: x.feature,
|
|
17173
17175
|
layer: x
|
|
@@ -17186,14 +17188,14 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17186
17188
|
const filteredLayers = [];
|
|
17187
17189
|
this._layers.forEach(({ feature, layer }) => {
|
|
17188
17190
|
if (layer) {
|
|
17189
|
-
const ok = fun ? fun(__spreadValues$
|
|
17191
|
+
const ok = fun ? fun(__spreadValues$H({
|
|
17190
17192
|
target: this,
|
|
17191
17193
|
feature,
|
|
17192
17194
|
layer
|
|
17193
17195
|
}, createFeaturePositionOptions(feature))) : true;
|
|
17194
17196
|
if (ok) {
|
|
17195
17197
|
layer_.addLayer(layer);
|
|
17196
|
-
filteredLayers.push(__spreadValues$
|
|
17198
|
+
filteredLayers.push(__spreadValues$H({
|
|
17197
17199
|
target: this,
|
|
17198
17200
|
feature,
|
|
17199
17201
|
layer
|
|
@@ -17214,7 +17216,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17214
17216
|
getLayers() {
|
|
17215
17217
|
return this._layers.map(({ layer, feature }) => {
|
|
17216
17218
|
const visible = layer && !!layer._map;
|
|
17217
|
-
return __spreadValues$
|
|
17219
|
+
return __spreadValues$H({
|
|
17218
17220
|
feature,
|
|
17219
17221
|
layer,
|
|
17220
17222
|
visible,
|
|
@@ -17248,6 +17250,9 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17248
17250
|
}
|
|
17249
17251
|
setData(data) {
|
|
17250
17252
|
this.clearLayer();
|
|
17253
|
+
if (!this.options.type) {
|
|
17254
|
+
this.type = void 0;
|
|
17255
|
+
}
|
|
17251
17256
|
this.addData(data);
|
|
17252
17257
|
}
|
|
17253
17258
|
addData(data) {
|
|
@@ -17262,15 +17267,20 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17262
17267
|
} else {
|
|
17263
17268
|
type = options.type;
|
|
17264
17269
|
}
|
|
17270
|
+
if (!type) {
|
|
17271
|
+
return;
|
|
17272
|
+
}
|
|
17265
17273
|
if (this.type && this.type !== type) {
|
|
17266
17274
|
console.warn("no other data type than layer can be added");
|
|
17267
17275
|
return;
|
|
17268
17276
|
}
|
|
17269
17277
|
this.type = type;
|
|
17270
17278
|
data = filterGeometries(data, type);
|
|
17271
|
-
if (data) {
|
|
17272
|
-
|
|
17279
|
+
if (!data) {
|
|
17280
|
+
console.warn("no other data type than layer can be added");
|
|
17281
|
+
return;
|
|
17273
17282
|
}
|
|
17283
|
+
geoJsonOptions = this._getGeoJsonOptions(options, type);
|
|
17274
17284
|
}
|
|
17275
17285
|
new leafletSrcExports.GeoJSON(data || void 0, geoJsonOptions);
|
|
17276
17286
|
}
|
|
@@ -17332,13 +17342,13 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17332
17342
|
}
|
|
17333
17343
|
}
|
|
17334
17344
|
updatePaint(paint) {
|
|
17335
|
-
this.paint = __spreadValues$
|
|
17345
|
+
this.paint = __spreadValues$H(__spreadValues$H({}, this.paint), paint);
|
|
17336
17346
|
for (const l of this._layers) {
|
|
17337
17347
|
this._paint.setPaint(l, this.paint);
|
|
17338
17348
|
}
|
|
17339
17349
|
}
|
|
17340
17350
|
updateSelectedPaint(paint) {
|
|
17341
|
-
this.selectedPaint = __spreadValues$
|
|
17351
|
+
this.selectedPaint = __spreadValues$H(__spreadValues$H({}, this.selectedPaint), paint);
|
|
17342
17352
|
for (const l of this._selectedLayers) {
|
|
17343
17353
|
this._paint.setPaint(l, this.selectedPaint);
|
|
17344
17354
|
}
|
|
@@ -17355,7 +17365,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17355
17365
|
if (feature.properties && labelField) {
|
|
17356
17366
|
message = feature.properties[labelField];
|
|
17357
17367
|
} else if (label) {
|
|
17358
|
-
message = label(__spreadValues$
|
|
17368
|
+
message = label(__spreadValues$H(__spreadValues$H({
|
|
17359
17369
|
target: this
|
|
17360
17370
|
}, layerDef), createFeaturePositionOptions(feature)));
|
|
17361
17371
|
}
|
|
@@ -17374,7 +17384,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17374
17384
|
autoPan,
|
|
17375
17385
|
maxWidth,
|
|
17376
17386
|
closeButton: closeButton_
|
|
17377
|
-
} = __spreadValues$
|
|
17387
|
+
} = __spreadValues$H({
|
|
17378
17388
|
minWidth: 300
|
|
17379
17389
|
}, options);
|
|
17380
17390
|
const closeButton = closeButton_ != null ? closeButton_ : !this.options.selectOnHover;
|
|
@@ -17390,7 +17400,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17390
17400
|
};
|
|
17391
17401
|
let content;
|
|
17392
17402
|
if (options.createPopupContent) {
|
|
17393
|
-
content = yield options.createPopupContent(__spreadValues$
|
|
17403
|
+
content = yield options.createPopupContent(__spreadValues$H({
|
|
17394
17404
|
layer,
|
|
17395
17405
|
feature,
|
|
17396
17406
|
target: this,
|
|
@@ -17468,9 +17478,9 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17468
17478
|
lopt = {
|
|
17469
17479
|
style: (feature) => {
|
|
17470
17480
|
if (feature) {
|
|
17471
|
-
return this._paint.preparePaint(__spreadValues$
|
|
17481
|
+
return this._paint.preparePaint(__spreadValues$H(__spreadValues$H({}, PAINT), paint(feature)));
|
|
17472
17482
|
} else {
|
|
17473
|
-
return this._paint.preparePaint(__spreadProps$
|
|
17483
|
+
return this._paint.preparePaint(__spreadProps$t(__spreadValues$H({}, PAINT), { type: "path" }));
|
|
17474
17484
|
}
|
|
17475
17485
|
}
|
|
17476
17486
|
};
|
|
@@ -17486,7 +17496,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17486
17496
|
_onEachFeature(feature, layer) {
|
|
17487
17497
|
const layer_ = this.layer;
|
|
17488
17498
|
if (layer_) {
|
|
17489
|
-
const def = __spreadValues$
|
|
17499
|
+
const def = __spreadValues$H({
|
|
17490
17500
|
target: this,
|
|
17491
17501
|
feature,
|
|
17492
17502
|
layer
|
|
@@ -17521,7 +17531,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17521
17531
|
setTimeout(() => {
|
|
17522
17532
|
if (popup) {
|
|
17523
17533
|
this._openPopup(
|
|
17524
|
-
__spreadValues$
|
|
17534
|
+
__spreadValues$H({
|
|
17525
17535
|
target: this,
|
|
17526
17536
|
layer,
|
|
17527
17537
|
feature
|
|
@@ -17539,7 +17549,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17539
17549
|
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
17540
17550
|
const layer = e.target;
|
|
17541
17551
|
const feature = layer.feature;
|
|
17542
|
-
const def = __spreadValues$
|
|
17552
|
+
const def = __spreadValues$H({
|
|
17543
17553
|
target: this,
|
|
17544
17554
|
layer,
|
|
17545
17555
|
feature
|
|
@@ -17572,7 +17582,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17572
17582
|
}
|
|
17573
17583
|
if (this.options.onSelect) {
|
|
17574
17584
|
const features = def.feature ? [def.feature] : [];
|
|
17575
|
-
this.options.onSelect(__spreadValues$
|
|
17585
|
+
this.options.onSelect(__spreadValues$H({
|
|
17576
17586
|
type,
|
|
17577
17587
|
layer: this,
|
|
17578
17588
|
features
|
|
@@ -17761,19 +17771,19 @@ function createToggleControl(createButtonControl, options) {
|
|
|
17761
17771
|
return buttonControl;
|
|
17762
17772
|
}
|
|
17763
17773
|
|
|
17764
|
-
var __defProp
|
|
17765
|
-
var __getOwnPropSymbols$
|
|
17766
|
-
var __hasOwnProp$
|
|
17767
|
-
var __propIsEnum$
|
|
17768
|
-
var __defNormalProp
|
|
17769
|
-
var __spreadValues$
|
|
17774
|
+
var __defProp$$ = Object.defineProperty;
|
|
17775
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
17776
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
17777
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
17778
|
+
var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17779
|
+
var __spreadValues$G = (a, b) => {
|
|
17770
17780
|
for (var prop in b || (b = {}))
|
|
17771
|
-
if (__hasOwnProp$
|
|
17772
|
-
__defNormalProp
|
|
17773
|
-
if (__getOwnPropSymbols$
|
|
17774
|
-
for (var prop of __getOwnPropSymbols$
|
|
17775
|
-
if (__propIsEnum$
|
|
17776
|
-
__defNormalProp
|
|
17781
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
17782
|
+
__defNormalProp$$(a, prop, b[prop]);
|
|
17783
|
+
if (__getOwnPropSymbols$H)
|
|
17784
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
17785
|
+
if (__propIsEnum$H.call(b, prop))
|
|
17786
|
+
__defNormalProp$$(a, prop, b[prop]);
|
|
17777
17787
|
}
|
|
17778
17788
|
return a;
|
|
17779
17789
|
};
|
|
@@ -17784,12 +17794,12 @@ function normalizeLayerRequestOptions(request) {
|
|
|
17784
17794
|
if (!request) {
|
|
17785
17795
|
return void 0;
|
|
17786
17796
|
}
|
|
17787
|
-
const normalized = __spreadValues$
|
|
17797
|
+
const normalized = __spreadValues$G({}, request);
|
|
17788
17798
|
return hasLayerRequestOptions(normalized) ? normalized : void 0;
|
|
17789
17799
|
}
|
|
17790
17800
|
function getLayerRequestOptions(options) {
|
|
17791
17801
|
const request = options == null ? void 0 : options.request;
|
|
17792
|
-
const headers = __spreadValues$
|
|
17802
|
+
const headers = __spreadValues$G(__spreadValues$G({}, (options == null ? void 0 : options.headers) || {}), (request == null ? void 0 : request.headers) || {});
|
|
17793
17803
|
const result = {};
|
|
17794
17804
|
if (hasHeaders(headers)) {
|
|
17795
17805
|
result.headers = headers;
|
|
@@ -17868,95 +17878,95 @@ function updateGeoJsonAdapterOptions(opt) {
|
|
|
17868
17878
|
return opt;
|
|
17869
17879
|
}
|
|
17870
17880
|
|
|
17871
|
-
var __defProp$
|
|
17872
|
-
var __defNormalProp$
|
|
17873
|
-
var __publicField$
|
|
17881
|
+
var __defProp$_ = Object.defineProperty;
|
|
17882
|
+
var __defNormalProp$_ = (obj, key, value) => key in obj ? __defProp$_(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17883
|
+
var __publicField$E = (obj, key, value) => __defNormalProp$_(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17874
17884
|
class KeyCodes {
|
|
17875
17885
|
constructor() {
|
|
17876
|
-
__publicField$
|
|
17877
|
-
__publicField$
|
|
17878
|
-
__publicField$
|
|
17879
|
-
__publicField$
|
|
17880
|
-
__publicField$
|
|
17881
|
-
__publicField$
|
|
17882
|
-
__publicField$
|
|
17883
|
-
__publicField$
|
|
17884
|
-
__publicField$
|
|
17885
|
-
__publicField$
|
|
17886
|
-
__publicField$
|
|
17887
|
-
__publicField$
|
|
17888
|
-
__publicField$
|
|
17889
|
-
__publicField$
|
|
17890
|
-
__publicField$
|
|
17891
|
-
__publicField$
|
|
17892
|
-
__publicField$
|
|
17893
|
-
__publicField$
|
|
17894
|
-
__publicField$
|
|
17895
|
-
__publicField$
|
|
17896
|
-
__publicField$
|
|
17897
|
-
__publicField$
|
|
17898
|
-
__publicField$
|
|
17899
|
-
__publicField$
|
|
17900
|
-
__publicField$
|
|
17901
|
-
__publicField$
|
|
17902
|
-
__publicField$
|
|
17903
|
-
__publicField$
|
|
17904
|
-
__publicField$
|
|
17905
|
-
__publicField$
|
|
17906
|
-
__publicField$
|
|
17907
|
-
__publicField$
|
|
17908
|
-
__publicField$
|
|
17909
|
-
__publicField$
|
|
17910
|
-
__publicField$
|
|
17911
|
-
__publicField$
|
|
17912
|
-
__publicField$
|
|
17913
|
-
__publicField$
|
|
17914
|
-
__publicField$
|
|
17915
|
-
__publicField$
|
|
17916
|
-
__publicField$
|
|
17917
|
-
__publicField$
|
|
17918
|
-
__publicField$
|
|
17919
|
-
__publicField$
|
|
17920
|
-
__publicField$
|
|
17921
|
-
__publicField$
|
|
17922
|
-
__publicField$
|
|
17923
|
-
__publicField$
|
|
17924
|
-
__publicField$
|
|
17925
|
-
__publicField$
|
|
17926
|
-
__publicField$
|
|
17927
|
-
__publicField$
|
|
17928
|
-
__publicField$
|
|
17929
|
-
__publicField$
|
|
17886
|
+
__publicField$E(this, "backspace", 8);
|
|
17887
|
+
__publicField$E(this, "tab", 9);
|
|
17888
|
+
__publicField$E(this, "enter", 13);
|
|
17889
|
+
__publicField$E(this, "shift", 16);
|
|
17890
|
+
__publicField$E(this, "ctrl", 17);
|
|
17891
|
+
__publicField$E(this, "alt", 18);
|
|
17892
|
+
__publicField$E(this, "pause/break", 19);
|
|
17893
|
+
__publicField$E(this, "caps_lock", 20);
|
|
17894
|
+
__publicField$E(this, "escape", 27);
|
|
17895
|
+
__publicField$E(this, "page_up", 33);
|
|
17896
|
+
__publicField$E(this, "page_down", 34);
|
|
17897
|
+
__publicField$E(this, "end", 35);
|
|
17898
|
+
__publicField$E(this, "home", 36);
|
|
17899
|
+
__publicField$E(this, "left_arrow", 37);
|
|
17900
|
+
__publicField$E(this, "up_arrow", 38);
|
|
17901
|
+
__publicField$E(this, "right_arrow", 39);
|
|
17902
|
+
__publicField$E(this, "down_arrow", 40);
|
|
17903
|
+
__publicField$E(this, "insert", 45);
|
|
17904
|
+
__publicField$E(this, "delete", 46);
|
|
17905
|
+
__publicField$E(this, "left_window_key", 91);
|
|
17906
|
+
__publicField$E(this, "right_window_key", 92);
|
|
17907
|
+
__publicField$E(this, "select_key", 93);
|
|
17908
|
+
__publicField$E(this, "numpad_0", 96);
|
|
17909
|
+
__publicField$E(this, "numpad_1", 97);
|
|
17910
|
+
__publicField$E(this, "numpad_2", 98);
|
|
17911
|
+
__publicField$E(this, "numpad_3", 99);
|
|
17912
|
+
__publicField$E(this, "numpad_4", 100);
|
|
17913
|
+
__publicField$E(this, "numpad_5", 101);
|
|
17914
|
+
__publicField$E(this, "numpad_6", 102);
|
|
17915
|
+
__publicField$E(this, "numpad_7", 103);
|
|
17916
|
+
__publicField$E(this, "numpad_8", 104);
|
|
17917
|
+
__publicField$E(this, "numpad_9", 105);
|
|
17918
|
+
__publicField$E(this, "multiply", 106);
|
|
17919
|
+
__publicField$E(this, "add", 107);
|
|
17920
|
+
__publicField$E(this, "subtract", 109);
|
|
17921
|
+
__publicField$E(this, "decimal_point", 110);
|
|
17922
|
+
__publicField$E(this, "divide", 111);
|
|
17923
|
+
__publicField$E(this, "f1", 112);
|
|
17924
|
+
__publicField$E(this, "f2", 113);
|
|
17925
|
+
__publicField$E(this, "f3", 114);
|
|
17926
|
+
__publicField$E(this, "f4", 115);
|
|
17927
|
+
__publicField$E(this, "f5", 116);
|
|
17928
|
+
__publicField$E(this, "f6", 117);
|
|
17929
|
+
__publicField$E(this, "f7", 118);
|
|
17930
|
+
__publicField$E(this, "f8", 119);
|
|
17931
|
+
__publicField$E(this, "f9", 120);
|
|
17932
|
+
__publicField$E(this, "f10", 121);
|
|
17933
|
+
__publicField$E(this, "f11", 122);
|
|
17934
|
+
__publicField$E(this, "f12", 123);
|
|
17935
|
+
__publicField$E(this, "num_lock", 144);
|
|
17936
|
+
__publicField$E(this, "scroll_lock", 145);
|
|
17937
|
+
__publicField$E(this, "semi-colon", 186);
|
|
17938
|
+
__publicField$E(this, "equal_sign", 187);
|
|
17939
|
+
__publicField$E(this, ",", 188);
|
|
17930
17940
|
// "comma";
|
|
17931
|
-
__publicField$
|
|
17941
|
+
__publicField$E(this, "-", 189);
|
|
17932
17942
|
// "dash";
|
|
17933
|
-
__publicField$
|
|
17943
|
+
__publicField$E(this, ".", 190);
|
|
17934
17944
|
// "period";
|
|
17935
|
-
__publicField$
|
|
17945
|
+
__publicField$E(this, "/", 191);
|
|
17936
17946
|
// "forward slash";
|
|
17937
|
-
__publicField$
|
|
17947
|
+
__publicField$E(this, "`", 192);
|
|
17938
17948
|
// "grave accent";
|
|
17939
|
-
__publicField$
|
|
17949
|
+
__publicField$E(this, "[", 219);
|
|
17940
17950
|
// "open bracket";
|
|
17941
|
-
__publicField$
|
|
17951
|
+
__publicField$E(this, "\\", 220);
|
|
17942
17952
|
// "back slash";
|
|
17943
|
-
__publicField$
|
|
17953
|
+
__publicField$E(this, "]", 221);
|
|
17944
17954
|
// "close braket";
|
|
17945
|
-
__publicField$
|
|
17955
|
+
__publicField$E(this, "'", 222);
|
|
17946
17956
|
}
|
|
17947
17957
|
// "single quote"
|
|
17948
17958
|
}
|
|
17949
17959
|
|
|
17950
|
-
var __defProp$
|
|
17951
|
-
var __defNormalProp$
|
|
17952
|
-
var __publicField$
|
|
17960
|
+
var __defProp$Z = Object.defineProperty;
|
|
17961
|
+
var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17962
|
+
var __publicField$D = (obj, key, value) => __defNormalProp$Z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17953
17963
|
class Keys {
|
|
17954
17964
|
constructor() {
|
|
17955
|
-
__publicField$
|
|
17956
|
-
__publicField$
|
|
17957
|
-
__publicField$
|
|
17958
|
-
__publicField$
|
|
17959
|
-
__publicField$
|
|
17965
|
+
__publicField$D(this, "keyCodeAlias", new KeyCodes());
|
|
17966
|
+
__publicField$D(this, "keys", {});
|
|
17967
|
+
__publicField$D(this, "_windowOnFocus");
|
|
17968
|
+
__publicField$D(this, "_keysPressed");
|
|
17969
|
+
__publicField$D(this, "_keysReleased");
|
|
17960
17970
|
this._windowOnFocus = this.windowOnFocus.bind(this);
|
|
17961
17971
|
this._keysPressed = this.keysPressed.bind(this);
|
|
17962
17972
|
this._keysReleased = this.keysReleased.bind(this);
|
|
@@ -17995,28 +18005,24 @@ class Keys {
|
|
|
17995
18005
|
}
|
|
17996
18006
|
}
|
|
17997
18007
|
|
|
17998
|
-
var __defProp$
|
|
17999
|
-
var __defNormalProp$
|
|
18000
|
-
var __publicField$
|
|
18008
|
+
var __defProp$Y = Object.defineProperty;
|
|
18009
|
+
var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18010
|
+
var __publicField$C = (obj, key, value) => __defNormalProp$Y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18001
18011
|
class StateItem {
|
|
18002
18012
|
constructor(webMap, opt) {
|
|
18003
|
-
__publicField$
|
|
18004
|
-
__publicField$
|
|
18005
|
-
__publicField$
|
|
18006
|
-
__publicField$
|
|
18013
|
+
__publicField$C(this, "webMap", webMap);
|
|
18014
|
+
__publicField$C(this, "name");
|
|
18015
|
+
__publicField$C(this, "event");
|
|
18016
|
+
__publicField$C(this, "value");
|
|
18007
18017
|
if (opt) {
|
|
18008
|
-
if (opt.value) {
|
|
18018
|
+
if (opt.value !== void 0) {
|
|
18009
18019
|
this.setValue(opt.value);
|
|
18010
18020
|
}
|
|
18011
18021
|
if (opt.name) {
|
|
18012
18022
|
this.name = opt.name;
|
|
18013
18023
|
}
|
|
18014
18024
|
if (opt.event) {
|
|
18015
|
-
|
|
18016
|
-
this.event = [opt.event];
|
|
18017
|
-
} else {
|
|
18018
|
-
this.event = opt.event;
|
|
18019
|
-
}
|
|
18025
|
+
this.event = Array.isArray(opt.event) ? opt.event : [opt.event];
|
|
18020
18026
|
}
|
|
18021
18027
|
}
|
|
18022
18028
|
}
|
|
@@ -18028,14 +18034,28 @@ class StateItem {
|
|
|
18028
18034
|
}
|
|
18029
18035
|
}
|
|
18030
18036
|
|
|
18031
|
-
var __defProp$
|
|
18032
|
-
var
|
|
18033
|
-
var
|
|
18037
|
+
var __defProp$X = Object.defineProperty;
|
|
18038
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
18039
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
18040
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
18041
|
+
var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18042
|
+
var __spreadValues$F = (a, b) => {
|
|
18043
|
+
for (var prop in b || (b = {}))
|
|
18044
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
18045
|
+
__defNormalProp$X(a, prop, b[prop]);
|
|
18046
|
+
if (__getOwnPropSymbols$G)
|
|
18047
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
18048
|
+
if (__propIsEnum$G.call(b, prop))
|
|
18049
|
+
__defNormalProp$X(a, prop, b[prop]);
|
|
18050
|
+
}
|
|
18051
|
+
return a;
|
|
18052
|
+
};
|
|
18034
18053
|
class BoundState extends StateItem {
|
|
18035
|
-
constructor() {
|
|
18036
|
-
super(
|
|
18037
|
-
|
|
18038
|
-
|
|
18054
|
+
constructor(webMap, opt) {
|
|
18055
|
+
super(webMap, __spreadValues$F({
|
|
18056
|
+
name: "bounds",
|
|
18057
|
+
event: "moveend"
|
|
18058
|
+
}, opt));
|
|
18039
18059
|
}
|
|
18040
18060
|
getValue() {
|
|
18041
18061
|
return this.webMap.getBounds();
|
|
@@ -18056,14 +18076,28 @@ class BoundState extends StateItem {
|
|
|
18056
18076
|
}
|
|
18057
18077
|
}
|
|
18058
18078
|
|
|
18059
|
-
var __defProp$
|
|
18060
|
-
var
|
|
18061
|
-
var
|
|
18079
|
+
var __defProp$W = Object.defineProperty;
|
|
18080
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
18081
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
18082
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
18083
|
+
var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18084
|
+
var __spreadValues$E = (a, b) => {
|
|
18085
|
+
for (var prop in b || (b = {}))
|
|
18086
|
+
if (__hasOwnProp$F.call(b, prop))
|
|
18087
|
+
__defNormalProp$W(a, prop, b[prop]);
|
|
18088
|
+
if (__getOwnPropSymbols$F)
|
|
18089
|
+
for (var prop of __getOwnPropSymbols$F(b)) {
|
|
18090
|
+
if (__propIsEnum$F.call(b, prop))
|
|
18091
|
+
__defNormalProp$W(a, prop, b[prop]);
|
|
18092
|
+
}
|
|
18093
|
+
return a;
|
|
18094
|
+
};
|
|
18062
18095
|
class CenterState extends StateItem {
|
|
18063
|
-
constructor() {
|
|
18064
|
-
super(
|
|
18065
|
-
|
|
18066
|
-
|
|
18096
|
+
constructor(webMap, opt) {
|
|
18097
|
+
super(webMap, __spreadValues$E({
|
|
18098
|
+
name: "center",
|
|
18099
|
+
event: "moveend"
|
|
18100
|
+
}, opt));
|
|
18067
18101
|
}
|
|
18068
18102
|
getValue() {
|
|
18069
18103
|
return this.webMap.getCenter();
|
|
@@ -18085,14 +18119,28 @@ class CenterState extends StateItem {
|
|
|
18085
18119
|
}
|
|
18086
18120
|
}
|
|
18087
18121
|
|
|
18088
|
-
var __defProp$
|
|
18089
|
-
var
|
|
18090
|
-
var
|
|
18122
|
+
var __defProp$V = Object.defineProperty;
|
|
18123
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
18124
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
18125
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
18126
|
+
var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18127
|
+
var __spreadValues$D = (a, b) => {
|
|
18128
|
+
for (var prop in b || (b = {}))
|
|
18129
|
+
if (__hasOwnProp$E.call(b, prop))
|
|
18130
|
+
__defNormalProp$V(a, prop, b[prop]);
|
|
18131
|
+
if (__getOwnPropSymbols$E)
|
|
18132
|
+
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
18133
|
+
if (__propIsEnum$E.call(b, prop))
|
|
18134
|
+
__defNormalProp$V(a, prop, b[prop]);
|
|
18135
|
+
}
|
|
18136
|
+
return a;
|
|
18137
|
+
};
|
|
18091
18138
|
class ZoomState extends StateItem {
|
|
18092
|
-
constructor() {
|
|
18093
|
-
super(
|
|
18094
|
-
|
|
18095
|
-
|
|
18139
|
+
constructor(webMap, opt) {
|
|
18140
|
+
super(webMap, __spreadValues$D({
|
|
18141
|
+
name: "zoom",
|
|
18142
|
+
event: "zoomend"
|
|
18143
|
+
}, opt));
|
|
18096
18144
|
}
|
|
18097
18145
|
getValue() {
|
|
18098
18146
|
const zoom = this.webMap.getZoom();
|
|
@@ -18115,9 +18163,9 @@ function clearObject(obj) {
|
|
|
18115
18163
|
}
|
|
18116
18164
|
}
|
|
18117
18165
|
|
|
18118
|
-
var __defProp$
|
|
18119
|
-
var __defNormalProp$
|
|
18120
|
-
var __publicField$B = (obj, key, value) => __defNormalProp$
|
|
18166
|
+
var __defProp$U = Object.defineProperty;
|
|
18167
|
+
var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18168
|
+
var __publicField$B = (obj, key, value) => __defNormalProp$U(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18121
18169
|
var __async$w = (__this, __arguments, generator) => {
|
|
18122
18170
|
return new Promise((resolve, reject) => {
|
|
18123
18171
|
var fulfilled = (value) => {
|
|
@@ -18264,9 +18312,12 @@ const _WebMapMain = class _WebMapMain {
|
|
|
18264
18312
|
* @returns The map's container
|
|
18265
18313
|
*/
|
|
18266
18314
|
getContainer() {
|
|
18267
|
-
|
|
18268
|
-
|
|
18269
|
-
|
|
18315
|
+
var _a, _b;
|
|
18316
|
+
const nativeContainer = (_b = (_a = this.mapAdapter).getContainer) == null ? void 0 : _b.call(_a);
|
|
18317
|
+
if (nativeContainer) {
|
|
18318
|
+
return nativeContainer;
|
|
18319
|
+
}
|
|
18320
|
+
if (this.options.target) {
|
|
18270
18321
|
if (this.options.target instanceof HTMLElement) {
|
|
18271
18322
|
return this.options.target;
|
|
18272
18323
|
} else if (typeof this.options.target === "string") {
|
|
@@ -18664,26 +18715,26 @@ __publicField$B(_WebMapMain, "keys", new Keys());
|
|
|
18664
18715
|
__publicField$B(_WebMapMain, "getPaintFunctions");
|
|
18665
18716
|
let WebMapMain = _WebMapMain;
|
|
18666
18717
|
|
|
18667
|
-
var __defProp$
|
|
18668
|
-
var __defProps$
|
|
18669
|
-
var __getOwnPropDescs$
|
|
18670
|
-
var __getOwnPropSymbols$
|
|
18671
|
-
var __hasOwnProp$
|
|
18672
|
-
var __propIsEnum$
|
|
18673
|
-
var __defNormalProp$
|
|
18674
|
-
var __spreadValues$
|
|
18718
|
+
var __defProp$T = Object.defineProperty;
|
|
18719
|
+
var __defProps$s = Object.defineProperties;
|
|
18720
|
+
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
18721
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
18722
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
18723
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
18724
|
+
var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18725
|
+
var __spreadValues$C = (a, b) => {
|
|
18675
18726
|
for (var prop in b || (b = {}))
|
|
18676
|
-
if (__hasOwnProp$
|
|
18677
|
-
__defNormalProp$
|
|
18678
|
-
if (__getOwnPropSymbols$
|
|
18679
|
-
for (var prop of __getOwnPropSymbols$
|
|
18680
|
-
if (__propIsEnum$
|
|
18681
|
-
__defNormalProp$
|
|
18727
|
+
if (__hasOwnProp$D.call(b, prop))
|
|
18728
|
+
__defNormalProp$T(a, prop, b[prop]);
|
|
18729
|
+
if (__getOwnPropSymbols$D)
|
|
18730
|
+
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
18731
|
+
if (__propIsEnum$D.call(b, prop))
|
|
18732
|
+
__defNormalProp$T(a, prop, b[prop]);
|
|
18682
18733
|
}
|
|
18683
18734
|
return a;
|
|
18684
18735
|
};
|
|
18685
|
-
var __spreadProps$
|
|
18686
|
-
var __publicField$A = (obj, key, value) => __defNormalProp$
|
|
18736
|
+
var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
|
|
18737
|
+
var __publicField$A = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18687
18738
|
var __async$v = (__this, __arguments, generator) => {
|
|
18688
18739
|
return new Promise((resolve, reject) => {
|
|
18689
18740
|
var fulfilled = (value) => {
|
|
@@ -18713,6 +18764,8 @@ class WebMapLayers extends WebMapMain {
|
|
|
18713
18764
|
__publicField$A(this, "_baselayers", []);
|
|
18714
18765
|
__publicField$A(this, "_layers", {});
|
|
18715
18766
|
__publicField$A(this, "_selectedLayers", []);
|
|
18767
|
+
// true means a layer was removed before its addLayer() completed.
|
|
18768
|
+
__publicField$A(this, "_pendingLayerAdds", /* @__PURE__ */ new WeakMap());
|
|
18716
18769
|
const tileJson = this.options.tileJson;
|
|
18717
18770
|
if (tileJson) {
|
|
18718
18771
|
this.emitter.once("build-map", () => this.addTileJsonLayer(tileJson));
|
|
@@ -18819,7 +18872,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
18819
18872
|
return __async$v(this, null, function* () {
|
|
18820
18873
|
const layer = yield this.addLayer(
|
|
18821
18874
|
adapter,
|
|
18822
|
-
__spreadProps$
|
|
18875
|
+
__spreadProps$s(__spreadValues$C({}, options), {
|
|
18823
18876
|
baselayer: true
|
|
18824
18877
|
}),
|
|
18825
18878
|
void 0
|
|
@@ -18856,7 +18909,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
18856
18909
|
}
|
|
18857
18910
|
const geoJsonOptions = options;
|
|
18858
18911
|
this._updateGeoJsonOptions(geoJsonOptions);
|
|
18859
|
-
options = __spreadValues$
|
|
18912
|
+
options = __spreadValues$C({
|
|
18860
18913
|
id: String(id),
|
|
18861
18914
|
order: _order
|
|
18862
18915
|
}, options);
|
|
@@ -18884,12 +18937,12 @@ class WebMapLayers extends WebMapMain {
|
|
|
18884
18937
|
}
|
|
18885
18938
|
}
|
|
18886
18939
|
}
|
|
18887
|
-
options = __spreadProps$
|
|
18940
|
+
options = __spreadProps$s(__spreadValues$C({}, options), {
|
|
18888
18941
|
request: this._getLayerRequestOptions(options)
|
|
18889
18942
|
});
|
|
18890
18943
|
if (adapterEngine !== void 0) {
|
|
18891
18944
|
const _adapter = new adapterEngine(this.mapAdapter.map, options);
|
|
18892
|
-
_adapter.options = __spreadValues$
|
|
18945
|
+
_adapter.options = __spreadValues$C(__spreadValues$C({}, options), _adapter.options);
|
|
18893
18946
|
if (_adapter.options.baselayer && _adapter.options.toplayer) {
|
|
18894
18947
|
throw new Error("Layer cannot be both baselayer and toplayer");
|
|
18895
18948
|
}
|
|
@@ -18905,54 +18958,93 @@ class WebMapLayers extends WebMapMain {
|
|
|
18905
18958
|
let layerId;
|
|
18906
18959
|
if (_adapter.options.id) {
|
|
18907
18960
|
layerId = String(_adapter.options.id);
|
|
18961
|
+
if (layerId && this._layers[layerId]) {
|
|
18962
|
+
throw new Error(`layer with id '${layerId}' already exist`);
|
|
18963
|
+
}
|
|
18908
18964
|
this._layers[layerId] = _adapter;
|
|
18909
18965
|
}
|
|
18910
|
-
this.
|
|
18911
|
-
|
|
18912
|
-
|
|
18913
|
-
|
|
18914
|
-
|
|
18915
|
-
|
|
18916
|
-
|
|
18917
|
-
|
|
18918
|
-
|
|
18919
|
-
|
|
18920
|
-
|
|
18921
|
-
|
|
18922
|
-
|
|
18923
|
-
|
|
18924
|
-
|
|
18925
|
-
if (this._layers[layerId]) {
|
|
18926
|
-
throw Error(`layer with id '${layerId}' already exist`);
|
|
18927
|
-
}
|
|
18928
|
-
if (layerId) {
|
|
18929
|
-
this._layers[layerId] = _adapter;
|
|
18930
|
-
if (geoJsonOptions.filter) {
|
|
18931
|
-
this.filterLayer(_adapter, geoJsonOptions.filter);
|
|
18966
|
+
this._pendingLayerAdds.set(_adapter, false);
|
|
18967
|
+
let nativeStarted = false;
|
|
18968
|
+
const cancelled = () => this._pendingLayerAdds.get(_adapter) === true;
|
|
18969
|
+
try {
|
|
18970
|
+
this._emitLayerEvent("layer:preadd", layerId || "", _adapter);
|
|
18971
|
+
yield this.onMapLoad();
|
|
18972
|
+
if (cancelled()) {
|
|
18973
|
+
return _adapter;
|
|
18974
|
+
}
|
|
18975
|
+
_adapter.map = this.mapAdapter.map;
|
|
18976
|
+
nativeStarted = true;
|
|
18977
|
+
const layer = yield _adapter.addLayer(_adapter.options);
|
|
18978
|
+
_adapter.layer = layer;
|
|
18979
|
+
if (cancelled()) {
|
|
18980
|
+
return _adapter;
|
|
18932
18981
|
}
|
|
18982
|
+
_adapter.id = _adapter.options.id || String(id);
|
|
18983
|
+
_adapter.options.id = _adapter.id;
|
|
18933
18984
|
if (options.baselayer) {
|
|
18934
|
-
|
|
18985
|
+
_adapter.options.order = 0;
|
|
18935
18986
|
}
|
|
18936
|
-
|
|
18937
|
-
|
|
18987
|
+
_adapter.order = (_b = _adapter.options.order) != null ? _b : _order;
|
|
18988
|
+
if (layerId && this._layers[layerId] === _adapter) {
|
|
18989
|
+
delete this._layers[layerId];
|
|
18938
18990
|
}
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
18944
|
-
|
|
18945
|
-
|
|
18946
|
-
|
|
18947
|
-
|
|
18948
|
-
|
|
18991
|
+
layerId = String(_adapter.id);
|
|
18992
|
+
if (this._layers[layerId]) {
|
|
18993
|
+
throw Error(`layer with id '${layerId}' already exist`);
|
|
18994
|
+
}
|
|
18995
|
+
if (layerId) {
|
|
18996
|
+
this._layers[layerId] = _adapter;
|
|
18997
|
+
if (geoJsonOptions.filter) {
|
|
18998
|
+
this.filterLayer(_adapter, geoJsonOptions.filter);
|
|
18999
|
+
}
|
|
19000
|
+
if (options.baselayer) {
|
|
19001
|
+
this._baselayers.push(layerId);
|
|
19002
|
+
}
|
|
19003
|
+
if (visibility) {
|
|
19004
|
+
yield this.showLayer(layerId);
|
|
19005
|
+
if (cancelled()) return _adapter;
|
|
19006
|
+
}
|
|
19007
|
+
}
|
|
19008
|
+
const opacity = options.opacity;
|
|
19009
|
+
if (opacity !== void 0 && opacity !== null && opacity <= 1) {
|
|
19010
|
+
this.setLayerOpacity(_adapter, opacity);
|
|
19011
|
+
}
|
|
19012
|
+
const getBounds = layer && (_adapter.getBounds || _adapter.getExtent);
|
|
19013
|
+
if (options.fit && getBounds) {
|
|
19014
|
+
const extent = yield getBounds.call(_adapter);
|
|
19015
|
+
if (cancelled()) {
|
|
19016
|
+
return _adapter;
|
|
19017
|
+
}
|
|
19018
|
+
if (extent) {
|
|
19019
|
+
yield this.fitBounds(extent);
|
|
19020
|
+
}
|
|
19021
|
+
}
|
|
19022
|
+
if (cancelled()) {
|
|
19023
|
+
return _adapter;
|
|
19024
|
+
}
|
|
19025
|
+
if (options.onAdded) {
|
|
19026
|
+
options.onAdded(_adapter);
|
|
19027
|
+
}
|
|
19028
|
+
if (!cancelled()) {
|
|
19029
|
+
this._emitLayerEvent("layer:add", layerId, _adapter);
|
|
19030
|
+
}
|
|
19031
|
+
return _adapter;
|
|
19032
|
+
} catch (error) {
|
|
19033
|
+
if (cancelled()) {
|
|
19034
|
+
return _adapter;
|
|
19035
|
+
}
|
|
19036
|
+
this.removeLayer(_adapter);
|
|
19037
|
+
throw error;
|
|
19038
|
+
} finally {
|
|
19039
|
+
const removed = cancelled();
|
|
19040
|
+
this._pendingLayerAdds.delete(_adapter);
|
|
19041
|
+
if (removed && nativeStarted) {
|
|
19042
|
+
if (_adapter.removeLayer) {
|
|
19043
|
+
_adapter.removeLayer();
|
|
19044
|
+
} else if (_adapter.layer !== void 0)
|
|
19045
|
+
this.mapAdapter.removeLayer(_adapter.layer);
|
|
18949
19046
|
}
|
|
18950
19047
|
}
|
|
18951
|
-
if (options.onAdded) {
|
|
18952
|
-
options.onAdded(_adapter);
|
|
18953
|
-
}
|
|
18954
|
-
this._emitLayerEvent("layer:add", layerId, _adapter);
|
|
18955
|
-
return _adapter;
|
|
18956
19048
|
}
|
|
18957
19049
|
return Promise.reject("No adapter");
|
|
18958
19050
|
});
|
|
@@ -19013,21 +19105,23 @@ class WebMapLayers extends WebMapMain {
|
|
|
19013
19105
|
* Remove specific layer from map and memory by its definition.
|
|
19014
19106
|
*/
|
|
19015
19107
|
removeLayer(layerDef) {
|
|
19108
|
+
var _a;
|
|
19016
19109
|
const layer = this.getLayer(layerDef);
|
|
19017
19110
|
const layerId = layer && this.getLayerId(layer);
|
|
19018
|
-
if (layer && layerId) {
|
|
19111
|
+
if (layer && layerId && this._layers[layerId] === layer) {
|
|
19019
19112
|
this.emitter.emit("layer:preremove", layer);
|
|
19020
|
-
|
|
19021
|
-
|
|
19022
|
-
|
|
19023
|
-
if (layer.removeLayer) {
|
|
19024
|
-
layer.removeLayer();
|
|
19113
|
+
(_a = layer.beforeRemove) == null ? void 0 : _a.call(layer);
|
|
19114
|
+
if (this._pendingLayerAdds.has(layer)) {
|
|
19115
|
+
this._pendingLayerAdds.set(layer, true);
|
|
19025
19116
|
} else {
|
|
19026
|
-
|
|
19117
|
+
if (layer.removeLayer) {
|
|
19118
|
+
layer.removeLayer();
|
|
19119
|
+
} else if (layer.layer !== void 0)
|
|
19120
|
+
this.mapAdapter.removeLayer(layer.layer);
|
|
19027
19121
|
}
|
|
19028
19122
|
if (layer.options && layer.options.baselayer) {
|
|
19029
19123
|
const index = this._baselayers.indexOf(layerId);
|
|
19030
|
-
if (index) {
|
|
19124
|
+
if (index !== -1) {
|
|
19031
19125
|
this._baselayers.splice(index, 1);
|
|
19032
19126
|
}
|
|
19033
19127
|
}
|
|
@@ -19083,7 +19177,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
19083
19177
|
}
|
|
19084
19178
|
/** Shortcut for {@link WebMapLayers.addLayer} to create TileLayer adapter */
|
|
19085
19179
|
addTileLayer(url, options = {}) {
|
|
19086
|
-
return this.addLayer("TILE", __spreadProps$
|
|
19180
|
+
return this.addLayer("TILE", __spreadProps$s(__spreadValues$C({}, options), { url }));
|
|
19087
19181
|
}
|
|
19088
19182
|
addImageLayer(urlOrOptions, options) {
|
|
19089
19183
|
let url;
|
|
@@ -19093,7 +19187,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
19093
19187
|
url = urlOrOptions.url;
|
|
19094
19188
|
options = urlOrOptions;
|
|
19095
19189
|
}
|
|
19096
|
-
return this.addLayer("IMAGE", __spreadProps$
|
|
19190
|
+
return this.addLayer("IMAGE", __spreadProps$s(__spreadValues$C({}, options), { url }));
|
|
19097
19191
|
}
|
|
19098
19192
|
/**
|
|
19099
19193
|
* Show added layer on the map by it definition.
|
|
@@ -19165,7 +19259,10 @@ class WebMapLayers extends WebMapMain {
|
|
|
19165
19259
|
}
|
|
19166
19260
|
});
|
|
19167
19261
|
if (layer) {
|
|
19168
|
-
return this.onMapLoad().then(() =>
|
|
19262
|
+
return this.onMapLoad().then(() => {
|
|
19263
|
+
if (this._layers[String(layer.id)] !== layer) return;
|
|
19264
|
+
return action(layer);
|
|
19265
|
+
});
|
|
19169
19266
|
}
|
|
19170
19267
|
return Promise.resolve();
|
|
19171
19268
|
}
|
|
@@ -19479,10 +19576,10 @@ class WebMapLayers extends WebMapMain {
|
|
|
19479
19576
|
this.options.layerRequest
|
|
19480
19577
|
);
|
|
19481
19578
|
const layerRequest = getLayerRequestOptions(options);
|
|
19482
|
-
const headers = __spreadValues$
|
|
19579
|
+
const headers = __spreadValues$C(__spreadValues$C({}, (defaultRequest == null ? void 0 : defaultRequest.headers) || {}), (layerRequest == null ? void 0 : layerRequest.headers) || {});
|
|
19483
19580
|
const credentials = options.withCredentials === false && ((_a = options.request) == null ? void 0 : _a.credentials) === void 0 && (defaultRequest == null ? void 0 : defaultRequest.credentials) !== void 0 ? "same-origin" : (_b = layerRequest == null ? void 0 : layerRequest.credentials) != null ? _b : defaultRequest == null ? void 0 : defaultRequest.credentials;
|
|
19484
19581
|
const cache = ((_c = options.request) == null ? void 0 : _c.cache) !== void 0 ? options.request.cache : (_d = layerRequest == null ? void 0 : layerRequest.cache) != null ? _d : defaultRequest == null ? void 0 : defaultRequest.cache;
|
|
19485
|
-
return normalizeLayerRequestOptions(__spreadValues$
|
|
19582
|
+
return normalizeLayerRequestOptions(__spreadValues$C(__spreadValues$C(__spreadValues$C(__spreadValues$C(__spreadValues$C({}, defaultRequest), layerRequest), Object.keys(headers).length ? { headers } : {}), credentials !== void 0 ? { credentials } : {}), cache !== void 0 ? { cache } : {}));
|
|
19486
19583
|
}
|
|
19487
19584
|
/** @internal */
|
|
19488
19585
|
_emitLayerEvent(name, id, options) {
|
|
@@ -19577,24 +19674,24 @@ class WebMapLayers extends WebMapMain {
|
|
|
19577
19674
|
}
|
|
19578
19675
|
}
|
|
19579
19676
|
|
|
19580
|
-
var __defProp$
|
|
19581
|
-
var __getOwnPropSymbols$
|
|
19582
|
-
var __hasOwnProp$
|
|
19583
|
-
var __propIsEnum$
|
|
19584
|
-
var __defNormalProp$
|
|
19677
|
+
var __defProp$S = Object.defineProperty;
|
|
19678
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
19679
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
19680
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
19681
|
+
var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19585
19682
|
var __objRest$9 = (source, exclude) => {
|
|
19586
19683
|
var target = {};
|
|
19587
19684
|
for (var prop in source)
|
|
19588
|
-
if (__hasOwnProp$
|
|
19685
|
+
if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
19589
19686
|
target[prop] = source[prop];
|
|
19590
|
-
if (source != null && __getOwnPropSymbols$
|
|
19591
|
-
for (var prop of __getOwnPropSymbols$
|
|
19592
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
19687
|
+
if (source != null && __getOwnPropSymbols$C)
|
|
19688
|
+
for (var prop of __getOwnPropSymbols$C(source)) {
|
|
19689
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
|
|
19593
19690
|
target[prop] = source[prop];
|
|
19594
19691
|
}
|
|
19595
19692
|
return target;
|
|
19596
19693
|
};
|
|
19597
|
-
var __publicField$z = (obj, key, value) => __defNormalProp$
|
|
19694
|
+
var __publicField$z = (obj, key, value) => __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19598
19695
|
var __async$u = (__this, __arguments, generator) => {
|
|
19599
19696
|
return new Promise((resolve, reject) => {
|
|
19600
19697
|
var fulfilled = (value) => {
|
|
@@ -19802,34 +19899,34 @@ __publicField$z(_WebMapControls, "controls", {
|
|
|
19802
19899
|
});
|
|
19803
19900
|
let WebMapControls = _WebMapControls;
|
|
19804
19901
|
|
|
19805
|
-
var __defProp$
|
|
19806
|
-
var __defProps$
|
|
19807
|
-
var __getOwnPropDescs$
|
|
19808
|
-
var __getOwnPropSymbols$
|
|
19809
|
-
var __hasOwnProp$
|
|
19810
|
-
var __propIsEnum$
|
|
19902
|
+
var __defProp$R = Object.defineProperty;
|
|
19903
|
+
var __defProps$r = Object.defineProperties;
|
|
19904
|
+
var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
|
|
19905
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
19906
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
19907
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
19811
19908
|
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
|
|
19812
|
-
var __defNormalProp$
|
|
19813
|
-
var __spreadValues$
|
|
19909
|
+
var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19910
|
+
var __spreadValues$B = (a, b) => {
|
|
19814
19911
|
for (var prop in b || (b = {}))
|
|
19815
|
-
if (__hasOwnProp$
|
|
19816
|
-
__defNormalProp$
|
|
19817
|
-
if (__getOwnPropSymbols$
|
|
19818
|
-
for (var prop of __getOwnPropSymbols$
|
|
19819
|
-
if (__propIsEnum$
|
|
19820
|
-
__defNormalProp$
|
|
19912
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
19913
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
19914
|
+
if (__getOwnPropSymbols$B)
|
|
19915
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
19916
|
+
if (__propIsEnum$B.call(b, prop))
|
|
19917
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
19821
19918
|
}
|
|
19822
19919
|
return a;
|
|
19823
19920
|
};
|
|
19824
|
-
var __spreadProps$
|
|
19921
|
+
var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
|
|
19825
19922
|
var __objRest$8 = (source, exclude) => {
|
|
19826
19923
|
var target = {};
|
|
19827
19924
|
for (var prop in source)
|
|
19828
|
-
if (__hasOwnProp$
|
|
19925
|
+
if (__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
19829
19926
|
target[prop] = source[prop];
|
|
19830
|
-
if (source != null && __getOwnPropSymbols$
|
|
19831
|
-
for (var prop of __getOwnPropSymbols$
|
|
19832
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
19927
|
+
if (source != null && __getOwnPropSymbols$B)
|
|
19928
|
+
for (var prop of __getOwnPropSymbols$B(source)) {
|
|
19929
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop))
|
|
19833
19930
|
target[prop] = source[prop];
|
|
19834
19931
|
}
|
|
19835
19932
|
return target;
|
|
@@ -19950,7 +20047,7 @@ class WebMap extends WebMapControls {
|
|
|
19950
20047
|
}
|
|
19951
20048
|
}
|
|
19952
20049
|
const _a = controlOptions, { id, order, position } = _a, options = __objRest$8(_a, ["id", "order", "position"]);
|
|
19953
|
-
this.addControl(controlAdapterName, position || "top-left", __spreadProps$
|
|
20050
|
+
this.addControl(controlAdapterName, position || "top-left", __spreadProps$r(__spreadValues$B({}, options), {
|
|
19954
20051
|
id,
|
|
19955
20052
|
order
|
|
19956
20053
|
}));
|
|
@@ -20002,9 +20099,9 @@ function callAjax({
|
|
|
20002
20099
|
return [promise, abortFunc];
|
|
20003
20100
|
}
|
|
20004
20101
|
|
|
20005
|
-
var __defProp$
|
|
20006
|
-
var __defNormalProp$
|
|
20007
|
-
var __publicField$y = (obj, key, value) => __defNormalProp$
|
|
20102
|
+
var __defProp$Q = Object.defineProperty;
|
|
20103
|
+
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20104
|
+
var __publicField$y = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20008
20105
|
class Queue {
|
|
20009
20106
|
/**
|
|
20010
20107
|
* @param {PromiseQueueOptions} options - Configuration options for the queue.
|
|
@@ -20223,9 +20320,9 @@ class Queue {
|
|
|
20223
20320
|
|
|
20224
20321
|
const imageQueue = new Queue({ limit: 6, debounce: 150 });
|
|
20225
20322
|
|
|
20226
|
-
var __defProp$
|
|
20227
|
-
var __defNormalProp$
|
|
20228
|
-
var __publicField$x = (obj, key, value) => __defNormalProp$
|
|
20323
|
+
var __defProp$P = Object.defineProperty;
|
|
20324
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20325
|
+
var __publicField$x = (obj, key, value) => __defNormalProp$P(obj, key + "" , value);
|
|
20229
20326
|
const transparentImage = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEAAAAALAAAAAABAAEAAAIBAAA=";
|
|
20230
20327
|
class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
20231
20328
|
constructor(imageUrl, bounds, options) {
|
|
@@ -20269,9 +20366,9 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
|
20269
20366
|
}
|
|
20270
20367
|
}
|
|
20271
20368
|
|
|
20272
|
-
var __defProp$
|
|
20273
|
-
var __defNormalProp$
|
|
20274
|
-
var __publicField$w = (obj, key, value) => __defNormalProp$
|
|
20369
|
+
var __defProp$O = Object.defineProperty;
|
|
20370
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20371
|
+
var __publicField$w = (obj, key, value) => __defNormalProp$O(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20275
20372
|
class ImageLayer extends leafletSrcExports.Layer {
|
|
20276
20373
|
constructor(url, options) {
|
|
20277
20374
|
super(options);
|
|
@@ -20469,26 +20566,26 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
20469
20566
|
}
|
|
20470
20567
|
}
|
|
20471
20568
|
|
|
20472
|
-
var __defProp$
|
|
20473
|
-
var __defProps$
|
|
20474
|
-
var __getOwnPropDescs$
|
|
20475
|
-
var __getOwnPropSymbols$
|
|
20476
|
-
var __hasOwnProp$
|
|
20477
|
-
var __propIsEnum$
|
|
20478
|
-
var __defNormalProp$
|
|
20479
|
-
var __spreadValues$
|
|
20569
|
+
var __defProp$N = Object.defineProperty;
|
|
20570
|
+
var __defProps$q = Object.defineProperties;
|
|
20571
|
+
var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
|
|
20572
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
20573
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
20574
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
20575
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20576
|
+
var __spreadValues$A = (a, b) => {
|
|
20480
20577
|
for (var prop in b || (b = {}))
|
|
20481
|
-
if (__hasOwnProp$
|
|
20482
|
-
__defNormalProp$
|
|
20483
|
-
if (__getOwnPropSymbols$
|
|
20484
|
-
for (var prop of __getOwnPropSymbols$
|
|
20485
|
-
if (__propIsEnum$
|
|
20486
|
-
__defNormalProp$
|
|
20578
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
20579
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
20580
|
+
if (__getOwnPropSymbols$A)
|
|
20581
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
20582
|
+
if (__propIsEnum$A.call(b, prop))
|
|
20583
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
20487
20584
|
}
|
|
20488
20585
|
return a;
|
|
20489
20586
|
};
|
|
20490
|
-
var __spreadProps$
|
|
20491
|
-
var __publicField$v = (obj, key, value) => __defNormalProp$
|
|
20587
|
+
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
20588
|
+
var __publicField$v = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20492
20589
|
class ImageAdapter extends BaseAdapter {
|
|
20493
20590
|
constructor() {
|
|
20494
20591
|
super(...arguments);
|
|
@@ -20500,10 +20597,10 @@ class ImageAdapter extends BaseAdapter {
|
|
|
20500
20597
|
if (url) {
|
|
20501
20598
|
const updateWmsParamsFromOpt = options.updateWmsParams;
|
|
20502
20599
|
const request = getLayerRequestOptions(options);
|
|
20503
|
-
this.layer = new ImageLayer(url, __spreadProps$
|
|
20600
|
+
this.layer = new ImageLayer(url, __spreadProps$q(__spreadValues$A(__spreadValues$A(__spreadValues$A({
|
|
20504
20601
|
pane: this.pane,
|
|
20505
20602
|
setViewDelay: options.setViewDelay
|
|
20506
|
-
}, __spreadProps$
|
|
20603
|
+
}, __spreadProps$q(__spreadValues$A({
|
|
20507
20604
|
transparent: true
|
|
20508
20605
|
}, options), {
|
|
20509
20606
|
opacity: (_a = options.opacity) != null ? _a : void 0
|
|
@@ -20591,33 +20688,33 @@ class TileLayerBase extends leafletSrcExports.TileLayer {
|
|
|
20591
20688
|
}
|
|
20592
20689
|
const TileLayer = makeRemote(TileLayerBase);
|
|
20593
20690
|
|
|
20594
|
-
var __defProp$
|
|
20595
|
-
var __defProps$
|
|
20596
|
-
var __getOwnPropDescs$
|
|
20597
|
-
var __getOwnPropSymbols$
|
|
20598
|
-
var __hasOwnProp$
|
|
20599
|
-
var __propIsEnum$
|
|
20600
|
-
var __defNormalProp$
|
|
20601
|
-
var __spreadValues$
|
|
20691
|
+
var __defProp$M = Object.defineProperty;
|
|
20692
|
+
var __defProps$p = Object.defineProperties;
|
|
20693
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
20694
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
20695
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
20696
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
20697
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20698
|
+
var __spreadValues$z = (a, b) => {
|
|
20602
20699
|
for (var prop in b || (b = {}))
|
|
20603
|
-
if (__hasOwnProp$
|
|
20604
|
-
__defNormalProp$
|
|
20605
|
-
if (__getOwnPropSymbols$
|
|
20606
|
-
for (var prop of __getOwnPropSymbols$
|
|
20607
|
-
if (__propIsEnum$
|
|
20608
|
-
__defNormalProp$
|
|
20700
|
+
if (__hasOwnProp$z.call(b, prop))
|
|
20701
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
20702
|
+
if (__getOwnPropSymbols$z)
|
|
20703
|
+
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
20704
|
+
if (__propIsEnum$z.call(b, prop))
|
|
20705
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
20609
20706
|
}
|
|
20610
20707
|
return a;
|
|
20611
20708
|
};
|
|
20612
|
-
var __spreadProps$
|
|
20709
|
+
var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
|
|
20613
20710
|
var __objRest$7 = (source, exclude) => {
|
|
20614
20711
|
var target = {};
|
|
20615
20712
|
for (var prop in source)
|
|
20616
|
-
if (__hasOwnProp$
|
|
20713
|
+
if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
20617
20714
|
target[prop] = source[prop];
|
|
20618
|
-
if (source != null && __getOwnPropSymbols$
|
|
20619
|
-
for (var prop of __getOwnPropSymbols$
|
|
20620
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
20715
|
+
if (source != null && __getOwnPropSymbols$z)
|
|
20716
|
+
for (var prop of __getOwnPropSymbols$z(source)) {
|
|
20717
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
|
|
20621
20718
|
target[prop] = source[prop];
|
|
20622
20719
|
}
|
|
20623
20720
|
return target;
|
|
@@ -20628,7 +20725,7 @@ class TileAdapter extends BaseAdapter {
|
|
|
20628
20725
|
if (options) {
|
|
20629
20726
|
const _a = options, { url } = _a, opt = __objRest$7(_a, ["url"]);
|
|
20630
20727
|
if (url) {
|
|
20631
|
-
const tileLayerOptions = __spreadValues$
|
|
20728
|
+
const tileLayerOptions = __spreadValues$z({
|
|
20632
20729
|
pane: this.pane,
|
|
20633
20730
|
attribution: opt.attribution,
|
|
20634
20731
|
minZoom: opt.minZoom,
|
|
@@ -20640,7 +20737,7 @@ class TileAdapter extends BaseAdapter {
|
|
|
20640
20737
|
let layer;
|
|
20641
20738
|
const request = getLayerRequestOptions(opt);
|
|
20642
20739
|
if (request) {
|
|
20643
|
-
layer = new TileLayer(url, __spreadProps$
|
|
20740
|
+
layer = new TileLayer(url, __spreadProps$p(__spreadValues$z({}, tileLayerOptions), {
|
|
20644
20741
|
request,
|
|
20645
20742
|
setViewDelay: opt.setViewDelay
|
|
20646
20743
|
}));
|
|
@@ -20662,29 +20759,29 @@ class TileAdapter extends BaseAdapter {
|
|
|
20662
20759
|
}
|
|
20663
20760
|
}
|
|
20664
20761
|
|
|
20665
|
-
var __defProp$
|
|
20666
|
-
var __defProps$
|
|
20667
|
-
var __getOwnPropDescs$
|
|
20668
|
-
var __getOwnPropSymbols$
|
|
20669
|
-
var __hasOwnProp$
|
|
20670
|
-
var __propIsEnum$
|
|
20671
|
-
var __defNormalProp$
|
|
20672
|
-
var __spreadValues$
|
|
20762
|
+
var __defProp$L = Object.defineProperty;
|
|
20763
|
+
var __defProps$o = Object.defineProperties;
|
|
20764
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
20765
|
+
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
20766
|
+
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
20767
|
+
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
20768
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20769
|
+
var __spreadValues$y = (a, b) => {
|
|
20673
20770
|
for (var prop in b || (b = {}))
|
|
20674
|
-
if (__hasOwnProp$
|
|
20675
|
-
__defNormalProp$
|
|
20676
|
-
if (__getOwnPropSymbols$
|
|
20677
|
-
for (var prop of __getOwnPropSymbols$
|
|
20678
|
-
if (__propIsEnum$
|
|
20679
|
-
__defNormalProp$
|
|
20771
|
+
if (__hasOwnProp$y.call(b, prop))
|
|
20772
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
20773
|
+
if (__getOwnPropSymbols$y)
|
|
20774
|
+
for (var prop of __getOwnPropSymbols$y(b)) {
|
|
20775
|
+
if (__propIsEnum$y.call(b, prop))
|
|
20776
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
20680
20777
|
}
|
|
20681
20778
|
return a;
|
|
20682
20779
|
};
|
|
20683
|
-
var __spreadProps$
|
|
20780
|
+
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
20684
20781
|
class OsmAdapter extends TileAdapter {
|
|
20685
20782
|
addLayer(options) {
|
|
20686
20783
|
const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
|
20687
|
-
return super.addLayer(__spreadProps$
|
|
20784
|
+
return super.addLayer(__spreadProps$o(__spreadValues$y({
|
|
20688
20785
|
name: "OpenStreetMap",
|
|
20689
20786
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
|
20690
20787
|
}, options), {
|
|
@@ -20700,33 +20797,33 @@ class WmsLayerBase extends leafletSrcExports.TileLayer.WMS {
|
|
|
20700
20797
|
}
|
|
20701
20798
|
const WmsLayer = makeRemote(WmsLayerBase);
|
|
20702
20799
|
|
|
20703
|
-
var __defProp$
|
|
20704
|
-
var __defProps$
|
|
20705
|
-
var __getOwnPropDescs$
|
|
20706
|
-
var __getOwnPropSymbols$
|
|
20707
|
-
var __hasOwnProp$
|
|
20708
|
-
var __propIsEnum$
|
|
20709
|
-
var __defNormalProp$
|
|
20710
|
-
var __spreadValues$
|
|
20800
|
+
var __defProp$K = Object.defineProperty;
|
|
20801
|
+
var __defProps$n = Object.defineProperties;
|
|
20802
|
+
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
20803
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
20804
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
20805
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
20806
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20807
|
+
var __spreadValues$x = (a, b) => {
|
|
20711
20808
|
for (var prop in b || (b = {}))
|
|
20712
|
-
if (__hasOwnProp$
|
|
20713
|
-
__defNormalProp$
|
|
20714
|
-
if (__getOwnPropSymbols$
|
|
20715
|
-
for (var prop of __getOwnPropSymbols$
|
|
20716
|
-
if (__propIsEnum$
|
|
20717
|
-
__defNormalProp$
|
|
20809
|
+
if (__hasOwnProp$x.call(b, prop))
|
|
20810
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
20811
|
+
if (__getOwnPropSymbols$x)
|
|
20812
|
+
for (var prop of __getOwnPropSymbols$x(b)) {
|
|
20813
|
+
if (__propIsEnum$x.call(b, prop))
|
|
20814
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
20718
20815
|
}
|
|
20719
20816
|
return a;
|
|
20720
20817
|
};
|
|
20721
|
-
var __spreadProps$
|
|
20818
|
+
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
20722
20819
|
var __objRest$6 = (source, exclude) => {
|
|
20723
20820
|
var target = {};
|
|
20724
20821
|
for (var prop in source)
|
|
20725
|
-
if (__hasOwnProp$
|
|
20822
|
+
if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
20726
20823
|
target[prop] = source[prop];
|
|
20727
|
-
if (source != null && __getOwnPropSymbols$
|
|
20728
|
-
for (var prop of __getOwnPropSymbols$
|
|
20729
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
20824
|
+
if (source != null && __getOwnPropSymbols$x)
|
|
20825
|
+
for (var prop of __getOwnPropSymbols$x(source)) {
|
|
20826
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
|
|
20730
20827
|
target[prop] = source[prop];
|
|
20731
20828
|
}
|
|
20732
20829
|
return target;
|
|
@@ -20737,7 +20834,7 @@ class WmsAdapter extends BaseAdapter {
|
|
|
20737
20834
|
Object.assign(this.options, options);
|
|
20738
20835
|
const _a = options, { url } = _a, opt = __objRest$6(_a, ["url"]);
|
|
20739
20836
|
if (url) {
|
|
20740
|
-
const layerOptions = __spreadValues$
|
|
20837
|
+
const layerOptions = __spreadValues$x(__spreadValues$x({
|
|
20741
20838
|
pane: this.pane,
|
|
20742
20839
|
attribution: opt.attribution,
|
|
20743
20840
|
minZoom: opt.minZoom,
|
|
@@ -20750,7 +20847,7 @@ class WmsAdapter extends BaseAdapter {
|
|
|
20750
20847
|
let layer;
|
|
20751
20848
|
const request = getLayerRequestOptions(opt);
|
|
20752
20849
|
if (request) {
|
|
20753
|
-
layer = new WmsLayer(url, __spreadProps$
|
|
20850
|
+
layer = new WmsLayer(url, __spreadProps$n(__spreadValues$x({}, layerOptions), {
|
|
20754
20851
|
request
|
|
20755
20852
|
}));
|
|
20756
20853
|
} else {
|
|
@@ -20764,28 +20861,28 @@ class WmsAdapter extends BaseAdapter {
|
|
|
20764
20861
|
function arrayToBoundsExpression(bounds) {
|
|
20765
20862
|
const e = bounds;
|
|
20766
20863
|
return [
|
|
20767
|
-
[e[3], e[0]],
|
|
20768
|
-
[e[1], e[2]]
|
|
20769
|
-
];
|
|
20770
|
-
}
|
|
20771
|
-
|
|
20772
|
-
var __defProp$
|
|
20773
|
-
var __getOwnPropSymbols$
|
|
20774
|
-
var __hasOwnProp$
|
|
20775
|
-
var __propIsEnum$
|
|
20776
|
-
var __defNormalProp$
|
|
20777
|
-
var __spreadValues$
|
|
20864
|
+
[e[3], e[0]],
|
|
20865
|
+
[e[1], e[2]]
|
|
20866
|
+
];
|
|
20867
|
+
}
|
|
20868
|
+
|
|
20869
|
+
var __defProp$J = Object.defineProperty;
|
|
20870
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
20871
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
20872
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
20873
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20874
|
+
var __spreadValues$w = (a, b) => {
|
|
20778
20875
|
for (var prop in b || (b = {}))
|
|
20779
|
-
if (__hasOwnProp$
|
|
20780
|
-
__defNormalProp$
|
|
20781
|
-
if (__getOwnPropSymbols$
|
|
20782
|
-
for (var prop of __getOwnPropSymbols$
|
|
20783
|
-
if (__propIsEnum$
|
|
20784
|
-
__defNormalProp$
|
|
20876
|
+
if (__hasOwnProp$w.call(b, prop))
|
|
20877
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
20878
|
+
if (__getOwnPropSymbols$w)
|
|
20879
|
+
for (var prop of __getOwnPropSymbols$w(b)) {
|
|
20880
|
+
if (__propIsEnum$w.call(b, prop))
|
|
20881
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
20785
20882
|
}
|
|
20786
20883
|
return a;
|
|
20787
20884
|
};
|
|
20788
|
-
var __publicField$u = (obj, key, value) => __defNormalProp$
|
|
20885
|
+
var __publicField$u = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20789
20886
|
const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
20790
20887
|
constructor() {
|
|
20791
20888
|
__publicField$u(this, "options", { target: "map" });
|
|
@@ -20811,7 +20908,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
20811
20908
|
]);
|
|
20812
20909
|
}
|
|
20813
20910
|
create(options) {
|
|
20814
|
-
this.options = __spreadValues$
|
|
20911
|
+
this.options = __spreadValues$w({}, options);
|
|
20815
20912
|
if (this.options.target) {
|
|
20816
20913
|
const {
|
|
20817
20914
|
zoom,
|
|
@@ -20821,7 +20918,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
20821
20918
|
maxBounds: mb,
|
|
20822
20919
|
mapAdapterOptions
|
|
20823
20920
|
} = this.options;
|
|
20824
|
-
this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$
|
|
20921
|
+
this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$w({
|
|
20825
20922
|
attributionControl: false,
|
|
20826
20923
|
zoomControl: false,
|
|
20827
20924
|
maxBounds: mb ? arrayToBoundsExpression(mb) : void 0,
|
|
@@ -21028,10 +21125,10 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
21028
21125
|
}
|
|
21029
21126
|
const stop2 = () => {
|
|
21030
21127
|
if (locationfound !== void 0) {
|
|
21031
|
-
map.off("locationfound", locationFound);
|
|
21128
|
+
map.off("locationfound", locationFound, this);
|
|
21032
21129
|
}
|
|
21033
21130
|
if (locationerror) {
|
|
21034
|
-
map.off("locationerror", locationerror);
|
|
21131
|
+
map.off("locationerror", locationerror, this);
|
|
21035
21132
|
}
|
|
21036
21133
|
};
|
|
21037
21134
|
return { stop: stop2 };
|
|
@@ -21053,6 +21150,10 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
21053
21150
|
const map = this.map;
|
|
21054
21151
|
if (container && map && window.ResizeObserver) {
|
|
21055
21152
|
this._resizeObserver = new ResizeObserver(() => {
|
|
21153
|
+
map.invalidateSize({
|
|
21154
|
+
pan: false,
|
|
21155
|
+
debounceMoveend: true
|
|
21156
|
+
});
|
|
21056
21157
|
this._updateMinZoomForBounds();
|
|
21057
21158
|
});
|
|
21058
21159
|
this._resizeObserver.observe(container);
|
|
@@ -21214,19 +21315,19 @@ function template(str, data) {
|
|
|
21214
21315
|
});
|
|
21215
21316
|
}
|
|
21216
21317
|
|
|
21217
|
-
var __defProp$
|
|
21218
|
-
var __getOwnPropSymbols$
|
|
21219
|
-
var __hasOwnProp$
|
|
21220
|
-
var __propIsEnum$
|
|
21221
|
-
var __defNormalProp$
|
|
21222
|
-
var __spreadValues$
|
|
21318
|
+
var __defProp$I = Object.defineProperty;
|
|
21319
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
21320
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
21321
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
21322
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21323
|
+
var __spreadValues$v = (a, b) => {
|
|
21223
21324
|
for (var prop in b || (b = {}))
|
|
21224
|
-
if (__hasOwnProp$
|
|
21225
|
-
__defNormalProp$
|
|
21226
|
-
if (__getOwnPropSymbols$
|
|
21227
|
-
for (var prop of __getOwnPropSymbols$
|
|
21228
|
-
if (__propIsEnum$
|
|
21229
|
-
__defNormalProp$
|
|
21325
|
+
if (__hasOwnProp$v.call(b, prop))
|
|
21326
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
21327
|
+
if (__getOwnPropSymbols$v)
|
|
21328
|
+
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
21329
|
+
if (__propIsEnum$v.call(b, prop))
|
|
21330
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
21230
21331
|
}
|
|
21231
21332
|
return a;
|
|
21232
21333
|
};
|
|
@@ -21289,7 +21390,7 @@ function apiRequest(opt) {
|
|
|
21289
21390
|
}
|
|
21290
21391
|
}
|
|
21291
21392
|
if (url) {
|
|
21292
|
-
return connector.makeQuery(url, params, __spreadValues$
|
|
21393
|
+
return connector.makeQuery(url, params, __spreadValues$v({
|
|
21293
21394
|
cacheName: name
|
|
21294
21395
|
}, requestOptions));
|
|
21295
21396
|
} else {
|
|
@@ -21301,9 +21402,9 @@ function apiRequest(opt) {
|
|
|
21301
21402
|
});
|
|
21302
21403
|
}
|
|
21303
21404
|
|
|
21304
|
-
var __defProp$
|
|
21305
|
-
var __defNormalProp$
|
|
21306
|
-
var __publicField$t = (obj, key, value) => __defNormalProp$
|
|
21405
|
+
var __defProp$H = Object.defineProperty;
|
|
21406
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21407
|
+
var __publicField$t = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21307
21408
|
const _Cache = class _Cache {
|
|
21308
21409
|
constructor(options = {}) {
|
|
21309
21410
|
__publicField$t(this, "cache", []);
|
|
@@ -21441,7 +21542,7 @@ __publicField$t(_Cache, "instance", {});
|
|
|
21441
21542
|
let Cache = _Cache;
|
|
21442
21543
|
|
|
21443
21544
|
var pkg = {
|
|
21444
|
-
version: "4.
|
|
21545
|
+
version: "4.1.1"};
|
|
21445
21546
|
|
|
21446
21547
|
class AbortError extends Error {
|
|
21447
21548
|
constructor(message = "AbortError") {
|
|
@@ -21450,9 +21551,9 @@ class AbortError extends Error {
|
|
|
21450
21551
|
}
|
|
21451
21552
|
}
|
|
21452
21553
|
|
|
21453
|
-
var __defProp$
|
|
21454
|
-
var __defNormalProp$
|
|
21455
|
-
var __publicField$s = (obj, key, value) => __defNormalProp$
|
|
21554
|
+
var __defProp$G = Object.defineProperty;
|
|
21555
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21556
|
+
var __publicField$s = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21456
21557
|
class NgwError extends Error {
|
|
21457
21558
|
constructor(er) {
|
|
21458
21559
|
super();
|
|
@@ -21469,9 +21570,9 @@ class NgwError extends Error {
|
|
|
21469
21570
|
}
|
|
21470
21571
|
}
|
|
21471
21572
|
|
|
21472
|
-
var __defProp$
|
|
21473
|
-
var __defNormalProp$
|
|
21474
|
-
var __publicField$r = (obj, key, value) => __defNormalProp$
|
|
21573
|
+
var __defProp$F = Object.defineProperty;
|
|
21574
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21575
|
+
var __publicField$r = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21475
21576
|
class InsufficientPermissionsError extends NgwError {
|
|
21476
21577
|
constructor(obj) {
|
|
21477
21578
|
super(obj);
|
|
@@ -21481,9 +21582,9 @@ class InsufficientPermissionsError extends NgwError {
|
|
|
21481
21582
|
}
|
|
21482
21583
|
}
|
|
21483
21584
|
|
|
21484
|
-
var __defProp$
|
|
21485
|
-
var __defNormalProp$
|
|
21486
|
-
var __publicField$q = (obj, key, value) => __defNormalProp$
|
|
21585
|
+
var __defProp$E = Object.defineProperty;
|
|
21586
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21587
|
+
var __publicField$q = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21487
21588
|
let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
|
|
21488
21589
|
constructor(obj) {
|
|
21489
21590
|
super(obj);
|
|
@@ -21521,14 +21622,14 @@ function extractError(error) {
|
|
|
21521
21622
|
|
|
21522
21623
|
function isError(error) {
|
|
21523
21624
|
if (isObject$1(error)) {
|
|
21524
|
-
return error.status_code && error.exception && error.title;
|
|
21625
|
+
return Boolean(error.status_code && error.exception && error.title);
|
|
21525
21626
|
}
|
|
21526
21627
|
return false;
|
|
21527
21628
|
}
|
|
21528
21629
|
|
|
21529
|
-
var __defProp$
|
|
21530
|
-
var __defNormalProp$
|
|
21531
|
-
var __publicField$p = (obj, key, value) => __defNormalProp$
|
|
21630
|
+
var __defProp$D = Object.defineProperty;
|
|
21631
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21632
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$D(obj, key + "" , value);
|
|
21532
21633
|
class NetworkError extends Error {
|
|
21533
21634
|
constructor(url) {
|
|
21534
21635
|
super();
|
|
@@ -21539,9 +21640,9 @@ class NetworkError extends Error {
|
|
|
21539
21640
|
}
|
|
21540
21641
|
}
|
|
21541
21642
|
|
|
21542
|
-
var __defProp$
|
|
21543
|
-
var __defNormalProp$
|
|
21544
|
-
var __publicField$o = (obj, key, value) => __defNormalProp$
|
|
21643
|
+
var __defProp$C = Object.defineProperty;
|
|
21644
|
+
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21645
|
+
var __publicField$o = (obj, key, value) => __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21545
21646
|
class ResourceNotFoundError extends NgwError {
|
|
21546
21647
|
constructor(obj) {
|
|
21547
21648
|
super(obj);
|
|
@@ -21563,9 +21664,9 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
21563
21664
|
isError: isError
|
|
21564
21665
|
});
|
|
21565
21666
|
|
|
21566
|
-
var __defProp$
|
|
21567
|
-
var __defNormalProp$
|
|
21568
|
-
var __publicField$n = (obj, key, value) => __defNormalProp$
|
|
21667
|
+
var __defProp$B = Object.defineProperty;
|
|
21668
|
+
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21669
|
+
var __publicField$n = (obj, key, value) => __defNormalProp$B(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21569
21670
|
class BaseAPIError extends Error {
|
|
21570
21671
|
constructor(message) {
|
|
21571
21672
|
super(message || "Something went wrong.");
|
|
@@ -21627,30 +21728,33 @@ class LunkwillRequestFailed extends LunkwillError {
|
|
|
21627
21728
|
}
|
|
21628
21729
|
}
|
|
21629
21730
|
|
|
21630
|
-
var __defProp$
|
|
21631
|
-
var
|
|
21632
|
-
var
|
|
21633
|
-
var
|
|
21634
|
-
var
|
|
21635
|
-
var
|
|
21731
|
+
var __defProp$A = Object.defineProperty;
|
|
21732
|
+
var __defProps$m = Object.defineProperties;
|
|
21733
|
+
var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
|
|
21734
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
21735
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
21736
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
21737
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21738
|
+
var __spreadValues$u = (a, b) => {
|
|
21636
21739
|
for (var prop in b || (b = {}))
|
|
21637
|
-
if (__hasOwnProp$
|
|
21638
|
-
__defNormalProp$
|
|
21639
|
-
if (__getOwnPropSymbols$
|
|
21640
|
-
for (var prop of __getOwnPropSymbols$
|
|
21641
|
-
if (__propIsEnum$
|
|
21642
|
-
__defNormalProp$
|
|
21740
|
+
if (__hasOwnProp$u.call(b, prop))
|
|
21741
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
21742
|
+
if (__getOwnPropSymbols$u)
|
|
21743
|
+
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
21744
|
+
if (__propIsEnum$u.call(b, prop))
|
|
21745
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
21643
21746
|
}
|
|
21644
21747
|
return a;
|
|
21645
21748
|
};
|
|
21749
|
+
var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
|
|
21646
21750
|
var __objRest$5 = (source, exclude) => {
|
|
21647
21751
|
var target = {};
|
|
21648
21752
|
for (var prop in source)
|
|
21649
|
-
if (__hasOwnProp$
|
|
21753
|
+
if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21650
21754
|
target[prop] = source[prop];
|
|
21651
|
-
if (source != null && __getOwnPropSymbols$
|
|
21652
|
-
for (var prop of __getOwnPropSymbols$
|
|
21653
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
21755
|
+
if (source != null && __getOwnPropSymbols$u)
|
|
21756
|
+
for (var prop of __getOwnPropSymbols$u(source)) {
|
|
21757
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
|
|
21654
21758
|
target[prop] = source[prop];
|
|
21655
21759
|
}
|
|
21656
21760
|
return target;
|
|
@@ -21682,40 +21786,60 @@ function lunkwillCheckResponse(lwResp) {
|
|
|
21682
21786
|
function responseJson(response) {
|
|
21683
21787
|
return __async$r(this, null, function* () {
|
|
21684
21788
|
try {
|
|
21685
|
-
return response.json();
|
|
21789
|
+
return yield response.json();
|
|
21686
21790
|
} catch (e) {
|
|
21687
|
-
throw new
|
|
21791
|
+
throw new InvalidResponseError();
|
|
21688
21792
|
}
|
|
21689
21793
|
});
|
|
21690
21794
|
}
|
|
21691
|
-
function lunkwillResponseUrl(lwResp) {
|
|
21795
|
+
function lunkwillResponseUrl(lwResp, opt) {
|
|
21692
21796
|
return __async$r(this, null, function* () {
|
|
21797
|
+
var _a, _b, _c, _d;
|
|
21693
21798
|
const lwData = yield responseJson(lwResp);
|
|
21694
|
-
|
|
21695
|
-
|
|
21799
|
+
if (lwData.id == null) {
|
|
21800
|
+
throw new LunkwillError(void 0, lwData);
|
|
21801
|
+
}
|
|
21802
|
+
let delay = (_a = lwData.delay_ms) != null ? _a : 0;
|
|
21803
|
+
const retry = (_b = lwData.retry_ms) != null ? _b : 2e3;
|
|
21696
21804
|
const sum = `/api/lunkwill/${lwData.id}/summary`;
|
|
21697
21805
|
const res = `/api/lunkwill/${lwData.id}/response`;
|
|
21698
|
-
const sleep = (msec) => new Promise((resolve) =>
|
|
21699
|
-
|
|
21700
|
-
|
|
21701
|
-
|
|
21702
|
-
|
|
21703
|
-
|
|
21704
|
-
|
|
21806
|
+
const sleep = (msec) => new Promise((resolve, reject) => {
|
|
21807
|
+
const signal = opt.signal;
|
|
21808
|
+
const aborted = () => (signal == null ? void 0 : signal.reason) instanceof Error ? signal.reason : new DOMException("Aborted", "AbortError");
|
|
21809
|
+
if (signal == null ? void 0 : signal.aborted) return reject(aborted());
|
|
21810
|
+
const onAbort = () => {
|
|
21811
|
+
clearTimeout(timer);
|
|
21812
|
+
reject(aborted());
|
|
21813
|
+
};
|
|
21814
|
+
const timer = setTimeout(() => {
|
|
21815
|
+
signal == null ? void 0 : signal.removeEventListener("abort", onAbort);
|
|
21816
|
+
resolve();
|
|
21817
|
+
}, msec);
|
|
21818
|
+
signal == null ? void 0 : signal.addEventListener("abort", onAbort, { once: true });
|
|
21819
|
+
});
|
|
21820
|
+
let failures = 0;
|
|
21821
|
+
while (true) {
|
|
21822
|
+
yield sleep(failures ? retry : delay);
|
|
21705
21823
|
let lwData2;
|
|
21706
21824
|
try {
|
|
21707
|
-
|
|
21708
|
-
|
|
21709
|
-
|
|
21710
|
-
|
|
21825
|
+
const response = yield fetch(sum, {
|
|
21826
|
+
credentials: opt.credentials,
|
|
21827
|
+
headers: opt.headers,
|
|
21828
|
+
signal: opt.signal
|
|
21829
|
+
});
|
|
21830
|
+
if (!response.ok) {
|
|
21831
|
+
throw new Error(`Lunkwill HTTP ${response.status}`);
|
|
21832
|
+
}
|
|
21833
|
+
lwData2 = yield responseJson(response);
|
|
21834
|
+
failures = 0;
|
|
21835
|
+
} catch (error) {
|
|
21836
|
+
if ((_c = opt.signal) == null ? void 0 : _c.aborted) throw error;
|
|
21837
|
+
if (++failures >= 5) throw new NetworksResponseError();
|
|
21711
21838
|
continue;
|
|
21712
21839
|
}
|
|
21713
21840
|
switch (lwData2.status) {
|
|
21714
|
-
case void 0:
|
|
21715
|
-
throw new LunkwillError(void 0, lwData2);
|
|
21716
21841
|
case "ready":
|
|
21717
|
-
|
|
21718
|
-
break;
|
|
21842
|
+
return res;
|
|
21719
21843
|
case "cancelled":
|
|
21720
21844
|
throw new LunkwillRequestCancelled(lwData2);
|
|
21721
21845
|
case "failed":
|
|
@@ -21723,20 +21847,25 @@ function lunkwillResponseUrl(lwResp) {
|
|
|
21723
21847
|
case "spooled":
|
|
21724
21848
|
case "processing":
|
|
21725
21849
|
case "buffering":
|
|
21726
|
-
delay = lwData2.delay_ms;
|
|
21850
|
+
delay = (_d = lwData2.delay_ms) != null ? _d : 2e3;
|
|
21727
21851
|
break;
|
|
21728
21852
|
default:
|
|
21729
21853
|
throw new LunkwillError(void 0, lwData2);
|
|
21730
21854
|
}
|
|
21731
21855
|
}
|
|
21732
|
-
return res;
|
|
21733
21856
|
});
|
|
21734
21857
|
}
|
|
21735
|
-
function lunkwillFetch(
|
|
21858
|
+
function lunkwillFetch(url, opt) {
|
|
21736
21859
|
return __async$r(this, null, function* () {
|
|
21860
|
+
var _a;
|
|
21737
21861
|
try {
|
|
21738
|
-
return yield
|
|
21739
|
-
|
|
21862
|
+
return yield fetch(url, {
|
|
21863
|
+
credentials: opt.credentials,
|
|
21864
|
+
headers: opt.headers,
|
|
21865
|
+
signal: opt.signal
|
|
21866
|
+
});
|
|
21867
|
+
} catch (error) {
|
|
21868
|
+
if ((_a = opt.signal) == null ? void 0 : _a.aborted) throw error;
|
|
21740
21869
|
throw new NetworksResponseError();
|
|
21741
21870
|
}
|
|
21742
21871
|
});
|
|
@@ -21788,7 +21917,7 @@ function request(path, options, cacheEngine) {
|
|
|
21788
21917
|
credentials: "same-origin",
|
|
21789
21918
|
headers: {}
|
|
21790
21919
|
};
|
|
21791
|
-
const _a = __spreadValues$
|
|
21920
|
+
const _a = __spreadValues$u(__spreadValues$u({}, defaults), options), {
|
|
21792
21921
|
withCredentials,
|
|
21793
21922
|
responseType,
|
|
21794
21923
|
cacheProps,
|
|
@@ -21808,7 +21937,7 @@ function request(path, options, cacheEngine) {
|
|
|
21808
21937
|
"json"
|
|
21809
21938
|
]);
|
|
21810
21939
|
opt.method = (_b = opt.method) == null ? void 0 : _b.toUpperCase();
|
|
21811
|
-
if (withCredentials) {
|
|
21940
|
+
if (withCredentials && (options == null ? void 0 : options.credentials) === void 0) {
|
|
21812
21941
|
opt.credentials = "include";
|
|
21813
21942
|
}
|
|
21814
21943
|
let useLunkwill = false;
|
|
@@ -21836,11 +21965,37 @@ function request(path, options, cacheEngine) {
|
|
|
21836
21965
|
throw new NetworksResponseError();
|
|
21837
21966
|
}
|
|
21838
21967
|
if (useLunkwill && lunkwillCheckResponse(response)) {
|
|
21839
|
-
const lwRespUrl = yield lunkwillResponseUrl(response);
|
|
21968
|
+
const lwRespUrl = yield lunkwillResponseUrl(response, opt);
|
|
21840
21969
|
if (lunkwillReturnUrl) {
|
|
21841
21970
|
return lwRespUrl;
|
|
21842
21971
|
}
|
|
21843
|
-
response = yield lunkwillFetch(lwRespUrl);
|
|
21972
|
+
response = yield lunkwillFetch(lwRespUrl, opt);
|
|
21973
|
+
}
|
|
21974
|
+
if (!response.ok) {
|
|
21975
|
+
let responseText;
|
|
21976
|
+
try {
|
|
21977
|
+
responseText = yield response.text();
|
|
21978
|
+
} catch (e) {
|
|
21979
|
+
if (e.name === "AbortError") throw e;
|
|
21980
|
+
throw new InvalidResponseError();
|
|
21981
|
+
}
|
|
21982
|
+
let errorBody = responseText;
|
|
21983
|
+
if (responseText) {
|
|
21984
|
+
try {
|
|
21985
|
+
errorBody = JSON.parse(responseText);
|
|
21986
|
+
} catch (e) {
|
|
21987
|
+
}
|
|
21988
|
+
}
|
|
21989
|
+
const fallback = response.statusText || `HTTP ${response.status}`;
|
|
21990
|
+
const data = errorBody && typeof errorBody === "object" && !Array.isArray(errorBody) ? __spreadProps$m(__spreadValues$u({}, errorBody), {
|
|
21991
|
+
message: typeof errorBody.message === "string" && errorBody.message ? errorBody.message : fallback
|
|
21992
|
+
}) : {
|
|
21993
|
+
message: typeof errorBody === "string" && errorBody.trim() ? errorBody : fallback
|
|
21994
|
+
};
|
|
21995
|
+
throw new ServerResponseError(data);
|
|
21996
|
+
}
|
|
21997
|
+
if (response.status === 204 || response.status === 205) {
|
|
21998
|
+
return void 0;
|
|
21844
21999
|
}
|
|
21845
22000
|
const respCType = response.headers.get("content-type");
|
|
21846
22001
|
const respJSON = respCType && (respCType.includes("application/json") || respCType.includes("application/vnd.lunkwill.request-summary+json"));
|
|
@@ -21860,15 +22015,12 @@ function request(path, options, cacheEngine) {
|
|
|
21860
22015
|
}
|
|
21861
22016
|
throw new InvalidResponseError();
|
|
21862
22017
|
}
|
|
21863
|
-
if (400 <= response.status && response.status <= 599) {
|
|
21864
|
-
throw new ServerResponseError(body);
|
|
21865
|
-
}
|
|
21866
22018
|
return body;
|
|
21867
22019
|
});
|
|
21868
22020
|
if (cacheEngine) {
|
|
21869
22021
|
if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
|
|
21870
22022
|
if (cache !== false) {
|
|
21871
|
-
const props = cacheProps ? cacheProps : __spreadValues$
|
|
22023
|
+
const props = cacheProps ? cacheProps : __spreadValues$u({}, objectRemoveEmpty({
|
|
21872
22024
|
withCredentials,
|
|
21873
22025
|
responseType
|
|
21874
22026
|
}));
|
|
@@ -21888,33 +22040,33 @@ function request(path, options, cacheEngine) {
|
|
|
21888
22040
|
});
|
|
21889
22041
|
}
|
|
21890
22042
|
|
|
21891
|
-
var __defProp$
|
|
21892
|
-
var __defProps$
|
|
21893
|
-
var __getOwnPropDescs$
|
|
21894
|
-
var __getOwnPropSymbols$
|
|
21895
|
-
var __hasOwnProp$
|
|
21896
|
-
var __propIsEnum$
|
|
21897
|
-
var __defNormalProp$
|
|
21898
|
-
var __spreadValues$
|
|
22043
|
+
var __defProp$z = Object.defineProperty;
|
|
22044
|
+
var __defProps$l = Object.defineProperties;
|
|
22045
|
+
var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
|
|
22046
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
22047
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
22048
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
22049
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22050
|
+
var __spreadValues$t = (a, b) => {
|
|
21899
22051
|
for (var prop in b || (b = {}))
|
|
21900
|
-
if (__hasOwnProp$
|
|
21901
|
-
__defNormalProp$
|
|
21902
|
-
if (__getOwnPropSymbols$
|
|
21903
|
-
for (var prop of __getOwnPropSymbols$
|
|
21904
|
-
if (__propIsEnum$
|
|
21905
|
-
__defNormalProp$
|
|
22052
|
+
if (__hasOwnProp$t.call(b, prop))
|
|
22053
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
22054
|
+
if (__getOwnPropSymbols$t)
|
|
22055
|
+
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
22056
|
+
if (__propIsEnum$t.call(b, prop))
|
|
22057
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
21906
22058
|
}
|
|
21907
22059
|
return a;
|
|
21908
22060
|
};
|
|
21909
|
-
var __spreadProps$
|
|
22061
|
+
var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
|
|
21910
22062
|
var __objRest$4 = (source, exclude) => {
|
|
21911
22063
|
var target = {};
|
|
21912
22064
|
for (var prop in source)
|
|
21913
|
-
if (__hasOwnProp$
|
|
22065
|
+
if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21914
22066
|
target[prop] = source[prop];
|
|
21915
|
-
if (source != null && __getOwnPropSymbols$
|
|
21916
|
-
for (var prop of __getOwnPropSymbols$
|
|
21917
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
22067
|
+
if (source != null && __getOwnPropSymbols$t)
|
|
22068
|
+
for (var prop of __getOwnPropSymbols$t(source)) {
|
|
22069
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
|
|
21918
22070
|
target[prop] = source[prop];
|
|
21919
22071
|
}
|
|
21920
22072
|
return target;
|
|
@@ -21998,10 +22150,10 @@ function route(name, connector, ...rest) {
|
|
|
21998
22150
|
routeData,
|
|
21999
22151
|
...rest
|
|
22000
22152
|
);
|
|
22001
|
-
const headers = objectRemoveEmpty(__spreadValues$
|
|
22153
|
+
const headers = objectRemoveEmpty(__spreadValues$t(__spreadValues$t({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
|
|
22002
22154
|
return request(
|
|
22003
22155
|
template,
|
|
22004
|
-
__spreadProps$
|
|
22156
|
+
__spreadProps$l(__spreadValues$t({
|
|
22005
22157
|
headers
|
|
22006
22158
|
}, restOpt), {
|
|
22007
22159
|
method
|
|
@@ -22019,6 +22171,34 @@ function isObject(val) {
|
|
|
22019
22171
|
return Object.prototype.toString.call(val) === "[object Object]";
|
|
22020
22172
|
}
|
|
22021
22173
|
|
|
22174
|
+
var __defProp$y = Object.defineProperty;
|
|
22175
|
+
var __defProps$k = Object.defineProperties;
|
|
22176
|
+
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
22177
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
22178
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
22179
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
22180
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22181
|
+
var __spreadValues$s = (a, b) => {
|
|
22182
|
+
for (var prop in b || (b = {}))
|
|
22183
|
+
if (__hasOwnProp$s.call(b, prop))
|
|
22184
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
22185
|
+
if (__getOwnPropSymbols$s)
|
|
22186
|
+
for (var prop of __getOwnPropSymbols$s(b)) {
|
|
22187
|
+
if (__propIsEnum$s.call(b, prop))
|
|
22188
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
22189
|
+
}
|
|
22190
|
+
return a;
|
|
22191
|
+
};
|
|
22192
|
+
var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
|
|
22193
|
+
function createHttpError(status, statusText, response) {
|
|
22194
|
+
const details = isObject(response) ? response : {};
|
|
22195
|
+
const message = typeof details.message === "string" && details.message ? details.message : typeof response === "string" && response.trim() ? response : statusText || `HTTP ${status}`;
|
|
22196
|
+
return new NgwError(__spreadProps$k(__spreadValues$s({}, details), {
|
|
22197
|
+
status_code: status,
|
|
22198
|
+
title: typeof details.title === "string" && details.title ? details.title : `HTTP ${status}`,
|
|
22199
|
+
message
|
|
22200
|
+
}));
|
|
22201
|
+
}
|
|
22022
22202
|
let loadData;
|
|
22023
22203
|
{
|
|
22024
22204
|
loadData = (url, callback, options = {}, error, onCancel) => {
|
|
@@ -22035,23 +22215,21 @@ let loadData;
|
|
|
22035
22215
|
return xhr.responseText;
|
|
22036
22216
|
}
|
|
22037
22217
|
};
|
|
22038
|
-
|
|
22039
|
-
|
|
22218
|
+
xhr.onload = () => {
|
|
22219
|
+
if (xhr.status < 200 || xhr.status >= 300) {
|
|
22220
|
+
const response = options.responseType === "blob" || !xhr.responseText ? void 0 : getResponseText();
|
|
22221
|
+
error(createHttpError(xhr.status, xhr.statusText, response));
|
|
22222
|
+
return;
|
|
22223
|
+
}
|
|
22224
|
+
if (xhr.status === 204 || xhr.status === 205) {
|
|
22225
|
+
callback(void 0);
|
|
22226
|
+
return;
|
|
22227
|
+
}
|
|
22040
22228
|
if (options.responseType === "blob") {
|
|
22041
|
-
|
|
22229
|
+
callback(xhr.response);
|
|
22042
22230
|
} else {
|
|
22043
|
-
|
|
22044
|
-
cb(getResponseText());
|
|
22045
|
-
} else {
|
|
22046
|
-
error({ message: "" });
|
|
22047
|
-
}
|
|
22048
|
-
}
|
|
22049
|
-
};
|
|
22050
|
-
xhr.onload = () => {
|
|
22051
|
-
if ([401, 403, 404, 422, 500].indexOf(xhr.status) !== -1) {
|
|
22052
|
-
error(new NgwError(getResponseText()));
|
|
22231
|
+
callback(xhr.responseText ? getResponseText() : void 0);
|
|
22053
22232
|
}
|
|
22054
|
-
processingResponse();
|
|
22055
22233
|
};
|
|
22056
22234
|
xhr.onerror = (er) => {
|
|
22057
22235
|
if (xhr.status === 0) {
|
|
@@ -22086,7 +22264,7 @@ let loadData;
|
|
|
22086
22264
|
data.append("file", options.file);
|
|
22087
22265
|
if (options.data) {
|
|
22088
22266
|
for (const d in options.data) {
|
|
22089
|
-
data.append(d, data[d]);
|
|
22267
|
+
data.append(d, options.data[d]);
|
|
22090
22268
|
}
|
|
22091
22269
|
}
|
|
22092
22270
|
} else {
|
|
@@ -22106,16 +22284,15 @@ function addConnector(connector) {
|
|
|
22106
22284
|
CONNECTORS.push(connector);
|
|
22107
22285
|
}
|
|
22108
22286
|
function findConnector(options) {
|
|
22109
|
-
return CONNECTORS.find((
|
|
22110
|
-
|
|
22111
|
-
|
|
22112
|
-
|
|
22113
|
-
|
|
22114
|
-
|
|
22115
|
-
|
|
22116
|
-
return true;
|
|
22117
|
-
}
|
|
22287
|
+
return CONNECTORS.find((connector) => {
|
|
22288
|
+
const existing = connector.options;
|
|
22289
|
+
if (existing.baseUrl !== options.baseUrl || existing.route !== options.route || existing.cacheId !== options.cacheId || connector.withCredentials !== options.withCredentials || existing.requestTransform !== options.requestTransform) {
|
|
22290
|
+
return false;
|
|
22291
|
+
}
|
|
22292
|
+
if (!existing.auth || !options.auth) {
|
|
22293
|
+
return !existing.auth && !options.auth;
|
|
22118
22294
|
}
|
|
22295
|
+
return objectDeepEqual(existing.auth, options.auth);
|
|
22119
22296
|
});
|
|
22120
22297
|
}
|
|
22121
22298
|
function removeConnector(connector) {
|
|
@@ -22221,6 +22398,7 @@ class NgwConnector {
|
|
|
22221
22398
|
}
|
|
22222
22399
|
setRequestTransform(requestTransform) {
|
|
22223
22400
|
this.requestTransform = requestTransform;
|
|
22401
|
+
this.options.requestTransform = requestTransform != null ? requestTransform : void 0;
|
|
22224
22402
|
}
|
|
22225
22403
|
/**
|
|
22226
22404
|
* Fast way to specify the connection address to NextGIS Web.
|
|
@@ -22367,23 +22545,31 @@ class NgwConnector {
|
|
|
22367
22545
|
responseType,
|
|
22368
22546
|
withCredentials
|
|
22369
22547
|
} = options;
|
|
22370
|
-
|
|
22371
|
-
|
|
22372
|
-
if (externalSignal) {
|
|
22373
|
-
if (externalSignal.aborted) {
|
|
22374
|
-
throw new AbortError();
|
|
22375
|
-
}
|
|
22376
|
-
externalSignal.addEventListener("abort", () => {
|
|
22377
|
-
internalAbortController.abort();
|
|
22378
|
-
});
|
|
22548
|
+
if (externalSignal == null ? void 0 : externalSignal.aborted) {
|
|
22549
|
+
throw new AbortError();
|
|
22379
22550
|
}
|
|
22380
|
-
options.signal = internalSignal;
|
|
22381
22551
|
const createPromise = () => __async$p(this, null, function* () {
|
|
22552
|
+
const internalAbortController = new AbortController();
|
|
22553
|
+
const onExternalAbort = () => internalAbortController.abort();
|
|
22554
|
+
if (externalSignal) {
|
|
22555
|
+
externalSignal.addEventListener("abort", onExternalAbort, {
|
|
22556
|
+
once: true
|
|
22557
|
+
});
|
|
22558
|
+
if (externalSignal.aborted) {
|
|
22559
|
+
internalAbortController.abort();
|
|
22560
|
+
}
|
|
22561
|
+
}
|
|
22382
22562
|
const id = REQUEST_ID++;
|
|
22383
22563
|
this.activeRequests[id] = internalAbortController;
|
|
22384
22564
|
try {
|
|
22385
|
-
|
|
22565
|
+
if (internalAbortController.signal.aborted) {
|
|
22566
|
+
throw new AbortError();
|
|
22567
|
+
}
|
|
22568
|
+
return yield this._loadData(url, __spreadProps$j(__spreadValues$r({}, options), {
|
|
22569
|
+
signal: internalAbortController.signal
|
|
22570
|
+
}));
|
|
22386
22571
|
} finally {
|
|
22572
|
+
externalSignal == null ? void 0 : externalSignal.removeEventListener("abort", onExternalAbort);
|
|
22387
22573
|
this._cleanActiveRequest(id);
|
|
22388
22574
|
}
|
|
22389
22575
|
});
|
|
@@ -22803,7 +22989,9 @@ class NgwConnectorExtended extends NgwConnector {
|
|
|
22803
22989
|
*/
|
|
22804
22990
|
clearCache() {
|
|
22805
22991
|
super.clearCache();
|
|
22806
|
-
this.resources.cache.
|
|
22992
|
+
if (this.resources.cache !== this.cache) {
|
|
22993
|
+
this.resources.cache.clean();
|
|
22994
|
+
}
|
|
22807
22995
|
}
|
|
22808
22996
|
/**
|
|
22809
22997
|
* Send request to NGW api router.
|
|
@@ -23041,11 +23229,12 @@ function fetchNgwLayerExtent({
|
|
|
23041
23229
|
signal
|
|
23042
23230
|
}) {
|
|
23043
23231
|
return connector.route("layer.extent", { id: Number(resourceId) }).get({ cache, signal }).then((resp) => {
|
|
23044
|
-
if (resp) {
|
|
23045
|
-
|
|
23046
|
-
const extentArray = [minLon, minLat, maxLon, maxLat];
|
|
23047
|
-
return extentArray;
|
|
23232
|
+
if (!(resp == null ? void 0 : resp.extent)) {
|
|
23233
|
+
return void 0;
|
|
23048
23234
|
}
|
|
23235
|
+
const { maxLat, maxLon, minLat, minLon } = resp.extent;
|
|
23236
|
+
const extentArray = [minLon, minLat, maxLon, maxLat];
|
|
23237
|
+
return extentArray;
|
|
23049
23238
|
});
|
|
23050
23239
|
}
|
|
23051
23240
|
function fetchNgwLayerItemExtent({
|
|
@@ -24104,8 +24293,8 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
|
24104
24293
|
}
|
|
24105
24294
|
getHierarchyValue() {
|
|
24106
24295
|
return this.get() && this.getParents().every((x) => {
|
|
24107
|
-
|
|
24108
|
-
return
|
|
24296
|
+
var _a;
|
|
24297
|
+
return Boolean((_a = x.properties) == null ? void 0 : _a.get(this.name));
|
|
24109
24298
|
});
|
|
24110
24299
|
}
|
|
24111
24300
|
block(options) {
|
|
@@ -27315,7 +27504,11 @@ class NgwImageLayerGrouping {
|
|
|
27315
27504
|
__publicField$1(this, "timer");
|
|
27316
27505
|
__publicField$1(this, "pending", Promise.resolve());
|
|
27317
27506
|
__publicField$1(this, "disposed", false);
|
|
27507
|
+
__publicField$1(this, "revision", 0);
|
|
27318
27508
|
__publicField$1(this, "onLayerChange", (layer) => {
|
|
27509
|
+
if (!this.isVisible(layer)) {
|
|
27510
|
+
this.invalidateGroupsContaining(layer, true);
|
|
27511
|
+
}
|
|
27319
27512
|
if (this.webMap.allLayers()[String(layer.id)] === layer) {
|
|
27320
27513
|
this.observe(layer);
|
|
27321
27514
|
} else {
|
|
@@ -27332,12 +27525,14 @@ class NgwImageLayerGrouping {
|
|
|
27332
27525
|
this.schedule();
|
|
27333
27526
|
});
|
|
27334
27527
|
__publicField$1(this, "onBeforeLayerRemove", (layer) => {
|
|
27528
|
+
this.invalidateGroupsContaining(layer, true);
|
|
27335
27529
|
const container = layer;
|
|
27336
27530
|
if (typeof container.getDependLayers !== "function") return;
|
|
27337
27531
|
for (const item of container.getDependLayers()) {
|
|
27338
27532
|
const child = item.layer;
|
|
27339
27533
|
if (!child) continue;
|
|
27340
27534
|
this.detached.add(child);
|
|
27535
|
+
this.invalidateGroupsContaining(child, true);
|
|
27341
27536
|
const update = this.originalUpdates.get(child);
|
|
27342
27537
|
if (update) child.updateLayer = update;
|
|
27343
27538
|
this.originalUpdates.delete(child);
|
|
@@ -27349,6 +27544,7 @@ class NgwImageLayerGrouping {
|
|
|
27349
27544
|
for (const layer of this.webMap.orderedLayers()) {
|
|
27350
27545
|
if (layer.id === (event == null ? void 0 : event.layerId)) {
|
|
27351
27546
|
this.excluded.add(layer);
|
|
27547
|
+
this.invalidateGroupsContaining(layer);
|
|
27352
27548
|
this.schedule();
|
|
27353
27549
|
break;
|
|
27354
27550
|
}
|
|
@@ -27405,6 +27601,7 @@ class NgwImageLayerGrouping {
|
|
|
27405
27601
|
/** Re-evaluate grouping after any observed layer state change. */
|
|
27406
27602
|
schedule() {
|
|
27407
27603
|
if (this.disposed) return;
|
|
27604
|
+
this.revision++;
|
|
27408
27605
|
if (this.timer) clearTimeout(this.timer);
|
|
27409
27606
|
this.timer = setTimeout(() => {
|
|
27410
27607
|
this.timer = void 0;
|
|
@@ -27422,7 +27619,12 @@ class NgwImageLayerGrouping {
|
|
|
27422
27619
|
if (this.opacityListeners.has(layer)) return;
|
|
27423
27620
|
const native = layer.layer;
|
|
27424
27621
|
if (!(native == null ? void 0 : native.on) || !native.off && !native.un) return;
|
|
27425
|
-
const listener = () =>
|
|
27622
|
+
const listener = () => {
|
|
27623
|
+
if (this.getOpacity(layer) !== 1) {
|
|
27624
|
+
this.invalidateGroupsContaining(layer);
|
|
27625
|
+
}
|
|
27626
|
+
this.schedule();
|
|
27627
|
+
};
|
|
27426
27628
|
native.on("change:opacity", listener);
|
|
27427
27629
|
native.on("opacitychange", listener);
|
|
27428
27630
|
this.opacityListeners.set(layer, () => {
|
|
@@ -27462,6 +27664,7 @@ class NgwImageLayerGrouping {
|
|
|
27462
27664
|
this.originalUpdates.set(layer, original);
|
|
27463
27665
|
layer.updateLayer = (options) => {
|
|
27464
27666
|
this.excluded.add(layer);
|
|
27667
|
+
this.invalidateGroupsContaining(layer);
|
|
27465
27668
|
this.schedule();
|
|
27466
27669
|
return original.call(layer, options);
|
|
27467
27670
|
};
|
|
@@ -27528,7 +27731,6 @@ class NgwImageLayerGrouping {
|
|
|
27528
27731
|
/** Render-only IMAGE: exists on the native map, not in WebMap._layers. */
|
|
27529
27732
|
createNativeGroup(options) {
|
|
27530
27733
|
return __async$2(this, null, function* () {
|
|
27531
|
-
var _a;
|
|
27532
27734
|
const ImageAdapter = this.webMap.getLayerAdapter("IMAGE");
|
|
27533
27735
|
if (!ImageAdapter) throw new Error("IMAGE adapter is unavailable");
|
|
27534
27736
|
const adapter = new ImageAdapter(this.webMap.mapAdapter.map, options);
|
|
@@ -27537,13 +27739,6 @@ class NgwImageLayerGrouping {
|
|
|
27537
27739
|
if (native === void 0)
|
|
27538
27740
|
throw new Error("IMAGE adapter returned no layer");
|
|
27539
27741
|
adapter.layer = native;
|
|
27540
|
-
try {
|
|
27541
|
-
this.webMap.mapAdapter.showLayer(native);
|
|
27542
|
-
this.webMap.mapAdapter.setLayerOrder(native, (_a = options.order) != null ? _a : 0);
|
|
27543
|
-
} catch (error) {
|
|
27544
|
-
this.webMap.mapAdapter.removeLayer(native);
|
|
27545
|
-
throw error;
|
|
27546
|
-
}
|
|
27547
27742
|
return adapter;
|
|
27548
27743
|
});
|
|
27549
27744
|
}
|
|
@@ -27558,10 +27753,27 @@ class NgwImageLayerGrouping {
|
|
|
27558
27753
|
this.webMap.mapAdapter.removeLayer(adapter.layer);
|
|
27559
27754
|
}
|
|
27560
27755
|
}
|
|
27756
|
+
/** Remove obsolete composites and restore remaining native members immediately. */
|
|
27757
|
+
invalidateGroupsContaining(layer, skipRestore = false) {
|
|
27758
|
+
for (const [key, group] of this.groups) {
|
|
27759
|
+
if (!group.members.includes(layer)) continue;
|
|
27760
|
+
this.removeGroup(group);
|
|
27761
|
+
this.groups.delete(key);
|
|
27762
|
+
for (const member of group.members) {
|
|
27763
|
+
if (!this.suppressed.delete(member)) continue;
|
|
27764
|
+
if (member === layer && skipRestore) continue;
|
|
27765
|
+
if (this.isVisible(member) && member.layer !== void 0) {
|
|
27766
|
+
this.webMap.mapAdapter.showLayer(member.layer);
|
|
27767
|
+
this.webMap.mapAdapter.setLayerOrder(member.layer, member.order);
|
|
27768
|
+
}
|
|
27769
|
+
}
|
|
27770
|
+
}
|
|
27771
|
+
}
|
|
27561
27772
|
reconcile() {
|
|
27562
27773
|
return __async$2(this, null, function* () {
|
|
27563
|
-
var _a, _b;
|
|
27774
|
+
var _a, _b, _c;
|
|
27564
27775
|
if (this.disposed) return;
|
|
27776
|
+
const revision = this.revision;
|
|
27565
27777
|
const chunks = this.plan();
|
|
27566
27778
|
const desired = new Map(
|
|
27567
27779
|
chunks.map((chunk) => [
|
|
@@ -27619,10 +27831,21 @@ class NgwImageLayerGrouping {
|
|
|
27619
27831
|
visibility: true,
|
|
27620
27832
|
updateWmsParams: (params) => updateImageParams(params, resources)
|
|
27621
27833
|
});
|
|
27622
|
-
let layer;
|
|
27834
|
+
let layer = void 0;
|
|
27623
27835
|
try {
|
|
27624
27836
|
layer = yield this.createNativeGroup(options);
|
|
27837
|
+
if (this.disposed || this.revision !== revision) {
|
|
27838
|
+
this.removeGroup({ layer, members: [] });
|
|
27839
|
+
return;
|
|
27840
|
+
}
|
|
27841
|
+
if (layer.layer !== void 0) {
|
|
27842
|
+
this.webMap.mapAdapter.showLayer(layer.layer);
|
|
27843
|
+
this.webMap.mapAdapter.setLayerOrder(layer.layer, (_c = options.order) != null ? _c : 0);
|
|
27844
|
+
}
|
|
27625
27845
|
} catch (error) {
|
|
27846
|
+
if (layer) {
|
|
27847
|
+
this.removeGroup({ layer, members: [] });
|
|
27848
|
+
}
|
|
27626
27849
|
for (const { layer: member } of chunk) {
|
|
27627
27850
|
this.excluded.add(member);
|
|
27628
27851
|
if (this.suppressed.has(member)) {
|
|
@@ -27794,7 +28017,7 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
27794
28017
|
adapterOpts
|
|
27795
28018
|
);
|
|
27796
28019
|
const id = layer && this.getLayerId(layer);
|
|
27797
|
-
if (layer && id) {
|
|
28020
|
+
if (layer && id && this.getLayer(id) === layer) {
|
|
27798
28021
|
this._ngwLayers[id] = { layer, resourceId: layer.resourceId };
|
|
27799
28022
|
layer.options.name = layer.options.name || layer.item && layer.item.resource.display_name;
|
|
27800
28023
|
if (layer.options.baselayer) {
|
|
@@ -27847,43 +28070,44 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
27847
28070
|
}, options));
|
|
27848
28071
|
}
|
|
27849
28072
|
fetchIdentifyItem(identify, requestOptions) {
|
|
27850
|
-
|
|
27851
|
-
|
|
27852
|
-
|
|
27853
|
-
|
|
27854
|
-
|
|
27855
|
-
|
|
27856
|
-
|
|
27857
|
-
|
|
27858
|
-
|
|
27859
|
-
|
|
27860
|
-
|
|
27861
|
-
|
|
28073
|
+
return __async$1(this, null, function* () {
|
|
28074
|
+
const abortSignal = requestOptions == null ? void 0 : requestOptions.signal;
|
|
28075
|
+
if (abortSignal == null ? void 0 : abortSignal.aborted) throw new NgwConnectorExtended.errors.AbortError();
|
|
28076
|
+
const abortController = new AbortController();
|
|
28077
|
+
const onAbort = () => abortController.abort();
|
|
28078
|
+
abortSignal == null ? void 0 : abortSignal.addEventListener("abort", onAbort, { once: true });
|
|
28079
|
+
try {
|
|
28080
|
+
const promise = fetchIdentifyItem({
|
|
28081
|
+
identify,
|
|
28082
|
+
connector: this.connector,
|
|
28083
|
+
requestOptions: __spreadProps$1(__spreadValues$1({}, requestOptions), { signal: abortController.signal })
|
|
28084
|
+
});
|
|
28085
|
+
this._addPromise("identify", promise, abortController);
|
|
28086
|
+
return yield promise;
|
|
28087
|
+
} finally {
|
|
28088
|
+
abortSignal == null ? void 0 : abortSignal.removeEventListener("abort", onAbort);
|
|
28089
|
+
}
|
|
27862
28090
|
});
|
|
27863
|
-
this._addPromise("identify", promise, abortController);
|
|
27864
|
-
return promise;
|
|
27865
28091
|
}
|
|
27866
|
-
fetchIdentifyGeoJson(
|
|
27867
|
-
|
|
27868
|
-
|
|
27869
|
-
|
|
27870
|
-
|
|
28092
|
+
fetchIdentifyGeoJson(_0) {
|
|
28093
|
+
return __async$1(this, arguments, function* (identify, { multiple, signal } = {}) {
|
|
28094
|
+
if (signal == null ? void 0 : signal.aborted) throw new NgwConnectorExtended.errors.AbortError();
|
|
28095
|
+
const abortController = new AbortController();
|
|
28096
|
+
const onAbort = () => abortController.abort();
|
|
28097
|
+
signal == null ? void 0 : signal.addEventListener("abort", onAbort, { once: true });
|
|
28098
|
+
try {
|
|
28099
|
+
const promise = fetchIdentifyGeoJson({
|
|
28100
|
+
identify,
|
|
28101
|
+
connector: this.connector,
|
|
28102
|
+
multiple,
|
|
28103
|
+
requestOptions: { signal: abortController.signal }
|
|
28104
|
+
});
|
|
28105
|
+
this._addPromise("identify", promise, abortController);
|
|
28106
|
+
return yield promise;
|
|
28107
|
+
} finally {
|
|
28108
|
+
signal == null ? void 0 : signal.removeEventListener("abort", onAbort);
|
|
27871
28109
|
}
|
|
27872
|
-
signal.addEventListener("abort", () => {
|
|
27873
|
-
abortController.abort("AbortError");
|
|
27874
|
-
});
|
|
27875
|
-
}
|
|
27876
|
-
const promise = fetchIdentifyGeoJson({
|
|
27877
|
-
identify,
|
|
27878
|
-
connector: this.connector,
|
|
27879
|
-
requestOptions: { signal: abortController.signal }
|
|
27880
28110
|
});
|
|
27881
|
-
if (promise && "then" in promise) {
|
|
27882
|
-
this._addPromise("identify", promise, abortController);
|
|
27883
|
-
return promise;
|
|
27884
|
-
} else {
|
|
27885
|
-
return Promise.resolve(promise);
|
|
27886
|
-
}
|
|
27887
28111
|
}
|
|
27888
28112
|
/**
|
|
27889
28113
|
* @deprecated use {@link fetchIdentifyGeoJson} instead
|
|
@@ -27935,7 +28159,7 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
27935
28159
|
return __async$1(this, null, function* () {
|
|
27936
28160
|
let id;
|
|
27937
28161
|
if (typeof layerDef === "string" || typeof layerDef === "number") {
|
|
27938
|
-
id = String(
|
|
28162
|
+
id = String(layerDef);
|
|
27939
28163
|
} else {
|
|
27940
28164
|
id = layerDef.id;
|
|
27941
28165
|
}
|
|
@@ -27955,11 +28179,11 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
27955
28179
|
item = yield this.connector.getResource(resourceId);
|
|
27956
28180
|
}
|
|
27957
28181
|
if (item) {
|
|
27958
|
-
this.fitResource(item.resource.id);
|
|
28182
|
+
yield this.fitResource(item.resource.id);
|
|
27959
28183
|
}
|
|
27960
28184
|
}
|
|
27961
28185
|
} else {
|
|
27962
|
-
__superGet(_NgwMap.prototype, this, "fitLayer").call(
|
|
28186
|
+
yield __superGet(_NgwMap.prototype, this, "fitLayer").call(
|
|
27963
28187
|
this,
|
|
27964
28188
|
typeof layerDef === "number" ? String(layerDef) : layerDef,
|
|
27965
28189
|
options
|
|
@@ -27989,10 +28213,11 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
27989
28213
|
return super.onLoad(event);
|
|
27990
28214
|
}
|
|
27991
28215
|
removeLayer(layerDef) {
|
|
28216
|
+
var _a;
|
|
27992
28217
|
const layer = this.getLayer(layerDef);
|
|
27993
28218
|
if (layer) {
|
|
27994
28219
|
const layerId = this.getLayerId(layer);
|
|
27995
|
-
if (layerId) {
|
|
28220
|
+
if (layerId && ((_a = this._ngwLayers[layerId]) == null ? void 0 : _a.layer) === layer) {
|
|
27996
28221
|
delete this._ngwLayers[layerId];
|
|
27997
28222
|
}
|
|
27998
28223
|
super.removeLayer(layer);
|