@nextgis/ngw-leaflet 4.0.0-alpha.1 → 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 +1292 -1202
- 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 +1292 -1202
- 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";
|
|
@@ -19432,7 +19432,8 @@ class WebMapLayers extends WebMapMain {
|
|
|
19432
19432
|
maxZoom: tileJson.maxzoom,
|
|
19433
19433
|
minZoom: tileJson.minzoom,
|
|
19434
19434
|
subdomains: tileJson.scheme,
|
|
19435
|
-
attribution: tileJson.attribution
|
|
19435
|
+
attribution: tileJson.attribution,
|
|
19436
|
+
request: tileJson.request
|
|
19436
19437
|
});
|
|
19437
19438
|
}
|
|
19438
19439
|
/**
|
|
@@ -19447,10 +19448,10 @@ class WebMapLayers extends WebMapMain {
|
|
|
19447
19448
|
this.options.layerRequest
|
|
19448
19449
|
);
|
|
19449
19450
|
const layerRequest = getLayerRequestOptions(options);
|
|
19450
|
-
const headers = __spreadValues$
|
|
19451
|
+
const headers = __spreadValues$A(__spreadValues$A({}, (defaultRequest == null ? void 0 : defaultRequest.headers) || {}), (layerRequest == null ? void 0 : layerRequest.headers) || {});
|
|
19451
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;
|
|
19452
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;
|
|
19453
|
-
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 } : {}));
|
|
19454
19455
|
}
|
|
19455
19456
|
/** @internal */
|
|
19456
19457
|
_emitLayerEvent(name, id, options) {
|
|
@@ -19462,21 +19463,21 @@ class WebMapLayers extends WebMapMain {
|
|
|
19462
19463
|
this.emitter.emit(name, options);
|
|
19463
19464
|
}
|
|
19464
19465
|
_onLayerClick(options) {
|
|
19465
|
-
return __async$
|
|
19466
|
+
return __async$v(this, null, function* () {
|
|
19466
19467
|
const id = options.layer.id;
|
|
19467
19468
|
this._emitLayerEvent("layer:click", id || "", options);
|
|
19468
19469
|
return Promise.resolve(options);
|
|
19469
19470
|
});
|
|
19470
19471
|
}
|
|
19471
19472
|
_onLayerDoubleClick(options) {
|
|
19472
|
-
return __async$
|
|
19473
|
+
return __async$v(this, null, function* () {
|
|
19473
19474
|
const id = options.layer.id;
|
|
19474
19475
|
this._emitLayerEvent("layer:dblclick", id || "", options);
|
|
19475
19476
|
return Promise.resolve(options);
|
|
19476
19477
|
});
|
|
19477
19478
|
}
|
|
19478
19479
|
_onLayerSelect(options) {
|
|
19479
|
-
return __async$
|
|
19480
|
+
return __async$v(this, null, function* () {
|
|
19480
19481
|
this._emitLayerEvent("layer:select", options.layer.id || "", options);
|
|
19481
19482
|
return Promise.resolve(options);
|
|
19482
19483
|
});
|
|
@@ -19545,25 +19546,25 @@ class WebMapLayers extends WebMapMain {
|
|
|
19545
19546
|
}
|
|
19546
19547
|
}
|
|
19547
19548
|
|
|
19548
|
-
var __defProp$
|
|
19549
|
-
var __getOwnPropSymbols$
|
|
19550
|
-
var __hasOwnProp$
|
|
19551
|
-
var __propIsEnum$
|
|
19552
|
-
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;
|
|
19553
19554
|
var __objRest$9 = (source, exclude) => {
|
|
19554
19555
|
var target = {};
|
|
19555
19556
|
for (var prop in source)
|
|
19556
|
-
if (__hasOwnProp$
|
|
19557
|
+
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
19557
19558
|
target[prop] = source[prop];
|
|
19558
|
-
if (source != null && __getOwnPropSymbols$
|
|
19559
|
-
for (var prop of __getOwnPropSymbols$
|
|
19560
|
-
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))
|
|
19561
19562
|
target[prop] = source[prop];
|
|
19562
19563
|
}
|
|
19563
19564
|
return target;
|
|
19564
19565
|
};
|
|
19565
|
-
var __publicField$
|
|
19566
|
-
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) => {
|
|
19567
19568
|
return new Promise((resolve, reject) => {
|
|
19568
19569
|
var fulfilled = (value) => {
|
|
19569
19570
|
try {
|
|
@@ -19586,14 +19587,14 @@ var __async$t = (__this, __arguments, generator) => {
|
|
|
19586
19587
|
const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
19587
19588
|
constructor() {
|
|
19588
19589
|
super(...arguments);
|
|
19589
|
-
__publicField$
|
|
19590
|
+
__publicField$y(this, "_loadControlQueue", {
|
|
19590
19591
|
"top-right": [],
|
|
19591
19592
|
"bottom-right": [],
|
|
19592
19593
|
"top-left": [],
|
|
19593
19594
|
"bottom-left": [],
|
|
19594
19595
|
inside: []
|
|
19595
19596
|
});
|
|
19596
|
-
__publicField$
|
|
19597
|
+
__publicField$y(this, "_isControlLoading", {
|
|
19597
19598
|
"top-right": false,
|
|
19598
19599
|
"bottom-right": false,
|
|
19599
19600
|
"top-left": false,
|
|
@@ -19602,7 +19603,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19602
19603
|
});
|
|
19603
19604
|
}
|
|
19604
19605
|
addControl(controlDef, position, options) {
|
|
19605
|
-
return __async$
|
|
19606
|
+
return __async$u(this, null, function* () {
|
|
19606
19607
|
let control;
|
|
19607
19608
|
const { addOptions, createOptions } = this._splitControlOptions(options);
|
|
19608
19609
|
position = position != null ? position : "top-left";
|
|
@@ -19613,7 +19614,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19613
19614
|
}
|
|
19614
19615
|
if (control) {
|
|
19615
19616
|
return new Promise((resolve) => {
|
|
19616
|
-
const promise = () => __async$
|
|
19617
|
+
const promise = () => __async$u(this, null, function* () {
|
|
19617
19618
|
const _control = yield control;
|
|
19618
19619
|
const c = this.mapAdapter.addControl(_control, position, addOptions);
|
|
19619
19620
|
resolve(c);
|
|
@@ -19636,7 +19637,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19636
19637
|
* ```
|
|
19637
19638
|
*/
|
|
19638
19639
|
createControl(control, options) {
|
|
19639
|
-
return __async$
|
|
19640
|
+
return __async$u(this, null, function* () {
|
|
19640
19641
|
yield this.onLoad("build-map");
|
|
19641
19642
|
if (this.mapAdapter.createControl) {
|
|
19642
19643
|
return this.mapAdapter.createControl(control, options);
|
|
@@ -19644,7 +19645,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19644
19645
|
});
|
|
19645
19646
|
}
|
|
19646
19647
|
createButtonControl(options) {
|
|
19647
|
-
return __async$
|
|
19648
|
+
return __async$u(this, null, function* () {
|
|
19648
19649
|
yield this.onLoad("build-map");
|
|
19649
19650
|
if (this.mapAdapter.createButtonControl) {
|
|
19650
19651
|
return this.mapAdapter.createButtonControl(options);
|
|
@@ -19671,7 +19672,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19671
19672
|
* {@link http://code.nextgis.com/demo-examples-toggle-control | Toggle button control example}
|
|
19672
19673
|
*/
|
|
19673
19674
|
createToggleControl(options) {
|
|
19674
|
-
return __async$
|
|
19675
|
+
return __async$u(this, null, function* () {
|
|
19675
19676
|
yield this.onLoad("build-map");
|
|
19676
19677
|
if (this.mapAdapter.createToggleControl) {
|
|
19677
19678
|
return this.mapAdapter.createToggleControl(options);
|
|
@@ -19730,7 +19731,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19730
19731
|
}
|
|
19731
19732
|
}
|
|
19732
19733
|
_applyControls(position) {
|
|
19733
|
-
return __async$
|
|
19734
|
+
return __async$u(this, null, function* () {
|
|
19734
19735
|
if (this._loadControlQueue[position].length) {
|
|
19735
19736
|
this._isControlLoading[position] = true;
|
|
19736
19737
|
const controlCb = this._loadControlQueue[position][0];
|
|
@@ -19757,7 +19758,7 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
19757
19758
|
return id !== void 0 || order !== void 0 ? { id, order } : void 0;
|
|
19758
19759
|
}
|
|
19759
19760
|
};
|
|
19760
|
-
__publicField$
|
|
19761
|
+
__publicField$y(_WebMapControls, "controls", {
|
|
19761
19762
|
CONTROL: (webMap, options) => {
|
|
19762
19763
|
return webMap.createControl(options.control, options.options);
|
|
19763
19764
|
},
|
|
@@ -19770,39 +19771,39 @@ __publicField$x(_WebMapControls, "controls", {
|
|
|
19770
19771
|
});
|
|
19771
19772
|
let WebMapControls = _WebMapControls;
|
|
19772
19773
|
|
|
19773
|
-
var __defProp$
|
|
19774
|
-
var __defProps$
|
|
19775
|
-
var __getOwnPropDescs$
|
|
19776
|
-
var __getOwnPropSymbols$
|
|
19777
|
-
var __hasOwnProp$
|
|
19778
|
-
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;
|
|
19779
19780
|
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
19780
|
-
var __defNormalProp$
|
|
19781
|
-
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) => {
|
|
19782
19783
|
for (var prop in b || (b = {}))
|
|
19783
|
-
if (__hasOwnProp$
|
|
19784
|
-
__defNormalProp$
|
|
19785
|
-
if (__getOwnPropSymbols$
|
|
19786
|
-
for (var prop of __getOwnPropSymbols$
|
|
19787
|
-
if (__propIsEnum$
|
|
19788
|
-
__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]);
|
|
19789
19790
|
}
|
|
19790
19791
|
return a;
|
|
19791
19792
|
};
|
|
19792
|
-
var __spreadProps$
|
|
19793
|
+
var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
|
|
19793
19794
|
var __objRest$8 = (source, exclude) => {
|
|
19794
19795
|
var target = {};
|
|
19795
19796
|
for (var prop in source)
|
|
19796
|
-
if (__hasOwnProp$
|
|
19797
|
+
if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
19797
19798
|
target[prop] = source[prop];
|
|
19798
|
-
if (source != null && __getOwnPropSymbols$
|
|
19799
|
-
for (var prop of __getOwnPropSymbols$
|
|
19800
|
-
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))
|
|
19801
19802
|
target[prop] = source[prop];
|
|
19802
19803
|
}
|
|
19803
19804
|
return target;
|
|
19804
19805
|
};
|
|
19805
|
-
var __async$
|
|
19806
|
+
var __async$t = (__this, __arguments, generator) => {
|
|
19806
19807
|
return new Promise((resolve, reject) => {
|
|
19807
19808
|
var fulfilled = (value) => {
|
|
19808
19809
|
try {
|
|
@@ -19836,7 +19837,7 @@ class WebMap extends WebMapControls {
|
|
|
19836
19837
|
* @internal
|
|
19837
19838
|
*/
|
|
19838
19839
|
_addLayerProviders() {
|
|
19839
|
-
return __async$
|
|
19840
|
+
return __async$t(this, null, function* () {
|
|
19840
19841
|
try {
|
|
19841
19842
|
for (var iter2 = __forAwait(this._starterKits), more2, temp2, error2; more2 = !(temp2 = yield iter2.next()).done; more2 = false) {
|
|
19842
19843
|
const kit = temp2.value;
|
|
@@ -19880,7 +19881,7 @@ class WebMap extends WebMapControls {
|
|
|
19880
19881
|
* @internal
|
|
19881
19882
|
*/
|
|
19882
19883
|
_onLoadSync() {
|
|
19883
|
-
return __async$
|
|
19884
|
+
return __async$t(this, null, function* () {
|
|
19884
19885
|
try {
|
|
19885
19886
|
for (var iter = __forAwait(this._starterKits), more, temp, error; more = !(temp = yield iter.next()).done; more = false) {
|
|
19886
19887
|
const kit = temp.value;
|
|
@@ -19918,7 +19919,7 @@ class WebMap extends WebMapControls {
|
|
|
19918
19919
|
}
|
|
19919
19920
|
}
|
|
19920
19921
|
const _a = controlOptions, { id, order, position } = _a, options = __objRest$8(_a, ["id", "order", "position"]);
|
|
19921
|
-
this.addControl(controlAdapterName, position || "top-left", __spreadProps$
|
|
19922
|
+
this.addControl(controlAdapterName, position || "top-left", __spreadProps$p(__spreadValues$z({}, options), {
|
|
19922
19923
|
id,
|
|
19923
19924
|
order
|
|
19924
19925
|
}));
|
|
@@ -19970,20 +19971,20 @@ function callAjax({
|
|
|
19970
19971
|
return [promise, abortFunc];
|
|
19971
19972
|
}
|
|
19972
19973
|
|
|
19973
|
-
var __defProp$
|
|
19974
|
-
var __defNormalProp$
|
|
19975
|
-
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);
|
|
19976
19977
|
class Queue {
|
|
19977
19978
|
/**
|
|
19978
19979
|
* @param {PromiseQueueOptions} options - Configuration options for the queue.
|
|
19979
19980
|
*/
|
|
19980
19981
|
constructor({ concurrency = 1, delay = 0 } = {}) {
|
|
19981
|
-
__publicField$
|
|
19982
|
-
__publicField$
|
|
19983
|
-
__publicField$
|
|
19984
|
-
__publicField$
|
|
19985
|
-
__publicField$
|
|
19986
|
-
__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", []);
|
|
19987
19988
|
this.concurrency = concurrency;
|
|
19988
19989
|
this.delay = delay;
|
|
19989
19990
|
}
|
|
@@ -20059,13 +20060,13 @@ class Queue {
|
|
|
20059
20060
|
|
|
20060
20061
|
const imageQueue = new Queue({ concurrency: 6, delay: 200 });
|
|
20061
20062
|
|
|
20062
|
-
var __defProp$
|
|
20063
|
-
var __defNormalProp$
|
|
20064
|
-
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);
|
|
20065
20066
|
class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
20066
20067
|
constructor(imageUrl, bounds, options) {
|
|
20067
20068
|
super(imageUrl, bounds, options);
|
|
20068
|
-
__publicField$
|
|
20069
|
+
__publicField$w(this, "_aborter");
|
|
20069
20070
|
}
|
|
20070
20071
|
cancelLoad() {
|
|
20071
20072
|
if (this._aborter) {
|
|
@@ -20095,16 +20096,16 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
|
20095
20096
|
}
|
|
20096
20097
|
}
|
|
20097
20098
|
|
|
20098
|
-
var __defProp$
|
|
20099
|
-
var __defNormalProp$
|
|
20100
|
-
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);
|
|
20101
20102
|
class ImageLayer extends leafletSrcExports.Layer {
|
|
20102
20103
|
constructor(url, options) {
|
|
20103
20104
|
super(options);
|
|
20104
|
-
__publicField$
|
|
20105
|
+
__publicField$v(this, "defaultWmsParams", {
|
|
20105
20106
|
request: "GetMap"
|
|
20106
20107
|
});
|
|
20107
|
-
__publicField$
|
|
20108
|
+
__publicField$v(this, "options", {
|
|
20108
20109
|
crs: null,
|
|
20109
20110
|
uppercase: false,
|
|
20110
20111
|
attribution: "",
|
|
@@ -20118,11 +20119,11 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
20118
20119
|
viewPortBuffer: 0,
|
|
20119
20120
|
setViewDelay: 100
|
|
20120
20121
|
});
|
|
20121
|
-
__publicField$
|
|
20122
|
-
__publicField$
|
|
20123
|
-
__publicField$
|
|
20124
|
-
__publicField$
|
|
20125
|
-
__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");
|
|
20126
20127
|
this._url = url;
|
|
20127
20128
|
const params = {};
|
|
20128
20129
|
const opts = {};
|
|
@@ -20287,30 +20288,30 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
20287
20288
|
}
|
|
20288
20289
|
}
|
|
20289
20290
|
|
|
20290
|
-
var __defProp$
|
|
20291
|
-
var __defProps$
|
|
20292
|
-
var __getOwnPropDescs$
|
|
20293
|
-
var __getOwnPropSymbols$
|
|
20294
|
-
var __hasOwnProp$
|
|
20295
|
-
var __propIsEnum$
|
|
20296
|
-
var __defNormalProp$
|
|
20297
|
-
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) => {
|
|
20298
20299
|
for (var prop in b || (b = {}))
|
|
20299
|
-
if (__hasOwnProp$
|
|
20300
|
-
__defNormalProp$
|
|
20301
|
-
if (__getOwnPropSymbols$
|
|
20302
|
-
for (var prop of __getOwnPropSymbols$
|
|
20303
|
-
if (__propIsEnum$
|
|
20304
|
-
__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]);
|
|
20305
20306
|
}
|
|
20306
20307
|
return a;
|
|
20307
20308
|
};
|
|
20308
|
-
var __spreadProps$
|
|
20309
|
-
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);
|
|
20310
20311
|
class ImageAdapter extends BaseAdapter {
|
|
20311
20312
|
constructor() {
|
|
20312
20313
|
super(...arguments);
|
|
20313
|
-
__publicField$
|
|
20314
|
+
__publicField$u(this, "layer");
|
|
20314
20315
|
}
|
|
20315
20316
|
addLayer(options) {
|
|
20316
20317
|
var _a;
|
|
@@ -20318,10 +20319,10 @@ class ImageAdapter extends BaseAdapter {
|
|
|
20318
20319
|
if (url) {
|
|
20319
20320
|
const updateWmsParamsFromOpt = options.updateWmsParams;
|
|
20320
20321
|
const request = getLayerRequestOptions(options);
|
|
20321
|
-
this.layer = new ImageLayer(url, __spreadProps$
|
|
20322
|
+
this.layer = new ImageLayer(url, __spreadProps$o(__spreadValues$y(__spreadValues$y(__spreadValues$y({
|
|
20322
20323
|
pane: this.pane,
|
|
20323
20324
|
setViewDelay: options.setViewDelay
|
|
20324
|
-
}, __spreadProps$
|
|
20325
|
+
}, __spreadProps$o(__spreadValues$y({
|
|
20325
20326
|
transparent: true
|
|
20326
20327
|
}, options), {
|
|
20327
20328
|
opacity: (_a = options.opacity) != null ? _a : void 0
|
|
@@ -20346,7 +20347,7 @@ class ImageAdapter extends BaseAdapter {
|
|
|
20346
20347
|
}
|
|
20347
20348
|
}
|
|
20348
20349
|
}
|
|
20349
|
-
__publicField$
|
|
20350
|
+
__publicField$u(ImageAdapter, "queue", imageQueue);
|
|
20350
20351
|
|
|
20351
20352
|
function makeRemote(Base) {
|
|
20352
20353
|
return class RemoteTileLayer extends Base {
|
|
@@ -20409,33 +20410,33 @@ class TileLayerBase extends leafletSrcExports.TileLayer {
|
|
|
20409
20410
|
}
|
|
20410
20411
|
const TileLayer = makeRemote(TileLayerBase);
|
|
20411
20412
|
|
|
20412
|
-
var __defProp$
|
|
20413
|
-
var __defProps$
|
|
20414
|
-
var __getOwnPropDescs$
|
|
20415
|
-
var __getOwnPropSymbols$
|
|
20416
|
-
var __hasOwnProp$
|
|
20417
|
-
var __propIsEnum$
|
|
20418
|
-
var __defNormalProp$
|
|
20419
|
-
var __spreadValues$
|
|
20420
|
-
for (var prop in b || (b = {}))
|
|
20421
|
-
if (__hasOwnProp$
|
|
20422
|
-
__defNormalProp$
|
|
20423
|
-
if (__getOwnPropSymbols$
|
|
20424
|
-
for (var prop of __getOwnPropSymbols$
|
|
20425
|
-
if (__propIsEnum$
|
|
20426
|
-
__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]);
|
|
20427
20428
|
}
|
|
20428
20429
|
return a;
|
|
20429
20430
|
};
|
|
20430
|
-
var __spreadProps$
|
|
20431
|
+
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
20431
20432
|
var __objRest$7 = (source, exclude) => {
|
|
20432
20433
|
var target = {};
|
|
20433
20434
|
for (var prop in source)
|
|
20434
|
-
if (__hasOwnProp$
|
|
20435
|
+
if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
20435
20436
|
target[prop] = source[prop];
|
|
20436
|
-
if (source != null && __getOwnPropSymbols$
|
|
20437
|
-
for (var prop of __getOwnPropSymbols$
|
|
20438
|
-
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))
|
|
20439
20440
|
target[prop] = source[prop];
|
|
20440
20441
|
}
|
|
20441
20442
|
return target;
|
|
@@ -20446,7 +20447,7 @@ class TileAdapter extends BaseAdapter {
|
|
|
20446
20447
|
if (options) {
|
|
20447
20448
|
const _a = options, { url } = _a, opt = __objRest$7(_a, ["url"]);
|
|
20448
20449
|
if (url) {
|
|
20449
|
-
const tileLayerOptions = __spreadValues$
|
|
20450
|
+
const tileLayerOptions = __spreadValues$x({
|
|
20450
20451
|
pane: this.pane,
|
|
20451
20452
|
attribution: opt.attribution,
|
|
20452
20453
|
minZoom: opt.minZoom,
|
|
@@ -20458,7 +20459,7 @@ class TileAdapter extends BaseAdapter {
|
|
|
20458
20459
|
let layer;
|
|
20459
20460
|
const request = getLayerRequestOptions(opt);
|
|
20460
20461
|
if (request) {
|
|
20461
|
-
layer = new TileLayer(url, __spreadProps$
|
|
20462
|
+
layer = new TileLayer(url, __spreadProps$n(__spreadValues$x({}, tileLayerOptions), {
|
|
20462
20463
|
request,
|
|
20463
20464
|
setViewDelay: opt.setViewDelay
|
|
20464
20465
|
}));
|
|
@@ -20480,29 +20481,29 @@ class TileAdapter extends BaseAdapter {
|
|
|
20480
20481
|
}
|
|
20481
20482
|
}
|
|
20482
20483
|
|
|
20483
|
-
var __defProp$
|
|
20484
|
-
var __defProps$
|
|
20485
|
-
var __getOwnPropDescs$
|
|
20486
|
-
var __getOwnPropSymbols$
|
|
20487
|
-
var __hasOwnProp$
|
|
20488
|
-
var __propIsEnum$
|
|
20489
|
-
var __defNormalProp$
|
|
20490
|
-
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) => {
|
|
20491
20492
|
for (var prop in b || (b = {}))
|
|
20492
|
-
if (__hasOwnProp$
|
|
20493
|
-
__defNormalProp$
|
|
20494
|
-
if (__getOwnPropSymbols$
|
|
20495
|
-
for (var prop of __getOwnPropSymbols$
|
|
20496
|
-
if (__propIsEnum$
|
|
20497
|
-
__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]);
|
|
20498
20499
|
}
|
|
20499
20500
|
return a;
|
|
20500
20501
|
};
|
|
20501
|
-
var __spreadProps$
|
|
20502
|
+
var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
|
|
20502
20503
|
class OsmAdapter extends TileAdapter {
|
|
20503
20504
|
addLayer(options) {
|
|
20504
20505
|
const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
|
20505
|
-
return super.addLayer(__spreadProps$
|
|
20506
|
+
return super.addLayer(__spreadProps$m(__spreadValues$w({
|
|
20506
20507
|
name: "OpenStreetMap",
|
|
20507
20508
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
|
20508
20509
|
}, options), {
|
|
@@ -20518,55 +20519,57 @@ class WmsLayerBase extends leafletSrcExports.TileLayer.WMS {
|
|
|
20518
20519
|
}
|
|
20519
20520
|
const WmsLayer = makeRemote(WmsLayerBase);
|
|
20520
20521
|
|
|
20521
|
-
var __defProp$
|
|
20522
|
-
var __defProps$
|
|
20523
|
-
var __getOwnPropDescs$
|
|
20524
|
-
var __getOwnPropSymbols$
|
|
20525
|
-
var __hasOwnProp$
|
|
20526
|
-
var __propIsEnum$
|
|
20527
|
-
var __defNormalProp$
|
|
20528
|
-
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) => {
|
|
20529
20530
|
for (var prop in b || (b = {}))
|
|
20530
|
-
if (__hasOwnProp$
|
|
20531
|
-
__defNormalProp$
|
|
20532
|
-
if (__getOwnPropSymbols$
|
|
20533
|
-
for (var prop of __getOwnPropSymbols$
|
|
20534
|
-
if (__propIsEnum$
|
|
20535
|
-
__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]);
|
|
20536
20537
|
}
|
|
20537
20538
|
return a;
|
|
20538
20539
|
};
|
|
20539
|
-
var __spreadProps$
|
|
20540
|
+
var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
|
|
20540
20541
|
var __objRest$6 = (source, exclude) => {
|
|
20541
20542
|
var target = {};
|
|
20542
20543
|
for (var prop in source)
|
|
20543
|
-
if (__hasOwnProp$
|
|
20544
|
+
if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
20544
20545
|
target[prop] = source[prop];
|
|
20545
|
-
if (source != null && __getOwnPropSymbols$
|
|
20546
|
-
for (var prop of __getOwnPropSymbols$
|
|
20547
|
-
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))
|
|
20548
20549
|
target[prop] = source[prop];
|
|
20549
20550
|
}
|
|
20550
20551
|
return target;
|
|
20551
20552
|
};
|
|
20552
20553
|
class WmsAdapter extends BaseAdapter {
|
|
20553
20554
|
addLayer(options) {
|
|
20555
|
+
var _b;
|
|
20554
20556
|
Object.assign(this.options, options);
|
|
20555
20557
|
const _a = options, { url } = _a, opt = __objRest$6(_a, ["url"]);
|
|
20556
20558
|
if (url) {
|
|
20557
|
-
const layerOptions = __spreadValues$
|
|
20559
|
+
const layerOptions = __spreadValues$v(__spreadValues$v({
|
|
20558
20560
|
pane: this.pane,
|
|
20559
20561
|
attribution: opt.attribution,
|
|
20560
20562
|
minZoom: opt.minZoom,
|
|
20561
20563
|
maxZoom: opt.maxZoom,
|
|
20562
20564
|
layers: options.layers,
|
|
20563
20565
|
format: options.format,
|
|
20564
|
-
|
|
20565
|
-
|
|
20566
|
+
version: options.version,
|
|
20567
|
+
transparent: (_b = options.transparent) != null ? _b : true
|
|
20568
|
+
}, options.params), options.nativeOptions);
|
|
20566
20569
|
let layer;
|
|
20567
20570
|
const request = getLayerRequestOptions(opt);
|
|
20568
20571
|
if (request) {
|
|
20569
|
-
layer = new WmsLayer(url, __spreadProps$
|
|
20572
|
+
layer = new WmsLayer(url, __spreadProps$l(__spreadValues$v({}, layerOptions), {
|
|
20570
20573
|
request
|
|
20571
20574
|
}));
|
|
20572
20575
|
} else {
|
|
@@ -20585,34 +20588,34 @@ function arrayToBoundsExpression(bounds) {
|
|
|
20585
20588
|
];
|
|
20586
20589
|
}
|
|
20587
20590
|
|
|
20588
|
-
var __defProp$
|
|
20589
|
-
var __getOwnPropSymbols$
|
|
20590
|
-
var __hasOwnProp$
|
|
20591
|
-
var __propIsEnum$
|
|
20592
|
-
var __defNormalProp$
|
|
20593
|
-
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) => {
|
|
20594
20597
|
for (var prop in b || (b = {}))
|
|
20595
|
-
if (__hasOwnProp$
|
|
20596
|
-
__defNormalProp$
|
|
20597
|
-
if (__getOwnPropSymbols$
|
|
20598
|
-
for (var prop of __getOwnPropSymbols$
|
|
20599
|
-
if (__propIsEnum$
|
|
20600
|
-
__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]);
|
|
20601
20604
|
}
|
|
20602
20605
|
return a;
|
|
20603
20606
|
};
|
|
20604
|
-
var __publicField$
|
|
20607
|
+
var __publicField$t = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20605
20608
|
const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
20606
20609
|
constructor() {
|
|
20607
|
-
__publicField$
|
|
20608
|
-
__publicField$
|
|
20609
|
-
__publicField$
|
|
20610
|
-
__publicField$
|
|
20611
|
-
__publicField$
|
|
20612
|
-
__publicField$
|
|
20613
|
-
__publicField$
|
|
20614
|
-
__publicField$
|
|
20615
|
-
__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", [
|
|
20616
20619
|
"move",
|
|
20617
20620
|
"zoom",
|
|
20618
20621
|
"zoomend",
|
|
@@ -20620,14 +20623,14 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
20620
20623
|
"moveend",
|
|
20621
20624
|
"movestart"
|
|
20622
20625
|
]);
|
|
20623
|
-
__publicField$
|
|
20626
|
+
__publicField$t(this, "_positionEvents", [
|
|
20624
20627
|
"mousemove",
|
|
20625
20628
|
"mouseout",
|
|
20626
20629
|
"mouseover"
|
|
20627
20630
|
]);
|
|
20628
20631
|
}
|
|
20629
20632
|
create(options) {
|
|
20630
|
-
this.options = __spreadValues$
|
|
20633
|
+
this.options = __spreadValues$u({}, options);
|
|
20631
20634
|
if (this.options.target) {
|
|
20632
20635
|
const {
|
|
20633
20636
|
zoom,
|
|
@@ -20637,7 +20640,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
20637
20640
|
maxBounds: mb,
|
|
20638
20641
|
mapAdapterOptions
|
|
20639
20642
|
} = this.options;
|
|
20640
|
-
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({
|
|
20641
20644
|
attributionControl: false,
|
|
20642
20645
|
zoomControl: false,
|
|
20643
20646
|
maxBounds: mb ? arrayToBoundsExpression(mb) : void 0,
|
|
@@ -20929,7 +20932,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
20929
20932
|
}
|
|
20930
20933
|
}
|
|
20931
20934
|
};
|
|
20932
|
-
__publicField$
|
|
20935
|
+
__publicField$t(_LeafletMapAdapter, "layerAdapters", {
|
|
20933
20936
|
GEOJSON: GeoJsonAdapter,
|
|
20934
20937
|
IMAGE: ImageAdapter,
|
|
20935
20938
|
TILE: TileAdapter,
|
|
@@ -20937,11 +20940,11 @@ __publicField$s(_LeafletMapAdapter, "layerAdapters", {
|
|
|
20937
20940
|
// // MVT: MvtAdapter,
|
|
20938
20941
|
OSM: OsmAdapter
|
|
20939
20942
|
});
|
|
20940
|
-
__publicField$
|
|
20943
|
+
__publicField$t(_LeafletMapAdapter, "controlAdapters", {
|
|
20941
20944
|
ZOOM: leafletSrcExports.Control.Zoom,
|
|
20942
20945
|
ATTRIBUTION: AttributionControl
|
|
20943
20946
|
});
|
|
20944
|
-
__publicField$
|
|
20947
|
+
__publicField$t(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
|
|
20945
20948
|
let LeafletMapAdapter = _LeafletMapAdapter;
|
|
20946
20949
|
|
|
20947
20950
|
const svgPath = {
|
|
@@ -21029,23 +21032,23 @@ function template(str, data) {
|
|
|
21029
21032
|
});
|
|
21030
21033
|
}
|
|
21031
21034
|
|
|
21032
|
-
var __defProp$
|
|
21033
|
-
var __getOwnPropSymbols$
|
|
21034
|
-
var __hasOwnProp$
|
|
21035
|
-
var __propIsEnum$
|
|
21036
|
-
var __defNormalProp$
|
|
21037
|
-
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) => {
|
|
21038
21041
|
for (var prop in b || (b = {}))
|
|
21039
|
-
if (__hasOwnProp$
|
|
21040
|
-
__defNormalProp$
|
|
21041
|
-
if (__getOwnPropSymbols$
|
|
21042
|
-
for (var prop of __getOwnPropSymbols$
|
|
21043
|
-
if (__propIsEnum$
|
|
21044
|
-
__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]);
|
|
21045
21048
|
}
|
|
21046
21049
|
return a;
|
|
21047
21050
|
};
|
|
21048
|
-
var __async$
|
|
21051
|
+
var __async$s = (__this, __arguments, generator) => {
|
|
21049
21052
|
return new Promise((resolve, reject) => {
|
|
21050
21053
|
var fulfilled = (value) => {
|
|
21051
21054
|
try {
|
|
@@ -21066,7 +21069,7 @@ var __async$r = (__this, __arguments, generator) => {
|
|
|
21066
21069
|
});
|
|
21067
21070
|
};
|
|
21068
21071
|
function apiRequest(opt) {
|
|
21069
|
-
return __async$
|
|
21072
|
+
return __async$s(this, null, function* () {
|
|
21070
21073
|
const { params, name, connector, requestOptions } = opt;
|
|
21071
21074
|
const apiItems = yield connector.connect();
|
|
21072
21075
|
let apiItem = apiItems && apiItems[name];
|
|
@@ -21104,7 +21107,7 @@ function apiRequest(opt) {
|
|
|
21104
21107
|
}
|
|
21105
21108
|
}
|
|
21106
21109
|
if (url) {
|
|
21107
|
-
return connector.makeQuery(url, params, __spreadValues$
|
|
21110
|
+
return connector.makeQuery(url, params, __spreadValues$t({
|
|
21108
21111
|
cacheName: name
|
|
21109
21112
|
}, requestOptions));
|
|
21110
21113
|
} else {
|
|
@@ -21116,12 +21119,12 @@ function apiRequest(opt) {
|
|
|
21116
21119
|
});
|
|
21117
21120
|
}
|
|
21118
21121
|
|
|
21119
|
-
var __defProp$
|
|
21120
|
-
var __defNormalProp$
|
|
21121
|
-
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);
|
|
21122
21125
|
const _Cache = class _Cache {
|
|
21123
21126
|
constructor(options = {}) {
|
|
21124
|
-
__publicField$
|
|
21127
|
+
__publicField$s(this, "cache", []);
|
|
21125
21128
|
var _a;
|
|
21126
21129
|
const namespace = (_a = options.namespace) != null ? _a : "default";
|
|
21127
21130
|
if (_Cache.instance[namespace]) {
|
|
@@ -21252,11 +21255,11 @@ const _Cache = class _Cache {
|
|
|
21252
21255
|
return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
|
|
21253
21256
|
}
|
|
21254
21257
|
};
|
|
21255
|
-
__publicField$
|
|
21258
|
+
__publicField$s(_Cache, "instance", {});
|
|
21256
21259
|
let Cache = _Cache;
|
|
21257
21260
|
|
|
21258
21261
|
var pkg = {
|
|
21259
|
-
version: "
|
|
21262
|
+
version: "4.0.0-alpha.2"};
|
|
21260
21263
|
|
|
21261
21264
|
class AbortError extends Error {
|
|
21262
21265
|
constructor(message = "AbortError") {
|
|
@@ -21265,46 +21268,46 @@ class AbortError extends Error {
|
|
|
21265
21268
|
}
|
|
21266
21269
|
}
|
|
21267
21270
|
|
|
21268
|
-
var __defProp$
|
|
21269
|
-
var __defNormalProp$
|
|
21270
|
-
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);
|
|
21271
21274
|
class NgwError extends Error {
|
|
21272
21275
|
constructor(er) {
|
|
21273
21276
|
super();
|
|
21274
|
-
__publicField$
|
|
21275
|
-
__publicField$
|
|
21276
|
-
__publicField$
|
|
21277
|
-
__publicField$
|
|
21278
|
-
__publicField$
|
|
21279
|
-
__publicField$
|
|
21280
|
-
__publicField$
|
|
21281
|
-
__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");
|
|
21282
21285
|
Object.assign(this, er);
|
|
21283
21286
|
Object.setPrototypeOf(this, NgwError.prototype);
|
|
21284
21287
|
}
|
|
21285
21288
|
}
|
|
21286
21289
|
|
|
21287
|
-
var __defProp$
|
|
21288
|
-
var __defNormalProp$
|
|
21289
|
-
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);
|
|
21290
21293
|
class InsufficientPermissionsError extends NgwError {
|
|
21291
21294
|
constructor(obj) {
|
|
21292
21295
|
super(obj);
|
|
21293
|
-
__publicField$
|
|
21294
|
-
__publicField$
|
|
21296
|
+
__publicField$q(this, "name", "InsufficientPermissionsError");
|
|
21297
|
+
__publicField$q(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
|
|
21295
21298
|
Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
|
|
21296
21299
|
}
|
|
21297
21300
|
}
|
|
21298
21301
|
|
|
21299
|
-
var __defProp$
|
|
21300
|
-
var __defNormalProp$
|
|
21301
|
-
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);
|
|
21302
21305
|
let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
|
|
21303
21306
|
constructor(obj) {
|
|
21304
21307
|
super(obj);
|
|
21305
|
-
__publicField$
|
|
21306
|
-
__publicField$
|
|
21307
|
-
__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.");
|
|
21308
21311
|
Object.setPrototypeOf(this, NetworksResponseError.prototype);
|
|
21309
21312
|
}
|
|
21310
21313
|
};
|
|
@@ -21341,27 +21344,27 @@ function isError(error) {
|
|
|
21341
21344
|
return false;
|
|
21342
21345
|
}
|
|
21343
21346
|
|
|
21344
|
-
var __defProp$
|
|
21345
|
-
var __defNormalProp$
|
|
21346
|
-
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);
|
|
21347
21350
|
class NetworkError extends Error {
|
|
21348
21351
|
constructor(url) {
|
|
21349
21352
|
super();
|
|
21350
|
-
__publicField$
|
|
21353
|
+
__publicField$o(this, "name", "NetworkError");
|
|
21351
21354
|
Object.setPrototypeOf(this, NetworkError.prototype);
|
|
21352
21355
|
this.message = `Unable to request ${url}.
|
|
21353
21356
|
Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
|
|
21354
21357
|
}
|
|
21355
21358
|
}
|
|
21356
21359
|
|
|
21357
|
-
var __defProp$
|
|
21358
|
-
var __defNormalProp$
|
|
21359
|
-
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);
|
|
21360
21363
|
class ResourceNotFoundError extends NgwError {
|
|
21361
21364
|
constructor(obj) {
|
|
21362
21365
|
super(obj);
|
|
21363
|
-
__publicField$
|
|
21364
|
-
__publicField$
|
|
21366
|
+
__publicField$n(this, "name", "ResourceNotFoundError");
|
|
21367
|
+
__publicField$n(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
|
|
21365
21368
|
Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
|
|
21366
21369
|
}
|
|
21367
21370
|
}
|
|
@@ -21378,13 +21381,13 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
21378
21381
|
isError: isError
|
|
21379
21382
|
});
|
|
21380
21383
|
|
|
21381
|
-
var __defProp$
|
|
21382
|
-
var __defNormalProp$
|
|
21383
|
-
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);
|
|
21384
21387
|
class BaseAPIError extends Error {
|
|
21385
21388
|
constructor(message) {
|
|
21386
21389
|
super(message || "Something went wrong.");
|
|
21387
|
-
__publicField$
|
|
21390
|
+
__publicField$m(this, "title");
|
|
21388
21391
|
this.name = "BaseAPIError";
|
|
21389
21392
|
this.title = "Unknown API error";
|
|
21390
21393
|
if (Error.captureStackTrace) {
|
|
@@ -21396,7 +21399,7 @@ class NetworksResponseError extends BaseAPIError {
|
|
|
21396
21399
|
// prettier-ignore
|
|
21397
21400
|
constructor(message) {
|
|
21398
21401
|
super(message || "There is no response from the server or problem connecting to server.");
|
|
21399
|
-
__publicField$
|
|
21402
|
+
__publicField$m(this, "detail");
|
|
21400
21403
|
this.title = "Network error";
|
|
21401
21404
|
this.detail = "Check network connectivity and try again later.";
|
|
21402
21405
|
}
|
|
@@ -21410,8 +21413,8 @@ class InvalidResponseError extends BaseAPIError {
|
|
|
21410
21413
|
class ServerResponseError extends BaseAPIError {
|
|
21411
21414
|
constructor(data) {
|
|
21412
21415
|
super(data.message);
|
|
21413
|
-
__publicField$
|
|
21414
|
-
__publicField$
|
|
21416
|
+
__publicField$m(this, "detail");
|
|
21417
|
+
__publicField$m(this, "data");
|
|
21415
21418
|
this.title = data.title || this.title;
|
|
21416
21419
|
this.detail = data.detail || null;
|
|
21417
21420
|
this.data = data;
|
|
@@ -21421,8 +21424,8 @@ class LunkwillError extends Error {
|
|
|
21421
21424
|
// prettier-ignore
|
|
21422
21425
|
constructor(message, data = {}) {
|
|
21423
21426
|
super(message || "Unexpected error while processing long-running request.");
|
|
21424
|
-
__publicField$
|
|
21425
|
-
__publicField$
|
|
21427
|
+
__publicField$m(this, "title");
|
|
21428
|
+
__publicField$m(this, "data");
|
|
21426
21429
|
this.name = "LunkwillError";
|
|
21427
21430
|
this.title = "Long-running request error";
|
|
21428
21431
|
this.data = data;
|
|
@@ -21442,35 +21445,35 @@ class LunkwillRequestFailed extends LunkwillError {
|
|
|
21442
21445
|
}
|
|
21443
21446
|
}
|
|
21444
21447
|
|
|
21445
|
-
var __defProp$
|
|
21446
|
-
var __getOwnPropSymbols$
|
|
21447
|
-
var __hasOwnProp$
|
|
21448
|
-
var __propIsEnum$
|
|
21449
|
-
var __defNormalProp$
|
|
21450
|
-
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) => {
|
|
21451
21454
|
for (var prop in b || (b = {}))
|
|
21452
|
-
if (__hasOwnProp$
|
|
21453
|
-
__defNormalProp$
|
|
21454
|
-
if (__getOwnPropSymbols$
|
|
21455
|
-
for (var prop of __getOwnPropSymbols$
|
|
21456
|
-
if (__propIsEnum$
|
|
21457
|
-
__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]);
|
|
21458
21461
|
}
|
|
21459
21462
|
return a;
|
|
21460
21463
|
};
|
|
21461
21464
|
var __objRest$5 = (source, exclude) => {
|
|
21462
21465
|
var target = {};
|
|
21463
21466
|
for (var prop in source)
|
|
21464
|
-
if (__hasOwnProp$
|
|
21467
|
+
if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21465
21468
|
target[prop] = source[prop];
|
|
21466
|
-
if (source != null && __getOwnPropSymbols$
|
|
21467
|
-
for (var prop of __getOwnPropSymbols$
|
|
21468
|
-
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))
|
|
21469
21472
|
target[prop] = source[prop];
|
|
21470
21473
|
}
|
|
21471
21474
|
return target;
|
|
21472
21475
|
};
|
|
21473
|
-
var __async$
|
|
21476
|
+
var __async$r = (__this, __arguments, generator) => {
|
|
21474
21477
|
return new Promise((resolve, reject) => {
|
|
21475
21478
|
var fulfilled = (value) => {
|
|
21476
21479
|
try {
|
|
@@ -21495,7 +21498,7 @@ function lunkwillCheckResponse(lwResp) {
|
|
|
21495
21498
|
return ct !== void 0 && ct !== null && ct.includes("application/vnd.lunkwill.request-summary+json");
|
|
21496
21499
|
}
|
|
21497
21500
|
function responseJson(response) {
|
|
21498
|
-
return __async$
|
|
21501
|
+
return __async$r(this, null, function* () {
|
|
21499
21502
|
try {
|
|
21500
21503
|
return response.json();
|
|
21501
21504
|
} catch (e) {
|
|
@@ -21504,7 +21507,7 @@ function responseJson(response) {
|
|
|
21504
21507
|
});
|
|
21505
21508
|
}
|
|
21506
21509
|
function lunkwillResponseUrl(lwResp) {
|
|
21507
|
-
return __async$
|
|
21510
|
+
return __async$r(this, null, function* () {
|
|
21508
21511
|
const lwData = yield responseJson(lwResp);
|
|
21509
21512
|
let delay = lwData.delay_ms;
|
|
21510
21513
|
const retry = lwData.retry_ms !== void 0 ? lwData.retry_ms : 2e3;
|
|
@@ -21548,7 +21551,7 @@ function lunkwillResponseUrl(lwResp) {
|
|
|
21548
21551
|
});
|
|
21549
21552
|
}
|
|
21550
21553
|
function lunkwillFetch(lwRespUrl) {
|
|
21551
|
-
return __async$
|
|
21554
|
+
return __async$r(this, null, function* () {
|
|
21552
21555
|
try {
|
|
21553
21556
|
return yield window.fetch(lwRespUrl, { credentials: "same-origin" });
|
|
21554
21557
|
} catch (e) {
|
|
@@ -21596,14 +21599,14 @@ function generateUrl(path, query) {
|
|
|
21596
21599
|
return path + urlParams;
|
|
21597
21600
|
}
|
|
21598
21601
|
function request(path, options, cacheEngine) {
|
|
21599
|
-
return __async$
|
|
21602
|
+
return __async$r(this, null, function* () {
|
|
21600
21603
|
var _b, _c;
|
|
21601
21604
|
const defaults = {
|
|
21602
21605
|
method: "GET",
|
|
21603
21606
|
credentials: "same-origin",
|
|
21604
21607
|
headers: {}
|
|
21605
21608
|
};
|
|
21606
|
-
const _a = __spreadValues$
|
|
21609
|
+
const _a = __spreadValues$s(__spreadValues$s({}, defaults), options), {
|
|
21607
21610
|
withCredentials,
|
|
21608
21611
|
responseType,
|
|
21609
21612
|
cacheProps,
|
|
@@ -21640,7 +21643,7 @@ function request(path, options, cacheEngine) {
|
|
|
21640
21643
|
opt.headers = headers;
|
|
21641
21644
|
}
|
|
21642
21645
|
const url = generateUrl(path, query);
|
|
21643
|
-
const makeRequest = () => __async$
|
|
21646
|
+
const makeRequest = () => __async$r(null, null, function* () {
|
|
21644
21647
|
let response;
|
|
21645
21648
|
try {
|
|
21646
21649
|
response = yield fetch(url, opt);
|
|
@@ -21683,7 +21686,7 @@ function request(path, options, cacheEngine) {
|
|
|
21683
21686
|
if (cacheEngine) {
|
|
21684
21687
|
if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
|
|
21685
21688
|
if (cache !== false) {
|
|
21686
|
-
const props = cacheProps ? cacheProps : __spreadValues$
|
|
21689
|
+
const props = cacheProps ? cacheProps : __spreadValues$s({}, objectRemoveEmpty({
|
|
21687
21690
|
withCredentials,
|
|
21688
21691
|
responseType
|
|
21689
21692
|
}));
|
|
@@ -21703,38 +21706,38 @@ function request(path, options, cacheEngine) {
|
|
|
21703
21706
|
});
|
|
21704
21707
|
}
|
|
21705
21708
|
|
|
21706
|
-
var __defProp$
|
|
21707
|
-
var __defProps$
|
|
21708
|
-
var __getOwnPropDescs$
|
|
21709
|
-
var __getOwnPropSymbols$
|
|
21710
|
-
var __hasOwnProp$
|
|
21711
|
-
var __propIsEnum$
|
|
21712
|
-
var __defNormalProp$
|
|
21713
|
-
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) => {
|
|
21714
21717
|
for (var prop in b || (b = {}))
|
|
21715
|
-
if (__hasOwnProp$
|
|
21716
|
-
__defNormalProp$
|
|
21717
|
-
if (__getOwnPropSymbols$
|
|
21718
|
-
for (var prop of __getOwnPropSymbols$
|
|
21719
|
-
if (__propIsEnum$
|
|
21720
|
-
__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]);
|
|
21721
21724
|
}
|
|
21722
21725
|
return a;
|
|
21723
21726
|
};
|
|
21724
|
-
var __spreadProps$
|
|
21727
|
+
var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
|
|
21725
21728
|
var __objRest$4 = (source, exclude) => {
|
|
21726
21729
|
var target = {};
|
|
21727
21730
|
for (var prop in source)
|
|
21728
|
-
if (__hasOwnProp$
|
|
21731
|
+
if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21729
21732
|
target[prop] = source[prop];
|
|
21730
|
-
if (source != null && __getOwnPropSymbols$
|
|
21731
|
-
for (var prop of __getOwnPropSymbols$
|
|
21732
|
-
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))
|
|
21733
21736
|
target[prop] = source[prop];
|
|
21734
21737
|
}
|
|
21735
21738
|
return target;
|
|
21736
21739
|
};
|
|
21737
|
-
var __async$
|
|
21740
|
+
var __async$q = (__this, __arguments, generator) => {
|
|
21738
21741
|
return new Promise((resolve, reject) => {
|
|
21739
21742
|
var fulfilled = (value) => {
|
|
21740
21743
|
try {
|
|
@@ -21785,7 +21788,7 @@ function routeURL(name, baseUrl, routeData, ...rest) {
|
|
|
21785
21788
|
}
|
|
21786
21789
|
function route(name, connector, ...rest) {
|
|
21787
21790
|
const result = {
|
|
21788
|
-
url: (opt) => __async$
|
|
21791
|
+
url: (opt) => __async$q(null, null, function* () {
|
|
21789
21792
|
var _a;
|
|
21790
21793
|
const routeData = yield connector.connect();
|
|
21791
21794
|
const template = routeURL(
|
|
@@ -21813,10 +21816,10 @@ function route(name, connector, ...rest) {
|
|
|
21813
21816
|
routeData,
|
|
21814
21817
|
...rest
|
|
21815
21818
|
);
|
|
21816
|
-
const headers = objectRemoveEmpty(__spreadValues$
|
|
21819
|
+
const headers = objectRemoveEmpty(__spreadValues$r(__spreadValues$r({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
|
|
21817
21820
|
return request(
|
|
21818
21821
|
template,
|
|
21819
|
-
__spreadProps$
|
|
21822
|
+
__spreadProps$k(__spreadValues$r({
|
|
21820
21823
|
headers
|
|
21821
21824
|
}, restOpt), {
|
|
21822
21825
|
method
|
|
@@ -21940,39 +21943,39 @@ function removeConnector(connector) {
|
|
|
21940
21943
|
}
|
|
21941
21944
|
}
|
|
21942
21945
|
|
|
21943
|
-
var __defProp$
|
|
21944
|
-
var __defProps$
|
|
21945
|
-
var __getOwnPropDescs$
|
|
21946
|
-
var __getOwnPropSymbols$
|
|
21947
|
-
var __hasOwnProp$
|
|
21948
|
-
var __propIsEnum$
|
|
21949
|
-
var __defNormalProp$
|
|
21950
|
-
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) => {
|
|
21951
21954
|
for (var prop in b || (b = {}))
|
|
21952
|
-
if (__hasOwnProp$
|
|
21953
|
-
__defNormalProp$
|
|
21954
|
-
if (__getOwnPropSymbols$
|
|
21955
|
-
for (var prop of __getOwnPropSymbols$
|
|
21956
|
-
if (__propIsEnum$
|
|
21957
|
-
__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]);
|
|
21958
21961
|
}
|
|
21959
21962
|
return a;
|
|
21960
21963
|
};
|
|
21961
|
-
var __spreadProps$
|
|
21964
|
+
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
|
|
21962
21965
|
var __objRest$3 = (source, exclude) => {
|
|
21963
21966
|
var target = {};
|
|
21964
21967
|
for (var prop in source)
|
|
21965
|
-
if (__hasOwnProp$
|
|
21968
|
+
if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21966
21969
|
target[prop] = source[prop];
|
|
21967
|
-
if (source != null && __getOwnPropSymbols$
|
|
21968
|
-
for (var prop of __getOwnPropSymbols$
|
|
21969
|
-
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))
|
|
21970
21973
|
target[prop] = source[prop];
|
|
21971
21974
|
}
|
|
21972
21975
|
return target;
|
|
21973
21976
|
};
|
|
21974
|
-
var __publicField$
|
|
21975
|
-
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) => {
|
|
21976
21979
|
return new Promise((resolve, reject) => {
|
|
21977
21980
|
var fulfilled = (value) => {
|
|
21978
21981
|
try {
|
|
@@ -21997,18 +22000,18 @@ let REQUEST_ID = 0;
|
|
|
21997
22000
|
class NgwConnector {
|
|
21998
22001
|
constructor(options) {
|
|
21999
22002
|
this.options = options;
|
|
22000
|
-
__publicField$
|
|
22001
|
-
__publicField$
|
|
22002
|
-
__publicField$
|
|
22003
|
-
__publicField$
|
|
22004
|
-
__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");
|
|
22005
22008
|
// Dedicated cache for route requests, as these are executed before any other requests.
|
|
22006
22009
|
// This cache does not need to be cleared during the session.
|
|
22007
|
-
__publicField$
|
|
22008
|
-
__publicField$
|
|
22009
|
-
__publicField$
|
|
22010
|
-
__publicField$
|
|
22011
|
-
__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");
|
|
22012
22015
|
const exist = findConnector(options);
|
|
22013
22016
|
this.cache = new Cache({ namespace: options.cacheId });
|
|
22014
22017
|
this.routeCache = new Cache({ namespace: "routecache" });
|
|
@@ -22061,7 +22064,7 @@ class NgwConnector {
|
|
|
22061
22064
|
* ```
|
|
22062
22065
|
*/
|
|
22063
22066
|
connect() {
|
|
22064
|
-
return __async$
|
|
22067
|
+
return __async$p(this, arguments, function* ({
|
|
22065
22068
|
signal
|
|
22066
22069
|
} = {}) {
|
|
22067
22070
|
const auth = this.options.auth;
|
|
@@ -22100,14 +22103,14 @@ class NgwConnector {
|
|
|
22100
22103
|
this.emitter.emit("logout");
|
|
22101
22104
|
}
|
|
22102
22105
|
getUserInfo(credentials, options) {
|
|
22103
|
-
return __async$
|
|
22106
|
+
return __async$p(this, null, function* () {
|
|
22104
22107
|
if (this.user && this.user.id) {
|
|
22105
22108
|
return this.user;
|
|
22106
22109
|
}
|
|
22107
22110
|
if (credentials) {
|
|
22108
22111
|
this.options.auth = credentials;
|
|
22109
22112
|
}
|
|
22110
|
-
const options_ = __spreadValues$
|
|
22113
|
+
const options_ = __spreadValues$q({
|
|
22111
22114
|
headers: this.getAuthorizationHeaders(credentials),
|
|
22112
22115
|
cache: true
|
|
22113
22116
|
}, options);
|
|
@@ -22148,7 +22151,7 @@ class NgwConnector {
|
|
|
22148
22151
|
this.activeRequests = {};
|
|
22149
22152
|
}
|
|
22150
22153
|
getActiveApiRequests() {
|
|
22151
|
-
return __spreadValues$
|
|
22154
|
+
return __spreadValues$q({}, this.activeRequests);
|
|
22152
22155
|
}
|
|
22153
22156
|
route(name, ...rest) {
|
|
22154
22157
|
return route(name, this, ...rest);
|
|
@@ -22160,7 +22163,7 @@ class NgwConnector {
|
|
|
22160
22163
|
* @param options - Request options
|
|
22161
22164
|
*/
|
|
22162
22165
|
makeQuery(_0, _1) {
|
|
22163
|
-
return __async$
|
|
22166
|
+
return __async$p(this, arguments, function* (url, params, options = {}) {
|
|
22164
22167
|
var _b;
|
|
22165
22168
|
url = (this.options.baseUrl ? this.options.baseUrl : "") + url;
|
|
22166
22169
|
if (!url) {
|
|
@@ -22171,7 +22174,7 @@ class NgwConnector {
|
|
|
22171
22174
|
url = template(url, restParams);
|
|
22172
22175
|
}
|
|
22173
22176
|
url = encodeURI(fixUrlStr(url));
|
|
22174
|
-
options = __spreadValues$
|
|
22177
|
+
options = __spreadValues$q({ withCredentials: this.withCredentials }, options);
|
|
22175
22178
|
const {
|
|
22176
22179
|
cache,
|
|
22177
22180
|
signal: externalSignal,
|
|
@@ -22193,7 +22196,7 @@ class NgwConnector {
|
|
|
22193
22196
|
});
|
|
22194
22197
|
}
|
|
22195
22198
|
options.signal = internalSignal;
|
|
22196
|
-
const createPromise = () => __async$
|
|
22199
|
+
const createPromise = () => __async$p(this, null, function* () {
|
|
22197
22200
|
const id = REQUEST_ID++;
|
|
22198
22201
|
this.activeRequests[id] = internalAbortController;
|
|
22199
22202
|
try {
|
|
@@ -22203,7 +22206,7 @@ class NgwConnector {
|
|
|
22203
22206
|
}
|
|
22204
22207
|
});
|
|
22205
22208
|
if (method === "GET" && cache !== false) {
|
|
22206
|
-
const cacheOptions = cacheProps ? cacheProps : __spreadProps$
|
|
22209
|
+
const cacheOptions = cacheProps ? cacheProps : __spreadProps$j(__spreadValues$q({}, objectRemoveEmpty({
|
|
22207
22210
|
headers,
|
|
22208
22211
|
withCredentials,
|
|
22209
22212
|
responseType,
|
|
@@ -22226,7 +22229,7 @@ class NgwConnector {
|
|
|
22226
22229
|
var _a;
|
|
22227
22230
|
if (this.user) {
|
|
22228
22231
|
options = options || {};
|
|
22229
|
-
options.headers = __spreadValues$
|
|
22232
|
+
options.headers = __spreadValues$q(__spreadValues$q({}, this.getAuthorizationHeaders()), options.headers);
|
|
22230
22233
|
}
|
|
22231
22234
|
if (this.requestTransform) {
|
|
22232
22235
|
const [transUrl, transOptions] = this.requestTransform(url, options);
|
|
@@ -22257,7 +22260,7 @@ class NgwConnector {
|
|
|
22257
22260
|
});
|
|
22258
22261
|
}
|
|
22259
22262
|
_login(credentials, options) {
|
|
22260
|
-
return __async$
|
|
22263
|
+
return __async$p(this, null, function* () {
|
|
22261
22264
|
try {
|
|
22262
22265
|
const data = yield this.getUserInfo(credentials, options);
|
|
22263
22266
|
this.user = data;
|
|
@@ -22285,7 +22288,7 @@ class NgwConnector {
|
|
|
22285
22288
|
return er;
|
|
22286
22289
|
}
|
|
22287
22290
|
}
|
|
22288
|
-
__publicField$
|
|
22291
|
+
__publicField$l(NgwConnector, "errors", errors);
|
|
22289
22292
|
|
|
22290
22293
|
function resourceCompare(res1, res2) {
|
|
22291
22294
|
return objectDeepEqual(res1, res2);
|
|
@@ -22315,27 +22318,27 @@ function resourceToQuery(resource, prefix = "") {
|
|
|
22315
22318
|
return query;
|
|
22316
22319
|
}
|
|
22317
22320
|
|
|
22318
|
-
var __defProp$
|
|
22319
|
-
var __defProps$
|
|
22320
|
-
var __getOwnPropDescs$
|
|
22321
|
-
var __getOwnPropSymbols$
|
|
22322
|
-
var __hasOwnProp$
|
|
22323
|
-
var __propIsEnum$
|
|
22324
|
-
var __defNormalProp$
|
|
22325
|
-
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) => {
|
|
22326
22329
|
for (var prop in b || (b = {}))
|
|
22327
|
-
if (__hasOwnProp$
|
|
22328
|
-
__defNormalProp$
|
|
22329
|
-
if (__getOwnPropSymbols$
|
|
22330
|
-
for (var prop of __getOwnPropSymbols$
|
|
22331
|
-
if (__propIsEnum$
|
|
22332
|
-
__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]);
|
|
22333
22336
|
}
|
|
22334
22337
|
return a;
|
|
22335
22338
|
};
|
|
22336
|
-
var __spreadProps$
|
|
22337
|
-
var __publicField$
|
|
22338
|
-
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) => {
|
|
22339
22342
|
return new Promise((resolve, reject) => {
|
|
22340
22343
|
var fulfilled = (value) => {
|
|
22341
22344
|
try {
|
|
@@ -22360,8 +22363,8 @@ class ResourcesControl {
|
|
|
22360
22363
|
connector,
|
|
22361
22364
|
cacheId
|
|
22362
22365
|
}) {
|
|
22363
|
-
__publicField$
|
|
22364
|
-
__publicField$
|
|
22366
|
+
__publicField$k(this, "cache");
|
|
22367
|
+
__publicField$k(this, "connector");
|
|
22365
22368
|
this.connector = connector;
|
|
22366
22369
|
this.cache = new Cache({ namespace: cacheId });
|
|
22367
22370
|
}
|
|
@@ -22376,7 +22379,7 @@ class ResourcesControl {
|
|
|
22376
22379
|
* Fetching resource would be cached to speed up next call
|
|
22377
22380
|
*/
|
|
22378
22381
|
getOne(resource, requestOptions) {
|
|
22379
|
-
const opt = __spreadValues$
|
|
22382
|
+
const opt = __spreadValues$p({}, requestOptions);
|
|
22380
22383
|
if (typeof resource === "string") ; else if (typeof resource === "number") ; else if (isObject(resource)) {
|
|
22381
22384
|
if (resource.id !== void 0) {
|
|
22382
22385
|
resource.id;
|
|
@@ -22453,8 +22456,8 @@ class ResourcesControl {
|
|
|
22453
22456
|
} else {
|
|
22454
22457
|
Object.assign(query, resourceToQuery(resource));
|
|
22455
22458
|
}
|
|
22456
|
-
return this.connector.route("resource.search").get(__spreadProps$
|
|
22457
|
-
query: __spreadValues$
|
|
22459
|
+
return this.connector.route("resource.search").get(__spreadProps$i(__spreadValues$p({}, requestOptions), {
|
|
22460
|
+
query: __spreadValues$p({
|
|
22458
22461
|
serialization: "full"
|
|
22459
22462
|
}, query)
|
|
22460
22463
|
})).then((resources) => {
|
|
@@ -22507,7 +22510,7 @@ class ResourcesControl {
|
|
|
22507
22510
|
});
|
|
22508
22511
|
}
|
|
22509
22512
|
_getChildrenOf(_0, _1) {
|
|
22510
|
-
return __async$
|
|
22513
|
+
return __async$o(this, arguments, function* (parentDef, requestOptions, _items = []) {
|
|
22511
22514
|
let parent = void 0;
|
|
22512
22515
|
if (typeof parentDef === "string") {
|
|
22513
22516
|
parent = yield this.getId(parentDef, requestOptions);
|
|
@@ -22516,7 +22519,7 @@ class ResourcesControl {
|
|
|
22516
22519
|
} else {
|
|
22517
22520
|
parent = parentDef;
|
|
22518
22521
|
}
|
|
22519
|
-
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), {
|
|
22520
22523
|
query: {
|
|
22521
22524
|
parent
|
|
22522
22525
|
}
|
|
@@ -22544,7 +22547,7 @@ class ResourcesControl {
|
|
|
22544
22547
|
});
|
|
22545
22548
|
}
|
|
22546
22549
|
_cleanResourceItemCache(id) {
|
|
22547
|
-
return __async$
|
|
22550
|
+
return __async$o(this, null, function* () {
|
|
22548
22551
|
var _a;
|
|
22549
22552
|
const all = this.cache.all();
|
|
22550
22553
|
const toDelete = [];
|
|
@@ -22597,13 +22600,13 @@ class ResourcesControl {
|
|
|
22597
22600
|
}
|
|
22598
22601
|
}
|
|
22599
22602
|
|
|
22600
|
-
var __defProp$
|
|
22601
|
-
var __defNormalProp$
|
|
22602
|
-
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);
|
|
22603
22606
|
class NgwConnectorExtended extends NgwConnector {
|
|
22604
22607
|
constructor(options) {
|
|
22605
22608
|
super(options);
|
|
22606
|
-
__publicField$
|
|
22609
|
+
__publicField$j(this, "resources");
|
|
22607
22610
|
this.resources = new ResourcesControl({
|
|
22608
22611
|
connector: this,
|
|
22609
22612
|
cacheId: options.cacheId
|
|
@@ -22813,25 +22816,25 @@ class NgwConnectorExtended extends NgwConnector {
|
|
|
22813
22816
|
}
|
|
22814
22817
|
}
|
|
22815
22818
|
|
|
22816
|
-
var __defProp$
|
|
22817
|
-
var __defProps$
|
|
22818
|
-
var __getOwnPropDescs$
|
|
22819
|
-
var __getOwnPropSymbols$
|
|
22820
|
-
var __hasOwnProp$
|
|
22821
|
-
var __propIsEnum$
|
|
22822
|
-
var __defNormalProp$
|
|
22823
|
-
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) => {
|
|
22824
22827
|
for (var prop in b || (b = {}))
|
|
22825
|
-
if (__hasOwnProp$
|
|
22826
|
-
__defNormalProp$
|
|
22827
|
-
if (__getOwnPropSymbols$
|
|
22828
|
-
for (var prop of __getOwnPropSymbols$
|
|
22829
|
-
if (__propIsEnum$
|
|
22830
|
-
__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]);
|
|
22831
22834
|
}
|
|
22832
22835
|
return a;
|
|
22833
22836
|
};
|
|
22834
|
-
var __spreadProps$
|
|
22837
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
22835
22838
|
function getNgwWebmapExtent(webmap) {
|
|
22836
22839
|
const bottom = webmap["extent_bottom"];
|
|
22837
22840
|
const left = webmap["extent_left"];
|
|
@@ -22898,14 +22901,14 @@ function fetchNgwResourceExtent(item, connector, options) {
|
|
|
22898
22901
|
if (resource.cls && resource.parent && resource.cls.indexOf("style") !== -1) {
|
|
22899
22902
|
return connector.getResource(resource.parent.id, options).then((res) => {
|
|
22900
22903
|
if (res) {
|
|
22901
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
22904
|
+
return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$o({}, options), {
|
|
22902
22905
|
resourceId: res.resource.id,
|
|
22903
22906
|
connector
|
|
22904
22907
|
}));
|
|
22905
22908
|
}
|
|
22906
22909
|
});
|
|
22907
22910
|
} else {
|
|
22908
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
22911
|
+
return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$o({}, options), {
|
|
22909
22912
|
resourceId: resource.id,
|
|
22910
22913
|
connector
|
|
22911
22914
|
}));
|
|
@@ -22913,10 +22916,10 @@ function fetchNgwResourceExtent(item, connector, options) {
|
|
|
22913
22916
|
}
|
|
22914
22917
|
}
|
|
22915
22918
|
|
|
22916
|
-
var __defProp$
|
|
22917
|
-
var __defNormalProp$
|
|
22918
|
-
var __publicField$
|
|
22919
|
-
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) => {
|
|
22920
22923
|
return new Promise((resolve, reject) => {
|
|
22921
22924
|
var fulfilled = (value) => {
|
|
22922
22925
|
try {
|
|
@@ -22938,18 +22941,18 @@ var __async$m = (__this, __arguments, generator) => {
|
|
|
22938
22941
|
};
|
|
22939
22942
|
class NgwResource {
|
|
22940
22943
|
constructor() {
|
|
22941
|
-
__publicField$
|
|
22942
|
-
__publicField$
|
|
22943
|
-
__publicField$
|
|
22944
|
+
__publicField$i(this, "item");
|
|
22945
|
+
__publicField$i(this, "connector");
|
|
22946
|
+
__publicField$i(this, "_extent");
|
|
22944
22947
|
}
|
|
22945
22948
|
/** @deprecated use {@link NgwResource.getBounds} instead */
|
|
22946
22949
|
getExtent() {
|
|
22947
|
-
return __async$
|
|
22950
|
+
return __async$n(this, null, function* () {
|
|
22948
22951
|
return this.getBounds();
|
|
22949
22952
|
});
|
|
22950
22953
|
}
|
|
22951
22954
|
getBounds(options) {
|
|
22952
|
-
return __async$
|
|
22955
|
+
return __async$n(this, null, function* () {
|
|
22953
22956
|
if (this._extent) {
|
|
22954
22957
|
return this._extent;
|
|
22955
22958
|
}
|
|
@@ -22965,7 +22968,7 @@ class NgwResource {
|
|
|
22965
22968
|
}
|
|
22966
22969
|
}
|
|
22967
22970
|
|
|
22968
|
-
var __async$
|
|
22971
|
+
var __async$m = (__this, __arguments, generator) => {
|
|
22969
22972
|
return new Promise((resolve, reject) => {
|
|
22970
22973
|
var fulfilled = (value) => {
|
|
22971
22974
|
try {
|
|
@@ -22986,7 +22989,7 @@ var __async$l = (__this, __arguments, generator) => {
|
|
|
22986
22989
|
});
|
|
22987
22990
|
};
|
|
22988
22991
|
function resourceIdFromLayerOptions(options, connector) {
|
|
22989
|
-
return __async$
|
|
22992
|
+
return __async$m(this, null, function* () {
|
|
22990
22993
|
const resource = options.resource;
|
|
22991
22994
|
const item = resource;
|
|
22992
22995
|
let { keyname, resourceId } = options;
|
|
@@ -23011,24 +23014,24 @@ function resourceIdFromLayerOptions(options, connector) {
|
|
|
23011
23014
|
});
|
|
23012
23015
|
}
|
|
23013
23016
|
|
|
23014
|
-
var __defProp$
|
|
23015
|
-
var __getOwnPropSymbols$
|
|
23016
|
-
var __hasOwnProp$
|
|
23017
|
-
var __propIsEnum$
|
|
23018
|
-
var __defNormalProp$
|
|
23019
|
-
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) => {
|
|
23020
23023
|
for (var prop in b || (b = {}))
|
|
23021
|
-
if (__hasOwnProp$
|
|
23022
|
-
__defNormalProp$
|
|
23023
|
-
if (__getOwnPropSymbols$
|
|
23024
|
-
for (var prop of __getOwnPropSymbols$
|
|
23025
|
-
if (__propIsEnum$
|
|
23026
|
-
__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]);
|
|
23027
23030
|
}
|
|
23028
23031
|
return a;
|
|
23029
23032
|
};
|
|
23030
|
-
var __publicField$
|
|
23031
|
-
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) => {
|
|
23032
23035
|
return new Promise((resolve, reject) => {
|
|
23033
23036
|
var fulfilled = (value) => {
|
|
23034
23037
|
try {
|
|
@@ -23049,7 +23052,7 @@ var __async$k = (__this, __arguments, generator) => {
|
|
|
23049
23052
|
});
|
|
23050
23053
|
};
|
|
23051
23054
|
function createOnFirstShowAdapter(_0) {
|
|
23052
|
-
return __async$
|
|
23055
|
+
return __async$l(this, arguments, function* ({
|
|
23053
23056
|
webMap,
|
|
23054
23057
|
adapterOptions = {},
|
|
23055
23058
|
onLayerAdded,
|
|
@@ -23057,10 +23060,10 @@ function createOnFirstShowAdapter(_0) {
|
|
|
23057
23060
|
}) {
|
|
23058
23061
|
class OnFirstShowAdapter {
|
|
23059
23062
|
constructor() {
|
|
23060
|
-
__publicField$
|
|
23061
|
-
__publicField$
|
|
23062
|
-
__publicField$
|
|
23063
|
-
__publicField$
|
|
23063
|
+
__publicField$h(this, "options", {});
|
|
23064
|
+
__publicField$h(this, "layer", []);
|
|
23065
|
+
__publicField$h(this, "_removed", false);
|
|
23066
|
+
__publicField$h(this, "_creatingInProgress", false);
|
|
23064
23067
|
}
|
|
23065
23068
|
addLayer() {
|
|
23066
23069
|
return this.layer;
|
|
@@ -23075,7 +23078,7 @@ function createOnFirstShowAdapter(_0) {
|
|
|
23075
23078
|
return this._removed;
|
|
23076
23079
|
}
|
|
23077
23080
|
showLayer() {
|
|
23078
|
-
return __async$
|
|
23081
|
+
return __async$l(this, null, function* () {
|
|
23079
23082
|
this.options.visibility = true;
|
|
23080
23083
|
if (this.layer.length) {
|
|
23081
23084
|
for (const x of this.layer) {
|
|
@@ -23087,7 +23090,7 @@ function createOnFirstShowAdapter(_0) {
|
|
|
23087
23090
|
});
|
|
23088
23091
|
}
|
|
23089
23092
|
hideLayer() {
|
|
23090
|
-
return __async$
|
|
23093
|
+
return __async$l(this, null, function* () {
|
|
23091
23094
|
this.options.visibility = false;
|
|
23092
23095
|
if (this.layer) {
|
|
23093
23096
|
for (const x of this.layer) {
|
|
@@ -23097,12 +23100,12 @@ function createOnFirstShowAdapter(_0) {
|
|
|
23097
23100
|
});
|
|
23098
23101
|
}
|
|
23099
23102
|
loadLayer() {
|
|
23100
|
-
return __async$
|
|
23103
|
+
return __async$l(this, null, function* () {
|
|
23101
23104
|
if (!this.layer.length && !this._creatingInProgress) {
|
|
23102
23105
|
this._creatingInProgress = true;
|
|
23103
23106
|
const Adapter = yield createAdapter(this);
|
|
23104
23107
|
if (Adapter) {
|
|
23105
|
-
const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$
|
|
23108
|
+
const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$n({}, adapterOptions));
|
|
23106
23109
|
const realLayer = yield adapter.addLayer({
|
|
23107
23110
|
order: this.options.order,
|
|
23108
23111
|
headers: this.options.headers,
|
|
@@ -23131,7 +23134,7 @@ function createOnFirstShowAdapter(_0) {
|
|
|
23131
23134
|
});
|
|
23132
23135
|
}
|
|
23133
23136
|
|
|
23134
|
-
var __async$
|
|
23137
|
+
var __async$k = (__this, __arguments, generator) => {
|
|
23135
23138
|
return new Promise((resolve, reject) => {
|
|
23136
23139
|
var fulfilled = (value) => {
|
|
23137
23140
|
try {
|
|
@@ -23152,7 +23155,7 @@ var __async$j = (__this, __arguments, generator) => {
|
|
|
23152
23155
|
});
|
|
23153
23156
|
};
|
|
23154
23157
|
function createOnFirstShowNgwAdapter(_0) {
|
|
23155
|
-
return __async$
|
|
23158
|
+
return __async$k(this, arguments, function* ({
|
|
23156
23159
|
webMap,
|
|
23157
23160
|
connector,
|
|
23158
23161
|
item,
|
|
@@ -23186,26 +23189,26 @@ function createOnFirstShowNgwAdapter(_0) {
|
|
|
23186
23189
|
});
|
|
23187
23190
|
}
|
|
23188
23191
|
|
|
23189
|
-
var __defProp$
|
|
23190
|
-
var __defProps$
|
|
23191
|
-
var __getOwnPropDescs$
|
|
23192
|
-
var __getOwnPropSymbols$
|
|
23193
|
-
var __hasOwnProp$
|
|
23194
|
-
var __propIsEnum$
|
|
23195
|
-
var __defNormalProp$
|
|
23196
|
-
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) => {
|
|
23197
23200
|
for (var prop in b || (b = {}))
|
|
23198
|
-
if (__hasOwnProp$
|
|
23199
|
-
__defNormalProp$
|
|
23200
|
-
if (__getOwnPropSymbols$
|
|
23201
|
-
for (var prop of __getOwnPropSymbols$
|
|
23202
|
-
if (__propIsEnum$
|
|
23203
|
-
__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]);
|
|
23204
23207
|
}
|
|
23205
23208
|
return a;
|
|
23206
23209
|
};
|
|
23207
|
-
var __spreadProps$
|
|
23208
|
-
var __async$
|
|
23210
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
23211
|
+
var __async$j = (__this, __arguments, generator) => {
|
|
23209
23212
|
return new Promise((resolve, reject) => {
|
|
23210
23213
|
var fulfilled = (value) => {
|
|
23211
23214
|
try {
|
|
@@ -23272,7 +23275,7 @@ function paramListToQuery(paramList) {
|
|
|
23272
23275
|
);
|
|
23273
23276
|
}
|
|
23274
23277
|
function createFeatureFieldFilterQueries(opt) {
|
|
23275
|
-
return __async$
|
|
23278
|
+
return __async$j(this, null, function* () {
|
|
23276
23279
|
const queries = getQueries(opt);
|
|
23277
23280
|
const itemsParts = yield Promise.all(queries);
|
|
23278
23281
|
const ids = [];
|
|
@@ -23316,12 +23319,12 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
23316
23319
|
for (const f of filters_) {
|
|
23317
23320
|
if (isPropertyFilter$1(f)) {
|
|
23318
23321
|
_queries.push(
|
|
23319
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
23322
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$m({}, opt), {
|
|
23320
23323
|
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
23321
23324
|
}))
|
|
23322
23325
|
);
|
|
23323
23326
|
} else {
|
|
23324
|
-
getQueries(__spreadProps$
|
|
23327
|
+
getQueries(__spreadProps$g(__spreadValues$m({}, opt), { filters: f }), _queries, [..._parentAllParams]);
|
|
23325
23328
|
}
|
|
23326
23329
|
}
|
|
23327
23330
|
} else if (logic === "all") {
|
|
@@ -23336,14 +23339,14 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
23336
23339
|
}
|
|
23337
23340
|
if (propertiesFilterList.length) {
|
|
23338
23341
|
for (const x of propertiesFilterList) {
|
|
23339
|
-
getQueries(__spreadProps$
|
|
23342
|
+
getQueries(__spreadProps$g(__spreadValues$m({}, opt), { filters: x }), _queries, [
|
|
23340
23343
|
..._parentAllParams,
|
|
23341
23344
|
...filters2
|
|
23342
23345
|
]);
|
|
23343
23346
|
}
|
|
23344
23347
|
} else {
|
|
23345
23348
|
_queries.push(
|
|
23346
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
23349
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$m({}, opt), {
|
|
23347
23350
|
paramList: [..._parentAllParams, ...paramList, ...filters2]
|
|
23348
23351
|
}))
|
|
23349
23352
|
);
|
|
@@ -23359,7 +23362,7 @@ function createWktFromCoordArray(coord) {
|
|
|
23359
23362
|
return `POLYGON((${polygon.join(", ")}))`;
|
|
23360
23363
|
}
|
|
23361
23364
|
function fetchNgwLayerItemsRequest(options) {
|
|
23362
|
-
const params = __spreadValues$
|
|
23365
|
+
const params = __spreadValues$m({}, FEATURE_REQUEST_PARAMS);
|
|
23363
23366
|
const {
|
|
23364
23367
|
limit,
|
|
23365
23368
|
query,
|
|
@@ -23395,7 +23398,7 @@ function fetchNgwLayerItemsRequest(options) {
|
|
|
23395
23398
|
if (paramList) {
|
|
23396
23399
|
Object.assign(params, paramListToQuery(paramList));
|
|
23397
23400
|
}
|
|
23398
|
-
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 });
|
|
23399
23402
|
}
|
|
23400
23403
|
|
|
23401
23404
|
function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
@@ -23424,26 +23427,26 @@ function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
|
23424
23427
|
return fields;
|
|
23425
23428
|
}
|
|
23426
23429
|
|
|
23427
|
-
var __defProp$
|
|
23428
|
-
var __defProps$
|
|
23429
|
-
var __getOwnPropDescs$
|
|
23430
|
-
var __getOwnPropSymbols$
|
|
23431
|
-
var __hasOwnProp$
|
|
23432
|
-
var __propIsEnum$
|
|
23433
|
-
var __defNormalProp$
|
|
23434
|
-
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) => {
|
|
23435
23438
|
for (var prop in b || (b = {}))
|
|
23436
|
-
if (__hasOwnProp$
|
|
23437
|
-
__defNormalProp$
|
|
23438
|
-
if (__getOwnPropSymbols$
|
|
23439
|
-
for (var prop of __getOwnPropSymbols$
|
|
23440
|
-
if (__propIsEnum$
|
|
23441
|
-
__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]);
|
|
23442
23445
|
}
|
|
23443
23446
|
return a;
|
|
23444
23447
|
};
|
|
23445
|
-
var __spreadProps$
|
|
23446
|
-
var __async$
|
|
23448
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
23449
|
+
var __async$i = (__this, __arguments, generator) => {
|
|
23447
23450
|
return new Promise((resolve, reject) => {
|
|
23448
23451
|
var fulfilled = (value) => {
|
|
23449
23452
|
try {
|
|
@@ -23464,17 +23467,17 @@ var __async$h = (__this, __arguments, generator) => {
|
|
|
23464
23467
|
});
|
|
23465
23468
|
};
|
|
23466
23469
|
function fetchNgwLayerItems(options) {
|
|
23467
|
-
return __async$
|
|
23470
|
+
return __async$i(this, null, function* () {
|
|
23468
23471
|
var _a;
|
|
23469
23472
|
const filters = options.filters;
|
|
23470
23473
|
if (filters) {
|
|
23471
|
-
let data = yield createFeatureFieldFilterQueries(__spreadProps$
|
|
23474
|
+
let data = yield createFeatureFieldFilterQueries(__spreadProps$f(__spreadValues$l({}, options), {
|
|
23472
23475
|
filters
|
|
23473
23476
|
}));
|
|
23474
23477
|
const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
|
|
23475
23478
|
if (clientFilterValidate) {
|
|
23476
23479
|
data = data.filter((y) => {
|
|
23477
|
-
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$
|
|
23480
|
+
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$f(__spreadValues$l({}, y.fields), {
|
|
23478
23481
|
id: y.id
|
|
23479
23482
|
}));
|
|
23480
23483
|
const result = propertiesFilter(fields, filters);
|
|
@@ -23592,26 +23595,26 @@ function ngwApiToAdapterOptions({
|
|
|
23592
23595
|
}
|
|
23593
23596
|
}
|
|
23594
23597
|
|
|
23595
|
-
var __defProp$
|
|
23596
|
-
var __defProps$
|
|
23597
|
-
var __getOwnPropDescs$
|
|
23598
|
-
var __getOwnPropSymbols$
|
|
23599
|
-
var __hasOwnProp$
|
|
23600
|
-
var __propIsEnum$
|
|
23601
|
-
var __defNormalProp$
|
|
23602
|
-
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) => {
|
|
23603
23606
|
for (var prop in b || (b = {}))
|
|
23604
|
-
if (__hasOwnProp$
|
|
23605
|
-
__defNormalProp$
|
|
23606
|
-
if (__getOwnPropSymbols$
|
|
23607
|
-
for (var prop of __getOwnPropSymbols$
|
|
23608
|
-
if (__propIsEnum$
|
|
23609
|
-
__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]);
|
|
23610
23613
|
}
|
|
23611
23614
|
return a;
|
|
23612
23615
|
};
|
|
23613
|
-
var __spreadProps$
|
|
23614
|
-
var __async$
|
|
23616
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
23617
|
+
var __async$h = (__this, __arguments, generator) => {
|
|
23615
23618
|
return new Promise((resolve, reject) => {
|
|
23616
23619
|
var fulfilled = (value) => {
|
|
23617
23620
|
try {
|
|
@@ -23632,56 +23635,56 @@ var __async$g = (__this, __arguments, generator) => {
|
|
|
23632
23635
|
});
|
|
23633
23636
|
};
|
|
23634
23637
|
function fetchNgwLayerItem(options) {
|
|
23635
|
-
return __async$
|
|
23636
|
-
const params = __spreadValues$
|
|
23638
|
+
return __async$h(this, null, function* () {
|
|
23639
|
+
const params = __spreadValues$k({}, FEATURE_REQUEST_PARAMS);
|
|
23637
23640
|
updateItemRequestParam(params, options);
|
|
23638
23641
|
const resp = yield options.connector.route("feature_layer.feature.item", {
|
|
23639
23642
|
id: Number(options.resourceId),
|
|
23640
23643
|
fid: options.featureId
|
|
23641
|
-
}).get(__spreadProps$
|
|
23642
|
-
const toGeojson = () => __async$
|
|
23644
|
+
}).get(__spreadProps$e(__spreadValues$k({}, options), { query: params }));
|
|
23645
|
+
const toGeojson = () => __async$h(null, null, function* () {
|
|
23643
23646
|
if (resp.geom) {
|
|
23644
23647
|
return createGeoJsonFeature(resp);
|
|
23645
23648
|
} else {
|
|
23646
|
-
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$
|
|
23649
|
+
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$k({}, options), {
|
|
23647
23650
|
geom: true,
|
|
23648
23651
|
fields: null,
|
|
23649
23652
|
extensions: null
|
|
23650
23653
|
}));
|
|
23651
23654
|
const geom = onlyGeomItem.geom;
|
|
23652
|
-
return createGeoJsonFeature(__spreadProps$
|
|
23655
|
+
return createGeoJsonFeature(__spreadProps$e(__spreadValues$k({}, resp), { geom }));
|
|
23653
23656
|
}
|
|
23654
23657
|
});
|
|
23655
|
-
return __spreadProps$
|
|
23658
|
+
return __spreadProps$e(__spreadValues$k({}, resp), {
|
|
23656
23659
|
toGeojson
|
|
23657
23660
|
});
|
|
23658
23661
|
});
|
|
23659
23662
|
}
|
|
23660
23663
|
|
|
23661
|
-
var __defProp$
|
|
23662
|
-
var __getOwnPropSymbols$
|
|
23663
|
-
var __hasOwnProp$
|
|
23664
|
-
var __propIsEnum$
|
|
23665
|
-
var __defNormalProp$
|
|
23666
|
-
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) => {
|
|
23667
23670
|
for (var prop in b || (b = {}))
|
|
23668
|
-
if (__hasOwnProp$
|
|
23669
|
-
__defNormalProp$
|
|
23670
|
-
if (__getOwnPropSymbols$
|
|
23671
|
-
for (var prop of __getOwnPropSymbols$
|
|
23672
|
-
if (__propIsEnum$
|
|
23673
|
-
__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]);
|
|
23674
23677
|
}
|
|
23675
23678
|
return a;
|
|
23676
23679
|
};
|
|
23677
|
-
var __publicField$
|
|
23680
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23678
23681
|
class BookmarkItem {
|
|
23679
23682
|
constructor(options) {
|
|
23680
23683
|
this.options = options;
|
|
23681
|
-
__publicField$
|
|
23682
|
-
__publicField$
|
|
23683
|
-
__publicField$
|
|
23684
|
-
__publicField$
|
|
23684
|
+
__publicField$g(this, "name");
|
|
23685
|
+
__publicField$g(this, "resourceId");
|
|
23686
|
+
__publicField$g(this, "item");
|
|
23687
|
+
__publicField$g(this, "_extent");
|
|
23685
23688
|
this.resourceId = options.resourceId;
|
|
23686
23689
|
const item = options.item;
|
|
23687
23690
|
this.item = item;
|
|
@@ -23711,7 +23714,7 @@ class BookmarkItem {
|
|
|
23711
23714
|
if (this.item.geom) {
|
|
23712
23715
|
return Promise.resolve(createGeoJsonFeature(this.item));
|
|
23713
23716
|
} else {
|
|
23714
|
-
return fetchNgwLayerItem(__spreadValues$
|
|
23717
|
+
return fetchNgwLayerItem(__spreadValues$j({
|
|
23715
23718
|
resourceId: this.resourceId,
|
|
23716
23719
|
featureId: this.item.id,
|
|
23717
23720
|
connector: this.options.connector,
|
|
@@ -23729,19 +23732,19 @@ class BookmarkItem {
|
|
|
23729
23732
|
|
|
23730
23733
|
const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
|
|
23731
23734
|
|
|
23732
|
-
var __defProp$
|
|
23733
|
-
var __defNormalProp$
|
|
23734
|
-
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);
|
|
23735
23738
|
class BaseProperty {
|
|
23736
23739
|
constructor(name, item, options) {
|
|
23737
|
-
__publicField$
|
|
23738
|
-
__publicField$
|
|
23739
|
-
__publicField$
|
|
23740
|
-
__publicField$
|
|
23741
|
-
__publicField$
|
|
23742
|
-
__publicField$
|
|
23743
|
-
__publicField$
|
|
23744
|
-
__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");
|
|
23745
23748
|
this.item = item;
|
|
23746
23749
|
this.options = Object.assign({}, options);
|
|
23747
23750
|
this.name = name;
|
|
@@ -23844,26 +23847,26 @@ class BaseProperty {
|
|
|
23844
23847
|
}
|
|
23845
23848
|
}
|
|
23846
23849
|
|
|
23847
|
-
var __defProp$
|
|
23848
|
-
var __getOwnPropSymbols$
|
|
23849
|
-
var __hasOwnProp$
|
|
23850
|
-
var __propIsEnum$
|
|
23851
|
-
var __defNormalProp$
|
|
23852
|
-
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) => {
|
|
23853
23856
|
for (var prop in b || (b = {}))
|
|
23854
|
-
if (__hasOwnProp$
|
|
23855
|
-
__defNormalProp$
|
|
23856
|
-
if (__getOwnPropSymbols$
|
|
23857
|
-
for (var prop of __getOwnPropSymbols$
|
|
23858
|
-
if (__propIsEnum$
|
|
23859
|
-
__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]);
|
|
23860
23863
|
}
|
|
23861
23864
|
return a;
|
|
23862
23865
|
};
|
|
23863
|
-
var __publicField$
|
|
23866
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$l(obj, key + "" , value);
|
|
23864
23867
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
23865
23868
|
constructor(name, item, options) {
|
|
23866
|
-
super(name, item, __spreadValues$
|
|
23869
|
+
super(name, item, __spreadValues$i(__spreadValues$i({}, _CheckProperty.options), options));
|
|
23867
23870
|
this.set(this.get());
|
|
23868
23871
|
}
|
|
23869
23872
|
update(value, options) {
|
|
@@ -23944,13 +23947,13 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
|
23944
23947
|
_blockChild(item, options) {
|
|
23945
23948
|
const prop = item.properties && item.properties.property(this.name);
|
|
23946
23949
|
if (prop && prop.block) {
|
|
23947
|
-
prop.block(__spreadValues$
|
|
23950
|
+
prop.block(__spreadValues$i({ silent: true }, options || {}));
|
|
23948
23951
|
}
|
|
23949
23952
|
}
|
|
23950
23953
|
_unBlockChild(item, options) {
|
|
23951
23954
|
const prop = item.properties && item.properties.property(this.name);
|
|
23952
23955
|
if (prop && prop.unBlock) {
|
|
23953
|
-
prop.unBlock(__spreadValues$
|
|
23956
|
+
prop.unBlock(__spreadValues$i({ silent: true }, options || {}));
|
|
23954
23957
|
}
|
|
23955
23958
|
}
|
|
23956
23959
|
_propagation(value, options) {
|
|
@@ -23960,7 +23963,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
|
23960
23963
|
const child = children[fry];
|
|
23961
23964
|
const property = child.properties && child.properties.property(this.name);
|
|
23962
23965
|
if (property) {
|
|
23963
|
-
property.set(value, __spreadValues$
|
|
23966
|
+
property.set(value, __spreadValues$i(__spreadValues$i({}, options), {
|
|
23964
23967
|
propagation: true,
|
|
23965
23968
|
bubble: false
|
|
23966
23969
|
}));
|
|
@@ -23969,7 +23972,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
|
23969
23972
|
}
|
|
23970
23973
|
}
|
|
23971
23974
|
};
|
|
23972
|
-
__publicField$
|
|
23975
|
+
__publicField$e(_CheckProperty, "options", {
|
|
23973
23976
|
hierarchy: true,
|
|
23974
23977
|
bubble: false,
|
|
23975
23978
|
propagation: false,
|
|
@@ -23978,31 +23981,31 @@ __publicField$d(_CheckProperty, "options", {
|
|
|
23978
23981
|
});
|
|
23979
23982
|
let CheckProperty = _CheckProperty;
|
|
23980
23983
|
|
|
23981
|
-
var __defProp$
|
|
23982
|
-
var __getOwnPropSymbols$
|
|
23983
|
-
var __hasOwnProp$
|
|
23984
|
-
var __propIsEnum$
|
|
23985
|
-
var __defNormalProp$
|
|
23986
|
-
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) => {
|
|
23987
23990
|
for (var prop in b || (b = {}))
|
|
23988
|
-
if (__hasOwnProp$
|
|
23989
|
-
__defNormalProp$
|
|
23990
|
-
if (__getOwnPropSymbols$
|
|
23991
|
-
for (var prop of __getOwnPropSymbols$
|
|
23992
|
-
if (__propIsEnum$
|
|
23993
|
-
__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]);
|
|
23994
23997
|
}
|
|
23995
23998
|
return a;
|
|
23996
23999
|
};
|
|
23997
|
-
var __publicField$
|
|
24000
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23998
24001
|
const BOOLEAN_TYPE = "boolean";
|
|
23999
24002
|
const STRING_TYPE = "string";
|
|
24000
24003
|
const _ItemProperties = class _ItemProperties {
|
|
24001
24004
|
constructor(item, propertiesList) {
|
|
24002
24005
|
this.item = item;
|
|
24003
|
-
__publicField$
|
|
24004
|
-
__publicField$
|
|
24005
|
-
__publicField$
|
|
24006
|
+
__publicField$d(this, "options", {});
|
|
24007
|
+
__publicField$d(this, "_properties", {});
|
|
24008
|
+
__publicField$d(this, "_propertiesList", []);
|
|
24006
24009
|
if (propertiesList) {
|
|
24007
24010
|
propertiesList.forEach(this._setPropertyHandler.bind(this));
|
|
24008
24011
|
}
|
|
@@ -24042,7 +24045,7 @@ const _ItemProperties = class _ItemProperties {
|
|
|
24042
24045
|
_setPropertyHandler(propOpt) {
|
|
24043
24046
|
const Handler = this._getHandler(propOpt);
|
|
24044
24047
|
if (Handler && propOpt.name) {
|
|
24045
|
-
const options = __spreadValues$
|
|
24048
|
+
const options = __spreadValues$h({}, propOpt);
|
|
24046
24049
|
this._properties[propOpt.name] = new Handler(
|
|
24047
24050
|
propOpt.name,
|
|
24048
24051
|
this.item,
|
|
@@ -24065,7 +24068,7 @@ const _ItemProperties = class _ItemProperties {
|
|
|
24065
24068
|
return Handler;
|
|
24066
24069
|
}
|
|
24067
24070
|
};
|
|
24068
|
-
__publicField$
|
|
24071
|
+
__publicField$d(_ItemProperties, "handlers", {
|
|
24069
24072
|
CheckProperty
|
|
24070
24073
|
});
|
|
24071
24074
|
let ItemProperties = _ItemProperties;
|
|
@@ -24172,14 +24175,14 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
|
|
|
24172
24175
|
return true;
|
|
24173
24176
|
}
|
|
24174
24177
|
|
|
24175
|
-
var __defProp$
|
|
24176
|
-
var __defNormalProp$
|
|
24177
|
-
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);
|
|
24178
24181
|
class TreeHelper {
|
|
24179
24182
|
constructor(item) {
|
|
24180
|
-
__publicField$
|
|
24181
|
-
__publicField$
|
|
24182
|
-
__publicField$
|
|
24183
|
+
__publicField$c(this, "item");
|
|
24184
|
+
__publicField$c(this, "_children", []);
|
|
24185
|
+
__publicField$c(this, "_parent");
|
|
24183
24186
|
this.item = item;
|
|
24184
24187
|
}
|
|
24185
24188
|
setParent(parent) {
|
|
@@ -24242,32 +24245,32 @@ class TreeHelper {
|
|
|
24242
24245
|
}
|
|
24243
24246
|
}
|
|
24244
24247
|
|
|
24245
|
-
var __defProp$
|
|
24246
|
-
var __getOwnPropSymbols$
|
|
24247
|
-
var __hasOwnProp$
|
|
24248
|
-
var __propIsEnum$
|
|
24249
|
-
var __defNormalProp$
|
|
24250
|
-
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) => {
|
|
24251
24254
|
for (var prop in b || (b = {}))
|
|
24252
|
-
if (__hasOwnProp$
|
|
24253
|
-
__defNormalProp$
|
|
24254
|
-
if (__getOwnPropSymbols$
|
|
24255
|
-
for (var prop of __getOwnPropSymbols$
|
|
24256
|
-
if (__propIsEnum$
|
|
24257
|
-
__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]);
|
|
24258
24261
|
}
|
|
24259
24262
|
return a;
|
|
24260
24263
|
};
|
|
24261
|
-
var __publicField$
|
|
24264
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24262
24265
|
let ID = 0;
|
|
24263
24266
|
class Item {
|
|
24264
24267
|
constructor(options) {
|
|
24265
|
-
__publicField$
|
|
24266
|
-
__publicField$
|
|
24267
|
-
__publicField$
|
|
24268
|
-
__publicField$
|
|
24268
|
+
__publicField$b(this, "options", {});
|
|
24269
|
+
__publicField$b(this, "properties");
|
|
24270
|
+
__publicField$b(this, "tree");
|
|
24271
|
+
__publicField$b(this, "id", ID);
|
|
24269
24272
|
ID += 1;
|
|
24270
|
-
this.options = __spreadValues$
|
|
24273
|
+
this.options = __spreadValues$g({}, options);
|
|
24271
24274
|
this.tree = new TreeHelper(this);
|
|
24272
24275
|
}
|
|
24273
24276
|
initProperties() {
|
|
@@ -24323,27 +24326,27 @@ function createLayerSymbolParam(resourceId, intervals) {
|
|
|
24323
24326
|
return { [`symbols[${resourceId}]`]: intervals.join(",") || void 0 };
|
|
24324
24327
|
}
|
|
24325
24328
|
|
|
24326
|
-
var __defProp$
|
|
24327
|
-
var __defProps$
|
|
24328
|
-
var __getOwnPropDescs$
|
|
24329
|
-
var __getOwnPropSymbols$
|
|
24330
|
-
var __hasOwnProp$
|
|
24331
|
-
var __propIsEnum$
|
|
24332
|
-
var __defNormalProp$
|
|
24333
|
-
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) => {
|
|
24334
24337
|
for (var prop in b || (b = {}))
|
|
24335
|
-
if (__hasOwnProp$
|
|
24336
|
-
__defNormalProp$
|
|
24337
|
-
if (__getOwnPropSymbols$
|
|
24338
|
-
for (var prop of __getOwnPropSymbols$
|
|
24339
|
-
if (__propIsEnum$
|
|
24340
|
-
__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]);
|
|
24341
24344
|
}
|
|
24342
24345
|
return a;
|
|
24343
24346
|
};
|
|
24344
|
-
var __spreadProps$
|
|
24345
|
-
var __publicField$
|
|
24346
|
-
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) => {
|
|
24347
24350
|
return new Promise((resolve, reject) => {
|
|
24348
24351
|
var fulfilled = (value) => {
|
|
24349
24352
|
try {
|
|
@@ -24374,17 +24377,17 @@ class Legend {
|
|
|
24374
24377
|
layer,
|
|
24375
24378
|
onSymbolRenderChange
|
|
24376
24379
|
}) {
|
|
24377
|
-
__publicField$
|
|
24378
|
-
__publicField$
|
|
24379
|
-
__publicField$
|
|
24380
|
-
__publicField$
|
|
24381
|
-
__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");
|
|
24382
24385
|
// private blocked: boolean = false;
|
|
24383
|
-
__publicField$
|
|
24386
|
+
__publicField$a(this, "layerVisibility", true);
|
|
24384
24387
|
// private symbolRenderIndexes?: number[];
|
|
24385
|
-
__publicField$
|
|
24386
|
-
__publicField$
|
|
24387
|
-
__publicField$
|
|
24388
|
+
__publicField$a(this, "onSymbolRenderChange");
|
|
24389
|
+
__publicField$a(this, "webMap");
|
|
24390
|
+
__publicField$a(this, "connector");
|
|
24388
24391
|
if (legendSymbols) {
|
|
24389
24392
|
this.legendSymbols = legendSymbols;
|
|
24390
24393
|
}
|
|
@@ -24403,18 +24406,18 @@ class Legend {
|
|
|
24403
24406
|
this.layer = layer;
|
|
24404
24407
|
}
|
|
24405
24408
|
create() {
|
|
24406
|
-
return __async$
|
|
24409
|
+
return __async$g(this, arguments, function* (options = {}) {
|
|
24407
24410
|
if (this.connector) {
|
|
24408
24411
|
const ngwLegend = yield this.connector.route("render.legend_symbols", {
|
|
24409
24412
|
id: this.resourceId
|
|
24410
|
-
}).get(__spreadValues$
|
|
24413
|
+
}).get(__spreadValues$f({}, options));
|
|
24411
24414
|
this.legend = ngwLegend;
|
|
24412
24415
|
return this.createLegend(ngwLegend);
|
|
24413
24416
|
}
|
|
24414
24417
|
});
|
|
24415
24418
|
}
|
|
24416
24419
|
createLegend(items) {
|
|
24417
|
-
return items.map((params) => __spreadProps$
|
|
24420
|
+
return items.map((params) => __spreadProps$d(__spreadValues$f({}, params), {
|
|
24418
24421
|
/** @deprecated use display_name instead */
|
|
24419
24422
|
name: params.display_name,
|
|
24420
24423
|
/** @deprecated use icon instead */
|
|
@@ -24444,7 +24447,7 @@ class Legend {
|
|
|
24444
24447
|
}
|
|
24445
24448
|
if (this.layer.updateLayer) {
|
|
24446
24449
|
this.layer.updateLayer({
|
|
24447
|
-
params: __spreadValues$
|
|
24450
|
+
params: __spreadValues$f({}, createLayerSymbolParam(this.resourceId, intervals))
|
|
24448
24451
|
});
|
|
24449
24452
|
}
|
|
24450
24453
|
if (intervals.length) {
|
|
@@ -24481,27 +24484,27 @@ class Legend {
|
|
|
24481
24484
|
}
|
|
24482
24485
|
}
|
|
24483
24486
|
|
|
24484
|
-
var __defProp$
|
|
24485
|
-
var __defProps$
|
|
24486
|
-
var __getOwnPropDescs$
|
|
24487
|
-
var __getOwnPropSymbols$
|
|
24488
|
-
var __hasOwnProp$
|
|
24489
|
-
var __propIsEnum$
|
|
24490
|
-
var __defNormalProp$
|
|
24491
|
-
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) => {
|
|
24492
24495
|
for (var prop in b || (b = {}))
|
|
24493
|
-
if (__hasOwnProp$
|
|
24494
|
-
__defNormalProp$
|
|
24495
|
-
if (__getOwnPropSymbols$
|
|
24496
|
-
for (var prop of __getOwnPropSymbols$
|
|
24497
|
-
if (__propIsEnum$
|
|
24498
|
-
__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]);
|
|
24499
24502
|
}
|
|
24500
24503
|
return a;
|
|
24501
24504
|
};
|
|
24502
|
-
var __spreadProps$
|
|
24503
|
-
var __publicField$
|
|
24504
|
-
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) => {
|
|
24505
24508
|
return new Promise((resolve, reject) => {
|
|
24506
24509
|
var fulfilled = (value) => {
|
|
24507
24510
|
try {
|
|
@@ -24530,14 +24533,14 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24530
24533
|
parent,
|
|
24531
24534
|
noInit
|
|
24532
24535
|
}) {
|
|
24533
|
-
super(__spreadValues$
|
|
24534
|
-
__publicField$
|
|
24535
|
-
__publicField$
|
|
24536
|
-
__publicField$
|
|
24537
|
-
__publicField$
|
|
24538
|
-
__publicField$
|
|
24539
|
-
__publicField$
|
|
24540
|
-
__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);
|
|
24541
24544
|
this.webMap = webMap;
|
|
24542
24545
|
if (connector) {
|
|
24543
24546
|
this.connector = connector;
|
|
@@ -24560,7 +24563,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24560
24563
|
}
|
|
24561
24564
|
}
|
|
24562
24565
|
static create(webMap, item, options, connector, parent) {
|
|
24563
|
-
return __async$
|
|
24566
|
+
return __async$f(this, null, function* () {
|
|
24564
24567
|
const ngwWebmapItem = new _NgwWebmapItem({
|
|
24565
24568
|
webMap,
|
|
24566
24569
|
item,
|
|
@@ -24589,7 +24592,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24589
24592
|
return this.layer;
|
|
24590
24593
|
}
|
|
24591
24594
|
getLegend(options) {
|
|
24592
|
-
return __async$
|
|
24595
|
+
return __async$f(this, null, function* () {
|
|
24593
24596
|
var _a, _b;
|
|
24594
24597
|
const id = (_a = this.layer) == null ? void 0 : _a.id;
|
|
24595
24598
|
if (id !== void 0) {
|
|
@@ -24626,7 +24629,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24626
24629
|
getItemOptions(item) {
|
|
24627
24630
|
const transparency = item.item_type === "layer" && item.layer_transparency;
|
|
24628
24631
|
const opacity = typeof transparency === "number" ? (100 - transparency) / 100 : void 0;
|
|
24629
|
-
const options = __spreadProps$
|
|
24632
|
+
const options = __spreadProps$c(__spreadValues$e({
|
|
24630
24633
|
visibility: false,
|
|
24631
24634
|
name: item.display_name
|
|
24632
24635
|
}, this.options), {
|
|
@@ -24646,7 +24649,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24646
24649
|
}
|
|
24647
24650
|
if (item.item_type === "layer") {
|
|
24648
24651
|
const { maxZoom, minZoom } = this._getZoomRange(item);
|
|
24649
|
-
Object.assign(options, __spreadProps$
|
|
24652
|
+
Object.assign(options, __spreadProps$c(__spreadValues$e({
|
|
24650
24653
|
updateWmsParams: item.updateWmsParams
|
|
24651
24654
|
}, options), {
|
|
24652
24655
|
url: item.url,
|
|
@@ -24749,8 +24752,8 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
24749
24752
|
return totalValue;
|
|
24750
24753
|
}
|
|
24751
24754
|
};
|
|
24752
|
-
__publicField$
|
|
24753
|
-
__publicField$
|
|
24755
|
+
__publicField$9(_NgwWebmapItem, "GetAdapterFromLayerType", {});
|
|
24756
|
+
__publicField$9(_NgwWebmapItem, "options", {
|
|
24754
24757
|
properties: [
|
|
24755
24758
|
{
|
|
24756
24759
|
type: "boolean",
|
|
@@ -24790,27 +24793,27 @@ __publicField$8(_NgwWebmapItem, "options", {
|
|
|
24790
24793
|
});
|
|
24791
24794
|
let NgwWebmapItem = _NgwWebmapItem;
|
|
24792
24795
|
|
|
24793
|
-
var __defProp$
|
|
24794
|
-
var __defProps$
|
|
24795
|
-
var __getOwnPropDescs$
|
|
24796
|
-
var __getOwnPropSymbols$
|
|
24797
|
-
var __hasOwnProp$
|
|
24798
|
-
var __propIsEnum$
|
|
24799
|
-
var __defNormalProp$
|
|
24800
|
-
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) => {
|
|
24801
24804
|
for (var prop in b || (b = {}))
|
|
24802
|
-
if (__hasOwnProp$
|
|
24803
|
-
__defNormalProp$
|
|
24804
|
-
if (__getOwnPropSymbols$
|
|
24805
|
-
for (var prop of __getOwnPropSymbols$
|
|
24806
|
-
if (__propIsEnum$
|
|
24807
|
-
__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]);
|
|
24808
24811
|
}
|
|
24809
24812
|
return a;
|
|
24810
24813
|
};
|
|
24811
|
-
var __spreadProps$
|
|
24812
|
-
var __publicField$
|
|
24813
|
-
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) => {
|
|
24814
24817
|
return new Promise((resolve, reject) => {
|
|
24815
24818
|
var fulfilled = (value) => {
|
|
24816
24819
|
try {
|
|
@@ -24834,20 +24837,20 @@ class NgwWebmapLayerAdapter {
|
|
|
24834
24837
|
constructor(map, options) {
|
|
24835
24838
|
this.map = map;
|
|
24836
24839
|
this.options = options;
|
|
24837
|
-
__publicField$
|
|
24838
|
-
__publicField$
|
|
24840
|
+
__publicField$8(this, "layer");
|
|
24841
|
+
__publicField$8(this, "NgwWebmapItem", NgwWebmapItem);
|
|
24839
24842
|
/**
|
|
24840
24843
|
* Radius for searching objects in pixels
|
|
24841
24844
|
*/
|
|
24842
|
-
__publicField$
|
|
24845
|
+
__publicField$8(this, "pixelRadius", 10);
|
|
24843
24846
|
// webmapSettings.identify_radius,
|
|
24844
|
-
__publicField$
|
|
24845
|
-
__publicField$
|
|
24846
|
-
__publicField$
|
|
24847
|
-
__publicField$
|
|
24848
|
-
__publicField$
|
|
24849
|
-
__publicField$
|
|
24850
|
-
__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");
|
|
24851
24854
|
const r = options.resourceId;
|
|
24852
24855
|
if (Array.isArray(r)) {
|
|
24853
24856
|
this.resourceId = r[0];
|
|
@@ -24860,9 +24863,9 @@ class NgwWebmapLayerAdapter {
|
|
|
24860
24863
|
}
|
|
24861
24864
|
}
|
|
24862
24865
|
addLayer(options) {
|
|
24863
|
-
return __async$
|
|
24866
|
+
return __async$e(this, null, function* () {
|
|
24864
24867
|
var _a;
|
|
24865
|
-
this.options = __spreadValues$
|
|
24868
|
+
this.options = __spreadValues$d(__spreadValues$d({}, this.options), options);
|
|
24866
24869
|
this.layer = yield this._getWebMapLayerItem();
|
|
24867
24870
|
const extentConstrained = (_a = this.webmapResource) == null ? void 0 : _a.constraining_extent;
|
|
24868
24871
|
if (this.options.useExtentConstrained && this._extent && extentConstrained) {
|
|
@@ -24892,21 +24895,21 @@ class NgwWebmapLayerAdapter {
|
|
|
24892
24895
|
delete this.webmapResource;
|
|
24893
24896
|
}
|
|
24894
24897
|
showLayer() {
|
|
24895
|
-
return __async$
|
|
24898
|
+
return __async$e(this, null, function* () {
|
|
24896
24899
|
if (this.layer && this.layer.properties) {
|
|
24897
24900
|
return this.layer.properties.property("visibility").set(true);
|
|
24898
24901
|
}
|
|
24899
24902
|
});
|
|
24900
24903
|
}
|
|
24901
24904
|
hideLayer() {
|
|
24902
|
-
return __async$
|
|
24905
|
+
return __async$e(this, null, function* () {
|
|
24903
24906
|
if (this.layer && this.layer.properties) {
|
|
24904
24907
|
return this.layer.properties.property("visibility").set(false);
|
|
24905
24908
|
}
|
|
24906
24909
|
});
|
|
24907
24910
|
}
|
|
24908
24911
|
setOpacity(val) {
|
|
24909
|
-
return __async$
|
|
24912
|
+
return __async$e(this, null, function* () {
|
|
24910
24913
|
if (this.layer && this.layer.properties) {
|
|
24911
24914
|
return this.layer.properties.property("opacity").set(val);
|
|
24912
24915
|
}
|
|
@@ -24941,7 +24944,7 @@ class NgwWebmapLayerAdapter {
|
|
|
24941
24944
|
(x) => x.label_field
|
|
24942
24945
|
);
|
|
24943
24946
|
const keyname = labelField && labelField.keyname;
|
|
24944
|
-
return fetchNgwLayerItems(__spreadValues$
|
|
24947
|
+
return fetchNgwLayerItems(__spreadValues$d({
|
|
24945
24948
|
connector,
|
|
24946
24949
|
resourceId: bookmarkResId,
|
|
24947
24950
|
geom: false,
|
|
@@ -24966,7 +24969,7 @@ class NgwWebmapLayerAdapter {
|
|
|
24966
24969
|
);
|
|
24967
24970
|
}
|
|
24968
24971
|
getLegend(options) {
|
|
24969
|
-
return __async$
|
|
24972
|
+
return __async$e(this, null, function* () {
|
|
24970
24973
|
const legends = [];
|
|
24971
24974
|
let deps = this.getDependLayers();
|
|
24972
24975
|
deps = deps.sort((a, b) => b.id - a.id);
|
|
@@ -24978,7 +24981,7 @@ class NgwWebmapLayerAdapter {
|
|
|
24978
24981
|
});
|
|
24979
24982
|
}
|
|
24980
24983
|
getIdentificationIds(options) {
|
|
24981
|
-
return __async$
|
|
24984
|
+
return __async$e(this, null, function* () {
|
|
24982
24985
|
const visibleLayers = [];
|
|
24983
24986
|
let deps = this.getDependLayers();
|
|
24984
24987
|
deps = deps.sort((a, b) => b.id - a.id);
|
|
@@ -24997,7 +25000,7 @@ class NgwWebmapLayerAdapter {
|
|
|
24997
25000
|
});
|
|
24998
25001
|
}
|
|
24999
25002
|
_getWebMapLayerItem() {
|
|
25000
|
-
return __async$
|
|
25003
|
+
return __async$e(this, null, function* () {
|
|
25001
25004
|
if (!this.resourceId) {
|
|
25002
25005
|
return void 0;
|
|
25003
25006
|
}
|
|
@@ -25010,7 +25013,7 @@ class NgwWebmapLayerAdapter {
|
|
|
25010
25013
|
const connector = this.options.connector;
|
|
25011
25014
|
const headers = (connector == null ? void 0 : connector.options.auth) ? connector.getAuthorizationHeaders() : void 0;
|
|
25012
25015
|
const withCredentials = connector.withCredentials;
|
|
25013
|
-
const options = __spreadProps$
|
|
25016
|
+
const options = __spreadProps$b(__spreadValues$d({}, this.options), {
|
|
25014
25017
|
withCredentials,
|
|
25015
25018
|
headers,
|
|
25016
25019
|
drawOrderEnabled: (_a = webmap.draw_order_enabled) != null ? _a : false
|
|
@@ -25028,7 +25031,7 @@ class NgwWebmapLayerAdapter {
|
|
|
25028
25031
|
});
|
|
25029
25032
|
}
|
|
25030
25033
|
getWebMapConfig(id) {
|
|
25031
|
-
return __async$
|
|
25034
|
+
return __async$e(this, null, function* () {
|
|
25032
25035
|
var _a;
|
|
25033
25036
|
const data = yield this.options.connector.getResource(id);
|
|
25034
25037
|
if (data) {
|
|
@@ -25116,7 +25119,7 @@ class NgwWebmapLayerAdapter {
|
|
|
25116
25119
|
webMap,
|
|
25117
25120
|
baseUrl: this.options.connector.options.baseUrl || ""
|
|
25118
25121
|
});
|
|
25119
|
-
item = __spreadValues$
|
|
25122
|
+
item = __spreadValues$d(__spreadValues$d({}, layerItem), layerAdapterOptions);
|
|
25120
25123
|
}
|
|
25121
25124
|
}
|
|
25122
25125
|
if (typeof ((_a = this.options.nativeOptions) == null ? void 0 : _a.beforeItemCreated) === "function") {
|
|
@@ -25126,40 +25129,40 @@ class NgwWebmapLayerAdapter {
|
|
|
25126
25129
|
}
|
|
25127
25130
|
}
|
|
25128
25131
|
|
|
25129
|
-
var __defProp$
|
|
25130
|
-
var __defProps$
|
|
25131
|
-
var __getOwnPropDescs$
|
|
25132
|
-
var __getOwnPropSymbols$
|
|
25133
|
-
var __hasOwnProp$
|
|
25134
|
-
var __propIsEnum$
|
|
25135
|
-
var __defNormalProp$
|
|
25136
|
-
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) => {
|
|
25137
25140
|
for (var prop in b || (b = {}))
|
|
25138
|
-
if (__hasOwnProp$
|
|
25139
|
-
__defNormalProp$
|
|
25140
|
-
if (__getOwnPropSymbols$
|
|
25141
|
-
for (var prop of __getOwnPropSymbols$
|
|
25142
|
-
if (__propIsEnum$
|
|
25143
|
-
__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]);
|
|
25144
25147
|
}
|
|
25145
25148
|
return a;
|
|
25146
25149
|
};
|
|
25147
|
-
var __spreadProps$
|
|
25150
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
25148
25151
|
var __objRest$2 = (source, exclude) => {
|
|
25149
25152
|
var target = {};
|
|
25150
25153
|
for (var prop in source)
|
|
25151
|
-
if (__hasOwnProp$
|
|
25154
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25152
25155
|
target[prop] = source[prop];
|
|
25153
|
-
if (source != null && __getOwnPropSymbols$
|
|
25154
|
-
for (var prop of __getOwnPropSymbols$
|
|
25155
|
-
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))
|
|
25156
25159
|
target[prop] = source[prop];
|
|
25157
25160
|
}
|
|
25158
25161
|
return target;
|
|
25159
25162
|
};
|
|
25160
25163
|
function updateImageParams(params, resourceId) {
|
|
25161
25164
|
const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$2(_a, ["bbox", "width", "height", "nd"]);
|
|
25162
|
-
return __spreadProps$
|
|
25165
|
+
return __spreadProps$a(__spreadValues$c({}, rest), {
|
|
25163
25166
|
resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
|
|
25164
25167
|
extent: bbox,
|
|
25165
25168
|
size: width + "," + height,
|
|
@@ -25194,7 +25197,7 @@ function createNgwLayerAdapter(options, webMap, connector) {
|
|
|
25194
25197
|
function extendNgwWebmapLayerAdapter(opt) {
|
|
25195
25198
|
class A extends NgwWebmapLayerAdapter {
|
|
25196
25199
|
constructor(map, options) {
|
|
25197
|
-
options = __spreadValues$
|
|
25200
|
+
options = __spreadValues$c(__spreadValues$c({}, opt), options);
|
|
25198
25201
|
super(map, options);
|
|
25199
25202
|
}
|
|
25200
25203
|
}
|
|
@@ -25225,78 +25228,174 @@ function setScaleRatio(scale, lat = 0) {
|
|
|
25225
25228
|
return zoom;
|
|
25226
25229
|
}
|
|
25227
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
|
+
}
|
|
25228
25252
|
function getSubdomainsOriginUrl(originUrl) {
|
|
25229
|
-
const
|
|
25230
|
-
originUrl = originUrl.replace(/{switch:(.*?)}/, (
|
|
25253
|
+
const subdomains = [];
|
|
25254
|
+
originUrl = originUrl.replace(/{switch:(.*?)}/, (match, group) => {
|
|
25231
25255
|
if (typeof group === "string") {
|
|
25232
|
-
group.split(",").forEach((
|
|
25256
|
+
group.split(",").forEach((subdomain) => subdomains.push(subdomain));
|
|
25233
25257
|
}
|
|
25234
25258
|
return "{s}";
|
|
25235
25259
|
});
|
|
25236
|
-
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
|
+
};
|
|
25237
25303
|
}
|
|
25238
25304
|
|
|
25239
|
-
|
|
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) => {
|
|
25240
25309
|
return new Promise((resolve, reject) => {
|
|
25241
|
-
|
|
25242
|
-
|
|
25243
|
-
|
|
25244
|
-
|
|
25245
|
-
|
|
25246
|
-
resolve(JSON.parse(xmlHttp.responseText));
|
|
25247
|
-
} catch (er) {
|
|
25248
|
-
reject(er);
|
|
25249
|
-
}
|
|
25250
|
-
}
|
|
25310
|
+
var fulfilled = (value) => {
|
|
25311
|
+
try {
|
|
25312
|
+
step(generator.next(value));
|
|
25313
|
+
} catch (e) {
|
|
25314
|
+
reject(e);
|
|
25251
25315
|
}
|
|
25252
25316
|
};
|
|
25253
|
-
|
|
25254
|
-
|
|
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());
|
|
25255
25326
|
});
|
|
25256
|
-
}
|
|
25257
|
-
|
|
25258
|
-
const alias = {
|
|
25259
|
-
tms: "TILE"
|
|
25260
25327
|
};
|
|
25261
|
-
|
|
25262
|
-
|
|
25263
|
-
|
|
25264
|
-
|
|
25265
|
-
|
|
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();
|
|
25266
25333
|
}
|
|
25267
|
-
|
|
25268
|
-
|
|
25269
|
-
|
|
25270
|
-
|
|
25271
|
-
|
|
25272
|
-
|
|
25273
|
-
|
|
25274
|
-
|
|
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;
|
|
25275
25371
|
|
|
25276
25372
|
var __defProp$c = Object.defineProperty;
|
|
25277
|
-
var
|
|
25278
|
-
var
|
|
25279
|
-
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;
|
|
25280
25378
|
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
25281
|
-
var __spreadValues$
|
|
25379
|
+
var __spreadValues$b = (a, b) => {
|
|
25282
25380
|
for (var prop in b || (b = {}))
|
|
25283
|
-
if (__hasOwnProp$
|
|
25381
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
25284
25382
|
__defNormalProp$c(a, prop, b[prop]);
|
|
25285
|
-
if (__getOwnPropSymbols$
|
|
25286
|
-
for (var prop of __getOwnPropSymbols$
|
|
25287
|
-
if (__propIsEnum$
|
|
25383
|
+
if (__getOwnPropSymbols$b)
|
|
25384
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
25385
|
+
if (__propIsEnum$b.call(b, prop))
|
|
25288
25386
|
__defNormalProp$c(a, prop, b[prop]);
|
|
25289
25387
|
}
|
|
25290
25388
|
return a;
|
|
25291
25389
|
};
|
|
25390
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
25292
25391
|
var __objRest$1 = (source, exclude) => {
|
|
25293
25392
|
var target = {};
|
|
25294
25393
|
for (var prop in source)
|
|
25295
|
-
if (__hasOwnProp$
|
|
25394
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25296
25395
|
target[prop] = source[prop];
|
|
25297
|
-
if (source != null && __getOwnPropSymbols$
|
|
25298
|
-
for (var prop of __getOwnPropSymbols$
|
|
25299
|
-
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))
|
|
25300
25399
|
target[prop] = source[prop];
|
|
25301
25400
|
}
|
|
25302
25401
|
return target;
|
|
@@ -25322,31 +25421,48 @@ var __async$c = (__this, __arguments, generator) => {
|
|
|
25322
25421
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
25323
25422
|
});
|
|
25324
25423
|
};
|
|
25325
|
-
const
|
|
25326
|
-
|
|
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 = {}) {
|
|
25327
25450
|
let webMap;
|
|
25328
25451
|
if ("webMap" in webMapOrOptions) {
|
|
25329
|
-
const _a = webMapOrOptions, { webMap: webMap_
|
|
25452
|
+
const _a = webMapOrOptions, { webMap: webMap_ } = _a, adapterOptions = __objRest$1(_a, ["webMap"]);
|
|
25330
25453
|
webMap = webMap_;
|
|
25331
|
-
|
|
25332
|
-
url = url_;
|
|
25333
|
-
}
|
|
25334
|
-
if (adapterOptions) {
|
|
25335
|
-
createOpt = adapterOptions;
|
|
25336
|
-
}
|
|
25454
|
+
createOpt = adapterOptions;
|
|
25337
25455
|
} else {
|
|
25338
25456
|
webMap = webMapOrOptions;
|
|
25339
25457
|
}
|
|
25340
|
-
|
|
25341
|
-
url = URL$1;
|
|
25342
|
-
}
|
|
25458
|
+
const client = new QmsClient();
|
|
25343
25459
|
class QmsAdapter {
|
|
25344
25460
|
constructor(map, options) {
|
|
25345
25461
|
__publicField$6(this, "qms");
|
|
25346
25462
|
__publicField$6(this, "options");
|
|
25347
25463
|
__publicField$6(this, "map");
|
|
25348
25464
|
this.map = map;
|
|
25349
|
-
const opt = __spreadValues$
|
|
25465
|
+
const opt = __spreadValues$b(__spreadValues$b({}, createOpt), options);
|
|
25350
25466
|
this.options = opt;
|
|
25351
25467
|
this.options.baselayer = true;
|
|
25352
25468
|
if (opt.qms) {
|
|
@@ -25355,42 +25471,38 @@ function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
|
|
|
25355
25471
|
}
|
|
25356
25472
|
addLayer(options) {
|
|
25357
25473
|
return __async$c(this, null, function* () {
|
|
25358
|
-
|
|
25359
|
-
|
|
25360
|
-
|
|
25361
|
-
|
|
25362
|
-
|
|
25363
|
-
} catch (er) {
|
|
25364
|
-
console.error(er);
|
|
25365
|
-
}
|
|
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;
|
|
25366
25479
|
}
|
|
25367
|
-
|
|
25368
|
-
|
|
25369
|
-
|
|
25480
|
+
try {
|
|
25481
|
+
const layer = yield client.getLayer(qmsId, { signal });
|
|
25482
|
+
this.qms = layer.service;
|
|
25483
|
+
const type = alias[layer.type];
|
|
25370
25484
|
const WebMapAdapter = webMap.mapAdapter.layerAdapters[type];
|
|
25371
25485
|
if (WebMapAdapter) {
|
|
25372
25486
|
mixinProperties(QmsAdapter, WebMapAdapter, [
|
|
25373
25487
|
"showLayer",
|
|
25374
25488
|
"hideLayer"
|
|
25375
25489
|
]);
|
|
25376
|
-
|
|
25377
|
-
|
|
25378
|
-
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
|
|
25382
|
-
|
|
25383
|
-
|
|
25384
|
-
|
|
25385
|
-
|
|
25386
|
-
options.url = url2;
|
|
25387
|
-
}
|
|
25388
|
-
}
|
|
25389
|
-
this.options = options;
|
|
25390
|
-
const adapter = new WebMapAdapter(this.map, options);
|
|
25391
|
-
return adapter.addLayer(options);
|
|
25392
|
-
}
|
|
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);
|
|
25393
25500
|
}
|
|
25501
|
+
} catch (er) {
|
|
25502
|
+
if (signal == null ? void 0 : signal.aborted) {
|
|
25503
|
+
throw er;
|
|
25504
|
+
}
|
|
25505
|
+
console.error(er);
|
|
25394
25506
|
}
|
|
25395
25507
|
});
|
|
25396
25508
|
}
|
|
@@ -25399,31 +25511,9 @@ function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
|
|
|
25399
25511
|
}
|
|
25400
25512
|
|
|
25401
25513
|
var __defProp$b = Object.defineProperty;
|
|
25402
|
-
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
25403
|
-
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
25404
|
-
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
25405
25514
|
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
25406
|
-
var
|
|
25407
|
-
for (var prop in b || (b = {}))
|
|
25408
|
-
if (__hasOwnProp$b.call(b, prop))
|
|
25409
|
-
__defNormalProp$b(a, prop, b[prop]);
|
|
25410
|
-
if (__getOwnPropSymbols$b)
|
|
25411
|
-
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
25412
|
-
if (__propIsEnum$b.call(b, prop))
|
|
25413
|
-
__defNormalProp$b(a, prop, b[prop]);
|
|
25414
|
-
}
|
|
25415
|
-
return a;
|
|
25416
|
-
};
|
|
25417
|
-
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);
|
|
25418
25516
|
class QmsKit {
|
|
25419
|
-
constructor(options) {
|
|
25420
|
-
__publicField$5(this, "options", {
|
|
25421
|
-
url: "https://qms.nextgis.com"
|
|
25422
|
-
});
|
|
25423
|
-
__publicField$5(this, "url");
|
|
25424
|
-
this.options = __spreadValues$b(__spreadValues$b({}, this.options), options);
|
|
25425
|
-
this.url = this.options.url;
|
|
25426
|
-
}
|
|
25427
25517
|
getLayerAdapters() {
|
|
25428
25518
|
return Promise.resolve([
|
|
25429
25519
|
{
|
|
@@ -25433,7 +25523,7 @@ class QmsKit {
|
|
|
25433
25523
|
]);
|
|
25434
25524
|
}
|
|
25435
25525
|
_createAdapter(webMap) {
|
|
25436
|
-
return createQmsAdapter({ webMap
|
|
25526
|
+
return createQmsAdapter({ webMap });
|
|
25437
25527
|
}
|
|
25438
25528
|
}
|
|
25439
25529
|
__publicField$5(QmsKit, "utils", {
|
|
@@ -25493,7 +25583,7 @@ function createBasemapLayerAdapter(_0) {
|
|
|
25493
25583
|
if (qms) {
|
|
25494
25584
|
const qms_ = JSON.parse(qms);
|
|
25495
25585
|
const adapter = Promise.resolve(
|
|
25496
|
-
QmsKit.utils.createQmsAdapter(webMap,
|
|
25586
|
+
QmsKit.utils.createQmsAdapter(webMap, {
|
|
25497
25587
|
qms: qms_,
|
|
25498
25588
|
baselayer: true
|
|
25499
25589
|
})
|