@nextgis/ngw-leaflet 3.0.0-alpha.2 → 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 +765 -588
- 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 +765 -588
- 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 +5 -5
|
@@ -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,15 +18095,15 @@ 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.
|
|
18074
|
-
"@nextgis/cancelable-promise": "^3.0.0-alpha.
|
|
18075
|
-
"@nextgis/utils": "^3.0.0-alpha.
|
|
18098
|
+
"@nextgis/cache": "^3.0.0-alpha.4",
|
|
18099
|
+
"@nextgis/cancelable-promise": "^3.0.0-alpha.3",
|
|
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"
|
|
18079
18104
|
},
|
|
18080
18105
|
devDependencies: {
|
|
18081
|
-
"@nextgis/build-tools": "^3.0.0-alpha.
|
|
18106
|
+
"@nextgis/build-tools": "^3.0.0-alpha.3"
|
|
18082
18107
|
},
|
|
18083
18108
|
scripts: {
|
|
18084
18109
|
clean: "rimraf ./lib",
|
|
@@ -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) {
|
|
@@ -18881,8 +18906,7 @@ class NgwConnector {
|
|
|
18881
18906
|
credentials = credentials || this.options.auth;
|
|
18882
18907
|
if (credentials) {
|
|
18883
18908
|
const { login, password } = credentials;
|
|
18884
|
-
const
|
|
18885
|
-
const encodedStr = encodeURIComponent(str);
|
|
18909
|
+
const encodedStr = [login, password].map(encodeURIComponent).join(":");
|
|
18886
18910
|
{
|
|
18887
18911
|
return window.btoa(encodedStr);
|
|
18888
18912
|
}
|
|
@@ -19029,7 +19053,7 @@ class NgwConnector {
|
|
|
19029
19053
|
throw new Error("Empty `url` not allowed");
|
|
19030
19054
|
}
|
|
19031
19055
|
if (params) {
|
|
19032
|
-
const _a = params, restParams = __objRest$
|
|
19056
|
+
const _a = params, restParams = __objRest$3(_a, ["paramList"]);
|
|
19033
19057
|
url = template(url, restParams);
|
|
19034
19058
|
}
|
|
19035
19059
|
url = encodeURI(fixUrlStr(url));
|
|
@@ -19065,7 +19089,7 @@ class NgwConnector {
|
|
|
19065
19089
|
}
|
|
19066
19090
|
});
|
|
19067
19091
|
if (cache && method === "GET") {
|
|
19068
|
-
const cacheOptions = cacheProps ? cacheProps : __spreadProps$
|
|
19092
|
+
const cacheOptions = cacheProps ? cacheProps : __spreadProps$h(__spreadValues$q({}, objectRemoveEmpty({
|
|
19069
19093
|
headers,
|
|
19070
19094
|
withCredentials,
|
|
19071
19095
|
responseType,
|
|
@@ -19227,30 +19251,30 @@ class NgwConnector {
|
|
|
19227
19251
|
return er;
|
|
19228
19252
|
}
|
|
19229
19253
|
}
|
|
19230
|
-
__publicField$
|
|
19254
|
+
__publicField$q(NgwConnector, "errors", {
|
|
19231
19255
|
NgwError,
|
|
19232
19256
|
ResourceNotFoundError
|
|
19233
19257
|
});
|
|
19234
19258
|
|
|
19235
|
-
var __defProp$
|
|
19236
|
-
var __defProps$
|
|
19237
|
-
var __getOwnPropDescs$
|
|
19259
|
+
var __defProp$A = Object.defineProperty;
|
|
19260
|
+
var __defProps$g = Object.defineProperties;
|
|
19261
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
19238
19262
|
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
19239
19263
|
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
19240
19264
|
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
19241
|
-
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;
|
|
19242
19266
|
var __spreadValues$p = (a, b) => {
|
|
19243
19267
|
for (var prop in b || (b = {}))
|
|
19244
19268
|
if (__hasOwnProp$q.call(b, prop))
|
|
19245
|
-
__defNormalProp$
|
|
19269
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
19246
19270
|
if (__getOwnPropSymbols$q)
|
|
19247
19271
|
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
19248
19272
|
if (__propIsEnum$q.call(b, prop))
|
|
19249
|
-
__defNormalProp$
|
|
19273
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
19250
19274
|
}
|
|
19251
19275
|
return a;
|
|
19252
19276
|
};
|
|
19253
|
-
var __spreadProps$
|
|
19277
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
19254
19278
|
var __async$o = (__this, __arguments, generator) => {
|
|
19255
19279
|
return new Promise((resolve, reject) => {
|
|
19256
19280
|
var fulfilled = (value) => {
|
|
@@ -19355,13 +19379,13 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
19355
19379
|
for (const f of filters_) {
|
|
19356
19380
|
if (isPropertyFilter(f)) {
|
|
19357
19381
|
_queries.push(
|
|
19358
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
19382
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19359
19383
|
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
19360
19384
|
}))
|
|
19361
19385
|
);
|
|
19362
19386
|
} else {
|
|
19363
19387
|
getQueries(
|
|
19364
|
-
__spreadProps$
|
|
19388
|
+
__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19365
19389
|
filters: f
|
|
19366
19390
|
}),
|
|
19367
19391
|
_queries,
|
|
@@ -19382,7 +19406,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
19382
19406
|
if (propertiesFilterList.length) {
|
|
19383
19407
|
for (const x of propertiesFilterList) {
|
|
19384
19408
|
getQueries(
|
|
19385
|
-
__spreadProps$
|
|
19409
|
+
__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19386
19410
|
filters: x
|
|
19387
19411
|
}),
|
|
19388
19412
|
_queries,
|
|
@@ -19391,7 +19415,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
19391
19415
|
}
|
|
19392
19416
|
} else {
|
|
19393
19417
|
_queries.push(
|
|
19394
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
19418
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19395
19419
|
paramList: [..._parentAllParams, ...paramList, ...filters2]
|
|
19396
19420
|
}))
|
|
19397
19421
|
);
|
|
@@ -19456,25 +19480,25 @@ function fetchNgwLayerItemsRequest(options) {
|
|
|
19456
19480
|
);
|
|
19457
19481
|
}
|
|
19458
19482
|
|
|
19459
|
-
var __defProp$
|
|
19460
|
-
var __defProps$
|
|
19461
|
-
var __getOwnPropDescs$
|
|
19483
|
+
var __defProp$z = Object.defineProperty;
|
|
19484
|
+
var __defProps$f = Object.defineProperties;
|
|
19485
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
19462
19486
|
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
19463
19487
|
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
19464
19488
|
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
19465
|
-
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;
|
|
19466
19490
|
var __spreadValues$o = (a, b) => {
|
|
19467
19491
|
for (var prop in b || (b = {}))
|
|
19468
19492
|
if (__hasOwnProp$p.call(b, prop))
|
|
19469
|
-
__defNormalProp$
|
|
19493
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
19470
19494
|
if (__getOwnPropSymbols$p)
|
|
19471
19495
|
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
19472
19496
|
if (__propIsEnum$p.call(b, prop))
|
|
19473
|
-
__defNormalProp$
|
|
19497
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
19474
19498
|
}
|
|
19475
19499
|
return a;
|
|
19476
19500
|
};
|
|
19477
|
-
var __spreadProps$
|
|
19501
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
19478
19502
|
var __async$n = (__this, __arguments, generator) => {
|
|
19479
19503
|
return new Promise((resolve, reject) => {
|
|
19480
19504
|
var fulfilled = (value) => {
|
|
@@ -19512,45 +19536,45 @@ function fetchNgwLayerItem(options) {
|
|
|
19512
19536
|
if (resp.geom) {
|
|
19513
19537
|
return createGeoJsonFeature(resp);
|
|
19514
19538
|
} else {
|
|
19515
|
-
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$
|
|
19539
|
+
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$f(__spreadValues$o({}, options), {
|
|
19516
19540
|
geom: true,
|
|
19517
19541
|
fields: null,
|
|
19518
19542
|
extensions: null
|
|
19519
19543
|
}));
|
|
19520
19544
|
const geom = onlyGeomItem.geom;
|
|
19521
|
-
return createGeoJsonFeature(__spreadProps$
|
|
19545
|
+
return createGeoJsonFeature(__spreadProps$f(__spreadValues$o({}, resp), { geom }));
|
|
19522
19546
|
}
|
|
19523
19547
|
});
|
|
19524
|
-
return __spreadProps$
|
|
19548
|
+
return __spreadProps$f(__spreadValues$o({}, resp), {
|
|
19525
19549
|
toGeojson
|
|
19526
19550
|
});
|
|
19527
19551
|
});
|
|
19528
19552
|
}
|
|
19529
19553
|
|
|
19530
|
-
var __defProp$
|
|
19554
|
+
var __defProp$y = Object.defineProperty;
|
|
19531
19555
|
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
19532
19556
|
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
19533
19557
|
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
19534
|
-
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;
|
|
19535
19559
|
var __spreadValues$n = (a, b) => {
|
|
19536
19560
|
for (var prop in b || (b = {}))
|
|
19537
19561
|
if (__hasOwnProp$o.call(b, prop))
|
|
19538
|
-
__defNormalProp$
|
|
19562
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
19539
19563
|
if (__getOwnPropSymbols$o)
|
|
19540
19564
|
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
19541
19565
|
if (__propIsEnum$o.call(b, prop))
|
|
19542
|
-
__defNormalProp$
|
|
19566
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
19543
19567
|
}
|
|
19544
19568
|
return a;
|
|
19545
19569
|
};
|
|
19546
|
-
var __publicField$
|
|
19570
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19547
19571
|
class BookmarkItem {
|
|
19548
19572
|
constructor(options) {
|
|
19549
19573
|
this.options = options;
|
|
19550
|
-
__publicField$
|
|
19551
|
-
__publicField$
|
|
19552
|
-
__publicField$
|
|
19553
|
-
__publicField$
|
|
19574
|
+
__publicField$p(this, "name");
|
|
19575
|
+
__publicField$p(this, "resourceId");
|
|
19576
|
+
__publicField$p(this, "item");
|
|
19577
|
+
__publicField$p(this, "_extent");
|
|
19554
19578
|
this.resourceId = options.resourceId;
|
|
19555
19579
|
const item = options.item;
|
|
19556
19580
|
this.item = item;
|
|
@@ -19696,14 +19720,14 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
|
|
|
19696
19720
|
return true;
|
|
19697
19721
|
}
|
|
19698
19722
|
|
|
19699
|
-
var __defProp$
|
|
19700
|
-
var __defNormalProp$
|
|
19701
|
-
var __publicField$
|
|
19702
|
-
class TreeHelper {
|
|
19703
|
-
constructor(item) {
|
|
19704
|
-
__publicField$
|
|
19705
|
-
__publicField$
|
|
19706
|
-
__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");
|
|
19707
19731
|
this.item = item;
|
|
19708
19732
|
}
|
|
19709
19733
|
setParent(parent) {
|
|
@@ -19766,19 +19790,19 @@ class TreeHelper {
|
|
|
19766
19790
|
}
|
|
19767
19791
|
}
|
|
19768
19792
|
|
|
19769
|
-
var __defProp$
|
|
19770
|
-
var __defNormalProp$
|
|
19771
|
-
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);
|
|
19772
19796
|
class BaseProperty {
|
|
19773
19797
|
constructor(name, item, options) {
|
|
19774
|
-
__publicField$
|
|
19775
|
-
__publicField$
|
|
19776
|
-
__publicField$
|
|
19777
|
-
__publicField$
|
|
19778
|
-
__publicField$
|
|
19779
|
-
__publicField$
|
|
19780
|
-
__publicField$
|
|
19781
|
-
__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");
|
|
19782
19806
|
this.item = item;
|
|
19783
19807
|
this.options = Object.assign({}, options);
|
|
19784
19808
|
this.name = name;
|
|
@@ -19875,23 +19899,23 @@ class BaseProperty {
|
|
|
19875
19899
|
}
|
|
19876
19900
|
}
|
|
19877
19901
|
|
|
19878
|
-
var __defProp$
|
|
19902
|
+
var __defProp$v = Object.defineProperty;
|
|
19879
19903
|
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
19880
19904
|
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
19881
19905
|
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
19882
|
-
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;
|
|
19883
19907
|
var __spreadValues$m = (a, b) => {
|
|
19884
19908
|
for (var prop in b || (b = {}))
|
|
19885
19909
|
if (__hasOwnProp$n.call(b, prop))
|
|
19886
|
-
__defNormalProp$
|
|
19910
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
19887
19911
|
if (__getOwnPropSymbols$n)
|
|
19888
19912
|
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
19889
19913
|
if (__propIsEnum$n.call(b, prop))
|
|
19890
|
-
__defNormalProp$
|
|
19914
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
19891
19915
|
}
|
|
19892
19916
|
return a;
|
|
19893
19917
|
};
|
|
19894
|
-
var __publicField$
|
|
19918
|
+
var __publicField$m = (obj, key, value) => __defNormalProp$v(obj, key + "" , value);
|
|
19895
19919
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
19896
19920
|
constructor(name, item, options) {
|
|
19897
19921
|
super(name, item, __spreadValues$m(__spreadValues$m({}, _CheckProperty.options), options));
|
|
@@ -19999,7 +20023,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
|
19999
20023
|
}
|
|
20000
20024
|
}
|
|
20001
20025
|
};
|
|
20002
|
-
__publicField$
|
|
20026
|
+
__publicField$m(_CheckProperty, "options", {
|
|
20003
20027
|
hierarchy: true,
|
|
20004
20028
|
bubble: false,
|
|
20005
20029
|
propagation: false,
|
|
@@ -20008,31 +20032,31 @@ __publicField$l(_CheckProperty, "options", {
|
|
|
20008
20032
|
});
|
|
20009
20033
|
let CheckProperty = _CheckProperty;
|
|
20010
20034
|
|
|
20011
|
-
var __defProp$
|
|
20035
|
+
var __defProp$u = Object.defineProperty;
|
|
20012
20036
|
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
20013
20037
|
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
20014
20038
|
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
20015
|
-
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;
|
|
20016
20040
|
var __spreadValues$l = (a, b) => {
|
|
20017
20041
|
for (var prop in b || (b = {}))
|
|
20018
20042
|
if (__hasOwnProp$m.call(b, prop))
|
|
20019
|
-
__defNormalProp$
|
|
20043
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
20020
20044
|
if (__getOwnPropSymbols$m)
|
|
20021
20045
|
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
20022
20046
|
if (__propIsEnum$m.call(b, prop))
|
|
20023
|
-
__defNormalProp$
|
|
20047
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
20024
20048
|
}
|
|
20025
20049
|
return a;
|
|
20026
20050
|
};
|
|
20027
|
-
var __publicField$
|
|
20051
|
+
var __publicField$l = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20028
20052
|
const BOOLEAN_TYPE = "boolean";
|
|
20029
20053
|
const STRING_TYPE = "string";
|
|
20030
20054
|
const _ItemProperties = class _ItemProperties {
|
|
20031
20055
|
constructor(item, propertiesList) {
|
|
20032
20056
|
this.item = item;
|
|
20033
|
-
__publicField$
|
|
20034
|
-
__publicField$
|
|
20035
|
-
__publicField$
|
|
20057
|
+
__publicField$l(this, "options", {});
|
|
20058
|
+
__publicField$l(this, "_properties", {});
|
|
20059
|
+
__publicField$l(this, "_propertiesList", []);
|
|
20036
20060
|
if (propertiesList) {
|
|
20037
20061
|
propertiesList.forEach(this._setPropertyHandler.bind(this));
|
|
20038
20062
|
}
|
|
@@ -20095,35 +20119,35 @@ const _ItemProperties = class _ItemProperties {
|
|
|
20095
20119
|
return Handler;
|
|
20096
20120
|
}
|
|
20097
20121
|
};
|
|
20098
|
-
__publicField$
|
|
20122
|
+
__publicField$l(_ItemProperties, "handlers", {
|
|
20099
20123
|
CheckProperty
|
|
20100
20124
|
});
|
|
20101
20125
|
let ItemProperties = _ItemProperties;
|
|
20102
20126
|
|
|
20103
|
-
var __defProp$
|
|
20127
|
+
var __defProp$t = Object.defineProperty;
|
|
20104
20128
|
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
20105
20129
|
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
20106
20130
|
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
20107
|
-
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;
|
|
20108
20132
|
var __spreadValues$k = (a, b) => {
|
|
20109
20133
|
for (var prop in b || (b = {}))
|
|
20110
20134
|
if (__hasOwnProp$l.call(b, prop))
|
|
20111
|
-
__defNormalProp$
|
|
20135
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
20112
20136
|
if (__getOwnPropSymbols$l)
|
|
20113
20137
|
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
20114
20138
|
if (__propIsEnum$l.call(b, prop))
|
|
20115
|
-
__defNormalProp$
|
|
20139
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
20116
20140
|
}
|
|
20117
20141
|
return a;
|
|
20118
20142
|
};
|
|
20119
|
-
var __publicField$
|
|
20143
|
+
var __publicField$k = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20120
20144
|
let ID$1 = 0;
|
|
20121
20145
|
class Item {
|
|
20122
20146
|
constructor(options) {
|
|
20123
|
-
__publicField$
|
|
20124
|
-
__publicField$
|
|
20125
|
-
__publicField$
|
|
20126
|
-
__publicField$
|
|
20147
|
+
__publicField$k(this, "options", {});
|
|
20148
|
+
__publicField$k(this, "properties");
|
|
20149
|
+
__publicField$k(this, "tree");
|
|
20150
|
+
__publicField$k(this, "id", ID$1);
|
|
20127
20151
|
ID$1 += 1;
|
|
20128
20152
|
this.options = __spreadValues$k({}, options);
|
|
20129
20153
|
this.tree = new TreeHelper(this);
|
|
@@ -20177,25 +20201,25 @@ class WebmapLayerOpacityPropertyHandler extends BaseProperty {
|
|
|
20177
20201
|
}
|
|
20178
20202
|
}
|
|
20179
20203
|
|
|
20180
|
-
var __defProp$
|
|
20181
|
-
var __defProps$
|
|
20182
|
-
var __getOwnPropDescs$
|
|
20204
|
+
var __defProp$s = Object.defineProperty;
|
|
20205
|
+
var __defProps$e = Object.defineProperties;
|
|
20206
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
20183
20207
|
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
20184
20208
|
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
20185
20209
|
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
20186
|
-
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;
|
|
20187
20211
|
var __spreadValues$j = (a, b) => {
|
|
20188
20212
|
for (var prop in b || (b = {}))
|
|
20189
20213
|
if (__hasOwnProp$k.call(b, prop))
|
|
20190
|
-
__defNormalProp$
|
|
20214
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
20191
20215
|
if (__getOwnPropSymbols$k)
|
|
20192
20216
|
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
20193
20217
|
if (__propIsEnum$k.call(b, prop))
|
|
20194
|
-
__defNormalProp$
|
|
20218
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
20195
20219
|
}
|
|
20196
20220
|
return a;
|
|
20197
20221
|
};
|
|
20198
|
-
var __spreadProps$
|
|
20222
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
20199
20223
|
function getNgwWebmapExtent(webmap) {
|
|
20200
20224
|
const bottom = webmap["extent_bottom"];
|
|
20201
20225
|
const left = webmap["extent_left"];
|
|
@@ -20263,14 +20287,14 @@ function fetchNgwResourceExtent(item, connector, options) {
|
|
|
20263
20287
|
if (resource.cls && resource.cls.indexOf("style") !== -1) {
|
|
20264
20288
|
return connector.getResource(resource.parent.id, options).then((res) => {
|
|
20265
20289
|
if (res) {
|
|
20266
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
20290
|
+
return fetchNgwLayerExtent(__spreadProps$e(__spreadValues$j({}, options), {
|
|
20267
20291
|
resourceId: res.resource.id,
|
|
20268
20292
|
connector
|
|
20269
20293
|
}));
|
|
20270
20294
|
}
|
|
20271
20295
|
});
|
|
20272
20296
|
} else {
|
|
20273
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
20297
|
+
return fetchNgwLayerExtent(__spreadProps$e(__spreadValues$j({}, options), {
|
|
20274
20298
|
resourceId: resource.id,
|
|
20275
20299
|
connector
|
|
20276
20300
|
}));
|
|
@@ -20278,9 +20302,9 @@ function fetchNgwResourceExtent(item, connector, options) {
|
|
|
20278
20302
|
}
|
|
20279
20303
|
}
|
|
20280
20304
|
|
|
20281
|
-
var __defProp$
|
|
20282
|
-
var __defNormalProp$
|
|
20283
|
-
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);
|
|
20284
20308
|
var __async$m = (__this, __arguments, generator) => {
|
|
20285
20309
|
return new Promise((resolve, reject) => {
|
|
20286
20310
|
var fulfilled = (value) => {
|
|
@@ -20303,9 +20327,9 @@ var __async$m = (__this, __arguments, generator) => {
|
|
|
20303
20327
|
};
|
|
20304
20328
|
class NgwResource {
|
|
20305
20329
|
constructor() {
|
|
20306
|
-
__publicField$
|
|
20307
|
-
__publicField$
|
|
20308
|
-
__publicField$
|
|
20330
|
+
__publicField$j(this, "item");
|
|
20331
|
+
__publicField$j(this, "connector");
|
|
20332
|
+
__publicField$j(this, "_extent");
|
|
20309
20333
|
}
|
|
20310
20334
|
/** @deprecated use {@link NgwResource.getBounds} instead */
|
|
20311
20335
|
getExtent() {
|
|
@@ -20424,23 +20448,23 @@ function updateQmsOptions(qms) {
|
|
|
20424
20448
|
};
|
|
20425
20449
|
}
|
|
20426
20450
|
|
|
20427
|
-
var __defProp$
|
|
20451
|
+
var __defProp$q = Object.defineProperty;
|
|
20428
20452
|
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
20429
20453
|
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
20430
20454
|
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
20431
|
-
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;
|
|
20432
20456
|
var __spreadValues$i = (a, b) => {
|
|
20433
20457
|
for (var prop in b || (b = {}))
|
|
20434
20458
|
if (__hasOwnProp$j.call(b, prop))
|
|
20435
|
-
__defNormalProp$
|
|
20459
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
20436
20460
|
if (__getOwnPropSymbols$j)
|
|
20437
20461
|
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
20438
20462
|
if (__propIsEnum$j.call(b, prop))
|
|
20439
|
-
__defNormalProp$
|
|
20463
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
20440
20464
|
}
|
|
20441
20465
|
return a;
|
|
20442
20466
|
};
|
|
20443
|
-
var __objRest$
|
|
20467
|
+
var __objRest$2 = (source, exclude) => {
|
|
20444
20468
|
var target = {};
|
|
20445
20469
|
for (var prop in source)
|
|
20446
20470
|
if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -20452,7 +20476,7 @@ var __objRest$1 = (source, exclude) => {
|
|
|
20452
20476
|
}
|
|
20453
20477
|
return target;
|
|
20454
20478
|
};
|
|
20455
|
-
var __publicField$
|
|
20479
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20456
20480
|
var __async$k = (__this, __arguments, generator) => {
|
|
20457
20481
|
return new Promise((resolve, reject) => {
|
|
20458
20482
|
var fulfilled = (value) => {
|
|
@@ -20473,11 +20497,11 @@ var __async$k = (__this, __arguments, generator) => {
|
|
|
20473
20497
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
20474
20498
|
});
|
|
20475
20499
|
};
|
|
20476
|
-
const URL = "https://qms.nextgis.com";
|
|
20477
|
-
function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
20500
|
+
const URL$1 = "https://qms.nextgis.com";
|
|
20501
|
+
function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
|
|
20478
20502
|
let webMap;
|
|
20479
20503
|
if ("webMap" in webMapOrOptions) {
|
|
20480
|
-
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"]);
|
|
20481
20505
|
webMap = webMap_;
|
|
20482
20506
|
if (url_) {
|
|
20483
20507
|
url = url_;
|
|
@@ -20489,13 +20513,13 @@ function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
|
20489
20513
|
webMap = webMapOrOptions;
|
|
20490
20514
|
}
|
|
20491
20515
|
if (!url) {
|
|
20492
|
-
url = URL;
|
|
20516
|
+
url = URL$1;
|
|
20493
20517
|
}
|
|
20494
20518
|
class QmsAdapter {
|
|
20495
20519
|
constructor(map, options) {
|
|
20496
|
-
__publicField$
|
|
20497
|
-
__publicField$
|
|
20498
|
-
__publicField$
|
|
20520
|
+
__publicField$i(this, "qms");
|
|
20521
|
+
__publicField$i(this, "options");
|
|
20522
|
+
__publicField$i(this, "map");
|
|
20499
20523
|
this.map = map;
|
|
20500
20524
|
const opt = __spreadValues$i(__spreadValues$i({}, createOpt), options);
|
|
20501
20525
|
this.options = opt;
|
|
@@ -20549,29 +20573,29 @@ function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
|
20549
20573
|
return QmsAdapter;
|
|
20550
20574
|
}
|
|
20551
20575
|
|
|
20552
|
-
var __defProp$
|
|
20576
|
+
var __defProp$p = Object.defineProperty;
|
|
20553
20577
|
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
20554
20578
|
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
20555
20579
|
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
20556
|
-
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;
|
|
20557
20581
|
var __spreadValues$h = (a, b) => {
|
|
20558
20582
|
for (var prop in b || (b = {}))
|
|
20559
20583
|
if (__hasOwnProp$i.call(b, prop))
|
|
20560
|
-
__defNormalProp$
|
|
20584
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
20561
20585
|
if (__getOwnPropSymbols$i)
|
|
20562
20586
|
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
20563
20587
|
if (__propIsEnum$i.call(b, prop))
|
|
20564
|
-
__defNormalProp$
|
|
20588
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
20565
20589
|
}
|
|
20566
20590
|
return a;
|
|
20567
20591
|
};
|
|
20568
|
-
var __publicField$
|
|
20592
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20569
20593
|
class QmsKit {
|
|
20570
20594
|
constructor(options) {
|
|
20571
|
-
__publicField$
|
|
20595
|
+
__publicField$h(this, "options", {
|
|
20572
20596
|
url: "https://qms.nextgis.com"
|
|
20573
20597
|
});
|
|
20574
|
-
__publicField$
|
|
20598
|
+
__publicField$h(this, "url");
|
|
20575
20599
|
this.options = __spreadValues$h(__spreadValues$h({}, this.options), options);
|
|
20576
20600
|
this.url = this.options.url;
|
|
20577
20601
|
}
|
|
@@ -20587,31 +20611,31 @@ class QmsKit {
|
|
|
20587
20611
|
return createQmsAdapter({ webMap, url: this.url });
|
|
20588
20612
|
}
|
|
20589
20613
|
}
|
|
20590
|
-
__publicField$
|
|
20614
|
+
__publicField$h(QmsKit, "utils", {
|
|
20591
20615
|
createQmsAdapter
|
|
20592
20616
|
});
|
|
20593
20617
|
|
|
20594
|
-
var __defProp$
|
|
20595
|
-
var __defProps$
|
|
20596
|
-
var __getOwnPropDescs$
|
|
20618
|
+
var __defProp$o = Object.defineProperty;
|
|
20619
|
+
var __defProps$d = Object.defineProperties;
|
|
20620
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
20597
20621
|
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
20598
20622
|
var __getProtoOf$2 = Object.getPrototypeOf;
|
|
20599
20623
|
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
20600
20624
|
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
20601
20625
|
var __reflectGet$2 = Reflect.get;
|
|
20602
|
-
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;
|
|
20603
20627
|
var __spreadValues$g = (a, b) => {
|
|
20604
20628
|
for (var prop in b || (b = {}))
|
|
20605
20629
|
if (__hasOwnProp$h.call(b, prop))
|
|
20606
|
-
__defNormalProp$
|
|
20630
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
20607
20631
|
if (__getOwnPropSymbols$h)
|
|
20608
20632
|
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
20609
20633
|
if (__propIsEnum$h.call(b, prop))
|
|
20610
|
-
__defNormalProp$
|
|
20634
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
20611
20635
|
}
|
|
20612
20636
|
return a;
|
|
20613
20637
|
};
|
|
20614
|
-
var __spreadProps$
|
|
20638
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
20615
20639
|
var __superGet$2 = (cls, obj, key) => __reflectGet$2(__getProtoOf$2(cls), key, obj);
|
|
20616
20640
|
var __async$j = (__this, __arguments, generator) => {
|
|
20617
20641
|
return new Promise((resolve, reject) => {
|
|
@@ -20656,7 +20680,7 @@ function createBasemapLayerAdapter(_0) {
|
|
|
20656
20680
|
class BasemapTileAdapter extends TileAdapter {
|
|
20657
20681
|
addLayer(opt) {
|
|
20658
20682
|
return __async$j(this, null, function* () {
|
|
20659
|
-
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 }));
|
|
20660
20684
|
});
|
|
20661
20685
|
}
|
|
20662
20686
|
}
|
|
@@ -20735,25 +20759,25 @@ function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
|
20735
20759
|
return fields;
|
|
20736
20760
|
}
|
|
20737
20761
|
|
|
20738
|
-
var __defProp$
|
|
20739
|
-
var __defProps$
|
|
20740
|
-
var __getOwnPropDescs$
|
|
20762
|
+
var __defProp$n = Object.defineProperty;
|
|
20763
|
+
var __defProps$c = Object.defineProperties;
|
|
20764
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
20741
20765
|
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
20742
20766
|
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
20743
20767
|
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
20744
|
-
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;
|
|
20745
20769
|
var __spreadValues$f = (a, b) => {
|
|
20746
20770
|
for (var prop in b || (b = {}))
|
|
20747
20771
|
if (__hasOwnProp$g.call(b, prop))
|
|
20748
|
-
__defNormalProp$
|
|
20772
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
20749
20773
|
if (__getOwnPropSymbols$g)
|
|
20750
20774
|
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
20751
20775
|
if (__propIsEnum$g.call(b, prop))
|
|
20752
|
-
__defNormalProp$
|
|
20776
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
20753
20777
|
}
|
|
20754
20778
|
return a;
|
|
20755
20779
|
};
|
|
20756
|
-
var __spreadProps$
|
|
20780
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
20757
20781
|
var __async$i = (__this, __arguments, generator) => {
|
|
20758
20782
|
return new Promise((resolve, reject) => {
|
|
20759
20783
|
var fulfilled = (value) => {
|
|
@@ -20779,13 +20803,13 @@ function fetchNgwLayerItems(options) {
|
|
|
20779
20803
|
var _a;
|
|
20780
20804
|
const filters = options.filters;
|
|
20781
20805
|
if (filters) {
|
|
20782
|
-
let data = yield createFeatureFieldFilterQueries(__spreadProps$
|
|
20806
|
+
let data = yield createFeatureFieldFilterQueries(__spreadProps$c(__spreadValues$f({}, options), {
|
|
20783
20807
|
filters
|
|
20784
20808
|
}));
|
|
20785
20809
|
const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
|
|
20786
20810
|
if (clientFilterValidate) {
|
|
20787
20811
|
data = data.filter((y) => {
|
|
20788
|
-
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$
|
|
20812
|
+
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$c(__spreadValues$f({}, y.fields), {
|
|
20789
20813
|
id: y.id
|
|
20790
20814
|
}));
|
|
20791
20815
|
const result = propertiesFilter(fields, filters);
|
|
@@ -20873,28 +20897,28 @@ function getLayerFilterOptions(options) {
|
|
|
20873
20897
|
return filterOptions;
|
|
20874
20898
|
}
|
|
20875
20899
|
|
|
20876
|
-
var __defProp$
|
|
20877
|
-
var __defProps$
|
|
20878
|
-
var __getOwnPropDescs$
|
|
20900
|
+
var __defProp$m = Object.defineProperty;
|
|
20901
|
+
var __defProps$b = Object.defineProperties;
|
|
20902
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
20879
20903
|
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
20880
20904
|
var __getProtoOf$1 = Object.getPrototypeOf;
|
|
20881
20905
|
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
20882
20906
|
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
20883
20907
|
var __reflectGet$1 = Reflect.get;
|
|
20884
|
-
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;
|
|
20885
20909
|
var __spreadValues$e = (a, b) => {
|
|
20886
20910
|
for (var prop in b || (b = {}))
|
|
20887
20911
|
if (__hasOwnProp$f.call(b, prop))
|
|
20888
|
-
__defNormalProp$
|
|
20912
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
20889
20913
|
if (__getOwnPropSymbols$f)
|
|
20890
20914
|
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
20891
20915
|
if (__propIsEnum$f.call(b, prop))
|
|
20892
|
-
__defNormalProp$
|
|
20916
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
20893
20917
|
}
|
|
20894
20918
|
return a;
|
|
20895
20919
|
};
|
|
20896
|
-
var __spreadProps$
|
|
20897
|
-
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);
|
|
20898
20922
|
var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
|
|
20899
20923
|
var __async$g = (__this, __arguments, generator) => {
|
|
20900
20924
|
return new Promise((resolve, reject) => {
|
|
@@ -20967,11 +20991,11 @@ function createGeoJsonAdapter(props) {
|
|
|
20967
20991
|
class NgwGeoJsonAdapter extends GeoJsonAdapter {
|
|
20968
20992
|
constructor() {
|
|
20969
20993
|
super(...arguments);
|
|
20970
|
-
__publicField$
|
|
20971
|
-
__publicField$
|
|
20972
|
-
__publicField$
|
|
20973
|
-
__publicField$
|
|
20974
|
-
__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");
|
|
20975
20999
|
}
|
|
20976
21000
|
addLayer(opt) {
|
|
20977
21001
|
return __async$g(this, null, function* () {
|
|
@@ -21044,10 +21068,10 @@ function createGeoJsonAdapter(props) {
|
|
|
21044
21068
|
getCount() {
|
|
21045
21069
|
return fetchNgwLayerCount({ connector, resourceId, cache: true });
|
|
21046
21070
|
}
|
|
21047
|
-
updateLayer(
|
|
21071
|
+
updateLayer(opt) {
|
|
21048
21072
|
return __async$g(this, null, function* () {
|
|
21049
21073
|
var _a2;
|
|
21050
|
-
filterArgs =
|
|
21074
|
+
const filterArgs = opt || _lastFilterArgs || {};
|
|
21051
21075
|
if ((_a2 = this.options.strategy) == null ? void 0 : _a2.startsWith("BBOX")) {
|
|
21052
21076
|
yield webMap.onLoad("create");
|
|
21053
21077
|
filterArgs.options = filterArgs.options || {};
|
|
@@ -21072,7 +21096,7 @@ function createGeoJsonAdapter(props) {
|
|
|
21072
21096
|
try {
|
|
21073
21097
|
this.emitter.emit("preupdate", filterArgs);
|
|
21074
21098
|
webMap._emitLayerEvent("layer:preupdate", options.id || "", filterArgs);
|
|
21075
|
-
const data = yield getData(filterArgs.filters, __spreadProps$
|
|
21099
|
+
const data = yield getData(filterArgs.filters, __spreadProps$b(__spreadValues$e({}, filterArgs.options), {
|
|
21076
21100
|
srs: this.options.srs
|
|
21077
21101
|
}));
|
|
21078
21102
|
let newData = data;
|
|
@@ -21125,7 +21149,7 @@ function createGeoJsonAdapter(props) {
|
|
|
21125
21149
|
if (this.clearLayer) {
|
|
21126
21150
|
this.clearLayer();
|
|
21127
21151
|
}
|
|
21128
|
-
const data = yield getData(filters, __spreadProps$
|
|
21152
|
+
const data = yield getData(filters, __spreadProps$b(__spreadValues$e({}, opt), {
|
|
21129
21153
|
srs: this.options.srs
|
|
21130
21154
|
}));
|
|
21131
21155
|
this.setData(data);
|
|
@@ -21314,26 +21338,26 @@ function ngwApiToAdapterOptions({
|
|
|
21314
21338
|
}
|
|
21315
21339
|
}
|
|
21316
21340
|
|
|
21317
|
-
var __defProp$
|
|
21318
|
-
var __defProps$
|
|
21319
|
-
var __getOwnPropDescs$
|
|
21341
|
+
var __defProp$l = Object.defineProperty;
|
|
21342
|
+
var __defProps$a = Object.defineProperties;
|
|
21343
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
21320
21344
|
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
21321
21345
|
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
21322
21346
|
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
21323
|
-
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;
|
|
21324
21348
|
var __spreadValues$d = (a, b) => {
|
|
21325
21349
|
for (var prop in b || (b = {}))
|
|
21326
21350
|
if (__hasOwnProp$e.call(b, prop))
|
|
21327
|
-
__defNormalProp$
|
|
21351
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
21328
21352
|
if (__getOwnPropSymbols$e)
|
|
21329
21353
|
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
21330
21354
|
if (__propIsEnum$e.call(b, prop))
|
|
21331
|
-
__defNormalProp$
|
|
21355
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
21332
21356
|
}
|
|
21333
21357
|
return a;
|
|
21334
21358
|
};
|
|
21335
|
-
var __spreadProps$
|
|
21336
|
-
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);
|
|
21337
21361
|
var __async$e = (__this, __arguments, generator) => {
|
|
21338
21362
|
return new Promise((resolve, reject) => {
|
|
21339
21363
|
var fulfilled = (value) => {
|
|
@@ -21354,11 +21378,47 @@ var __async$e = (__this, __arguments, generator) => {
|
|
|
21354
21378
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
21355
21379
|
});
|
|
21356
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
|
+
}
|
|
21357
21417
|
function createRasterAdapter(_0) {
|
|
21358
21418
|
return __async$e(this, arguments, function* ({
|
|
21359
21419
|
layerOptions,
|
|
21360
|
-
webMap,
|
|
21361
21420
|
connector,
|
|
21421
|
+
webMap,
|
|
21362
21422
|
item
|
|
21363
21423
|
}) {
|
|
21364
21424
|
const resourceCls = item.resource.cls;
|
|
@@ -21387,16 +21447,17 @@ function createRasterAdapter(_0) {
|
|
|
21387
21447
|
constructor(map, _options) {
|
|
21388
21448
|
super(map, _options);
|
|
21389
21449
|
this.map = map;
|
|
21390
|
-
|
|
21391
|
-
__publicField$
|
|
21392
|
-
__publicField$
|
|
21450
|
+
__publicField$f(this, "item", item);
|
|
21451
|
+
__publicField$f(this, "resourceId", resourceId);
|
|
21452
|
+
__publicField$f(this, "_blocked", false);
|
|
21453
|
+
__publicField$f(this, "_layerVisibility");
|
|
21393
21454
|
const opt = ngwApiToAdapterOptions({
|
|
21394
21455
|
options: layerOptions,
|
|
21395
21456
|
webMap,
|
|
21396
21457
|
baseUrl: connector.options.baseUrl || ""
|
|
21397
21458
|
});
|
|
21398
21459
|
if (opt) {
|
|
21399
|
-
const layerAdapterOptions = __spreadProps$
|
|
21460
|
+
const layerAdapterOptions = __spreadProps$a(__spreadValues$d(__spreadValues$d({}, opt), layerOptions.adapterOptions), {
|
|
21400
21461
|
params: { resource: resourceId },
|
|
21401
21462
|
layers: opt.layers || String(resourceId),
|
|
21402
21463
|
resourceId
|
|
@@ -21410,25 +21471,19 @@ function createRasterAdapter(_0) {
|
|
|
21410
21471
|
addLayer(addOptions) {
|
|
21411
21472
|
return super.addLayer(__spreadValues$d(__spreadValues$d({}, this.options), addOptions));
|
|
21412
21473
|
}
|
|
21413
|
-
|
|
21414
|
-
|
|
21415
|
-
|
|
21416
|
-
|
|
21417
|
-
|
|
21418
|
-
}, options));
|
|
21419
|
-
const id = this.options.id;
|
|
21420
|
-
if (id !== void 0) {
|
|
21421
|
-
const legend = {
|
|
21422
|
-
layerId: id,
|
|
21423
|
-
legend: ngwLegend.map(({ display_name, icon }) => ({
|
|
21424
|
-
name: display_name,
|
|
21425
|
-
symbol: icon
|
|
21426
|
-
}))
|
|
21427
|
-
};
|
|
21428
|
-
return [legend];
|
|
21474
|
+
showLayer() {
|
|
21475
|
+
this._layerVisibility = true;
|
|
21476
|
+
if (this.layer) {
|
|
21477
|
+
if (!this._blocked) {
|
|
21478
|
+
webMap.mapAdapter.showLayer(this.layer);
|
|
21429
21479
|
}
|
|
21430
|
-
|
|
21431
|
-
|
|
21480
|
+
}
|
|
21481
|
+
}
|
|
21482
|
+
hideLayer() {
|
|
21483
|
+
this._layerVisibility = false;
|
|
21484
|
+
if (this.layer) {
|
|
21485
|
+
webMap.mapAdapter.hideLayer(this.layer);
|
|
21486
|
+
}
|
|
21432
21487
|
}
|
|
21433
21488
|
getIdentificationIds() {
|
|
21434
21489
|
return __async$e(this, null, function* () {
|
|
@@ -21444,8 +21499,69 @@ function createRasterAdapter(_0) {
|
|
|
21444
21499
|
return [];
|
|
21445
21500
|
});
|
|
21446
21501
|
}
|
|
21447
|
-
|
|
21448
|
-
|
|
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
|
+
}
|
|
21449
21565
|
};
|
|
21450
21566
|
} else {
|
|
21451
21567
|
throw new Error(adapter + " not supported yet. Only TILE");
|
|
@@ -21453,25 +21569,25 @@ function createRasterAdapter(_0) {
|
|
|
21453
21569
|
});
|
|
21454
21570
|
}
|
|
21455
21571
|
|
|
21456
|
-
var __defProp$
|
|
21457
|
-
var __defProps$
|
|
21458
|
-
var __getOwnPropDescs$
|
|
21572
|
+
var __defProp$k = Object.defineProperty;
|
|
21573
|
+
var __defProps$9 = Object.defineProperties;
|
|
21574
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
21459
21575
|
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
21460
21576
|
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
21461
21577
|
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
21462
|
-
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;
|
|
21463
21579
|
var __spreadValues$c = (a, b) => {
|
|
21464
21580
|
for (var prop in b || (b = {}))
|
|
21465
21581
|
if (__hasOwnProp$d.call(b, prop))
|
|
21466
|
-
__defNormalProp$
|
|
21582
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
21467
21583
|
if (__getOwnPropSymbols$d)
|
|
21468
21584
|
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
21469
21585
|
if (__propIsEnum$d.call(b, prop))
|
|
21470
|
-
__defNormalProp$
|
|
21586
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
21471
21587
|
}
|
|
21472
21588
|
return a;
|
|
21473
21589
|
};
|
|
21474
|
-
var __spreadProps$
|
|
21590
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
21475
21591
|
var __async$d = (__this, __arguments, generator) => {
|
|
21476
21592
|
return new Promise((resolve, reject) => {
|
|
21477
21593
|
var fulfilled = (value) => {
|
|
@@ -21519,7 +21635,7 @@ function createAdapterFromFirstStyle(_0) {
|
|
|
21519
21635
|
const firstStyle = childrenStyles && childrenStyles[0];
|
|
21520
21636
|
if (firstStyle) {
|
|
21521
21637
|
return createAsyncAdapter(
|
|
21522
|
-
__spreadProps$
|
|
21638
|
+
__spreadProps$9(__spreadValues$c({}, layerOptions), { resource: firstStyle.resource.id }),
|
|
21523
21639
|
webMap,
|
|
21524
21640
|
connector
|
|
21525
21641
|
);
|
|
@@ -21542,7 +21658,7 @@ function createAsyncAdapter(options, webMap, connector) {
|
|
|
21542
21658
|
}
|
|
21543
21659
|
if (item) {
|
|
21544
21660
|
const cls = item.resource.cls;
|
|
21545
|
-
const layerOptions = __spreadProps$
|
|
21661
|
+
const layerOptions = __spreadProps$9(__spreadValues$c({}, options), {
|
|
21546
21662
|
resource: resourceId
|
|
21547
21663
|
});
|
|
21548
21664
|
const adapterOptions = {
|
|
@@ -21579,10 +21695,10 @@ function createAsyncAdapter(options, webMap, connector) {
|
|
|
21579
21695
|
item.resource.parent.id
|
|
21580
21696
|
);
|
|
21581
21697
|
if (parentItem) {
|
|
21582
|
-
const parentOptions = __spreadProps$
|
|
21698
|
+
const parentOptions = __spreadProps$9(__spreadValues$c({}, options), {
|
|
21583
21699
|
resource: item.resource.parent.id
|
|
21584
21700
|
});
|
|
21585
|
-
adapter = createGeoJsonAdapter(__spreadProps$
|
|
21701
|
+
adapter = createGeoJsonAdapter(__spreadProps$9(__spreadValues$c({}, adapterOptions), {
|
|
21586
21702
|
item: parentItem,
|
|
21587
21703
|
layerOptions: parentOptions
|
|
21588
21704
|
}));
|
|
@@ -21626,31 +21742,46 @@ function createAsyncAdapter(options, webMap, connector) {
|
|
|
21626
21742
|
});
|
|
21627
21743
|
}
|
|
21628
21744
|
|
|
21629
|
-
var __defProp$
|
|
21745
|
+
var __defProp$j = Object.defineProperty;
|
|
21746
|
+
var __defProps$8 = Object.defineProperties;
|
|
21747
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
21630
21748
|
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
21631
21749
|
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
21632
21750
|
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
21633
|
-
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;
|
|
21634
21752
|
var __spreadValues$b = (a, b) => {
|
|
21635
21753
|
for (var prop in b || (b = {}))
|
|
21636
21754
|
if (__hasOwnProp$c.call(b, prop))
|
|
21637
|
-
__defNormalProp$
|
|
21755
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
21638
21756
|
if (__getOwnPropSymbols$c)
|
|
21639
21757
|
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
21640
21758
|
if (__propIsEnum$c.call(b, prop))
|
|
21641
|
-
__defNormalProp$
|
|
21759
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
21642
21760
|
}
|
|
21643
21761
|
return a;
|
|
21644
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
|
+
};
|
|
21645
21776
|
function updateImageParams(params, resourceId) {
|
|
21646
|
-
const { bbox, width, height, nd } =
|
|
21647
|
-
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), {
|
|
21648
21779
|
resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
|
|
21649
21780
|
extent: bbox,
|
|
21650
21781
|
size: width + "," + height,
|
|
21651
21782
|
timestamp: Date.now(),
|
|
21652
21783
|
nd: nd != null ? nd : 200
|
|
21653
|
-
};
|
|
21784
|
+
});
|
|
21654
21785
|
}
|
|
21655
21786
|
const vectorLayerGeomToPaintTypeAlias = {
|
|
21656
21787
|
POINT: "point",
|
|
@@ -21710,26 +21841,26 @@ function setScaleRatio(scale, lat = 0) {
|
|
|
21710
21841
|
return zoom;
|
|
21711
21842
|
}
|
|
21712
21843
|
|
|
21713
|
-
var __defProp$
|
|
21844
|
+
var __defProp$i = Object.defineProperty;
|
|
21714
21845
|
var __defProps$7 = Object.defineProperties;
|
|
21715
21846
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
21716
21847
|
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
21717
21848
|
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
21718
21849
|
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
21719
|
-
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;
|
|
21720
21851
|
var __spreadValues$a = (a, b) => {
|
|
21721
21852
|
for (var prop in b || (b = {}))
|
|
21722
21853
|
if (__hasOwnProp$b.call(b, prop))
|
|
21723
|
-
__defNormalProp$
|
|
21854
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
21724
21855
|
if (__getOwnPropSymbols$b)
|
|
21725
21856
|
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
21726
21857
|
if (__propIsEnum$b.call(b, prop))
|
|
21727
|
-
__defNormalProp$
|
|
21858
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
21728
21859
|
}
|
|
21729
21860
|
return a;
|
|
21730
21861
|
};
|
|
21731
21862
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
21732
|
-
var __publicField$
|
|
21863
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21733
21864
|
var __async$c = (__this, __arguments, generator) => {
|
|
21734
21865
|
return new Promise((resolve, reject) => {
|
|
21735
21866
|
var fulfilled = (value) => {
|
|
@@ -21754,11 +21885,11 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
21754
21885
|
constructor(webMap, item, options, connector, parent, noInit) {
|
|
21755
21886
|
super(__spreadValues$a(__spreadValues$a({}, _NgwWebmapItem.options), options));
|
|
21756
21887
|
this.webMap = webMap;
|
|
21757
|
-
__publicField$
|
|
21758
|
-
__publicField$
|
|
21759
|
-
__publicField$
|
|
21760
|
-
__publicField$
|
|
21761
|
-
__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);
|
|
21762
21893
|
if (connector) {
|
|
21763
21894
|
this.connector = connector;
|
|
21764
21895
|
}
|
|
@@ -21820,10 +21951,12 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
21820
21951
|
}, options));
|
|
21821
21952
|
const legend = {
|
|
21822
21953
|
layerId: id,
|
|
21823
|
-
legend: ngwLegend.map((
|
|
21824
|
-
|
|
21825
|
-
|
|
21826
|
-
|
|
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))
|
|
21827
21960
|
};
|
|
21828
21961
|
return [legend];
|
|
21829
21962
|
}
|
|
@@ -21946,8 +22079,8 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
21946
22079
|
return totalValue;
|
|
21947
22080
|
}
|
|
21948
22081
|
};
|
|
21949
|
-
__publicField$
|
|
21950
|
-
__publicField$
|
|
22082
|
+
__publicField$e(_NgwWebmapItem, "GetAdapterFromLayerType", {});
|
|
22083
|
+
__publicField$e(_NgwWebmapItem, "options", {
|
|
21951
22084
|
properties: [
|
|
21952
22085
|
{
|
|
21953
22086
|
type: "boolean",
|
|
@@ -21987,23 +22120,23 @@ __publicField$d(_NgwWebmapItem, "options", {
|
|
|
21987
22120
|
});
|
|
21988
22121
|
let NgwWebmapItem = _NgwWebmapItem;
|
|
21989
22122
|
|
|
21990
|
-
var __defProp$
|
|
22123
|
+
var __defProp$h = Object.defineProperty;
|
|
21991
22124
|
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
21992
22125
|
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
21993
22126
|
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
21994
|
-
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;
|
|
21995
22128
|
var __spreadValues$9 = (a, b) => {
|
|
21996
22129
|
for (var prop in b || (b = {}))
|
|
21997
22130
|
if (__hasOwnProp$a.call(b, prop))
|
|
21998
|
-
__defNormalProp$
|
|
22131
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
21999
22132
|
if (__getOwnPropSymbols$a)
|
|
22000
22133
|
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
22001
22134
|
if (__propIsEnum$a.call(b, prop))
|
|
22002
|
-
__defNormalProp$
|
|
22135
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
22003
22136
|
}
|
|
22004
22137
|
return a;
|
|
22005
22138
|
};
|
|
22006
|
-
var __publicField$
|
|
22139
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22007
22140
|
var __async$b = (__this, __arguments, generator) => {
|
|
22008
22141
|
return new Promise((resolve, reject) => {
|
|
22009
22142
|
var fulfilled = (value) => {
|
|
@@ -22033,10 +22166,10 @@ function createOnFirstShowAdapter(_0) {
|
|
|
22033
22166
|
}) {
|
|
22034
22167
|
class OnFirstShowAdapter {
|
|
22035
22168
|
constructor() {
|
|
22036
|
-
__publicField$
|
|
22037
|
-
__publicField$
|
|
22038
|
-
__publicField$
|
|
22039
|
-
__publicField$
|
|
22169
|
+
__publicField$d(this, "options", {});
|
|
22170
|
+
__publicField$d(this, "layer", []);
|
|
22171
|
+
__publicField$d(this, "_removed", false);
|
|
22172
|
+
__publicField$d(this, "_creatingInProgress", false);
|
|
22040
22173
|
}
|
|
22041
22174
|
addLayer() {
|
|
22042
22175
|
return this.layer;
|
|
@@ -22164,26 +22297,26 @@ function createOnFirstShowNgwAdapter(_0) {
|
|
|
22164
22297
|
|
|
22165
22298
|
const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
|
|
22166
22299
|
|
|
22167
|
-
var __defProp$
|
|
22300
|
+
var __defProp$g = Object.defineProperty;
|
|
22168
22301
|
var __defProps$6 = Object.defineProperties;
|
|
22169
22302
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
22170
22303
|
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
22171
22304
|
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
22172
22305
|
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
22173
|
-
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;
|
|
22174
22307
|
var __spreadValues$8 = (a, b) => {
|
|
22175
22308
|
for (var prop in b || (b = {}))
|
|
22176
22309
|
if (__hasOwnProp$9.call(b, prop))
|
|
22177
|
-
__defNormalProp$
|
|
22310
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
22178
22311
|
if (__getOwnPropSymbols$9)
|
|
22179
22312
|
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
22180
22313
|
if (__propIsEnum$9.call(b, prop))
|
|
22181
|
-
__defNormalProp$
|
|
22314
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
22182
22315
|
}
|
|
22183
22316
|
return a;
|
|
22184
22317
|
};
|
|
22185
22318
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
22186
|
-
var __publicField$
|
|
22319
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22187
22320
|
var __async$9 = (__this, __arguments, generator) => {
|
|
22188
22321
|
return new Promise((resolve, reject) => {
|
|
22189
22322
|
var fulfilled = (value) => {
|
|
@@ -22208,21 +22341,21 @@ class NgwWebmapLayerAdapter {
|
|
|
22208
22341
|
constructor(map, options) {
|
|
22209
22342
|
this.map = map;
|
|
22210
22343
|
this.options = options;
|
|
22211
|
-
__publicField$
|
|
22212
|
-
__publicField$
|
|
22344
|
+
__publicField$c(this, "layer");
|
|
22345
|
+
__publicField$c(this, "NgwWebmapItem", NgwWebmapItem);
|
|
22213
22346
|
/**
|
|
22214
22347
|
* Radius for searching objects in pixels
|
|
22215
22348
|
*/
|
|
22216
|
-
__publicField$
|
|
22349
|
+
__publicField$c(this, "pixelRadius", 10);
|
|
22217
22350
|
// webmapSettings.identify_radius,
|
|
22218
|
-
__publicField$
|
|
22219
|
-
__publicField$
|
|
22220
|
-
__publicField$
|
|
22221
|
-
__publicField$
|
|
22222
|
-
__publicField$
|
|
22223
|
-
__publicField$
|
|
22224
|
-
__publicField$
|
|
22225
|
-
__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");
|
|
22226
22359
|
const r = options.resourceId;
|
|
22227
22360
|
if (Array.isArray(r)) {
|
|
22228
22361
|
this.resourceId = r[0];
|
|
@@ -22531,23 +22664,23 @@ class NgwWebmapLayerAdapter {
|
|
|
22531
22664
|
}
|
|
22532
22665
|
}
|
|
22533
22666
|
|
|
22534
|
-
var __defProp$
|
|
22667
|
+
var __defProp$f = Object.defineProperty;
|
|
22535
22668
|
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
22536
22669
|
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
22537
22670
|
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
22538
|
-
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;
|
|
22539
22672
|
var __spreadValues$7 = (a, b) => {
|
|
22540
22673
|
for (var prop in b || (b = {}))
|
|
22541
22674
|
if (__hasOwnProp$8.call(b, prop))
|
|
22542
|
-
__defNormalProp$
|
|
22675
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
22543
22676
|
if (__getOwnPropSymbols$8)
|
|
22544
22677
|
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
22545
22678
|
if (__propIsEnum$8.call(b, prop))
|
|
22546
|
-
__defNormalProp$
|
|
22679
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
22547
22680
|
}
|
|
22548
22681
|
return a;
|
|
22549
22682
|
};
|
|
22550
|
-
var __publicField$
|
|
22683
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22551
22684
|
var __async$8 = (__this, __arguments, generator) => {
|
|
22552
22685
|
return new Promise((resolve, reject) => {
|
|
22553
22686
|
var fulfilled = (value) => {
|
|
@@ -22571,9 +22704,9 @@ var __async$8 = (__this, __arguments, generator) => {
|
|
|
22571
22704
|
class NgwKit {
|
|
22572
22705
|
constructor(options) {
|
|
22573
22706
|
this.options = options;
|
|
22574
|
-
__publicField$
|
|
22575
|
-
__publicField$
|
|
22576
|
-
__publicField$
|
|
22707
|
+
__publicField$b(this, "url");
|
|
22708
|
+
__publicField$b(this, "connector");
|
|
22709
|
+
__publicField$b(this, "webMap");
|
|
22577
22710
|
if (this.options.connector) {
|
|
22578
22711
|
this.url = this.options.connector.options.baseUrl || "";
|
|
22579
22712
|
this.connector = this.options.connector;
|
|
@@ -22634,37 +22767,37 @@ class NgwKit {
|
|
|
22634
22767
|
}
|
|
22635
22768
|
}
|
|
22636
22769
|
|
|
22637
|
-
var __defProp$
|
|
22770
|
+
var __defProp$e = Object.defineProperty;
|
|
22638
22771
|
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
22639
22772
|
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
22640
22773
|
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
22641
|
-
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;
|
|
22642
22775
|
var __spreadValues$6 = (a, b) => {
|
|
22643
22776
|
for (var prop in b || (b = {}))
|
|
22644
22777
|
if (__hasOwnProp$7.call(b, prop))
|
|
22645
|
-
__defNormalProp$
|
|
22778
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
22646
22779
|
if (__getOwnPropSymbols$7)
|
|
22647
22780
|
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
22648
22781
|
if (__propIsEnum$7.call(b, prop))
|
|
22649
|
-
__defNormalProp$
|
|
22782
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
22650
22783
|
}
|
|
22651
22784
|
return a;
|
|
22652
22785
|
};
|
|
22653
|
-
var __publicField$
|
|
22786
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22654
22787
|
class IdentifyItem {
|
|
22655
22788
|
constructor(options) {
|
|
22656
|
-
__publicField$
|
|
22657
|
-
__publicField$
|
|
22658
|
-
__publicField$
|
|
22659
|
-
__publicField$
|
|
22660
|
-
__publicField$
|
|
22661
|
-
__publicField$
|
|
22662
|
-
__publicField$
|
|
22663
|
-
__publicField$
|
|
22664
|
-
__publicField$
|
|
22665
|
-
__publicField$
|
|
22666
|
-
__publicField$
|
|
22667
|
-
__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");
|
|
22668
22801
|
const f = options.feature;
|
|
22669
22802
|
this.id = f.id;
|
|
22670
22803
|
this.geom = f.geom;
|
|
@@ -22750,21 +22883,21 @@ function fetchNgwLayerFeature(options) {
|
|
|
22750
22883
|
});
|
|
22751
22884
|
}
|
|
22752
22885
|
|
|
22753
|
-
var __defProp$
|
|
22886
|
+
var __defProp$d = Object.defineProperty;
|
|
22754
22887
|
var __defProps$5 = Object.defineProperties;
|
|
22755
22888
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
22756
22889
|
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
22757
22890
|
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
22758
22891
|
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
22759
|
-
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;
|
|
22760
22893
|
var __spreadValues$5 = (a, b) => {
|
|
22761
22894
|
for (var prop in b || (b = {}))
|
|
22762
22895
|
if (__hasOwnProp$6.call(b, prop))
|
|
22763
|
-
__defNormalProp$
|
|
22896
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
22764
22897
|
if (__getOwnPropSymbols$6)
|
|
22765
22898
|
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
22766
22899
|
if (__propIsEnum$6.call(b, prop))
|
|
22767
|
-
__defNormalProp$
|
|
22900
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
22768
22901
|
}
|
|
22769
22902
|
return a;
|
|
22770
22903
|
};
|
|
@@ -22968,95 +23101,95 @@ function getCompanyLogo(connector, options) {
|
|
|
22968
23101
|
});
|
|
22969
23102
|
}
|
|
22970
23103
|
|
|
22971
|
-
var __defProp$
|
|
22972
|
-
var __defNormalProp$
|
|
22973
|
-
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);
|
|
22974
23107
|
class KeyCodes {
|
|
22975
23108
|
constructor() {
|
|
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$
|
|
23029
|
-
__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);
|
|
23030
23163
|
// "comma";
|
|
23031
|
-
__publicField$
|
|
23164
|
+
__publicField$9(this, "-", 189);
|
|
23032
23165
|
// "dash";
|
|
23033
|
-
__publicField$
|
|
23166
|
+
__publicField$9(this, ".", 190);
|
|
23034
23167
|
// "period";
|
|
23035
|
-
__publicField$
|
|
23168
|
+
__publicField$9(this, "/", 191);
|
|
23036
23169
|
// "forward slash";
|
|
23037
|
-
__publicField$
|
|
23170
|
+
__publicField$9(this, "`", 192);
|
|
23038
23171
|
// "grave accent";
|
|
23039
|
-
__publicField$
|
|
23172
|
+
__publicField$9(this, "[", 219);
|
|
23040
23173
|
// "open bracket";
|
|
23041
|
-
__publicField$
|
|
23174
|
+
__publicField$9(this, "\\", 220);
|
|
23042
23175
|
// "back slash";
|
|
23043
|
-
__publicField$
|
|
23176
|
+
__publicField$9(this, "]", 221);
|
|
23044
23177
|
// "close braket";
|
|
23045
|
-
__publicField$
|
|
23178
|
+
__publicField$9(this, "'", 222);
|
|
23046
23179
|
}
|
|
23047
23180
|
// "single quote"
|
|
23048
23181
|
}
|
|
23049
23182
|
|
|
23050
|
-
var __defProp$
|
|
23051
|
-
var __defNormalProp$
|
|
23052
|
-
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);
|
|
23053
23186
|
class Keys {
|
|
23054
23187
|
constructor() {
|
|
23055
|
-
__publicField$
|
|
23056
|
-
__publicField$
|
|
23057
|
-
__publicField$
|
|
23058
|
-
__publicField$
|
|
23059
|
-
__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");
|
|
23060
23193
|
this._windowOnFocus = this.windowOnFocus.bind(this);
|
|
23061
23194
|
this._keysPressed = this.keysPressed.bind(this);
|
|
23062
23195
|
this._keysReleased = this.keysReleased.bind(this);
|
|
@@ -23095,15 +23228,15 @@ class Keys {
|
|
|
23095
23228
|
}
|
|
23096
23229
|
}
|
|
23097
23230
|
|
|
23098
|
-
var __defProp$
|
|
23099
|
-
var __defNormalProp$
|
|
23100
|
-
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);
|
|
23101
23234
|
class StateItem {
|
|
23102
23235
|
constructor(webMap, opt) {
|
|
23103
23236
|
this.webMap = webMap;
|
|
23104
|
-
__publicField$
|
|
23105
|
-
__publicField$
|
|
23106
|
-
__publicField$
|
|
23237
|
+
__publicField$7(this, "name");
|
|
23238
|
+
__publicField$7(this, "event");
|
|
23239
|
+
__publicField$7(this, "value");
|
|
23107
23240
|
if (opt) {
|
|
23108
23241
|
if (opt.value) {
|
|
23109
23242
|
this.setValue(opt.value);
|
|
@@ -23112,7 +23245,11 @@ class StateItem {
|
|
|
23112
23245
|
this.name = opt.name;
|
|
23113
23246
|
}
|
|
23114
23247
|
if (opt.event) {
|
|
23115
|
-
|
|
23248
|
+
if (typeof opt.event === "string") {
|
|
23249
|
+
this.event = [opt.event];
|
|
23250
|
+
} else {
|
|
23251
|
+
this.event = opt.event;
|
|
23252
|
+
}
|
|
23116
23253
|
}
|
|
23117
23254
|
}
|
|
23118
23255
|
}
|
|
@@ -23124,6 +23261,34 @@ class StateItem {
|
|
|
23124
23261
|
}
|
|
23125
23262
|
}
|
|
23126
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
|
+
|
|
23127
23292
|
var __defProp$8 = Object.defineProperty;
|
|
23128
23293
|
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23129
23294
|
var __publicField$5 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -23131,7 +23296,7 @@ class CenterState extends StateItem {
|
|
|
23131
23296
|
constructor() {
|
|
23132
23297
|
super(...arguments);
|
|
23133
23298
|
__publicField$5(this, "name", "center");
|
|
23134
|
-
__publicField$5(this, "event", "moveend");
|
|
23299
|
+
__publicField$5(this, "event", ["moveend"]);
|
|
23135
23300
|
}
|
|
23136
23301
|
getValue() {
|
|
23137
23302
|
return this.webMap.getCenter();
|
|
@@ -23139,9 +23304,13 @@ class CenterState extends StateItem {
|
|
|
23139
23304
|
setValue(val) {
|
|
23140
23305
|
this.webMap.setCenter(val);
|
|
23141
23306
|
}
|
|
23142
|
-
toString(
|
|
23143
|
-
const
|
|
23144
|
-
|
|
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 "";
|
|
23145
23314
|
}
|
|
23146
23315
|
parse(str) {
|
|
23147
23316
|
const lngLat = str.split("_").map(Number);
|
|
@@ -23156,7 +23325,7 @@ class ZoomState extends StateItem {
|
|
|
23156
23325
|
constructor() {
|
|
23157
23326
|
super(...arguments);
|
|
23158
23327
|
__publicField$4(this, "name", "zoom");
|
|
23159
|
-
__publicField$4(this, "event", "zoomend");
|
|
23328
|
+
__publicField$4(this, "event", ["zoomend"]);
|
|
23160
23329
|
}
|
|
23161
23330
|
getValue() {
|
|
23162
23331
|
const zoom = this.webMap.getZoom();
|
|
@@ -23165,8 +23334,8 @@ class ZoomState extends StateItem {
|
|
|
23165
23334
|
setValue(val) {
|
|
23166
23335
|
this.webMap.setZoom(val);
|
|
23167
23336
|
}
|
|
23168
|
-
toString(
|
|
23169
|
-
return String(
|
|
23337
|
+
toString() {
|
|
23338
|
+
return String(this.getValue());
|
|
23170
23339
|
}
|
|
23171
23340
|
parse(str) {
|
|
23172
23341
|
return Number(str);
|
|
@@ -23235,14 +23404,14 @@ const _WebMapMain = class _WebMapMain {
|
|
|
23235
23404
|
__publicField$3(this, "mapAdapter");
|
|
23236
23405
|
__publicField$3(this, "runtimeParams", []);
|
|
23237
23406
|
__publicField$3(this, "getPaintFunctions", _WebMapMain.getPaintFunctions);
|
|
23238
|
-
__publicField$3(this, "
|
|
23407
|
+
__publicField$3(this, "mapStateItems", [CenterState, ZoomState, BoundState]);
|
|
23239
23408
|
__publicField$3(this, "id", ID++);
|
|
23240
23409
|
/**
|
|
23241
23410
|
* From runtime params
|
|
23242
23411
|
*/
|
|
23412
|
+
__publicField$3(this, "mapState", []);
|
|
23243
23413
|
__publicField$3(this, "_initMapState", {});
|
|
23244
23414
|
__publicField$3(this, "_starterKits");
|
|
23245
|
-
__publicField$3(this, "_mapState", []);
|
|
23246
23415
|
__publicField$3(this, "_extent");
|
|
23247
23416
|
__publicField$3(this, "_eventsStatus", {});
|
|
23248
23417
|
__publicField$3(this, "_coordFromMapClickAbort");
|
|
@@ -23277,7 +23446,7 @@ const _WebMapMain = class _WebMapMain {
|
|
|
23277
23446
|
create() {
|
|
23278
23447
|
return __async$5(this, null, function* () {
|
|
23279
23448
|
if (!this.getEventStatus("create")) {
|
|
23280
|
-
yield this._setInitMapState(this.
|
|
23449
|
+
yield this._setInitMapState(this.mapStateItems);
|
|
23281
23450
|
yield this._setupMap();
|
|
23282
23451
|
this._emitStatusEvent("create", this);
|
|
23283
23452
|
}
|
|
@@ -23297,16 +23466,22 @@ const _WebMapMain = class _WebMapMain {
|
|
|
23297
23466
|
this.mapAdapter.destroy();
|
|
23298
23467
|
}
|
|
23299
23468
|
}
|
|
23300
|
-
|
|
23469
|
+
mapStateWithFunc(func) {
|
|
23301
23470
|
const state = {};
|
|
23302
|
-
this.
|
|
23303
|
-
state[x.name] = x
|
|
23471
|
+
this.mapState.forEach((x) => {
|
|
23472
|
+
state[x.name] = func(x);
|
|
23304
23473
|
});
|
|
23305
23474
|
return state;
|
|
23306
23475
|
}
|
|
23476
|
+
getStateAsString() {
|
|
23477
|
+
return this.mapStateWithFunc((x) => x.toString());
|
|
23478
|
+
}
|
|
23479
|
+
getState() {
|
|
23480
|
+
return this.mapStateWithFunc((x) => x.getValue());
|
|
23481
|
+
}
|
|
23307
23482
|
getRuntimeParams() {
|
|
23308
23483
|
const state = {};
|
|
23309
|
-
this.
|
|
23484
|
+
this.mapState.forEach((x) => {
|
|
23310
23485
|
for (const r of this.runtimeParams) {
|
|
23311
23486
|
const val = r.get(x.name);
|
|
23312
23487
|
if (val !== void 0) {
|
|
@@ -23648,7 +23823,7 @@ const _WebMapMain = class _WebMapMain {
|
|
|
23648
23823
|
_setInitMapState(states) {
|
|
23649
23824
|
for (const X of states) {
|
|
23650
23825
|
const state = new X(this);
|
|
23651
|
-
this.
|
|
23826
|
+
this.mapState.push(state);
|
|
23652
23827
|
for (const r of this.runtimeParams) {
|
|
23653
23828
|
const str = r.get(state.name);
|
|
23654
23829
|
if (str !== void 0) {
|
|
@@ -23684,13 +23859,15 @@ const _WebMapMain = class _WebMapMain {
|
|
|
23684
23859
|
events.forEach((x) => {
|
|
23685
23860
|
this._mapEvents[x] = (data) => {
|
|
23686
23861
|
if (this.runtimeParams.length) {
|
|
23687
|
-
const
|
|
23688
|
-
|
|
23689
|
-
|
|
23862
|
+
const mapStatusEvents = this.mapState.filter(
|
|
23863
|
+
(y) => y.event.includes(x)
|
|
23864
|
+
);
|
|
23865
|
+
mapStatusEvents.forEach((mapStatusEvent) => {
|
|
23866
|
+
const value = mapStatusEvent.toString();
|
|
23690
23867
|
this.runtimeParams.forEach((r) => {
|
|
23691
23868
|
r.set(mapStatusEvent.name, value);
|
|
23692
23869
|
});
|
|
23693
|
-
}
|
|
23870
|
+
});
|
|
23694
23871
|
}
|
|
23695
23872
|
if (this._eventsStatus) {
|
|
23696
23873
|
this.emitter.emit(x, data);
|
|
@@ -24266,11 +24443,11 @@ class WebMapLayers extends WebMapMain {
|
|
|
24266
24443
|
}
|
|
24267
24444
|
return Promise.resolve();
|
|
24268
24445
|
}
|
|
24269
|
-
updateLayer(layerDef) {
|
|
24446
|
+
updateLayer(layerDef, options) {
|
|
24270
24447
|
const layer = this.getLayer(layerDef);
|
|
24271
24448
|
if (layer) {
|
|
24272
24449
|
if (layer.updateLayer) {
|
|
24273
|
-
return Promise.resolve(layer.updateLayer());
|
|
24450
|
+
return Promise.resolve(layer.updateLayer(options));
|
|
24274
24451
|
} else if (this.isLayerVisible(layer)) {
|
|
24275
24452
|
return this.hideLayer(layer, { silent: true }).then(() => {
|
|
24276
24453
|
return this.showLayer(layer, { silent: true });
|