@nextgis/ngw-leaflet 3.0.0-alpha.3 → 3.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 +762 -584
- 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 +762 -584
- 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: 3.0.0-alpha.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.4; author: NextGIS */
|
|
2
2
|
function styleInject(css, ref) {
|
|
3
3
|
if ( ref === void 0 ) ref = {};
|
|
4
4
|
var insertAt = ref.insertAt;
|
|
@@ -14944,6 +14944,20 @@ function isArray(val) {
|
|
|
14944
14944
|
function fixUrlStr(url) {
|
|
14945
14945
|
return url.replace(/([^:]\/)\/+/g, "$1");
|
|
14946
14946
|
}
|
|
14947
|
+
function updateUrlParams(urlStr, params) {
|
|
14948
|
+
const url = new URL(urlStr);
|
|
14949
|
+
const searchParams = new URLSearchParams(url.search);
|
|
14950
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
14951
|
+
if (value === void 0) {
|
|
14952
|
+
searchParams.delete(key);
|
|
14953
|
+
} else {
|
|
14954
|
+
searchParams.set(key, value);
|
|
14955
|
+
}
|
|
14956
|
+
});
|
|
14957
|
+
searchParams.set("timestamp", String((/* @__PURE__ */ new Date()).getTime()));
|
|
14958
|
+
const newSearch = [...searchParams.entries()].map(([key, value]) => `${key}=${value}`).join("&");
|
|
14959
|
+
return `${url.origin}${url.pathname}?${newSearch}`;
|
|
14960
|
+
}
|
|
14947
14961
|
|
|
14948
14962
|
function boundsToArray(bounds) {
|
|
14949
14963
|
const ne = bounds.getNorthEast();
|
|
@@ -15048,15 +15062,15 @@ function createFeaturePositionOptions(features) {
|
|
|
15048
15062
|
};
|
|
15049
15063
|
}
|
|
15050
15064
|
|
|
15051
|
-
var __defProp$
|
|
15052
|
-
var __defNormalProp$
|
|
15053
|
-
var __publicField$
|
|
15065
|
+
var __defProp$Z = Object.defineProperty;
|
|
15066
|
+
var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15067
|
+
var __publicField$F = (obj, key, value) => __defNormalProp$Z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15054
15068
|
class BaseAdapter {
|
|
15055
15069
|
constructor(map, options) {
|
|
15056
15070
|
this.map = map;
|
|
15057
15071
|
this.options = options;
|
|
15058
|
-
__publicField$
|
|
15059
|
-
__publicField$
|
|
15072
|
+
__publicField$F(this, "layer");
|
|
15073
|
+
__publicField$F(this, "pane", "order-0");
|
|
15060
15074
|
if (options.order !== void 0) {
|
|
15061
15075
|
const pane = "order-" + options.order;
|
|
15062
15076
|
let exist = map.getPane(pane);
|
|
@@ -15085,19 +15099,19 @@ function convertMapClickEvent(evt) {
|
|
|
15085
15099
|
};
|
|
15086
15100
|
}
|
|
15087
15101
|
|
|
15088
|
-
var __defProp$
|
|
15102
|
+
var __defProp$Y = Object.defineProperty;
|
|
15089
15103
|
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
15090
15104
|
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
15091
15105
|
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
15092
|
-
var __defNormalProp$
|
|
15106
|
+
var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15093
15107
|
var __spreadValues$F = (a, b) => {
|
|
15094
15108
|
for (var prop in b || (b = {}))
|
|
15095
15109
|
if (__hasOwnProp$G.call(b, prop))
|
|
15096
|
-
__defNormalProp$
|
|
15110
|
+
__defNormalProp$Y(a, prop, b[prop]);
|
|
15097
15111
|
if (__getOwnPropSymbols$G)
|
|
15098
15112
|
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
15099
15113
|
if (__propIsEnum$G.call(b, prop))
|
|
15100
|
-
__defNormalProp$
|
|
15114
|
+
__defNormalProp$Y(a, prop, b[prop]);
|
|
15101
15115
|
}
|
|
15102
15116
|
return a;
|
|
15103
15117
|
};
|
|
@@ -15116,30 +15130,30 @@ function createMouseEvent({
|
|
|
15116
15130
|
return opt;
|
|
15117
15131
|
}
|
|
15118
15132
|
|
|
15119
|
-
var __defProp$
|
|
15133
|
+
var __defProp$X = Object.defineProperty;
|
|
15120
15134
|
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
15121
15135
|
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
15122
15136
|
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
15123
|
-
var __defNormalProp$
|
|
15137
|
+
var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15124
15138
|
var __spreadValues$E = (a, b) => {
|
|
15125
15139
|
for (var prop in b || (b = {}))
|
|
15126
15140
|
if (__hasOwnProp$F.call(b, prop))
|
|
15127
|
-
__defNormalProp$
|
|
15141
|
+
__defNormalProp$X(a, prop, b[prop]);
|
|
15128
15142
|
if (__getOwnPropSymbols$F)
|
|
15129
15143
|
for (var prop of __getOwnPropSymbols$F(b)) {
|
|
15130
15144
|
if (__propIsEnum$F.call(b, prop))
|
|
15131
|
-
__defNormalProp$
|
|
15145
|
+
__defNormalProp$X(a, prop, b[prop]);
|
|
15132
15146
|
}
|
|
15133
15147
|
return a;
|
|
15134
15148
|
};
|
|
15135
|
-
var __publicField$
|
|
15149
|
+
var __publicField$E = (obj, key, value) => __defNormalProp$X(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15136
15150
|
class GeoJsonEvents {
|
|
15137
15151
|
constructor(layer) {
|
|
15138
|
-
__publicField$
|
|
15139
|
-
__publicField$
|
|
15140
|
-
__publicField$
|
|
15141
|
-
__publicField$
|
|
15142
|
-
__publicField$
|
|
15152
|
+
__publicField$E(this, "layer");
|
|
15153
|
+
__publicField$E(this, "_onclick");
|
|
15154
|
+
__publicField$E(this, "_ondblclick");
|
|
15155
|
+
__publicField$E(this, "_mouseout");
|
|
15156
|
+
__publicField$E(this, "_mouseover");
|
|
15143
15157
|
this.layer = layer;
|
|
15144
15158
|
}
|
|
15145
15159
|
handleMouseEvents(layer) {
|
|
@@ -15836,19 +15850,19 @@ const typeExpressions = {
|
|
|
15836
15850
|
typeof: evaluateArgs(([arg]) => typeOfValue(arg))
|
|
15837
15851
|
};
|
|
15838
15852
|
|
|
15839
|
-
var __defProp$
|
|
15853
|
+
var __defProp$W = Object.defineProperty;
|
|
15840
15854
|
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
15841
15855
|
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
15842
15856
|
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
15843
|
-
var __defNormalProp$
|
|
15857
|
+
var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15844
15858
|
var __spreadValues$D = (a, b) => {
|
|
15845
15859
|
for (var prop in b || (b = {}))
|
|
15846
15860
|
if (__hasOwnProp$E.call(b, prop))
|
|
15847
|
-
__defNormalProp$
|
|
15861
|
+
__defNormalProp$W(a, prop, b[prop]);
|
|
15848
15862
|
if (__getOwnPropSymbols$E)
|
|
15849
15863
|
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
15850
15864
|
if (__propIsEnum$E.call(b, prop))
|
|
15851
|
-
__defNormalProp$
|
|
15865
|
+
__defNormalProp$W(a, prop, b[prop]);
|
|
15852
15866
|
}
|
|
15853
15867
|
return a;
|
|
15854
15868
|
};
|
|
@@ -15873,19 +15887,19 @@ function evaluate(expression, data = {}) {
|
|
|
15873
15887
|
throw new Error(`Expression "${name}" is not supported.`);
|
|
15874
15888
|
}
|
|
15875
15889
|
|
|
15876
|
-
var __defProp$
|
|
15890
|
+
var __defProp$V = Object.defineProperty;
|
|
15877
15891
|
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
15878
15892
|
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
15879
15893
|
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
15880
|
-
var __defNormalProp$
|
|
15894
|
+
var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15881
15895
|
var __spreadValues$C = (a, b) => {
|
|
15882
15896
|
for (var prop in b || (b = {}))
|
|
15883
15897
|
if (__hasOwnProp$D.call(b, prop))
|
|
15884
|
-
__defNormalProp$
|
|
15898
|
+
__defNormalProp$V(a, prop, b[prop]);
|
|
15885
15899
|
if (__getOwnPropSymbols$D)
|
|
15886
15900
|
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
15887
15901
|
if (__propIsEnum$D.call(b, prop))
|
|
15888
|
-
__defNormalProp$
|
|
15902
|
+
__defNormalProp$V(a, prop, b[prop]);
|
|
15889
15903
|
}
|
|
15890
15904
|
return a;
|
|
15891
15905
|
};
|
|
@@ -15924,19 +15938,19 @@ function createExpressionCallback(paint) {
|
|
|
15924
15938
|
return;
|
|
15925
15939
|
}
|
|
15926
15940
|
|
|
15927
|
-
var __defProp$
|
|
15941
|
+
var __defProp$U = Object.defineProperty;
|
|
15928
15942
|
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
15929
15943
|
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
15930
15944
|
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
15931
|
-
var __defNormalProp$
|
|
15945
|
+
var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15932
15946
|
var __spreadValues$B = (a, b) => {
|
|
15933
15947
|
for (var prop in b || (b = {}))
|
|
15934
15948
|
if (__hasOwnProp$C.call(b, prop))
|
|
15935
|
-
__defNormalProp$
|
|
15949
|
+
__defNormalProp$U(a, prop, b[prop]);
|
|
15936
15950
|
if (__getOwnPropSymbols$C)
|
|
15937
15951
|
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
15938
15952
|
if (__propIsEnum$C.call(b, prop))
|
|
15939
|
-
__defNormalProp$
|
|
15953
|
+
__defNormalProp$U(a, prop, b[prop]);
|
|
15940
15954
|
}
|
|
15941
15955
|
return a;
|
|
15942
15956
|
};
|
|
@@ -16018,19 +16032,19 @@ function propertiesFilter(properties, filters) {
|
|
|
16018
16032
|
return logic === "any" ? filters_.some(filterFunction) : filters_.every(filterFunction);
|
|
16019
16033
|
}
|
|
16020
16034
|
|
|
16021
|
-
var __defProp$
|
|
16035
|
+
var __defProp$T = Object.defineProperty;
|
|
16022
16036
|
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
16023
16037
|
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
16024
16038
|
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
16025
|
-
var __defNormalProp$
|
|
16039
|
+
var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16026
16040
|
var __spreadValues$A = (a, b) => {
|
|
16027
16041
|
for (var prop in b || (b = {}))
|
|
16028
16042
|
if (__hasOwnProp$B.call(b, prop))
|
|
16029
|
-
__defNormalProp$
|
|
16043
|
+
__defNormalProp$T(a, prop, b[prop]);
|
|
16030
16044
|
if (__getOwnPropSymbols$B)
|
|
16031
16045
|
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
16032
16046
|
if (__propIsEnum$B.call(b, prop))
|
|
16033
|
-
__defNormalProp$
|
|
16047
|
+
__defNormalProp$T(a, prop, b[prop]);
|
|
16034
16048
|
}
|
|
16035
16049
|
return a;
|
|
16036
16050
|
};
|
|
@@ -16154,26 +16168,26 @@ function preparePaint({
|
|
|
16154
16168
|
return newPaint;
|
|
16155
16169
|
}
|
|
16156
16170
|
|
|
16157
|
-
var __defProp$
|
|
16158
|
-
var __defProps$
|
|
16159
|
-
var __getOwnPropDescs$
|
|
16171
|
+
var __defProp$S = Object.defineProperty;
|
|
16172
|
+
var __defProps$m = Object.defineProperties;
|
|
16173
|
+
var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
|
|
16160
16174
|
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
16161
16175
|
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
16162
16176
|
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
16163
|
-
var __defNormalProp$
|
|
16177
|
+
var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16164
16178
|
var __spreadValues$z = (a, b) => {
|
|
16165
16179
|
for (var prop in b || (b = {}))
|
|
16166
16180
|
if (__hasOwnProp$A.call(b, prop))
|
|
16167
|
-
__defNormalProp$
|
|
16181
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
16168
16182
|
if (__getOwnPropSymbols$A)
|
|
16169
16183
|
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
16170
16184
|
if (__propIsEnum$A.call(b, prop))
|
|
16171
|
-
__defNormalProp$
|
|
16185
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
16172
16186
|
}
|
|
16173
16187
|
return a;
|
|
16174
16188
|
};
|
|
16175
|
-
var __spreadProps$
|
|
16176
|
-
var __objRest$
|
|
16189
|
+
var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
|
|
16190
|
+
var __objRest$6 = (source, exclude) => {
|
|
16177
16191
|
var target = {};
|
|
16178
16192
|
for (var prop in source)
|
|
16179
16193
|
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -16185,10 +16199,10 @@ var __objRest$5 = (source, exclude) => {
|
|
|
16185
16199
|
}
|
|
16186
16200
|
return target;
|
|
16187
16201
|
};
|
|
16188
|
-
var __publicField$
|
|
16202
|
+
var __publicField$D = (obj, key, value) => __defNormalProp$S(obj, key + "" , value);
|
|
16189
16203
|
class GeoJsonPaint {
|
|
16190
16204
|
constructor(layer) {
|
|
16191
|
-
__publicField$
|
|
16205
|
+
__publicField$D(this, "layer");
|
|
16192
16206
|
this.layer = layer;
|
|
16193
16207
|
}
|
|
16194
16208
|
setPaintEachLayer(paint) {
|
|
@@ -16256,7 +16270,7 @@ class GeoJsonPaint {
|
|
|
16256
16270
|
return PAINT;
|
|
16257
16271
|
}
|
|
16258
16272
|
_createDivIcon(icon) {
|
|
16259
|
-
const _a = icon, { html, rotate, className } = _a, toLIconOpt = __objRest$
|
|
16273
|
+
const _a = icon, { html, rotate, className } = _a, toLIconOpt = __objRest$6(_a, ["html", "rotate", "className"]);
|
|
16260
16274
|
const element = document.createElement("div");
|
|
16261
16275
|
if (className) {
|
|
16262
16276
|
element.className = className;
|
|
@@ -16267,7 +16281,7 @@ class GeoJsonPaint {
|
|
|
16267
16281
|
if (html) {
|
|
16268
16282
|
element.innerHTML = html;
|
|
16269
16283
|
}
|
|
16270
|
-
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$
|
|
16284
|
+
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$m(__spreadValues$z({
|
|
16271
16285
|
className: ""
|
|
16272
16286
|
}, toLIconOpt), {
|
|
16273
16287
|
html: element
|
|
@@ -16315,26 +16329,26 @@ class GeoJsonPaint {
|
|
|
16315
16329
|
}
|
|
16316
16330
|
}
|
|
16317
16331
|
|
|
16318
|
-
var __defProp$
|
|
16319
|
-
var __defProps$
|
|
16320
|
-
var __getOwnPropDescs$
|
|
16332
|
+
var __defProp$R = Object.defineProperty;
|
|
16333
|
+
var __defProps$l = Object.defineProperties;
|
|
16334
|
+
var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
|
|
16321
16335
|
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
16322
16336
|
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
16323
16337
|
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
16324
|
-
var __defNormalProp$
|
|
16338
|
+
var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16325
16339
|
var __spreadValues$y = (a, b) => {
|
|
16326
16340
|
for (var prop in b || (b = {}))
|
|
16327
16341
|
if (__hasOwnProp$z.call(b, prop))
|
|
16328
|
-
__defNormalProp$
|
|
16342
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
16329
16343
|
if (__getOwnPropSymbols$z)
|
|
16330
16344
|
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
16331
16345
|
if (__propIsEnum$z.call(b, prop))
|
|
16332
|
-
__defNormalProp$
|
|
16346
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
16333
16347
|
}
|
|
16334
16348
|
return a;
|
|
16335
16349
|
};
|
|
16336
|
-
var __spreadProps$
|
|
16337
|
-
var __publicField$
|
|
16350
|
+
var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
|
|
16351
|
+
var __publicField$C = (obj, key, value) => __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16338
16352
|
var __async$s = (__this, __arguments, generator) => {
|
|
16339
16353
|
return new Promise((resolve, reject) => {
|
|
16340
16354
|
var fulfilled = (value) => {
|
|
@@ -16358,22 +16372,22 @@ var __async$s = (__this, __arguments, generator) => {
|
|
|
16358
16372
|
class GeoJsonAdapter extends BaseAdapter {
|
|
16359
16373
|
constructor(map, options) {
|
|
16360
16374
|
super(map, options);
|
|
16361
|
-
__publicField$
|
|
16362
|
-
__publicField$
|
|
16363
|
-
__publicField$
|
|
16364
|
-
__publicField$
|
|
16365
|
-
__publicField$
|
|
16366
|
-
__publicField$
|
|
16367
|
-
__publicField$
|
|
16368
|
-
__publicField$
|
|
16369
|
-
__publicField$
|
|
16370
|
-
__publicField$
|
|
16371
|
-
__publicField$
|
|
16372
|
-
__publicField$
|
|
16373
|
-
__publicField$
|
|
16375
|
+
__publicField$C(this, "layer");
|
|
16376
|
+
__publicField$C(this, "selected", false);
|
|
16377
|
+
__publicField$C(this, "type");
|
|
16378
|
+
__publicField$C(this, "_layers", []);
|
|
16379
|
+
__publicField$C(this, "_events");
|
|
16380
|
+
__publicField$C(this, "paint");
|
|
16381
|
+
__publicField$C(this, "selectedPaint");
|
|
16382
|
+
__publicField$C(this, "_selectedLayers", []);
|
|
16383
|
+
__publicField$C(this, "_filteredLayers", []);
|
|
16384
|
+
__publicField$C(this, "_filterFun");
|
|
16385
|
+
__publicField$C(this, "_openedPopup", []);
|
|
16386
|
+
__publicField$C(this, "_paint");
|
|
16387
|
+
__publicField$C(this, "$updateTooltip", debounce(() => {
|
|
16374
16388
|
this.updateTooltip();
|
|
16375
16389
|
}, 300));
|
|
16376
|
-
__publicField$
|
|
16390
|
+
__publicField$C(this, "$unselect", () => {
|
|
16377
16391
|
this.unselect();
|
|
16378
16392
|
});
|
|
16379
16393
|
this._events = new GeoJsonEvents(this);
|
|
@@ -16382,7 +16396,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16382
16396
|
addLayer(options) {
|
|
16383
16397
|
Object.assign(this.options, options);
|
|
16384
16398
|
this.paint = options.paint;
|
|
16385
|
-
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$
|
|
16399
|
+
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$l(__spreadValues$y({}, options.nativeOptions), {
|
|
16386
16400
|
pane: this.pane
|
|
16387
16401
|
}));
|
|
16388
16402
|
this.selectedPaint = options.selectedPaint;
|
|
@@ -16732,7 +16746,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16732
16746
|
if (feature) {
|
|
16733
16747
|
return this._paint.preparePaint(__spreadValues$y(__spreadValues$y({}, PAINT), paint(feature)));
|
|
16734
16748
|
} else {
|
|
16735
|
-
return this._paint.preparePaint(__spreadProps$
|
|
16749
|
+
return this._paint.preparePaint(__spreadProps$l(__spreadValues$y({}, PAINT), { type: "path" }));
|
|
16736
16750
|
}
|
|
16737
16751
|
}
|
|
16738
16752
|
};
|
|
@@ -16926,20 +16940,20 @@ function callAjax({
|
|
|
16926
16940
|
return [promise, abortFunc];
|
|
16927
16941
|
}
|
|
16928
16942
|
|
|
16929
|
-
var __defProp$
|
|
16930
|
-
var __defNormalProp$
|
|
16931
|
-
var __publicField$
|
|
16943
|
+
var __defProp$Q = Object.defineProperty;
|
|
16944
|
+
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16945
|
+
var __publicField$B = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16932
16946
|
class Queue {
|
|
16933
16947
|
/**
|
|
16934
16948
|
* @param {PromiseQueueOptions} options - Configuration options for the queue.
|
|
16935
16949
|
*/
|
|
16936
16950
|
constructor({ concurrency = 1, delay = 0 } = {}) {
|
|
16937
|
-
__publicField$
|
|
16938
|
-
__publicField$
|
|
16939
|
-
__publicField$
|
|
16940
|
-
__publicField$
|
|
16941
|
-
__publicField$
|
|
16942
|
-
__publicField$
|
|
16951
|
+
__publicField$B(this, "queue", []);
|
|
16952
|
+
__publicField$B(this, "concurrency");
|
|
16953
|
+
__publicField$B(this, "activeCount", 0);
|
|
16954
|
+
__publicField$B(this, "timeoutId");
|
|
16955
|
+
__publicField$B(this, "delay");
|
|
16956
|
+
__publicField$B(this, "toAbort", []);
|
|
16943
16957
|
this.concurrency = concurrency;
|
|
16944
16958
|
this.delay = delay;
|
|
16945
16959
|
}
|
|
@@ -17015,13 +17029,13 @@ class Queue {
|
|
|
17015
17029
|
|
|
17016
17030
|
const imageQueue = new Queue({ concurrency: 6, delay: 200 });
|
|
17017
17031
|
|
|
17018
|
-
var __defProp$
|
|
17019
|
-
var __defNormalProp$
|
|
17020
|
-
var __publicField$
|
|
17032
|
+
var __defProp$P = Object.defineProperty;
|
|
17033
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17034
|
+
var __publicField$A = (obj, key, value) => __defNormalProp$P(obj, key + "" , value);
|
|
17021
17035
|
class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
17022
17036
|
constructor(imageUrl, bounds, options) {
|
|
17023
17037
|
super(imageUrl, bounds, options);
|
|
17024
|
-
__publicField$
|
|
17038
|
+
__publicField$A(this, "_aborter");
|
|
17025
17039
|
}
|
|
17026
17040
|
cancelLoad() {
|
|
17027
17041
|
if (this._aborter) {
|
|
@@ -17050,13 +17064,14 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
|
17050
17064
|
}
|
|
17051
17065
|
}
|
|
17052
17066
|
|
|
17053
|
-
var __defProp$
|
|
17054
|
-
var __defNormalProp$
|
|
17055
|
-
var __publicField$
|
|
17067
|
+
var __defProp$O = Object.defineProperty;
|
|
17068
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17069
|
+
var __publicField$z = (obj, key, value) => __defNormalProp$O(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17056
17070
|
class ImageLayer extends leafletSrcExports.Layer {
|
|
17057
17071
|
constructor(url, options) {
|
|
17072
|
+
var _a;
|
|
17058
17073
|
super(options);
|
|
17059
|
-
__publicField$
|
|
17074
|
+
__publicField$z(this, "defaultWmsParams", {
|
|
17060
17075
|
service: "WMS",
|
|
17061
17076
|
request: "GetMap",
|
|
17062
17077
|
version: "1.1.1",
|
|
@@ -17065,7 +17080,7 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
17065
17080
|
format: "image/jpeg",
|
|
17066
17081
|
transparent: false
|
|
17067
17082
|
});
|
|
17068
|
-
__publicField$
|
|
17083
|
+
__publicField$z(this, "options", {
|
|
17069
17084
|
crs: null,
|
|
17070
17085
|
uppercase: false,
|
|
17071
17086
|
attribution: "",
|
|
@@ -17078,11 +17093,11 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
17078
17093
|
viewPortBuffer: 0,
|
|
17079
17094
|
setViewDelay: 100
|
|
17080
17095
|
});
|
|
17081
|
-
__publicField$
|
|
17082
|
-
__publicField$
|
|
17083
|
-
__publicField$
|
|
17084
|
-
__publicField$
|
|
17085
|
-
__publicField$
|
|
17096
|
+
__publicField$z(this, "wmsParams");
|
|
17097
|
+
__publicField$z(this, "_url");
|
|
17098
|
+
__publicField$z(this, "_currentUrl");
|
|
17099
|
+
__publicField$z(this, "_currentOverlay");
|
|
17100
|
+
__publicField$z(this, "_loadedOverlay");
|
|
17086
17101
|
this._url = url;
|
|
17087
17102
|
const params = {};
|
|
17088
17103
|
const opts = {};
|
|
@@ -17095,7 +17110,11 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
17095
17110
|
}
|
|
17096
17111
|
}
|
|
17097
17112
|
leafletSrcExports.Util.setOptions(this, opts);
|
|
17098
|
-
this.wmsParams = leafletSrcExports.Util.extend(
|
|
17113
|
+
this.wmsParams = leafletSrcExports.Util.extend(
|
|
17114
|
+
{},
|
|
17115
|
+
this.defaultWmsParams,
|
|
17116
|
+
(_a = params == null ? void 0 : params.params) != null ? _a : {}
|
|
17117
|
+
);
|
|
17099
17118
|
}
|
|
17100
17119
|
setParams(params) {
|
|
17101
17120
|
leafletSrcExports.Util.extend(this.wmsParams, params);
|
|
@@ -17242,27 +17261,27 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
17242
17261
|
}
|
|
17243
17262
|
}
|
|
17244
17263
|
|
|
17245
|
-
var __defProp$
|
|
17264
|
+
var __defProp$N = Object.defineProperty;
|
|
17246
17265
|
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
17247
17266
|
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
17248
17267
|
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
17249
|
-
var __defNormalProp$
|
|
17268
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17250
17269
|
var __spreadValues$x = (a, b) => {
|
|
17251
17270
|
for (var prop in b || (b = {}))
|
|
17252
17271
|
if (__hasOwnProp$y.call(b, prop))
|
|
17253
|
-
__defNormalProp$
|
|
17272
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
17254
17273
|
if (__getOwnPropSymbols$y)
|
|
17255
17274
|
for (var prop of __getOwnPropSymbols$y(b)) {
|
|
17256
17275
|
if (__propIsEnum$y.call(b, prop))
|
|
17257
|
-
__defNormalProp$
|
|
17276
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
17258
17277
|
}
|
|
17259
17278
|
return a;
|
|
17260
17279
|
};
|
|
17261
|
-
var __publicField$
|
|
17280
|
+
var __publicField$y = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17262
17281
|
class ImageAdapter extends BaseAdapter {
|
|
17263
17282
|
constructor() {
|
|
17264
17283
|
super(...arguments);
|
|
17265
|
-
__publicField$
|
|
17284
|
+
__publicField$y(this, "layer");
|
|
17266
17285
|
}
|
|
17267
17286
|
addLayer(options) {
|
|
17268
17287
|
const url = options && options.url;
|
|
@@ -17284,8 +17303,15 @@ class ImageAdapter extends BaseAdapter {
|
|
|
17284
17303
|
return this.layer;
|
|
17285
17304
|
}
|
|
17286
17305
|
}
|
|
17306
|
+
updateLayer(options) {
|
|
17307
|
+
if (this.layer) {
|
|
17308
|
+
const params = (options == null ? void 0 : options.params) || {};
|
|
17309
|
+
leafletSrcExports.Util.extend(this.layer.wmsParams, params);
|
|
17310
|
+
this.layer.update();
|
|
17311
|
+
}
|
|
17312
|
+
}
|
|
17287
17313
|
}
|
|
17288
|
-
__publicField$
|
|
17314
|
+
__publicField$y(ImageAdapter, "queue", imageQueue);
|
|
17289
17315
|
|
|
17290
17316
|
function makeRemote(Base) {
|
|
17291
17317
|
return class RemoteTileLayer extends Base {
|
|
@@ -17347,26 +17373,26 @@ class TileLayerBase extends leafletSrcExports.TileLayer {
|
|
|
17347
17373
|
}
|
|
17348
17374
|
const TileLayer = makeRemote(TileLayerBase);
|
|
17349
17375
|
|
|
17350
|
-
var __defProp$
|
|
17351
|
-
var __defProps$
|
|
17352
|
-
var __getOwnPropDescs$
|
|
17376
|
+
var __defProp$M = Object.defineProperty;
|
|
17377
|
+
var __defProps$k = Object.defineProperties;
|
|
17378
|
+
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
17353
17379
|
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
17354
17380
|
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
17355
17381
|
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
17356
|
-
var __defNormalProp$
|
|
17382
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17357
17383
|
var __spreadValues$w = (a, b) => {
|
|
17358
17384
|
for (var prop in b || (b = {}))
|
|
17359
17385
|
if (__hasOwnProp$x.call(b, prop))
|
|
17360
|
-
__defNormalProp$
|
|
17386
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
17361
17387
|
if (__getOwnPropSymbols$x)
|
|
17362
17388
|
for (var prop of __getOwnPropSymbols$x(b)) {
|
|
17363
17389
|
if (__propIsEnum$x.call(b, prop))
|
|
17364
|
-
__defNormalProp$
|
|
17390
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
17365
17391
|
}
|
|
17366
17392
|
return a;
|
|
17367
17393
|
};
|
|
17368
|
-
var __spreadProps$
|
|
17369
|
-
var __objRest$
|
|
17394
|
+
var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
|
|
17395
|
+
var __objRest$5 = (source, exclude) => {
|
|
17370
17396
|
var target = {};
|
|
17371
17397
|
for (var prop in source)
|
|
17372
17398
|
if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -17382,7 +17408,7 @@ class TileAdapter extends BaseAdapter {
|
|
|
17382
17408
|
addLayer(options) {
|
|
17383
17409
|
this.options = Object.assign(this.options, options);
|
|
17384
17410
|
if (options) {
|
|
17385
|
-
const _a = options, { url } = _a, opt = __objRest$
|
|
17411
|
+
const _a = options, { url } = _a, opt = __objRest$5(_a, ["url"]);
|
|
17386
17412
|
if (url) {
|
|
17387
17413
|
const tileLayerOptions = __spreadValues$w({
|
|
17388
17414
|
pane: this.pane,
|
|
@@ -17395,7 +17421,7 @@ class TileAdapter extends BaseAdapter {
|
|
|
17395
17421
|
}
|
|
17396
17422
|
let layer;
|
|
17397
17423
|
if (opt.headers || opt.withCredentials) {
|
|
17398
|
-
layer = new TileLayer(url, __spreadProps$
|
|
17424
|
+
layer = new TileLayer(url, __spreadProps$k(__spreadValues$w({}, tileLayerOptions), {
|
|
17399
17425
|
headers: opt.headers,
|
|
17400
17426
|
withCredentials: opt.withCredentials,
|
|
17401
17427
|
setViewDelay: opt.setViewDelay
|
|
@@ -17407,41 +17433,40 @@ class TileAdapter extends BaseAdapter {
|
|
|
17407
17433
|
}
|
|
17408
17434
|
}
|
|
17409
17435
|
}
|
|
17410
|
-
updateLayer() {
|
|
17436
|
+
updateLayer(options) {
|
|
17411
17437
|
if (this.layer) {
|
|
17412
17438
|
const currentUrl = this.layer._url;
|
|
17413
|
-
|
|
17414
|
-
|
|
17415
|
-
|
|
17416
|
-
this.layer.setUrl(newUrl);
|
|
17439
|
+
if (options == null ? void 0 : options.params) {
|
|
17440
|
+
this.layer.setUrl(updateUrlParams(currentUrl, options.params));
|
|
17441
|
+
}
|
|
17417
17442
|
this.layer.redraw();
|
|
17418
17443
|
}
|
|
17419
17444
|
}
|
|
17420
17445
|
}
|
|
17421
17446
|
|
|
17422
|
-
var __defProp$
|
|
17423
|
-
var __defProps$
|
|
17424
|
-
var __getOwnPropDescs$
|
|
17447
|
+
var __defProp$L = Object.defineProperty;
|
|
17448
|
+
var __defProps$j = Object.defineProperties;
|
|
17449
|
+
var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
|
|
17425
17450
|
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
17426
17451
|
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
17427
17452
|
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
17428
|
-
var __defNormalProp$
|
|
17453
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17429
17454
|
var __spreadValues$v = (a, b) => {
|
|
17430
17455
|
for (var prop in b || (b = {}))
|
|
17431
17456
|
if (__hasOwnProp$w.call(b, prop))
|
|
17432
|
-
__defNormalProp$
|
|
17457
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
17433
17458
|
if (__getOwnPropSymbols$w)
|
|
17434
17459
|
for (var prop of __getOwnPropSymbols$w(b)) {
|
|
17435
17460
|
if (__propIsEnum$w.call(b, prop))
|
|
17436
|
-
__defNormalProp$
|
|
17461
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
17437
17462
|
}
|
|
17438
17463
|
return a;
|
|
17439
17464
|
};
|
|
17440
|
-
var __spreadProps$
|
|
17465
|
+
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
|
|
17441
17466
|
class OsmAdapter extends TileAdapter {
|
|
17442
17467
|
addLayer(options) {
|
|
17443
17468
|
const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
|
17444
|
-
return super.addLayer(__spreadProps$
|
|
17469
|
+
return super.addLayer(__spreadProps$j(__spreadValues$v({
|
|
17445
17470
|
name: "OpenStreetMap",
|
|
17446
17471
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
|
17447
17472
|
}, options), {
|
|
@@ -17457,26 +17482,26 @@ class WmsLayerBase extends leafletSrcExports.TileLayer.WMS {
|
|
|
17457
17482
|
}
|
|
17458
17483
|
const WmsLayer = makeRemote(WmsLayerBase);
|
|
17459
17484
|
|
|
17460
|
-
var __defProp$
|
|
17461
|
-
var __defProps$
|
|
17462
|
-
var __getOwnPropDescs$
|
|
17485
|
+
var __defProp$K = Object.defineProperty;
|
|
17486
|
+
var __defProps$i = Object.defineProperties;
|
|
17487
|
+
var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
|
|
17463
17488
|
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
17464
17489
|
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
17465
17490
|
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
17466
|
-
var __defNormalProp$
|
|
17491
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17467
17492
|
var __spreadValues$u = (a, b) => {
|
|
17468
17493
|
for (var prop in b || (b = {}))
|
|
17469
17494
|
if (__hasOwnProp$v.call(b, prop))
|
|
17470
|
-
__defNormalProp$
|
|
17495
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
17471
17496
|
if (__getOwnPropSymbols$v)
|
|
17472
17497
|
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
17473
17498
|
if (__propIsEnum$v.call(b, prop))
|
|
17474
|
-
__defNormalProp$
|
|
17499
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
17475
17500
|
}
|
|
17476
17501
|
return a;
|
|
17477
17502
|
};
|
|
17478
|
-
var __spreadProps$
|
|
17479
|
-
var __objRest$
|
|
17503
|
+
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
17504
|
+
var __objRest$4 = (source, exclude) => {
|
|
17480
17505
|
var target = {};
|
|
17481
17506
|
for (var prop in source)
|
|
17482
17507
|
if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -17491,7 +17516,7 @@ var __objRest$3 = (source, exclude) => {
|
|
|
17491
17516
|
class WmsAdapter extends BaseAdapter {
|
|
17492
17517
|
addLayer(options) {
|
|
17493
17518
|
Object.assign(this.options, options);
|
|
17494
|
-
const _a = options, { url } = _a, opt = __objRest$
|
|
17519
|
+
const _a = options, { url } = _a, opt = __objRest$4(_a, ["url"]);
|
|
17495
17520
|
if (url) {
|
|
17496
17521
|
const layerOptions = __spreadValues$u({
|
|
17497
17522
|
pane: this.pane,
|
|
@@ -17504,7 +17529,7 @@ class WmsAdapter extends BaseAdapter {
|
|
|
17504
17529
|
}, options.nativeOptions);
|
|
17505
17530
|
let layer;
|
|
17506
17531
|
if (opt.headers || opt.withCredentials) {
|
|
17507
|
-
layer = new WmsLayer(url, __spreadProps$
|
|
17532
|
+
layer = new WmsLayer(url, __spreadProps$i(__spreadValues$u({}, layerOptions), {
|
|
17508
17533
|
headers: opt.headers,
|
|
17509
17534
|
withCredentials: opt.withCredentials
|
|
17510
17535
|
}));
|
|
@@ -17524,33 +17549,33 @@ function arrayToBoundsExpression(bounds) {
|
|
|
17524
17549
|
];
|
|
17525
17550
|
}
|
|
17526
17551
|
|
|
17527
|
-
var __defProp$
|
|
17552
|
+
var __defProp$J = Object.defineProperty;
|
|
17528
17553
|
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
17529
17554
|
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
17530
17555
|
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
17531
|
-
var __defNormalProp$
|
|
17556
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17532
17557
|
var __spreadValues$t = (a, b) => {
|
|
17533
17558
|
for (var prop in b || (b = {}))
|
|
17534
17559
|
if (__hasOwnProp$u.call(b, prop))
|
|
17535
|
-
__defNormalProp$
|
|
17560
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
17536
17561
|
if (__getOwnPropSymbols$u)
|
|
17537
17562
|
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
17538
17563
|
if (__propIsEnum$u.call(b, prop))
|
|
17539
|
-
__defNormalProp$
|
|
17564
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
17540
17565
|
}
|
|
17541
17566
|
return a;
|
|
17542
17567
|
};
|
|
17543
|
-
var __publicField$
|
|
17568
|
+
var __publicField$x = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17544
17569
|
const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
17545
17570
|
constructor() {
|
|
17546
|
-
__publicField$
|
|
17547
|
-
__publicField$
|
|
17548
|
-
__publicField$
|
|
17549
|
-
__publicField$
|
|
17550
|
-
__publicField$
|
|
17551
|
-
__publicField$
|
|
17552
|
-
__publicField$
|
|
17553
|
-
__publicField$
|
|
17571
|
+
__publicField$x(this, "options", { target: "map" });
|
|
17572
|
+
__publicField$x(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
|
|
17573
|
+
__publicField$x(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
|
|
17574
|
+
__publicField$x(this, "emitter", new EventEmitter());
|
|
17575
|
+
__publicField$x(this, "map");
|
|
17576
|
+
__publicField$x(this, "_resizeObserver");
|
|
17577
|
+
__publicField$x(this, "_unselectCb", []);
|
|
17578
|
+
__publicField$x(this, "_universalEvents", [
|
|
17554
17579
|
"move",
|
|
17555
17580
|
"zoom",
|
|
17556
17581
|
"zoomend",
|
|
@@ -17558,7 +17583,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
17558
17583
|
"moveend",
|
|
17559
17584
|
"movestart"
|
|
17560
17585
|
]);
|
|
17561
|
-
__publicField$
|
|
17586
|
+
__publicField$x(this, "_positionEvents", [
|
|
17562
17587
|
"mousemove",
|
|
17563
17588
|
"mouseout",
|
|
17564
17589
|
"mouseover"
|
|
@@ -17858,7 +17883,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
17858
17883
|
}
|
|
17859
17884
|
}
|
|
17860
17885
|
};
|
|
17861
|
-
__publicField$
|
|
17886
|
+
__publicField$x(_LeafletMapAdapter, "layerAdapters", {
|
|
17862
17887
|
GEOJSON: GeoJsonAdapter,
|
|
17863
17888
|
IMAGE: ImageAdapter,
|
|
17864
17889
|
TILE: TileAdapter,
|
|
@@ -17866,11 +17891,11 @@ __publicField$w(_LeafletMapAdapter, "layerAdapters", {
|
|
|
17866
17891
|
// // MVT: MvtAdapter,
|
|
17867
17892
|
OSM: OsmAdapter
|
|
17868
17893
|
});
|
|
17869
|
-
__publicField$
|
|
17894
|
+
__publicField$x(_LeafletMapAdapter, "controlAdapters", {
|
|
17870
17895
|
ZOOM: leafletSrcExports.Control.Zoom,
|
|
17871
17896
|
ATTRIBUTION: AttributionControl
|
|
17872
17897
|
});
|
|
17873
|
-
__publicField$
|
|
17898
|
+
__publicField$x(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
|
|
17874
17899
|
let LeafletMapAdapter = _LeafletMapAdapter;
|
|
17875
17900
|
|
|
17876
17901
|
const svgPath = {
|
|
@@ -17945,12 +17970,12 @@ function getIcon(opt = {}) {
|
|
|
17945
17970
|
};
|
|
17946
17971
|
}
|
|
17947
17972
|
|
|
17948
|
-
var __defProp$
|
|
17949
|
-
var __defNormalProp$
|
|
17950
|
-
var __publicField$
|
|
17973
|
+
var __defProp$I = Object.defineProperty;
|
|
17974
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17975
|
+
var __publicField$w = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17951
17976
|
const _Cache = class _Cache {
|
|
17952
17977
|
constructor(options = {}) {
|
|
17953
|
-
__publicField$
|
|
17978
|
+
__publicField$w(this, "cache", []);
|
|
17954
17979
|
var _a;
|
|
17955
17980
|
const namespace = (_a = options.namespace) != null ? _a : "default";
|
|
17956
17981
|
if (_Cache.instance[namespace]) {
|
|
@@ -18056,12 +18081,12 @@ const _Cache = class _Cache {
|
|
|
18056
18081
|
return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
|
|
18057
18082
|
}
|
|
18058
18083
|
};
|
|
18059
|
-
__publicField$
|
|
18084
|
+
__publicField$w(_Cache, "instance", {});
|
|
18060
18085
|
let Cache = _Cache;
|
|
18061
18086
|
|
|
18062
18087
|
var pkg = {
|
|
18063
18088
|
name: "@nextgis/ngw-connector",
|
|
18064
|
-
version: "3.0.0-alpha.
|
|
18089
|
+
version: "3.0.0-alpha.4",
|
|
18065
18090
|
_priority: 12,
|
|
18066
18091
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
18067
18092
|
main: "index.js",
|
|
@@ -18070,9 +18095,9 @@ var pkg = {
|
|
|
18070
18095
|
jsdelivr: "lib/ngw-connector.global.prod.js",
|
|
18071
18096
|
types: "lib/index.d.ts",
|
|
18072
18097
|
dependencies: {
|
|
18073
|
-
"@nextgis/cache": "^3.0.0-alpha.
|
|
18098
|
+
"@nextgis/cache": "^3.0.0-alpha.4",
|
|
18074
18099
|
"@nextgis/cancelable-promise": "^3.0.0-alpha.3",
|
|
18075
|
-
"@nextgis/utils": "^3.0.0-alpha.
|
|
18100
|
+
"@nextgis/utils": "^3.0.0-alpha.4",
|
|
18076
18101
|
"@types/events": "^3.0.0",
|
|
18077
18102
|
events: "*",
|
|
18078
18103
|
"form-data": "^4.0.0"
|
|
@@ -18115,33 +18140,33 @@ var pkg = {
|
|
|
18115
18140
|
gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
|
|
18116
18141
|
};
|
|
18117
18142
|
|
|
18118
|
-
var __defProp$
|
|
18119
|
-
var __defNormalProp$
|
|
18120
|
-
var __publicField$
|
|
18143
|
+
var __defProp$H = Object.defineProperty;
|
|
18144
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18145
|
+
var __publicField$v = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18121
18146
|
class NgwError extends Error {
|
|
18122
18147
|
constructor(er) {
|
|
18123
18148
|
super();
|
|
18124
|
-
__publicField$
|
|
18125
|
-
__publicField$
|
|
18126
|
-
__publicField$
|
|
18127
|
-
__publicField$
|
|
18128
|
-
__publicField$
|
|
18129
|
-
__publicField$
|
|
18130
|
-
__publicField$
|
|
18131
|
-
__publicField$
|
|
18149
|
+
__publicField$v(this, "name", "NgwError");
|
|
18150
|
+
__publicField$v(this, "title");
|
|
18151
|
+
__publicField$v(this, "message");
|
|
18152
|
+
__publicField$v(this, "detail");
|
|
18153
|
+
__publicField$v(this, "exception");
|
|
18154
|
+
__publicField$v(this, "status_code");
|
|
18155
|
+
__publicField$v(this, "data");
|
|
18156
|
+
__publicField$v(this, "guru_meditation");
|
|
18132
18157
|
Object.assign(this, er);
|
|
18133
18158
|
Object.setPrototypeOf(this, NgwError.prototype);
|
|
18134
18159
|
}
|
|
18135
18160
|
}
|
|
18136
18161
|
|
|
18137
|
-
var __defProp$
|
|
18138
|
-
var __defNormalProp$
|
|
18139
|
-
var __publicField$
|
|
18162
|
+
var __defProp$G = Object.defineProperty;
|
|
18163
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18164
|
+
var __publicField$u = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18140
18165
|
class ResourceNotFoundError extends NgwError {
|
|
18141
18166
|
constructor(obj) {
|
|
18142
18167
|
super(obj);
|
|
18143
|
-
__publicField$
|
|
18144
|
-
__publicField$
|
|
18168
|
+
__publicField$u(this, "name", "ResourceNotFoundError");
|
|
18169
|
+
__publicField$u(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
|
|
18145
18170
|
Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
|
|
18146
18171
|
}
|
|
18147
18172
|
}
|
|
@@ -18175,23 +18200,23 @@ function resourceToQuery(resource, prefix = "") {
|
|
|
18175
18200
|
return query;
|
|
18176
18201
|
}
|
|
18177
18202
|
|
|
18178
|
-
var __defProp$
|
|
18203
|
+
var __defProp$F = Object.defineProperty;
|
|
18179
18204
|
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
18180
18205
|
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
18181
18206
|
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
18182
|
-
var __defNormalProp$
|
|
18207
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18183
18208
|
var __spreadValues$s = (a, b) => {
|
|
18184
18209
|
for (var prop in b || (b = {}))
|
|
18185
18210
|
if (__hasOwnProp$t.call(b, prop))
|
|
18186
|
-
__defNormalProp$
|
|
18211
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
18187
18212
|
if (__getOwnPropSymbols$t)
|
|
18188
18213
|
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
18189
18214
|
if (__propIsEnum$t.call(b, prop))
|
|
18190
|
-
__defNormalProp$
|
|
18215
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
18191
18216
|
}
|
|
18192
18217
|
return a;
|
|
18193
18218
|
};
|
|
18194
|
-
var __publicField$
|
|
18219
|
+
var __publicField$t = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18195
18220
|
var __async$r = (__this, __arguments, generator) => {
|
|
18196
18221
|
return new Promise((resolve, reject) => {
|
|
18197
18222
|
var fulfilled = (value) => {
|
|
@@ -18217,8 +18242,8 @@ class ResourcesControl {
|
|
|
18217
18242
|
connector,
|
|
18218
18243
|
cacheId
|
|
18219
18244
|
}) {
|
|
18220
|
-
__publicField$
|
|
18221
|
-
__publicField$
|
|
18245
|
+
__publicField$t(this, "cache");
|
|
18246
|
+
__publicField$t(this, "connector");
|
|
18222
18247
|
this.connector = connector;
|
|
18223
18248
|
this.cache = new Cache({ namespace: cacheId });
|
|
18224
18249
|
}
|
|
@@ -18471,14 +18496,14 @@ class AbortError extends Error {
|
|
|
18471
18496
|
}
|
|
18472
18497
|
}
|
|
18473
18498
|
|
|
18474
|
-
var __defProp$
|
|
18475
|
-
var __defNormalProp$
|
|
18476
|
-
var __publicField$
|
|
18499
|
+
var __defProp$E = Object.defineProperty;
|
|
18500
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18501
|
+
var __publicField$s = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18477
18502
|
class InsufficientPermissionsError extends NgwError {
|
|
18478
18503
|
constructor(obj) {
|
|
18479
18504
|
super(obj);
|
|
18480
|
-
__publicField$
|
|
18481
|
-
__publicField$
|
|
18505
|
+
__publicField$s(this, "name", "InsufficientPermissionsError");
|
|
18506
|
+
__publicField$s(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
|
|
18482
18507
|
Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
|
|
18483
18508
|
}
|
|
18484
18509
|
}
|
|
@@ -18496,19 +18521,19 @@ function template(str, data) {
|
|
|
18496
18521
|
});
|
|
18497
18522
|
}
|
|
18498
18523
|
|
|
18499
|
-
var __defProp$
|
|
18524
|
+
var __defProp$D = Object.defineProperty;
|
|
18500
18525
|
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
18501
18526
|
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
18502
18527
|
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
18503
|
-
var __defNormalProp$
|
|
18528
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18504
18529
|
var __spreadValues$r = (a, b) => {
|
|
18505
18530
|
for (var prop in b || (b = {}))
|
|
18506
18531
|
if (__hasOwnProp$s.call(b, prop))
|
|
18507
|
-
__defNormalProp$
|
|
18532
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
18508
18533
|
if (__getOwnPropSymbols$s)
|
|
18509
18534
|
for (var prop of __getOwnPropSymbols$s(b)) {
|
|
18510
18535
|
if (__propIsEnum$s.call(b, prop))
|
|
18511
|
-
__defNormalProp$
|
|
18536
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
18512
18537
|
}
|
|
18513
18538
|
return a;
|
|
18514
18539
|
};
|
|
@@ -18583,13 +18608,13 @@ function apiRequest(opt) {
|
|
|
18583
18608
|
});
|
|
18584
18609
|
}
|
|
18585
18610
|
|
|
18586
|
-
var __defProp$
|
|
18587
|
-
var __defNormalProp$
|
|
18588
|
-
var __publicField$
|
|
18611
|
+
var __defProp$C = Object.defineProperty;
|
|
18612
|
+
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18613
|
+
var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, key + "" , value);
|
|
18589
18614
|
class NetworkError extends Error {
|
|
18590
18615
|
constructor(url) {
|
|
18591
18616
|
super();
|
|
18592
|
-
__publicField$
|
|
18617
|
+
__publicField$r(this, "name", "NetworkError");
|
|
18593
18618
|
Object.setPrototypeOf(this, NetworkError.prototype);
|
|
18594
18619
|
this.message = `Unable to request ${url}.
|
|
18595
18620
|
Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
|
|
@@ -18678,26 +18703,26 @@ let loadData;
|
|
|
18678
18703
|
};
|
|
18679
18704
|
}
|
|
18680
18705
|
|
|
18681
|
-
var __defProp$
|
|
18682
|
-
var __defProps$
|
|
18683
|
-
var __getOwnPropDescs$
|
|
18706
|
+
var __defProp$B = Object.defineProperty;
|
|
18707
|
+
var __defProps$h = Object.defineProperties;
|
|
18708
|
+
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
18684
18709
|
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
18685
18710
|
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
18686
18711
|
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
18687
|
-
var __defNormalProp$
|
|
18712
|
+
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18688
18713
|
var __spreadValues$q = (a, b) => {
|
|
18689
18714
|
for (var prop in b || (b = {}))
|
|
18690
18715
|
if (__hasOwnProp$r.call(b, prop))
|
|
18691
|
-
__defNormalProp$
|
|
18716
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
18692
18717
|
if (__getOwnPropSymbols$r)
|
|
18693
18718
|
for (var prop of __getOwnPropSymbols$r(b)) {
|
|
18694
18719
|
if (__propIsEnum$r.call(b, prop))
|
|
18695
|
-
__defNormalProp$
|
|
18720
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
18696
18721
|
}
|
|
18697
18722
|
return a;
|
|
18698
18723
|
};
|
|
18699
|
-
var __spreadProps$
|
|
18700
|
-
var __objRest$
|
|
18724
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
18725
|
+
var __objRest$3 = (source, exclude) => {
|
|
18701
18726
|
var target = {};
|
|
18702
18727
|
for (var prop in source)
|
|
18703
18728
|
if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -18709,7 +18734,7 @@ var __objRest$2 = (source, exclude) => {
|
|
|
18709
18734
|
}
|
|
18710
18735
|
return target;
|
|
18711
18736
|
};
|
|
18712
|
-
var __publicField$
|
|
18737
|
+
var __publicField$q = (obj, key, value) => __defNormalProp$B(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18713
18738
|
var __async$p = (__this, __arguments, generator) => {
|
|
18714
18739
|
return new Promise((resolve, reject) => {
|
|
18715
18740
|
var fulfilled = (value) => {
|
|
@@ -18735,16 +18760,16 @@ let REQUEST_ID = 0;
|
|
|
18735
18760
|
class NgwConnector {
|
|
18736
18761
|
constructor(options) {
|
|
18737
18762
|
this.options = options;
|
|
18738
|
-
__publicField$
|
|
18739
|
-
__publicField$
|
|
18740
|
-
__publicField$
|
|
18741
|
-
__publicField$
|
|
18742
|
-
__publicField$
|
|
18743
|
-
__publicField$
|
|
18744
|
-
__publicField$
|
|
18745
|
-
__publicField$
|
|
18746
|
-
__publicField$
|
|
18747
|
-
__publicField$
|
|
18763
|
+
__publicField$q(this, "id", ID$2++);
|
|
18764
|
+
__publicField$q(this, "emitter", new EventEmitter());
|
|
18765
|
+
__publicField$q(this, "user");
|
|
18766
|
+
__publicField$q(this, "resources");
|
|
18767
|
+
__publicField$q(this, "cache");
|
|
18768
|
+
__publicField$q(this, "withCredentials");
|
|
18769
|
+
__publicField$q(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
|
|
18770
|
+
__publicField$q(this, "routeStr", "/api/component/pyramid/route");
|
|
18771
|
+
__publicField$q(this, "activeRequests", {});
|
|
18772
|
+
__publicField$q(this, "requestTransform");
|
|
18748
18773
|
const exist = findConnector(options);
|
|
18749
18774
|
this.cache = new Cache({ namespace: options.cacheId });
|
|
18750
18775
|
if (exist) {
|
|
@@ -19028,7 +19053,7 @@ class NgwConnector {
|
|
|
19028
19053
|
throw new Error("Empty `url` not allowed");
|
|
19029
19054
|
}
|
|
19030
19055
|
if (params) {
|
|
19031
|
-
const _a = params, restParams = __objRest$
|
|
19056
|
+
const _a = params, restParams = __objRest$3(_a, ["paramList"]);
|
|
19032
19057
|
url = template(url, restParams);
|
|
19033
19058
|
}
|
|
19034
19059
|
url = encodeURI(fixUrlStr(url));
|
|
@@ -19064,7 +19089,7 @@ class NgwConnector {
|
|
|
19064
19089
|
}
|
|
19065
19090
|
});
|
|
19066
19091
|
if (cache && method === "GET") {
|
|
19067
|
-
const cacheOptions = cacheProps ? cacheProps : __spreadProps$
|
|
19092
|
+
const cacheOptions = cacheProps ? cacheProps : __spreadProps$h(__spreadValues$q({}, objectRemoveEmpty({
|
|
19068
19093
|
headers,
|
|
19069
19094
|
withCredentials,
|
|
19070
19095
|
responseType,
|
|
@@ -19226,30 +19251,30 @@ class NgwConnector {
|
|
|
19226
19251
|
return er;
|
|
19227
19252
|
}
|
|
19228
19253
|
}
|
|
19229
|
-
__publicField$
|
|
19254
|
+
__publicField$q(NgwConnector, "errors", {
|
|
19230
19255
|
NgwError,
|
|
19231
19256
|
ResourceNotFoundError
|
|
19232
19257
|
});
|
|
19233
19258
|
|
|
19234
|
-
var __defProp$
|
|
19235
|
-
var __defProps$
|
|
19236
|
-
var __getOwnPropDescs$
|
|
19259
|
+
var __defProp$A = Object.defineProperty;
|
|
19260
|
+
var __defProps$g = Object.defineProperties;
|
|
19261
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
19237
19262
|
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
19238
19263
|
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
19239
19264
|
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
19240
|
-
var __defNormalProp$
|
|
19265
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19241
19266
|
var __spreadValues$p = (a, b) => {
|
|
19242
19267
|
for (var prop in b || (b = {}))
|
|
19243
19268
|
if (__hasOwnProp$q.call(b, prop))
|
|
19244
|
-
__defNormalProp$
|
|
19269
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
19245
19270
|
if (__getOwnPropSymbols$q)
|
|
19246
19271
|
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
19247
19272
|
if (__propIsEnum$q.call(b, prop))
|
|
19248
|
-
__defNormalProp$
|
|
19273
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
19249
19274
|
}
|
|
19250
19275
|
return a;
|
|
19251
19276
|
};
|
|
19252
|
-
var __spreadProps$
|
|
19277
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
19253
19278
|
var __async$o = (__this, __arguments, generator) => {
|
|
19254
19279
|
return new Promise((resolve, reject) => {
|
|
19255
19280
|
var fulfilled = (value) => {
|
|
@@ -19354,13 +19379,13 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
19354
19379
|
for (const f of filters_) {
|
|
19355
19380
|
if (isPropertyFilter(f)) {
|
|
19356
19381
|
_queries.push(
|
|
19357
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
19382
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19358
19383
|
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
19359
19384
|
}))
|
|
19360
19385
|
);
|
|
19361
19386
|
} else {
|
|
19362
19387
|
getQueries(
|
|
19363
|
-
__spreadProps$
|
|
19388
|
+
__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19364
19389
|
filters: f
|
|
19365
19390
|
}),
|
|
19366
19391
|
_queries,
|
|
@@ -19381,7 +19406,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
19381
19406
|
if (propertiesFilterList.length) {
|
|
19382
19407
|
for (const x of propertiesFilterList) {
|
|
19383
19408
|
getQueries(
|
|
19384
|
-
__spreadProps$
|
|
19409
|
+
__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19385
19410
|
filters: x
|
|
19386
19411
|
}),
|
|
19387
19412
|
_queries,
|
|
@@ -19390,7 +19415,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
19390
19415
|
}
|
|
19391
19416
|
} else {
|
|
19392
19417
|
_queries.push(
|
|
19393
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
19418
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19394
19419
|
paramList: [..._parentAllParams, ...paramList, ...filters2]
|
|
19395
19420
|
}))
|
|
19396
19421
|
);
|
|
@@ -19455,25 +19480,25 @@ function fetchNgwLayerItemsRequest(options) {
|
|
|
19455
19480
|
);
|
|
19456
19481
|
}
|
|
19457
19482
|
|
|
19458
|
-
var __defProp$
|
|
19459
|
-
var __defProps$
|
|
19460
|
-
var __getOwnPropDescs$
|
|
19483
|
+
var __defProp$z = Object.defineProperty;
|
|
19484
|
+
var __defProps$f = Object.defineProperties;
|
|
19485
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
19461
19486
|
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
19462
19487
|
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
19463
19488
|
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
19464
|
-
var __defNormalProp$
|
|
19489
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19465
19490
|
var __spreadValues$o = (a, b) => {
|
|
19466
19491
|
for (var prop in b || (b = {}))
|
|
19467
19492
|
if (__hasOwnProp$p.call(b, prop))
|
|
19468
|
-
__defNormalProp$
|
|
19493
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
19469
19494
|
if (__getOwnPropSymbols$p)
|
|
19470
19495
|
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
19471
19496
|
if (__propIsEnum$p.call(b, prop))
|
|
19472
|
-
__defNormalProp$
|
|
19497
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
19473
19498
|
}
|
|
19474
19499
|
return a;
|
|
19475
19500
|
};
|
|
19476
|
-
var __spreadProps$
|
|
19501
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
19477
19502
|
var __async$n = (__this, __arguments, generator) => {
|
|
19478
19503
|
return new Promise((resolve, reject) => {
|
|
19479
19504
|
var fulfilled = (value) => {
|
|
@@ -19511,45 +19536,45 @@ function fetchNgwLayerItem(options) {
|
|
|
19511
19536
|
if (resp.geom) {
|
|
19512
19537
|
return createGeoJsonFeature(resp);
|
|
19513
19538
|
} else {
|
|
19514
|
-
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$
|
|
19539
|
+
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$f(__spreadValues$o({}, options), {
|
|
19515
19540
|
geom: true,
|
|
19516
19541
|
fields: null,
|
|
19517
19542
|
extensions: null
|
|
19518
19543
|
}));
|
|
19519
19544
|
const geom = onlyGeomItem.geom;
|
|
19520
|
-
return createGeoJsonFeature(__spreadProps$
|
|
19545
|
+
return createGeoJsonFeature(__spreadProps$f(__spreadValues$o({}, resp), { geom }));
|
|
19521
19546
|
}
|
|
19522
19547
|
});
|
|
19523
|
-
return __spreadProps$
|
|
19548
|
+
return __spreadProps$f(__spreadValues$o({}, resp), {
|
|
19524
19549
|
toGeojson
|
|
19525
19550
|
});
|
|
19526
19551
|
});
|
|
19527
19552
|
}
|
|
19528
19553
|
|
|
19529
|
-
var __defProp$
|
|
19554
|
+
var __defProp$y = Object.defineProperty;
|
|
19530
19555
|
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
19531
19556
|
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
19532
19557
|
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
19533
|
-
var __defNormalProp$
|
|
19558
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19534
19559
|
var __spreadValues$n = (a, b) => {
|
|
19535
19560
|
for (var prop in b || (b = {}))
|
|
19536
19561
|
if (__hasOwnProp$o.call(b, prop))
|
|
19537
|
-
__defNormalProp$
|
|
19562
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
19538
19563
|
if (__getOwnPropSymbols$o)
|
|
19539
19564
|
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
19540
19565
|
if (__propIsEnum$o.call(b, prop))
|
|
19541
|
-
__defNormalProp$
|
|
19566
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
19542
19567
|
}
|
|
19543
19568
|
return a;
|
|
19544
19569
|
};
|
|
19545
|
-
var __publicField$
|
|
19570
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19546
19571
|
class BookmarkItem {
|
|
19547
19572
|
constructor(options) {
|
|
19548
19573
|
this.options = options;
|
|
19549
|
-
__publicField$
|
|
19550
|
-
__publicField$
|
|
19551
|
-
__publicField$
|
|
19552
|
-
__publicField$
|
|
19574
|
+
__publicField$p(this, "name");
|
|
19575
|
+
__publicField$p(this, "resourceId");
|
|
19576
|
+
__publicField$p(this, "item");
|
|
19577
|
+
__publicField$p(this, "_extent");
|
|
19553
19578
|
this.resourceId = options.resourceId;
|
|
19554
19579
|
const item = options.item;
|
|
19555
19580
|
this.item = item;
|
|
@@ -19695,14 +19720,14 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
|
|
|
19695
19720
|
return true;
|
|
19696
19721
|
}
|
|
19697
19722
|
|
|
19698
|
-
var __defProp$
|
|
19699
|
-
var __defNormalProp$
|
|
19700
|
-
var __publicField$
|
|
19701
|
-
class TreeHelper {
|
|
19702
|
-
constructor(item) {
|
|
19703
|
-
__publicField$
|
|
19704
|
-
__publicField$
|
|
19705
|
-
__publicField$
|
|
19723
|
+
var __defProp$x = Object.defineProperty;
|
|
19724
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19725
|
+
var __publicField$o = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19726
|
+
class TreeHelper {
|
|
19727
|
+
constructor(item) {
|
|
19728
|
+
__publicField$o(this, "item");
|
|
19729
|
+
__publicField$o(this, "_children", []);
|
|
19730
|
+
__publicField$o(this, "_parent");
|
|
19706
19731
|
this.item = item;
|
|
19707
19732
|
}
|
|
19708
19733
|
setParent(parent) {
|
|
@@ -19765,19 +19790,19 @@ class TreeHelper {
|
|
|
19765
19790
|
}
|
|
19766
19791
|
}
|
|
19767
19792
|
|
|
19768
|
-
var __defProp$
|
|
19769
|
-
var __defNormalProp$
|
|
19770
|
-
var __publicField$
|
|
19793
|
+
var __defProp$w = Object.defineProperty;
|
|
19794
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19795
|
+
var __publicField$n = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19771
19796
|
class BaseProperty {
|
|
19772
19797
|
constructor(name, item, options) {
|
|
19773
|
-
__publicField$
|
|
19774
|
-
__publicField$
|
|
19775
|
-
__publicField$
|
|
19776
|
-
__publicField$
|
|
19777
|
-
__publicField$
|
|
19778
|
-
__publicField$
|
|
19779
|
-
__publicField$
|
|
19780
|
-
__publicField$
|
|
19798
|
+
__publicField$n(this, "options");
|
|
19799
|
+
__publicField$n(this, "emitter", new EventEmitter());
|
|
19800
|
+
__publicField$n(this, "name");
|
|
19801
|
+
__publicField$n(this, "item");
|
|
19802
|
+
__publicField$n(this, "_blocked", false);
|
|
19803
|
+
__publicField$n(this, "_container");
|
|
19804
|
+
__publicField$n(this, "_value");
|
|
19805
|
+
__publicField$n(this, "_removeEventsListener");
|
|
19781
19806
|
this.item = item;
|
|
19782
19807
|
this.options = Object.assign({}, options);
|
|
19783
19808
|
this.name = name;
|
|
@@ -19874,23 +19899,23 @@ class BaseProperty {
|
|
|
19874
19899
|
}
|
|
19875
19900
|
}
|
|
19876
19901
|
|
|
19877
|
-
var __defProp$
|
|
19902
|
+
var __defProp$v = Object.defineProperty;
|
|
19878
19903
|
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
19879
19904
|
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
19880
19905
|
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
19881
|
-
var __defNormalProp$
|
|
19906
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19882
19907
|
var __spreadValues$m = (a, b) => {
|
|
19883
19908
|
for (var prop in b || (b = {}))
|
|
19884
19909
|
if (__hasOwnProp$n.call(b, prop))
|
|
19885
|
-
__defNormalProp$
|
|
19910
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
19886
19911
|
if (__getOwnPropSymbols$n)
|
|
19887
19912
|
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
19888
19913
|
if (__propIsEnum$n.call(b, prop))
|
|
19889
|
-
__defNormalProp$
|
|
19914
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
19890
19915
|
}
|
|
19891
19916
|
return a;
|
|
19892
19917
|
};
|
|
19893
|
-
var __publicField$
|
|
19918
|
+
var __publicField$m = (obj, key, value) => __defNormalProp$v(obj, key + "" , value);
|
|
19894
19919
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
19895
19920
|
constructor(name, item, options) {
|
|
19896
19921
|
super(name, item, __spreadValues$m(__spreadValues$m({}, _CheckProperty.options), options));
|
|
@@ -19998,7 +20023,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
|
19998
20023
|
}
|
|
19999
20024
|
}
|
|
20000
20025
|
};
|
|
20001
|
-
__publicField$
|
|
20026
|
+
__publicField$m(_CheckProperty, "options", {
|
|
20002
20027
|
hierarchy: true,
|
|
20003
20028
|
bubble: false,
|
|
20004
20029
|
propagation: false,
|
|
@@ -20007,31 +20032,31 @@ __publicField$l(_CheckProperty, "options", {
|
|
|
20007
20032
|
});
|
|
20008
20033
|
let CheckProperty = _CheckProperty;
|
|
20009
20034
|
|
|
20010
|
-
var __defProp$
|
|
20035
|
+
var __defProp$u = Object.defineProperty;
|
|
20011
20036
|
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
20012
20037
|
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
20013
20038
|
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
20014
|
-
var __defNormalProp$
|
|
20039
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20015
20040
|
var __spreadValues$l = (a, b) => {
|
|
20016
20041
|
for (var prop in b || (b = {}))
|
|
20017
20042
|
if (__hasOwnProp$m.call(b, prop))
|
|
20018
|
-
__defNormalProp$
|
|
20043
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
20019
20044
|
if (__getOwnPropSymbols$m)
|
|
20020
20045
|
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
20021
20046
|
if (__propIsEnum$m.call(b, prop))
|
|
20022
|
-
__defNormalProp$
|
|
20047
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
20023
20048
|
}
|
|
20024
20049
|
return a;
|
|
20025
20050
|
};
|
|
20026
|
-
var __publicField$
|
|
20051
|
+
var __publicField$l = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20027
20052
|
const BOOLEAN_TYPE = "boolean";
|
|
20028
20053
|
const STRING_TYPE = "string";
|
|
20029
20054
|
const _ItemProperties = class _ItemProperties {
|
|
20030
20055
|
constructor(item, propertiesList) {
|
|
20031
20056
|
this.item = item;
|
|
20032
|
-
__publicField$
|
|
20033
|
-
__publicField$
|
|
20034
|
-
__publicField$
|
|
20057
|
+
__publicField$l(this, "options", {});
|
|
20058
|
+
__publicField$l(this, "_properties", {});
|
|
20059
|
+
__publicField$l(this, "_propertiesList", []);
|
|
20035
20060
|
if (propertiesList) {
|
|
20036
20061
|
propertiesList.forEach(this._setPropertyHandler.bind(this));
|
|
20037
20062
|
}
|
|
@@ -20094,35 +20119,35 @@ const _ItemProperties = class _ItemProperties {
|
|
|
20094
20119
|
return Handler;
|
|
20095
20120
|
}
|
|
20096
20121
|
};
|
|
20097
|
-
__publicField$
|
|
20122
|
+
__publicField$l(_ItemProperties, "handlers", {
|
|
20098
20123
|
CheckProperty
|
|
20099
20124
|
});
|
|
20100
20125
|
let ItemProperties = _ItemProperties;
|
|
20101
20126
|
|
|
20102
|
-
var __defProp$
|
|
20127
|
+
var __defProp$t = Object.defineProperty;
|
|
20103
20128
|
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
20104
20129
|
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
20105
20130
|
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
20106
|
-
var __defNormalProp$
|
|
20131
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20107
20132
|
var __spreadValues$k = (a, b) => {
|
|
20108
20133
|
for (var prop in b || (b = {}))
|
|
20109
20134
|
if (__hasOwnProp$l.call(b, prop))
|
|
20110
|
-
__defNormalProp$
|
|
20135
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
20111
20136
|
if (__getOwnPropSymbols$l)
|
|
20112
20137
|
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
20113
20138
|
if (__propIsEnum$l.call(b, prop))
|
|
20114
|
-
__defNormalProp$
|
|
20139
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
20115
20140
|
}
|
|
20116
20141
|
return a;
|
|
20117
20142
|
};
|
|
20118
|
-
var __publicField$
|
|
20143
|
+
var __publicField$k = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20119
20144
|
let ID$1 = 0;
|
|
20120
20145
|
class Item {
|
|
20121
20146
|
constructor(options) {
|
|
20122
|
-
__publicField$
|
|
20123
|
-
__publicField$
|
|
20124
|
-
__publicField$
|
|
20125
|
-
__publicField$
|
|
20147
|
+
__publicField$k(this, "options", {});
|
|
20148
|
+
__publicField$k(this, "properties");
|
|
20149
|
+
__publicField$k(this, "tree");
|
|
20150
|
+
__publicField$k(this, "id", ID$1);
|
|
20126
20151
|
ID$1 += 1;
|
|
20127
20152
|
this.options = __spreadValues$k({}, options);
|
|
20128
20153
|
this.tree = new TreeHelper(this);
|
|
@@ -20176,25 +20201,25 @@ class WebmapLayerOpacityPropertyHandler extends BaseProperty {
|
|
|
20176
20201
|
}
|
|
20177
20202
|
}
|
|
20178
20203
|
|
|
20179
|
-
var __defProp$
|
|
20180
|
-
var __defProps$
|
|
20181
|
-
var __getOwnPropDescs$
|
|
20204
|
+
var __defProp$s = Object.defineProperty;
|
|
20205
|
+
var __defProps$e = Object.defineProperties;
|
|
20206
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
20182
20207
|
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
20183
20208
|
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
20184
20209
|
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
20185
|
-
var __defNormalProp$
|
|
20210
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20186
20211
|
var __spreadValues$j = (a, b) => {
|
|
20187
20212
|
for (var prop in b || (b = {}))
|
|
20188
20213
|
if (__hasOwnProp$k.call(b, prop))
|
|
20189
|
-
__defNormalProp$
|
|
20214
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
20190
20215
|
if (__getOwnPropSymbols$k)
|
|
20191
20216
|
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
20192
20217
|
if (__propIsEnum$k.call(b, prop))
|
|
20193
|
-
__defNormalProp$
|
|
20218
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
20194
20219
|
}
|
|
20195
20220
|
return a;
|
|
20196
20221
|
};
|
|
20197
|
-
var __spreadProps$
|
|
20222
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
20198
20223
|
function getNgwWebmapExtent(webmap) {
|
|
20199
20224
|
const bottom = webmap["extent_bottom"];
|
|
20200
20225
|
const left = webmap["extent_left"];
|
|
@@ -20262,14 +20287,14 @@ function fetchNgwResourceExtent(item, connector, options) {
|
|
|
20262
20287
|
if (resource.cls && resource.cls.indexOf("style") !== -1) {
|
|
20263
20288
|
return connector.getResource(resource.parent.id, options).then((res) => {
|
|
20264
20289
|
if (res) {
|
|
20265
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
20290
|
+
return fetchNgwLayerExtent(__spreadProps$e(__spreadValues$j({}, options), {
|
|
20266
20291
|
resourceId: res.resource.id,
|
|
20267
20292
|
connector
|
|
20268
20293
|
}));
|
|
20269
20294
|
}
|
|
20270
20295
|
});
|
|
20271
20296
|
} else {
|
|
20272
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
20297
|
+
return fetchNgwLayerExtent(__spreadProps$e(__spreadValues$j({}, options), {
|
|
20273
20298
|
resourceId: resource.id,
|
|
20274
20299
|
connector
|
|
20275
20300
|
}));
|
|
@@ -20277,9 +20302,9 @@ function fetchNgwResourceExtent(item, connector, options) {
|
|
|
20277
20302
|
}
|
|
20278
20303
|
}
|
|
20279
20304
|
|
|
20280
|
-
var __defProp$
|
|
20281
|
-
var __defNormalProp$
|
|
20282
|
-
var __publicField$
|
|
20305
|
+
var __defProp$r = Object.defineProperty;
|
|
20306
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20307
|
+
var __publicField$j = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20283
20308
|
var __async$m = (__this, __arguments, generator) => {
|
|
20284
20309
|
return new Promise((resolve, reject) => {
|
|
20285
20310
|
var fulfilled = (value) => {
|
|
@@ -20302,9 +20327,9 @@ var __async$m = (__this, __arguments, generator) => {
|
|
|
20302
20327
|
};
|
|
20303
20328
|
class NgwResource {
|
|
20304
20329
|
constructor() {
|
|
20305
|
-
__publicField$
|
|
20306
|
-
__publicField$
|
|
20307
|
-
__publicField$
|
|
20330
|
+
__publicField$j(this, "item");
|
|
20331
|
+
__publicField$j(this, "connector");
|
|
20332
|
+
__publicField$j(this, "_extent");
|
|
20308
20333
|
}
|
|
20309
20334
|
/** @deprecated use {@link NgwResource.getBounds} instead */
|
|
20310
20335
|
getExtent() {
|
|
@@ -20423,23 +20448,23 @@ function updateQmsOptions(qms) {
|
|
|
20423
20448
|
};
|
|
20424
20449
|
}
|
|
20425
20450
|
|
|
20426
|
-
var __defProp$
|
|
20451
|
+
var __defProp$q = Object.defineProperty;
|
|
20427
20452
|
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
20428
20453
|
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
20429
20454
|
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
20430
|
-
var __defNormalProp$
|
|
20455
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20431
20456
|
var __spreadValues$i = (a, b) => {
|
|
20432
20457
|
for (var prop in b || (b = {}))
|
|
20433
20458
|
if (__hasOwnProp$j.call(b, prop))
|
|
20434
|
-
__defNormalProp$
|
|
20459
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
20435
20460
|
if (__getOwnPropSymbols$j)
|
|
20436
20461
|
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
20437
20462
|
if (__propIsEnum$j.call(b, prop))
|
|
20438
|
-
__defNormalProp$
|
|
20463
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
20439
20464
|
}
|
|
20440
20465
|
return a;
|
|
20441
20466
|
};
|
|
20442
|
-
var __objRest$
|
|
20467
|
+
var __objRest$2 = (source, exclude) => {
|
|
20443
20468
|
var target = {};
|
|
20444
20469
|
for (var prop in source)
|
|
20445
20470
|
if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -20451,7 +20476,7 @@ var __objRest$1 = (source, exclude) => {
|
|
|
20451
20476
|
}
|
|
20452
20477
|
return target;
|
|
20453
20478
|
};
|
|
20454
|
-
var __publicField$
|
|
20479
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20455
20480
|
var __async$k = (__this, __arguments, generator) => {
|
|
20456
20481
|
return new Promise((resolve, reject) => {
|
|
20457
20482
|
var fulfilled = (value) => {
|
|
@@ -20472,11 +20497,11 @@ var __async$k = (__this, __arguments, generator) => {
|
|
|
20472
20497
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
20473
20498
|
});
|
|
20474
20499
|
};
|
|
20475
|
-
const URL = "https://qms.nextgis.com";
|
|
20476
|
-
function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
20500
|
+
const URL$1 = "https://qms.nextgis.com";
|
|
20501
|
+
function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
|
|
20477
20502
|
let webMap;
|
|
20478
20503
|
if ("webMap" in webMapOrOptions) {
|
|
20479
|
-
const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$
|
|
20504
|
+
const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$2(_a, ["webMap", "url"]);
|
|
20480
20505
|
webMap = webMap_;
|
|
20481
20506
|
if (url_) {
|
|
20482
20507
|
url = url_;
|
|
@@ -20488,13 +20513,13 @@ function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
|
20488
20513
|
webMap = webMapOrOptions;
|
|
20489
20514
|
}
|
|
20490
20515
|
if (!url) {
|
|
20491
|
-
url = URL;
|
|
20516
|
+
url = URL$1;
|
|
20492
20517
|
}
|
|
20493
20518
|
class QmsAdapter {
|
|
20494
20519
|
constructor(map, options) {
|
|
20495
|
-
__publicField$
|
|
20496
|
-
__publicField$
|
|
20497
|
-
__publicField$
|
|
20520
|
+
__publicField$i(this, "qms");
|
|
20521
|
+
__publicField$i(this, "options");
|
|
20522
|
+
__publicField$i(this, "map");
|
|
20498
20523
|
this.map = map;
|
|
20499
20524
|
const opt = __spreadValues$i(__spreadValues$i({}, createOpt), options);
|
|
20500
20525
|
this.options = opt;
|
|
@@ -20548,29 +20573,29 @@ function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
|
20548
20573
|
return QmsAdapter;
|
|
20549
20574
|
}
|
|
20550
20575
|
|
|
20551
|
-
var __defProp$
|
|
20576
|
+
var __defProp$p = Object.defineProperty;
|
|
20552
20577
|
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
20553
20578
|
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
20554
20579
|
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
20555
|
-
var __defNormalProp$
|
|
20580
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20556
20581
|
var __spreadValues$h = (a, b) => {
|
|
20557
20582
|
for (var prop in b || (b = {}))
|
|
20558
20583
|
if (__hasOwnProp$i.call(b, prop))
|
|
20559
|
-
__defNormalProp$
|
|
20584
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
20560
20585
|
if (__getOwnPropSymbols$i)
|
|
20561
20586
|
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
20562
20587
|
if (__propIsEnum$i.call(b, prop))
|
|
20563
|
-
__defNormalProp$
|
|
20588
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
20564
20589
|
}
|
|
20565
20590
|
return a;
|
|
20566
20591
|
};
|
|
20567
|
-
var __publicField$
|
|
20592
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20568
20593
|
class QmsKit {
|
|
20569
20594
|
constructor(options) {
|
|
20570
|
-
__publicField$
|
|
20595
|
+
__publicField$h(this, "options", {
|
|
20571
20596
|
url: "https://qms.nextgis.com"
|
|
20572
20597
|
});
|
|
20573
|
-
__publicField$
|
|
20598
|
+
__publicField$h(this, "url");
|
|
20574
20599
|
this.options = __spreadValues$h(__spreadValues$h({}, this.options), options);
|
|
20575
20600
|
this.url = this.options.url;
|
|
20576
20601
|
}
|
|
@@ -20586,31 +20611,31 @@ class QmsKit {
|
|
|
20586
20611
|
return createQmsAdapter({ webMap, url: this.url });
|
|
20587
20612
|
}
|
|
20588
20613
|
}
|
|
20589
|
-
__publicField$
|
|
20614
|
+
__publicField$h(QmsKit, "utils", {
|
|
20590
20615
|
createQmsAdapter
|
|
20591
20616
|
});
|
|
20592
20617
|
|
|
20593
|
-
var __defProp$
|
|
20594
|
-
var __defProps$
|
|
20595
|
-
var __getOwnPropDescs$
|
|
20618
|
+
var __defProp$o = Object.defineProperty;
|
|
20619
|
+
var __defProps$d = Object.defineProperties;
|
|
20620
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
20596
20621
|
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
20597
20622
|
var __getProtoOf$2 = Object.getPrototypeOf;
|
|
20598
20623
|
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
20599
20624
|
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
20600
20625
|
var __reflectGet$2 = Reflect.get;
|
|
20601
|
-
var __defNormalProp$
|
|
20626
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20602
20627
|
var __spreadValues$g = (a, b) => {
|
|
20603
20628
|
for (var prop in b || (b = {}))
|
|
20604
20629
|
if (__hasOwnProp$h.call(b, prop))
|
|
20605
|
-
__defNormalProp$
|
|
20630
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
20606
20631
|
if (__getOwnPropSymbols$h)
|
|
20607
20632
|
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
20608
20633
|
if (__propIsEnum$h.call(b, prop))
|
|
20609
|
-
__defNormalProp$
|
|
20634
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
20610
20635
|
}
|
|
20611
20636
|
return a;
|
|
20612
20637
|
};
|
|
20613
|
-
var __spreadProps$
|
|
20638
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
20614
20639
|
var __superGet$2 = (cls, obj, key) => __reflectGet$2(__getProtoOf$2(cls), key, obj);
|
|
20615
20640
|
var __async$j = (__this, __arguments, generator) => {
|
|
20616
20641
|
return new Promise((resolve, reject) => {
|
|
@@ -20655,7 +20680,7 @@ function createBasemapLayerAdapter(_0) {
|
|
|
20655
20680
|
class BasemapTileAdapter extends TileAdapter {
|
|
20656
20681
|
addLayer(opt) {
|
|
20657
20682
|
return __async$j(this, null, function* () {
|
|
20658
|
-
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$
|
|
20683
|
+
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$d(__spreadValues$g({}, opt), { url }));
|
|
20659
20684
|
});
|
|
20660
20685
|
}
|
|
20661
20686
|
}
|
|
@@ -20734,25 +20759,25 @@ function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
|
20734
20759
|
return fields;
|
|
20735
20760
|
}
|
|
20736
20761
|
|
|
20737
|
-
var __defProp$
|
|
20738
|
-
var __defProps$
|
|
20739
|
-
var __getOwnPropDescs$
|
|
20762
|
+
var __defProp$n = Object.defineProperty;
|
|
20763
|
+
var __defProps$c = Object.defineProperties;
|
|
20764
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
20740
20765
|
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
20741
20766
|
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
20742
20767
|
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
20743
|
-
var __defNormalProp$
|
|
20768
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20744
20769
|
var __spreadValues$f = (a, b) => {
|
|
20745
20770
|
for (var prop in b || (b = {}))
|
|
20746
20771
|
if (__hasOwnProp$g.call(b, prop))
|
|
20747
|
-
__defNormalProp$
|
|
20772
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
20748
20773
|
if (__getOwnPropSymbols$g)
|
|
20749
20774
|
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
20750
20775
|
if (__propIsEnum$g.call(b, prop))
|
|
20751
|
-
__defNormalProp$
|
|
20776
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
20752
20777
|
}
|
|
20753
20778
|
return a;
|
|
20754
20779
|
};
|
|
20755
|
-
var __spreadProps$
|
|
20780
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
20756
20781
|
var __async$i = (__this, __arguments, generator) => {
|
|
20757
20782
|
return new Promise((resolve, reject) => {
|
|
20758
20783
|
var fulfilled = (value) => {
|
|
@@ -20778,13 +20803,13 @@ function fetchNgwLayerItems(options) {
|
|
|
20778
20803
|
var _a;
|
|
20779
20804
|
const filters = options.filters;
|
|
20780
20805
|
if (filters) {
|
|
20781
|
-
let data = yield createFeatureFieldFilterQueries(__spreadProps$
|
|
20806
|
+
let data = yield createFeatureFieldFilterQueries(__spreadProps$c(__spreadValues$f({}, options), {
|
|
20782
20807
|
filters
|
|
20783
20808
|
}));
|
|
20784
20809
|
const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
|
|
20785
20810
|
if (clientFilterValidate) {
|
|
20786
20811
|
data = data.filter((y) => {
|
|
20787
|
-
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$
|
|
20812
|
+
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$c(__spreadValues$f({}, y.fields), {
|
|
20788
20813
|
id: y.id
|
|
20789
20814
|
}));
|
|
20790
20815
|
const result = propertiesFilter(fields, filters);
|
|
@@ -20872,28 +20897,28 @@ function getLayerFilterOptions(options) {
|
|
|
20872
20897
|
return filterOptions;
|
|
20873
20898
|
}
|
|
20874
20899
|
|
|
20875
|
-
var __defProp$
|
|
20876
|
-
var __defProps$
|
|
20877
|
-
var __getOwnPropDescs$
|
|
20900
|
+
var __defProp$m = Object.defineProperty;
|
|
20901
|
+
var __defProps$b = Object.defineProperties;
|
|
20902
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
20878
20903
|
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
20879
20904
|
var __getProtoOf$1 = Object.getPrototypeOf;
|
|
20880
20905
|
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
20881
20906
|
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
20882
20907
|
var __reflectGet$1 = Reflect.get;
|
|
20883
|
-
var __defNormalProp$
|
|
20908
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20884
20909
|
var __spreadValues$e = (a, b) => {
|
|
20885
20910
|
for (var prop in b || (b = {}))
|
|
20886
20911
|
if (__hasOwnProp$f.call(b, prop))
|
|
20887
|
-
__defNormalProp$
|
|
20912
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
20888
20913
|
if (__getOwnPropSymbols$f)
|
|
20889
20914
|
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
20890
20915
|
if (__propIsEnum$f.call(b, prop))
|
|
20891
|
-
__defNormalProp$
|
|
20916
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
20892
20917
|
}
|
|
20893
20918
|
return a;
|
|
20894
20919
|
};
|
|
20895
|
-
var __spreadProps$
|
|
20896
|
-
var __publicField$
|
|
20920
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
20921
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20897
20922
|
var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
|
|
20898
20923
|
var __async$g = (__this, __arguments, generator) => {
|
|
20899
20924
|
return new Promise((resolve, reject) => {
|
|
@@ -20966,11 +20991,11 @@ function createGeoJsonAdapter(props) {
|
|
|
20966
20991
|
class NgwGeoJsonAdapter extends GeoJsonAdapter {
|
|
20967
20992
|
constructor() {
|
|
20968
20993
|
super(...arguments);
|
|
20969
|
-
__publicField$
|
|
20970
|
-
__publicField$
|
|
20971
|
-
__publicField$
|
|
20972
|
-
__publicField$
|
|
20973
|
-
__publicField$
|
|
20994
|
+
__publicField$g(this, "emitter", new EventEmitter());
|
|
20995
|
+
__publicField$g(this, "__onMapMove");
|
|
20996
|
+
__publicField$g(this, "__onMapMoveStart");
|
|
20997
|
+
__publicField$g(this, "__enableMapMoveListener");
|
|
20998
|
+
__publicField$g(this, "__disableMapMoveListener");
|
|
20974
20999
|
}
|
|
20975
21000
|
addLayer(opt) {
|
|
20976
21001
|
return __async$g(this, null, function* () {
|
|
@@ -21043,10 +21068,10 @@ function createGeoJsonAdapter(props) {
|
|
|
21043
21068
|
getCount() {
|
|
21044
21069
|
return fetchNgwLayerCount({ connector, resourceId, cache: true });
|
|
21045
21070
|
}
|
|
21046
|
-
updateLayer(
|
|
21071
|
+
updateLayer(opt) {
|
|
21047
21072
|
return __async$g(this, null, function* () {
|
|
21048
21073
|
var _a2;
|
|
21049
|
-
filterArgs =
|
|
21074
|
+
const filterArgs = opt || _lastFilterArgs || {};
|
|
21050
21075
|
if ((_a2 = this.options.strategy) == null ? void 0 : _a2.startsWith("BBOX")) {
|
|
21051
21076
|
yield webMap.onLoad("create");
|
|
21052
21077
|
filterArgs.options = filterArgs.options || {};
|
|
@@ -21071,7 +21096,7 @@ function createGeoJsonAdapter(props) {
|
|
|
21071
21096
|
try {
|
|
21072
21097
|
this.emitter.emit("preupdate", filterArgs);
|
|
21073
21098
|
webMap._emitLayerEvent("layer:preupdate", options.id || "", filterArgs);
|
|
21074
|
-
const data = yield getData(filterArgs.filters, __spreadProps$
|
|
21099
|
+
const data = yield getData(filterArgs.filters, __spreadProps$b(__spreadValues$e({}, filterArgs.options), {
|
|
21075
21100
|
srs: this.options.srs
|
|
21076
21101
|
}));
|
|
21077
21102
|
let newData = data;
|
|
@@ -21124,7 +21149,7 @@ function createGeoJsonAdapter(props) {
|
|
|
21124
21149
|
if (this.clearLayer) {
|
|
21125
21150
|
this.clearLayer();
|
|
21126
21151
|
}
|
|
21127
|
-
const data = yield getData(filters, __spreadProps$
|
|
21152
|
+
const data = yield getData(filters, __spreadProps$b(__spreadValues$e({}, opt), {
|
|
21128
21153
|
srs: this.options.srs
|
|
21129
21154
|
}));
|
|
21130
21155
|
this.setData(data);
|
|
@@ -21313,26 +21338,26 @@ function ngwApiToAdapterOptions({
|
|
|
21313
21338
|
}
|
|
21314
21339
|
}
|
|
21315
21340
|
|
|
21316
|
-
var __defProp$
|
|
21317
|
-
var __defProps$
|
|
21318
|
-
var __getOwnPropDescs$
|
|
21341
|
+
var __defProp$l = Object.defineProperty;
|
|
21342
|
+
var __defProps$a = Object.defineProperties;
|
|
21343
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
21319
21344
|
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
21320
21345
|
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
21321
21346
|
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
21322
|
-
var __defNormalProp$
|
|
21347
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21323
21348
|
var __spreadValues$d = (a, b) => {
|
|
21324
21349
|
for (var prop in b || (b = {}))
|
|
21325
21350
|
if (__hasOwnProp$e.call(b, prop))
|
|
21326
|
-
__defNormalProp$
|
|
21351
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
21327
21352
|
if (__getOwnPropSymbols$e)
|
|
21328
21353
|
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
21329
21354
|
if (__propIsEnum$e.call(b, prop))
|
|
21330
|
-
__defNormalProp$
|
|
21355
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
21331
21356
|
}
|
|
21332
21357
|
return a;
|
|
21333
21358
|
};
|
|
21334
|
-
var __spreadProps$
|
|
21335
|
-
var __publicField$
|
|
21359
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
21360
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21336
21361
|
var __async$e = (__this, __arguments, generator) => {
|
|
21337
21362
|
return new Promise((resolve, reject) => {
|
|
21338
21363
|
var fulfilled = (value) => {
|
|
@@ -21353,11 +21378,47 @@ var __async$e = (__this, __arguments, generator) => {
|
|
|
21353
21378
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
21354
21379
|
});
|
|
21355
21380
|
};
|
|
21381
|
+
class Legend {
|
|
21382
|
+
constructor({
|
|
21383
|
+
layerId,
|
|
21384
|
+
legend,
|
|
21385
|
+
onSymbolRenderChange
|
|
21386
|
+
}) {
|
|
21387
|
+
__publicField$f(this, "layerId");
|
|
21388
|
+
__publicField$f(this, "legend");
|
|
21389
|
+
__publicField$f(this, "onSymbolRenderChange");
|
|
21390
|
+
this.layerId = layerId;
|
|
21391
|
+
this.legend = this.createLegend(legend);
|
|
21392
|
+
this.onSymbolRenderChange = onSymbolRenderChange;
|
|
21393
|
+
}
|
|
21394
|
+
createLegend(items) {
|
|
21395
|
+
return items.map((params) => __spreadProps$a(__spreadValues$d({}, params), {
|
|
21396
|
+
/** @deprecated use display_name instead */
|
|
21397
|
+
name: params.display_name,
|
|
21398
|
+
/** @deprecated use icon instead */
|
|
21399
|
+
symbol: params.icon
|
|
21400
|
+
}));
|
|
21401
|
+
}
|
|
21402
|
+
setSymbolRender(symbolIndex, status) {
|
|
21403
|
+
const legendItem = this.legend.find((l) => l.index === symbolIndex);
|
|
21404
|
+
if (legendItem) {
|
|
21405
|
+
const render = legendItem.render;
|
|
21406
|
+
if (render !== status) {
|
|
21407
|
+
legendItem.render = status;
|
|
21408
|
+
if (this.onSymbolRenderChange) {
|
|
21409
|
+
this.onSymbolRenderChange(
|
|
21410
|
+
this.legend.filter((l) => l.render).map((l) => l.index)
|
|
21411
|
+
);
|
|
21412
|
+
}
|
|
21413
|
+
}
|
|
21414
|
+
}
|
|
21415
|
+
}
|
|
21416
|
+
}
|
|
21356
21417
|
function createRasterAdapter(_0) {
|
|
21357
21418
|
return __async$e(this, arguments, function* ({
|
|
21358
21419
|
layerOptions,
|
|
21359
|
-
webMap,
|
|
21360
21420
|
connector,
|
|
21421
|
+
webMap,
|
|
21361
21422
|
item
|
|
21362
21423
|
}) {
|
|
21363
21424
|
const resourceCls = item.resource.cls;
|
|
@@ -21386,16 +21447,17 @@ function createRasterAdapter(_0) {
|
|
|
21386
21447
|
constructor(map, _options) {
|
|
21387
21448
|
super(map, _options);
|
|
21388
21449
|
this.map = map;
|
|
21389
|
-
|
|
21390
|
-
__publicField$
|
|
21391
|
-
__publicField$
|
|
21450
|
+
__publicField$f(this, "item", item);
|
|
21451
|
+
__publicField$f(this, "resourceId", resourceId);
|
|
21452
|
+
__publicField$f(this, "_blocked", false);
|
|
21453
|
+
__publicField$f(this, "_layerVisibility");
|
|
21392
21454
|
const opt = ngwApiToAdapterOptions({
|
|
21393
21455
|
options: layerOptions,
|
|
21394
21456
|
webMap,
|
|
21395
21457
|
baseUrl: connector.options.baseUrl || ""
|
|
21396
21458
|
});
|
|
21397
21459
|
if (opt) {
|
|
21398
|
-
const layerAdapterOptions = __spreadProps$
|
|
21460
|
+
const layerAdapterOptions = __spreadProps$a(__spreadValues$d(__spreadValues$d({}, opt), layerOptions.adapterOptions), {
|
|
21399
21461
|
params: { resource: resourceId },
|
|
21400
21462
|
layers: opt.layers || String(resourceId),
|
|
21401
21463
|
resourceId
|
|
@@ -21409,25 +21471,19 @@ function createRasterAdapter(_0) {
|
|
|
21409
21471
|
addLayer(addOptions) {
|
|
21410
21472
|
return super.addLayer(__spreadValues$d(__spreadValues$d({}, this.options), addOptions));
|
|
21411
21473
|
}
|
|
21412
|
-
|
|
21413
|
-
|
|
21414
|
-
|
|
21415
|
-
|
|
21416
|
-
|
|
21417
|
-
}, options));
|
|
21418
|
-
const id = this.options.id;
|
|
21419
|
-
if (id !== void 0) {
|
|
21420
|
-
const legend = {
|
|
21421
|
-
layerId: id,
|
|
21422
|
-
legend: ngwLegend.map(({ display_name, icon }) => ({
|
|
21423
|
-
name: display_name,
|
|
21424
|
-
symbol: icon
|
|
21425
|
-
}))
|
|
21426
|
-
};
|
|
21427
|
-
return [legend];
|
|
21474
|
+
showLayer() {
|
|
21475
|
+
this._layerVisibility = true;
|
|
21476
|
+
if (this.layer) {
|
|
21477
|
+
if (!this._blocked) {
|
|
21478
|
+
webMap.mapAdapter.showLayer(this.layer);
|
|
21428
21479
|
}
|
|
21429
|
-
|
|
21430
|
-
|
|
21480
|
+
}
|
|
21481
|
+
}
|
|
21482
|
+
hideLayer() {
|
|
21483
|
+
this._layerVisibility = false;
|
|
21484
|
+
if (this.layer) {
|
|
21485
|
+
webMap.mapAdapter.hideLayer(this.layer);
|
|
21486
|
+
}
|
|
21431
21487
|
}
|
|
21432
21488
|
getIdentificationIds() {
|
|
21433
21489
|
return __async$e(this, null, function* () {
|
|
@@ -21443,8 +21499,69 @@ function createRasterAdapter(_0) {
|
|
|
21443
21499
|
return [];
|
|
21444
21500
|
});
|
|
21445
21501
|
}
|
|
21446
|
-
|
|
21447
|
-
|
|
21502
|
+
getLegend(options) {
|
|
21503
|
+
return __async$e(this, null, function* () {
|
|
21504
|
+
const id = this.options.id;
|
|
21505
|
+
if (id !== void 0) {
|
|
21506
|
+
const ngwLegend = yield connector.get("render.legend_symbols", __spreadValues$d({
|
|
21507
|
+
params: { id: resourceId },
|
|
21508
|
+
cache: true
|
|
21509
|
+
}, options));
|
|
21510
|
+
const legend = new Legend({
|
|
21511
|
+
layerId: id,
|
|
21512
|
+
legend: ngwLegend,
|
|
21513
|
+
onSymbolRenderChange: this._setLegendSymbol.bind(this)
|
|
21514
|
+
});
|
|
21515
|
+
return [legend];
|
|
21516
|
+
}
|
|
21517
|
+
return [];
|
|
21518
|
+
});
|
|
21519
|
+
}
|
|
21520
|
+
_hideLayer() {
|
|
21521
|
+
if (this.options.id) {
|
|
21522
|
+
webMap.mapAdapter.hideLayer(this.layer);
|
|
21523
|
+
}
|
|
21524
|
+
}
|
|
21525
|
+
_showLayer() {
|
|
21526
|
+
if (this.options.id) {
|
|
21527
|
+
if (this._layerVisibility) {
|
|
21528
|
+
webMap.showLayer(this.options.id, { silent: true });
|
|
21529
|
+
}
|
|
21530
|
+
}
|
|
21531
|
+
}
|
|
21532
|
+
_setLegendSymbol(renderIndexes) {
|
|
21533
|
+
const intervals = this._consolidateIntervals(renderIndexes);
|
|
21534
|
+
if (!intervals.length) {
|
|
21535
|
+
this._hideLayer();
|
|
21536
|
+
this._blocked = true;
|
|
21537
|
+
} else {
|
|
21538
|
+
this._blocked = false;
|
|
21539
|
+
this._showLayer();
|
|
21540
|
+
}
|
|
21541
|
+
if (this.updateLayer) {
|
|
21542
|
+
this.updateLayer({
|
|
21543
|
+
params: {
|
|
21544
|
+
[`symbols[${resourceId}]`]: intervals.join(",") || void 0
|
|
21545
|
+
}
|
|
21546
|
+
});
|
|
21547
|
+
}
|
|
21548
|
+
}
|
|
21549
|
+
_consolidateIntervals(symbols) {
|
|
21550
|
+
const sortedSymbols = symbols.slice().sort((a, b) => a - b);
|
|
21551
|
+
const intervals = [];
|
|
21552
|
+
let start = sortedSymbols[0];
|
|
21553
|
+
let end = start;
|
|
21554
|
+
for (let i = 1; i <= sortedSymbols.length; i++) {
|
|
21555
|
+
if (sortedSymbols[i] === end + 1) {
|
|
21556
|
+
end = sortedSymbols[i];
|
|
21557
|
+
} else {
|
|
21558
|
+
intervals.push(start === end ? `${start}` : `${start}-${end}`);
|
|
21559
|
+
start = sortedSymbols[i];
|
|
21560
|
+
end = start;
|
|
21561
|
+
}
|
|
21562
|
+
}
|
|
21563
|
+
return intervals;
|
|
21564
|
+
}
|
|
21448
21565
|
};
|
|
21449
21566
|
} else {
|
|
21450
21567
|
throw new Error(adapter + " not supported yet. Only TILE");
|
|
@@ -21452,25 +21569,25 @@ function createRasterAdapter(_0) {
|
|
|
21452
21569
|
});
|
|
21453
21570
|
}
|
|
21454
21571
|
|
|
21455
|
-
var __defProp$
|
|
21456
|
-
var __defProps$
|
|
21457
|
-
var __getOwnPropDescs$
|
|
21572
|
+
var __defProp$k = Object.defineProperty;
|
|
21573
|
+
var __defProps$9 = Object.defineProperties;
|
|
21574
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
21458
21575
|
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
21459
21576
|
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
21460
21577
|
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
21461
|
-
var __defNormalProp$
|
|
21578
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21462
21579
|
var __spreadValues$c = (a, b) => {
|
|
21463
21580
|
for (var prop in b || (b = {}))
|
|
21464
21581
|
if (__hasOwnProp$d.call(b, prop))
|
|
21465
|
-
__defNormalProp$
|
|
21582
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
21466
21583
|
if (__getOwnPropSymbols$d)
|
|
21467
21584
|
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
21468
21585
|
if (__propIsEnum$d.call(b, prop))
|
|
21469
|
-
__defNormalProp$
|
|
21586
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
21470
21587
|
}
|
|
21471
21588
|
return a;
|
|
21472
21589
|
};
|
|
21473
|
-
var __spreadProps$
|
|
21590
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
21474
21591
|
var __async$d = (__this, __arguments, generator) => {
|
|
21475
21592
|
return new Promise((resolve, reject) => {
|
|
21476
21593
|
var fulfilled = (value) => {
|
|
@@ -21518,7 +21635,7 @@ function createAdapterFromFirstStyle(_0) {
|
|
|
21518
21635
|
const firstStyle = childrenStyles && childrenStyles[0];
|
|
21519
21636
|
if (firstStyle) {
|
|
21520
21637
|
return createAsyncAdapter(
|
|
21521
|
-
__spreadProps$
|
|
21638
|
+
__spreadProps$9(__spreadValues$c({}, layerOptions), { resource: firstStyle.resource.id }),
|
|
21522
21639
|
webMap,
|
|
21523
21640
|
connector
|
|
21524
21641
|
);
|
|
@@ -21541,7 +21658,7 @@ function createAsyncAdapter(options, webMap, connector) {
|
|
|
21541
21658
|
}
|
|
21542
21659
|
if (item) {
|
|
21543
21660
|
const cls = item.resource.cls;
|
|
21544
|
-
const layerOptions = __spreadProps$
|
|
21661
|
+
const layerOptions = __spreadProps$9(__spreadValues$c({}, options), {
|
|
21545
21662
|
resource: resourceId
|
|
21546
21663
|
});
|
|
21547
21664
|
const adapterOptions = {
|
|
@@ -21578,10 +21695,10 @@ function createAsyncAdapter(options, webMap, connector) {
|
|
|
21578
21695
|
item.resource.parent.id
|
|
21579
21696
|
);
|
|
21580
21697
|
if (parentItem) {
|
|
21581
|
-
const parentOptions = __spreadProps$
|
|
21698
|
+
const parentOptions = __spreadProps$9(__spreadValues$c({}, options), {
|
|
21582
21699
|
resource: item.resource.parent.id
|
|
21583
21700
|
});
|
|
21584
|
-
adapter = createGeoJsonAdapter(__spreadProps$
|
|
21701
|
+
adapter = createGeoJsonAdapter(__spreadProps$9(__spreadValues$c({}, adapterOptions), {
|
|
21585
21702
|
item: parentItem,
|
|
21586
21703
|
layerOptions: parentOptions
|
|
21587
21704
|
}));
|
|
@@ -21625,31 +21742,46 @@ function createAsyncAdapter(options, webMap, connector) {
|
|
|
21625
21742
|
});
|
|
21626
21743
|
}
|
|
21627
21744
|
|
|
21628
|
-
var __defProp$
|
|
21745
|
+
var __defProp$j = Object.defineProperty;
|
|
21746
|
+
var __defProps$8 = Object.defineProperties;
|
|
21747
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
21629
21748
|
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
21630
21749
|
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
21631
21750
|
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
21632
|
-
var __defNormalProp$
|
|
21751
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21633
21752
|
var __spreadValues$b = (a, b) => {
|
|
21634
21753
|
for (var prop in b || (b = {}))
|
|
21635
21754
|
if (__hasOwnProp$c.call(b, prop))
|
|
21636
|
-
__defNormalProp$
|
|
21755
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
21637
21756
|
if (__getOwnPropSymbols$c)
|
|
21638
21757
|
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
21639
21758
|
if (__propIsEnum$c.call(b, prop))
|
|
21640
|
-
__defNormalProp$
|
|
21759
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
21641
21760
|
}
|
|
21642
21761
|
return a;
|
|
21643
21762
|
};
|
|
21763
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
21764
|
+
var __objRest$1 = (source, exclude) => {
|
|
21765
|
+
var target = {};
|
|
21766
|
+
for (var prop in source)
|
|
21767
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21768
|
+
target[prop] = source[prop];
|
|
21769
|
+
if (source != null && __getOwnPropSymbols$c)
|
|
21770
|
+
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
21771
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
21772
|
+
target[prop] = source[prop];
|
|
21773
|
+
}
|
|
21774
|
+
return target;
|
|
21775
|
+
};
|
|
21644
21776
|
function updateImageParams(params, resourceId) {
|
|
21645
|
-
const { bbox, width, height, nd } =
|
|
21646
|
-
return {
|
|
21777
|
+
const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$1(_a, ["bbox", "width", "height", "nd"]);
|
|
21778
|
+
return __spreadProps$8(__spreadValues$b({}, rest), {
|
|
21647
21779
|
resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
|
|
21648
21780
|
extent: bbox,
|
|
21649
21781
|
size: width + "," + height,
|
|
21650
21782
|
timestamp: Date.now(),
|
|
21651
21783
|
nd: nd != null ? nd : 200
|
|
21652
|
-
};
|
|
21784
|
+
});
|
|
21653
21785
|
}
|
|
21654
21786
|
const vectorLayerGeomToPaintTypeAlias = {
|
|
21655
21787
|
POINT: "point",
|
|
@@ -21709,26 +21841,26 @@ function setScaleRatio(scale, lat = 0) {
|
|
|
21709
21841
|
return zoom;
|
|
21710
21842
|
}
|
|
21711
21843
|
|
|
21712
|
-
var __defProp$
|
|
21844
|
+
var __defProp$i = Object.defineProperty;
|
|
21713
21845
|
var __defProps$7 = Object.defineProperties;
|
|
21714
21846
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
21715
21847
|
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
21716
21848
|
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
21717
21849
|
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
21718
|
-
var __defNormalProp$
|
|
21850
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21719
21851
|
var __spreadValues$a = (a, b) => {
|
|
21720
21852
|
for (var prop in b || (b = {}))
|
|
21721
21853
|
if (__hasOwnProp$b.call(b, prop))
|
|
21722
|
-
__defNormalProp$
|
|
21854
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
21723
21855
|
if (__getOwnPropSymbols$b)
|
|
21724
21856
|
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
21725
21857
|
if (__propIsEnum$b.call(b, prop))
|
|
21726
|
-
__defNormalProp$
|
|
21858
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
21727
21859
|
}
|
|
21728
21860
|
return a;
|
|
21729
21861
|
};
|
|
21730
21862
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
21731
|
-
var __publicField$
|
|
21863
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21732
21864
|
var __async$c = (__this, __arguments, generator) => {
|
|
21733
21865
|
return new Promise((resolve, reject) => {
|
|
21734
21866
|
var fulfilled = (value) => {
|
|
@@ -21753,11 +21885,11 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
21753
21885
|
constructor(webMap, item, options, connector, parent, noInit) {
|
|
21754
21886
|
super(__spreadValues$a(__spreadValues$a({}, _NgwWebmapItem.options), options));
|
|
21755
21887
|
this.webMap = webMap;
|
|
21756
|
-
__publicField$
|
|
21757
|
-
__publicField$
|
|
21758
|
-
__publicField$
|
|
21759
|
-
__publicField$
|
|
21760
|
-
__publicField$
|
|
21888
|
+
__publicField$e(this, "item");
|
|
21889
|
+
__publicField$e(this, "connector");
|
|
21890
|
+
__publicField$e(this, "layer");
|
|
21891
|
+
__publicField$e(this, "emitter", new EventEmitter());
|
|
21892
|
+
__publicField$e(this, "_rootDescendantsCount", 0);
|
|
21761
21893
|
if (connector) {
|
|
21762
21894
|
this.connector = connector;
|
|
21763
21895
|
}
|
|
@@ -21819,10 +21951,12 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
21819
21951
|
}, options));
|
|
21820
21952
|
const legend = {
|
|
21821
21953
|
layerId: id,
|
|
21822
|
-
legend: ngwLegend.map((
|
|
21823
|
-
|
|
21824
|
-
|
|
21825
|
-
|
|
21954
|
+
legend: ngwLegend.map((legend2) => __spreadValues$a({
|
|
21955
|
+
/** @deprecated use display_name instead */
|
|
21956
|
+
name: legend2.display_name,
|
|
21957
|
+
/** @deprecated use icon instead */
|
|
21958
|
+
symbol: legend2.icon
|
|
21959
|
+
}, legend2))
|
|
21826
21960
|
};
|
|
21827
21961
|
return [legend];
|
|
21828
21962
|
}
|
|
@@ -21945,8 +22079,8 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
21945
22079
|
return totalValue;
|
|
21946
22080
|
}
|
|
21947
22081
|
};
|
|
21948
|
-
__publicField$
|
|
21949
|
-
__publicField$
|
|
22082
|
+
__publicField$e(_NgwWebmapItem, "GetAdapterFromLayerType", {});
|
|
22083
|
+
__publicField$e(_NgwWebmapItem, "options", {
|
|
21950
22084
|
properties: [
|
|
21951
22085
|
{
|
|
21952
22086
|
type: "boolean",
|
|
@@ -21986,23 +22120,23 @@ __publicField$d(_NgwWebmapItem, "options", {
|
|
|
21986
22120
|
});
|
|
21987
22121
|
let NgwWebmapItem = _NgwWebmapItem;
|
|
21988
22122
|
|
|
21989
|
-
var __defProp$
|
|
22123
|
+
var __defProp$h = Object.defineProperty;
|
|
21990
22124
|
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
21991
22125
|
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
21992
22126
|
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
21993
|
-
var __defNormalProp$
|
|
22127
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21994
22128
|
var __spreadValues$9 = (a, b) => {
|
|
21995
22129
|
for (var prop in b || (b = {}))
|
|
21996
22130
|
if (__hasOwnProp$a.call(b, prop))
|
|
21997
|
-
__defNormalProp$
|
|
22131
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
21998
22132
|
if (__getOwnPropSymbols$a)
|
|
21999
22133
|
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
22000
22134
|
if (__propIsEnum$a.call(b, prop))
|
|
22001
|
-
__defNormalProp$
|
|
22135
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
22002
22136
|
}
|
|
22003
22137
|
return a;
|
|
22004
22138
|
};
|
|
22005
|
-
var __publicField$
|
|
22139
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22006
22140
|
var __async$b = (__this, __arguments, generator) => {
|
|
22007
22141
|
return new Promise((resolve, reject) => {
|
|
22008
22142
|
var fulfilled = (value) => {
|
|
@@ -22032,10 +22166,10 @@ function createOnFirstShowAdapter(_0) {
|
|
|
22032
22166
|
}) {
|
|
22033
22167
|
class OnFirstShowAdapter {
|
|
22034
22168
|
constructor() {
|
|
22035
|
-
__publicField$
|
|
22036
|
-
__publicField$
|
|
22037
|
-
__publicField$
|
|
22038
|
-
__publicField$
|
|
22169
|
+
__publicField$d(this, "options", {});
|
|
22170
|
+
__publicField$d(this, "layer", []);
|
|
22171
|
+
__publicField$d(this, "_removed", false);
|
|
22172
|
+
__publicField$d(this, "_creatingInProgress", false);
|
|
22039
22173
|
}
|
|
22040
22174
|
addLayer() {
|
|
22041
22175
|
return this.layer;
|
|
@@ -22163,26 +22297,26 @@ function createOnFirstShowNgwAdapter(_0) {
|
|
|
22163
22297
|
|
|
22164
22298
|
const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
|
|
22165
22299
|
|
|
22166
|
-
var __defProp$
|
|
22300
|
+
var __defProp$g = Object.defineProperty;
|
|
22167
22301
|
var __defProps$6 = Object.defineProperties;
|
|
22168
22302
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
22169
22303
|
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
22170
22304
|
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
22171
22305
|
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
22172
|
-
var __defNormalProp$
|
|
22306
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22173
22307
|
var __spreadValues$8 = (a, b) => {
|
|
22174
22308
|
for (var prop in b || (b = {}))
|
|
22175
22309
|
if (__hasOwnProp$9.call(b, prop))
|
|
22176
|
-
__defNormalProp$
|
|
22310
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
22177
22311
|
if (__getOwnPropSymbols$9)
|
|
22178
22312
|
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
22179
22313
|
if (__propIsEnum$9.call(b, prop))
|
|
22180
|
-
__defNormalProp$
|
|
22314
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
22181
22315
|
}
|
|
22182
22316
|
return a;
|
|
22183
22317
|
};
|
|
22184
22318
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
22185
|
-
var __publicField$
|
|
22319
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22186
22320
|
var __async$9 = (__this, __arguments, generator) => {
|
|
22187
22321
|
return new Promise((resolve, reject) => {
|
|
22188
22322
|
var fulfilled = (value) => {
|
|
@@ -22207,21 +22341,21 @@ class NgwWebmapLayerAdapter {
|
|
|
22207
22341
|
constructor(map, options) {
|
|
22208
22342
|
this.map = map;
|
|
22209
22343
|
this.options = options;
|
|
22210
|
-
__publicField$
|
|
22211
|
-
__publicField$
|
|
22344
|
+
__publicField$c(this, "layer");
|
|
22345
|
+
__publicField$c(this, "NgwWebmapItem", NgwWebmapItem);
|
|
22212
22346
|
/**
|
|
22213
22347
|
* Radius for searching objects in pixels
|
|
22214
22348
|
*/
|
|
22215
|
-
__publicField$
|
|
22349
|
+
__publicField$c(this, "pixelRadius", 10);
|
|
22216
22350
|
// webmapSettings.identify_radius,
|
|
22217
|
-
__publicField$
|
|
22218
|
-
__publicField$
|
|
22219
|
-
__publicField$
|
|
22220
|
-
__publicField$
|
|
22221
|
-
__publicField$
|
|
22222
|
-
__publicField$
|
|
22223
|
-
__publicField$
|
|
22224
|
-
__publicField$
|
|
22351
|
+
__publicField$c(this, "resourceId");
|
|
22352
|
+
__publicField$c(this, "webmapClassName", "webmap");
|
|
22353
|
+
__publicField$c(this, "emitter", new EventEmitter());
|
|
22354
|
+
__publicField$c(this, "_extent");
|
|
22355
|
+
__publicField$c(this, "response");
|
|
22356
|
+
__publicField$c(this, "_webmapLayersIds");
|
|
22357
|
+
__publicField$c(this, "_webmapBaselayersIds", []);
|
|
22358
|
+
__publicField$c(this, "_lastActiveBaselayer");
|
|
22225
22359
|
const r = options.resourceId;
|
|
22226
22360
|
if (Array.isArray(r)) {
|
|
22227
22361
|
this.resourceId = r[0];
|
|
@@ -22530,23 +22664,23 @@ class NgwWebmapLayerAdapter {
|
|
|
22530
22664
|
}
|
|
22531
22665
|
}
|
|
22532
22666
|
|
|
22533
|
-
var __defProp$
|
|
22667
|
+
var __defProp$f = Object.defineProperty;
|
|
22534
22668
|
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
22535
22669
|
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
22536
22670
|
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
22537
|
-
var __defNormalProp$
|
|
22671
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22538
22672
|
var __spreadValues$7 = (a, b) => {
|
|
22539
22673
|
for (var prop in b || (b = {}))
|
|
22540
22674
|
if (__hasOwnProp$8.call(b, prop))
|
|
22541
|
-
__defNormalProp$
|
|
22675
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
22542
22676
|
if (__getOwnPropSymbols$8)
|
|
22543
22677
|
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
22544
22678
|
if (__propIsEnum$8.call(b, prop))
|
|
22545
|
-
__defNormalProp$
|
|
22679
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
22546
22680
|
}
|
|
22547
22681
|
return a;
|
|
22548
22682
|
};
|
|
22549
|
-
var __publicField$
|
|
22683
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22550
22684
|
var __async$8 = (__this, __arguments, generator) => {
|
|
22551
22685
|
return new Promise((resolve, reject) => {
|
|
22552
22686
|
var fulfilled = (value) => {
|
|
@@ -22570,9 +22704,9 @@ var __async$8 = (__this, __arguments, generator) => {
|
|
|
22570
22704
|
class NgwKit {
|
|
22571
22705
|
constructor(options) {
|
|
22572
22706
|
this.options = options;
|
|
22573
|
-
__publicField$
|
|
22574
|
-
__publicField$
|
|
22575
|
-
__publicField$
|
|
22707
|
+
__publicField$b(this, "url");
|
|
22708
|
+
__publicField$b(this, "connector");
|
|
22709
|
+
__publicField$b(this, "webMap");
|
|
22576
22710
|
if (this.options.connector) {
|
|
22577
22711
|
this.url = this.options.connector.options.baseUrl || "";
|
|
22578
22712
|
this.connector = this.options.connector;
|
|
@@ -22633,37 +22767,37 @@ class NgwKit {
|
|
|
22633
22767
|
}
|
|
22634
22768
|
}
|
|
22635
22769
|
|
|
22636
|
-
var __defProp$
|
|
22770
|
+
var __defProp$e = Object.defineProperty;
|
|
22637
22771
|
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
22638
22772
|
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
22639
22773
|
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
22640
|
-
var __defNormalProp$
|
|
22774
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22641
22775
|
var __spreadValues$6 = (a, b) => {
|
|
22642
22776
|
for (var prop in b || (b = {}))
|
|
22643
22777
|
if (__hasOwnProp$7.call(b, prop))
|
|
22644
|
-
__defNormalProp$
|
|
22778
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
22645
22779
|
if (__getOwnPropSymbols$7)
|
|
22646
22780
|
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
22647
22781
|
if (__propIsEnum$7.call(b, prop))
|
|
22648
|
-
__defNormalProp$
|
|
22782
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
22649
22783
|
}
|
|
22650
22784
|
return a;
|
|
22651
22785
|
};
|
|
22652
|
-
var __publicField$
|
|
22786
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22653
22787
|
class IdentifyItem {
|
|
22654
22788
|
constructor(options) {
|
|
22655
|
-
__publicField$
|
|
22656
|
-
__publicField$
|
|
22657
|
-
__publicField$
|
|
22658
|
-
__publicField$
|
|
22659
|
-
__publicField$
|
|
22660
|
-
__publicField$
|
|
22661
|
-
__publicField$
|
|
22662
|
-
__publicField$
|
|
22663
|
-
__publicField$
|
|
22664
|
-
__publicField$
|
|
22665
|
-
__publicField$
|
|
22666
|
-
__publicField$
|
|
22789
|
+
__publicField$a(this, "id");
|
|
22790
|
+
__publicField$a(this, "label");
|
|
22791
|
+
__publicField$a(this, "layerId");
|
|
22792
|
+
__publicField$a(this, "parent");
|
|
22793
|
+
__publicField$a(this, "fields");
|
|
22794
|
+
__publicField$a(this, "geom");
|
|
22795
|
+
__publicField$a(this, "extensions");
|
|
22796
|
+
__publicField$a(this, "connector");
|
|
22797
|
+
__publicField$a(this, "_item");
|
|
22798
|
+
__publicField$a(this, "_geojson");
|
|
22799
|
+
__publicField$a(this, "_resource");
|
|
22800
|
+
__publicField$a(this, "_extent");
|
|
22667
22801
|
const f = options.feature;
|
|
22668
22802
|
this.id = f.id;
|
|
22669
22803
|
this.geom = f.geom;
|
|
@@ -22749,21 +22883,21 @@ function fetchNgwLayerFeature(options) {
|
|
|
22749
22883
|
});
|
|
22750
22884
|
}
|
|
22751
22885
|
|
|
22752
|
-
var __defProp$
|
|
22886
|
+
var __defProp$d = Object.defineProperty;
|
|
22753
22887
|
var __defProps$5 = Object.defineProperties;
|
|
22754
22888
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
22755
22889
|
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
22756
22890
|
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
22757
22891
|
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
22758
|
-
var __defNormalProp$
|
|
22892
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22759
22893
|
var __spreadValues$5 = (a, b) => {
|
|
22760
22894
|
for (var prop in b || (b = {}))
|
|
22761
22895
|
if (__hasOwnProp$6.call(b, prop))
|
|
22762
|
-
__defNormalProp$
|
|
22896
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
22763
22897
|
if (__getOwnPropSymbols$6)
|
|
22764
22898
|
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
22765
22899
|
if (__propIsEnum$6.call(b, prop))
|
|
22766
|
-
__defNormalProp$
|
|
22900
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
22767
22901
|
}
|
|
22768
22902
|
return a;
|
|
22769
22903
|
};
|
|
@@ -22967,95 +23101,95 @@ function getCompanyLogo(connector, options) {
|
|
|
22967
23101
|
});
|
|
22968
23102
|
}
|
|
22969
23103
|
|
|
22970
|
-
var __defProp$
|
|
22971
|
-
var __defNormalProp$
|
|
22972
|
-
var __publicField$
|
|
23104
|
+
var __defProp$c = Object.defineProperty;
|
|
23105
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23106
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22973
23107
|
class KeyCodes {
|
|
22974
23108
|
constructor() {
|
|
22975
|
-
__publicField$
|
|
22976
|
-
__publicField$
|
|
22977
|
-
__publicField$
|
|
22978
|
-
__publicField$
|
|
22979
|
-
__publicField$
|
|
22980
|
-
__publicField$
|
|
22981
|
-
__publicField$
|
|
22982
|
-
__publicField$
|
|
22983
|
-
__publicField$
|
|
22984
|
-
__publicField$
|
|
22985
|
-
__publicField$
|
|
22986
|
-
__publicField$
|
|
22987
|
-
__publicField$
|
|
22988
|
-
__publicField$
|
|
22989
|
-
__publicField$
|
|
22990
|
-
__publicField$
|
|
22991
|
-
__publicField$
|
|
22992
|
-
__publicField$
|
|
22993
|
-
__publicField$
|
|
22994
|
-
__publicField$
|
|
22995
|
-
__publicField$
|
|
22996
|
-
__publicField$
|
|
22997
|
-
__publicField$
|
|
22998
|
-
__publicField$
|
|
22999
|
-
__publicField$
|
|
23000
|
-
__publicField$
|
|
23001
|
-
__publicField$
|
|
23002
|
-
__publicField$
|
|
23003
|
-
__publicField$
|
|
23004
|
-
__publicField$
|
|
23005
|
-
__publicField$
|
|
23006
|
-
__publicField$
|
|
23007
|
-
__publicField$
|
|
23008
|
-
__publicField$
|
|
23009
|
-
__publicField$
|
|
23010
|
-
__publicField$
|
|
23011
|
-
__publicField$
|
|
23012
|
-
__publicField$
|
|
23013
|
-
__publicField$
|
|
23014
|
-
__publicField$
|
|
23015
|
-
__publicField$
|
|
23016
|
-
__publicField$
|
|
23017
|
-
__publicField$
|
|
23018
|
-
__publicField$
|
|
23019
|
-
__publicField$
|
|
23020
|
-
__publicField$
|
|
23021
|
-
__publicField$
|
|
23022
|
-
__publicField$
|
|
23023
|
-
__publicField$
|
|
23024
|
-
__publicField$
|
|
23025
|
-
__publicField$
|
|
23026
|
-
__publicField$
|
|
23027
|
-
__publicField$
|
|
23028
|
-
__publicField$
|
|
23109
|
+
__publicField$9(this, "backspace", 8);
|
|
23110
|
+
__publicField$9(this, "tab", 9);
|
|
23111
|
+
__publicField$9(this, "enter", 13);
|
|
23112
|
+
__publicField$9(this, "shift", 16);
|
|
23113
|
+
__publicField$9(this, "ctrl", 17);
|
|
23114
|
+
__publicField$9(this, "alt", 18);
|
|
23115
|
+
__publicField$9(this, "pause/break", 19);
|
|
23116
|
+
__publicField$9(this, "caps_lock", 20);
|
|
23117
|
+
__publicField$9(this, "escape", 27);
|
|
23118
|
+
__publicField$9(this, "page_up", 33);
|
|
23119
|
+
__publicField$9(this, "page_down", 34);
|
|
23120
|
+
__publicField$9(this, "end", 35);
|
|
23121
|
+
__publicField$9(this, "home", 36);
|
|
23122
|
+
__publicField$9(this, "left_arrow", 37);
|
|
23123
|
+
__publicField$9(this, "up_arrow", 38);
|
|
23124
|
+
__publicField$9(this, "right_arrow", 39);
|
|
23125
|
+
__publicField$9(this, "down_arrow", 40);
|
|
23126
|
+
__publicField$9(this, "insert", 45);
|
|
23127
|
+
__publicField$9(this, "delete", 46);
|
|
23128
|
+
__publicField$9(this, "left_window_key", 91);
|
|
23129
|
+
__publicField$9(this, "right_window_key", 92);
|
|
23130
|
+
__publicField$9(this, "select_key", 93);
|
|
23131
|
+
__publicField$9(this, "numpad_0", 96);
|
|
23132
|
+
__publicField$9(this, "numpad_1", 97);
|
|
23133
|
+
__publicField$9(this, "numpad_2", 98);
|
|
23134
|
+
__publicField$9(this, "numpad_3", 99);
|
|
23135
|
+
__publicField$9(this, "numpad_4", 100);
|
|
23136
|
+
__publicField$9(this, "numpad_5", 101);
|
|
23137
|
+
__publicField$9(this, "numpad_6", 102);
|
|
23138
|
+
__publicField$9(this, "numpad_7", 103);
|
|
23139
|
+
__publicField$9(this, "numpad_8", 104);
|
|
23140
|
+
__publicField$9(this, "numpad_9", 105);
|
|
23141
|
+
__publicField$9(this, "multiply", 106);
|
|
23142
|
+
__publicField$9(this, "add", 107);
|
|
23143
|
+
__publicField$9(this, "subtract", 109);
|
|
23144
|
+
__publicField$9(this, "decimal_point", 110);
|
|
23145
|
+
__publicField$9(this, "divide", 111);
|
|
23146
|
+
__publicField$9(this, "f1", 112);
|
|
23147
|
+
__publicField$9(this, "f2", 113);
|
|
23148
|
+
__publicField$9(this, "f3", 114);
|
|
23149
|
+
__publicField$9(this, "f4", 115);
|
|
23150
|
+
__publicField$9(this, "f5", 116);
|
|
23151
|
+
__publicField$9(this, "f6", 117);
|
|
23152
|
+
__publicField$9(this, "f7", 118);
|
|
23153
|
+
__publicField$9(this, "f8", 119);
|
|
23154
|
+
__publicField$9(this, "f9", 120);
|
|
23155
|
+
__publicField$9(this, "f10", 121);
|
|
23156
|
+
__publicField$9(this, "f11", 122);
|
|
23157
|
+
__publicField$9(this, "f12", 123);
|
|
23158
|
+
__publicField$9(this, "num_lock", 144);
|
|
23159
|
+
__publicField$9(this, "scroll_lock", 145);
|
|
23160
|
+
__publicField$9(this, "semi-colon", 186);
|
|
23161
|
+
__publicField$9(this, "equal_sign", 187);
|
|
23162
|
+
__publicField$9(this, ",", 188);
|
|
23029
23163
|
// "comma";
|
|
23030
|
-
__publicField$
|
|
23164
|
+
__publicField$9(this, "-", 189);
|
|
23031
23165
|
// "dash";
|
|
23032
|
-
__publicField$
|
|
23166
|
+
__publicField$9(this, ".", 190);
|
|
23033
23167
|
// "period";
|
|
23034
|
-
__publicField$
|
|
23168
|
+
__publicField$9(this, "/", 191);
|
|
23035
23169
|
// "forward slash";
|
|
23036
|
-
__publicField$
|
|
23170
|
+
__publicField$9(this, "`", 192);
|
|
23037
23171
|
// "grave accent";
|
|
23038
|
-
__publicField$
|
|
23172
|
+
__publicField$9(this, "[", 219);
|
|
23039
23173
|
// "open bracket";
|
|
23040
|
-
__publicField$
|
|
23174
|
+
__publicField$9(this, "\\", 220);
|
|
23041
23175
|
// "back slash";
|
|
23042
|
-
__publicField$
|
|
23176
|
+
__publicField$9(this, "]", 221);
|
|
23043
23177
|
// "close braket";
|
|
23044
|
-
__publicField$
|
|
23178
|
+
__publicField$9(this, "'", 222);
|
|
23045
23179
|
}
|
|
23046
23180
|
// "single quote"
|
|
23047
23181
|
}
|
|
23048
23182
|
|
|
23049
|
-
var __defProp$
|
|
23050
|
-
var __defNormalProp$
|
|
23051
|
-
var __publicField$
|
|
23183
|
+
var __defProp$b = Object.defineProperty;
|
|
23184
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23185
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23052
23186
|
class Keys {
|
|
23053
23187
|
constructor() {
|
|
23054
|
-
__publicField$
|
|
23055
|
-
__publicField$
|
|
23056
|
-
__publicField$
|
|
23057
|
-
__publicField$
|
|
23058
|
-
__publicField$
|
|
23188
|
+
__publicField$8(this, "keyCodeAlias", new KeyCodes());
|
|
23189
|
+
__publicField$8(this, "keys", {});
|
|
23190
|
+
__publicField$8(this, "_windowOnFocus");
|
|
23191
|
+
__publicField$8(this, "_keysPressed");
|
|
23192
|
+
__publicField$8(this, "_keysReleased");
|
|
23059
23193
|
this._windowOnFocus = this.windowOnFocus.bind(this);
|
|
23060
23194
|
this._keysPressed = this.keysPressed.bind(this);
|
|
23061
23195
|
this._keysReleased = this.keysReleased.bind(this);
|
|
@@ -23094,15 +23228,15 @@ class Keys {
|
|
|
23094
23228
|
}
|
|
23095
23229
|
}
|
|
23096
23230
|
|
|
23097
|
-
var __defProp$
|
|
23098
|
-
var __defNormalProp$
|
|
23099
|
-
var __publicField$
|
|
23231
|
+
var __defProp$a = Object.defineProperty;
|
|
23232
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23233
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23100
23234
|
class StateItem {
|
|
23101
23235
|
constructor(webMap, opt) {
|
|
23102
23236
|
this.webMap = webMap;
|
|
23103
|
-
__publicField$
|
|
23104
|
-
__publicField$
|
|
23105
|
-
__publicField$
|
|
23237
|
+
__publicField$7(this, "name");
|
|
23238
|
+
__publicField$7(this, "event");
|
|
23239
|
+
__publicField$7(this, "value");
|
|
23106
23240
|
if (opt) {
|
|
23107
23241
|
if (opt.value) {
|
|
23108
23242
|
this.setValue(opt.value);
|
|
@@ -23111,7 +23245,11 @@ class StateItem {
|
|
|
23111
23245
|
this.name = opt.name;
|
|
23112
23246
|
}
|
|
23113
23247
|
if (opt.event) {
|
|
23114
|
-
|
|
23248
|
+
if (typeof opt.event === "string") {
|
|
23249
|
+
this.event = [opt.event];
|
|
23250
|
+
} else {
|
|
23251
|
+
this.event = opt.event;
|
|
23252
|
+
}
|
|
23115
23253
|
}
|
|
23116
23254
|
}
|
|
23117
23255
|
}
|
|
@@ -23123,6 +23261,34 @@ class StateItem {
|
|
|
23123
23261
|
}
|
|
23124
23262
|
}
|
|
23125
23263
|
|
|
23264
|
+
var __defProp$9 = Object.defineProperty;
|
|
23265
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23266
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23267
|
+
class BoundState extends StateItem {
|
|
23268
|
+
constructor() {
|
|
23269
|
+
super(...arguments);
|
|
23270
|
+
__publicField$6(this, "name", "bounds");
|
|
23271
|
+
__publicField$6(this, "event", ["moveend"]);
|
|
23272
|
+
}
|
|
23273
|
+
getValue() {
|
|
23274
|
+
return this.webMap.getBounds();
|
|
23275
|
+
}
|
|
23276
|
+
setValue(bounds) {
|
|
23277
|
+
this.webMap.setView({ bounds });
|
|
23278
|
+
}
|
|
23279
|
+
toString() {
|
|
23280
|
+
const data = this.getValue();
|
|
23281
|
+
if (data) {
|
|
23282
|
+
return data.slice(0, 4).map((x) => x.toFixed(5)).join("_");
|
|
23283
|
+
}
|
|
23284
|
+
return void 0;
|
|
23285
|
+
}
|
|
23286
|
+
parse(str) {
|
|
23287
|
+
const lngLat = str.split("_").map(Number);
|
|
23288
|
+
return lngLat;
|
|
23289
|
+
}
|
|
23290
|
+
}
|
|
23291
|
+
|
|
23126
23292
|
var __defProp$8 = Object.defineProperty;
|
|
23127
23293
|
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23128
23294
|
var __publicField$5 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -23130,7 +23296,7 @@ class CenterState extends StateItem {
|
|
|
23130
23296
|
constructor() {
|
|
23131
23297
|
super(...arguments);
|
|
23132
23298
|
__publicField$5(this, "name", "center");
|
|
23133
|
-
__publicField$5(this, "event", "moveend");
|
|
23299
|
+
__publicField$5(this, "event", ["moveend"]);
|
|
23134
23300
|
}
|
|
23135
23301
|
getValue() {
|
|
23136
23302
|
return this.webMap.getCenter();
|
|
@@ -23138,9 +23304,13 @@ class CenterState extends StateItem {
|
|
|
23138
23304
|
setValue(val) {
|
|
23139
23305
|
this.webMap.setCenter(val);
|
|
23140
23306
|
}
|
|
23141
|
-
toString(
|
|
23142
|
-
const
|
|
23143
|
-
|
|
23307
|
+
toString() {
|
|
23308
|
+
const data = this.getValue();
|
|
23309
|
+
if (data) {
|
|
23310
|
+
const d = data.map((x) => x.toFixed(5));
|
|
23311
|
+
return d[0] + "_" + d[1];
|
|
23312
|
+
}
|
|
23313
|
+
return "";
|
|
23144
23314
|
}
|
|
23145
23315
|
parse(str) {
|
|
23146
23316
|
const lngLat = str.split("_").map(Number);
|
|
@@ -23155,7 +23325,7 @@ class ZoomState extends StateItem {
|
|
|
23155
23325
|
constructor() {
|
|
23156
23326
|
super(...arguments);
|
|
23157
23327
|
__publicField$4(this, "name", "zoom");
|
|
23158
|
-
__publicField$4(this, "event", "zoomend");
|
|
23328
|
+
__publicField$4(this, "event", ["zoomend"]);
|
|
23159
23329
|
}
|
|
23160
23330
|
getValue() {
|
|
23161
23331
|
const zoom = this.webMap.getZoom();
|
|
@@ -23164,8 +23334,8 @@ class ZoomState extends StateItem {
|
|
|
23164
23334
|
setValue(val) {
|
|
23165
23335
|
this.webMap.setZoom(val);
|
|
23166
23336
|
}
|
|
23167
|
-
toString(
|
|
23168
|
-
return String(
|
|
23337
|
+
toString() {
|
|
23338
|
+
return String(this.getValue());
|
|
23169
23339
|
}
|
|
23170
23340
|
parse(str) {
|
|
23171
23341
|
return Number(str);
|
|
@@ -23234,14 +23404,14 @@ const _WebMapMain = class _WebMapMain {
|
|
|
23234
23404
|
__publicField$3(this, "mapAdapter");
|
|
23235
23405
|
__publicField$3(this, "runtimeParams", []);
|
|
23236
23406
|
__publicField$3(this, "getPaintFunctions", _WebMapMain.getPaintFunctions);
|
|
23237
|
-
__publicField$3(this, "
|
|
23407
|
+
__publicField$3(this, "mapStateItems", [CenterState, ZoomState, BoundState]);
|
|
23238
23408
|
__publicField$3(this, "id", ID++);
|
|
23239
23409
|
/**
|
|
23240
23410
|
* From runtime params
|
|
23241
23411
|
*/
|
|
23412
|
+
__publicField$3(this, "mapState", []);
|
|
23242
23413
|
__publicField$3(this, "_initMapState", {});
|
|
23243
23414
|
__publicField$3(this, "_starterKits");
|
|
23244
|
-
__publicField$3(this, "_mapState", []);
|
|
23245
23415
|
__publicField$3(this, "_extent");
|
|
23246
23416
|
__publicField$3(this, "_eventsStatus", {});
|
|
23247
23417
|
__publicField$3(this, "_coordFromMapClickAbort");
|
|
@@ -23276,7 +23446,7 @@ const _WebMapMain = class _WebMapMain {
|
|
|
23276
23446
|
create() {
|
|
23277
23447
|
return __async$5(this, null, function* () {
|
|
23278
23448
|
if (!this.getEventStatus("create")) {
|
|
23279
|
-
yield this._setInitMapState(this.
|
|
23449
|
+
yield this._setInitMapState(this.mapStateItems);
|
|
23280
23450
|
yield this._setupMap();
|
|
23281
23451
|
this._emitStatusEvent("create", this);
|
|
23282
23452
|
}
|
|
@@ -23296,16 +23466,22 @@ const _WebMapMain = class _WebMapMain {
|
|
|
23296
23466
|
this.mapAdapter.destroy();
|
|
23297
23467
|
}
|
|
23298
23468
|
}
|
|
23299
|
-
|
|
23469
|
+
mapStateWithFunc(func) {
|
|
23300
23470
|
const state = {};
|
|
23301
|
-
this.
|
|
23302
|
-
state[x.name] = x
|
|
23471
|
+
this.mapState.forEach((x) => {
|
|
23472
|
+
state[x.name] = func(x);
|
|
23303
23473
|
});
|
|
23304
23474
|
return state;
|
|
23305
23475
|
}
|
|
23476
|
+
getStateAsString() {
|
|
23477
|
+
return this.mapStateWithFunc((x) => x.toString());
|
|
23478
|
+
}
|
|
23479
|
+
getState() {
|
|
23480
|
+
return this.mapStateWithFunc((x) => x.getValue());
|
|
23481
|
+
}
|
|
23306
23482
|
getRuntimeParams() {
|
|
23307
23483
|
const state = {};
|
|
23308
|
-
this.
|
|
23484
|
+
this.mapState.forEach((x) => {
|
|
23309
23485
|
for (const r of this.runtimeParams) {
|
|
23310
23486
|
const val = r.get(x.name);
|
|
23311
23487
|
if (val !== void 0) {
|
|
@@ -23647,7 +23823,7 @@ const _WebMapMain = class _WebMapMain {
|
|
|
23647
23823
|
_setInitMapState(states) {
|
|
23648
23824
|
for (const X of states) {
|
|
23649
23825
|
const state = new X(this);
|
|
23650
|
-
this.
|
|
23826
|
+
this.mapState.push(state);
|
|
23651
23827
|
for (const r of this.runtimeParams) {
|
|
23652
23828
|
const str = r.get(state.name);
|
|
23653
23829
|
if (str !== void 0) {
|
|
@@ -23683,13 +23859,15 @@ const _WebMapMain = class _WebMapMain {
|
|
|
23683
23859
|
events.forEach((x) => {
|
|
23684
23860
|
this._mapEvents[x] = (data) => {
|
|
23685
23861
|
if (this.runtimeParams.length) {
|
|
23686
|
-
const
|
|
23687
|
-
|
|
23688
|
-
|
|
23862
|
+
const mapStatusEvents = this.mapState.filter(
|
|
23863
|
+
(y) => y.event.includes(x)
|
|
23864
|
+
);
|
|
23865
|
+
mapStatusEvents.forEach((mapStatusEvent) => {
|
|
23866
|
+
const value = mapStatusEvent.toString();
|
|
23689
23867
|
this.runtimeParams.forEach((r) => {
|
|
23690
23868
|
r.set(mapStatusEvent.name, value);
|
|
23691
23869
|
});
|
|
23692
|
-
}
|
|
23870
|
+
});
|
|
23693
23871
|
}
|
|
23694
23872
|
if (this._eventsStatus) {
|
|
23695
23873
|
this.emitter.emit(x, data);
|
|
@@ -24265,11 +24443,11 @@ class WebMapLayers extends WebMapMain {
|
|
|
24265
24443
|
}
|
|
24266
24444
|
return Promise.resolve();
|
|
24267
24445
|
}
|
|
24268
|
-
updateLayer(layerDef) {
|
|
24446
|
+
updateLayer(layerDef, options) {
|
|
24269
24447
|
const layer = this.getLayer(layerDef);
|
|
24270
24448
|
if (layer) {
|
|
24271
24449
|
if (layer.updateLayer) {
|
|
24272
|
-
return Promise.resolve(layer.updateLayer());
|
|
24450
|
+
return Promise.resolve(layer.updateLayer(options));
|
|
24273
24451
|
} else if (this.isLayerVisible(layer)) {
|
|
24274
24452
|
return this.hideLayer(layer, { silent: true }).then(() => {
|
|
24275
24453
|
return this.showLayer(layer, { silent: true });
|