@nextgis/ngw-leaflet 4.0.0-alpha.2 → 4.0.0-alpha.4
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 +1289 -1200
- 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 +1289 -1200
- 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.0.0-alpha.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 4.0.0-alpha.4; 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$1a = Object.defineProperty;
|
|
17
|
+
var __defProps$v = Object.defineProperties;
|
|
18
|
+
var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
|
|
19
|
+
var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
|
|
20
|
+
var __hasOwnProp$N = Object.prototype.hasOwnProperty;
|
|
21
|
+
var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
|
|
22
|
+
var __defNormalProp$1a = (obj, key, value) => key in obj ? __defProp$1a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23
|
+
var __spreadValues$M = (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$N.call(b, prop))
|
|
26
|
+
__defNormalProp$1a(a, prop, b[prop]);
|
|
27
|
+
if (__getOwnPropSymbols$N)
|
|
28
|
+
for (var prop of __getOwnPropSymbols$N(b)) {
|
|
29
|
+
if (__propIsEnum$N.call(b, prop))
|
|
30
|
+
__defNormalProp$1a(a, prop, b[prop]);
|
|
31
31
|
}
|
|
32
32
|
return a;
|
|
33
33
|
};
|
|
34
|
-
var __spreadProps$
|
|
34
|
+
var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
|
|
35
35
|
const controlOptions = /* @__PURE__ */ new WeakMap();
|
|
36
36
|
function resolveControlOptions(options = {}) {
|
|
37
37
|
var _a;
|
|
38
|
-
return __spreadProps$
|
|
38
|
+
return __spreadProps$v(__spreadValues$M({}, 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$2 = ".webmap-ctrl-bottom-left,.webmap-ctrl-bottom-right,.webmap-ctrl-left,.webmap-ctrl-right,.webmap-ctrl-top-left,.webmap-ctrl-top-right{pointer-events:none;position:absolute;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{left:0;top:0}.webmap-ctrl-top-right{right:0;top:0}.webmap-ctrl-bottom-left{bottom:0;left:0}.webmap-ctrl-bottom-right{bottom:0;right: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{background:#fff;border-radius:4px}.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{align-items:var(--webmap-ctrl-align,flex-start);flex-direction:column}.webmap-ctrl-horizontal{align-items:var(--webmap-ctrl-align,stretch);flex-direction:row}.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){background:#fff;border:2px solid rgba(0,0,0,.1);border-radius:4px;box-sizing:border-box;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:0!important;border-radius:0;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{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.webmap-ctrl-button{font-weight:400!important;line-height:inherit!important}.webmap-ctrl-group button+button{border-top:1px solid #ddd}.webmap-ctrl-group.webmap-ctrl-horizontal>button+button{border-left:1px solid #ddd;border-top:0}.webmap-ctrl-gapless .webmap-ctrl-group button+button,.webmap-ctrl-group.webmap-ctrl-gapless button+button{border-left:0!important;border-top: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{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@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 xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%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 xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%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 xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}";
|
|
77
77
|
styleInject(css_248z$2);
|
|
78
78
|
|
|
79
|
-
var __defProp$
|
|
80
|
-
var __defNormalProp$
|
|
81
|
-
var __publicField$
|
|
79
|
+
var __defProp$19 = Object.defineProperty;
|
|
80
|
+
var __defNormalProp$19 = (obj, key, value) => key in obj ? __defProp$19(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
81
|
+
var __publicField$M = (obj, key, value) => __defNormalProp$19(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$M(this, "classPrefix", "webmap");
|
|
85
|
+
__publicField$M(this, "addClass");
|
|
86
|
+
__publicField$M(this, "map");
|
|
87
|
+
__publicField$M(this, "wrapperClass");
|
|
88
|
+
__publicField$M(this, "ownsContainer");
|
|
89
|
+
__publicField$M(this, "_container");
|
|
90
|
+
__publicField$M(this, "_positionsContainers");
|
|
91
|
+
__publicField$M(this, "_targets", /* @__PURE__ */ new Set());
|
|
92
|
+
__publicField$M(this, "_idContainers", /* @__PURE__ */ new Map());
|
|
93
|
+
__publicField$M(this, "_pendingChildren", /* @__PURE__ */ new Map());
|
|
94
|
+
__publicField$M(this, "_orders", /* @__PURE__ */ new WeakMap());
|
|
95
|
+
__publicField$M(this, "_targetOptions", /* @__PURE__ */ new WeakMap());
|
|
96
|
+
__publicField$M(this, "_switchGroups", /* @__PURE__ */ new WeakMap());
|
|
97
|
+
__publicField$M(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$18 = Object.defineProperty;
|
|
14704
|
+
var __defProps$u = Object.defineProperties;
|
|
14705
|
+
var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
|
|
14706
|
+
var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
|
|
14707
|
+
var __hasOwnProp$M = Object.prototype.hasOwnProperty;
|
|
14708
|
+
var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
|
|
14709
|
+
var __defNormalProp$18 = (obj, key, value) => key in obj ? __defProp$18(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14710
|
+
var __spreadValues$L = (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$M.call(b, prop))
|
|
14713
|
+
__defNormalProp$18(a, prop, b[prop]);
|
|
14714
|
+
if (__getOwnPropSymbols$M)
|
|
14715
|
+
for (var prop of __getOwnPropSymbols$M(b)) {
|
|
14716
|
+
if (__propIsEnum$M.call(b, prop))
|
|
14717
|
+
__defNormalProp$18(a, prop, b[prop]);
|
|
14718
14718
|
}
|
|
14719
14719
|
return a;
|
|
14720
14720
|
};
|
|
14721
|
-
var __spreadProps$
|
|
14721
|
+
var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(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$u(__spreadValues$L({}, resolvedOptions), { addClass }),
|
|
14734
14734
|
map != null ? map : leafletMap
|
|
14735
14735
|
);
|
|
14736
14736
|
if (!resolvedOptions.margin) {
|
|
@@ -14777,32 +14777,32 @@ function createToggleControl$1(options, map) {
|
|
|
14777
14777
|
return control;
|
|
14778
14778
|
}
|
|
14779
14779
|
|
|
14780
|
-
var __defProp$
|
|
14781
|
-
var __defProps$
|
|
14782
|
-
var __getOwnPropDescs$
|
|
14783
|
-
var __getOwnPropSymbols$
|
|
14784
|
-
var __hasOwnProp$
|
|
14785
|
-
var __propIsEnum$
|
|
14786
|
-
var __defNormalProp$
|
|
14787
|
-
var __spreadValues$
|
|
14780
|
+
var __defProp$17 = Object.defineProperty;
|
|
14781
|
+
var __defProps$t = Object.defineProperties;
|
|
14782
|
+
var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
|
|
14783
|
+
var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
|
|
14784
|
+
var __hasOwnProp$L = Object.prototype.hasOwnProperty;
|
|
14785
|
+
var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
|
|
14786
|
+
var __defNormalProp$17 = (obj, key, value) => key in obj ? __defProp$17(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14787
|
+
var __spreadValues$K = (a, b) => {
|
|
14788
14788
|
for (var prop in b || (b = {}))
|
|
14789
|
-
if (__hasOwnProp$
|
|
14790
|
-
__defNormalProp$
|
|
14791
|
-
if (__getOwnPropSymbols$
|
|
14792
|
-
for (var prop of __getOwnPropSymbols$
|
|
14793
|
-
if (__propIsEnum$
|
|
14794
|
-
__defNormalProp$
|
|
14789
|
+
if (__hasOwnProp$L.call(b, prop))
|
|
14790
|
+
__defNormalProp$17(a, prop, b[prop]);
|
|
14791
|
+
if (__getOwnPropSymbols$L)
|
|
14792
|
+
for (var prop of __getOwnPropSymbols$L(b)) {
|
|
14793
|
+
if (__propIsEnum$L.call(b, prop))
|
|
14794
|
+
__defNormalProp$17(a, prop, b[prop]);
|
|
14795
14795
|
}
|
|
14796
14796
|
return a;
|
|
14797
14797
|
};
|
|
14798
|
-
var __spreadProps$
|
|
14799
|
-
var __publicField$
|
|
14798
|
+
var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
|
|
14799
|
+
var __publicField$L = (obj, key, value) => __defNormalProp$17(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14800
14800
|
class LeafletControlContainer {
|
|
14801
14801
|
constructor(map, options = {}) {
|
|
14802
|
-
__publicField$
|
|
14803
|
-
__publicField$
|
|
14804
|
-
__publicField$
|
|
14805
|
-
__publicField$
|
|
14802
|
+
__publicField$L(this, "map");
|
|
14803
|
+
__publicField$L(this, "controlContainer");
|
|
14804
|
+
__publicField$L(this, "targets", /* @__PURE__ */ new WeakMap());
|
|
14805
|
+
__publicField$L(this, "ids", /* @__PURE__ */ new WeakMap());
|
|
14806
14806
|
this.map = map;
|
|
14807
14807
|
this.controlContainer = this.createControlContainer(options);
|
|
14808
14808
|
this.controlContainer.addTo(map.getContainer());
|
|
@@ -14864,7 +14864,7 @@ class LeafletControlContainer {
|
|
|
14864
14864
|
const mapAny = this.map;
|
|
14865
14865
|
const controlCorners = mapAny._controlCorners || {};
|
|
14866
14866
|
const getCorner = (key, selector) => controlCorners[key] || this.map.getContainer().querySelector(selector) || void 0;
|
|
14867
|
-
return new ControlContainer(__spreadProps$
|
|
14867
|
+
return new ControlContainer(__spreadProps$t(__spreadValues$K({}, options), {
|
|
14868
14868
|
map: this.map,
|
|
14869
14869
|
container: mapAny._controlContainer,
|
|
14870
14870
|
positionContainers: {
|
|
@@ -15769,15 +15769,15 @@ function createFeaturePositionOptions(features) {
|
|
|
15769
15769
|
};
|
|
15770
15770
|
}
|
|
15771
15771
|
|
|
15772
|
-
var __defProp$
|
|
15773
|
-
var __defNormalProp$
|
|
15774
|
-
var __publicField$
|
|
15772
|
+
var __defProp$16 = Object.defineProperty;
|
|
15773
|
+
var __defNormalProp$16 = (obj, key, value) => key in obj ? __defProp$16(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15774
|
+
var __publicField$K = (obj, key, value) => __defNormalProp$16(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15775
15775
|
class BaseAdapter {
|
|
15776
15776
|
constructor(map, options) {
|
|
15777
15777
|
this.map = map;
|
|
15778
15778
|
this.options = options;
|
|
15779
|
-
__publicField$
|
|
15780
|
-
__publicField$
|
|
15779
|
+
__publicField$K(this, "layer");
|
|
15780
|
+
__publicField$K(this, "pane", "order-0");
|
|
15781
15781
|
if (options.order !== void 0) {
|
|
15782
15782
|
const pane = "order-" + options.order;
|
|
15783
15783
|
let exist = map.getPane(pane);
|
|
@@ -15806,19 +15806,19 @@ function convertMapClickEvent(evt) {
|
|
|
15806
15806
|
};
|
|
15807
15807
|
}
|
|
15808
15808
|
|
|
15809
|
-
var __defProp$
|
|
15810
|
-
var __getOwnPropSymbols$
|
|
15811
|
-
var __hasOwnProp$
|
|
15812
|
-
var __propIsEnum$
|
|
15813
|
-
var __defNormalProp$
|
|
15814
|
-
var __spreadValues$
|
|
15809
|
+
var __defProp$15 = Object.defineProperty;
|
|
15810
|
+
var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
|
|
15811
|
+
var __hasOwnProp$K = Object.prototype.hasOwnProperty;
|
|
15812
|
+
var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
|
|
15813
|
+
var __defNormalProp$15 = (obj, key, value) => key in obj ? __defProp$15(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15814
|
+
var __spreadValues$J = (a, b) => {
|
|
15815
15815
|
for (var prop in b || (b = {}))
|
|
15816
|
-
if (__hasOwnProp$
|
|
15817
|
-
__defNormalProp$
|
|
15818
|
-
if (__getOwnPropSymbols$
|
|
15819
|
-
for (var prop of __getOwnPropSymbols$
|
|
15820
|
-
if (__propIsEnum$
|
|
15821
|
-
__defNormalProp$
|
|
15816
|
+
if (__hasOwnProp$K.call(b, prop))
|
|
15817
|
+
__defNormalProp$15(a, prop, b[prop]);
|
|
15818
|
+
if (__getOwnPropSymbols$K)
|
|
15819
|
+
for (var prop of __getOwnPropSymbols$K(b)) {
|
|
15820
|
+
if (__propIsEnum$K.call(b, prop))
|
|
15821
|
+
__defNormalProp$15(a, prop, b[prop]);
|
|
15822
15822
|
}
|
|
15823
15823
|
return a;
|
|
15824
15824
|
};
|
|
@@ -15828,7 +15828,7 @@ function createMouseEvent({
|
|
|
15828
15828
|
}) {
|
|
15829
15829
|
const layer_ = source.target;
|
|
15830
15830
|
const feature = layer_.feature;
|
|
15831
|
-
const opt = __spreadValues$
|
|
15831
|
+
const opt = __spreadValues$J({
|
|
15832
15832
|
layer,
|
|
15833
15833
|
feature,
|
|
15834
15834
|
event: convertMapClickEvent(source),
|
|
@@ -15837,30 +15837,30 @@ function createMouseEvent({
|
|
|
15837
15837
|
return opt;
|
|
15838
15838
|
}
|
|
15839
15839
|
|
|
15840
|
-
var __defProp$
|
|
15841
|
-
var __getOwnPropSymbols$
|
|
15842
|
-
var __hasOwnProp$
|
|
15843
|
-
var __propIsEnum$
|
|
15844
|
-
var __defNormalProp$
|
|
15845
|
-
var __spreadValues$
|
|
15840
|
+
var __defProp$14 = Object.defineProperty;
|
|
15841
|
+
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
15842
|
+
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
15843
|
+
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
15844
|
+
var __defNormalProp$14 = (obj, key, value) => key in obj ? __defProp$14(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15845
|
+
var __spreadValues$I = (a, b) => {
|
|
15846
15846
|
for (var prop in b || (b = {}))
|
|
15847
|
-
if (__hasOwnProp$
|
|
15848
|
-
__defNormalProp$
|
|
15849
|
-
if (__getOwnPropSymbols$
|
|
15850
|
-
for (var prop of __getOwnPropSymbols$
|
|
15851
|
-
if (__propIsEnum$
|
|
15852
|
-
__defNormalProp$
|
|
15847
|
+
if (__hasOwnProp$J.call(b, prop))
|
|
15848
|
+
__defNormalProp$14(a, prop, b[prop]);
|
|
15849
|
+
if (__getOwnPropSymbols$J)
|
|
15850
|
+
for (var prop of __getOwnPropSymbols$J(b)) {
|
|
15851
|
+
if (__propIsEnum$J.call(b, prop))
|
|
15852
|
+
__defNormalProp$14(a, prop, b[prop]);
|
|
15853
15853
|
}
|
|
15854
15854
|
return a;
|
|
15855
15855
|
};
|
|
15856
|
-
var __publicField$
|
|
15856
|
+
var __publicField$J = (obj, key, value) => __defNormalProp$14(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15857
15857
|
class GeoJsonEvents {
|
|
15858
15858
|
constructor(layer) {
|
|
15859
|
-
__publicField$
|
|
15860
|
-
__publicField$
|
|
15861
|
-
__publicField$
|
|
15862
|
-
__publicField$
|
|
15863
|
-
__publicField$
|
|
15859
|
+
__publicField$J(this, "layer");
|
|
15860
|
+
__publicField$J(this, "_onclick");
|
|
15861
|
+
__publicField$J(this, "_ondblclick");
|
|
15862
|
+
__publicField$J(this, "_mouseout");
|
|
15863
|
+
__publicField$J(this, "_mouseover");
|
|
15864
15864
|
this.layer = layer;
|
|
15865
15865
|
}
|
|
15866
15866
|
handleMouseEvents(layer) {
|
|
@@ -15869,7 +15869,7 @@ class GeoJsonEvents {
|
|
|
15869
15869
|
if (onClick_) {
|
|
15870
15870
|
this._onclick = (e) => {
|
|
15871
15871
|
const selected = !!this.layer._getSelected(layer);
|
|
15872
|
-
onClick_(__spreadValues$
|
|
15872
|
+
onClick_(__spreadValues$I({
|
|
15873
15873
|
selected
|
|
15874
15874
|
}, this._createMouseEvent(e)));
|
|
15875
15875
|
};
|
|
@@ -15879,7 +15879,7 @@ class GeoJsonEvents {
|
|
|
15879
15879
|
this._ondblclick = (e) => {
|
|
15880
15880
|
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
15881
15881
|
const selected = !!this.layer._getSelected(layer);
|
|
15882
|
-
onDoubleClick(__spreadValues$
|
|
15882
|
+
onDoubleClick(__spreadValues$I({
|
|
15883
15883
|
selected
|
|
15884
15884
|
}, this._createMouseEvent(e)));
|
|
15885
15885
|
};
|
|
@@ -16538,19 +16538,19 @@ const typeExpressions = {
|
|
|
16538
16538
|
typeof: evaluateArgs(([arg]) => typeOfValue(arg))
|
|
16539
16539
|
};
|
|
16540
16540
|
|
|
16541
|
-
var __defProp$
|
|
16542
|
-
var __getOwnPropSymbols$
|
|
16543
|
-
var __hasOwnProp$
|
|
16544
|
-
var __propIsEnum$
|
|
16545
|
-
var __defNormalProp$
|
|
16546
|
-
var __spreadValues$
|
|
16541
|
+
var __defProp$13 = Object.defineProperty;
|
|
16542
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
16543
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
16544
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
16545
|
+
var __defNormalProp$13 = (obj, key, value) => key in obj ? __defProp$13(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16546
|
+
var __spreadValues$H = (a, b) => {
|
|
16547
16547
|
for (var prop in b || (b = {}))
|
|
16548
|
-
if (__hasOwnProp$
|
|
16549
|
-
__defNormalProp$
|
|
16550
|
-
if (__getOwnPropSymbols$
|
|
16551
|
-
for (var prop of __getOwnPropSymbols$
|
|
16552
|
-
if (__propIsEnum$
|
|
16553
|
-
__defNormalProp$
|
|
16548
|
+
if (__hasOwnProp$I.call(b, prop))
|
|
16549
|
+
__defNormalProp$13(a, prop, b[prop]);
|
|
16550
|
+
if (__getOwnPropSymbols$I)
|
|
16551
|
+
for (var prop of __getOwnPropSymbols$I(b)) {
|
|
16552
|
+
if (__propIsEnum$I.call(b, prop))
|
|
16553
|
+
__defNormalProp$13(a, prop, b[prop]);
|
|
16554
16554
|
}
|
|
16555
16555
|
return a;
|
|
16556
16556
|
};
|
|
@@ -16562,7 +16562,7 @@ function isExpression(value) {
|
|
|
16562
16562
|
}
|
|
16563
16563
|
return false;
|
|
16564
16564
|
}
|
|
16565
|
-
const expressions = __spreadValues$
|
|
16565
|
+
const expressions = __spreadValues$H(__spreadValues$H(__spreadValues$H(__spreadValues$H(__spreadValues$H(__spreadValues$H({}, mathExpressions), typeExpressions), stringExpressions), lookupExpressions), decisionExpressions), interpolationExpressions);
|
|
16566
16566
|
function evaluate(expression, data = {}) {
|
|
16567
16567
|
const [name, ...args] = expression;
|
|
16568
16568
|
const expressionFun = expressions[name];
|
|
@@ -16575,19 +16575,19 @@ function evaluate(expression, data = {}) {
|
|
|
16575
16575
|
throw new Error(`Expression "${name}" is not supported.`);
|
|
16576
16576
|
}
|
|
16577
16577
|
|
|
16578
|
-
var __defProp$
|
|
16579
|
-
var __getOwnPropSymbols$
|
|
16580
|
-
var __hasOwnProp$
|
|
16581
|
-
var __propIsEnum$
|
|
16582
|
-
var __defNormalProp$
|
|
16583
|
-
var __spreadValues$
|
|
16578
|
+
var __defProp$12 = Object.defineProperty;
|
|
16579
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
16580
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
16581
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
16582
|
+
var __defNormalProp$12 = (obj, key, value) => key in obj ? __defProp$12(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16583
|
+
var __spreadValues$G = (a, b) => {
|
|
16584
16584
|
for (var prop in b || (b = {}))
|
|
16585
|
-
if (__hasOwnProp$
|
|
16586
|
-
__defNormalProp$
|
|
16587
|
-
if (__getOwnPropSymbols$
|
|
16588
|
-
for (var prop of __getOwnPropSymbols$
|
|
16589
|
-
if (__propIsEnum$
|
|
16590
|
-
__defNormalProp$
|
|
16585
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
16586
|
+
__defNormalProp$12(a, prop, b[prop]);
|
|
16587
|
+
if (__getOwnPropSymbols$H)
|
|
16588
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
16589
|
+
if (__propIsEnum$H.call(b, prop))
|
|
16590
|
+
__defNormalProp$12(a, prop, b[prop]);
|
|
16591
16591
|
}
|
|
16592
16592
|
return a;
|
|
16593
16593
|
};
|
|
@@ -16620,25 +16620,25 @@ function createExpressionCallback(paint) {
|
|
|
16620
16620
|
for (const p in expressions) {
|
|
16621
16621
|
fromCb[p] = expressions[p](feature);
|
|
16622
16622
|
}
|
|
16623
|
-
return __spreadValues$
|
|
16623
|
+
return __spreadValues$G(__spreadValues$G({}, paint), fromCb);
|
|
16624
16624
|
};
|
|
16625
16625
|
}
|
|
16626
16626
|
return;
|
|
16627
16627
|
}
|
|
16628
16628
|
|
|
16629
|
-
var __defProp$
|
|
16630
|
-
var __getOwnPropSymbols$
|
|
16631
|
-
var __hasOwnProp$
|
|
16632
|
-
var __propIsEnum$
|
|
16633
|
-
var __defNormalProp$
|
|
16634
|
-
var __spreadValues$
|
|
16629
|
+
var __defProp$11 = Object.defineProperty;
|
|
16630
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
16631
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
16632
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
16633
|
+
var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16634
|
+
var __spreadValues$F = (a, b) => {
|
|
16635
16635
|
for (var prop in b || (b = {}))
|
|
16636
|
-
if (__hasOwnProp$
|
|
16637
|
-
__defNormalProp$
|
|
16638
|
-
if (__getOwnPropSymbols$
|
|
16639
|
-
for (var prop of __getOwnPropSymbols$
|
|
16640
|
-
if (__propIsEnum$
|
|
16641
|
-
__defNormalProp$
|
|
16636
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
16637
|
+
__defNormalProp$11(a, prop, b[prop]);
|
|
16638
|
+
if (__getOwnPropSymbols$G)
|
|
16639
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
16640
|
+
if (__propIsEnum$G.call(b, prop))
|
|
16641
|
+
__defNormalProp$11(a, prop, b[prop]);
|
|
16642
16642
|
}
|
|
16643
16643
|
return a;
|
|
16644
16644
|
};
|
|
@@ -16685,7 +16685,7 @@ function isPropertyFilter$1(filter) {
|
|
|
16685
16685
|
return false;
|
|
16686
16686
|
}
|
|
16687
16687
|
function featureFilter(feature, filters) {
|
|
16688
|
-
const properties = __spreadValues$
|
|
16688
|
+
const properties = __spreadValues$F({}, feature.properties);
|
|
16689
16689
|
if (properties) {
|
|
16690
16690
|
properties.$id = feature.id;
|
|
16691
16691
|
return propertiesFilter(properties, filters);
|
|
@@ -16739,19 +16739,19 @@ function isPaintCallback(paint) {
|
|
|
16739
16739
|
return false;
|
|
16740
16740
|
}
|
|
16741
16741
|
|
|
16742
|
-
var __defProp
|
|
16743
|
-
var __getOwnPropSymbols$
|
|
16744
|
-
var __hasOwnProp$
|
|
16745
|
-
var __propIsEnum$
|
|
16746
|
-
var __defNormalProp
|
|
16747
|
-
var __spreadValues$
|
|
16742
|
+
var __defProp$10 = Object.defineProperty;
|
|
16743
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
16744
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
16745
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
16746
|
+
var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16747
|
+
var __spreadValues$E = (a, b) => {
|
|
16748
16748
|
for (var prop in b || (b = {}))
|
|
16749
|
-
if (__hasOwnProp$
|
|
16750
|
-
__defNormalProp
|
|
16751
|
-
if (__getOwnPropSymbols$
|
|
16752
|
-
for (var prop of __getOwnPropSymbols$
|
|
16753
|
-
if (__propIsEnum$
|
|
16754
|
-
__defNormalProp
|
|
16749
|
+
if (__hasOwnProp$F.call(b, prop))
|
|
16750
|
+
__defNormalProp$10(a, prop, b[prop]);
|
|
16751
|
+
if (__getOwnPropSymbols$F)
|
|
16752
|
+
for (var prop of __getOwnPropSymbols$F(b)) {
|
|
16753
|
+
if (__propIsEnum$F.call(b, prop))
|
|
16754
|
+
__defNormalProp$10(a, prop, b[prop]);
|
|
16755
16755
|
}
|
|
16756
16756
|
return a;
|
|
16757
16757
|
};
|
|
@@ -16780,7 +16780,7 @@ function createPropertiesPaint(propertiesPaint) {
|
|
|
16780
16780
|
return (feature) => {
|
|
16781
16781
|
const paint = paintsFilters.find((x) => featureFilter(feature, x[0]));
|
|
16782
16782
|
if (paint) {
|
|
16783
|
-
return __spreadValues$
|
|
16783
|
+
return __spreadValues$E(__spreadValues$E({}, mask), paint[1]);
|
|
16784
16784
|
}
|
|
16785
16785
|
return mask;
|
|
16786
16786
|
};
|
|
@@ -16804,8 +16804,8 @@ function expressionCallback({
|
|
|
16804
16804
|
}
|
|
16805
16805
|
function finalizePaint({ paint, defaultPaint }) {
|
|
16806
16806
|
var _a;
|
|
16807
|
-
let newPaint = __spreadValues$
|
|
16808
|
-
newPaint = __spreadValues$
|
|
16807
|
+
let newPaint = __spreadValues$E({}, defaultPaint);
|
|
16808
|
+
newPaint = __spreadValues$E(__spreadValues$E({}, newPaint), paint);
|
|
16809
16809
|
newPaint.fill = (_a = newPaint.fill) != null ? _a : true;
|
|
16810
16810
|
newPaint.stroke = newPaint.stroke !== void 0 ? newPaint.stroke : !newPaint.fill || !!(newPaint.strokeColor || newPaint.strokeOpacity);
|
|
16811
16811
|
return newPaint;
|
|
@@ -16818,7 +16818,7 @@ function preparePaint({
|
|
|
16818
16818
|
if (!paint) {
|
|
16819
16819
|
throw new Error("paint is empty");
|
|
16820
16820
|
}
|
|
16821
|
-
let newPaint = __spreadValues$
|
|
16821
|
+
let newPaint = __spreadValues$E({}, defaultPaint);
|
|
16822
16822
|
if (isPaintCallback(paint)) {
|
|
16823
16823
|
const getPaintFunction = (feature) => {
|
|
16824
16824
|
const getPaint = preparePaint({
|
|
@@ -16875,41 +16875,41 @@ function preparePaint({
|
|
|
16875
16875
|
return newPaint;
|
|
16876
16876
|
}
|
|
16877
16877
|
|
|
16878
|
-
var __defProp
|
|
16879
|
-
var __defProps$
|
|
16880
|
-
var __getOwnPropDescs$
|
|
16881
|
-
var __getOwnPropSymbols$
|
|
16882
|
-
var __hasOwnProp$
|
|
16883
|
-
var __propIsEnum$
|
|
16884
|
-
var __defNormalProp
|
|
16885
|
-
var __spreadValues$
|
|
16878
|
+
var __defProp$$ = Object.defineProperty;
|
|
16879
|
+
var __defProps$s = Object.defineProperties;
|
|
16880
|
+
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
16881
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
16882
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
16883
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
16884
|
+
var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16885
|
+
var __spreadValues$D = (a, b) => {
|
|
16886
16886
|
for (var prop in b || (b = {}))
|
|
16887
|
-
if (__hasOwnProp$
|
|
16888
|
-
__defNormalProp
|
|
16889
|
-
if (__getOwnPropSymbols$
|
|
16890
|
-
for (var prop of __getOwnPropSymbols$
|
|
16891
|
-
if (__propIsEnum$
|
|
16892
|
-
__defNormalProp
|
|
16887
|
+
if (__hasOwnProp$E.call(b, prop))
|
|
16888
|
+
__defNormalProp$$(a, prop, b[prop]);
|
|
16889
|
+
if (__getOwnPropSymbols$E)
|
|
16890
|
+
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
16891
|
+
if (__propIsEnum$E.call(b, prop))
|
|
16892
|
+
__defNormalProp$$(a, prop, b[prop]);
|
|
16893
16893
|
}
|
|
16894
16894
|
return a;
|
|
16895
16895
|
};
|
|
16896
|
-
var __spreadProps$
|
|
16896
|
+
var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
|
|
16897
16897
|
var __objRest$a = (source, exclude) => {
|
|
16898
16898
|
var target = {};
|
|
16899
16899
|
for (var prop in source)
|
|
16900
|
-
if (__hasOwnProp$
|
|
16900
|
+
if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16901
16901
|
target[prop] = source[prop];
|
|
16902
|
-
if (source != null && __getOwnPropSymbols$
|
|
16903
|
-
for (var prop of __getOwnPropSymbols$
|
|
16904
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16902
|
+
if (source != null && __getOwnPropSymbols$E)
|
|
16903
|
+
for (var prop of __getOwnPropSymbols$E(source)) {
|
|
16904
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
|
|
16905
16905
|
target[prop] = source[prop];
|
|
16906
16906
|
}
|
|
16907
16907
|
return target;
|
|
16908
16908
|
};
|
|
16909
|
-
var __publicField$
|
|
16909
|
+
var __publicField$I = (obj, key, value) => __defNormalProp$$(obj, key + "" , value);
|
|
16910
16910
|
class GeoJsonPaint {
|
|
16911
16911
|
constructor(layer) {
|
|
16912
|
-
__publicField$
|
|
16912
|
+
__publicField$I(this, "layer");
|
|
16913
16913
|
this.layer = layer;
|
|
16914
16914
|
}
|
|
16915
16915
|
setPaintEachLayer(paint) {
|
|
@@ -16988,7 +16988,7 @@ class GeoJsonPaint {
|
|
|
16988
16988
|
if (html) {
|
|
16989
16989
|
element.innerHTML = html;
|
|
16990
16990
|
}
|
|
16991
|
-
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$
|
|
16991
|
+
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$s(__spreadValues$D({
|
|
16992
16992
|
className: ""
|
|
16993
16993
|
}, toLIconOpt), {
|
|
16994
16994
|
html: element
|
|
@@ -17014,7 +17014,7 @@ class GeoJsonPaint {
|
|
|
17014
17014
|
}
|
|
17015
17015
|
return (_, latlng) => {
|
|
17016
17016
|
const p = PAINT;
|
|
17017
|
-
return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$
|
|
17017
|
+
return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$D(__spreadValues$D({}, p), icon)));
|
|
17018
17018
|
};
|
|
17019
17019
|
}
|
|
17020
17020
|
createPaintOptions(paint) {
|
|
@@ -17036,27 +17036,27 @@ class GeoJsonPaint {
|
|
|
17036
17036
|
}
|
|
17037
17037
|
}
|
|
17038
17038
|
|
|
17039
|
-
var __defProp$
|
|
17040
|
-
var __defProps$
|
|
17041
|
-
var __getOwnPropDescs$
|
|
17042
|
-
var __getOwnPropSymbols$
|
|
17043
|
-
var __hasOwnProp$
|
|
17044
|
-
var __propIsEnum$
|
|
17045
|
-
var __defNormalProp$
|
|
17046
|
-
var __spreadValues$
|
|
17039
|
+
var __defProp$_ = Object.defineProperty;
|
|
17040
|
+
var __defProps$r = Object.defineProperties;
|
|
17041
|
+
var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
|
|
17042
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
17043
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
17044
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
17045
|
+
var __defNormalProp$_ = (obj, key, value) => key in obj ? __defProp$_(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17046
|
+
var __spreadValues$C = (a, b) => {
|
|
17047
17047
|
for (var prop in b || (b = {}))
|
|
17048
|
-
if (__hasOwnProp$
|
|
17049
|
-
__defNormalProp$
|
|
17050
|
-
if (__getOwnPropSymbols$
|
|
17051
|
-
for (var prop of __getOwnPropSymbols$
|
|
17052
|
-
if (__propIsEnum$
|
|
17053
|
-
__defNormalProp$
|
|
17048
|
+
if (__hasOwnProp$D.call(b, prop))
|
|
17049
|
+
__defNormalProp$_(a, prop, b[prop]);
|
|
17050
|
+
if (__getOwnPropSymbols$D)
|
|
17051
|
+
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
17052
|
+
if (__propIsEnum$D.call(b, prop))
|
|
17053
|
+
__defNormalProp$_(a, prop, b[prop]);
|
|
17054
17054
|
}
|
|
17055
17055
|
return a;
|
|
17056
17056
|
};
|
|
17057
|
-
var __spreadProps$
|
|
17058
|
-
var __publicField$
|
|
17059
|
-
var __async$
|
|
17057
|
+
var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
|
|
17058
|
+
var __publicField$H = (obj, key, value) => __defNormalProp$_(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17059
|
+
var __async$x = (__this, __arguments, generator) => {
|
|
17060
17060
|
return new Promise((resolve, reject) => {
|
|
17061
17061
|
var fulfilled = (value) => {
|
|
17062
17062
|
try {
|
|
@@ -17079,22 +17079,22 @@ var __async$w = (__this, __arguments, generator) => {
|
|
|
17079
17079
|
class GeoJsonAdapter extends BaseAdapter {
|
|
17080
17080
|
constructor(map, options) {
|
|
17081
17081
|
super(map, options);
|
|
17082
|
-
__publicField$
|
|
17083
|
-
__publicField$
|
|
17084
|
-
__publicField$
|
|
17085
|
-
__publicField$
|
|
17086
|
-
__publicField$
|
|
17087
|
-
__publicField$
|
|
17088
|
-
__publicField$
|
|
17089
|
-
__publicField$
|
|
17090
|
-
__publicField$
|
|
17091
|
-
__publicField$
|
|
17092
|
-
__publicField$
|
|
17093
|
-
__publicField$
|
|
17094
|
-
__publicField$
|
|
17082
|
+
__publicField$H(this, "layer");
|
|
17083
|
+
__publicField$H(this, "selected", false);
|
|
17084
|
+
__publicField$H(this, "type");
|
|
17085
|
+
__publicField$H(this, "_layers", []);
|
|
17086
|
+
__publicField$H(this, "_events");
|
|
17087
|
+
__publicField$H(this, "paint");
|
|
17088
|
+
__publicField$H(this, "selectedPaint");
|
|
17089
|
+
__publicField$H(this, "_selectedLayers", []);
|
|
17090
|
+
__publicField$H(this, "_filteredLayers", []);
|
|
17091
|
+
__publicField$H(this, "_filterFun");
|
|
17092
|
+
__publicField$H(this, "_openedPopup", []);
|
|
17093
|
+
__publicField$H(this, "_paint");
|
|
17094
|
+
__publicField$H(this, "$updateTooltip", debounce(() => {
|
|
17095
17095
|
this.updateTooltip();
|
|
17096
17096
|
}, 300));
|
|
17097
|
-
__publicField$
|
|
17097
|
+
__publicField$H(this, "$unselect", () => {
|
|
17098
17098
|
this.unselect();
|
|
17099
17099
|
});
|
|
17100
17100
|
this._events = new GeoJsonEvents(this);
|
|
@@ -17103,7 +17103,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17103
17103
|
addLayer(options) {
|
|
17104
17104
|
Object.assign(this.options, options);
|
|
17105
17105
|
this.paint = options.paint;
|
|
17106
|
-
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$
|
|
17106
|
+
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$r(__spreadValues$C({}, options.nativeOptions), {
|
|
17107
17107
|
pane: this.pane
|
|
17108
17108
|
}));
|
|
17109
17109
|
this.selectedPaint = options.selectedPaint;
|
|
@@ -17152,7 +17152,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17152
17152
|
}
|
|
17153
17153
|
getSelected() {
|
|
17154
17154
|
return this._selectedLayers.map((x) => {
|
|
17155
|
-
return __spreadValues$
|
|
17155
|
+
return __spreadValues$C({
|
|
17156
17156
|
target: this,
|
|
17157
17157
|
feature: x.feature,
|
|
17158
17158
|
layer: x
|
|
@@ -17171,14 +17171,14 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17171
17171
|
const filteredLayers = [];
|
|
17172
17172
|
this._layers.forEach(({ feature, layer }) => {
|
|
17173
17173
|
if (layer) {
|
|
17174
|
-
const ok = fun ? fun(__spreadValues$
|
|
17174
|
+
const ok = fun ? fun(__spreadValues$C({
|
|
17175
17175
|
target: this,
|
|
17176
17176
|
feature,
|
|
17177
17177
|
layer
|
|
17178
17178
|
}, createFeaturePositionOptions(feature))) : true;
|
|
17179
17179
|
if (ok) {
|
|
17180
17180
|
layer_.addLayer(layer);
|
|
17181
|
-
filteredLayers.push(__spreadValues$
|
|
17181
|
+
filteredLayers.push(__spreadValues$C({
|
|
17182
17182
|
target: this,
|
|
17183
17183
|
feature,
|
|
17184
17184
|
layer
|
|
@@ -17199,7 +17199,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17199
17199
|
getLayers() {
|
|
17200
17200
|
return this._layers.map(({ layer, feature }) => {
|
|
17201
17201
|
const visible = layer && !!layer._map;
|
|
17202
|
-
return __spreadValues$
|
|
17202
|
+
return __spreadValues$C({
|
|
17203
17203
|
feature,
|
|
17204
17204
|
layer,
|
|
17205
17205
|
visible,
|
|
@@ -17317,13 +17317,13 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17317
17317
|
}
|
|
17318
17318
|
}
|
|
17319
17319
|
updatePaint(paint) {
|
|
17320
|
-
this.paint = __spreadValues$
|
|
17320
|
+
this.paint = __spreadValues$C(__spreadValues$C({}, this.paint), paint);
|
|
17321
17321
|
for (const l of this._layers) {
|
|
17322
17322
|
this._paint.setPaint(l, this.paint);
|
|
17323
17323
|
}
|
|
17324
17324
|
}
|
|
17325
17325
|
updateSelectedPaint(paint) {
|
|
17326
|
-
this.selectedPaint = __spreadValues$
|
|
17326
|
+
this.selectedPaint = __spreadValues$C(__spreadValues$C({}, this.selectedPaint), paint);
|
|
17327
17327
|
for (const l of this._selectedLayers) {
|
|
17328
17328
|
this._paint.setPaint(l, this.selectedPaint);
|
|
17329
17329
|
}
|
|
@@ -17340,7 +17340,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17340
17340
|
if (feature.properties && labelField) {
|
|
17341
17341
|
message = feature.properties[labelField];
|
|
17342
17342
|
} else if (label) {
|
|
17343
|
-
message = label(__spreadValues$
|
|
17343
|
+
message = label(__spreadValues$C(__spreadValues$C({
|
|
17344
17344
|
target: this
|
|
17345
17345
|
}, layerDef), createFeaturePositionOptions(feature)));
|
|
17346
17346
|
}
|
|
@@ -17351,7 +17351,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17351
17351
|
}
|
|
17352
17352
|
}
|
|
17353
17353
|
_openPopup(_0) {
|
|
17354
|
-
return __async$
|
|
17354
|
+
return __async$x(this, arguments, function* (def, options = {}, type, latLng) {
|
|
17355
17355
|
var _a, _b;
|
|
17356
17356
|
const { feature, layer } = def;
|
|
17357
17357
|
const {
|
|
@@ -17359,7 +17359,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17359
17359
|
autoPan,
|
|
17360
17360
|
maxWidth,
|
|
17361
17361
|
closeButton: closeButton_
|
|
17362
|
-
} = __spreadValues$
|
|
17362
|
+
} = __spreadValues$C({
|
|
17363
17363
|
minWidth: 300
|
|
17364
17364
|
}, options);
|
|
17365
17365
|
const closeButton = closeButton_ != null ? closeButton_ : !this.options.selectOnHover;
|
|
@@ -17375,7 +17375,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17375
17375
|
};
|
|
17376
17376
|
let content;
|
|
17377
17377
|
if (options.createPopupContent) {
|
|
17378
|
-
content = yield options.createPopupContent(__spreadValues$
|
|
17378
|
+
content = yield options.createPopupContent(__spreadValues$C({
|
|
17379
17379
|
layer,
|
|
17380
17380
|
feature,
|
|
17381
17381
|
target: this,
|
|
@@ -17453,9 +17453,9 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17453
17453
|
lopt = {
|
|
17454
17454
|
style: (feature) => {
|
|
17455
17455
|
if (feature) {
|
|
17456
|
-
return this._paint.preparePaint(__spreadValues$
|
|
17456
|
+
return this._paint.preparePaint(__spreadValues$C(__spreadValues$C({}, PAINT), paint(feature)));
|
|
17457
17457
|
} else {
|
|
17458
|
-
return this._paint.preparePaint(__spreadProps$
|
|
17458
|
+
return this._paint.preparePaint(__spreadProps$r(__spreadValues$C({}, PAINT), { type: "path" }));
|
|
17459
17459
|
}
|
|
17460
17460
|
}
|
|
17461
17461
|
};
|
|
@@ -17471,7 +17471,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17471
17471
|
_onEachFeature(feature, layer) {
|
|
17472
17472
|
const layer_ = this.layer;
|
|
17473
17473
|
if (layer_) {
|
|
17474
|
-
const def = __spreadValues$
|
|
17474
|
+
const def = __spreadValues$C({
|
|
17475
17475
|
target: this,
|
|
17476
17476
|
feature,
|
|
17477
17477
|
layer
|
|
@@ -17506,7 +17506,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17506
17506
|
setTimeout(() => {
|
|
17507
17507
|
if (popup) {
|
|
17508
17508
|
this._openPopup(
|
|
17509
|
-
__spreadValues$
|
|
17509
|
+
__spreadValues$C({
|
|
17510
17510
|
target: this,
|
|
17511
17511
|
layer,
|
|
17512
17512
|
feature
|
|
@@ -17524,7 +17524,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17524
17524
|
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
17525
17525
|
const layer = e.target;
|
|
17526
17526
|
const feature = layer.feature;
|
|
17527
|
-
const def = __spreadValues$
|
|
17527
|
+
const def = __spreadValues$C({
|
|
17528
17528
|
target: this,
|
|
17529
17529
|
layer,
|
|
17530
17530
|
feature
|
|
@@ -17557,7 +17557,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
17557
17557
|
}
|
|
17558
17558
|
if (this.options.onSelect) {
|
|
17559
17559
|
const features = def.feature ? [def.feature] : [];
|
|
17560
|
-
this.options.onSelect(__spreadValues$
|
|
17560
|
+
this.options.onSelect(__spreadValues$C({
|
|
17561
17561
|
type,
|
|
17562
17562
|
layer: this,
|
|
17563
17563
|
features
|
|
@@ -17746,19 +17746,19 @@ function createToggleControl(createButtonControl, options) {
|
|
|
17746
17746
|
return buttonControl;
|
|
17747
17747
|
}
|
|
17748
17748
|
|
|
17749
|
-
var __defProp$
|
|
17750
|
-
var __getOwnPropSymbols$
|
|
17751
|
-
var __hasOwnProp$
|
|
17752
|
-
var __propIsEnum$
|
|
17753
|
-
var __defNormalProp$
|
|
17754
|
-
var __spreadValues$
|
|
17749
|
+
var __defProp$Z = Object.defineProperty;
|
|
17750
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
17751
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
17752
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
17753
|
+
var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17754
|
+
var __spreadValues$B = (a, b) => {
|
|
17755
17755
|
for (var prop in b || (b = {}))
|
|
17756
|
-
if (__hasOwnProp$
|
|
17757
|
-
__defNormalProp$
|
|
17758
|
-
if (__getOwnPropSymbols$
|
|
17759
|
-
for (var prop of __getOwnPropSymbols$
|
|
17760
|
-
if (__propIsEnum$
|
|
17761
|
-
__defNormalProp$
|
|
17756
|
+
if (__hasOwnProp$C.call(b, prop))
|
|
17757
|
+
__defNormalProp$Z(a, prop, b[prop]);
|
|
17758
|
+
if (__getOwnPropSymbols$C)
|
|
17759
|
+
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
17760
|
+
if (__propIsEnum$C.call(b, prop))
|
|
17761
|
+
__defNormalProp$Z(a, prop, b[prop]);
|
|
17762
17762
|
}
|
|
17763
17763
|
return a;
|
|
17764
17764
|
};
|
|
@@ -17769,12 +17769,12 @@ function normalizeLayerRequestOptions(request) {
|
|
|
17769
17769
|
if (!request) {
|
|
17770
17770
|
return void 0;
|
|
17771
17771
|
}
|
|
17772
|
-
const normalized = __spreadValues$
|
|
17772
|
+
const normalized = __spreadValues$B({}, request);
|
|
17773
17773
|
return hasLayerRequestOptions(normalized) ? normalized : void 0;
|
|
17774
17774
|
}
|
|
17775
17775
|
function getLayerRequestOptions(options) {
|
|
17776
17776
|
const request = options == null ? void 0 : options.request;
|
|
17777
|
-
const headers = __spreadValues$
|
|
17777
|
+
const headers = __spreadValues$B(__spreadValues$B({}, (options == null ? void 0 : options.headers) || {}), (request == null ? void 0 : request.headers) || {});
|
|
17778
17778
|
const result = {};
|
|
17779
17779
|
if (hasHeaders(headers)) {
|
|
17780
17780
|
result.headers = headers;
|
|
@@ -17853,95 +17853,95 @@ function updateGeoJsonAdapterOptions(opt) {
|
|
|
17853
17853
|
return opt;
|
|
17854
17854
|
}
|
|
17855
17855
|
|
|
17856
|
-
var __defProp$
|
|
17857
|
-
var __defNormalProp$
|
|
17858
|
-
var __publicField$
|
|
17856
|
+
var __defProp$Y = Object.defineProperty;
|
|
17857
|
+
var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17858
|
+
var __publicField$G = (obj, key, value) => __defNormalProp$Y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17859
17859
|
class KeyCodes {
|
|
17860
17860
|
constructor() {
|
|
17861
|
-
__publicField$
|
|
17862
|
-
__publicField$
|
|
17863
|
-
__publicField$
|
|
17864
|
-
__publicField$
|
|
17865
|
-
__publicField$
|
|
17866
|
-
__publicField$
|
|
17867
|
-
__publicField$
|
|
17868
|
-
__publicField$
|
|
17869
|
-
__publicField$
|
|
17870
|
-
__publicField$
|
|
17871
|
-
__publicField$
|
|
17872
|
-
__publicField$
|
|
17873
|
-
__publicField$
|
|
17874
|
-
__publicField$
|
|
17875
|
-
__publicField$
|
|
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$
|
|
17861
|
+
__publicField$G(this, "backspace", 8);
|
|
17862
|
+
__publicField$G(this, "tab", 9);
|
|
17863
|
+
__publicField$G(this, "enter", 13);
|
|
17864
|
+
__publicField$G(this, "shift", 16);
|
|
17865
|
+
__publicField$G(this, "ctrl", 17);
|
|
17866
|
+
__publicField$G(this, "alt", 18);
|
|
17867
|
+
__publicField$G(this, "pause/break", 19);
|
|
17868
|
+
__publicField$G(this, "caps_lock", 20);
|
|
17869
|
+
__publicField$G(this, "escape", 27);
|
|
17870
|
+
__publicField$G(this, "page_up", 33);
|
|
17871
|
+
__publicField$G(this, "page_down", 34);
|
|
17872
|
+
__publicField$G(this, "end", 35);
|
|
17873
|
+
__publicField$G(this, "home", 36);
|
|
17874
|
+
__publicField$G(this, "left_arrow", 37);
|
|
17875
|
+
__publicField$G(this, "up_arrow", 38);
|
|
17876
|
+
__publicField$G(this, "right_arrow", 39);
|
|
17877
|
+
__publicField$G(this, "down_arrow", 40);
|
|
17878
|
+
__publicField$G(this, "insert", 45);
|
|
17879
|
+
__publicField$G(this, "delete", 46);
|
|
17880
|
+
__publicField$G(this, "left_window_key", 91);
|
|
17881
|
+
__publicField$G(this, "right_window_key", 92);
|
|
17882
|
+
__publicField$G(this, "select_key", 93);
|
|
17883
|
+
__publicField$G(this, "numpad_0", 96);
|
|
17884
|
+
__publicField$G(this, "numpad_1", 97);
|
|
17885
|
+
__publicField$G(this, "numpad_2", 98);
|
|
17886
|
+
__publicField$G(this, "numpad_3", 99);
|
|
17887
|
+
__publicField$G(this, "numpad_4", 100);
|
|
17888
|
+
__publicField$G(this, "numpad_5", 101);
|
|
17889
|
+
__publicField$G(this, "numpad_6", 102);
|
|
17890
|
+
__publicField$G(this, "numpad_7", 103);
|
|
17891
|
+
__publicField$G(this, "numpad_8", 104);
|
|
17892
|
+
__publicField$G(this, "numpad_9", 105);
|
|
17893
|
+
__publicField$G(this, "multiply", 106);
|
|
17894
|
+
__publicField$G(this, "add", 107);
|
|
17895
|
+
__publicField$G(this, "subtract", 109);
|
|
17896
|
+
__publicField$G(this, "decimal_point", 110);
|
|
17897
|
+
__publicField$G(this, "divide", 111);
|
|
17898
|
+
__publicField$G(this, "f1", 112);
|
|
17899
|
+
__publicField$G(this, "f2", 113);
|
|
17900
|
+
__publicField$G(this, "f3", 114);
|
|
17901
|
+
__publicField$G(this, "f4", 115);
|
|
17902
|
+
__publicField$G(this, "f5", 116);
|
|
17903
|
+
__publicField$G(this, "f6", 117);
|
|
17904
|
+
__publicField$G(this, "f7", 118);
|
|
17905
|
+
__publicField$G(this, "f8", 119);
|
|
17906
|
+
__publicField$G(this, "f9", 120);
|
|
17907
|
+
__publicField$G(this, "f10", 121);
|
|
17908
|
+
__publicField$G(this, "f11", 122);
|
|
17909
|
+
__publicField$G(this, "f12", 123);
|
|
17910
|
+
__publicField$G(this, "num_lock", 144);
|
|
17911
|
+
__publicField$G(this, "scroll_lock", 145);
|
|
17912
|
+
__publicField$G(this, "semi-colon", 186);
|
|
17913
|
+
__publicField$G(this, "equal_sign", 187);
|
|
17914
|
+
__publicField$G(this, ",", 188);
|
|
17915
17915
|
// "comma";
|
|
17916
|
-
__publicField$
|
|
17916
|
+
__publicField$G(this, "-", 189);
|
|
17917
17917
|
// "dash";
|
|
17918
|
-
__publicField$
|
|
17918
|
+
__publicField$G(this, ".", 190);
|
|
17919
17919
|
// "period";
|
|
17920
|
-
__publicField$
|
|
17920
|
+
__publicField$G(this, "/", 191);
|
|
17921
17921
|
// "forward slash";
|
|
17922
|
-
__publicField$
|
|
17922
|
+
__publicField$G(this, "`", 192);
|
|
17923
17923
|
// "grave accent";
|
|
17924
|
-
__publicField$
|
|
17924
|
+
__publicField$G(this, "[", 219);
|
|
17925
17925
|
// "open bracket";
|
|
17926
|
-
__publicField$
|
|
17926
|
+
__publicField$G(this, "\\", 220);
|
|
17927
17927
|
// "back slash";
|
|
17928
|
-
__publicField$
|
|
17928
|
+
__publicField$G(this, "]", 221);
|
|
17929
17929
|
// "close braket";
|
|
17930
|
-
__publicField$
|
|
17930
|
+
__publicField$G(this, "'", 222);
|
|
17931
17931
|
}
|
|
17932
17932
|
// "single quote"
|
|
17933
17933
|
}
|
|
17934
17934
|
|
|
17935
|
-
var __defProp$
|
|
17936
|
-
var __defNormalProp$
|
|
17937
|
-
var __publicField$
|
|
17935
|
+
var __defProp$X = Object.defineProperty;
|
|
17936
|
+
var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17937
|
+
var __publicField$F = (obj, key, value) => __defNormalProp$X(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17938
17938
|
class Keys {
|
|
17939
17939
|
constructor() {
|
|
17940
|
-
__publicField$
|
|
17941
|
-
__publicField$
|
|
17942
|
-
__publicField$
|
|
17943
|
-
__publicField$
|
|
17944
|
-
__publicField$
|
|
17940
|
+
__publicField$F(this, "keyCodeAlias", new KeyCodes());
|
|
17941
|
+
__publicField$F(this, "keys", {});
|
|
17942
|
+
__publicField$F(this, "_windowOnFocus");
|
|
17943
|
+
__publicField$F(this, "_keysPressed");
|
|
17944
|
+
__publicField$F(this, "_keysReleased");
|
|
17945
17945
|
this._windowOnFocus = this.windowOnFocus.bind(this);
|
|
17946
17946
|
this._keysPressed = this.keysPressed.bind(this);
|
|
17947
17947
|
this._keysReleased = this.keysReleased.bind(this);
|
|
@@ -17980,15 +17980,15 @@ class Keys {
|
|
|
17980
17980
|
}
|
|
17981
17981
|
}
|
|
17982
17982
|
|
|
17983
|
-
var __defProp$
|
|
17984
|
-
var __defNormalProp$
|
|
17985
|
-
var __publicField$
|
|
17983
|
+
var __defProp$W = Object.defineProperty;
|
|
17984
|
+
var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17985
|
+
var __publicField$E = (obj, key, value) => __defNormalProp$W(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17986
17986
|
class StateItem {
|
|
17987
17987
|
constructor(webMap, opt) {
|
|
17988
17988
|
this.webMap = webMap;
|
|
17989
|
-
__publicField$
|
|
17990
|
-
__publicField$
|
|
17991
|
-
__publicField$
|
|
17989
|
+
__publicField$E(this, "name");
|
|
17990
|
+
__publicField$E(this, "event");
|
|
17991
|
+
__publicField$E(this, "value");
|
|
17992
17992
|
if (opt) {
|
|
17993
17993
|
if (opt.value) {
|
|
17994
17994
|
this.setValue(opt.value);
|
|
@@ -18013,14 +18013,14 @@ class StateItem {
|
|
|
18013
18013
|
}
|
|
18014
18014
|
}
|
|
18015
18015
|
|
|
18016
|
-
var __defProp$
|
|
18017
|
-
var __defNormalProp$
|
|
18018
|
-
var __publicField$
|
|
18016
|
+
var __defProp$V = Object.defineProperty;
|
|
18017
|
+
var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18018
|
+
var __publicField$D = (obj, key, value) => __defNormalProp$V(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18019
18019
|
class BoundState extends StateItem {
|
|
18020
18020
|
constructor() {
|
|
18021
18021
|
super(...arguments);
|
|
18022
|
-
__publicField$
|
|
18023
|
-
__publicField$
|
|
18022
|
+
__publicField$D(this, "name", "bounds");
|
|
18023
|
+
__publicField$D(this, "event", ["moveend"]);
|
|
18024
18024
|
}
|
|
18025
18025
|
getValue() {
|
|
18026
18026
|
return this.webMap.getBounds();
|
|
@@ -18041,14 +18041,14 @@ class BoundState extends StateItem {
|
|
|
18041
18041
|
}
|
|
18042
18042
|
}
|
|
18043
18043
|
|
|
18044
|
-
var __defProp$
|
|
18045
|
-
var __defNormalProp$
|
|
18046
|
-
var __publicField$
|
|
18044
|
+
var __defProp$U = Object.defineProperty;
|
|
18045
|
+
var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18046
|
+
var __publicField$C = (obj, key, value) => __defNormalProp$U(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18047
18047
|
class CenterState extends StateItem {
|
|
18048
18048
|
constructor() {
|
|
18049
18049
|
super(...arguments);
|
|
18050
|
-
__publicField$
|
|
18051
|
-
__publicField$
|
|
18050
|
+
__publicField$C(this, "name", "center");
|
|
18051
|
+
__publicField$C(this, "event", ["moveend"]);
|
|
18052
18052
|
}
|
|
18053
18053
|
getValue() {
|
|
18054
18054
|
return this.webMap.getCenter();
|
|
@@ -18070,14 +18070,14 @@ class CenterState extends StateItem {
|
|
|
18070
18070
|
}
|
|
18071
18071
|
}
|
|
18072
18072
|
|
|
18073
|
-
var __defProp$
|
|
18074
|
-
var __defNormalProp$
|
|
18075
|
-
var __publicField$
|
|
18073
|
+
var __defProp$T = Object.defineProperty;
|
|
18074
|
+
var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18075
|
+
var __publicField$B = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18076
18076
|
class ZoomState extends StateItem {
|
|
18077
18077
|
constructor() {
|
|
18078
18078
|
super(...arguments);
|
|
18079
|
-
__publicField$
|
|
18080
|
-
__publicField$
|
|
18079
|
+
__publicField$B(this, "name", "zoom");
|
|
18080
|
+
__publicField$B(this, "event", ["zoomend"]);
|
|
18081
18081
|
}
|
|
18082
18082
|
getValue() {
|
|
18083
18083
|
const zoom = this.webMap.getZoom();
|
|
@@ -18100,10 +18100,10 @@ function clearObject(obj) {
|
|
|
18100
18100
|
}
|
|
18101
18101
|
}
|
|
18102
18102
|
|
|
18103
|
-
var __defProp$
|
|
18104
|
-
var __defNormalProp$
|
|
18105
|
-
var __publicField$
|
|
18106
|
-
var __async$
|
|
18103
|
+
var __defProp$S = Object.defineProperty;
|
|
18104
|
+
var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18105
|
+
var __publicField$A = (obj, key, value) => __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18106
|
+
var __async$w = (__this, __arguments, generator) => {
|
|
18107
18107
|
return new Promise((resolve, reject) => {
|
|
18108
18108
|
var fulfilled = (value) => {
|
|
18109
18109
|
try {
|
|
@@ -18149,25 +18149,25 @@ const OPTIONS$1 = {
|
|
|
18149
18149
|
};
|
|
18150
18150
|
const _WebMapMain = class _WebMapMain {
|
|
18151
18151
|
constructor(mapOptions) {
|
|
18152
|
-
__publicField$
|
|
18152
|
+
__publicField$A(this, "options", OPTIONS$1);
|
|
18153
18153
|
// `WebMapEvents` must be `E` but its not work correct
|
|
18154
|
-
__publicField$
|
|
18155
|
-
__publicField$
|
|
18156
|
-
__publicField$
|
|
18157
|
-
__publicField$
|
|
18158
|
-
__publicField$
|
|
18159
|
-
__publicField$
|
|
18160
|
-
__publicField$
|
|
18154
|
+
__publicField$A(this, "emitter", new EventEmitter());
|
|
18155
|
+
__publicField$A(this, "keys", _WebMapMain.keys);
|
|
18156
|
+
__publicField$A(this, "mapAdapter");
|
|
18157
|
+
__publicField$A(this, "runtimeParams", []);
|
|
18158
|
+
__publicField$A(this, "getPaintFunctions", _WebMapMain.getPaintFunctions);
|
|
18159
|
+
__publicField$A(this, "mapStateItems", [CenterState, ZoomState, BoundState]);
|
|
18160
|
+
__publicField$A(this, "id", ID$2++);
|
|
18161
18161
|
/**
|
|
18162
18162
|
* From runtime params
|
|
18163
18163
|
*/
|
|
18164
|
-
__publicField$
|
|
18165
|
-
__publicField$
|
|
18166
|
-
__publicField$
|
|
18167
|
-
__publicField$
|
|
18168
|
-
__publicField$
|
|
18169
|
-
__publicField$
|
|
18170
|
-
__publicField$
|
|
18164
|
+
__publicField$A(this, "mapState", []);
|
|
18165
|
+
__publicField$A(this, "_initMapState", {});
|
|
18166
|
+
__publicField$A(this, "_starterKits");
|
|
18167
|
+
__publicField$A(this, "_extent");
|
|
18168
|
+
__publicField$A(this, "_eventsStatus", {});
|
|
18169
|
+
__publicField$A(this, "_coordFromMapClickAbort");
|
|
18170
|
+
__publicField$A(this, "_mapEvents", {});
|
|
18171
18171
|
this.mapAdapter = mapOptions.mapAdapter;
|
|
18172
18172
|
this._starterKits = mapOptions.starterKits || [];
|
|
18173
18173
|
if (mapOptions) {
|
|
@@ -18196,7 +18196,7 @@ const _WebMapMain = class _WebMapMain {
|
|
|
18196
18196
|
* ```
|
|
18197
18197
|
*/
|
|
18198
18198
|
create() {
|
|
18199
|
-
return __async$
|
|
18199
|
+
return __async$w(this, null, function* () {
|
|
18200
18200
|
if (!this.getEventStatus("create")) {
|
|
18201
18201
|
yield this._setInitMapState(this.mapStateItems);
|
|
18202
18202
|
yield this._setupMap();
|
|
@@ -18524,15 +18524,15 @@ const _WebMapMain = class _WebMapMain {
|
|
|
18524
18524
|
this.emitter.emit(_eventName, data);
|
|
18525
18525
|
}
|
|
18526
18526
|
_addLayerProviders() {
|
|
18527
|
-
return __async$
|
|
18527
|
+
return __async$w(this, null, function* () {
|
|
18528
18528
|
});
|
|
18529
18529
|
}
|
|
18530
18530
|
_onLoadSync() {
|
|
18531
|
-
return __async$
|
|
18531
|
+
return __async$w(this, null, function* () {
|
|
18532
18532
|
});
|
|
18533
18533
|
}
|
|
18534
18534
|
_setupMap() {
|
|
18535
|
-
return __async$
|
|
18535
|
+
return __async$w(this, null, function* () {
|
|
18536
18536
|
if (!this.mapAdapter) {
|
|
18537
18537
|
throw new Error("WebMap `mapAdapter` option is not set");
|
|
18538
18538
|
}
|
|
@@ -18645,31 +18645,31 @@ const _WebMapMain = class _WebMapMain {
|
|
|
18645
18645
|
});
|
|
18646
18646
|
}
|
|
18647
18647
|
};
|
|
18648
|
-
__publicField$
|
|
18649
|
-
__publicField$
|
|
18648
|
+
__publicField$A(_WebMapMain, "keys", new Keys());
|
|
18649
|
+
__publicField$A(_WebMapMain, "getPaintFunctions");
|
|
18650
18650
|
let WebMapMain = _WebMapMain;
|
|
18651
18651
|
|
|
18652
|
-
var __defProp$
|
|
18653
|
-
var __defProps$
|
|
18654
|
-
var __getOwnPropDescs$
|
|
18655
|
-
var __getOwnPropSymbols$
|
|
18656
|
-
var __hasOwnProp$
|
|
18657
|
-
var __propIsEnum$
|
|
18658
|
-
var __defNormalProp$
|
|
18659
|
-
var __spreadValues$
|
|
18652
|
+
var __defProp$R = Object.defineProperty;
|
|
18653
|
+
var __defProps$q = Object.defineProperties;
|
|
18654
|
+
var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
|
|
18655
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
18656
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
18657
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
18658
|
+
var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18659
|
+
var __spreadValues$A = (a, b) => {
|
|
18660
18660
|
for (var prop in b || (b = {}))
|
|
18661
|
-
if (__hasOwnProp$
|
|
18662
|
-
__defNormalProp$
|
|
18663
|
-
if (__getOwnPropSymbols$
|
|
18664
|
-
for (var prop of __getOwnPropSymbols$
|
|
18665
|
-
if (__propIsEnum$
|
|
18666
|
-
__defNormalProp$
|
|
18661
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
18662
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
18663
|
+
if (__getOwnPropSymbols$B)
|
|
18664
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
18665
|
+
if (__propIsEnum$B.call(b, prop))
|
|
18666
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
18667
18667
|
}
|
|
18668
18668
|
return a;
|
|
18669
18669
|
};
|
|
18670
|
-
var __spreadProps$
|
|
18671
|
-
var __publicField$
|
|
18672
|
-
var __async$
|
|
18670
|
+
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
18671
|
+
var __publicField$z = (obj, key, value) => __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18672
|
+
var __async$v = (__this, __arguments, generator) => {
|
|
18673
18673
|
return new Promise((resolve, reject) => {
|
|
18674
18674
|
var fulfilled = (value) => {
|
|
18675
18675
|
try {
|
|
@@ -18692,11 +18692,11 @@ var __async$u = (__this, __arguments, generator) => {
|
|
|
18692
18692
|
class WebMapLayers extends WebMapMain {
|
|
18693
18693
|
constructor(mapOptions) {
|
|
18694
18694
|
super(mapOptions);
|
|
18695
|
-
__publicField$
|
|
18696
|
-
__publicField$
|
|
18697
|
-
__publicField$
|
|
18698
|
-
__publicField$
|
|
18699
|
-
__publicField$
|
|
18695
|
+
__publicField$z(this, "_layersIdCounter", 1);
|
|
18696
|
+
__publicField$z(this, "_layersOrderCounter", 1);
|
|
18697
|
+
__publicField$z(this, "_baselayers", []);
|
|
18698
|
+
__publicField$z(this, "_layers", {});
|
|
18699
|
+
__publicField$z(this, "_selectedLayers", []);
|
|
18700
18700
|
const tileJson = this.options.tileJson;
|
|
18701
18701
|
if (tileJson) {
|
|
18702
18702
|
this.emitter.once("build-map", () => this.addTileJsonLayer(tileJson));
|
|
@@ -18707,7 +18707,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
18707
18707
|
* But not all layers have borders
|
|
18708
18708
|
*/
|
|
18709
18709
|
fitLayer(layerDef, options) {
|
|
18710
|
-
return __async$
|
|
18710
|
+
return __async$v(this, null, function* () {
|
|
18711
18711
|
const layer = this.getLayer(layerDef);
|
|
18712
18712
|
const getBounds = layer && (layer.getBounds || layer.getExtent);
|
|
18713
18713
|
if (getBounds) {
|
|
@@ -18800,10 +18800,10 @@ class WebMapLayers extends WebMapMain {
|
|
|
18800
18800
|
* Shortcut method to create base layer
|
|
18801
18801
|
*/
|
|
18802
18802
|
addBaseLayer(adapter, options) {
|
|
18803
|
-
return __async$
|
|
18803
|
+
return __async$v(this, null, function* () {
|
|
18804
18804
|
const layer = yield this.addLayer(
|
|
18805
18805
|
adapter,
|
|
18806
|
-
__spreadProps$
|
|
18806
|
+
__spreadProps$q(__spreadValues$A({}, options), {
|
|
18807
18807
|
baselayer: true
|
|
18808
18808
|
}),
|
|
18809
18809
|
void 0
|
|
@@ -18826,7 +18826,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
18826
18826
|
* ```
|
|
18827
18827
|
*/
|
|
18828
18828
|
addLayer(_0) {
|
|
18829
|
-
return __async$
|
|
18829
|
+
return __async$v(this, arguments, function* (adapter, options = {}, order) {
|
|
18830
18830
|
var _a, _b;
|
|
18831
18831
|
const id = this._layersIdCounter++;
|
|
18832
18832
|
const _order = defined(order) ? order : options.order !== void 0 ? options.order : this.reserveOrder();
|
|
@@ -18840,7 +18840,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
18840
18840
|
}
|
|
18841
18841
|
const geoJsonOptions = options;
|
|
18842
18842
|
this._updateGeoJsonOptions(geoJsonOptions);
|
|
18843
|
-
options = __spreadValues$
|
|
18843
|
+
options = __spreadValues$A({
|
|
18844
18844
|
id: String(id),
|
|
18845
18845
|
order: _order
|
|
18846
18846
|
}, options);
|
|
@@ -18863,12 +18863,12 @@ class WebMapLayers extends WebMapMain {
|
|
|
18863
18863
|
}
|
|
18864
18864
|
}
|
|
18865
18865
|
}
|
|
18866
|
-
options = __spreadProps$
|
|
18866
|
+
options = __spreadProps$q(__spreadValues$A({}, options), {
|
|
18867
18867
|
request: this._getLayerRequestOptions(options)
|
|
18868
18868
|
});
|
|
18869
18869
|
if (adapterEngine !== void 0) {
|
|
18870
18870
|
const _adapter = new adapterEngine(this.mapAdapter.map, options);
|
|
18871
|
-
_adapter.options = __spreadValues$
|
|
18871
|
+
_adapter.options = __spreadValues$A(__spreadValues$A({}, options), _adapter.options);
|
|
18872
18872
|
if (_adapter.options.baselayer) {
|
|
18873
18873
|
options.baselayer = true;
|
|
18874
18874
|
options.order = 0;
|
|
@@ -18930,7 +18930,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
18930
18930
|
});
|
|
18931
18931
|
}
|
|
18932
18932
|
addLayerFromAsyncAdapter(adapter, options, order) {
|
|
18933
|
-
return __async$
|
|
18933
|
+
return __async$v(this, null, function* () {
|
|
18934
18934
|
const _order = order || options.order !== void 0 ? options.order : this.reserveOrder();
|
|
18935
18935
|
const adapterConstructor = adapter;
|
|
18936
18936
|
const adapterConstructorPromise = adapterConstructor();
|
|
@@ -18957,7 +18957,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
18957
18957
|
}
|
|
18958
18958
|
}
|
|
18959
18959
|
getLegend(options) {
|
|
18960
|
-
return __async$
|
|
18960
|
+
return __async$v(this, null, function* () {
|
|
18961
18961
|
const promises = [];
|
|
18962
18962
|
for (const l of this.orderedLayers()) {
|
|
18963
18963
|
if (l.getLegend) {
|
|
@@ -19055,7 +19055,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
19055
19055
|
}
|
|
19056
19056
|
/** Shortcut for {@link WebMapLayers.addLayer} to create TileLayer adapter */
|
|
19057
19057
|
addTileLayer(url, options = {}) {
|
|
19058
|
-
return this.addLayer("TILE", __spreadProps$
|
|
19058
|
+
return this.addLayer("TILE", __spreadProps$q(__spreadValues$A({}, options), { url }));
|
|
19059
19059
|
}
|
|
19060
19060
|
addImageLayer(urlOrOptions, options) {
|
|
19061
19061
|
let url;
|
|
@@ -19065,7 +19065,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
19065
19065
|
url = urlOrOptions.url;
|
|
19066
19066
|
options = urlOrOptions;
|
|
19067
19067
|
}
|
|
19068
|
-
return this.addLayer("IMAGE", __spreadProps$
|
|
19068
|
+
return this.addLayer("IMAGE", __spreadProps$q(__spreadValues$A({}, options), { url }));
|
|
19069
19069
|
}
|
|
19070
19070
|
/**
|
|
19071
19071
|
* Show added layer on the map by it definition.
|
|
@@ -19097,7 +19097,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
19097
19097
|
const onMap = layer && layer.options.visibility;
|
|
19098
19098
|
const toStatus = status !== void 0 ? status : !onMap;
|
|
19099
19099
|
const silent = options.silent !== void 0 ? options.silent : false;
|
|
19100
|
-
const action = (l) => __async$
|
|
19100
|
+
const action = (l) => __async$v(this, null, function* () {
|
|
19101
19101
|
const id = String(l.id);
|
|
19102
19102
|
const preEventName = toStatus ? "layer:preshow" : "layer:prehide";
|
|
19103
19103
|
const eventName = toStatus ? "layer:show" : "layer:hide";
|
|
@@ -19448,10 +19448,10 @@ class WebMapLayers extends WebMapMain {
|
|
|
19448
19448
|
this.options.layerRequest
|
|
19449
19449
|
);
|
|
19450
19450
|
const layerRequest = getLayerRequestOptions(options);
|
|
19451
|
-
const headers = __spreadValues$
|
|
19451
|
+
const headers = __spreadValues$A(__spreadValues$A({}, (defaultRequest == null ? void 0 : defaultRequest.headers) || {}), (layerRequest == null ? void 0 : layerRequest.headers) || {});
|
|
19452
19452
|
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;
|
|
19453
19453
|
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;
|
|
19454
|
-
return normalizeLayerRequestOptions(__spreadValues$
|
|
19454
|
+
return normalizeLayerRequestOptions(__spreadValues$A(__spreadValues$A(__spreadValues$A(__spreadValues$A(__spreadValues$A({}, defaultRequest), layerRequest), Object.keys(headers).length ? { headers } : {}), credentials !== void 0 ? { credentials } : {}), cache !== void 0 ? { cache } : {}));
|
|
19455
19455
|
}
|
|
19456
19456
|
/** @internal */
|
|
19457
19457
|
_emitLayerEvent(name, id, options) {
|
|
@@ -19463,21 +19463,21 @@ class WebMapLayers extends WebMapMain {
|
|
|
19463
19463
|
this.emitter.emit(name, options);
|
|
19464
19464
|
}
|
|
19465
19465
|
_onLayerClick(options) {
|
|
19466
|
-
return __async$
|
|
19466
|
+
return __async$v(this, null, function* () {
|
|
19467
19467
|
const id = options.layer.id;
|
|
19468
19468
|
this._emitLayerEvent("layer:click", id || "", options);
|
|
19469
19469
|
return Promise.resolve(options);
|
|
19470
19470
|
});
|
|
19471
19471
|
}
|
|
19472
19472
|
_onLayerDoubleClick(options) {
|
|
19473
|
-
return __async$
|
|
19473
|
+
return __async$v(this, null, function* () {
|
|
19474
19474
|
const id = options.layer.id;
|
|
19475
19475
|
this._emitLayerEvent("layer:dblclick", id || "", options);
|
|
19476
19476
|
return Promise.resolve(options);
|
|
19477
19477
|
});
|
|
19478
19478
|
}
|
|
19479
19479
|
_onLayerSelect(options) {
|
|
19480
|
-
return __async$
|
|
19480
|
+
return __async$v(this, null, function* () {
|
|
19481
19481
|
this._emitLayerEvent("layer:select", options.layer.id || "", options);
|
|
19482
19482
|
return Promise.resolve(options);
|
|
19483
19483
|
});
|
|
@@ -19546,25 +19546,25 @@ class WebMapLayers extends WebMapMain {
|
|
|
19546
19546
|
}
|
|
19547
19547
|
}
|
|
19548
19548
|
|
|
19549
|
-
var __defProp$
|
|
19550
|
-
var __getOwnPropSymbols$
|
|
19551
|
-
var __hasOwnProp$
|
|
19552
|
-
var __propIsEnum$
|
|
19553
|
-
var __defNormalProp$
|
|
19549
|
+
var __defProp$Q = Object.defineProperty;
|
|
19550
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
19551
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
19552
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
19553
|
+
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19554
19554
|
var __objRest$9 = (source, exclude) => {
|
|
19555
19555
|
var target = {};
|
|
19556
19556
|
for (var prop in source)
|
|
19557
|
-
if (__hasOwnProp$
|
|
19557
|
+
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
19558
19558
|
target[prop] = source[prop];
|
|
19559
|
-
if (source != null && __getOwnPropSymbols$
|
|
19560
|
-
for (var prop of __getOwnPropSymbols$
|
|
19561
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
19559
|
+
if (source != null && __getOwnPropSymbols$A)
|
|
19560
|
+
for (var prop of __getOwnPropSymbols$A(source)) {
|
|
19561
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
|
|
19562
19562
|
target[prop] = source[prop];
|
|
19563
19563
|
}
|
|
19564
19564
|
return target;
|
|
19565
19565
|
};
|
|
19566
|
-
var __publicField$
|
|
19567
|
-
var __async$
|
|
19566
|
+
var __publicField$y = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19567
|
+
var __async$u = (__this, __arguments, generator) => {
|
|
19568
19568
|
return new Promise((resolve, reject) => {
|
|
19569
19569
|
var fulfilled = (value) => {
|
|
19570
19570
|
try {
|
|
@@ -19587,14 +19587,14 @@ var __async$t = (__this, __arguments, generator) => {
|
|
|
19587
19587
|
const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
19588
19588
|
constructor() {
|
|
19589
19589
|
super(...arguments);
|
|
19590
|
-
__publicField$
|
|
19590
|
+
__publicField$y(this, "_loadControlQueue", {
|
|
19591
19591
|
"top-right": [],
|
|
19592
19592
|
"bottom-right": [],
|
|
19593
19593
|
"top-left": [],
|
|
19594
19594
|
"bottom-left": [],
|
|
19595
19595
|
inside: []
|
|
19596
19596
|
});
|
|
19597
|
-
__publicField$
|
|
19597
|
+
__publicField$y(this, "_isControlLoading", {
|
|
19598
19598
|
"top-right": false,
|
|
19599
19599
|
"bottom-right": false,
|
|
19600
19600
|
"top-left": false,
|
|
@@ -19603,7 +19603,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19603
19603
|
});
|
|
19604
19604
|
}
|
|
19605
19605
|
addControl(controlDef, position, options) {
|
|
19606
|
-
return __async$
|
|
19606
|
+
return __async$u(this, null, function* () {
|
|
19607
19607
|
let control;
|
|
19608
19608
|
const { addOptions, createOptions } = this._splitControlOptions(options);
|
|
19609
19609
|
position = position != null ? position : "top-left";
|
|
@@ -19614,7 +19614,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19614
19614
|
}
|
|
19615
19615
|
if (control) {
|
|
19616
19616
|
return new Promise((resolve) => {
|
|
19617
|
-
const promise = () => __async$
|
|
19617
|
+
const promise = () => __async$u(this, null, function* () {
|
|
19618
19618
|
const _control = yield control;
|
|
19619
19619
|
const c = this.mapAdapter.addControl(_control, position, addOptions);
|
|
19620
19620
|
resolve(c);
|
|
@@ -19637,7 +19637,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19637
19637
|
* ```
|
|
19638
19638
|
*/
|
|
19639
19639
|
createControl(control, options) {
|
|
19640
|
-
return __async$
|
|
19640
|
+
return __async$u(this, null, function* () {
|
|
19641
19641
|
yield this.onLoad("build-map");
|
|
19642
19642
|
if (this.mapAdapter.createControl) {
|
|
19643
19643
|
return this.mapAdapter.createControl(control, options);
|
|
@@ -19645,7 +19645,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19645
19645
|
});
|
|
19646
19646
|
}
|
|
19647
19647
|
createButtonControl(options) {
|
|
19648
|
-
return __async$
|
|
19648
|
+
return __async$u(this, null, function* () {
|
|
19649
19649
|
yield this.onLoad("build-map");
|
|
19650
19650
|
if (this.mapAdapter.createButtonControl) {
|
|
19651
19651
|
return this.mapAdapter.createButtonControl(options);
|
|
@@ -19672,7 +19672,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19672
19672
|
* {@link http://code.nextgis.com/demo-examples-toggle-control | Toggle button control example}
|
|
19673
19673
|
*/
|
|
19674
19674
|
createToggleControl(options) {
|
|
19675
|
-
return __async$
|
|
19675
|
+
return __async$u(this, null, function* () {
|
|
19676
19676
|
yield this.onLoad("build-map");
|
|
19677
19677
|
if (this.mapAdapter.createToggleControl) {
|
|
19678
19678
|
return this.mapAdapter.createToggleControl(options);
|
|
@@ -19731,7 +19731,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19731
19731
|
}
|
|
19732
19732
|
}
|
|
19733
19733
|
_applyControls(position) {
|
|
19734
|
-
return __async$
|
|
19734
|
+
return __async$u(this, null, function* () {
|
|
19735
19735
|
if (this._loadControlQueue[position].length) {
|
|
19736
19736
|
this._isControlLoading[position] = true;
|
|
19737
19737
|
const controlCb = this._loadControlQueue[position][0];
|
|
@@ -19758,7 +19758,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19758
19758
|
return id !== void 0 || order !== void 0 ? { id, order } : void 0;
|
|
19759
19759
|
}
|
|
19760
19760
|
};
|
|
19761
|
-
__publicField$
|
|
19761
|
+
__publicField$y(_WebMapControls, "controls", {
|
|
19762
19762
|
CONTROL: (webMap, options) => {
|
|
19763
19763
|
return webMap.createControl(options.control, options.options);
|
|
19764
19764
|
},
|
|
@@ -19771,39 +19771,39 @@ __publicField$x(_WebMapControls, "controls", {
|
|
|
19771
19771
|
});
|
|
19772
19772
|
let WebMapControls = _WebMapControls;
|
|
19773
19773
|
|
|
19774
|
-
var __defProp$
|
|
19775
|
-
var __defProps$
|
|
19776
|
-
var __getOwnPropDescs$
|
|
19777
|
-
var __getOwnPropSymbols$
|
|
19778
|
-
var __hasOwnProp$
|
|
19779
|
-
var __propIsEnum$
|
|
19774
|
+
var __defProp$P = Object.defineProperty;
|
|
19775
|
+
var __defProps$p = Object.defineProperties;
|
|
19776
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
19777
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
19778
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
19779
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
19780
19780
|
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
19781
|
-
var __defNormalProp$
|
|
19782
|
-
var __spreadValues$
|
|
19781
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19782
|
+
var __spreadValues$z = (a, b) => {
|
|
19783
19783
|
for (var prop in b || (b = {}))
|
|
19784
|
-
if (__hasOwnProp$
|
|
19785
|
-
__defNormalProp$
|
|
19786
|
-
if (__getOwnPropSymbols$
|
|
19787
|
-
for (var prop of __getOwnPropSymbols$
|
|
19788
|
-
if (__propIsEnum$
|
|
19789
|
-
__defNormalProp$
|
|
19784
|
+
if (__hasOwnProp$z.call(b, prop))
|
|
19785
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
19786
|
+
if (__getOwnPropSymbols$z)
|
|
19787
|
+
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
19788
|
+
if (__propIsEnum$z.call(b, prop))
|
|
19789
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
19790
19790
|
}
|
|
19791
19791
|
return a;
|
|
19792
19792
|
};
|
|
19793
|
-
var __spreadProps$
|
|
19793
|
+
var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
|
|
19794
19794
|
var __objRest$8 = (source, exclude) => {
|
|
19795
19795
|
var target = {};
|
|
19796
19796
|
for (var prop in source)
|
|
19797
|
-
if (__hasOwnProp$
|
|
19797
|
+
if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
19798
19798
|
target[prop] = source[prop];
|
|
19799
|
-
if (source != null && __getOwnPropSymbols$
|
|
19800
|
-
for (var prop of __getOwnPropSymbols$
|
|
19801
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
19799
|
+
if (source != null && __getOwnPropSymbols$z)
|
|
19800
|
+
for (var prop of __getOwnPropSymbols$z(source)) {
|
|
19801
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
|
|
19802
19802
|
target[prop] = source[prop];
|
|
19803
19803
|
}
|
|
19804
19804
|
return target;
|
|
19805
19805
|
};
|
|
19806
|
-
var __async$
|
|
19806
|
+
var __async$t = (__this, __arguments, generator) => {
|
|
19807
19807
|
return new Promise((resolve, reject) => {
|
|
19808
19808
|
var fulfilled = (value) => {
|
|
19809
19809
|
try {
|
|
@@ -19837,7 +19837,7 @@ class WebMap extends WebMapControls {
|
|
|
19837
19837
|
* @internal
|
|
19838
19838
|
*/
|
|
19839
19839
|
_addLayerProviders() {
|
|
19840
|
-
return __async$
|
|
19840
|
+
return __async$t(this, null, function* () {
|
|
19841
19841
|
try {
|
|
19842
19842
|
for (var iter2 = __forAwait(this._starterKits), more2, temp2, error2; more2 = !(temp2 = yield iter2.next()).done; more2 = false) {
|
|
19843
19843
|
const kit = temp2.value;
|
|
@@ -19881,7 +19881,7 @@ class WebMap extends WebMapControls {
|
|
|
19881
19881
|
* @internal
|
|
19882
19882
|
*/
|
|
19883
19883
|
_onLoadSync() {
|
|
19884
|
-
return __async$
|
|
19884
|
+
return __async$t(this, null, function* () {
|
|
19885
19885
|
try {
|
|
19886
19886
|
for (var iter = __forAwait(this._starterKits), more, temp, error; more = !(temp = yield iter.next()).done; more = false) {
|
|
19887
19887
|
const kit = temp.value;
|
|
@@ -19919,7 +19919,7 @@ class WebMap extends WebMapControls {
|
|
|
19919
19919
|
}
|
|
19920
19920
|
}
|
|
19921
19921
|
const _a = controlOptions, { id, order, position } = _a, options = __objRest$8(_a, ["id", "order", "position"]);
|
|
19922
|
-
this.addControl(controlAdapterName, position || "top-left", __spreadProps$
|
|
19922
|
+
this.addControl(controlAdapterName, position || "top-left", __spreadProps$p(__spreadValues$z({}, options), {
|
|
19923
19923
|
id,
|
|
19924
19924
|
order
|
|
19925
19925
|
}));
|
|
@@ -19971,20 +19971,20 @@ function callAjax({
|
|
|
19971
19971
|
return [promise, abortFunc];
|
|
19972
19972
|
}
|
|
19973
19973
|
|
|
19974
|
-
var __defProp$
|
|
19975
|
-
var __defNormalProp$
|
|
19976
|
-
var __publicField$
|
|
19974
|
+
var __defProp$O = Object.defineProperty;
|
|
19975
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19976
|
+
var __publicField$x = (obj, key, value) => __defNormalProp$O(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19977
19977
|
class Queue {
|
|
19978
19978
|
/**
|
|
19979
19979
|
* @param {PromiseQueueOptions} options - Configuration options for the queue.
|
|
19980
19980
|
*/
|
|
19981
19981
|
constructor({ concurrency = 1, delay = 0 } = {}) {
|
|
19982
|
-
__publicField$
|
|
19983
|
-
__publicField$
|
|
19984
|
-
__publicField$
|
|
19985
|
-
__publicField$
|
|
19986
|
-
__publicField$
|
|
19987
|
-
__publicField$
|
|
19982
|
+
__publicField$x(this, "queue", []);
|
|
19983
|
+
__publicField$x(this, "concurrency");
|
|
19984
|
+
__publicField$x(this, "activeCount", 0);
|
|
19985
|
+
__publicField$x(this, "timeoutId");
|
|
19986
|
+
__publicField$x(this, "delay");
|
|
19987
|
+
__publicField$x(this, "toAbort", []);
|
|
19988
19988
|
this.concurrency = concurrency;
|
|
19989
19989
|
this.delay = delay;
|
|
19990
19990
|
}
|
|
@@ -20060,13 +20060,13 @@ class Queue {
|
|
|
20060
20060
|
|
|
20061
20061
|
const imageQueue = new Queue({ concurrency: 6, delay: 200 });
|
|
20062
20062
|
|
|
20063
|
-
var __defProp$
|
|
20064
|
-
var __defNormalProp$
|
|
20065
|
-
var __publicField$
|
|
20063
|
+
var __defProp$N = Object.defineProperty;
|
|
20064
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20065
|
+
var __publicField$w = (obj, key, value) => __defNormalProp$N(obj, key + "" , value);
|
|
20066
20066
|
class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
20067
20067
|
constructor(imageUrl, bounds, options) {
|
|
20068
20068
|
super(imageUrl, bounds, options);
|
|
20069
|
-
__publicField$
|
|
20069
|
+
__publicField$w(this, "_aborter");
|
|
20070
20070
|
}
|
|
20071
20071
|
cancelLoad() {
|
|
20072
20072
|
if (this._aborter) {
|
|
@@ -20096,16 +20096,16 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
|
20096
20096
|
}
|
|
20097
20097
|
}
|
|
20098
20098
|
|
|
20099
|
-
var __defProp$
|
|
20100
|
-
var __defNormalProp$
|
|
20101
|
-
var __publicField$
|
|
20099
|
+
var __defProp$M = Object.defineProperty;
|
|
20100
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20101
|
+
var __publicField$v = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20102
20102
|
class ImageLayer extends leafletSrcExports.Layer {
|
|
20103
20103
|
constructor(url, options) {
|
|
20104
20104
|
super(options);
|
|
20105
|
-
__publicField$
|
|
20105
|
+
__publicField$v(this, "defaultWmsParams", {
|
|
20106
20106
|
request: "GetMap"
|
|
20107
20107
|
});
|
|
20108
|
-
__publicField$
|
|
20108
|
+
__publicField$v(this, "options", {
|
|
20109
20109
|
crs: null,
|
|
20110
20110
|
uppercase: false,
|
|
20111
20111
|
attribution: "",
|
|
@@ -20119,11 +20119,11 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
20119
20119
|
viewPortBuffer: 0,
|
|
20120
20120
|
setViewDelay: 100
|
|
20121
20121
|
});
|
|
20122
|
-
__publicField$
|
|
20123
|
-
__publicField$
|
|
20124
|
-
__publicField$
|
|
20125
|
-
__publicField$
|
|
20126
|
-
__publicField$
|
|
20122
|
+
__publicField$v(this, "wmsParams");
|
|
20123
|
+
__publicField$v(this, "_url");
|
|
20124
|
+
__publicField$v(this, "_currentUrl");
|
|
20125
|
+
__publicField$v(this, "_currentOverlay");
|
|
20126
|
+
__publicField$v(this, "_loadedOverlay");
|
|
20127
20127
|
this._url = url;
|
|
20128
20128
|
const params = {};
|
|
20129
20129
|
const opts = {};
|
|
@@ -20288,30 +20288,30 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
20288
20288
|
}
|
|
20289
20289
|
}
|
|
20290
20290
|
|
|
20291
|
-
var __defProp$
|
|
20292
|
-
var __defProps$
|
|
20293
|
-
var __getOwnPropDescs$
|
|
20294
|
-
var __getOwnPropSymbols$
|
|
20295
|
-
var __hasOwnProp$
|
|
20296
|
-
var __propIsEnum$
|
|
20297
|
-
var __defNormalProp$
|
|
20298
|
-
var __spreadValues$
|
|
20291
|
+
var __defProp$L = Object.defineProperty;
|
|
20292
|
+
var __defProps$o = Object.defineProperties;
|
|
20293
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
20294
|
+
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
20295
|
+
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
20296
|
+
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
20297
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20298
|
+
var __spreadValues$y = (a, b) => {
|
|
20299
20299
|
for (var prop in b || (b = {}))
|
|
20300
|
-
if (__hasOwnProp$
|
|
20301
|
-
__defNormalProp$
|
|
20302
|
-
if (__getOwnPropSymbols$
|
|
20303
|
-
for (var prop of __getOwnPropSymbols$
|
|
20304
|
-
if (__propIsEnum$
|
|
20305
|
-
__defNormalProp$
|
|
20300
|
+
if (__hasOwnProp$y.call(b, prop))
|
|
20301
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
20302
|
+
if (__getOwnPropSymbols$y)
|
|
20303
|
+
for (var prop of __getOwnPropSymbols$y(b)) {
|
|
20304
|
+
if (__propIsEnum$y.call(b, prop))
|
|
20305
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
20306
20306
|
}
|
|
20307
20307
|
return a;
|
|
20308
20308
|
};
|
|
20309
|
-
var __spreadProps$
|
|
20310
|
-
var __publicField$
|
|
20309
|
+
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
20310
|
+
var __publicField$u = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20311
20311
|
class ImageAdapter extends BaseAdapter {
|
|
20312
20312
|
constructor() {
|
|
20313
20313
|
super(...arguments);
|
|
20314
|
-
__publicField$
|
|
20314
|
+
__publicField$u(this, "layer");
|
|
20315
20315
|
}
|
|
20316
20316
|
addLayer(options) {
|
|
20317
20317
|
var _a;
|
|
@@ -20319,10 +20319,10 @@ class ImageAdapter extends BaseAdapter {
|
|
|
20319
20319
|
if (url) {
|
|
20320
20320
|
const updateWmsParamsFromOpt = options.updateWmsParams;
|
|
20321
20321
|
const request = getLayerRequestOptions(options);
|
|
20322
|
-
this.layer = new ImageLayer(url, __spreadProps$
|
|
20322
|
+
this.layer = new ImageLayer(url, __spreadProps$o(__spreadValues$y(__spreadValues$y(__spreadValues$y({
|
|
20323
20323
|
pane: this.pane,
|
|
20324
20324
|
setViewDelay: options.setViewDelay
|
|
20325
|
-
}, __spreadProps$
|
|
20325
|
+
}, __spreadProps$o(__spreadValues$y({
|
|
20326
20326
|
transparent: true
|
|
20327
20327
|
}, options), {
|
|
20328
20328
|
opacity: (_a = options.opacity) != null ? _a : void 0
|
|
@@ -20347,7 +20347,7 @@ class ImageAdapter extends BaseAdapter {
|
|
|
20347
20347
|
}
|
|
20348
20348
|
}
|
|
20349
20349
|
}
|
|
20350
|
-
__publicField$
|
|
20350
|
+
__publicField$u(ImageAdapter, "queue", imageQueue);
|
|
20351
20351
|
|
|
20352
20352
|
function makeRemote(Base) {
|
|
20353
20353
|
return class RemoteTileLayer extends Base {
|
|
@@ -20410,33 +20410,33 @@ class TileLayerBase extends leafletSrcExports.TileLayer {
|
|
|
20410
20410
|
}
|
|
20411
20411
|
const TileLayer = makeRemote(TileLayerBase);
|
|
20412
20412
|
|
|
20413
|
-
var __defProp$
|
|
20414
|
-
var __defProps$
|
|
20415
|
-
var __getOwnPropDescs$
|
|
20416
|
-
var __getOwnPropSymbols$
|
|
20417
|
-
var __hasOwnProp$
|
|
20418
|
-
var __propIsEnum$
|
|
20419
|
-
var __defNormalProp$
|
|
20420
|
-
var __spreadValues$
|
|
20421
|
-
for (var prop in b || (b = {}))
|
|
20422
|
-
if (__hasOwnProp$
|
|
20423
|
-
__defNormalProp$
|
|
20424
|
-
if (__getOwnPropSymbols$
|
|
20425
|
-
for (var prop of __getOwnPropSymbols$
|
|
20426
|
-
if (__propIsEnum$
|
|
20427
|
-
__defNormalProp$
|
|
20413
|
+
var __defProp$K = Object.defineProperty;
|
|
20414
|
+
var __defProps$n = Object.defineProperties;
|
|
20415
|
+
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
20416
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
20417
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
20418
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
20419
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20420
|
+
var __spreadValues$x = (a, b) => {
|
|
20421
|
+
for (var prop in b || (b = {}))
|
|
20422
|
+
if (__hasOwnProp$x.call(b, prop))
|
|
20423
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
20424
|
+
if (__getOwnPropSymbols$x)
|
|
20425
|
+
for (var prop of __getOwnPropSymbols$x(b)) {
|
|
20426
|
+
if (__propIsEnum$x.call(b, prop))
|
|
20427
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
20428
20428
|
}
|
|
20429
20429
|
return a;
|
|
20430
20430
|
};
|
|
20431
|
-
var __spreadProps$
|
|
20431
|
+
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
20432
20432
|
var __objRest$7 = (source, exclude) => {
|
|
20433
20433
|
var target = {};
|
|
20434
20434
|
for (var prop in source)
|
|
20435
|
-
if (__hasOwnProp$
|
|
20435
|
+
if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
20436
20436
|
target[prop] = source[prop];
|
|
20437
|
-
if (source != null && __getOwnPropSymbols$
|
|
20438
|
-
for (var prop of __getOwnPropSymbols$
|
|
20439
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
20437
|
+
if (source != null && __getOwnPropSymbols$x)
|
|
20438
|
+
for (var prop of __getOwnPropSymbols$x(source)) {
|
|
20439
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
|
|
20440
20440
|
target[prop] = source[prop];
|
|
20441
20441
|
}
|
|
20442
20442
|
return target;
|
|
@@ -20447,7 +20447,7 @@ class TileAdapter extends BaseAdapter {
|
|
|
20447
20447
|
if (options) {
|
|
20448
20448
|
const _a = options, { url } = _a, opt = __objRest$7(_a, ["url"]);
|
|
20449
20449
|
if (url) {
|
|
20450
|
-
const tileLayerOptions = __spreadValues$
|
|
20450
|
+
const tileLayerOptions = __spreadValues$x({
|
|
20451
20451
|
pane: this.pane,
|
|
20452
20452
|
attribution: opt.attribution,
|
|
20453
20453
|
minZoom: opt.minZoom,
|
|
@@ -20459,7 +20459,7 @@ class TileAdapter extends BaseAdapter {
|
|
|
20459
20459
|
let layer;
|
|
20460
20460
|
const request = getLayerRequestOptions(opt);
|
|
20461
20461
|
if (request) {
|
|
20462
|
-
layer = new TileLayer(url, __spreadProps$
|
|
20462
|
+
layer = new TileLayer(url, __spreadProps$n(__spreadValues$x({}, tileLayerOptions), {
|
|
20463
20463
|
request,
|
|
20464
20464
|
setViewDelay: opt.setViewDelay
|
|
20465
20465
|
}));
|
|
@@ -20481,29 +20481,29 @@ class TileAdapter extends BaseAdapter {
|
|
|
20481
20481
|
}
|
|
20482
20482
|
}
|
|
20483
20483
|
|
|
20484
|
-
var __defProp$
|
|
20485
|
-
var __defProps$
|
|
20486
|
-
var __getOwnPropDescs$
|
|
20487
|
-
var __getOwnPropSymbols$
|
|
20488
|
-
var __hasOwnProp$
|
|
20489
|
-
var __propIsEnum$
|
|
20490
|
-
var __defNormalProp$
|
|
20491
|
-
var __spreadValues$
|
|
20484
|
+
var __defProp$J = Object.defineProperty;
|
|
20485
|
+
var __defProps$m = Object.defineProperties;
|
|
20486
|
+
var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
|
|
20487
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
20488
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
20489
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
20490
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20491
|
+
var __spreadValues$w = (a, b) => {
|
|
20492
20492
|
for (var prop in b || (b = {}))
|
|
20493
|
-
if (__hasOwnProp$
|
|
20494
|
-
__defNormalProp$
|
|
20495
|
-
if (__getOwnPropSymbols$
|
|
20496
|
-
for (var prop of __getOwnPropSymbols$
|
|
20497
|
-
if (__propIsEnum$
|
|
20498
|
-
__defNormalProp$
|
|
20493
|
+
if (__hasOwnProp$w.call(b, prop))
|
|
20494
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
20495
|
+
if (__getOwnPropSymbols$w)
|
|
20496
|
+
for (var prop of __getOwnPropSymbols$w(b)) {
|
|
20497
|
+
if (__propIsEnum$w.call(b, prop))
|
|
20498
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
20499
20499
|
}
|
|
20500
20500
|
return a;
|
|
20501
20501
|
};
|
|
20502
|
-
var __spreadProps$
|
|
20502
|
+
var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
|
|
20503
20503
|
class OsmAdapter extends TileAdapter {
|
|
20504
20504
|
addLayer(options) {
|
|
20505
20505
|
const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
|
20506
|
-
return super.addLayer(__spreadProps$
|
|
20506
|
+
return super.addLayer(__spreadProps$m(__spreadValues$w({
|
|
20507
20507
|
name: "OpenStreetMap",
|
|
20508
20508
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
|
20509
20509
|
}, options), {
|
|
@@ -20519,55 +20519,57 @@ class WmsLayerBase extends leafletSrcExports.TileLayer.WMS {
|
|
|
20519
20519
|
}
|
|
20520
20520
|
const WmsLayer = makeRemote(WmsLayerBase);
|
|
20521
20521
|
|
|
20522
|
-
var __defProp$
|
|
20523
|
-
var __defProps$
|
|
20524
|
-
var __getOwnPropDescs$
|
|
20525
|
-
var __getOwnPropSymbols$
|
|
20526
|
-
var __hasOwnProp$
|
|
20527
|
-
var __propIsEnum$
|
|
20528
|
-
var __defNormalProp$
|
|
20529
|
-
var __spreadValues$
|
|
20522
|
+
var __defProp$I = Object.defineProperty;
|
|
20523
|
+
var __defProps$l = Object.defineProperties;
|
|
20524
|
+
var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
|
|
20525
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
20526
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
20527
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
20528
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20529
|
+
var __spreadValues$v = (a, b) => {
|
|
20530
20530
|
for (var prop in b || (b = {}))
|
|
20531
|
-
if (__hasOwnProp$
|
|
20532
|
-
__defNormalProp$
|
|
20533
|
-
if (__getOwnPropSymbols$
|
|
20534
|
-
for (var prop of __getOwnPropSymbols$
|
|
20535
|
-
if (__propIsEnum$
|
|
20536
|
-
__defNormalProp$
|
|
20531
|
+
if (__hasOwnProp$v.call(b, prop))
|
|
20532
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
20533
|
+
if (__getOwnPropSymbols$v)
|
|
20534
|
+
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
20535
|
+
if (__propIsEnum$v.call(b, prop))
|
|
20536
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
20537
20537
|
}
|
|
20538
20538
|
return a;
|
|
20539
20539
|
};
|
|
20540
|
-
var __spreadProps$
|
|
20540
|
+
var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
|
|
20541
20541
|
var __objRest$6 = (source, exclude) => {
|
|
20542
20542
|
var target = {};
|
|
20543
20543
|
for (var prop in source)
|
|
20544
|
-
if (__hasOwnProp$
|
|
20544
|
+
if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
20545
20545
|
target[prop] = source[prop];
|
|
20546
|
-
if (source != null && __getOwnPropSymbols$
|
|
20547
|
-
for (var prop of __getOwnPropSymbols$
|
|
20548
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
20546
|
+
if (source != null && __getOwnPropSymbols$v)
|
|
20547
|
+
for (var prop of __getOwnPropSymbols$v(source)) {
|
|
20548
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
|
|
20549
20549
|
target[prop] = source[prop];
|
|
20550
20550
|
}
|
|
20551
20551
|
return target;
|
|
20552
20552
|
};
|
|
20553
20553
|
class WmsAdapter extends BaseAdapter {
|
|
20554
20554
|
addLayer(options) {
|
|
20555
|
+
var _b;
|
|
20555
20556
|
Object.assign(this.options, options);
|
|
20556
20557
|
const _a = options, { url } = _a, opt = __objRest$6(_a, ["url"]);
|
|
20557
20558
|
if (url) {
|
|
20558
|
-
const layerOptions = __spreadValues$
|
|
20559
|
+
const layerOptions = __spreadValues$v(__spreadValues$v({
|
|
20559
20560
|
pane: this.pane,
|
|
20560
20561
|
attribution: opt.attribution,
|
|
20561
20562
|
minZoom: opt.minZoom,
|
|
20562
20563
|
maxZoom: opt.maxZoom,
|
|
20563
20564
|
layers: options.layers,
|
|
20564
20565
|
format: options.format,
|
|
20565
|
-
|
|
20566
|
-
|
|
20566
|
+
version: options.version,
|
|
20567
|
+
transparent: (_b = options.transparent) != null ? _b : true
|
|
20568
|
+
}, options.params), options.nativeOptions);
|
|
20567
20569
|
let layer;
|
|
20568
20570
|
const request = getLayerRequestOptions(opt);
|
|
20569
20571
|
if (request) {
|
|
20570
|
-
layer = new WmsLayer(url, __spreadProps$
|
|
20572
|
+
layer = new WmsLayer(url, __spreadProps$l(__spreadValues$v({}, layerOptions), {
|
|
20571
20573
|
request
|
|
20572
20574
|
}));
|
|
20573
20575
|
} else {
|
|
@@ -20586,34 +20588,34 @@ function arrayToBoundsExpression(bounds) {
|
|
|
20586
20588
|
];
|
|
20587
20589
|
}
|
|
20588
20590
|
|
|
20589
|
-
var __defProp$
|
|
20590
|
-
var __getOwnPropSymbols$
|
|
20591
|
-
var __hasOwnProp$
|
|
20592
|
-
var __propIsEnum$
|
|
20593
|
-
var __defNormalProp$
|
|
20594
|
-
var __spreadValues$
|
|
20591
|
+
var __defProp$H = Object.defineProperty;
|
|
20592
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
20593
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
20594
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
20595
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20596
|
+
var __spreadValues$u = (a, b) => {
|
|
20595
20597
|
for (var prop in b || (b = {}))
|
|
20596
|
-
if (__hasOwnProp$
|
|
20597
|
-
__defNormalProp$
|
|
20598
|
-
if (__getOwnPropSymbols$
|
|
20599
|
-
for (var prop of __getOwnPropSymbols$
|
|
20600
|
-
if (__propIsEnum$
|
|
20601
|
-
__defNormalProp$
|
|
20598
|
+
if (__hasOwnProp$u.call(b, prop))
|
|
20599
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
20600
|
+
if (__getOwnPropSymbols$u)
|
|
20601
|
+
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
20602
|
+
if (__propIsEnum$u.call(b, prop))
|
|
20603
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
20602
20604
|
}
|
|
20603
20605
|
return a;
|
|
20604
20606
|
};
|
|
20605
|
-
var __publicField$
|
|
20607
|
+
var __publicField$t = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20606
20608
|
const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
20607
20609
|
constructor() {
|
|
20608
|
-
__publicField$
|
|
20609
|
-
__publicField$
|
|
20610
|
-
__publicField$
|
|
20611
|
-
__publicField$
|
|
20612
|
-
__publicField$
|
|
20613
|
-
__publicField$
|
|
20614
|
-
__publicField$
|
|
20615
|
-
__publicField$
|
|
20616
|
-
__publicField$
|
|
20610
|
+
__publicField$t(this, "options", { target: "map" });
|
|
20611
|
+
__publicField$t(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
|
|
20612
|
+
__publicField$t(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
|
|
20613
|
+
__publicField$t(this, "emitter", new EventEmitter());
|
|
20614
|
+
__publicField$t(this, "map");
|
|
20615
|
+
__publicField$t(this, "_resizeObserver");
|
|
20616
|
+
__publicField$t(this, "_controlContainer");
|
|
20617
|
+
__publicField$t(this, "_unselectCb", []);
|
|
20618
|
+
__publicField$t(this, "_universalEvents", [
|
|
20617
20619
|
"move",
|
|
20618
20620
|
"zoom",
|
|
20619
20621
|
"zoomend",
|
|
@@ -20621,14 +20623,14 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
20621
20623
|
"moveend",
|
|
20622
20624
|
"movestart"
|
|
20623
20625
|
]);
|
|
20624
|
-
__publicField$
|
|
20626
|
+
__publicField$t(this, "_positionEvents", [
|
|
20625
20627
|
"mousemove",
|
|
20626
20628
|
"mouseout",
|
|
20627
20629
|
"mouseover"
|
|
20628
20630
|
]);
|
|
20629
20631
|
}
|
|
20630
20632
|
create(options) {
|
|
20631
|
-
this.options = __spreadValues$
|
|
20633
|
+
this.options = __spreadValues$u({}, options);
|
|
20632
20634
|
if (this.options.target) {
|
|
20633
20635
|
const {
|
|
20634
20636
|
zoom,
|
|
@@ -20638,7 +20640,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
20638
20640
|
maxBounds: mb,
|
|
20639
20641
|
mapAdapterOptions
|
|
20640
20642
|
} = this.options;
|
|
20641
|
-
this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$
|
|
20643
|
+
this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$u({
|
|
20642
20644
|
attributionControl: false,
|
|
20643
20645
|
zoomControl: false,
|
|
20644
20646
|
maxBounds: mb ? arrayToBoundsExpression(mb) : void 0,
|
|
@@ -20930,7 +20932,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
20930
20932
|
}
|
|
20931
20933
|
}
|
|
20932
20934
|
};
|
|
20933
|
-
__publicField$
|
|
20935
|
+
__publicField$t(_LeafletMapAdapter, "layerAdapters", {
|
|
20934
20936
|
GEOJSON: GeoJsonAdapter,
|
|
20935
20937
|
IMAGE: ImageAdapter,
|
|
20936
20938
|
TILE: TileAdapter,
|
|
@@ -20938,11 +20940,11 @@ __publicField$s(_LeafletMapAdapter, "layerAdapters", {
|
|
|
20938
20940
|
// // MVT: MvtAdapter,
|
|
20939
20941
|
OSM: OsmAdapter
|
|
20940
20942
|
});
|
|
20941
|
-
__publicField$
|
|
20943
|
+
__publicField$t(_LeafletMapAdapter, "controlAdapters", {
|
|
20942
20944
|
ZOOM: leafletSrcExports.Control.Zoom,
|
|
20943
20945
|
ATTRIBUTION: AttributionControl
|
|
20944
20946
|
});
|
|
20945
|
-
__publicField$
|
|
20947
|
+
__publicField$t(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
|
|
20946
20948
|
let LeafletMapAdapter = _LeafletMapAdapter;
|
|
20947
20949
|
|
|
20948
20950
|
const svgPath = {
|
|
@@ -21030,23 +21032,23 @@ function template(str, data) {
|
|
|
21030
21032
|
});
|
|
21031
21033
|
}
|
|
21032
21034
|
|
|
21033
|
-
var __defProp$
|
|
21034
|
-
var __getOwnPropSymbols$
|
|
21035
|
-
var __hasOwnProp$
|
|
21036
|
-
var __propIsEnum$
|
|
21037
|
-
var __defNormalProp$
|
|
21038
|
-
var __spreadValues$
|
|
21035
|
+
var __defProp$G = Object.defineProperty;
|
|
21036
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
21037
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
21038
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
21039
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21040
|
+
var __spreadValues$t = (a, b) => {
|
|
21039
21041
|
for (var prop in b || (b = {}))
|
|
21040
|
-
if (__hasOwnProp$
|
|
21041
|
-
__defNormalProp$
|
|
21042
|
-
if (__getOwnPropSymbols$
|
|
21043
|
-
for (var prop of __getOwnPropSymbols$
|
|
21044
|
-
if (__propIsEnum$
|
|
21045
|
-
__defNormalProp$
|
|
21042
|
+
if (__hasOwnProp$t.call(b, prop))
|
|
21043
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
21044
|
+
if (__getOwnPropSymbols$t)
|
|
21045
|
+
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
21046
|
+
if (__propIsEnum$t.call(b, prop))
|
|
21047
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
21046
21048
|
}
|
|
21047
21049
|
return a;
|
|
21048
21050
|
};
|
|
21049
|
-
var __async$
|
|
21051
|
+
var __async$s = (__this, __arguments, generator) => {
|
|
21050
21052
|
return new Promise((resolve, reject) => {
|
|
21051
21053
|
var fulfilled = (value) => {
|
|
21052
21054
|
try {
|
|
@@ -21067,7 +21069,7 @@ var __async$r = (__this, __arguments, generator) => {
|
|
|
21067
21069
|
});
|
|
21068
21070
|
};
|
|
21069
21071
|
function apiRequest(opt) {
|
|
21070
|
-
return __async$
|
|
21072
|
+
return __async$s(this, null, function* () {
|
|
21071
21073
|
const { params, name, connector, requestOptions } = opt;
|
|
21072
21074
|
const apiItems = yield connector.connect();
|
|
21073
21075
|
let apiItem = apiItems && apiItems[name];
|
|
@@ -21105,7 +21107,7 @@ function apiRequest(opt) {
|
|
|
21105
21107
|
}
|
|
21106
21108
|
}
|
|
21107
21109
|
if (url) {
|
|
21108
|
-
return connector.makeQuery(url, params, __spreadValues$
|
|
21110
|
+
return connector.makeQuery(url, params, __spreadValues$t({
|
|
21109
21111
|
cacheName: name
|
|
21110
21112
|
}, requestOptions));
|
|
21111
21113
|
} else {
|
|
@@ -21117,12 +21119,12 @@ function apiRequest(opt) {
|
|
|
21117
21119
|
});
|
|
21118
21120
|
}
|
|
21119
21121
|
|
|
21120
|
-
var __defProp$
|
|
21121
|
-
var __defNormalProp$
|
|
21122
|
-
var __publicField$
|
|
21122
|
+
var __defProp$F = Object.defineProperty;
|
|
21123
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21124
|
+
var __publicField$s = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21123
21125
|
const _Cache = class _Cache {
|
|
21124
21126
|
constructor(options = {}) {
|
|
21125
|
-
__publicField$
|
|
21127
|
+
__publicField$s(this, "cache", []);
|
|
21126
21128
|
var _a;
|
|
21127
21129
|
const namespace = (_a = options.namespace) != null ? _a : "default";
|
|
21128
21130
|
if (_Cache.instance[namespace]) {
|
|
@@ -21253,7 +21255,7 @@ const _Cache = class _Cache {
|
|
|
21253
21255
|
return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
|
|
21254
21256
|
}
|
|
21255
21257
|
};
|
|
21256
|
-
__publicField$
|
|
21258
|
+
__publicField$s(_Cache, "instance", {});
|
|
21257
21259
|
let Cache = _Cache;
|
|
21258
21260
|
|
|
21259
21261
|
var pkg = {
|
|
@@ -21266,46 +21268,46 @@ class AbortError extends Error {
|
|
|
21266
21268
|
}
|
|
21267
21269
|
}
|
|
21268
21270
|
|
|
21269
|
-
var __defProp$
|
|
21270
|
-
var __defNormalProp$
|
|
21271
|
-
var __publicField$
|
|
21271
|
+
var __defProp$E = Object.defineProperty;
|
|
21272
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21273
|
+
var __publicField$r = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21272
21274
|
class NgwError extends Error {
|
|
21273
21275
|
constructor(er) {
|
|
21274
21276
|
super();
|
|
21275
|
-
__publicField$
|
|
21276
|
-
__publicField$
|
|
21277
|
-
__publicField$
|
|
21278
|
-
__publicField$
|
|
21279
|
-
__publicField$
|
|
21280
|
-
__publicField$
|
|
21281
|
-
__publicField$
|
|
21282
|
-
__publicField$
|
|
21277
|
+
__publicField$r(this, "name", "NgwError");
|
|
21278
|
+
__publicField$r(this, "title");
|
|
21279
|
+
__publicField$r(this, "message");
|
|
21280
|
+
__publicField$r(this, "detail");
|
|
21281
|
+
__publicField$r(this, "exception");
|
|
21282
|
+
__publicField$r(this, "status_code");
|
|
21283
|
+
__publicField$r(this, "data");
|
|
21284
|
+
__publicField$r(this, "guru_meditation");
|
|
21283
21285
|
Object.assign(this, er);
|
|
21284
21286
|
Object.setPrototypeOf(this, NgwError.prototype);
|
|
21285
21287
|
}
|
|
21286
21288
|
}
|
|
21287
21289
|
|
|
21288
|
-
var __defProp$
|
|
21289
|
-
var __defNormalProp$
|
|
21290
|
-
var __publicField$
|
|
21290
|
+
var __defProp$D = Object.defineProperty;
|
|
21291
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21292
|
+
var __publicField$q = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21291
21293
|
class InsufficientPermissionsError extends NgwError {
|
|
21292
21294
|
constructor(obj) {
|
|
21293
21295
|
super(obj);
|
|
21294
|
-
__publicField$
|
|
21295
|
-
__publicField$
|
|
21296
|
+
__publicField$q(this, "name", "InsufficientPermissionsError");
|
|
21297
|
+
__publicField$q(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
|
|
21296
21298
|
Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
|
|
21297
21299
|
}
|
|
21298
21300
|
}
|
|
21299
21301
|
|
|
21300
|
-
var __defProp$
|
|
21301
|
-
var __defNormalProp$
|
|
21302
|
-
var __publicField$
|
|
21302
|
+
var __defProp$C = Object.defineProperty;
|
|
21303
|
+
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21304
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21303
21305
|
let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
|
|
21304
21306
|
constructor(obj) {
|
|
21305
21307
|
super(obj);
|
|
21306
|
-
__publicField$
|
|
21307
|
-
__publicField$
|
|
21308
|
-
__publicField$
|
|
21308
|
+
__publicField$p(this, "message", "There is no response from the server or problem connecting to server.");
|
|
21309
|
+
__publicField$p(this, "title", "Network error");
|
|
21310
|
+
__publicField$p(this, "detail", "Check network connectivity and try again later.");
|
|
21309
21311
|
Object.setPrototypeOf(this, NetworksResponseError.prototype);
|
|
21310
21312
|
}
|
|
21311
21313
|
};
|
|
@@ -21342,27 +21344,27 @@ function isError(error) {
|
|
|
21342
21344
|
return false;
|
|
21343
21345
|
}
|
|
21344
21346
|
|
|
21345
|
-
var __defProp$
|
|
21346
|
-
var __defNormalProp$
|
|
21347
|
-
var __publicField$
|
|
21347
|
+
var __defProp$B = Object.defineProperty;
|
|
21348
|
+
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21349
|
+
var __publicField$o = (obj, key, value) => __defNormalProp$B(obj, key + "" , value);
|
|
21348
21350
|
class NetworkError extends Error {
|
|
21349
21351
|
constructor(url) {
|
|
21350
21352
|
super();
|
|
21351
|
-
__publicField$
|
|
21353
|
+
__publicField$o(this, "name", "NetworkError");
|
|
21352
21354
|
Object.setPrototypeOf(this, NetworkError.prototype);
|
|
21353
21355
|
this.message = `Unable to request ${url}.
|
|
21354
21356
|
Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
|
|
21355
21357
|
}
|
|
21356
21358
|
}
|
|
21357
21359
|
|
|
21358
|
-
var __defProp$
|
|
21359
|
-
var __defNormalProp$
|
|
21360
|
-
var __publicField$
|
|
21360
|
+
var __defProp$A = Object.defineProperty;
|
|
21361
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21362
|
+
var __publicField$n = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21361
21363
|
class ResourceNotFoundError extends NgwError {
|
|
21362
21364
|
constructor(obj) {
|
|
21363
21365
|
super(obj);
|
|
21364
|
-
__publicField$
|
|
21365
|
-
__publicField$
|
|
21366
|
+
__publicField$n(this, "name", "ResourceNotFoundError");
|
|
21367
|
+
__publicField$n(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
|
|
21366
21368
|
Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
|
|
21367
21369
|
}
|
|
21368
21370
|
}
|
|
@@ -21379,13 +21381,13 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
21379
21381
|
isError: isError
|
|
21380
21382
|
});
|
|
21381
21383
|
|
|
21382
|
-
var __defProp$
|
|
21383
|
-
var __defNormalProp$
|
|
21384
|
-
var __publicField$
|
|
21384
|
+
var __defProp$z = Object.defineProperty;
|
|
21385
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21386
|
+
var __publicField$m = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21385
21387
|
class BaseAPIError extends Error {
|
|
21386
21388
|
constructor(message) {
|
|
21387
21389
|
super(message || "Something went wrong.");
|
|
21388
|
-
__publicField$
|
|
21390
|
+
__publicField$m(this, "title");
|
|
21389
21391
|
this.name = "BaseAPIError";
|
|
21390
21392
|
this.title = "Unknown API error";
|
|
21391
21393
|
if (Error.captureStackTrace) {
|
|
@@ -21397,7 +21399,7 @@ class NetworksResponseError extends BaseAPIError {
|
|
|
21397
21399
|
// prettier-ignore
|
|
21398
21400
|
constructor(message) {
|
|
21399
21401
|
super(message || "There is no response from the server or problem connecting to server.");
|
|
21400
|
-
__publicField$
|
|
21402
|
+
__publicField$m(this, "detail");
|
|
21401
21403
|
this.title = "Network error";
|
|
21402
21404
|
this.detail = "Check network connectivity and try again later.";
|
|
21403
21405
|
}
|
|
@@ -21411,8 +21413,8 @@ class InvalidResponseError extends BaseAPIError {
|
|
|
21411
21413
|
class ServerResponseError extends BaseAPIError {
|
|
21412
21414
|
constructor(data) {
|
|
21413
21415
|
super(data.message);
|
|
21414
|
-
__publicField$
|
|
21415
|
-
__publicField$
|
|
21416
|
+
__publicField$m(this, "detail");
|
|
21417
|
+
__publicField$m(this, "data");
|
|
21416
21418
|
this.title = data.title || this.title;
|
|
21417
21419
|
this.detail = data.detail || null;
|
|
21418
21420
|
this.data = data;
|
|
@@ -21422,8 +21424,8 @@ class LunkwillError extends Error {
|
|
|
21422
21424
|
// prettier-ignore
|
|
21423
21425
|
constructor(message, data = {}) {
|
|
21424
21426
|
super(message || "Unexpected error while processing long-running request.");
|
|
21425
|
-
__publicField$
|
|
21426
|
-
__publicField$
|
|
21427
|
+
__publicField$m(this, "title");
|
|
21428
|
+
__publicField$m(this, "data");
|
|
21427
21429
|
this.name = "LunkwillError";
|
|
21428
21430
|
this.title = "Long-running request error";
|
|
21429
21431
|
this.data = data;
|
|
@@ -21443,35 +21445,35 @@ class LunkwillRequestFailed extends LunkwillError {
|
|
|
21443
21445
|
}
|
|
21444
21446
|
}
|
|
21445
21447
|
|
|
21446
|
-
var __defProp$
|
|
21447
|
-
var __getOwnPropSymbols$
|
|
21448
|
-
var __hasOwnProp$
|
|
21449
|
-
var __propIsEnum$
|
|
21450
|
-
var __defNormalProp$
|
|
21451
|
-
var __spreadValues$
|
|
21448
|
+
var __defProp$y = Object.defineProperty;
|
|
21449
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
21450
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
21451
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
21452
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21453
|
+
var __spreadValues$s = (a, b) => {
|
|
21452
21454
|
for (var prop in b || (b = {}))
|
|
21453
|
-
if (__hasOwnProp$
|
|
21454
|
-
__defNormalProp$
|
|
21455
|
-
if (__getOwnPropSymbols$
|
|
21456
|
-
for (var prop of __getOwnPropSymbols$
|
|
21457
|
-
if (__propIsEnum$
|
|
21458
|
-
__defNormalProp$
|
|
21455
|
+
if (__hasOwnProp$s.call(b, prop))
|
|
21456
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
21457
|
+
if (__getOwnPropSymbols$s)
|
|
21458
|
+
for (var prop of __getOwnPropSymbols$s(b)) {
|
|
21459
|
+
if (__propIsEnum$s.call(b, prop))
|
|
21460
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
21459
21461
|
}
|
|
21460
21462
|
return a;
|
|
21461
21463
|
};
|
|
21462
21464
|
var __objRest$5 = (source, exclude) => {
|
|
21463
21465
|
var target = {};
|
|
21464
21466
|
for (var prop in source)
|
|
21465
|
-
if (__hasOwnProp$
|
|
21467
|
+
if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21466
21468
|
target[prop] = source[prop];
|
|
21467
|
-
if (source != null && __getOwnPropSymbols$
|
|
21468
|
-
for (var prop of __getOwnPropSymbols$
|
|
21469
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
21469
|
+
if (source != null && __getOwnPropSymbols$s)
|
|
21470
|
+
for (var prop of __getOwnPropSymbols$s(source)) {
|
|
21471
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
|
|
21470
21472
|
target[prop] = source[prop];
|
|
21471
21473
|
}
|
|
21472
21474
|
return target;
|
|
21473
21475
|
};
|
|
21474
|
-
var __async$
|
|
21476
|
+
var __async$r = (__this, __arguments, generator) => {
|
|
21475
21477
|
return new Promise((resolve, reject) => {
|
|
21476
21478
|
var fulfilled = (value) => {
|
|
21477
21479
|
try {
|
|
@@ -21496,7 +21498,7 @@ function lunkwillCheckResponse(lwResp) {
|
|
|
21496
21498
|
return ct !== void 0 && ct !== null && ct.includes("application/vnd.lunkwill.request-summary+json");
|
|
21497
21499
|
}
|
|
21498
21500
|
function responseJson(response) {
|
|
21499
|
-
return __async$
|
|
21501
|
+
return __async$r(this, null, function* () {
|
|
21500
21502
|
try {
|
|
21501
21503
|
return response.json();
|
|
21502
21504
|
} catch (e) {
|
|
@@ -21505,7 +21507,7 @@ function responseJson(response) {
|
|
|
21505
21507
|
});
|
|
21506
21508
|
}
|
|
21507
21509
|
function lunkwillResponseUrl(lwResp) {
|
|
21508
|
-
return __async$
|
|
21510
|
+
return __async$r(this, null, function* () {
|
|
21509
21511
|
const lwData = yield responseJson(lwResp);
|
|
21510
21512
|
let delay = lwData.delay_ms;
|
|
21511
21513
|
const retry = lwData.retry_ms !== void 0 ? lwData.retry_ms : 2e3;
|
|
@@ -21549,7 +21551,7 @@ function lunkwillResponseUrl(lwResp) {
|
|
|
21549
21551
|
});
|
|
21550
21552
|
}
|
|
21551
21553
|
function lunkwillFetch(lwRespUrl) {
|
|
21552
|
-
return __async$
|
|
21554
|
+
return __async$r(this, null, function* () {
|
|
21553
21555
|
try {
|
|
21554
21556
|
return yield window.fetch(lwRespUrl, { credentials: "same-origin" });
|
|
21555
21557
|
} catch (e) {
|
|
@@ -21597,14 +21599,14 @@ function generateUrl(path, query) {
|
|
|
21597
21599
|
return path + urlParams;
|
|
21598
21600
|
}
|
|
21599
21601
|
function request(path, options, cacheEngine) {
|
|
21600
|
-
return __async$
|
|
21602
|
+
return __async$r(this, null, function* () {
|
|
21601
21603
|
var _b, _c;
|
|
21602
21604
|
const defaults = {
|
|
21603
21605
|
method: "GET",
|
|
21604
21606
|
credentials: "same-origin",
|
|
21605
21607
|
headers: {}
|
|
21606
21608
|
};
|
|
21607
|
-
const _a = __spreadValues$
|
|
21609
|
+
const _a = __spreadValues$s(__spreadValues$s({}, defaults), options), {
|
|
21608
21610
|
withCredentials,
|
|
21609
21611
|
responseType,
|
|
21610
21612
|
cacheProps,
|
|
@@ -21641,7 +21643,7 @@ function request(path, options, cacheEngine) {
|
|
|
21641
21643
|
opt.headers = headers;
|
|
21642
21644
|
}
|
|
21643
21645
|
const url = generateUrl(path, query);
|
|
21644
|
-
const makeRequest = () => __async$
|
|
21646
|
+
const makeRequest = () => __async$r(null, null, function* () {
|
|
21645
21647
|
let response;
|
|
21646
21648
|
try {
|
|
21647
21649
|
response = yield fetch(url, opt);
|
|
@@ -21684,7 +21686,7 @@ function request(path, options, cacheEngine) {
|
|
|
21684
21686
|
if (cacheEngine) {
|
|
21685
21687
|
if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
|
|
21686
21688
|
if (cache !== false) {
|
|
21687
|
-
const props = cacheProps ? cacheProps : __spreadValues$
|
|
21689
|
+
const props = cacheProps ? cacheProps : __spreadValues$s({}, objectRemoveEmpty({
|
|
21688
21690
|
withCredentials,
|
|
21689
21691
|
responseType
|
|
21690
21692
|
}));
|
|
@@ -21704,38 +21706,38 @@ function request(path, options, cacheEngine) {
|
|
|
21704
21706
|
});
|
|
21705
21707
|
}
|
|
21706
21708
|
|
|
21707
|
-
var __defProp$
|
|
21708
|
-
var __defProps$
|
|
21709
|
-
var __getOwnPropDescs$
|
|
21710
|
-
var __getOwnPropSymbols$
|
|
21711
|
-
var __hasOwnProp$
|
|
21712
|
-
var __propIsEnum$
|
|
21713
|
-
var __defNormalProp$
|
|
21714
|
-
var __spreadValues$
|
|
21709
|
+
var __defProp$x = Object.defineProperty;
|
|
21710
|
+
var __defProps$k = Object.defineProperties;
|
|
21711
|
+
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
21712
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
21713
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
21714
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
21715
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21716
|
+
var __spreadValues$r = (a, b) => {
|
|
21715
21717
|
for (var prop in b || (b = {}))
|
|
21716
|
-
if (__hasOwnProp$
|
|
21717
|
-
__defNormalProp$
|
|
21718
|
-
if (__getOwnPropSymbols$
|
|
21719
|
-
for (var prop of __getOwnPropSymbols$
|
|
21720
|
-
if (__propIsEnum$
|
|
21721
|
-
__defNormalProp$
|
|
21718
|
+
if (__hasOwnProp$r.call(b, prop))
|
|
21719
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
21720
|
+
if (__getOwnPropSymbols$r)
|
|
21721
|
+
for (var prop of __getOwnPropSymbols$r(b)) {
|
|
21722
|
+
if (__propIsEnum$r.call(b, prop))
|
|
21723
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
21722
21724
|
}
|
|
21723
21725
|
return a;
|
|
21724
21726
|
};
|
|
21725
|
-
var __spreadProps$
|
|
21727
|
+
var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
|
|
21726
21728
|
var __objRest$4 = (source, exclude) => {
|
|
21727
21729
|
var target = {};
|
|
21728
21730
|
for (var prop in source)
|
|
21729
|
-
if (__hasOwnProp$
|
|
21731
|
+
if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21730
21732
|
target[prop] = source[prop];
|
|
21731
|
-
if (source != null && __getOwnPropSymbols$
|
|
21732
|
-
for (var prop of __getOwnPropSymbols$
|
|
21733
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
21733
|
+
if (source != null && __getOwnPropSymbols$r)
|
|
21734
|
+
for (var prop of __getOwnPropSymbols$r(source)) {
|
|
21735
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
|
|
21734
21736
|
target[prop] = source[prop];
|
|
21735
21737
|
}
|
|
21736
21738
|
return target;
|
|
21737
21739
|
};
|
|
21738
|
-
var __async$
|
|
21740
|
+
var __async$q = (__this, __arguments, generator) => {
|
|
21739
21741
|
return new Promise((resolve, reject) => {
|
|
21740
21742
|
var fulfilled = (value) => {
|
|
21741
21743
|
try {
|
|
@@ -21786,7 +21788,7 @@ function routeURL(name, baseUrl, routeData, ...rest) {
|
|
|
21786
21788
|
}
|
|
21787
21789
|
function route(name, connector, ...rest) {
|
|
21788
21790
|
const result = {
|
|
21789
|
-
url: (opt) => __async$
|
|
21791
|
+
url: (opt) => __async$q(null, null, function* () {
|
|
21790
21792
|
var _a;
|
|
21791
21793
|
const routeData = yield connector.connect();
|
|
21792
21794
|
const template = routeURL(
|
|
@@ -21814,10 +21816,10 @@ function route(name, connector, ...rest) {
|
|
|
21814
21816
|
routeData,
|
|
21815
21817
|
...rest
|
|
21816
21818
|
);
|
|
21817
|
-
const headers = objectRemoveEmpty(__spreadValues$
|
|
21819
|
+
const headers = objectRemoveEmpty(__spreadValues$r(__spreadValues$r({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
|
|
21818
21820
|
return request(
|
|
21819
21821
|
template,
|
|
21820
|
-
__spreadProps$
|
|
21822
|
+
__spreadProps$k(__spreadValues$r({
|
|
21821
21823
|
headers
|
|
21822
21824
|
}, restOpt), {
|
|
21823
21825
|
method
|
|
@@ -21941,39 +21943,39 @@ function removeConnector(connector) {
|
|
|
21941
21943
|
}
|
|
21942
21944
|
}
|
|
21943
21945
|
|
|
21944
|
-
var __defProp$
|
|
21945
|
-
var __defProps$
|
|
21946
|
-
var __getOwnPropDescs$
|
|
21947
|
-
var __getOwnPropSymbols$
|
|
21948
|
-
var __hasOwnProp$
|
|
21949
|
-
var __propIsEnum$
|
|
21950
|
-
var __defNormalProp$
|
|
21951
|
-
var __spreadValues$
|
|
21946
|
+
var __defProp$w = Object.defineProperty;
|
|
21947
|
+
var __defProps$j = Object.defineProperties;
|
|
21948
|
+
var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
|
|
21949
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
21950
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
21951
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
21952
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21953
|
+
var __spreadValues$q = (a, b) => {
|
|
21952
21954
|
for (var prop in b || (b = {}))
|
|
21953
|
-
if (__hasOwnProp$
|
|
21954
|
-
__defNormalProp$
|
|
21955
|
-
if (__getOwnPropSymbols$
|
|
21956
|
-
for (var prop of __getOwnPropSymbols$
|
|
21957
|
-
if (__propIsEnum$
|
|
21958
|
-
__defNormalProp$
|
|
21955
|
+
if (__hasOwnProp$q.call(b, prop))
|
|
21956
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
21957
|
+
if (__getOwnPropSymbols$q)
|
|
21958
|
+
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
21959
|
+
if (__propIsEnum$q.call(b, prop))
|
|
21960
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
21959
21961
|
}
|
|
21960
21962
|
return a;
|
|
21961
21963
|
};
|
|
21962
|
-
var __spreadProps$
|
|
21964
|
+
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
|
|
21963
21965
|
var __objRest$3 = (source, exclude) => {
|
|
21964
21966
|
var target = {};
|
|
21965
21967
|
for (var prop in source)
|
|
21966
|
-
if (__hasOwnProp$
|
|
21968
|
+
if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21967
21969
|
target[prop] = source[prop];
|
|
21968
|
-
if (source != null && __getOwnPropSymbols$
|
|
21969
|
-
for (var prop of __getOwnPropSymbols$
|
|
21970
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
21970
|
+
if (source != null && __getOwnPropSymbols$q)
|
|
21971
|
+
for (var prop of __getOwnPropSymbols$q(source)) {
|
|
21972
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
|
|
21971
21973
|
target[prop] = source[prop];
|
|
21972
21974
|
}
|
|
21973
21975
|
return target;
|
|
21974
21976
|
};
|
|
21975
|
-
var __publicField$
|
|
21976
|
-
var __async$
|
|
21977
|
+
var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21978
|
+
var __async$p = (__this, __arguments, generator) => {
|
|
21977
21979
|
return new Promise((resolve, reject) => {
|
|
21978
21980
|
var fulfilled = (value) => {
|
|
21979
21981
|
try {
|
|
@@ -21998,18 +22000,18 @@ let REQUEST_ID = 0;
|
|
|
21998
22000
|
class NgwConnector {
|
|
21999
22001
|
constructor(options) {
|
|
22000
22002
|
this.options = options;
|
|
22001
|
-
__publicField$
|
|
22002
|
-
__publicField$
|
|
22003
|
-
__publicField$
|
|
22004
|
-
__publicField$
|
|
22005
|
-
__publicField$
|
|
22003
|
+
__publicField$l(this, "id", ID$1++);
|
|
22004
|
+
__publicField$l(this, "emitter", new EventEmitter());
|
|
22005
|
+
__publicField$l(this, "user");
|
|
22006
|
+
__publicField$l(this, "cache");
|
|
22007
|
+
__publicField$l(this, "withCredentials");
|
|
22006
22008
|
// Dedicated cache for route requests, as these are executed before any other requests.
|
|
22007
22009
|
// This cache does not need to be cleared during the session.
|
|
22008
|
-
__publicField$
|
|
22009
|
-
__publicField$
|
|
22010
|
-
__publicField$
|
|
22011
|
-
__publicField$
|
|
22012
|
-
__publicField$
|
|
22010
|
+
__publicField$l(this, "routeCache");
|
|
22011
|
+
__publicField$l(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
|
|
22012
|
+
__publicField$l(this, "routeStr", "/api/component/pyramid/route");
|
|
22013
|
+
__publicField$l(this, "activeRequests", {});
|
|
22014
|
+
__publicField$l(this, "requestTransform");
|
|
22013
22015
|
const exist = findConnector(options);
|
|
22014
22016
|
this.cache = new Cache({ namespace: options.cacheId });
|
|
22015
22017
|
this.routeCache = new Cache({ namespace: "routecache" });
|
|
@@ -22062,7 +22064,7 @@ class NgwConnector {
|
|
|
22062
22064
|
* ```
|
|
22063
22065
|
*/
|
|
22064
22066
|
connect() {
|
|
22065
|
-
return __async$
|
|
22067
|
+
return __async$p(this, arguments, function* ({
|
|
22066
22068
|
signal
|
|
22067
22069
|
} = {}) {
|
|
22068
22070
|
const auth = this.options.auth;
|
|
@@ -22101,14 +22103,14 @@ class NgwConnector {
|
|
|
22101
22103
|
this.emitter.emit("logout");
|
|
22102
22104
|
}
|
|
22103
22105
|
getUserInfo(credentials, options) {
|
|
22104
|
-
return __async$
|
|
22106
|
+
return __async$p(this, null, function* () {
|
|
22105
22107
|
if (this.user && this.user.id) {
|
|
22106
22108
|
return this.user;
|
|
22107
22109
|
}
|
|
22108
22110
|
if (credentials) {
|
|
22109
22111
|
this.options.auth = credentials;
|
|
22110
22112
|
}
|
|
22111
|
-
const options_ = __spreadValues$
|
|
22113
|
+
const options_ = __spreadValues$q({
|
|
22112
22114
|
headers: this.getAuthorizationHeaders(credentials),
|
|
22113
22115
|
cache: true
|
|
22114
22116
|
}, options);
|
|
@@ -22149,7 +22151,7 @@ class NgwConnector {
|
|
|
22149
22151
|
this.activeRequests = {};
|
|
22150
22152
|
}
|
|
22151
22153
|
getActiveApiRequests() {
|
|
22152
|
-
return __spreadValues$
|
|
22154
|
+
return __spreadValues$q({}, this.activeRequests);
|
|
22153
22155
|
}
|
|
22154
22156
|
route(name, ...rest) {
|
|
22155
22157
|
return route(name, this, ...rest);
|
|
@@ -22161,7 +22163,7 @@ class NgwConnector {
|
|
|
22161
22163
|
* @param options - Request options
|
|
22162
22164
|
*/
|
|
22163
22165
|
makeQuery(_0, _1) {
|
|
22164
|
-
return __async$
|
|
22166
|
+
return __async$p(this, arguments, function* (url, params, options = {}) {
|
|
22165
22167
|
var _b;
|
|
22166
22168
|
url = (this.options.baseUrl ? this.options.baseUrl : "") + url;
|
|
22167
22169
|
if (!url) {
|
|
@@ -22172,7 +22174,7 @@ class NgwConnector {
|
|
|
22172
22174
|
url = template(url, restParams);
|
|
22173
22175
|
}
|
|
22174
22176
|
url = encodeURI(fixUrlStr(url));
|
|
22175
|
-
options = __spreadValues$
|
|
22177
|
+
options = __spreadValues$q({ withCredentials: this.withCredentials }, options);
|
|
22176
22178
|
const {
|
|
22177
22179
|
cache,
|
|
22178
22180
|
signal: externalSignal,
|
|
@@ -22194,7 +22196,7 @@ class NgwConnector {
|
|
|
22194
22196
|
});
|
|
22195
22197
|
}
|
|
22196
22198
|
options.signal = internalSignal;
|
|
22197
|
-
const createPromise = () => __async$
|
|
22199
|
+
const createPromise = () => __async$p(this, null, function* () {
|
|
22198
22200
|
const id = REQUEST_ID++;
|
|
22199
22201
|
this.activeRequests[id] = internalAbortController;
|
|
22200
22202
|
try {
|
|
@@ -22204,7 +22206,7 @@ class NgwConnector {
|
|
|
22204
22206
|
}
|
|
22205
22207
|
});
|
|
22206
22208
|
if (method === "GET" && cache !== false) {
|
|
22207
|
-
const cacheOptions = cacheProps ? cacheProps : __spreadProps$
|
|
22209
|
+
const cacheOptions = cacheProps ? cacheProps : __spreadProps$j(__spreadValues$q({}, objectRemoveEmpty({
|
|
22208
22210
|
headers,
|
|
22209
22211
|
withCredentials,
|
|
22210
22212
|
responseType,
|
|
@@ -22227,7 +22229,7 @@ class NgwConnector {
|
|
|
22227
22229
|
var _a;
|
|
22228
22230
|
if (this.user) {
|
|
22229
22231
|
options = options || {};
|
|
22230
|
-
options.headers = __spreadValues$
|
|
22232
|
+
options.headers = __spreadValues$q(__spreadValues$q({}, this.getAuthorizationHeaders()), options.headers);
|
|
22231
22233
|
}
|
|
22232
22234
|
if (this.requestTransform) {
|
|
22233
22235
|
const [transUrl, transOptions] = this.requestTransform(url, options);
|
|
@@ -22258,7 +22260,7 @@ class NgwConnector {
|
|
|
22258
22260
|
});
|
|
22259
22261
|
}
|
|
22260
22262
|
_login(credentials, options) {
|
|
22261
|
-
return __async$
|
|
22263
|
+
return __async$p(this, null, function* () {
|
|
22262
22264
|
try {
|
|
22263
22265
|
const data = yield this.getUserInfo(credentials, options);
|
|
22264
22266
|
this.user = data;
|
|
@@ -22286,7 +22288,7 @@ class NgwConnector {
|
|
|
22286
22288
|
return er;
|
|
22287
22289
|
}
|
|
22288
22290
|
}
|
|
22289
|
-
__publicField$
|
|
22291
|
+
__publicField$l(NgwConnector, "errors", errors);
|
|
22290
22292
|
|
|
22291
22293
|
function resourceCompare(res1, res2) {
|
|
22292
22294
|
return objectDeepEqual(res1, res2);
|
|
@@ -22316,27 +22318,27 @@ function resourceToQuery(resource, prefix = "") {
|
|
|
22316
22318
|
return query;
|
|
22317
22319
|
}
|
|
22318
22320
|
|
|
22319
|
-
var __defProp$
|
|
22320
|
-
var __defProps$
|
|
22321
|
-
var __getOwnPropDescs$
|
|
22322
|
-
var __getOwnPropSymbols$
|
|
22323
|
-
var __hasOwnProp$
|
|
22324
|
-
var __propIsEnum$
|
|
22325
|
-
var __defNormalProp$
|
|
22326
|
-
var __spreadValues$
|
|
22321
|
+
var __defProp$v = Object.defineProperty;
|
|
22322
|
+
var __defProps$i = Object.defineProperties;
|
|
22323
|
+
var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
|
|
22324
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
22325
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
22326
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
22327
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22328
|
+
var __spreadValues$p = (a, b) => {
|
|
22327
22329
|
for (var prop in b || (b = {}))
|
|
22328
|
-
if (__hasOwnProp$
|
|
22329
|
-
__defNormalProp$
|
|
22330
|
-
if (__getOwnPropSymbols$
|
|
22331
|
-
for (var prop of __getOwnPropSymbols$
|
|
22332
|
-
if (__propIsEnum$
|
|
22333
|
-
__defNormalProp$
|
|
22330
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
22331
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
22332
|
+
if (__getOwnPropSymbols$p)
|
|
22333
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
22334
|
+
if (__propIsEnum$p.call(b, prop))
|
|
22335
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
22334
22336
|
}
|
|
22335
22337
|
return a;
|
|
22336
22338
|
};
|
|
22337
|
-
var __spreadProps$
|
|
22338
|
-
var __publicField$
|
|
22339
|
-
var __async$
|
|
22339
|
+
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
22340
|
+
var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22341
|
+
var __async$o = (__this, __arguments, generator) => {
|
|
22340
22342
|
return new Promise((resolve, reject) => {
|
|
22341
22343
|
var fulfilled = (value) => {
|
|
22342
22344
|
try {
|
|
@@ -22361,8 +22363,8 @@ class ResourcesControl {
|
|
|
22361
22363
|
connector,
|
|
22362
22364
|
cacheId
|
|
22363
22365
|
}) {
|
|
22364
|
-
__publicField$
|
|
22365
|
-
__publicField$
|
|
22366
|
+
__publicField$k(this, "cache");
|
|
22367
|
+
__publicField$k(this, "connector");
|
|
22366
22368
|
this.connector = connector;
|
|
22367
22369
|
this.cache = new Cache({ namespace: cacheId });
|
|
22368
22370
|
}
|
|
@@ -22377,7 +22379,7 @@ class ResourcesControl {
|
|
|
22377
22379
|
* Fetching resource would be cached to speed up next call
|
|
22378
22380
|
*/
|
|
22379
22381
|
getOne(resource, requestOptions) {
|
|
22380
|
-
const opt = __spreadValues$
|
|
22382
|
+
const opt = __spreadValues$p({}, requestOptions);
|
|
22381
22383
|
if (typeof resource === "string") ; else if (typeof resource === "number") ; else if (isObject(resource)) {
|
|
22382
22384
|
if (resource.id !== void 0) {
|
|
22383
22385
|
resource.id;
|
|
@@ -22454,8 +22456,8 @@ class ResourcesControl {
|
|
|
22454
22456
|
} else {
|
|
22455
22457
|
Object.assign(query, resourceToQuery(resource));
|
|
22456
22458
|
}
|
|
22457
|
-
return this.connector.route("resource.search").get(__spreadProps$
|
|
22458
|
-
query: __spreadValues$
|
|
22459
|
+
return this.connector.route("resource.search").get(__spreadProps$i(__spreadValues$p({}, requestOptions), {
|
|
22460
|
+
query: __spreadValues$p({
|
|
22459
22461
|
serialization: "full"
|
|
22460
22462
|
}, query)
|
|
22461
22463
|
})).then((resources) => {
|
|
@@ -22508,7 +22510,7 @@ class ResourcesControl {
|
|
|
22508
22510
|
});
|
|
22509
22511
|
}
|
|
22510
22512
|
_getChildrenOf(_0, _1) {
|
|
22511
|
-
return __async$
|
|
22513
|
+
return __async$o(this, arguments, function* (parentDef, requestOptions, _items = []) {
|
|
22512
22514
|
let parent = void 0;
|
|
22513
22515
|
if (typeof parentDef === "string") {
|
|
22514
22516
|
parent = yield this.getId(parentDef, requestOptions);
|
|
@@ -22517,7 +22519,7 @@ class ResourcesControl {
|
|
|
22517
22519
|
} else {
|
|
22518
22520
|
parent = parentDef;
|
|
22519
22521
|
}
|
|
22520
|
-
const items = yield this.connector.route("resource.collection").get(__spreadProps$
|
|
22522
|
+
const items = yield this.connector.route("resource.collection").get(__spreadProps$i(__spreadValues$p({}, requestOptions), {
|
|
22521
22523
|
query: {
|
|
22522
22524
|
parent
|
|
22523
22525
|
}
|
|
@@ -22545,7 +22547,7 @@ class ResourcesControl {
|
|
|
22545
22547
|
});
|
|
22546
22548
|
}
|
|
22547
22549
|
_cleanResourceItemCache(id) {
|
|
22548
|
-
return __async$
|
|
22550
|
+
return __async$o(this, null, function* () {
|
|
22549
22551
|
var _a;
|
|
22550
22552
|
const all = this.cache.all();
|
|
22551
22553
|
const toDelete = [];
|
|
@@ -22598,13 +22600,13 @@ class ResourcesControl {
|
|
|
22598
22600
|
}
|
|
22599
22601
|
}
|
|
22600
22602
|
|
|
22601
|
-
var __defProp$
|
|
22602
|
-
var __defNormalProp$
|
|
22603
|
-
var __publicField$
|
|
22603
|
+
var __defProp$u = Object.defineProperty;
|
|
22604
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22605
|
+
var __publicField$j = (obj, key, value) => __defNormalProp$u(obj, key + "" , value);
|
|
22604
22606
|
class NgwConnectorExtended extends NgwConnector {
|
|
22605
22607
|
constructor(options) {
|
|
22606
22608
|
super(options);
|
|
22607
|
-
__publicField$
|
|
22609
|
+
__publicField$j(this, "resources");
|
|
22608
22610
|
this.resources = new ResourcesControl({
|
|
22609
22611
|
connector: this,
|
|
22610
22612
|
cacheId: options.cacheId
|
|
@@ -22814,25 +22816,25 @@ class NgwConnectorExtended extends NgwConnector {
|
|
|
22814
22816
|
}
|
|
22815
22817
|
}
|
|
22816
22818
|
|
|
22817
|
-
var __defProp$
|
|
22818
|
-
var __defProps$
|
|
22819
|
-
var __getOwnPropDescs$
|
|
22820
|
-
var __getOwnPropSymbols$
|
|
22821
|
-
var __hasOwnProp$
|
|
22822
|
-
var __propIsEnum$
|
|
22823
|
-
var __defNormalProp$
|
|
22824
|
-
var __spreadValues$
|
|
22819
|
+
var __defProp$t = Object.defineProperty;
|
|
22820
|
+
var __defProps$h = Object.defineProperties;
|
|
22821
|
+
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
22822
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
22823
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
22824
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
22825
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22826
|
+
var __spreadValues$o = (a, b) => {
|
|
22825
22827
|
for (var prop in b || (b = {}))
|
|
22826
|
-
if (__hasOwnProp$
|
|
22827
|
-
__defNormalProp$
|
|
22828
|
-
if (__getOwnPropSymbols$
|
|
22829
|
-
for (var prop of __getOwnPropSymbols$
|
|
22830
|
-
if (__propIsEnum$
|
|
22831
|
-
__defNormalProp$
|
|
22828
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
22829
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
22830
|
+
if (__getOwnPropSymbols$o)
|
|
22831
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
22832
|
+
if (__propIsEnum$o.call(b, prop))
|
|
22833
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
22832
22834
|
}
|
|
22833
22835
|
return a;
|
|
22834
22836
|
};
|
|
22835
|
-
var __spreadProps$
|
|
22837
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
22836
22838
|
function getNgwWebmapExtent(webmap) {
|
|
22837
22839
|
const bottom = webmap["extent_bottom"];
|
|
22838
22840
|
const left = webmap["extent_left"];
|
|
@@ -22899,14 +22901,14 @@ function fetchNgwResourceExtent(item, connector, options) {
|
|
|
22899
22901
|
if (resource.cls && resource.parent && resource.cls.indexOf("style") !== -1) {
|
|
22900
22902
|
return connector.getResource(resource.parent.id, options).then((res) => {
|
|
22901
22903
|
if (res) {
|
|
22902
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
22904
|
+
return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$o({}, options), {
|
|
22903
22905
|
resourceId: res.resource.id,
|
|
22904
22906
|
connector
|
|
22905
22907
|
}));
|
|
22906
22908
|
}
|
|
22907
22909
|
});
|
|
22908
22910
|
} else {
|
|
22909
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
22911
|
+
return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$o({}, options), {
|
|
22910
22912
|
resourceId: resource.id,
|
|
22911
22913
|
connector
|
|
22912
22914
|
}));
|
|
@@ -22914,10 +22916,10 @@ function fetchNgwResourceExtent(item, connector, options) {
|
|
|
22914
22916
|
}
|
|
22915
22917
|
}
|
|
22916
22918
|
|
|
22917
|
-
var __defProp$
|
|
22918
|
-
var __defNormalProp$
|
|
22919
|
-
var __publicField$
|
|
22920
|
-
var __async$
|
|
22919
|
+
var __defProp$s = Object.defineProperty;
|
|
22920
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22921
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22922
|
+
var __async$n = (__this, __arguments, generator) => {
|
|
22921
22923
|
return new Promise((resolve, reject) => {
|
|
22922
22924
|
var fulfilled = (value) => {
|
|
22923
22925
|
try {
|
|
@@ -22939,18 +22941,18 @@ var __async$m = (__this, __arguments, generator) => {
|
|
|
22939
22941
|
};
|
|
22940
22942
|
class NgwResource {
|
|
22941
22943
|
constructor() {
|
|
22942
|
-
__publicField$
|
|
22943
|
-
__publicField$
|
|
22944
|
-
__publicField$
|
|
22944
|
+
__publicField$i(this, "item");
|
|
22945
|
+
__publicField$i(this, "connector");
|
|
22946
|
+
__publicField$i(this, "_extent");
|
|
22945
22947
|
}
|
|
22946
22948
|
/** @deprecated use {@link NgwResource.getBounds} instead */
|
|
22947
22949
|
getExtent() {
|
|
22948
|
-
return __async$
|
|
22950
|
+
return __async$n(this, null, function* () {
|
|
22949
22951
|
return this.getBounds();
|
|
22950
22952
|
});
|
|
22951
22953
|
}
|
|
22952
22954
|
getBounds(options) {
|
|
22953
|
-
return __async$
|
|
22955
|
+
return __async$n(this, null, function* () {
|
|
22954
22956
|
if (this._extent) {
|
|
22955
22957
|
return this._extent;
|
|
22956
22958
|
}
|
|
@@ -22966,7 +22968,7 @@ class NgwResource {
|
|
|
22966
22968
|
}
|
|
22967
22969
|
}
|
|
22968
22970
|
|
|
22969
|
-
var __async$
|
|
22971
|
+
var __async$m = (__this, __arguments, generator) => {
|
|
22970
22972
|
return new Promise((resolve, reject) => {
|
|
22971
22973
|
var fulfilled = (value) => {
|
|
22972
22974
|
try {
|
|
@@ -22987,7 +22989,7 @@ var __async$l = (__this, __arguments, generator) => {
|
|
|
22987
22989
|
});
|
|
22988
22990
|
};
|
|
22989
22991
|
function resourceIdFromLayerOptions(options, connector) {
|
|
22990
|
-
return __async$
|
|
22992
|
+
return __async$m(this, null, function* () {
|
|
22991
22993
|
const resource = options.resource;
|
|
22992
22994
|
const item = resource;
|
|
22993
22995
|
let { keyname, resourceId } = options;
|
|
@@ -23012,24 +23014,24 @@ function resourceIdFromLayerOptions(options, connector) {
|
|
|
23012
23014
|
});
|
|
23013
23015
|
}
|
|
23014
23016
|
|
|
23015
|
-
var __defProp$
|
|
23016
|
-
var __getOwnPropSymbols$
|
|
23017
|
-
var __hasOwnProp$
|
|
23018
|
-
var __propIsEnum$
|
|
23019
|
-
var __defNormalProp$
|
|
23020
|
-
var __spreadValues$
|
|
23017
|
+
var __defProp$r = Object.defineProperty;
|
|
23018
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
23019
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
23020
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
23021
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23022
|
+
var __spreadValues$n = (a, b) => {
|
|
23021
23023
|
for (var prop in b || (b = {}))
|
|
23022
|
-
if (__hasOwnProp$
|
|
23023
|
-
__defNormalProp$
|
|
23024
|
-
if (__getOwnPropSymbols$
|
|
23025
|
-
for (var prop of __getOwnPropSymbols$
|
|
23026
|
-
if (__propIsEnum$
|
|
23027
|
-
__defNormalProp$
|
|
23024
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
23025
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
23026
|
+
if (__getOwnPropSymbols$n)
|
|
23027
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
23028
|
+
if (__propIsEnum$n.call(b, prop))
|
|
23029
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
23028
23030
|
}
|
|
23029
23031
|
return a;
|
|
23030
23032
|
};
|
|
23031
|
-
var __publicField$
|
|
23032
|
-
var __async$
|
|
23033
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23034
|
+
var __async$l = (__this, __arguments, generator) => {
|
|
23033
23035
|
return new Promise((resolve, reject) => {
|
|
23034
23036
|
var fulfilled = (value) => {
|
|
23035
23037
|
try {
|
|
@@ -23050,7 +23052,7 @@ var __async$k = (__this, __arguments, generator) => {
|
|
|
23050
23052
|
});
|
|
23051
23053
|
};
|
|
23052
23054
|
function createOnFirstShowAdapter(_0) {
|
|
23053
|
-
return __async$
|
|
23055
|
+
return __async$l(this, arguments, function* ({
|
|
23054
23056
|
webMap,
|
|
23055
23057
|
adapterOptions = {},
|
|
23056
23058
|
onLayerAdded,
|
|
@@ -23058,10 +23060,10 @@ function createOnFirstShowAdapter(_0) {
|
|
|
23058
23060
|
}) {
|
|
23059
23061
|
class OnFirstShowAdapter {
|
|
23060
23062
|
constructor() {
|
|
23061
|
-
__publicField$
|
|
23062
|
-
__publicField$
|
|
23063
|
-
__publicField$
|
|
23064
|
-
__publicField$
|
|
23063
|
+
__publicField$h(this, "options", {});
|
|
23064
|
+
__publicField$h(this, "layer", []);
|
|
23065
|
+
__publicField$h(this, "_removed", false);
|
|
23066
|
+
__publicField$h(this, "_creatingInProgress", false);
|
|
23065
23067
|
}
|
|
23066
23068
|
addLayer() {
|
|
23067
23069
|
return this.layer;
|
|
@@ -23076,7 +23078,7 @@ function createOnFirstShowAdapter(_0) {
|
|
|
23076
23078
|
return this._removed;
|
|
23077
23079
|
}
|
|
23078
23080
|
showLayer() {
|
|
23079
|
-
return __async$
|
|
23081
|
+
return __async$l(this, null, function* () {
|
|
23080
23082
|
this.options.visibility = true;
|
|
23081
23083
|
if (this.layer.length) {
|
|
23082
23084
|
for (const x of this.layer) {
|
|
@@ -23088,7 +23090,7 @@ function createOnFirstShowAdapter(_0) {
|
|
|
23088
23090
|
});
|
|
23089
23091
|
}
|
|
23090
23092
|
hideLayer() {
|
|
23091
|
-
return __async$
|
|
23093
|
+
return __async$l(this, null, function* () {
|
|
23092
23094
|
this.options.visibility = false;
|
|
23093
23095
|
if (this.layer) {
|
|
23094
23096
|
for (const x of this.layer) {
|
|
@@ -23098,12 +23100,12 @@ function createOnFirstShowAdapter(_0) {
|
|
|
23098
23100
|
});
|
|
23099
23101
|
}
|
|
23100
23102
|
loadLayer() {
|
|
23101
|
-
return __async$
|
|
23103
|
+
return __async$l(this, null, function* () {
|
|
23102
23104
|
if (!this.layer.length && !this._creatingInProgress) {
|
|
23103
23105
|
this._creatingInProgress = true;
|
|
23104
23106
|
const Adapter = yield createAdapter(this);
|
|
23105
23107
|
if (Adapter) {
|
|
23106
|
-
const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$
|
|
23108
|
+
const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$n({}, adapterOptions));
|
|
23107
23109
|
const realLayer = yield adapter.addLayer({
|
|
23108
23110
|
order: this.options.order,
|
|
23109
23111
|
headers: this.options.headers,
|
|
@@ -23132,7 +23134,7 @@ function createOnFirstShowAdapter(_0) {
|
|
|
23132
23134
|
});
|
|
23133
23135
|
}
|
|
23134
23136
|
|
|
23135
|
-
var __async$
|
|
23137
|
+
var __async$k = (__this, __arguments, generator) => {
|
|
23136
23138
|
return new Promise((resolve, reject) => {
|
|
23137
23139
|
var fulfilled = (value) => {
|
|
23138
23140
|
try {
|
|
@@ -23153,7 +23155,7 @@ var __async$j = (__this, __arguments, generator) => {
|
|
|
23153
23155
|
});
|
|
23154
23156
|
};
|
|
23155
23157
|
function createOnFirstShowNgwAdapter(_0) {
|
|
23156
|
-
return __async$
|
|
23158
|
+
return __async$k(this, arguments, function* ({
|
|
23157
23159
|
webMap,
|
|
23158
23160
|
connector,
|
|
23159
23161
|
item,
|
|
@@ -23187,26 +23189,26 @@ function createOnFirstShowNgwAdapter(_0) {
|
|
|
23187
23189
|
});
|
|
23188
23190
|
}
|
|
23189
23191
|
|
|
23190
|
-
var __defProp$
|
|
23191
|
-
var __defProps$
|
|
23192
|
-
var __getOwnPropDescs$
|
|
23193
|
-
var __getOwnPropSymbols$
|
|
23194
|
-
var __hasOwnProp$
|
|
23195
|
-
var __propIsEnum$
|
|
23196
|
-
var __defNormalProp$
|
|
23197
|
-
var __spreadValues$
|
|
23192
|
+
var __defProp$q = Object.defineProperty;
|
|
23193
|
+
var __defProps$g = Object.defineProperties;
|
|
23194
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
23195
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
23196
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
23197
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
23198
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23199
|
+
var __spreadValues$m = (a, b) => {
|
|
23198
23200
|
for (var prop in b || (b = {}))
|
|
23199
|
-
if (__hasOwnProp$
|
|
23200
|
-
__defNormalProp$
|
|
23201
|
-
if (__getOwnPropSymbols$
|
|
23202
|
-
for (var prop of __getOwnPropSymbols$
|
|
23203
|
-
if (__propIsEnum$
|
|
23204
|
-
__defNormalProp$
|
|
23201
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
23202
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
23203
|
+
if (__getOwnPropSymbols$m)
|
|
23204
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
23205
|
+
if (__propIsEnum$m.call(b, prop))
|
|
23206
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
23205
23207
|
}
|
|
23206
23208
|
return a;
|
|
23207
23209
|
};
|
|
23208
|
-
var __spreadProps$
|
|
23209
|
-
var __async$
|
|
23210
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
23211
|
+
var __async$j = (__this, __arguments, generator) => {
|
|
23210
23212
|
return new Promise((resolve, reject) => {
|
|
23211
23213
|
var fulfilled = (value) => {
|
|
23212
23214
|
try {
|
|
@@ -23273,7 +23275,7 @@ function paramListToQuery(paramList) {
|
|
|
23273
23275
|
);
|
|
23274
23276
|
}
|
|
23275
23277
|
function createFeatureFieldFilterQueries(opt) {
|
|
23276
|
-
return __async$
|
|
23278
|
+
return __async$j(this, null, function* () {
|
|
23277
23279
|
const queries = getQueries(opt);
|
|
23278
23280
|
const itemsParts = yield Promise.all(queries);
|
|
23279
23281
|
const ids = [];
|
|
@@ -23317,12 +23319,12 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
23317
23319
|
for (const f of filters_) {
|
|
23318
23320
|
if (isPropertyFilter$1(f)) {
|
|
23319
23321
|
_queries.push(
|
|
23320
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
23322
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$m({}, opt), {
|
|
23321
23323
|
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
23322
23324
|
}))
|
|
23323
23325
|
);
|
|
23324
23326
|
} else {
|
|
23325
|
-
getQueries(__spreadProps$
|
|
23327
|
+
getQueries(__spreadProps$g(__spreadValues$m({}, opt), { filters: f }), _queries, [..._parentAllParams]);
|
|
23326
23328
|
}
|
|
23327
23329
|
}
|
|
23328
23330
|
} else if (logic === "all") {
|
|
@@ -23337,14 +23339,14 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
23337
23339
|
}
|
|
23338
23340
|
if (propertiesFilterList.length) {
|
|
23339
23341
|
for (const x of propertiesFilterList) {
|
|
23340
|
-
getQueries(__spreadProps$
|
|
23342
|
+
getQueries(__spreadProps$g(__spreadValues$m({}, opt), { filters: x }), _queries, [
|
|
23341
23343
|
..._parentAllParams,
|
|
23342
23344
|
...filters2
|
|
23343
23345
|
]);
|
|
23344
23346
|
}
|
|
23345
23347
|
} else {
|
|
23346
23348
|
_queries.push(
|
|
23347
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
23349
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$m({}, opt), {
|
|
23348
23350
|
paramList: [..._parentAllParams, ...paramList, ...filters2]
|
|
23349
23351
|
}))
|
|
23350
23352
|
);
|
|
@@ -23360,7 +23362,7 @@ function createWktFromCoordArray(coord) {
|
|
|
23360
23362
|
return `POLYGON((${polygon.join(", ")}))`;
|
|
23361
23363
|
}
|
|
23362
23364
|
function fetchNgwLayerItemsRequest(options) {
|
|
23363
|
-
const params = __spreadValues$
|
|
23365
|
+
const params = __spreadValues$m({}, FEATURE_REQUEST_PARAMS);
|
|
23364
23366
|
const {
|
|
23365
23367
|
limit,
|
|
23366
23368
|
query,
|
|
@@ -23396,7 +23398,7 @@ function fetchNgwLayerItemsRequest(options) {
|
|
|
23396
23398
|
if (paramList) {
|
|
23397
23399
|
Object.assign(params, paramListToQuery(paramList));
|
|
23398
23400
|
}
|
|
23399
|
-
return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$
|
|
23401
|
+
return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$m(__spreadValues$m({}, params), query), cache, signal });
|
|
23400
23402
|
}
|
|
23401
23403
|
|
|
23402
23404
|
function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
@@ -23425,26 +23427,26 @@ function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
|
23425
23427
|
return fields;
|
|
23426
23428
|
}
|
|
23427
23429
|
|
|
23428
|
-
var __defProp$
|
|
23429
|
-
var __defProps$
|
|
23430
|
-
var __getOwnPropDescs$
|
|
23431
|
-
var __getOwnPropSymbols$
|
|
23432
|
-
var __hasOwnProp$
|
|
23433
|
-
var __propIsEnum$
|
|
23434
|
-
var __defNormalProp$
|
|
23435
|
-
var __spreadValues$
|
|
23430
|
+
var __defProp$p = Object.defineProperty;
|
|
23431
|
+
var __defProps$f = Object.defineProperties;
|
|
23432
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
23433
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
23434
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
23435
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
23436
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23437
|
+
var __spreadValues$l = (a, b) => {
|
|
23436
23438
|
for (var prop in b || (b = {}))
|
|
23437
|
-
if (__hasOwnProp$
|
|
23438
|
-
__defNormalProp$
|
|
23439
|
-
if (__getOwnPropSymbols$
|
|
23440
|
-
for (var prop of __getOwnPropSymbols$
|
|
23441
|
-
if (__propIsEnum$
|
|
23442
|
-
__defNormalProp$
|
|
23439
|
+
if (__hasOwnProp$l.call(b, prop))
|
|
23440
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
23441
|
+
if (__getOwnPropSymbols$l)
|
|
23442
|
+
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
23443
|
+
if (__propIsEnum$l.call(b, prop))
|
|
23444
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
23443
23445
|
}
|
|
23444
23446
|
return a;
|
|
23445
23447
|
};
|
|
23446
|
-
var __spreadProps$
|
|
23447
|
-
var __async$
|
|
23448
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
23449
|
+
var __async$i = (__this, __arguments, generator) => {
|
|
23448
23450
|
return new Promise((resolve, reject) => {
|
|
23449
23451
|
var fulfilled = (value) => {
|
|
23450
23452
|
try {
|
|
@@ -23465,17 +23467,17 @@ var __async$h = (__this, __arguments, generator) => {
|
|
|
23465
23467
|
});
|
|
23466
23468
|
};
|
|
23467
23469
|
function fetchNgwLayerItems(options) {
|
|
23468
|
-
return __async$
|
|
23470
|
+
return __async$i(this, null, function* () {
|
|
23469
23471
|
var _a;
|
|
23470
23472
|
const filters = options.filters;
|
|
23471
23473
|
if (filters) {
|
|
23472
|
-
let data = yield createFeatureFieldFilterQueries(__spreadProps$
|
|
23474
|
+
let data = yield createFeatureFieldFilterQueries(__spreadProps$f(__spreadValues$l({}, options), {
|
|
23473
23475
|
filters
|
|
23474
23476
|
}));
|
|
23475
23477
|
const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
|
|
23476
23478
|
if (clientFilterValidate) {
|
|
23477
23479
|
data = data.filter((y) => {
|
|
23478
|
-
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$
|
|
23480
|
+
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$f(__spreadValues$l({}, y.fields), {
|
|
23479
23481
|
id: y.id
|
|
23480
23482
|
}));
|
|
23481
23483
|
const result = propertiesFilter(fields, filters);
|
|
@@ -23593,26 +23595,26 @@ function ngwApiToAdapterOptions({
|
|
|
23593
23595
|
}
|
|
23594
23596
|
}
|
|
23595
23597
|
|
|
23596
|
-
var __defProp$
|
|
23597
|
-
var __defProps$
|
|
23598
|
-
var __getOwnPropDescs$
|
|
23599
|
-
var __getOwnPropSymbols$
|
|
23600
|
-
var __hasOwnProp$
|
|
23601
|
-
var __propIsEnum$
|
|
23602
|
-
var __defNormalProp$
|
|
23603
|
-
var __spreadValues$
|
|
23598
|
+
var __defProp$o = Object.defineProperty;
|
|
23599
|
+
var __defProps$e = Object.defineProperties;
|
|
23600
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
23601
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
23602
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
23603
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
23604
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23605
|
+
var __spreadValues$k = (a, b) => {
|
|
23604
23606
|
for (var prop in b || (b = {}))
|
|
23605
|
-
if (__hasOwnProp$
|
|
23606
|
-
__defNormalProp$
|
|
23607
|
-
if (__getOwnPropSymbols$
|
|
23608
|
-
for (var prop of __getOwnPropSymbols$
|
|
23609
|
-
if (__propIsEnum$
|
|
23610
|
-
__defNormalProp$
|
|
23607
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
23608
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
23609
|
+
if (__getOwnPropSymbols$k)
|
|
23610
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
23611
|
+
if (__propIsEnum$k.call(b, prop))
|
|
23612
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
23611
23613
|
}
|
|
23612
23614
|
return a;
|
|
23613
23615
|
};
|
|
23614
|
-
var __spreadProps$
|
|
23615
|
-
var __async$
|
|
23616
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
23617
|
+
var __async$h = (__this, __arguments, generator) => {
|
|
23616
23618
|
return new Promise((resolve, reject) => {
|
|
23617
23619
|
var fulfilled = (value) => {
|
|
23618
23620
|
try {
|
|
@@ -23633,56 +23635,56 @@ var __async$g = (__this, __arguments, generator) => {
|
|
|
23633
23635
|
});
|
|
23634
23636
|
};
|
|
23635
23637
|
function fetchNgwLayerItem(options) {
|
|
23636
|
-
return __async$
|
|
23637
|
-
const params = __spreadValues$
|
|
23638
|
+
return __async$h(this, null, function* () {
|
|
23639
|
+
const params = __spreadValues$k({}, FEATURE_REQUEST_PARAMS);
|
|
23638
23640
|
updateItemRequestParam(params, options);
|
|
23639
23641
|
const resp = yield options.connector.route("feature_layer.feature.item", {
|
|
23640
23642
|
id: Number(options.resourceId),
|
|
23641
23643
|
fid: options.featureId
|
|
23642
|
-
}).get(__spreadProps$
|
|
23643
|
-
const toGeojson = () => __async$
|
|
23644
|
+
}).get(__spreadProps$e(__spreadValues$k({}, options), { query: params }));
|
|
23645
|
+
const toGeojson = () => __async$h(null, null, function* () {
|
|
23644
23646
|
if (resp.geom) {
|
|
23645
23647
|
return createGeoJsonFeature(resp);
|
|
23646
23648
|
} else {
|
|
23647
|
-
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$
|
|
23649
|
+
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$k({}, options), {
|
|
23648
23650
|
geom: true,
|
|
23649
23651
|
fields: null,
|
|
23650
23652
|
extensions: null
|
|
23651
23653
|
}));
|
|
23652
23654
|
const geom = onlyGeomItem.geom;
|
|
23653
|
-
return createGeoJsonFeature(__spreadProps$
|
|
23655
|
+
return createGeoJsonFeature(__spreadProps$e(__spreadValues$k({}, resp), { geom }));
|
|
23654
23656
|
}
|
|
23655
23657
|
});
|
|
23656
|
-
return __spreadProps$
|
|
23658
|
+
return __spreadProps$e(__spreadValues$k({}, resp), {
|
|
23657
23659
|
toGeojson
|
|
23658
23660
|
});
|
|
23659
23661
|
});
|
|
23660
23662
|
}
|
|
23661
23663
|
|
|
23662
|
-
var __defProp$
|
|
23663
|
-
var __getOwnPropSymbols$
|
|
23664
|
-
var __hasOwnProp$
|
|
23665
|
-
var __propIsEnum$
|
|
23666
|
-
var __defNormalProp$
|
|
23667
|
-
var __spreadValues$
|
|
23664
|
+
var __defProp$n = Object.defineProperty;
|
|
23665
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
23666
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
23667
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
23668
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23669
|
+
var __spreadValues$j = (a, b) => {
|
|
23668
23670
|
for (var prop in b || (b = {}))
|
|
23669
|
-
if (__hasOwnProp$
|
|
23670
|
-
__defNormalProp$
|
|
23671
|
-
if (__getOwnPropSymbols$
|
|
23672
|
-
for (var prop of __getOwnPropSymbols$
|
|
23673
|
-
if (__propIsEnum$
|
|
23674
|
-
__defNormalProp$
|
|
23671
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
23672
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
23673
|
+
if (__getOwnPropSymbols$j)
|
|
23674
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
23675
|
+
if (__propIsEnum$j.call(b, prop))
|
|
23676
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
23675
23677
|
}
|
|
23676
23678
|
return a;
|
|
23677
23679
|
};
|
|
23678
|
-
var __publicField$
|
|
23680
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23679
23681
|
class BookmarkItem {
|
|
23680
23682
|
constructor(options) {
|
|
23681
23683
|
this.options = options;
|
|
23682
|
-
__publicField$
|
|
23683
|
-
__publicField$
|
|
23684
|
-
__publicField$
|
|
23685
|
-
__publicField$
|
|
23684
|
+
__publicField$g(this, "name");
|
|
23685
|
+
__publicField$g(this, "resourceId");
|
|
23686
|
+
__publicField$g(this, "item");
|
|
23687
|
+
__publicField$g(this, "_extent");
|
|
23686
23688
|
this.resourceId = options.resourceId;
|
|
23687
23689
|
const item = options.item;
|
|
23688
23690
|
this.item = item;
|
|
@@ -23712,7 +23714,7 @@ class BookmarkItem {
|
|
|
23712
23714
|
if (this.item.geom) {
|
|
23713
23715
|
return Promise.resolve(createGeoJsonFeature(this.item));
|
|
23714
23716
|
} else {
|
|
23715
|
-
return fetchNgwLayerItem(__spreadValues$
|
|
23717
|
+
return fetchNgwLayerItem(__spreadValues$j({
|
|
23716
23718
|
resourceId: this.resourceId,
|
|
23717
23719
|
featureId: this.item.id,
|
|
23718
23720
|
connector: this.options.connector,
|
|
@@ -23730,19 +23732,19 @@ class BookmarkItem {
|
|
|
23730
23732
|
|
|
23731
23733
|
const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
|
|
23732
23734
|
|
|
23733
|
-
var __defProp$
|
|
23734
|
-
var __defNormalProp$
|
|
23735
|
-
var __publicField$
|
|
23735
|
+
var __defProp$m = Object.defineProperty;
|
|
23736
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23737
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23736
23738
|
class BaseProperty {
|
|
23737
23739
|
constructor(name, item, options) {
|
|
23738
|
-
__publicField$
|
|
23739
|
-
__publicField$
|
|
23740
|
-
__publicField$
|
|
23741
|
-
__publicField$
|
|
23742
|
-
__publicField$
|
|
23743
|
-
__publicField$
|
|
23744
|
-
__publicField$
|
|
23745
|
-
__publicField$
|
|
23740
|
+
__publicField$f(this, "options");
|
|
23741
|
+
__publicField$f(this, "emitter", new EventEmitter());
|
|
23742
|
+
__publicField$f(this, "name");
|
|
23743
|
+
__publicField$f(this, "item");
|
|
23744
|
+
__publicField$f(this, "_blocked", false);
|
|
23745
|
+
__publicField$f(this, "_container");
|
|
23746
|
+
__publicField$f(this, "__value");
|
|
23747
|
+
__publicField$f(this, "_removeEventsListener");
|
|
23746
23748
|
this.item = item;
|
|
23747
23749
|
this.options = Object.assign({}, options);
|
|
23748
23750
|
this.name = name;
|
|
@@ -23845,26 +23847,26 @@ class BaseProperty {
|
|
|
23845
23847
|
}
|
|
23846
23848
|
}
|
|
23847
23849
|
|
|
23848
|
-
var __defProp$
|
|
23849
|
-
var __getOwnPropSymbols$
|
|
23850
|
-
var __hasOwnProp$
|
|
23851
|
-
var __propIsEnum$
|
|
23852
|
-
var __defNormalProp$
|
|
23853
|
-
var __spreadValues$
|
|
23850
|
+
var __defProp$l = Object.defineProperty;
|
|
23851
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
23852
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
23853
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
23854
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23855
|
+
var __spreadValues$i = (a, b) => {
|
|
23854
23856
|
for (var prop in b || (b = {}))
|
|
23855
|
-
if (__hasOwnProp$
|
|
23856
|
-
__defNormalProp$
|
|
23857
|
-
if (__getOwnPropSymbols$
|
|
23858
|
-
for (var prop of __getOwnPropSymbols$
|
|
23859
|
-
if (__propIsEnum$
|
|
23860
|
-
__defNormalProp$
|
|
23857
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
23858
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
23859
|
+
if (__getOwnPropSymbols$i)
|
|
23860
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
23861
|
+
if (__propIsEnum$i.call(b, prop))
|
|
23862
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
23861
23863
|
}
|
|
23862
23864
|
return a;
|
|
23863
23865
|
};
|
|
23864
|
-
var __publicField$
|
|
23866
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$l(obj, key + "" , value);
|
|
23865
23867
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
23866
23868
|
constructor(name, item, options) {
|
|
23867
|
-
super(name, item, __spreadValues$
|
|
23869
|
+
super(name, item, __spreadValues$i(__spreadValues$i({}, _CheckProperty.options), options));
|
|
23868
23870
|
this.set(this.get());
|
|
23869
23871
|
}
|
|
23870
23872
|
update(value, options) {
|
|
@@ -23945,13 +23947,13 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
|
23945
23947
|
_blockChild(item, options) {
|
|
23946
23948
|
const prop = item.properties && item.properties.property(this.name);
|
|
23947
23949
|
if (prop && prop.block) {
|
|
23948
|
-
prop.block(__spreadValues$
|
|
23950
|
+
prop.block(__spreadValues$i({ silent: true }, options || {}));
|
|
23949
23951
|
}
|
|
23950
23952
|
}
|
|
23951
23953
|
_unBlockChild(item, options) {
|
|
23952
23954
|
const prop = item.properties && item.properties.property(this.name);
|
|
23953
23955
|
if (prop && prop.unBlock) {
|
|
23954
|
-
prop.unBlock(__spreadValues$
|
|
23956
|
+
prop.unBlock(__spreadValues$i({ silent: true }, options || {}));
|
|
23955
23957
|
}
|
|
23956
23958
|
}
|
|
23957
23959
|
_propagation(value, options) {
|
|
@@ -23961,7 +23963,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
|
23961
23963
|
const child = children[fry];
|
|
23962
23964
|
const property = child.properties && child.properties.property(this.name);
|
|
23963
23965
|
if (property) {
|
|
23964
|
-
property.set(value, __spreadValues$
|
|
23966
|
+
property.set(value, __spreadValues$i(__spreadValues$i({}, options), {
|
|
23965
23967
|
propagation: true,
|
|
23966
23968
|
bubble: false
|
|
23967
23969
|
}));
|
|
@@ -23970,7 +23972,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
|
23970
23972
|
}
|
|
23971
23973
|
}
|
|
23972
23974
|
};
|
|
23973
|
-
__publicField$
|
|
23975
|
+
__publicField$e(_CheckProperty, "options", {
|
|
23974
23976
|
hierarchy: true,
|
|
23975
23977
|
bubble: false,
|
|
23976
23978
|
propagation: false,
|
|
@@ -23979,31 +23981,31 @@ __publicField$d(_CheckProperty, "options", {
|
|
|
23979
23981
|
});
|
|
23980
23982
|
let CheckProperty = _CheckProperty;
|
|
23981
23983
|
|
|
23982
|
-
var __defProp$
|
|
23983
|
-
var __getOwnPropSymbols$
|
|
23984
|
-
var __hasOwnProp$
|
|
23985
|
-
var __propIsEnum$
|
|
23986
|
-
var __defNormalProp$
|
|
23987
|
-
var __spreadValues$
|
|
23984
|
+
var __defProp$k = Object.defineProperty;
|
|
23985
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
23986
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
23987
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
23988
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23989
|
+
var __spreadValues$h = (a, b) => {
|
|
23988
23990
|
for (var prop in b || (b = {}))
|
|
23989
|
-
if (__hasOwnProp$
|
|
23990
|
-
__defNormalProp$
|
|
23991
|
-
if (__getOwnPropSymbols$
|
|
23992
|
-
for (var prop of __getOwnPropSymbols$
|
|
23993
|
-
if (__propIsEnum$
|
|
23994
|
-
__defNormalProp$
|
|
23991
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
23992
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
23993
|
+
if (__getOwnPropSymbols$h)
|
|
23994
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
23995
|
+
if (__propIsEnum$h.call(b, prop))
|
|
23996
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
23995
23997
|
}
|
|
23996
23998
|
return a;
|
|
23997
23999
|
};
|
|
23998
|
-
var __publicField$
|
|
24000
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23999
24001
|
const BOOLEAN_TYPE = "boolean";
|
|
24000
24002
|
const STRING_TYPE = "string";
|
|
24001
24003
|
const _ItemProperties = class _ItemProperties {
|
|
24002
24004
|
constructor(item, propertiesList) {
|
|
24003
24005
|
this.item = item;
|
|
24004
|
-
__publicField$
|
|
24005
|
-
__publicField$
|
|
24006
|
-
__publicField$
|
|
24006
|
+
__publicField$d(this, "options", {});
|
|
24007
|
+
__publicField$d(this, "_properties", {});
|
|
24008
|
+
__publicField$d(this, "_propertiesList", []);
|
|
24007
24009
|
if (propertiesList) {
|
|
24008
24010
|
propertiesList.forEach(this._setPropertyHandler.bind(this));
|
|
24009
24011
|
}
|
|
@@ -24043,7 +24045,7 @@ const _ItemProperties = class _ItemProperties {
|
|
|
24043
24045
|
_setPropertyHandler(propOpt) {
|
|
24044
24046
|
const Handler = this._getHandler(propOpt);
|
|
24045
24047
|
if (Handler && propOpt.name) {
|
|
24046
|
-
const options = __spreadValues$
|
|
24048
|
+
const options = __spreadValues$h({}, propOpt);
|
|
24047
24049
|
this._properties[propOpt.name] = new Handler(
|
|
24048
24050
|
propOpt.name,
|
|
24049
24051
|
this.item,
|
|
@@ -24066,7 +24068,7 @@ const _ItemProperties = class _ItemProperties {
|
|
|
24066
24068
|
return Handler;
|
|
24067
24069
|
}
|
|
24068
24070
|
};
|
|
24069
|
-
__publicField$
|
|
24071
|
+
__publicField$d(_ItemProperties, "handlers", {
|
|
24070
24072
|
CheckProperty
|
|
24071
24073
|
});
|
|
24072
24074
|
let ItemProperties = _ItemProperties;
|
|
@@ -24173,14 +24175,14 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
|
|
|
24173
24175
|
return true;
|
|
24174
24176
|
}
|
|
24175
24177
|
|
|
24176
|
-
var __defProp$
|
|
24177
|
-
var __defNormalProp$
|
|
24178
|
-
var __publicField$
|
|
24178
|
+
var __defProp$j = Object.defineProperty;
|
|
24179
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
24180
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24179
24181
|
class TreeHelper {
|
|
24180
24182
|
constructor(item) {
|
|
24181
|
-
__publicField$
|
|
24182
|
-
__publicField$
|
|
24183
|
-
__publicField$
|
|
24183
|
+
__publicField$c(this, "item");
|
|
24184
|
+
__publicField$c(this, "_children", []);
|
|
24185
|
+
__publicField$c(this, "_parent");
|
|
24184
24186
|
this.item = item;
|
|
24185
24187
|
}
|
|
24186
24188
|
setParent(parent) {
|
|
@@ -24243,32 +24245,32 @@ class TreeHelper {
|
|
|
24243
24245
|
}
|
|
24244
24246
|
}
|
|
24245
24247
|
|
|
24246
|
-
var __defProp$
|
|
24247
|
-
var __getOwnPropSymbols$
|
|
24248
|
-
var __hasOwnProp$
|
|
24249
|
-
var __propIsEnum$
|
|
24250
|
-
var __defNormalProp$
|
|
24251
|
-
var __spreadValues$
|
|
24248
|
+
var __defProp$i = Object.defineProperty;
|
|
24249
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
24250
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
24251
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
24252
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
24253
|
+
var __spreadValues$g = (a, b) => {
|
|
24252
24254
|
for (var prop in b || (b = {}))
|
|
24253
|
-
if (__hasOwnProp$
|
|
24254
|
-
__defNormalProp$
|
|
24255
|
-
if (__getOwnPropSymbols$
|
|
24256
|
-
for (var prop of __getOwnPropSymbols$
|
|
24257
|
-
if (__propIsEnum$
|
|
24258
|
-
__defNormalProp$
|
|
24255
|
+
if (__hasOwnProp$g.call(b, prop))
|
|
24256
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
24257
|
+
if (__getOwnPropSymbols$g)
|
|
24258
|
+
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
24259
|
+
if (__propIsEnum$g.call(b, prop))
|
|
24260
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
24259
24261
|
}
|
|
24260
24262
|
return a;
|
|
24261
24263
|
};
|
|
24262
|
-
var __publicField$
|
|
24264
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24263
24265
|
let ID = 0;
|
|
24264
24266
|
class Item {
|
|
24265
24267
|
constructor(options) {
|
|
24266
|
-
__publicField$
|
|
24267
|
-
__publicField$
|
|
24268
|
-
__publicField$
|
|
24269
|
-
__publicField$
|
|
24268
|
+
__publicField$b(this, "options", {});
|
|
24269
|
+
__publicField$b(this, "properties");
|
|
24270
|
+
__publicField$b(this, "tree");
|
|
24271
|
+
__publicField$b(this, "id", ID);
|
|
24270
24272
|
ID += 1;
|
|
24271
|
-
this.options = __spreadValues$
|
|
24273
|
+
this.options = __spreadValues$g({}, options);
|
|
24272
24274
|
this.tree = new TreeHelper(this);
|
|
24273
24275
|
}
|
|
24274
24276
|
initProperties() {
|
|
@@ -24324,27 +24326,27 @@ function createLayerSymbolParam(resourceId, intervals) {
|
|
|
24324
24326
|
return { [`symbols[${resourceId}]`]: intervals.join(",") || void 0 };
|
|
24325
24327
|
}
|
|
24326
24328
|
|
|
24327
|
-
var __defProp$
|
|
24328
|
-
var __defProps$
|
|
24329
|
-
var __getOwnPropDescs$
|
|
24330
|
-
var __getOwnPropSymbols$
|
|
24331
|
-
var __hasOwnProp$
|
|
24332
|
-
var __propIsEnum$
|
|
24333
|
-
var __defNormalProp$
|
|
24334
|
-
var __spreadValues$
|
|
24329
|
+
var __defProp$h = Object.defineProperty;
|
|
24330
|
+
var __defProps$d = Object.defineProperties;
|
|
24331
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
24332
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
24333
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
24334
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
24335
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
24336
|
+
var __spreadValues$f = (a, b) => {
|
|
24335
24337
|
for (var prop in b || (b = {}))
|
|
24336
|
-
if (__hasOwnProp$
|
|
24337
|
-
__defNormalProp$
|
|
24338
|
-
if (__getOwnPropSymbols$
|
|
24339
|
-
for (var prop of __getOwnPropSymbols$
|
|
24340
|
-
if (__propIsEnum$
|
|
24341
|
-
__defNormalProp$
|
|
24338
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
24339
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
24340
|
+
if (__getOwnPropSymbols$f)
|
|
24341
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
24342
|
+
if (__propIsEnum$f.call(b, prop))
|
|
24343
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
24342
24344
|
}
|
|
24343
24345
|
return a;
|
|
24344
24346
|
};
|
|
24345
|
-
var __spreadProps$
|
|
24346
|
-
var __publicField$
|
|
24347
|
-
var __async$
|
|
24347
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
24348
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24349
|
+
var __async$g = (__this, __arguments, generator) => {
|
|
24348
24350
|
return new Promise((resolve, reject) => {
|
|
24349
24351
|
var fulfilled = (value) => {
|
|
24350
24352
|
try {
|
|
@@ -24375,17 +24377,17 @@ class Legend {
|
|
|
24375
24377
|
layer,
|
|
24376
24378
|
onSymbolRenderChange
|
|
24377
24379
|
}) {
|
|
24378
|
-
__publicField$
|
|
24379
|
-
__publicField$
|
|
24380
|
-
__publicField$
|
|
24381
|
-
__publicField$
|
|
24382
|
-
__publicField$
|
|
24380
|
+
__publicField$a(this, "layerId");
|
|
24381
|
+
__publicField$a(this, "layer");
|
|
24382
|
+
__publicField$a(this, "resourceId");
|
|
24383
|
+
__publicField$a(this, "legendSymbols", "expand");
|
|
24384
|
+
__publicField$a(this, "legend");
|
|
24383
24385
|
// private blocked: boolean = false;
|
|
24384
|
-
__publicField$
|
|
24386
|
+
__publicField$a(this, "layerVisibility", true);
|
|
24385
24387
|
// private symbolRenderIndexes?: number[];
|
|
24386
|
-
__publicField$
|
|
24387
|
-
__publicField$
|
|
24388
|
-
__publicField$
|
|
24388
|
+
__publicField$a(this, "onSymbolRenderChange");
|
|
24389
|
+
__publicField$a(this, "webMap");
|
|
24390
|
+
__publicField$a(this, "connector");
|
|
24389
24391
|
if (legendSymbols) {
|
|
24390
24392
|
this.legendSymbols = legendSymbols;
|
|
24391
24393
|
}
|
|
@@ -24404,18 +24406,18 @@ class Legend {
|
|
|
24404
24406
|
this.layer = layer;
|
|
24405
24407
|
}
|
|
24406
24408
|
create() {
|
|
24407
|
-
return __async$
|
|
24409
|
+
return __async$g(this, arguments, function* (options = {}) {
|
|
24408
24410
|
if (this.connector) {
|
|
24409
24411
|
const ngwLegend = yield this.connector.route("render.legend_symbols", {
|
|
24410
24412
|
id: this.resourceId
|
|
24411
|
-
}).get(__spreadValues$
|
|
24413
|
+
}).get(__spreadValues$f({}, options));
|
|
24412
24414
|
this.legend = ngwLegend;
|
|
24413
24415
|
return this.createLegend(ngwLegend);
|
|
24414
24416
|
}
|
|
24415
24417
|
});
|
|
24416
24418
|
}
|
|
24417
24419
|
createLegend(items) {
|
|
24418
|
-
return items.map((params) => __spreadProps$
|
|
24420
|
+
return items.map((params) => __spreadProps$d(__spreadValues$f({}, params), {
|
|
24419
24421
|
/** @deprecated use display_name instead */
|
|
24420
24422
|
name: params.display_name,
|
|
24421
24423
|
/** @deprecated use icon instead */
|
|
@@ -24445,7 +24447,7 @@ class Legend {
|
|
|
24445
24447
|
}
|
|
24446
24448
|
if (this.layer.updateLayer) {
|
|
24447
24449
|
this.layer.updateLayer({
|
|
24448
|
-
params: __spreadValues$
|
|
24450
|
+
params: __spreadValues$f({}, createLayerSymbolParam(this.resourceId, intervals))
|
|
24449
24451
|
});
|
|
24450
24452
|
}
|
|
24451
24453
|
if (intervals.length) {
|
|
@@ -24482,27 +24484,27 @@ class Legend {
|
|
|
24482
24484
|
}
|
|
24483
24485
|
}
|
|
24484
24486
|
|
|
24485
|
-
var __defProp$
|
|
24486
|
-
var __defProps$
|
|
24487
|
-
var __getOwnPropDescs$
|
|
24488
|
-
var __getOwnPropSymbols$
|
|
24489
|
-
var __hasOwnProp$
|
|
24490
|
-
var __propIsEnum$
|
|
24491
|
-
var __defNormalProp$
|
|
24492
|
-
var __spreadValues$
|
|
24487
|
+
var __defProp$g = Object.defineProperty;
|
|
24488
|
+
var __defProps$c = Object.defineProperties;
|
|
24489
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
24490
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
24491
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
24492
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
24493
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
24494
|
+
var __spreadValues$e = (a, b) => {
|
|
24493
24495
|
for (var prop in b || (b = {}))
|
|
24494
|
-
if (__hasOwnProp$
|
|
24495
|
-
__defNormalProp$
|
|
24496
|
-
if (__getOwnPropSymbols$
|
|
24497
|
-
for (var prop of __getOwnPropSymbols$
|
|
24498
|
-
if (__propIsEnum$
|
|
24499
|
-
__defNormalProp$
|
|
24496
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
24497
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
24498
|
+
if (__getOwnPropSymbols$e)
|
|
24499
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
24500
|
+
if (__propIsEnum$e.call(b, prop))
|
|
24501
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
24500
24502
|
}
|
|
24501
24503
|
return a;
|
|
24502
24504
|
};
|
|
24503
|
-
var __spreadProps$
|
|
24504
|
-
var __publicField$
|
|
24505
|
-
var __async$
|
|
24505
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
24506
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24507
|
+
var __async$f = (__this, __arguments, generator) => {
|
|
24506
24508
|
return new Promise((resolve, reject) => {
|
|
24507
24509
|
var fulfilled = (value) => {
|
|
24508
24510
|
try {
|
|
@@ -24531,14 +24533,14 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24531
24533
|
parent,
|
|
24532
24534
|
noInit
|
|
24533
24535
|
}) {
|
|
24534
|
-
super(__spreadValues$
|
|
24535
|
-
__publicField$
|
|
24536
|
-
__publicField$
|
|
24537
|
-
__publicField$
|
|
24538
|
-
__publicField$
|
|
24539
|
-
__publicField$
|
|
24540
|
-
__publicField$
|
|
24541
|
-
__publicField$
|
|
24536
|
+
super(__spreadValues$e(__spreadValues$e({}, _NgwWebmapItem.options), options));
|
|
24537
|
+
__publicField$9(this, "item");
|
|
24538
|
+
__publicField$9(this, "webMap");
|
|
24539
|
+
__publicField$9(this, "connector");
|
|
24540
|
+
__publicField$9(this, "layer");
|
|
24541
|
+
__publicField$9(this, "legend");
|
|
24542
|
+
__publicField$9(this, "emitter", new EventEmitter());
|
|
24543
|
+
__publicField$9(this, "_rootDescendantsCount", 0);
|
|
24542
24544
|
this.webMap = webMap;
|
|
24543
24545
|
if (connector) {
|
|
24544
24546
|
this.connector = connector;
|
|
@@ -24561,7 +24563,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24561
24563
|
}
|
|
24562
24564
|
}
|
|
24563
24565
|
static create(webMap, item, options, connector, parent) {
|
|
24564
|
-
return __async$
|
|
24566
|
+
return __async$f(this, null, function* () {
|
|
24565
24567
|
const ngwWebmapItem = new _NgwWebmapItem({
|
|
24566
24568
|
webMap,
|
|
24567
24569
|
item,
|
|
@@ -24590,7 +24592,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24590
24592
|
return this.layer;
|
|
24591
24593
|
}
|
|
24592
24594
|
getLegend(options) {
|
|
24593
|
-
return __async$
|
|
24595
|
+
return __async$f(this, null, function* () {
|
|
24594
24596
|
var _a, _b;
|
|
24595
24597
|
const id = (_a = this.layer) == null ? void 0 : _a.id;
|
|
24596
24598
|
if (id !== void 0) {
|
|
@@ -24627,7 +24629,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24627
24629
|
getItemOptions(item) {
|
|
24628
24630
|
const transparency = item.item_type === "layer" && item.layer_transparency;
|
|
24629
24631
|
const opacity = typeof transparency === "number" ? (100 - transparency) / 100 : void 0;
|
|
24630
|
-
const options = __spreadProps$
|
|
24632
|
+
const options = __spreadProps$c(__spreadValues$e({
|
|
24631
24633
|
visibility: false,
|
|
24632
24634
|
name: item.display_name
|
|
24633
24635
|
}, this.options), {
|
|
@@ -24647,7 +24649,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24647
24649
|
}
|
|
24648
24650
|
if (item.item_type === "layer") {
|
|
24649
24651
|
const { maxZoom, minZoom } = this._getZoomRange(item);
|
|
24650
|
-
Object.assign(options, __spreadProps$
|
|
24652
|
+
Object.assign(options, __spreadProps$c(__spreadValues$e({
|
|
24651
24653
|
updateWmsParams: item.updateWmsParams
|
|
24652
24654
|
}, options), {
|
|
24653
24655
|
url: item.url,
|
|
@@ -24750,8 +24752,8 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24750
24752
|
return totalValue;
|
|
24751
24753
|
}
|
|
24752
24754
|
};
|
|
24753
|
-
__publicField$
|
|
24754
|
-
__publicField$
|
|
24755
|
+
__publicField$9(_NgwWebmapItem, "GetAdapterFromLayerType", {});
|
|
24756
|
+
__publicField$9(_NgwWebmapItem, "options", {
|
|
24755
24757
|
properties: [
|
|
24756
24758
|
{
|
|
24757
24759
|
type: "boolean",
|
|
@@ -24791,27 +24793,27 @@ __publicField$8(_NgwWebmapItem, "options", {
|
|
|
24791
24793
|
});
|
|
24792
24794
|
let NgwWebmapItem = _NgwWebmapItem;
|
|
24793
24795
|
|
|
24794
|
-
var __defProp$
|
|
24795
|
-
var __defProps$
|
|
24796
|
-
var __getOwnPropDescs$
|
|
24797
|
-
var __getOwnPropSymbols$
|
|
24798
|
-
var __hasOwnProp$
|
|
24799
|
-
var __propIsEnum$
|
|
24800
|
-
var __defNormalProp$
|
|
24801
|
-
var __spreadValues$
|
|
24796
|
+
var __defProp$f = Object.defineProperty;
|
|
24797
|
+
var __defProps$b = Object.defineProperties;
|
|
24798
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
24799
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
24800
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
24801
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
24802
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
24803
|
+
var __spreadValues$d = (a, b) => {
|
|
24802
24804
|
for (var prop in b || (b = {}))
|
|
24803
|
-
if (__hasOwnProp$
|
|
24804
|
-
__defNormalProp$
|
|
24805
|
-
if (__getOwnPropSymbols$
|
|
24806
|
-
for (var prop of __getOwnPropSymbols$
|
|
24807
|
-
if (__propIsEnum$
|
|
24808
|
-
__defNormalProp$
|
|
24805
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
24806
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
24807
|
+
if (__getOwnPropSymbols$d)
|
|
24808
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
24809
|
+
if (__propIsEnum$d.call(b, prop))
|
|
24810
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
24809
24811
|
}
|
|
24810
24812
|
return a;
|
|
24811
24813
|
};
|
|
24812
|
-
var __spreadProps$
|
|
24813
|
-
var __publicField$
|
|
24814
|
-
var __async$
|
|
24814
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
24815
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24816
|
+
var __async$e = (__this, __arguments, generator) => {
|
|
24815
24817
|
return new Promise((resolve, reject) => {
|
|
24816
24818
|
var fulfilled = (value) => {
|
|
24817
24819
|
try {
|
|
@@ -24835,20 +24837,20 @@ class NgwWebmapLayerAdapter {
|
|
|
24835
24837
|
constructor(map, options) {
|
|
24836
24838
|
this.map = map;
|
|
24837
24839
|
this.options = options;
|
|
24838
|
-
__publicField$
|
|
24839
|
-
__publicField$
|
|
24840
|
+
__publicField$8(this, "layer");
|
|
24841
|
+
__publicField$8(this, "NgwWebmapItem", NgwWebmapItem);
|
|
24840
24842
|
/**
|
|
24841
24843
|
* Radius for searching objects in pixels
|
|
24842
24844
|
*/
|
|
24843
|
-
__publicField$
|
|
24845
|
+
__publicField$8(this, "pixelRadius", 10);
|
|
24844
24846
|
// webmapSettings.identify_radius,
|
|
24845
|
-
__publicField$
|
|
24846
|
-
__publicField$
|
|
24847
|
-
__publicField$
|
|
24848
|
-
__publicField$
|
|
24849
|
-
__publicField$
|
|
24850
|
-
__publicField$
|
|
24851
|
-
__publicField$
|
|
24847
|
+
__publicField$8(this, "resourceId");
|
|
24848
|
+
__publicField$8(this, "webmapClassName", "webmap");
|
|
24849
|
+
__publicField$8(this, "emitter", new EventEmitter());
|
|
24850
|
+
__publicField$8(this, "_extent");
|
|
24851
|
+
__publicField$8(this, "webmapResource");
|
|
24852
|
+
__publicField$8(this, "_webmapBaselayersIds", []);
|
|
24853
|
+
__publicField$8(this, "_lastActiveBaselayer");
|
|
24852
24854
|
const r = options.resourceId;
|
|
24853
24855
|
if (Array.isArray(r)) {
|
|
24854
24856
|
this.resourceId = r[0];
|
|
@@ -24861,9 +24863,9 @@ class NgwWebmapLayerAdapter {
|
|
|
24861
24863
|
}
|
|
24862
24864
|
}
|
|
24863
24865
|
addLayer(options) {
|
|
24864
|
-
return __async$
|
|
24866
|
+
return __async$e(this, null, function* () {
|
|
24865
24867
|
var _a;
|
|
24866
|
-
this.options = __spreadValues$
|
|
24868
|
+
this.options = __spreadValues$d(__spreadValues$d({}, this.options), options);
|
|
24867
24869
|
this.layer = yield this._getWebMapLayerItem();
|
|
24868
24870
|
const extentConstrained = (_a = this.webmapResource) == null ? void 0 : _a.constraining_extent;
|
|
24869
24871
|
if (this.options.useExtentConstrained && this._extent && extentConstrained) {
|
|
@@ -24893,21 +24895,21 @@ class NgwWebmapLayerAdapter {
|
|
|
24893
24895
|
delete this.webmapResource;
|
|
24894
24896
|
}
|
|
24895
24897
|
showLayer() {
|
|
24896
|
-
return __async$
|
|
24898
|
+
return __async$e(this, null, function* () {
|
|
24897
24899
|
if (this.layer && this.layer.properties) {
|
|
24898
24900
|
return this.layer.properties.property("visibility").set(true);
|
|
24899
24901
|
}
|
|
24900
24902
|
});
|
|
24901
24903
|
}
|
|
24902
24904
|
hideLayer() {
|
|
24903
|
-
return __async$
|
|
24905
|
+
return __async$e(this, null, function* () {
|
|
24904
24906
|
if (this.layer && this.layer.properties) {
|
|
24905
24907
|
return this.layer.properties.property("visibility").set(false);
|
|
24906
24908
|
}
|
|
24907
24909
|
});
|
|
24908
24910
|
}
|
|
24909
24911
|
setOpacity(val) {
|
|
24910
|
-
return __async$
|
|
24912
|
+
return __async$e(this, null, function* () {
|
|
24911
24913
|
if (this.layer && this.layer.properties) {
|
|
24912
24914
|
return this.layer.properties.property("opacity").set(val);
|
|
24913
24915
|
}
|
|
@@ -24942,7 +24944,7 @@ class NgwWebmapLayerAdapter {
|
|
|
24942
24944
|
(x) => x.label_field
|
|
24943
24945
|
);
|
|
24944
24946
|
const keyname = labelField && labelField.keyname;
|
|
24945
|
-
return fetchNgwLayerItems(__spreadValues$
|
|
24947
|
+
return fetchNgwLayerItems(__spreadValues$d({
|
|
24946
24948
|
connector,
|
|
24947
24949
|
resourceId: bookmarkResId,
|
|
24948
24950
|
geom: false,
|
|
@@ -24967,7 +24969,7 @@ class NgwWebmapLayerAdapter {
|
|
|
24967
24969
|
);
|
|
24968
24970
|
}
|
|
24969
24971
|
getLegend(options) {
|
|
24970
|
-
return __async$
|
|
24972
|
+
return __async$e(this, null, function* () {
|
|
24971
24973
|
const legends = [];
|
|
24972
24974
|
let deps = this.getDependLayers();
|
|
24973
24975
|
deps = deps.sort((a, b) => b.id - a.id);
|
|
@@ -24979,7 +24981,7 @@ class NgwWebmapLayerAdapter {
|
|
|
24979
24981
|
});
|
|
24980
24982
|
}
|
|
24981
24983
|
getIdentificationIds(options) {
|
|
24982
|
-
return __async$
|
|
24984
|
+
return __async$e(this, null, function* () {
|
|
24983
24985
|
const visibleLayers = [];
|
|
24984
24986
|
let deps = this.getDependLayers();
|
|
24985
24987
|
deps = deps.sort((a, b) => b.id - a.id);
|
|
@@ -24998,7 +25000,7 @@ class NgwWebmapLayerAdapter {
|
|
|
24998
25000
|
});
|
|
24999
25001
|
}
|
|
25000
25002
|
_getWebMapLayerItem() {
|
|
25001
|
-
return __async$
|
|
25003
|
+
return __async$e(this, null, function* () {
|
|
25002
25004
|
if (!this.resourceId) {
|
|
25003
25005
|
return void 0;
|
|
25004
25006
|
}
|
|
@@ -25011,7 +25013,7 @@ class NgwWebmapLayerAdapter {
|
|
|
25011
25013
|
const connector = this.options.connector;
|
|
25012
25014
|
const headers = (connector == null ? void 0 : connector.options.auth) ? connector.getAuthorizationHeaders() : void 0;
|
|
25013
25015
|
const withCredentials = connector.withCredentials;
|
|
25014
|
-
const options = __spreadProps$
|
|
25016
|
+
const options = __spreadProps$b(__spreadValues$d({}, this.options), {
|
|
25015
25017
|
withCredentials,
|
|
25016
25018
|
headers,
|
|
25017
25019
|
drawOrderEnabled: (_a = webmap.draw_order_enabled) != null ? _a : false
|
|
@@ -25029,7 +25031,7 @@ class NgwWebmapLayerAdapter {
|
|
|
25029
25031
|
});
|
|
25030
25032
|
}
|
|
25031
25033
|
getWebMapConfig(id) {
|
|
25032
|
-
return __async$
|
|
25034
|
+
return __async$e(this, null, function* () {
|
|
25033
25035
|
var _a;
|
|
25034
25036
|
const data = yield this.options.connector.getResource(id);
|
|
25035
25037
|
if (data) {
|
|
@@ -25117,7 +25119,7 @@ class NgwWebmapLayerAdapter {
|
|
|
25117
25119
|
webMap,
|
|
25118
25120
|
baseUrl: this.options.connector.options.baseUrl || ""
|
|
25119
25121
|
});
|
|
25120
|
-
item = __spreadValues$
|
|
25122
|
+
item = __spreadValues$d(__spreadValues$d({}, layerItem), layerAdapterOptions);
|
|
25121
25123
|
}
|
|
25122
25124
|
}
|
|
25123
25125
|
if (typeof ((_a = this.options.nativeOptions) == null ? void 0 : _a.beforeItemCreated) === "function") {
|
|
@@ -25127,40 +25129,40 @@ class NgwWebmapLayerAdapter {
|
|
|
25127
25129
|
}
|
|
25128
25130
|
}
|
|
25129
25131
|
|
|
25130
|
-
var __defProp$
|
|
25131
|
-
var __defProps$
|
|
25132
|
-
var __getOwnPropDescs$
|
|
25133
|
-
var __getOwnPropSymbols$
|
|
25134
|
-
var __hasOwnProp$
|
|
25135
|
-
var __propIsEnum$
|
|
25136
|
-
var __defNormalProp$
|
|
25137
|
-
var __spreadValues$
|
|
25132
|
+
var __defProp$e = Object.defineProperty;
|
|
25133
|
+
var __defProps$a = Object.defineProperties;
|
|
25134
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
25135
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
25136
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
25137
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
25138
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
25139
|
+
var __spreadValues$c = (a, b) => {
|
|
25138
25140
|
for (var prop in b || (b = {}))
|
|
25139
|
-
if (__hasOwnProp$
|
|
25140
|
-
__defNormalProp$
|
|
25141
|
-
if (__getOwnPropSymbols$
|
|
25142
|
-
for (var prop of __getOwnPropSymbols$
|
|
25143
|
-
if (__propIsEnum$
|
|
25144
|
-
__defNormalProp$
|
|
25141
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
25142
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
25143
|
+
if (__getOwnPropSymbols$c)
|
|
25144
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
25145
|
+
if (__propIsEnum$c.call(b, prop))
|
|
25146
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
25145
25147
|
}
|
|
25146
25148
|
return a;
|
|
25147
25149
|
};
|
|
25148
|
-
var __spreadProps$
|
|
25150
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
25149
25151
|
var __objRest$2 = (source, exclude) => {
|
|
25150
25152
|
var target = {};
|
|
25151
25153
|
for (var prop in source)
|
|
25152
|
-
if (__hasOwnProp$
|
|
25154
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25153
25155
|
target[prop] = source[prop];
|
|
25154
|
-
if (source != null && __getOwnPropSymbols$
|
|
25155
|
-
for (var prop of __getOwnPropSymbols$
|
|
25156
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
25156
|
+
if (source != null && __getOwnPropSymbols$c)
|
|
25157
|
+
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
25158
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
25157
25159
|
target[prop] = source[prop];
|
|
25158
25160
|
}
|
|
25159
25161
|
return target;
|
|
25160
25162
|
};
|
|
25161
25163
|
function updateImageParams(params, resourceId) {
|
|
25162
25164
|
const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$2(_a, ["bbox", "width", "height", "nd"]);
|
|
25163
|
-
return __spreadProps$
|
|
25165
|
+
return __spreadProps$a(__spreadValues$c({}, rest), {
|
|
25164
25166
|
resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
|
|
25165
25167
|
extent: bbox,
|
|
25166
25168
|
size: width + "," + height,
|
|
@@ -25195,7 +25197,7 @@ function createNgwLayerAdapter(options, webMap, connector) {
|
|
|
25195
25197
|
function extendNgwWebmapLayerAdapter(opt) {
|
|
25196
25198
|
class A extends NgwWebmapLayerAdapter {
|
|
25197
25199
|
constructor(map, options) {
|
|
25198
|
-
options = __spreadValues$
|
|
25200
|
+
options = __spreadValues$c(__spreadValues$c({}, opt), options);
|
|
25199
25201
|
super(map, options);
|
|
25200
25202
|
}
|
|
25201
25203
|
}
|
|
@@ -25226,78 +25228,174 @@ function setScaleRatio(scale, lat = 0) {
|
|
|
25226
25228
|
return zoom;
|
|
25227
25229
|
}
|
|
25228
25230
|
|
|
25231
|
+
function parseQmsExtent(value) {
|
|
25232
|
+
if (!value) {
|
|
25233
|
+
return void 0;
|
|
25234
|
+
}
|
|
25235
|
+
const match = value.match(/^(?:SRID=(\d+);)?POLYGON\s*\(\((.+)\)\)\s*$/i);
|
|
25236
|
+
if (!match || match[1] && match[1] !== "4326") {
|
|
25237
|
+
return void 0;
|
|
25238
|
+
}
|
|
25239
|
+
const coordinates = match[2].split(",").map((coordinate) => coordinate.trim().split(/\s+/).map(Number)).filter(
|
|
25240
|
+
(coordinate) => coordinate.length >= 2 && Number.isFinite(coordinate[0]) && Number.isFinite(coordinate[1])
|
|
25241
|
+
);
|
|
25242
|
+
if (!coordinates.length) {
|
|
25243
|
+
return void 0;
|
|
25244
|
+
}
|
|
25245
|
+
const xs = coordinates.map((coordinate) => coordinate[0]);
|
|
25246
|
+
const ys = coordinates.map((coordinate) => coordinate[1]);
|
|
25247
|
+
return [Math.min(...xs), Math.min(...ys), Math.max(...xs), Math.max(...ys)];
|
|
25248
|
+
}
|
|
25249
|
+
function normalizeQmsUrl(url) {
|
|
25250
|
+
return url.replace(/^(http|ftp):\/\//, "https://");
|
|
25251
|
+
}
|
|
25229
25252
|
function getSubdomainsOriginUrl(originUrl) {
|
|
25230
|
-
const
|
|
25231
|
-
originUrl = originUrl.replace(/{switch:(.*?)}/, (
|
|
25253
|
+
const subdomains = [];
|
|
25254
|
+
originUrl = originUrl.replace(/{switch:(.*?)}/, (match, group) => {
|
|
25232
25255
|
if (typeof group === "string") {
|
|
25233
|
-
group.split(",").forEach((
|
|
25256
|
+
group.split(",").forEach((subdomain) => subdomains.push(subdomain));
|
|
25234
25257
|
}
|
|
25235
25258
|
return "{s}";
|
|
25236
25259
|
});
|
|
25237
|
-
return [originUrl,
|
|
25260
|
+
return [originUrl, subdomains];
|
|
25261
|
+
}
|
|
25262
|
+
function parseQmsWmsParams(params) {
|
|
25263
|
+
if (!params) {
|
|
25264
|
+
return {};
|
|
25265
|
+
}
|
|
25266
|
+
return Object.fromEntries(new URLSearchParams(params).entries());
|
|
25267
|
+
}
|
|
25268
|
+
function prepareQmsTmsLayer(service) {
|
|
25269
|
+
var _a, _b;
|
|
25270
|
+
const [url, subdomains] = getSubdomainsOriginUrl(
|
|
25271
|
+
normalizeQmsUrl(service.origin_url || service.url)
|
|
25272
|
+
);
|
|
25273
|
+
return {
|
|
25274
|
+
type: "tms",
|
|
25275
|
+
service,
|
|
25276
|
+
url,
|
|
25277
|
+
subdomains,
|
|
25278
|
+
scheme: service.y_origin_top ? "xyz" : "tms",
|
|
25279
|
+
name: service.name,
|
|
25280
|
+
attribution: service.copyright_text || void 0,
|
|
25281
|
+
extent: parseQmsExtent(service.extent),
|
|
25282
|
+
minZoom: (_a = service.z_min) != null ? _a : void 0,
|
|
25283
|
+
maxZoom: (_b = service.z_max) != null ? _b : void 0
|
|
25284
|
+
};
|
|
25285
|
+
}
|
|
25286
|
+
function prepareQmsWmsLayer(service) {
|
|
25287
|
+
const params = parseQmsWmsParams(service.params);
|
|
25288
|
+
const versionEntry = Object.entries(params).find(
|
|
25289
|
+
([key]) => key.toLowerCase() === "version"
|
|
25290
|
+
);
|
|
25291
|
+
return {
|
|
25292
|
+
type: "wms",
|
|
25293
|
+
service,
|
|
25294
|
+
url: normalizeQmsUrl(service.url),
|
|
25295
|
+
layers: service.layers,
|
|
25296
|
+
format: service.format || "image/png",
|
|
25297
|
+
version: (versionEntry == null ? void 0 : versionEntry[1]) || "1.3.0",
|
|
25298
|
+
params,
|
|
25299
|
+
name: service.name,
|
|
25300
|
+
attribution: service.copyright_text || void 0,
|
|
25301
|
+
extent: parseQmsExtent(service.extent)
|
|
25302
|
+
};
|
|
25238
25303
|
}
|
|
25239
25304
|
|
|
25240
|
-
|
|
25305
|
+
var __defProp$d = Object.defineProperty;
|
|
25306
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
25307
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$d(obj, key + "" , value);
|
|
25308
|
+
var __async$d = (__this, __arguments, generator) => {
|
|
25241
25309
|
return new Promise((resolve, reject) => {
|
|
25242
|
-
|
|
25243
|
-
|
|
25244
|
-
|
|
25245
|
-
|
|
25246
|
-
|
|
25247
|
-
resolve(JSON.parse(xmlHttp.responseText));
|
|
25248
|
-
} catch (er) {
|
|
25249
|
-
reject(er);
|
|
25250
|
-
}
|
|
25251
|
-
}
|
|
25310
|
+
var fulfilled = (value) => {
|
|
25311
|
+
try {
|
|
25312
|
+
step(generator.next(value));
|
|
25313
|
+
} catch (e) {
|
|
25314
|
+
reject(e);
|
|
25252
25315
|
}
|
|
25253
25316
|
};
|
|
25254
|
-
|
|
25255
|
-
|
|
25317
|
+
var rejected = (value) => {
|
|
25318
|
+
try {
|
|
25319
|
+
step(generator.throw(value));
|
|
25320
|
+
} catch (e) {
|
|
25321
|
+
reject(e);
|
|
25322
|
+
}
|
|
25323
|
+
};
|
|
25324
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
25325
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
25256
25326
|
});
|
|
25257
|
-
}
|
|
25258
|
-
|
|
25259
|
-
const alias = {
|
|
25260
|
-
tms: "TILE"
|
|
25261
25327
|
};
|
|
25262
|
-
|
|
25263
|
-
|
|
25264
|
-
|
|
25265
|
-
|
|
25266
|
-
|
|
25328
|
+
const QMS_URL = "https://qms.nextgis.com";
|
|
25329
|
+
const _QmsClient = class _QmsClient {
|
|
25330
|
+
constructor() {
|
|
25331
|
+
__publicField$7(this, "url");
|
|
25332
|
+
this.url = _QmsClient.url.replace(/\/$/, "").trim();
|
|
25267
25333
|
}
|
|
25268
|
-
|
|
25269
|
-
|
|
25270
|
-
|
|
25271
|
-
|
|
25272
|
-
|
|
25273
|
-
|
|
25274
|
-
|
|
25275
|
-
|
|
25334
|
+
getService(_0) {
|
|
25335
|
+
return __async$d(this, arguments, function* (id, options = {}) {
|
|
25336
|
+
const service = yield this._getJson(
|
|
25337
|
+
`${this.url}/api/v1/geoservices/${id}`,
|
|
25338
|
+
options
|
|
25339
|
+
);
|
|
25340
|
+
if (service.type !== "tms" && service.type !== "wms") {
|
|
25341
|
+
throw new Error("Unsupported QMS service type.");
|
|
25342
|
+
}
|
|
25343
|
+
return service;
|
|
25344
|
+
});
|
|
25345
|
+
}
|
|
25346
|
+
getLayer(_0) {
|
|
25347
|
+
return __async$d(this, arguments, function* (id, options = {}) {
|
|
25348
|
+
const service = yield this.getService(id, options);
|
|
25349
|
+
if (service.type === "tms") {
|
|
25350
|
+
return prepareQmsTmsLayer(service);
|
|
25351
|
+
}
|
|
25352
|
+
return prepareQmsWmsLayer(service);
|
|
25353
|
+
});
|
|
25354
|
+
}
|
|
25355
|
+
_getJson(_0, _1) {
|
|
25356
|
+
return __async$d(this, arguments, function* (url, { signal }) {
|
|
25357
|
+
const response = yield fetch(url, {
|
|
25358
|
+
signal
|
|
25359
|
+
});
|
|
25360
|
+
if (!response.ok) {
|
|
25361
|
+
throw new Error(
|
|
25362
|
+
`QMS request failed with status ${response.status}: ${url}`
|
|
25363
|
+
);
|
|
25364
|
+
}
|
|
25365
|
+
return response.json();
|
|
25366
|
+
});
|
|
25367
|
+
}
|
|
25368
|
+
};
|
|
25369
|
+
__publicField$7(_QmsClient, "url", QMS_URL);
|
|
25370
|
+
let QmsClient = _QmsClient;
|
|
25276
25371
|
|
|
25277
25372
|
var __defProp$c = Object.defineProperty;
|
|
25278
|
-
var
|
|
25279
|
-
var
|
|
25280
|
-
var
|
|
25373
|
+
var __defProps$9 = Object.defineProperties;
|
|
25374
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
25375
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
25376
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
25377
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
25281
25378
|
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
25282
|
-
var __spreadValues$
|
|
25379
|
+
var __spreadValues$b = (a, b) => {
|
|
25283
25380
|
for (var prop in b || (b = {}))
|
|
25284
|
-
if (__hasOwnProp$
|
|
25381
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
25285
25382
|
__defNormalProp$c(a, prop, b[prop]);
|
|
25286
|
-
if (__getOwnPropSymbols$
|
|
25287
|
-
for (var prop of __getOwnPropSymbols$
|
|
25288
|
-
if (__propIsEnum$
|
|
25383
|
+
if (__getOwnPropSymbols$b)
|
|
25384
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
25385
|
+
if (__propIsEnum$b.call(b, prop))
|
|
25289
25386
|
__defNormalProp$c(a, prop, b[prop]);
|
|
25290
25387
|
}
|
|
25291
25388
|
return a;
|
|
25292
25389
|
};
|
|
25390
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
25293
25391
|
var __objRest$1 = (source, exclude) => {
|
|
25294
25392
|
var target = {};
|
|
25295
25393
|
for (var prop in source)
|
|
25296
|
-
if (__hasOwnProp$
|
|
25394
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25297
25395
|
target[prop] = source[prop];
|
|
25298
|
-
if (source != null && __getOwnPropSymbols$
|
|
25299
|
-
for (var prop of __getOwnPropSymbols$
|
|
25300
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
25396
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
25397
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
25398
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
25301
25399
|
target[prop] = source[prop];
|
|
25302
25400
|
}
|
|
25303
25401
|
return target;
|
|
@@ -25323,31 +25421,48 @@ var __async$c = (__this, __arguments, generator) => {
|
|
|
25323
25421
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
25324
25422
|
});
|
|
25325
25423
|
};
|
|
25326
|
-
const
|
|
25327
|
-
|
|
25424
|
+
const alias = {
|
|
25425
|
+
tms: "TILE",
|
|
25426
|
+
wms: "WMS"
|
|
25427
|
+
};
|
|
25428
|
+
function qmsLayerToOptions(layer) {
|
|
25429
|
+
if (layer.type === "tms") {
|
|
25430
|
+
return {
|
|
25431
|
+
url: layer.scheme === "tms" ? layer.url.replace("{y}", "{-y}") : layer.url,
|
|
25432
|
+
subdomains: layer.subdomains,
|
|
25433
|
+
maxZoom: layer.maxZoom,
|
|
25434
|
+
minZoom: layer.minZoom,
|
|
25435
|
+
name: layer.name,
|
|
25436
|
+
attribution: layer.attribution
|
|
25437
|
+
};
|
|
25438
|
+
}
|
|
25439
|
+
return {
|
|
25440
|
+
url: layer.url,
|
|
25441
|
+
layers: layer.layers,
|
|
25442
|
+
format: layer.format,
|
|
25443
|
+
version: layer.version,
|
|
25444
|
+
params: layer.params,
|
|
25445
|
+
name: layer.name,
|
|
25446
|
+
attribution: layer.attribution
|
|
25447
|
+
};
|
|
25448
|
+
}
|
|
25449
|
+
function createQmsAdapter(webMapOrOptions, createOpt = {}) {
|
|
25328
25450
|
let webMap;
|
|
25329
25451
|
if ("webMap" in webMapOrOptions) {
|
|
25330
|
-
const _a = webMapOrOptions, { webMap: webMap_
|
|
25452
|
+
const _a = webMapOrOptions, { webMap: webMap_ } = _a, adapterOptions = __objRest$1(_a, ["webMap"]);
|
|
25331
25453
|
webMap = webMap_;
|
|
25332
|
-
|
|
25333
|
-
url = url_;
|
|
25334
|
-
}
|
|
25335
|
-
if (adapterOptions) {
|
|
25336
|
-
createOpt = adapterOptions;
|
|
25337
|
-
}
|
|
25454
|
+
createOpt = adapterOptions;
|
|
25338
25455
|
} else {
|
|
25339
25456
|
webMap = webMapOrOptions;
|
|
25340
25457
|
}
|
|
25341
|
-
|
|
25342
|
-
url = URL$1;
|
|
25343
|
-
}
|
|
25458
|
+
const client = new QmsClient();
|
|
25344
25459
|
class QmsAdapter {
|
|
25345
25460
|
constructor(map, options) {
|
|
25346
25461
|
__publicField$6(this, "qms");
|
|
25347
25462
|
__publicField$6(this, "options");
|
|
25348
25463
|
__publicField$6(this, "map");
|
|
25349
25464
|
this.map = map;
|
|
25350
|
-
const opt = __spreadValues$
|
|
25465
|
+
const opt = __spreadValues$b(__spreadValues$b({}, createOpt), options);
|
|
25351
25466
|
this.options = opt;
|
|
25352
25467
|
this.options.baselayer = true;
|
|
25353
25468
|
if (opt.qms) {
|
|
@@ -25356,42 +25471,38 @@ function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
|
|
|
25356
25471
|
}
|
|
25357
25472
|
addLayer(options) {
|
|
25358
25473
|
return __async$c(this, null, function* () {
|
|
25359
|
-
|
|
25360
|
-
|
|
25361
|
-
|
|
25362
|
-
|
|
25363
|
-
|
|
25364
|
-
} catch (er) {
|
|
25365
|
-
console.error(er);
|
|
25366
|
-
}
|
|
25474
|
+
var _a2, _b, _c;
|
|
25475
|
+
const signal = (_a2 = options.signal) != null ? _a2 : this.options.signal;
|
|
25476
|
+
const qmsId = (_c = options.qmsId) != null ? _c : (_b = this.qms) == null ? void 0 : _b.id;
|
|
25477
|
+
if (qmsId === void 0) {
|
|
25478
|
+
return;
|
|
25367
25479
|
}
|
|
25368
|
-
|
|
25369
|
-
|
|
25370
|
-
|
|
25480
|
+
try {
|
|
25481
|
+
const layer = yield client.getLayer(qmsId, { signal });
|
|
25482
|
+
this.qms = layer.service;
|
|
25483
|
+
const type = alias[layer.type];
|
|
25371
25484
|
const WebMapAdapter = webMap.mapAdapter.layerAdapters[type];
|
|
25372
25485
|
if (WebMapAdapter) {
|
|
25373
25486
|
mixinProperties(QmsAdapter, WebMapAdapter, [
|
|
25374
25487
|
"showLayer",
|
|
25375
25488
|
"hideLayer"
|
|
25376
25489
|
]);
|
|
25377
|
-
|
|
25378
|
-
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
|
|
25382
|
-
|
|
25383
|
-
|
|
25384
|
-
|
|
25385
|
-
|
|
25386
|
-
|
|
25387
|
-
options.url = url2;
|
|
25388
|
-
}
|
|
25389
|
-
}
|
|
25390
|
-
this.options = options;
|
|
25391
|
-
const adapter = new WebMapAdapter(this.map, options);
|
|
25392
|
-
return adapter.addLayer(options);
|
|
25393
|
-
}
|
|
25490
|
+
options = __spreadProps$9(__spreadValues$b(__spreadValues$b(__spreadValues$b({}, type === "TILE" ? {
|
|
25491
|
+
order: 0,
|
|
25492
|
+
maxZoom: webMap.options.maxZoom,
|
|
25493
|
+
minZoom: webMap.options.minZoom
|
|
25494
|
+
} : {}), this.options), qmsLayerToOptions(layer)), {
|
|
25495
|
+
signal
|
|
25496
|
+
});
|
|
25497
|
+
this.options = options;
|
|
25498
|
+
const adapter = new WebMapAdapter(this.map, options);
|
|
25499
|
+
return adapter.addLayer(options);
|
|
25394
25500
|
}
|
|
25501
|
+
} catch (er) {
|
|
25502
|
+
if (signal == null ? void 0 : signal.aborted) {
|
|
25503
|
+
throw er;
|
|
25504
|
+
}
|
|
25505
|
+
console.error(er);
|
|
25395
25506
|
}
|
|
25396
25507
|
});
|
|
25397
25508
|
}
|
|
@@ -25400,31 +25511,9 @@ function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
|
|
|
25400
25511
|
}
|
|
25401
25512
|
|
|
25402
25513
|
var __defProp$b = Object.defineProperty;
|
|
25403
|
-
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
25404
|
-
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
25405
|
-
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
25406
25514
|
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
25407
|
-
var
|
|
25408
|
-
for (var prop in b || (b = {}))
|
|
25409
|
-
if (__hasOwnProp$b.call(b, prop))
|
|
25410
|
-
__defNormalProp$b(a, prop, b[prop]);
|
|
25411
|
-
if (__getOwnPropSymbols$b)
|
|
25412
|
-
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
25413
|
-
if (__propIsEnum$b.call(b, prop))
|
|
25414
|
-
__defNormalProp$b(a, prop, b[prop]);
|
|
25415
|
-
}
|
|
25416
|
-
return a;
|
|
25417
|
-
};
|
|
25418
|
-
var __publicField$5 = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
25515
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
|
|
25419
25516
|
class QmsKit {
|
|
25420
|
-
constructor(options) {
|
|
25421
|
-
__publicField$5(this, "options", {
|
|
25422
|
-
url: "https://qms.nextgis.com"
|
|
25423
|
-
});
|
|
25424
|
-
__publicField$5(this, "url");
|
|
25425
|
-
this.options = __spreadValues$b(__spreadValues$b({}, this.options), options);
|
|
25426
|
-
this.url = this.options.url;
|
|
25427
|
-
}
|
|
25428
25517
|
getLayerAdapters() {
|
|
25429
25518
|
return Promise.resolve([
|
|
25430
25519
|
{
|
|
@@ -25434,7 +25523,7 @@ class QmsKit {
|
|
|
25434
25523
|
]);
|
|
25435
25524
|
}
|
|
25436
25525
|
_createAdapter(webMap) {
|
|
25437
|
-
return createQmsAdapter({ webMap
|
|
25526
|
+
return createQmsAdapter({ webMap });
|
|
25438
25527
|
}
|
|
25439
25528
|
}
|
|
25440
25529
|
__publicField$5(QmsKit, "utils", {
|
|
@@ -25494,7 +25583,7 @@ function createBasemapLayerAdapter(_0) {
|
|
|
25494
25583
|
if (qms) {
|
|
25495
25584
|
const qms_ = JSON.parse(qms);
|
|
25496
25585
|
const adapter = Promise.resolve(
|
|
25497
|
-
QmsKit.utils.createQmsAdapter(webMap,
|
|
25586
|
+
QmsKit.utils.createQmsAdapter(webMap, {
|
|
25498
25587
|
qms: qms_,
|
|
25499
25588
|
baselayer: true
|
|
25500
25589
|
})
|