@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
|
var NgwLeaflet = (function () {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -14947,6 +14947,20 @@ var NgwLeaflet = (function () {
|
|
|
14947
14947
|
function fixUrlStr(url) {
|
|
14948
14948
|
return url.replace(/([^:]\/)\/+/g, "$1");
|
|
14949
14949
|
}
|
|
14950
|
+
function updateUrlParams(urlStr, params) {
|
|
14951
|
+
const url = new URL(urlStr);
|
|
14952
|
+
const searchParams = new URLSearchParams(url.search);
|
|
14953
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
14954
|
+
if (value === void 0) {
|
|
14955
|
+
searchParams.delete(key);
|
|
14956
|
+
} else {
|
|
14957
|
+
searchParams.set(key, value);
|
|
14958
|
+
}
|
|
14959
|
+
});
|
|
14960
|
+
searchParams.set("timestamp", String((/* @__PURE__ */ new Date()).getTime()));
|
|
14961
|
+
const newSearch = [...searchParams.entries()].map(([key, value]) => `${key}=${value}`).join("&");
|
|
14962
|
+
return `${url.origin}${url.pathname}?${newSearch}`;
|
|
14963
|
+
}
|
|
14950
14964
|
|
|
14951
14965
|
function boundsToArray(bounds) {
|
|
14952
14966
|
const ne = bounds.getNorthEast();
|
|
@@ -15051,15 +15065,15 @@ var NgwLeaflet = (function () {
|
|
|
15051
15065
|
};
|
|
15052
15066
|
}
|
|
15053
15067
|
|
|
15054
|
-
var __defProp$
|
|
15055
|
-
var __defNormalProp$
|
|
15056
|
-
var __publicField$
|
|
15068
|
+
var __defProp$Z = Object.defineProperty;
|
|
15069
|
+
var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15070
|
+
var __publicField$F = (obj, key, value) => __defNormalProp$Z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15057
15071
|
class BaseAdapter {
|
|
15058
15072
|
constructor(map, options) {
|
|
15059
15073
|
this.map = map;
|
|
15060
15074
|
this.options = options;
|
|
15061
|
-
__publicField$
|
|
15062
|
-
__publicField$
|
|
15075
|
+
__publicField$F(this, "layer");
|
|
15076
|
+
__publicField$F(this, "pane", "order-0");
|
|
15063
15077
|
if (options.order !== void 0) {
|
|
15064
15078
|
const pane = "order-" + options.order;
|
|
15065
15079
|
let exist = map.getPane(pane);
|
|
@@ -15088,19 +15102,19 @@ var NgwLeaflet = (function () {
|
|
|
15088
15102
|
};
|
|
15089
15103
|
}
|
|
15090
15104
|
|
|
15091
|
-
var __defProp$
|
|
15105
|
+
var __defProp$Y = Object.defineProperty;
|
|
15092
15106
|
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
15093
15107
|
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
15094
15108
|
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
15095
|
-
var __defNormalProp$
|
|
15109
|
+
var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15096
15110
|
var __spreadValues$F = (a, b) => {
|
|
15097
15111
|
for (var prop in b || (b = {}))
|
|
15098
15112
|
if (__hasOwnProp$G.call(b, prop))
|
|
15099
|
-
__defNormalProp$
|
|
15113
|
+
__defNormalProp$Y(a, prop, b[prop]);
|
|
15100
15114
|
if (__getOwnPropSymbols$G)
|
|
15101
15115
|
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
15102
15116
|
if (__propIsEnum$G.call(b, prop))
|
|
15103
|
-
__defNormalProp$
|
|
15117
|
+
__defNormalProp$Y(a, prop, b[prop]);
|
|
15104
15118
|
}
|
|
15105
15119
|
return a;
|
|
15106
15120
|
};
|
|
@@ -15119,30 +15133,30 @@ var NgwLeaflet = (function () {
|
|
|
15119
15133
|
return opt;
|
|
15120
15134
|
}
|
|
15121
15135
|
|
|
15122
|
-
var __defProp$
|
|
15136
|
+
var __defProp$X = Object.defineProperty;
|
|
15123
15137
|
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
15124
15138
|
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
15125
15139
|
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
15126
|
-
var __defNormalProp$
|
|
15140
|
+
var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15127
15141
|
var __spreadValues$E = (a, b) => {
|
|
15128
15142
|
for (var prop in b || (b = {}))
|
|
15129
15143
|
if (__hasOwnProp$F.call(b, prop))
|
|
15130
|
-
__defNormalProp$
|
|
15144
|
+
__defNormalProp$X(a, prop, b[prop]);
|
|
15131
15145
|
if (__getOwnPropSymbols$F)
|
|
15132
15146
|
for (var prop of __getOwnPropSymbols$F(b)) {
|
|
15133
15147
|
if (__propIsEnum$F.call(b, prop))
|
|
15134
|
-
__defNormalProp$
|
|
15148
|
+
__defNormalProp$X(a, prop, b[prop]);
|
|
15135
15149
|
}
|
|
15136
15150
|
return a;
|
|
15137
15151
|
};
|
|
15138
|
-
var __publicField$
|
|
15152
|
+
var __publicField$E = (obj, key, value) => __defNormalProp$X(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15139
15153
|
class GeoJsonEvents {
|
|
15140
15154
|
constructor(layer) {
|
|
15141
|
-
__publicField$
|
|
15142
|
-
__publicField$
|
|
15143
|
-
__publicField$
|
|
15144
|
-
__publicField$
|
|
15145
|
-
__publicField$
|
|
15155
|
+
__publicField$E(this, "layer");
|
|
15156
|
+
__publicField$E(this, "_onclick");
|
|
15157
|
+
__publicField$E(this, "_ondblclick");
|
|
15158
|
+
__publicField$E(this, "_mouseout");
|
|
15159
|
+
__publicField$E(this, "_mouseover");
|
|
15146
15160
|
this.layer = layer;
|
|
15147
15161
|
}
|
|
15148
15162
|
handleMouseEvents(layer) {
|
|
@@ -15839,19 +15853,19 @@ var NgwLeaflet = (function () {
|
|
|
15839
15853
|
typeof: evaluateArgs(([arg]) => typeOfValue(arg))
|
|
15840
15854
|
};
|
|
15841
15855
|
|
|
15842
|
-
var __defProp$
|
|
15856
|
+
var __defProp$W = Object.defineProperty;
|
|
15843
15857
|
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
15844
15858
|
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
15845
15859
|
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
15846
|
-
var __defNormalProp$
|
|
15860
|
+
var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15847
15861
|
var __spreadValues$D = (a, b) => {
|
|
15848
15862
|
for (var prop in b || (b = {}))
|
|
15849
15863
|
if (__hasOwnProp$E.call(b, prop))
|
|
15850
|
-
__defNormalProp$
|
|
15864
|
+
__defNormalProp$W(a, prop, b[prop]);
|
|
15851
15865
|
if (__getOwnPropSymbols$E)
|
|
15852
15866
|
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
15853
15867
|
if (__propIsEnum$E.call(b, prop))
|
|
15854
|
-
__defNormalProp$
|
|
15868
|
+
__defNormalProp$W(a, prop, b[prop]);
|
|
15855
15869
|
}
|
|
15856
15870
|
return a;
|
|
15857
15871
|
};
|
|
@@ -15876,19 +15890,19 @@ var NgwLeaflet = (function () {
|
|
|
15876
15890
|
throw new Error(`Expression "${name}" is not supported.`);
|
|
15877
15891
|
}
|
|
15878
15892
|
|
|
15879
|
-
var __defProp$
|
|
15893
|
+
var __defProp$V = Object.defineProperty;
|
|
15880
15894
|
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
15881
15895
|
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
15882
15896
|
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
15883
|
-
var __defNormalProp$
|
|
15897
|
+
var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15884
15898
|
var __spreadValues$C = (a, b) => {
|
|
15885
15899
|
for (var prop in b || (b = {}))
|
|
15886
15900
|
if (__hasOwnProp$D.call(b, prop))
|
|
15887
|
-
__defNormalProp$
|
|
15901
|
+
__defNormalProp$V(a, prop, b[prop]);
|
|
15888
15902
|
if (__getOwnPropSymbols$D)
|
|
15889
15903
|
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
15890
15904
|
if (__propIsEnum$D.call(b, prop))
|
|
15891
|
-
__defNormalProp$
|
|
15905
|
+
__defNormalProp$V(a, prop, b[prop]);
|
|
15892
15906
|
}
|
|
15893
15907
|
return a;
|
|
15894
15908
|
};
|
|
@@ -15927,19 +15941,19 @@ var NgwLeaflet = (function () {
|
|
|
15927
15941
|
return;
|
|
15928
15942
|
}
|
|
15929
15943
|
|
|
15930
|
-
var __defProp$
|
|
15944
|
+
var __defProp$U = Object.defineProperty;
|
|
15931
15945
|
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
15932
15946
|
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
15933
15947
|
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
15934
|
-
var __defNormalProp$
|
|
15948
|
+
var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15935
15949
|
var __spreadValues$B = (a, b) => {
|
|
15936
15950
|
for (var prop in b || (b = {}))
|
|
15937
15951
|
if (__hasOwnProp$C.call(b, prop))
|
|
15938
|
-
__defNormalProp$
|
|
15952
|
+
__defNormalProp$U(a, prop, b[prop]);
|
|
15939
15953
|
if (__getOwnPropSymbols$C)
|
|
15940
15954
|
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
15941
15955
|
if (__propIsEnum$C.call(b, prop))
|
|
15942
|
-
__defNormalProp$
|
|
15956
|
+
__defNormalProp$U(a, prop, b[prop]);
|
|
15943
15957
|
}
|
|
15944
15958
|
return a;
|
|
15945
15959
|
};
|
|
@@ -16021,19 +16035,19 @@ var NgwLeaflet = (function () {
|
|
|
16021
16035
|
return logic === "any" ? filters_.some(filterFunction) : filters_.every(filterFunction);
|
|
16022
16036
|
}
|
|
16023
16037
|
|
|
16024
|
-
var __defProp$
|
|
16038
|
+
var __defProp$T = Object.defineProperty;
|
|
16025
16039
|
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
16026
16040
|
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
16027
16041
|
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
16028
|
-
var __defNormalProp$
|
|
16042
|
+
var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16029
16043
|
var __spreadValues$A = (a, b) => {
|
|
16030
16044
|
for (var prop in b || (b = {}))
|
|
16031
16045
|
if (__hasOwnProp$B.call(b, prop))
|
|
16032
|
-
__defNormalProp$
|
|
16046
|
+
__defNormalProp$T(a, prop, b[prop]);
|
|
16033
16047
|
if (__getOwnPropSymbols$B)
|
|
16034
16048
|
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
16035
16049
|
if (__propIsEnum$B.call(b, prop))
|
|
16036
|
-
__defNormalProp$
|
|
16050
|
+
__defNormalProp$T(a, prop, b[prop]);
|
|
16037
16051
|
}
|
|
16038
16052
|
return a;
|
|
16039
16053
|
};
|
|
@@ -16157,26 +16171,26 @@ var NgwLeaflet = (function () {
|
|
|
16157
16171
|
return newPaint;
|
|
16158
16172
|
}
|
|
16159
16173
|
|
|
16160
|
-
var __defProp$
|
|
16161
|
-
var __defProps$
|
|
16162
|
-
var __getOwnPropDescs$
|
|
16174
|
+
var __defProp$S = Object.defineProperty;
|
|
16175
|
+
var __defProps$m = Object.defineProperties;
|
|
16176
|
+
var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
|
|
16163
16177
|
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
16164
16178
|
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
16165
16179
|
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
16166
|
-
var __defNormalProp$
|
|
16180
|
+
var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16167
16181
|
var __spreadValues$z = (a, b) => {
|
|
16168
16182
|
for (var prop in b || (b = {}))
|
|
16169
16183
|
if (__hasOwnProp$A.call(b, prop))
|
|
16170
|
-
__defNormalProp$
|
|
16184
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
16171
16185
|
if (__getOwnPropSymbols$A)
|
|
16172
16186
|
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
16173
16187
|
if (__propIsEnum$A.call(b, prop))
|
|
16174
|
-
__defNormalProp$
|
|
16188
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
16175
16189
|
}
|
|
16176
16190
|
return a;
|
|
16177
16191
|
};
|
|
16178
|
-
var __spreadProps$
|
|
16179
|
-
var __objRest$
|
|
16192
|
+
var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
|
|
16193
|
+
var __objRest$6 = (source, exclude) => {
|
|
16180
16194
|
var target = {};
|
|
16181
16195
|
for (var prop in source)
|
|
16182
16196
|
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -16188,10 +16202,10 @@ var NgwLeaflet = (function () {
|
|
|
16188
16202
|
}
|
|
16189
16203
|
return target;
|
|
16190
16204
|
};
|
|
16191
|
-
var __publicField$
|
|
16205
|
+
var __publicField$D = (obj, key, value) => __defNormalProp$S(obj, key + "" , value);
|
|
16192
16206
|
class GeoJsonPaint {
|
|
16193
16207
|
constructor(layer) {
|
|
16194
|
-
__publicField$
|
|
16208
|
+
__publicField$D(this, "layer");
|
|
16195
16209
|
this.layer = layer;
|
|
16196
16210
|
}
|
|
16197
16211
|
setPaintEachLayer(paint) {
|
|
@@ -16259,7 +16273,7 @@ var NgwLeaflet = (function () {
|
|
|
16259
16273
|
return PAINT;
|
|
16260
16274
|
}
|
|
16261
16275
|
_createDivIcon(icon) {
|
|
16262
|
-
const _a = icon, { html, rotate, className } = _a, toLIconOpt = __objRest$
|
|
16276
|
+
const _a = icon, { html, rotate, className } = _a, toLIconOpt = __objRest$6(_a, ["html", "rotate", "className"]);
|
|
16263
16277
|
const element = document.createElement("div");
|
|
16264
16278
|
if (className) {
|
|
16265
16279
|
element.className = className;
|
|
@@ -16270,7 +16284,7 @@ var NgwLeaflet = (function () {
|
|
|
16270
16284
|
if (html) {
|
|
16271
16285
|
element.innerHTML = html;
|
|
16272
16286
|
}
|
|
16273
|
-
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$
|
|
16287
|
+
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$m(__spreadValues$z({
|
|
16274
16288
|
className: ""
|
|
16275
16289
|
}, toLIconOpt), {
|
|
16276
16290
|
html: element
|
|
@@ -16318,26 +16332,26 @@ var NgwLeaflet = (function () {
|
|
|
16318
16332
|
}
|
|
16319
16333
|
}
|
|
16320
16334
|
|
|
16321
|
-
var __defProp$
|
|
16322
|
-
var __defProps$
|
|
16323
|
-
var __getOwnPropDescs$
|
|
16335
|
+
var __defProp$R = Object.defineProperty;
|
|
16336
|
+
var __defProps$l = Object.defineProperties;
|
|
16337
|
+
var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
|
|
16324
16338
|
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
16325
16339
|
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
16326
16340
|
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
16327
|
-
var __defNormalProp$
|
|
16341
|
+
var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16328
16342
|
var __spreadValues$y = (a, b) => {
|
|
16329
16343
|
for (var prop in b || (b = {}))
|
|
16330
16344
|
if (__hasOwnProp$z.call(b, prop))
|
|
16331
|
-
__defNormalProp$
|
|
16345
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
16332
16346
|
if (__getOwnPropSymbols$z)
|
|
16333
16347
|
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
16334
16348
|
if (__propIsEnum$z.call(b, prop))
|
|
16335
|
-
__defNormalProp$
|
|
16349
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
16336
16350
|
}
|
|
16337
16351
|
return a;
|
|
16338
16352
|
};
|
|
16339
|
-
var __spreadProps$
|
|
16340
|
-
var __publicField$
|
|
16353
|
+
var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
|
|
16354
|
+
var __publicField$C = (obj, key, value) => __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16341
16355
|
var __async$s = (__this, __arguments, generator) => {
|
|
16342
16356
|
return new Promise((resolve, reject) => {
|
|
16343
16357
|
var fulfilled = (value) => {
|
|
@@ -16361,22 +16375,22 @@ var NgwLeaflet = (function () {
|
|
|
16361
16375
|
class GeoJsonAdapter extends BaseAdapter {
|
|
16362
16376
|
constructor(map, options) {
|
|
16363
16377
|
super(map, options);
|
|
16364
|
-
__publicField$
|
|
16365
|
-
__publicField$
|
|
16366
|
-
__publicField$
|
|
16367
|
-
__publicField$
|
|
16368
|
-
__publicField$
|
|
16369
|
-
__publicField$
|
|
16370
|
-
__publicField$
|
|
16371
|
-
__publicField$
|
|
16372
|
-
__publicField$
|
|
16373
|
-
__publicField$
|
|
16374
|
-
__publicField$
|
|
16375
|
-
__publicField$
|
|
16376
|
-
__publicField$
|
|
16378
|
+
__publicField$C(this, "layer");
|
|
16379
|
+
__publicField$C(this, "selected", false);
|
|
16380
|
+
__publicField$C(this, "type");
|
|
16381
|
+
__publicField$C(this, "_layers", []);
|
|
16382
|
+
__publicField$C(this, "_events");
|
|
16383
|
+
__publicField$C(this, "paint");
|
|
16384
|
+
__publicField$C(this, "selectedPaint");
|
|
16385
|
+
__publicField$C(this, "_selectedLayers", []);
|
|
16386
|
+
__publicField$C(this, "_filteredLayers", []);
|
|
16387
|
+
__publicField$C(this, "_filterFun");
|
|
16388
|
+
__publicField$C(this, "_openedPopup", []);
|
|
16389
|
+
__publicField$C(this, "_paint");
|
|
16390
|
+
__publicField$C(this, "$updateTooltip", debounce(() => {
|
|
16377
16391
|
this.updateTooltip();
|
|
16378
16392
|
}, 300));
|
|
16379
|
-
__publicField$
|
|
16393
|
+
__publicField$C(this, "$unselect", () => {
|
|
16380
16394
|
this.unselect();
|
|
16381
16395
|
});
|
|
16382
16396
|
this._events = new GeoJsonEvents(this);
|
|
@@ -16385,7 +16399,7 @@ var NgwLeaflet = (function () {
|
|
|
16385
16399
|
addLayer(options) {
|
|
16386
16400
|
Object.assign(this.options, options);
|
|
16387
16401
|
this.paint = options.paint;
|
|
16388
|
-
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$
|
|
16402
|
+
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$l(__spreadValues$y({}, options.nativeOptions), {
|
|
16389
16403
|
pane: this.pane
|
|
16390
16404
|
}));
|
|
16391
16405
|
this.selectedPaint = options.selectedPaint;
|
|
@@ -16735,7 +16749,7 @@ var NgwLeaflet = (function () {
|
|
|
16735
16749
|
if (feature) {
|
|
16736
16750
|
return this._paint.preparePaint(__spreadValues$y(__spreadValues$y({}, PAINT), paint(feature)));
|
|
16737
16751
|
} else {
|
|
16738
|
-
return this._paint.preparePaint(__spreadProps$
|
|
16752
|
+
return this._paint.preparePaint(__spreadProps$l(__spreadValues$y({}, PAINT), { type: "path" }));
|
|
16739
16753
|
}
|
|
16740
16754
|
}
|
|
16741
16755
|
};
|
|
@@ -16929,20 +16943,20 @@ var NgwLeaflet = (function () {
|
|
|
16929
16943
|
return [promise, abortFunc];
|
|
16930
16944
|
}
|
|
16931
16945
|
|
|
16932
|
-
var __defProp$
|
|
16933
|
-
var __defNormalProp$
|
|
16934
|
-
var __publicField$
|
|
16946
|
+
var __defProp$Q = Object.defineProperty;
|
|
16947
|
+
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16948
|
+
var __publicField$B = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16935
16949
|
class Queue {
|
|
16936
16950
|
/**
|
|
16937
16951
|
* @param {PromiseQueueOptions} options - Configuration options for the queue.
|
|
16938
16952
|
*/
|
|
16939
16953
|
constructor({ concurrency = 1, delay = 0 } = {}) {
|
|
16940
|
-
__publicField$
|
|
16941
|
-
__publicField$
|
|
16942
|
-
__publicField$
|
|
16943
|
-
__publicField$
|
|
16944
|
-
__publicField$
|
|
16945
|
-
__publicField$
|
|
16954
|
+
__publicField$B(this, "queue", []);
|
|
16955
|
+
__publicField$B(this, "concurrency");
|
|
16956
|
+
__publicField$B(this, "activeCount", 0);
|
|
16957
|
+
__publicField$B(this, "timeoutId");
|
|
16958
|
+
__publicField$B(this, "delay");
|
|
16959
|
+
__publicField$B(this, "toAbort", []);
|
|
16946
16960
|
this.concurrency = concurrency;
|
|
16947
16961
|
this.delay = delay;
|
|
16948
16962
|
}
|
|
@@ -17018,13 +17032,13 @@ var NgwLeaflet = (function () {
|
|
|
17018
17032
|
|
|
17019
17033
|
const imageQueue = new Queue({ concurrency: 6, delay: 200 });
|
|
17020
17034
|
|
|
17021
|
-
var __defProp$
|
|
17022
|
-
var __defNormalProp$
|
|
17023
|
-
var __publicField$
|
|
17035
|
+
var __defProp$P = Object.defineProperty;
|
|
17036
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17037
|
+
var __publicField$A = (obj, key, value) => __defNormalProp$P(obj, key + "" , value);
|
|
17024
17038
|
class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
17025
17039
|
constructor(imageUrl, bounds, options) {
|
|
17026
17040
|
super(imageUrl, bounds, options);
|
|
17027
|
-
__publicField$
|
|
17041
|
+
__publicField$A(this, "_aborter");
|
|
17028
17042
|
}
|
|
17029
17043
|
cancelLoad() {
|
|
17030
17044
|
if (this._aborter) {
|
|
@@ -17053,13 +17067,14 @@ var NgwLeaflet = (function () {
|
|
|
17053
17067
|
}
|
|
17054
17068
|
}
|
|
17055
17069
|
|
|
17056
|
-
var __defProp$
|
|
17057
|
-
var __defNormalProp$
|
|
17058
|
-
var __publicField$
|
|
17070
|
+
var __defProp$O = Object.defineProperty;
|
|
17071
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17072
|
+
var __publicField$z = (obj, key, value) => __defNormalProp$O(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17059
17073
|
class ImageLayer extends leafletSrcExports.Layer {
|
|
17060
17074
|
constructor(url, options) {
|
|
17075
|
+
var _a;
|
|
17061
17076
|
super(options);
|
|
17062
|
-
__publicField$
|
|
17077
|
+
__publicField$z(this, "defaultWmsParams", {
|
|
17063
17078
|
service: "WMS",
|
|
17064
17079
|
request: "GetMap",
|
|
17065
17080
|
version: "1.1.1",
|
|
@@ -17068,7 +17083,7 @@ var NgwLeaflet = (function () {
|
|
|
17068
17083
|
format: "image/jpeg",
|
|
17069
17084
|
transparent: false
|
|
17070
17085
|
});
|
|
17071
|
-
__publicField$
|
|
17086
|
+
__publicField$z(this, "options", {
|
|
17072
17087
|
crs: null,
|
|
17073
17088
|
uppercase: false,
|
|
17074
17089
|
attribution: "",
|
|
@@ -17081,11 +17096,11 @@ var NgwLeaflet = (function () {
|
|
|
17081
17096
|
viewPortBuffer: 0,
|
|
17082
17097
|
setViewDelay: 100
|
|
17083
17098
|
});
|
|
17084
|
-
__publicField$
|
|
17085
|
-
__publicField$
|
|
17086
|
-
__publicField$
|
|
17087
|
-
__publicField$
|
|
17088
|
-
__publicField$
|
|
17099
|
+
__publicField$z(this, "wmsParams");
|
|
17100
|
+
__publicField$z(this, "_url");
|
|
17101
|
+
__publicField$z(this, "_currentUrl");
|
|
17102
|
+
__publicField$z(this, "_currentOverlay");
|
|
17103
|
+
__publicField$z(this, "_loadedOverlay");
|
|
17089
17104
|
this._url = url;
|
|
17090
17105
|
const params = {};
|
|
17091
17106
|
const opts = {};
|
|
@@ -17098,7 +17113,11 @@ var NgwLeaflet = (function () {
|
|
|
17098
17113
|
}
|
|
17099
17114
|
}
|
|
17100
17115
|
leafletSrcExports.Util.setOptions(this, opts);
|
|
17101
|
-
this.wmsParams = leafletSrcExports.Util.extend(
|
|
17116
|
+
this.wmsParams = leafletSrcExports.Util.extend(
|
|
17117
|
+
{},
|
|
17118
|
+
this.defaultWmsParams,
|
|
17119
|
+
(_a = params == null ? void 0 : params.params) != null ? _a : {}
|
|
17120
|
+
);
|
|
17102
17121
|
}
|
|
17103
17122
|
setParams(params) {
|
|
17104
17123
|
leafletSrcExports.Util.extend(this.wmsParams, params);
|
|
@@ -17245,27 +17264,27 @@ var NgwLeaflet = (function () {
|
|
|
17245
17264
|
}
|
|
17246
17265
|
}
|
|
17247
17266
|
|
|
17248
|
-
var __defProp$
|
|
17267
|
+
var __defProp$N = Object.defineProperty;
|
|
17249
17268
|
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
17250
17269
|
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
17251
17270
|
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
17252
|
-
var __defNormalProp$
|
|
17271
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17253
17272
|
var __spreadValues$x = (a, b) => {
|
|
17254
17273
|
for (var prop in b || (b = {}))
|
|
17255
17274
|
if (__hasOwnProp$y.call(b, prop))
|
|
17256
|
-
__defNormalProp$
|
|
17275
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
17257
17276
|
if (__getOwnPropSymbols$y)
|
|
17258
17277
|
for (var prop of __getOwnPropSymbols$y(b)) {
|
|
17259
17278
|
if (__propIsEnum$y.call(b, prop))
|
|
17260
|
-
__defNormalProp$
|
|
17279
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
17261
17280
|
}
|
|
17262
17281
|
return a;
|
|
17263
17282
|
};
|
|
17264
|
-
var __publicField$
|
|
17283
|
+
var __publicField$y = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17265
17284
|
class ImageAdapter extends BaseAdapter {
|
|
17266
17285
|
constructor() {
|
|
17267
17286
|
super(...arguments);
|
|
17268
|
-
__publicField$
|
|
17287
|
+
__publicField$y(this, "layer");
|
|
17269
17288
|
}
|
|
17270
17289
|
addLayer(options) {
|
|
17271
17290
|
const url = options && options.url;
|
|
@@ -17287,8 +17306,15 @@ var NgwLeaflet = (function () {
|
|
|
17287
17306
|
return this.layer;
|
|
17288
17307
|
}
|
|
17289
17308
|
}
|
|
17309
|
+
updateLayer(options) {
|
|
17310
|
+
if (this.layer) {
|
|
17311
|
+
const params = (options == null ? void 0 : options.params) || {};
|
|
17312
|
+
leafletSrcExports.Util.extend(this.layer.wmsParams, params);
|
|
17313
|
+
this.layer.update();
|
|
17314
|
+
}
|
|
17315
|
+
}
|
|
17290
17316
|
}
|
|
17291
|
-
__publicField$
|
|
17317
|
+
__publicField$y(ImageAdapter, "queue", imageQueue);
|
|
17292
17318
|
|
|
17293
17319
|
function makeRemote(Base) {
|
|
17294
17320
|
return class RemoteTileLayer extends Base {
|
|
@@ -17350,26 +17376,26 @@ var NgwLeaflet = (function () {
|
|
|
17350
17376
|
}
|
|
17351
17377
|
const TileLayer = makeRemote(TileLayerBase);
|
|
17352
17378
|
|
|
17353
|
-
var __defProp$
|
|
17354
|
-
var __defProps$
|
|
17355
|
-
var __getOwnPropDescs$
|
|
17379
|
+
var __defProp$M = Object.defineProperty;
|
|
17380
|
+
var __defProps$k = Object.defineProperties;
|
|
17381
|
+
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
17356
17382
|
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
17357
17383
|
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
17358
17384
|
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
17359
|
-
var __defNormalProp$
|
|
17385
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17360
17386
|
var __spreadValues$w = (a, b) => {
|
|
17361
17387
|
for (var prop in b || (b = {}))
|
|
17362
17388
|
if (__hasOwnProp$x.call(b, prop))
|
|
17363
|
-
__defNormalProp$
|
|
17389
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
17364
17390
|
if (__getOwnPropSymbols$x)
|
|
17365
17391
|
for (var prop of __getOwnPropSymbols$x(b)) {
|
|
17366
17392
|
if (__propIsEnum$x.call(b, prop))
|
|
17367
|
-
__defNormalProp$
|
|
17393
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
17368
17394
|
}
|
|
17369
17395
|
return a;
|
|
17370
17396
|
};
|
|
17371
|
-
var __spreadProps$
|
|
17372
|
-
var __objRest$
|
|
17397
|
+
var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
|
|
17398
|
+
var __objRest$5 = (source, exclude) => {
|
|
17373
17399
|
var target = {};
|
|
17374
17400
|
for (var prop in source)
|
|
17375
17401
|
if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -17385,7 +17411,7 @@ var NgwLeaflet = (function () {
|
|
|
17385
17411
|
addLayer(options) {
|
|
17386
17412
|
this.options = Object.assign(this.options, options);
|
|
17387
17413
|
if (options) {
|
|
17388
|
-
const _a = options, { url } = _a, opt = __objRest$
|
|
17414
|
+
const _a = options, { url } = _a, opt = __objRest$5(_a, ["url"]);
|
|
17389
17415
|
if (url) {
|
|
17390
17416
|
const tileLayerOptions = __spreadValues$w({
|
|
17391
17417
|
pane: this.pane,
|
|
@@ -17398,7 +17424,7 @@ var NgwLeaflet = (function () {
|
|
|
17398
17424
|
}
|
|
17399
17425
|
let layer;
|
|
17400
17426
|
if (opt.headers || opt.withCredentials) {
|
|
17401
|
-
layer = new TileLayer(url, __spreadProps$
|
|
17427
|
+
layer = new TileLayer(url, __spreadProps$k(__spreadValues$w({}, tileLayerOptions), {
|
|
17402
17428
|
headers: opt.headers,
|
|
17403
17429
|
withCredentials: opt.withCredentials,
|
|
17404
17430
|
setViewDelay: opt.setViewDelay
|
|
@@ -17410,41 +17436,40 @@ var NgwLeaflet = (function () {
|
|
|
17410
17436
|
}
|
|
17411
17437
|
}
|
|
17412
17438
|
}
|
|
17413
|
-
updateLayer() {
|
|
17439
|
+
updateLayer(options) {
|
|
17414
17440
|
if (this.layer) {
|
|
17415
17441
|
const currentUrl = this.layer._url;
|
|
17416
|
-
|
|
17417
|
-
|
|
17418
|
-
|
|
17419
|
-
this.layer.setUrl(newUrl);
|
|
17442
|
+
if (options == null ? void 0 : options.params) {
|
|
17443
|
+
this.layer.setUrl(updateUrlParams(currentUrl, options.params));
|
|
17444
|
+
}
|
|
17420
17445
|
this.layer.redraw();
|
|
17421
17446
|
}
|
|
17422
17447
|
}
|
|
17423
17448
|
}
|
|
17424
17449
|
|
|
17425
|
-
var __defProp$
|
|
17426
|
-
var __defProps$
|
|
17427
|
-
var __getOwnPropDescs$
|
|
17450
|
+
var __defProp$L = Object.defineProperty;
|
|
17451
|
+
var __defProps$j = Object.defineProperties;
|
|
17452
|
+
var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
|
|
17428
17453
|
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
17429
17454
|
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
17430
17455
|
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
17431
|
-
var __defNormalProp$
|
|
17456
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17432
17457
|
var __spreadValues$v = (a, b) => {
|
|
17433
17458
|
for (var prop in b || (b = {}))
|
|
17434
17459
|
if (__hasOwnProp$w.call(b, prop))
|
|
17435
|
-
__defNormalProp$
|
|
17460
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
17436
17461
|
if (__getOwnPropSymbols$w)
|
|
17437
17462
|
for (var prop of __getOwnPropSymbols$w(b)) {
|
|
17438
17463
|
if (__propIsEnum$w.call(b, prop))
|
|
17439
|
-
__defNormalProp$
|
|
17464
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
17440
17465
|
}
|
|
17441
17466
|
return a;
|
|
17442
17467
|
};
|
|
17443
|
-
var __spreadProps$
|
|
17468
|
+
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
|
|
17444
17469
|
class OsmAdapter extends TileAdapter {
|
|
17445
17470
|
addLayer(options) {
|
|
17446
17471
|
const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
|
17447
|
-
return super.addLayer(__spreadProps$
|
|
17472
|
+
return super.addLayer(__spreadProps$j(__spreadValues$v({
|
|
17448
17473
|
name: "OpenStreetMap",
|
|
17449
17474
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
|
17450
17475
|
}, options), {
|
|
@@ -17460,26 +17485,26 @@ var NgwLeaflet = (function () {
|
|
|
17460
17485
|
}
|
|
17461
17486
|
const WmsLayer = makeRemote(WmsLayerBase);
|
|
17462
17487
|
|
|
17463
|
-
var __defProp$
|
|
17464
|
-
var __defProps$
|
|
17465
|
-
var __getOwnPropDescs$
|
|
17488
|
+
var __defProp$K = Object.defineProperty;
|
|
17489
|
+
var __defProps$i = Object.defineProperties;
|
|
17490
|
+
var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
|
|
17466
17491
|
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
17467
17492
|
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
17468
17493
|
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
17469
|
-
var __defNormalProp$
|
|
17494
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17470
17495
|
var __spreadValues$u = (a, b) => {
|
|
17471
17496
|
for (var prop in b || (b = {}))
|
|
17472
17497
|
if (__hasOwnProp$v.call(b, prop))
|
|
17473
|
-
__defNormalProp$
|
|
17498
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
17474
17499
|
if (__getOwnPropSymbols$v)
|
|
17475
17500
|
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
17476
17501
|
if (__propIsEnum$v.call(b, prop))
|
|
17477
|
-
__defNormalProp$
|
|
17502
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
17478
17503
|
}
|
|
17479
17504
|
return a;
|
|
17480
17505
|
};
|
|
17481
|
-
var __spreadProps$
|
|
17482
|
-
var __objRest$
|
|
17506
|
+
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
17507
|
+
var __objRest$4 = (source, exclude) => {
|
|
17483
17508
|
var target = {};
|
|
17484
17509
|
for (var prop in source)
|
|
17485
17510
|
if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -17494,7 +17519,7 @@ var NgwLeaflet = (function () {
|
|
|
17494
17519
|
class WmsAdapter extends BaseAdapter {
|
|
17495
17520
|
addLayer(options) {
|
|
17496
17521
|
Object.assign(this.options, options);
|
|
17497
|
-
const _a = options, { url } = _a, opt = __objRest$
|
|
17522
|
+
const _a = options, { url } = _a, opt = __objRest$4(_a, ["url"]);
|
|
17498
17523
|
if (url) {
|
|
17499
17524
|
const layerOptions = __spreadValues$u({
|
|
17500
17525
|
pane: this.pane,
|
|
@@ -17507,7 +17532,7 @@ var NgwLeaflet = (function () {
|
|
|
17507
17532
|
}, options.nativeOptions);
|
|
17508
17533
|
let layer;
|
|
17509
17534
|
if (opt.headers || opt.withCredentials) {
|
|
17510
|
-
layer = new WmsLayer(url, __spreadProps$
|
|
17535
|
+
layer = new WmsLayer(url, __spreadProps$i(__spreadValues$u({}, layerOptions), {
|
|
17511
17536
|
headers: opt.headers,
|
|
17512
17537
|
withCredentials: opt.withCredentials
|
|
17513
17538
|
}));
|
|
@@ -17527,33 +17552,33 @@ var NgwLeaflet = (function () {
|
|
|
17527
17552
|
];
|
|
17528
17553
|
}
|
|
17529
17554
|
|
|
17530
|
-
var __defProp$
|
|
17555
|
+
var __defProp$J = Object.defineProperty;
|
|
17531
17556
|
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
17532
17557
|
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
17533
17558
|
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
17534
|
-
var __defNormalProp$
|
|
17559
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17535
17560
|
var __spreadValues$t = (a, b) => {
|
|
17536
17561
|
for (var prop in b || (b = {}))
|
|
17537
17562
|
if (__hasOwnProp$u.call(b, prop))
|
|
17538
|
-
__defNormalProp$
|
|
17563
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
17539
17564
|
if (__getOwnPropSymbols$u)
|
|
17540
17565
|
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
17541
17566
|
if (__propIsEnum$u.call(b, prop))
|
|
17542
|
-
__defNormalProp$
|
|
17567
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
17543
17568
|
}
|
|
17544
17569
|
return a;
|
|
17545
17570
|
};
|
|
17546
|
-
var __publicField$
|
|
17571
|
+
var __publicField$x = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17547
17572
|
const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
17548
17573
|
constructor() {
|
|
17549
|
-
__publicField$
|
|
17550
|
-
__publicField$
|
|
17551
|
-
__publicField$
|
|
17552
|
-
__publicField$
|
|
17553
|
-
__publicField$
|
|
17554
|
-
__publicField$
|
|
17555
|
-
__publicField$
|
|
17556
|
-
__publicField$
|
|
17574
|
+
__publicField$x(this, "options", { target: "map" });
|
|
17575
|
+
__publicField$x(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
|
|
17576
|
+
__publicField$x(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
|
|
17577
|
+
__publicField$x(this, "emitter", new EventEmitter());
|
|
17578
|
+
__publicField$x(this, "map");
|
|
17579
|
+
__publicField$x(this, "_resizeObserver");
|
|
17580
|
+
__publicField$x(this, "_unselectCb", []);
|
|
17581
|
+
__publicField$x(this, "_universalEvents", [
|
|
17557
17582
|
"move",
|
|
17558
17583
|
"zoom",
|
|
17559
17584
|
"zoomend",
|
|
@@ -17561,7 +17586,7 @@ var NgwLeaflet = (function () {
|
|
|
17561
17586
|
"moveend",
|
|
17562
17587
|
"movestart"
|
|
17563
17588
|
]);
|
|
17564
|
-
__publicField$
|
|
17589
|
+
__publicField$x(this, "_positionEvents", [
|
|
17565
17590
|
"mousemove",
|
|
17566
17591
|
"mouseout",
|
|
17567
17592
|
"mouseover"
|
|
@@ -17861,7 +17886,7 @@ var NgwLeaflet = (function () {
|
|
|
17861
17886
|
}
|
|
17862
17887
|
}
|
|
17863
17888
|
};
|
|
17864
|
-
__publicField$
|
|
17889
|
+
__publicField$x(_LeafletMapAdapter, "layerAdapters", {
|
|
17865
17890
|
GEOJSON: GeoJsonAdapter,
|
|
17866
17891
|
IMAGE: ImageAdapter,
|
|
17867
17892
|
TILE: TileAdapter,
|
|
@@ -17869,11 +17894,11 @@ var NgwLeaflet = (function () {
|
|
|
17869
17894
|
// // MVT: MvtAdapter,
|
|
17870
17895
|
OSM: OsmAdapter
|
|
17871
17896
|
});
|
|
17872
|
-
__publicField$
|
|
17897
|
+
__publicField$x(_LeafletMapAdapter, "controlAdapters", {
|
|
17873
17898
|
ZOOM: leafletSrcExports.Control.Zoom,
|
|
17874
17899
|
ATTRIBUTION: AttributionControl
|
|
17875
17900
|
});
|
|
17876
|
-
__publicField$
|
|
17901
|
+
__publicField$x(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
|
|
17877
17902
|
let LeafletMapAdapter = _LeafletMapAdapter;
|
|
17878
17903
|
|
|
17879
17904
|
const svgPath = {
|
|
@@ -17948,12 +17973,12 @@ var NgwLeaflet = (function () {
|
|
|
17948
17973
|
};
|
|
17949
17974
|
}
|
|
17950
17975
|
|
|
17951
|
-
var __defProp$
|
|
17952
|
-
var __defNormalProp$
|
|
17953
|
-
var __publicField$
|
|
17976
|
+
var __defProp$I = Object.defineProperty;
|
|
17977
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17978
|
+
var __publicField$w = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17954
17979
|
const _Cache = class _Cache {
|
|
17955
17980
|
constructor(options = {}) {
|
|
17956
|
-
__publicField$
|
|
17981
|
+
__publicField$w(this, "cache", []);
|
|
17957
17982
|
var _a;
|
|
17958
17983
|
const namespace = (_a = options.namespace) != null ? _a : "default";
|
|
17959
17984
|
if (_Cache.instance[namespace]) {
|
|
@@ -18059,12 +18084,12 @@ var NgwLeaflet = (function () {
|
|
|
18059
18084
|
return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
|
|
18060
18085
|
}
|
|
18061
18086
|
};
|
|
18062
|
-
__publicField$
|
|
18087
|
+
__publicField$w(_Cache, "instance", {});
|
|
18063
18088
|
let Cache = _Cache;
|
|
18064
18089
|
|
|
18065
18090
|
var pkg = {
|
|
18066
18091
|
name: "@nextgis/ngw-connector",
|
|
18067
|
-
version: "3.0.0-alpha.
|
|
18092
|
+
version: "3.0.0-alpha.4",
|
|
18068
18093
|
_priority: 12,
|
|
18069
18094
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
18070
18095
|
main: "index.js",
|
|
@@ -18073,15 +18098,15 @@ var NgwLeaflet = (function () {
|
|
|
18073
18098
|
jsdelivr: "lib/ngw-connector.global.prod.js",
|
|
18074
18099
|
types: "lib/index.d.ts",
|
|
18075
18100
|
dependencies: {
|
|
18076
|
-
"@nextgis/cache": "^3.0.0-alpha.
|
|
18077
|
-
"@nextgis/cancelable-promise": "^3.0.0-alpha.
|
|
18078
|
-
"@nextgis/utils": "^3.0.0-alpha.
|
|
18101
|
+
"@nextgis/cache": "^3.0.0-alpha.4",
|
|
18102
|
+
"@nextgis/cancelable-promise": "^3.0.0-alpha.3",
|
|
18103
|
+
"@nextgis/utils": "^3.0.0-alpha.4",
|
|
18079
18104
|
"@types/events": "^3.0.0",
|
|
18080
18105
|
events: "*",
|
|
18081
18106
|
"form-data": "^4.0.0"
|
|
18082
18107
|
},
|
|
18083
18108
|
devDependencies: {
|
|
18084
|
-
"@nextgis/build-tools": "^3.0.0-alpha.
|
|
18109
|
+
"@nextgis/build-tools": "^3.0.0-alpha.3"
|
|
18085
18110
|
},
|
|
18086
18111
|
scripts: {
|
|
18087
18112
|
clean: "rimraf ./lib",
|
|
@@ -18118,33 +18143,33 @@ var NgwLeaflet = (function () {
|
|
|
18118
18143
|
gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
|
|
18119
18144
|
};
|
|
18120
18145
|
|
|
18121
|
-
var __defProp$
|
|
18122
|
-
var __defNormalProp$
|
|
18123
|
-
var __publicField$
|
|
18146
|
+
var __defProp$H = Object.defineProperty;
|
|
18147
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18148
|
+
var __publicField$v = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18124
18149
|
class NgwError extends Error {
|
|
18125
18150
|
constructor(er) {
|
|
18126
18151
|
super();
|
|
18127
|
-
__publicField$
|
|
18128
|
-
__publicField$
|
|
18129
|
-
__publicField$
|
|
18130
|
-
__publicField$
|
|
18131
|
-
__publicField$
|
|
18132
|
-
__publicField$
|
|
18133
|
-
__publicField$
|
|
18134
|
-
__publicField$
|
|
18152
|
+
__publicField$v(this, "name", "NgwError");
|
|
18153
|
+
__publicField$v(this, "title");
|
|
18154
|
+
__publicField$v(this, "message");
|
|
18155
|
+
__publicField$v(this, "detail");
|
|
18156
|
+
__publicField$v(this, "exception");
|
|
18157
|
+
__publicField$v(this, "status_code");
|
|
18158
|
+
__publicField$v(this, "data");
|
|
18159
|
+
__publicField$v(this, "guru_meditation");
|
|
18135
18160
|
Object.assign(this, er);
|
|
18136
18161
|
Object.setPrototypeOf(this, NgwError.prototype);
|
|
18137
18162
|
}
|
|
18138
18163
|
}
|
|
18139
18164
|
|
|
18140
|
-
var __defProp$
|
|
18141
|
-
var __defNormalProp$
|
|
18142
|
-
var __publicField$
|
|
18165
|
+
var __defProp$G = Object.defineProperty;
|
|
18166
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18167
|
+
var __publicField$u = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18143
18168
|
class ResourceNotFoundError extends NgwError {
|
|
18144
18169
|
constructor(obj) {
|
|
18145
18170
|
super(obj);
|
|
18146
|
-
__publicField$
|
|
18147
|
-
__publicField$
|
|
18171
|
+
__publicField$u(this, "name", "ResourceNotFoundError");
|
|
18172
|
+
__publicField$u(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
|
|
18148
18173
|
Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
|
|
18149
18174
|
}
|
|
18150
18175
|
}
|
|
@@ -18178,23 +18203,23 @@ var NgwLeaflet = (function () {
|
|
|
18178
18203
|
return query;
|
|
18179
18204
|
}
|
|
18180
18205
|
|
|
18181
|
-
var __defProp$
|
|
18206
|
+
var __defProp$F = Object.defineProperty;
|
|
18182
18207
|
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
18183
18208
|
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
18184
18209
|
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
18185
|
-
var __defNormalProp$
|
|
18210
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18186
18211
|
var __spreadValues$s = (a, b) => {
|
|
18187
18212
|
for (var prop in b || (b = {}))
|
|
18188
18213
|
if (__hasOwnProp$t.call(b, prop))
|
|
18189
|
-
__defNormalProp$
|
|
18214
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
18190
18215
|
if (__getOwnPropSymbols$t)
|
|
18191
18216
|
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
18192
18217
|
if (__propIsEnum$t.call(b, prop))
|
|
18193
|
-
__defNormalProp$
|
|
18218
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
18194
18219
|
}
|
|
18195
18220
|
return a;
|
|
18196
18221
|
};
|
|
18197
|
-
var __publicField$
|
|
18222
|
+
var __publicField$t = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18198
18223
|
var __async$r = (__this, __arguments, generator) => {
|
|
18199
18224
|
return new Promise((resolve, reject) => {
|
|
18200
18225
|
var fulfilled = (value) => {
|
|
@@ -18220,8 +18245,8 @@ var NgwLeaflet = (function () {
|
|
|
18220
18245
|
connector,
|
|
18221
18246
|
cacheId
|
|
18222
18247
|
}) {
|
|
18223
|
-
__publicField$
|
|
18224
|
-
__publicField$
|
|
18248
|
+
__publicField$t(this, "cache");
|
|
18249
|
+
__publicField$t(this, "connector");
|
|
18225
18250
|
this.connector = connector;
|
|
18226
18251
|
this.cache = new Cache({ namespace: cacheId });
|
|
18227
18252
|
}
|
|
@@ -18474,14 +18499,14 @@ var NgwLeaflet = (function () {
|
|
|
18474
18499
|
}
|
|
18475
18500
|
}
|
|
18476
18501
|
|
|
18477
|
-
var __defProp$
|
|
18478
|
-
var __defNormalProp$
|
|
18479
|
-
var __publicField$
|
|
18502
|
+
var __defProp$E = Object.defineProperty;
|
|
18503
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18504
|
+
var __publicField$s = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18480
18505
|
class InsufficientPermissionsError extends NgwError {
|
|
18481
18506
|
constructor(obj) {
|
|
18482
18507
|
super(obj);
|
|
18483
|
-
__publicField$
|
|
18484
|
-
__publicField$
|
|
18508
|
+
__publicField$s(this, "name", "InsufficientPermissionsError");
|
|
18509
|
+
__publicField$s(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
|
|
18485
18510
|
Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
|
|
18486
18511
|
}
|
|
18487
18512
|
}
|
|
@@ -18499,19 +18524,19 @@ var NgwLeaflet = (function () {
|
|
|
18499
18524
|
});
|
|
18500
18525
|
}
|
|
18501
18526
|
|
|
18502
|
-
var __defProp$
|
|
18527
|
+
var __defProp$D = Object.defineProperty;
|
|
18503
18528
|
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
18504
18529
|
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
18505
18530
|
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
18506
|
-
var __defNormalProp$
|
|
18531
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18507
18532
|
var __spreadValues$r = (a, b) => {
|
|
18508
18533
|
for (var prop in b || (b = {}))
|
|
18509
18534
|
if (__hasOwnProp$s.call(b, prop))
|
|
18510
|
-
__defNormalProp$
|
|
18535
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
18511
18536
|
if (__getOwnPropSymbols$s)
|
|
18512
18537
|
for (var prop of __getOwnPropSymbols$s(b)) {
|
|
18513
18538
|
if (__propIsEnum$s.call(b, prop))
|
|
18514
|
-
__defNormalProp$
|
|
18539
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
18515
18540
|
}
|
|
18516
18541
|
return a;
|
|
18517
18542
|
};
|
|
@@ -18586,13 +18611,13 @@ var NgwLeaflet = (function () {
|
|
|
18586
18611
|
});
|
|
18587
18612
|
}
|
|
18588
18613
|
|
|
18589
|
-
var __defProp$
|
|
18590
|
-
var __defNormalProp$
|
|
18591
|
-
var __publicField$
|
|
18614
|
+
var __defProp$C = Object.defineProperty;
|
|
18615
|
+
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18616
|
+
var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, key + "" , value);
|
|
18592
18617
|
class NetworkError extends Error {
|
|
18593
18618
|
constructor(url) {
|
|
18594
18619
|
super();
|
|
18595
|
-
__publicField$
|
|
18620
|
+
__publicField$r(this, "name", "NetworkError");
|
|
18596
18621
|
Object.setPrototypeOf(this, NetworkError.prototype);
|
|
18597
18622
|
this.message = `Unable to request ${url}.
|
|
18598
18623
|
Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
|
|
@@ -18681,26 +18706,26 @@ var NgwLeaflet = (function () {
|
|
|
18681
18706
|
};
|
|
18682
18707
|
}
|
|
18683
18708
|
|
|
18684
|
-
var __defProp$
|
|
18685
|
-
var __defProps$
|
|
18686
|
-
var __getOwnPropDescs$
|
|
18709
|
+
var __defProp$B = Object.defineProperty;
|
|
18710
|
+
var __defProps$h = Object.defineProperties;
|
|
18711
|
+
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
18687
18712
|
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
18688
18713
|
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
18689
18714
|
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
18690
|
-
var __defNormalProp$
|
|
18715
|
+
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18691
18716
|
var __spreadValues$q = (a, b) => {
|
|
18692
18717
|
for (var prop in b || (b = {}))
|
|
18693
18718
|
if (__hasOwnProp$r.call(b, prop))
|
|
18694
|
-
__defNormalProp$
|
|
18719
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
18695
18720
|
if (__getOwnPropSymbols$r)
|
|
18696
18721
|
for (var prop of __getOwnPropSymbols$r(b)) {
|
|
18697
18722
|
if (__propIsEnum$r.call(b, prop))
|
|
18698
|
-
__defNormalProp$
|
|
18723
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
18699
18724
|
}
|
|
18700
18725
|
return a;
|
|
18701
18726
|
};
|
|
18702
|
-
var __spreadProps$
|
|
18703
|
-
var __objRest$
|
|
18727
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
18728
|
+
var __objRest$3 = (source, exclude) => {
|
|
18704
18729
|
var target = {};
|
|
18705
18730
|
for (var prop in source)
|
|
18706
18731
|
if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -18712,7 +18737,7 @@ var NgwLeaflet = (function () {
|
|
|
18712
18737
|
}
|
|
18713
18738
|
return target;
|
|
18714
18739
|
};
|
|
18715
|
-
var __publicField$
|
|
18740
|
+
var __publicField$q = (obj, key, value) => __defNormalProp$B(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18716
18741
|
var __async$p = (__this, __arguments, generator) => {
|
|
18717
18742
|
return new Promise((resolve, reject) => {
|
|
18718
18743
|
var fulfilled = (value) => {
|
|
@@ -18738,16 +18763,16 @@ var NgwLeaflet = (function () {
|
|
|
18738
18763
|
class NgwConnector {
|
|
18739
18764
|
constructor(options) {
|
|
18740
18765
|
this.options = options;
|
|
18741
|
-
__publicField$
|
|
18742
|
-
__publicField$
|
|
18743
|
-
__publicField$
|
|
18744
|
-
__publicField$
|
|
18745
|
-
__publicField$
|
|
18746
|
-
__publicField$
|
|
18747
|
-
__publicField$
|
|
18748
|
-
__publicField$
|
|
18749
|
-
__publicField$
|
|
18750
|
-
__publicField$
|
|
18766
|
+
__publicField$q(this, "id", ID$2++);
|
|
18767
|
+
__publicField$q(this, "emitter", new EventEmitter());
|
|
18768
|
+
__publicField$q(this, "user");
|
|
18769
|
+
__publicField$q(this, "resources");
|
|
18770
|
+
__publicField$q(this, "cache");
|
|
18771
|
+
__publicField$q(this, "withCredentials");
|
|
18772
|
+
__publicField$q(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
|
|
18773
|
+
__publicField$q(this, "routeStr", "/api/component/pyramid/route");
|
|
18774
|
+
__publicField$q(this, "activeRequests", {});
|
|
18775
|
+
__publicField$q(this, "requestTransform");
|
|
18751
18776
|
const exist = findConnector(options);
|
|
18752
18777
|
this.cache = new Cache({ namespace: options.cacheId });
|
|
18753
18778
|
if (exist) {
|
|
@@ -18884,8 +18909,7 @@ var NgwLeaflet = (function () {
|
|
|
18884
18909
|
credentials = credentials || this.options.auth;
|
|
18885
18910
|
if (credentials) {
|
|
18886
18911
|
const { login, password } = credentials;
|
|
18887
|
-
const
|
|
18888
|
-
const encodedStr = encodeURIComponent(str);
|
|
18912
|
+
const encodedStr = [login, password].map(encodeURIComponent).join(":");
|
|
18889
18913
|
{
|
|
18890
18914
|
return window.btoa(encodedStr);
|
|
18891
18915
|
}
|
|
@@ -19032,7 +19056,7 @@ var NgwLeaflet = (function () {
|
|
|
19032
19056
|
throw new Error("Empty `url` not allowed");
|
|
19033
19057
|
}
|
|
19034
19058
|
if (params) {
|
|
19035
|
-
const _a = params, restParams = __objRest$
|
|
19059
|
+
const _a = params, restParams = __objRest$3(_a, ["paramList"]);
|
|
19036
19060
|
url = template(url, restParams);
|
|
19037
19061
|
}
|
|
19038
19062
|
url = encodeURI(fixUrlStr(url));
|
|
@@ -19068,7 +19092,7 @@ var NgwLeaflet = (function () {
|
|
|
19068
19092
|
}
|
|
19069
19093
|
});
|
|
19070
19094
|
if (cache && method === "GET") {
|
|
19071
|
-
const cacheOptions = cacheProps ? cacheProps : __spreadProps$
|
|
19095
|
+
const cacheOptions = cacheProps ? cacheProps : __spreadProps$h(__spreadValues$q({}, objectRemoveEmpty({
|
|
19072
19096
|
headers,
|
|
19073
19097
|
withCredentials,
|
|
19074
19098
|
responseType,
|
|
@@ -19230,30 +19254,30 @@ var NgwLeaflet = (function () {
|
|
|
19230
19254
|
return er;
|
|
19231
19255
|
}
|
|
19232
19256
|
}
|
|
19233
|
-
__publicField$
|
|
19257
|
+
__publicField$q(NgwConnector, "errors", {
|
|
19234
19258
|
NgwError,
|
|
19235
19259
|
ResourceNotFoundError
|
|
19236
19260
|
});
|
|
19237
19261
|
|
|
19238
|
-
var __defProp$
|
|
19239
|
-
var __defProps$
|
|
19240
|
-
var __getOwnPropDescs$
|
|
19262
|
+
var __defProp$A = Object.defineProperty;
|
|
19263
|
+
var __defProps$g = Object.defineProperties;
|
|
19264
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
19241
19265
|
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
19242
19266
|
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
19243
19267
|
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
19244
|
-
var __defNormalProp$
|
|
19268
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19245
19269
|
var __spreadValues$p = (a, b) => {
|
|
19246
19270
|
for (var prop in b || (b = {}))
|
|
19247
19271
|
if (__hasOwnProp$q.call(b, prop))
|
|
19248
|
-
__defNormalProp$
|
|
19272
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
19249
19273
|
if (__getOwnPropSymbols$q)
|
|
19250
19274
|
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
19251
19275
|
if (__propIsEnum$q.call(b, prop))
|
|
19252
|
-
__defNormalProp$
|
|
19276
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
19253
19277
|
}
|
|
19254
19278
|
return a;
|
|
19255
19279
|
};
|
|
19256
|
-
var __spreadProps$
|
|
19280
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
19257
19281
|
var __async$o = (__this, __arguments, generator) => {
|
|
19258
19282
|
return new Promise((resolve, reject) => {
|
|
19259
19283
|
var fulfilled = (value) => {
|
|
@@ -19358,13 +19382,13 @@ var NgwLeaflet = (function () {
|
|
|
19358
19382
|
for (const f of filters_) {
|
|
19359
19383
|
if (isPropertyFilter(f)) {
|
|
19360
19384
|
_queries.push(
|
|
19361
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
19385
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19362
19386
|
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
19363
19387
|
}))
|
|
19364
19388
|
);
|
|
19365
19389
|
} else {
|
|
19366
19390
|
getQueries(
|
|
19367
|
-
__spreadProps$
|
|
19391
|
+
__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19368
19392
|
filters: f
|
|
19369
19393
|
}),
|
|
19370
19394
|
_queries,
|
|
@@ -19385,7 +19409,7 @@ var NgwLeaflet = (function () {
|
|
|
19385
19409
|
if (propertiesFilterList.length) {
|
|
19386
19410
|
for (const x of propertiesFilterList) {
|
|
19387
19411
|
getQueries(
|
|
19388
|
-
__spreadProps$
|
|
19412
|
+
__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19389
19413
|
filters: x
|
|
19390
19414
|
}),
|
|
19391
19415
|
_queries,
|
|
@@ -19394,7 +19418,7 @@ var NgwLeaflet = (function () {
|
|
|
19394
19418
|
}
|
|
19395
19419
|
} else {
|
|
19396
19420
|
_queries.push(
|
|
19397
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
19421
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$p({}, opt), {
|
|
19398
19422
|
paramList: [..._parentAllParams, ...paramList, ...filters2]
|
|
19399
19423
|
}))
|
|
19400
19424
|
);
|
|
@@ -19459,25 +19483,25 @@ var NgwLeaflet = (function () {
|
|
|
19459
19483
|
);
|
|
19460
19484
|
}
|
|
19461
19485
|
|
|
19462
|
-
var __defProp$
|
|
19463
|
-
var __defProps$
|
|
19464
|
-
var __getOwnPropDescs$
|
|
19486
|
+
var __defProp$z = Object.defineProperty;
|
|
19487
|
+
var __defProps$f = Object.defineProperties;
|
|
19488
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
19465
19489
|
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
19466
19490
|
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
19467
19491
|
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
19468
|
-
var __defNormalProp$
|
|
19492
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19469
19493
|
var __spreadValues$o = (a, b) => {
|
|
19470
19494
|
for (var prop in b || (b = {}))
|
|
19471
19495
|
if (__hasOwnProp$p.call(b, prop))
|
|
19472
|
-
__defNormalProp$
|
|
19496
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
19473
19497
|
if (__getOwnPropSymbols$p)
|
|
19474
19498
|
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
19475
19499
|
if (__propIsEnum$p.call(b, prop))
|
|
19476
|
-
__defNormalProp$
|
|
19500
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
19477
19501
|
}
|
|
19478
19502
|
return a;
|
|
19479
19503
|
};
|
|
19480
|
-
var __spreadProps$
|
|
19504
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
19481
19505
|
var __async$n = (__this, __arguments, generator) => {
|
|
19482
19506
|
return new Promise((resolve, reject) => {
|
|
19483
19507
|
var fulfilled = (value) => {
|
|
@@ -19515,45 +19539,45 @@ var NgwLeaflet = (function () {
|
|
|
19515
19539
|
if (resp.geom) {
|
|
19516
19540
|
return createGeoJsonFeature(resp);
|
|
19517
19541
|
} else {
|
|
19518
|
-
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$
|
|
19542
|
+
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$f(__spreadValues$o({}, options), {
|
|
19519
19543
|
geom: true,
|
|
19520
19544
|
fields: null,
|
|
19521
19545
|
extensions: null
|
|
19522
19546
|
}));
|
|
19523
19547
|
const geom = onlyGeomItem.geom;
|
|
19524
|
-
return createGeoJsonFeature(__spreadProps$
|
|
19548
|
+
return createGeoJsonFeature(__spreadProps$f(__spreadValues$o({}, resp), { geom }));
|
|
19525
19549
|
}
|
|
19526
19550
|
});
|
|
19527
|
-
return __spreadProps$
|
|
19551
|
+
return __spreadProps$f(__spreadValues$o({}, resp), {
|
|
19528
19552
|
toGeojson
|
|
19529
19553
|
});
|
|
19530
19554
|
});
|
|
19531
19555
|
}
|
|
19532
19556
|
|
|
19533
|
-
var __defProp$
|
|
19557
|
+
var __defProp$y = Object.defineProperty;
|
|
19534
19558
|
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
19535
19559
|
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
19536
19560
|
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
19537
|
-
var __defNormalProp$
|
|
19561
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19538
19562
|
var __spreadValues$n = (a, b) => {
|
|
19539
19563
|
for (var prop in b || (b = {}))
|
|
19540
19564
|
if (__hasOwnProp$o.call(b, prop))
|
|
19541
|
-
__defNormalProp$
|
|
19565
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
19542
19566
|
if (__getOwnPropSymbols$o)
|
|
19543
19567
|
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
19544
19568
|
if (__propIsEnum$o.call(b, prop))
|
|
19545
|
-
__defNormalProp$
|
|
19569
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
19546
19570
|
}
|
|
19547
19571
|
return a;
|
|
19548
19572
|
};
|
|
19549
|
-
var __publicField$
|
|
19573
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19550
19574
|
class BookmarkItem {
|
|
19551
19575
|
constructor(options) {
|
|
19552
19576
|
this.options = options;
|
|
19553
|
-
__publicField$
|
|
19554
|
-
__publicField$
|
|
19555
|
-
__publicField$
|
|
19556
|
-
__publicField$
|
|
19577
|
+
__publicField$p(this, "name");
|
|
19578
|
+
__publicField$p(this, "resourceId");
|
|
19579
|
+
__publicField$p(this, "item");
|
|
19580
|
+
__publicField$p(this, "_extent");
|
|
19557
19581
|
this.resourceId = options.resourceId;
|
|
19558
19582
|
const item = options.item;
|
|
19559
19583
|
this.item = item;
|
|
@@ -19699,14 +19723,14 @@ var NgwLeaflet = (function () {
|
|
|
19699
19723
|
return true;
|
|
19700
19724
|
}
|
|
19701
19725
|
|
|
19702
|
-
var __defProp$
|
|
19703
|
-
var __defNormalProp$
|
|
19704
|
-
var __publicField$
|
|
19705
|
-
class TreeHelper {
|
|
19706
|
-
constructor(item) {
|
|
19707
|
-
__publicField$
|
|
19708
|
-
__publicField$
|
|
19709
|
-
__publicField$
|
|
19726
|
+
var __defProp$x = Object.defineProperty;
|
|
19727
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19728
|
+
var __publicField$o = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19729
|
+
class TreeHelper {
|
|
19730
|
+
constructor(item) {
|
|
19731
|
+
__publicField$o(this, "item");
|
|
19732
|
+
__publicField$o(this, "_children", []);
|
|
19733
|
+
__publicField$o(this, "_parent");
|
|
19710
19734
|
this.item = item;
|
|
19711
19735
|
}
|
|
19712
19736
|
setParent(parent) {
|
|
@@ -19769,19 +19793,19 @@ var NgwLeaflet = (function () {
|
|
|
19769
19793
|
}
|
|
19770
19794
|
}
|
|
19771
19795
|
|
|
19772
|
-
var __defProp$
|
|
19773
|
-
var __defNormalProp$
|
|
19774
|
-
var __publicField$
|
|
19796
|
+
var __defProp$w = Object.defineProperty;
|
|
19797
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19798
|
+
var __publicField$n = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19775
19799
|
class BaseProperty {
|
|
19776
19800
|
constructor(name, item, options) {
|
|
19777
|
-
__publicField$
|
|
19778
|
-
__publicField$
|
|
19779
|
-
__publicField$
|
|
19780
|
-
__publicField$
|
|
19781
|
-
__publicField$
|
|
19782
|
-
__publicField$
|
|
19783
|
-
__publicField$
|
|
19784
|
-
__publicField$
|
|
19801
|
+
__publicField$n(this, "options");
|
|
19802
|
+
__publicField$n(this, "emitter", new EventEmitter());
|
|
19803
|
+
__publicField$n(this, "name");
|
|
19804
|
+
__publicField$n(this, "item");
|
|
19805
|
+
__publicField$n(this, "_blocked", false);
|
|
19806
|
+
__publicField$n(this, "_container");
|
|
19807
|
+
__publicField$n(this, "_value");
|
|
19808
|
+
__publicField$n(this, "_removeEventsListener");
|
|
19785
19809
|
this.item = item;
|
|
19786
19810
|
this.options = Object.assign({}, options);
|
|
19787
19811
|
this.name = name;
|
|
@@ -19878,23 +19902,23 @@ var NgwLeaflet = (function () {
|
|
|
19878
19902
|
}
|
|
19879
19903
|
}
|
|
19880
19904
|
|
|
19881
|
-
var __defProp$
|
|
19905
|
+
var __defProp$v = Object.defineProperty;
|
|
19882
19906
|
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
19883
19907
|
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
19884
19908
|
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
19885
|
-
var __defNormalProp$
|
|
19909
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19886
19910
|
var __spreadValues$m = (a, b) => {
|
|
19887
19911
|
for (var prop in b || (b = {}))
|
|
19888
19912
|
if (__hasOwnProp$n.call(b, prop))
|
|
19889
|
-
__defNormalProp$
|
|
19913
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
19890
19914
|
if (__getOwnPropSymbols$n)
|
|
19891
19915
|
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
19892
19916
|
if (__propIsEnum$n.call(b, prop))
|
|
19893
|
-
__defNormalProp$
|
|
19917
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
19894
19918
|
}
|
|
19895
19919
|
return a;
|
|
19896
19920
|
};
|
|
19897
|
-
var __publicField$
|
|
19921
|
+
var __publicField$m = (obj, key, value) => __defNormalProp$v(obj, key + "" , value);
|
|
19898
19922
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
19899
19923
|
constructor(name, item, options) {
|
|
19900
19924
|
super(name, item, __spreadValues$m(__spreadValues$m({}, _CheckProperty.options), options));
|
|
@@ -20002,7 +20026,7 @@ var NgwLeaflet = (function () {
|
|
|
20002
20026
|
}
|
|
20003
20027
|
}
|
|
20004
20028
|
};
|
|
20005
|
-
__publicField$
|
|
20029
|
+
__publicField$m(_CheckProperty, "options", {
|
|
20006
20030
|
hierarchy: true,
|
|
20007
20031
|
bubble: false,
|
|
20008
20032
|
propagation: false,
|
|
@@ -20011,31 +20035,31 @@ var NgwLeaflet = (function () {
|
|
|
20011
20035
|
});
|
|
20012
20036
|
let CheckProperty = _CheckProperty;
|
|
20013
20037
|
|
|
20014
|
-
var __defProp$
|
|
20038
|
+
var __defProp$u = Object.defineProperty;
|
|
20015
20039
|
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
20016
20040
|
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
20017
20041
|
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
20018
|
-
var __defNormalProp$
|
|
20042
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20019
20043
|
var __spreadValues$l = (a, b) => {
|
|
20020
20044
|
for (var prop in b || (b = {}))
|
|
20021
20045
|
if (__hasOwnProp$m.call(b, prop))
|
|
20022
|
-
__defNormalProp$
|
|
20046
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
20023
20047
|
if (__getOwnPropSymbols$m)
|
|
20024
20048
|
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
20025
20049
|
if (__propIsEnum$m.call(b, prop))
|
|
20026
|
-
__defNormalProp$
|
|
20050
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
20027
20051
|
}
|
|
20028
20052
|
return a;
|
|
20029
20053
|
};
|
|
20030
|
-
var __publicField$
|
|
20054
|
+
var __publicField$l = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20031
20055
|
const BOOLEAN_TYPE = "boolean";
|
|
20032
20056
|
const STRING_TYPE = "string";
|
|
20033
20057
|
const _ItemProperties = class _ItemProperties {
|
|
20034
20058
|
constructor(item, propertiesList) {
|
|
20035
20059
|
this.item = item;
|
|
20036
|
-
__publicField$
|
|
20037
|
-
__publicField$
|
|
20038
|
-
__publicField$
|
|
20060
|
+
__publicField$l(this, "options", {});
|
|
20061
|
+
__publicField$l(this, "_properties", {});
|
|
20062
|
+
__publicField$l(this, "_propertiesList", []);
|
|
20039
20063
|
if (propertiesList) {
|
|
20040
20064
|
propertiesList.forEach(this._setPropertyHandler.bind(this));
|
|
20041
20065
|
}
|
|
@@ -20098,35 +20122,35 @@ var NgwLeaflet = (function () {
|
|
|
20098
20122
|
return Handler;
|
|
20099
20123
|
}
|
|
20100
20124
|
};
|
|
20101
|
-
__publicField$
|
|
20125
|
+
__publicField$l(_ItemProperties, "handlers", {
|
|
20102
20126
|
CheckProperty
|
|
20103
20127
|
});
|
|
20104
20128
|
let ItemProperties = _ItemProperties;
|
|
20105
20129
|
|
|
20106
|
-
var __defProp$
|
|
20130
|
+
var __defProp$t = Object.defineProperty;
|
|
20107
20131
|
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
20108
20132
|
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
20109
20133
|
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
20110
|
-
var __defNormalProp$
|
|
20134
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20111
20135
|
var __spreadValues$k = (a, b) => {
|
|
20112
20136
|
for (var prop in b || (b = {}))
|
|
20113
20137
|
if (__hasOwnProp$l.call(b, prop))
|
|
20114
|
-
__defNormalProp$
|
|
20138
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
20115
20139
|
if (__getOwnPropSymbols$l)
|
|
20116
20140
|
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
20117
20141
|
if (__propIsEnum$l.call(b, prop))
|
|
20118
|
-
__defNormalProp$
|
|
20142
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
20119
20143
|
}
|
|
20120
20144
|
return a;
|
|
20121
20145
|
};
|
|
20122
|
-
var __publicField$
|
|
20146
|
+
var __publicField$k = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20123
20147
|
let ID$1 = 0;
|
|
20124
20148
|
class Item {
|
|
20125
20149
|
constructor(options) {
|
|
20126
|
-
__publicField$
|
|
20127
|
-
__publicField$
|
|
20128
|
-
__publicField$
|
|
20129
|
-
__publicField$
|
|
20150
|
+
__publicField$k(this, "options", {});
|
|
20151
|
+
__publicField$k(this, "properties");
|
|
20152
|
+
__publicField$k(this, "tree");
|
|
20153
|
+
__publicField$k(this, "id", ID$1);
|
|
20130
20154
|
ID$1 += 1;
|
|
20131
20155
|
this.options = __spreadValues$k({}, options);
|
|
20132
20156
|
this.tree = new TreeHelper(this);
|
|
@@ -20180,25 +20204,25 @@ var NgwLeaflet = (function () {
|
|
|
20180
20204
|
}
|
|
20181
20205
|
}
|
|
20182
20206
|
|
|
20183
|
-
var __defProp$
|
|
20184
|
-
var __defProps$
|
|
20185
|
-
var __getOwnPropDescs$
|
|
20207
|
+
var __defProp$s = Object.defineProperty;
|
|
20208
|
+
var __defProps$e = Object.defineProperties;
|
|
20209
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
20186
20210
|
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
20187
20211
|
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
20188
20212
|
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
20189
|
-
var __defNormalProp$
|
|
20213
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20190
20214
|
var __spreadValues$j = (a, b) => {
|
|
20191
20215
|
for (var prop in b || (b = {}))
|
|
20192
20216
|
if (__hasOwnProp$k.call(b, prop))
|
|
20193
|
-
__defNormalProp$
|
|
20217
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
20194
20218
|
if (__getOwnPropSymbols$k)
|
|
20195
20219
|
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
20196
20220
|
if (__propIsEnum$k.call(b, prop))
|
|
20197
|
-
__defNormalProp$
|
|
20221
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
20198
20222
|
}
|
|
20199
20223
|
return a;
|
|
20200
20224
|
};
|
|
20201
|
-
var __spreadProps$
|
|
20225
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
20202
20226
|
function getNgwWebmapExtent(webmap) {
|
|
20203
20227
|
const bottom = webmap["extent_bottom"];
|
|
20204
20228
|
const left = webmap["extent_left"];
|
|
@@ -20266,14 +20290,14 @@ var NgwLeaflet = (function () {
|
|
|
20266
20290
|
if (resource.cls && resource.cls.indexOf("style") !== -1) {
|
|
20267
20291
|
return connector.getResource(resource.parent.id, options).then((res) => {
|
|
20268
20292
|
if (res) {
|
|
20269
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
20293
|
+
return fetchNgwLayerExtent(__spreadProps$e(__spreadValues$j({}, options), {
|
|
20270
20294
|
resourceId: res.resource.id,
|
|
20271
20295
|
connector
|
|
20272
20296
|
}));
|
|
20273
20297
|
}
|
|
20274
20298
|
});
|
|
20275
20299
|
} else {
|
|
20276
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
20300
|
+
return fetchNgwLayerExtent(__spreadProps$e(__spreadValues$j({}, options), {
|
|
20277
20301
|
resourceId: resource.id,
|
|
20278
20302
|
connector
|
|
20279
20303
|
}));
|
|
@@ -20281,9 +20305,9 @@ var NgwLeaflet = (function () {
|
|
|
20281
20305
|
}
|
|
20282
20306
|
}
|
|
20283
20307
|
|
|
20284
|
-
var __defProp$
|
|
20285
|
-
var __defNormalProp$
|
|
20286
|
-
var __publicField$
|
|
20308
|
+
var __defProp$r = Object.defineProperty;
|
|
20309
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20310
|
+
var __publicField$j = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20287
20311
|
var __async$m = (__this, __arguments, generator) => {
|
|
20288
20312
|
return new Promise((resolve, reject) => {
|
|
20289
20313
|
var fulfilled = (value) => {
|
|
@@ -20306,9 +20330,9 @@ var NgwLeaflet = (function () {
|
|
|
20306
20330
|
};
|
|
20307
20331
|
class NgwResource {
|
|
20308
20332
|
constructor() {
|
|
20309
|
-
__publicField$
|
|
20310
|
-
__publicField$
|
|
20311
|
-
__publicField$
|
|
20333
|
+
__publicField$j(this, "item");
|
|
20334
|
+
__publicField$j(this, "connector");
|
|
20335
|
+
__publicField$j(this, "_extent");
|
|
20312
20336
|
}
|
|
20313
20337
|
/** @deprecated use {@link NgwResource.getBounds} instead */
|
|
20314
20338
|
getExtent() {
|
|
@@ -20427,23 +20451,23 @@ var NgwLeaflet = (function () {
|
|
|
20427
20451
|
};
|
|
20428
20452
|
}
|
|
20429
20453
|
|
|
20430
|
-
var __defProp$
|
|
20454
|
+
var __defProp$q = Object.defineProperty;
|
|
20431
20455
|
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
20432
20456
|
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
20433
20457
|
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
20434
|
-
var __defNormalProp$
|
|
20458
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20435
20459
|
var __spreadValues$i = (a, b) => {
|
|
20436
20460
|
for (var prop in b || (b = {}))
|
|
20437
20461
|
if (__hasOwnProp$j.call(b, prop))
|
|
20438
|
-
__defNormalProp$
|
|
20462
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
20439
20463
|
if (__getOwnPropSymbols$j)
|
|
20440
20464
|
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
20441
20465
|
if (__propIsEnum$j.call(b, prop))
|
|
20442
|
-
__defNormalProp$
|
|
20466
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
20443
20467
|
}
|
|
20444
20468
|
return a;
|
|
20445
20469
|
};
|
|
20446
|
-
var __objRest$
|
|
20470
|
+
var __objRest$2 = (source, exclude) => {
|
|
20447
20471
|
var target = {};
|
|
20448
20472
|
for (var prop in source)
|
|
20449
20473
|
if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -20455,7 +20479,7 @@ var NgwLeaflet = (function () {
|
|
|
20455
20479
|
}
|
|
20456
20480
|
return target;
|
|
20457
20481
|
};
|
|
20458
|
-
var __publicField$
|
|
20482
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20459
20483
|
var __async$k = (__this, __arguments, generator) => {
|
|
20460
20484
|
return new Promise((resolve, reject) => {
|
|
20461
20485
|
var fulfilled = (value) => {
|
|
@@ -20476,11 +20500,11 @@ var NgwLeaflet = (function () {
|
|
|
20476
20500
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
20477
20501
|
});
|
|
20478
20502
|
};
|
|
20479
|
-
const URL = "https://qms.nextgis.com";
|
|
20480
|
-
function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
20503
|
+
const URL$1 = "https://qms.nextgis.com";
|
|
20504
|
+
function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
|
|
20481
20505
|
let webMap;
|
|
20482
20506
|
if ("webMap" in webMapOrOptions) {
|
|
20483
|
-
const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$
|
|
20507
|
+
const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$2(_a, ["webMap", "url"]);
|
|
20484
20508
|
webMap = webMap_;
|
|
20485
20509
|
if (url_) {
|
|
20486
20510
|
url = url_;
|
|
@@ -20492,13 +20516,13 @@ var NgwLeaflet = (function () {
|
|
|
20492
20516
|
webMap = webMapOrOptions;
|
|
20493
20517
|
}
|
|
20494
20518
|
if (!url) {
|
|
20495
|
-
url = URL;
|
|
20519
|
+
url = URL$1;
|
|
20496
20520
|
}
|
|
20497
20521
|
class QmsAdapter {
|
|
20498
20522
|
constructor(map, options) {
|
|
20499
|
-
__publicField$
|
|
20500
|
-
__publicField$
|
|
20501
|
-
__publicField$
|
|
20523
|
+
__publicField$i(this, "qms");
|
|
20524
|
+
__publicField$i(this, "options");
|
|
20525
|
+
__publicField$i(this, "map");
|
|
20502
20526
|
this.map = map;
|
|
20503
20527
|
const opt = __spreadValues$i(__spreadValues$i({}, createOpt), options);
|
|
20504
20528
|
this.options = opt;
|
|
@@ -20552,29 +20576,29 @@ var NgwLeaflet = (function () {
|
|
|
20552
20576
|
return QmsAdapter;
|
|
20553
20577
|
}
|
|
20554
20578
|
|
|
20555
|
-
var __defProp$
|
|
20579
|
+
var __defProp$p = Object.defineProperty;
|
|
20556
20580
|
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
20557
20581
|
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
20558
20582
|
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
20559
|
-
var __defNormalProp$
|
|
20583
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20560
20584
|
var __spreadValues$h = (a, b) => {
|
|
20561
20585
|
for (var prop in b || (b = {}))
|
|
20562
20586
|
if (__hasOwnProp$i.call(b, prop))
|
|
20563
|
-
__defNormalProp$
|
|
20587
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
20564
20588
|
if (__getOwnPropSymbols$i)
|
|
20565
20589
|
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
20566
20590
|
if (__propIsEnum$i.call(b, prop))
|
|
20567
|
-
__defNormalProp$
|
|
20591
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
20568
20592
|
}
|
|
20569
20593
|
return a;
|
|
20570
20594
|
};
|
|
20571
|
-
var __publicField$
|
|
20595
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20572
20596
|
class QmsKit {
|
|
20573
20597
|
constructor(options) {
|
|
20574
|
-
__publicField$
|
|
20598
|
+
__publicField$h(this, "options", {
|
|
20575
20599
|
url: "https://qms.nextgis.com"
|
|
20576
20600
|
});
|
|
20577
|
-
__publicField$
|
|
20601
|
+
__publicField$h(this, "url");
|
|
20578
20602
|
this.options = __spreadValues$h(__spreadValues$h({}, this.options), options);
|
|
20579
20603
|
this.url = this.options.url;
|
|
20580
20604
|
}
|
|
@@ -20590,31 +20614,31 @@ var NgwLeaflet = (function () {
|
|
|
20590
20614
|
return createQmsAdapter({ webMap, url: this.url });
|
|
20591
20615
|
}
|
|
20592
20616
|
}
|
|
20593
|
-
__publicField$
|
|
20617
|
+
__publicField$h(QmsKit, "utils", {
|
|
20594
20618
|
createQmsAdapter
|
|
20595
20619
|
});
|
|
20596
20620
|
|
|
20597
|
-
var __defProp$
|
|
20598
|
-
var __defProps$
|
|
20599
|
-
var __getOwnPropDescs$
|
|
20621
|
+
var __defProp$o = Object.defineProperty;
|
|
20622
|
+
var __defProps$d = Object.defineProperties;
|
|
20623
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
20600
20624
|
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
20601
20625
|
var __getProtoOf$2 = Object.getPrototypeOf;
|
|
20602
20626
|
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
20603
20627
|
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
20604
20628
|
var __reflectGet$2 = Reflect.get;
|
|
20605
|
-
var __defNormalProp$
|
|
20629
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20606
20630
|
var __spreadValues$g = (a, b) => {
|
|
20607
20631
|
for (var prop in b || (b = {}))
|
|
20608
20632
|
if (__hasOwnProp$h.call(b, prop))
|
|
20609
|
-
__defNormalProp$
|
|
20633
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
20610
20634
|
if (__getOwnPropSymbols$h)
|
|
20611
20635
|
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
20612
20636
|
if (__propIsEnum$h.call(b, prop))
|
|
20613
|
-
__defNormalProp$
|
|
20637
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
20614
20638
|
}
|
|
20615
20639
|
return a;
|
|
20616
20640
|
};
|
|
20617
|
-
var __spreadProps$
|
|
20641
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
20618
20642
|
var __superGet$2 = (cls, obj, key) => __reflectGet$2(__getProtoOf$2(cls), key, obj);
|
|
20619
20643
|
var __async$j = (__this, __arguments, generator) => {
|
|
20620
20644
|
return new Promise((resolve, reject) => {
|
|
@@ -20659,7 +20683,7 @@ var NgwLeaflet = (function () {
|
|
|
20659
20683
|
class BasemapTileAdapter extends TileAdapter {
|
|
20660
20684
|
addLayer(opt) {
|
|
20661
20685
|
return __async$j(this, null, function* () {
|
|
20662
|
-
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$
|
|
20686
|
+
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$d(__spreadValues$g({}, opt), { url }));
|
|
20663
20687
|
});
|
|
20664
20688
|
}
|
|
20665
20689
|
}
|
|
@@ -20738,25 +20762,25 @@ var NgwLeaflet = (function () {
|
|
|
20738
20762
|
return fields;
|
|
20739
20763
|
}
|
|
20740
20764
|
|
|
20741
|
-
var __defProp$
|
|
20742
|
-
var __defProps$
|
|
20743
|
-
var __getOwnPropDescs$
|
|
20765
|
+
var __defProp$n = Object.defineProperty;
|
|
20766
|
+
var __defProps$c = Object.defineProperties;
|
|
20767
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
20744
20768
|
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
20745
20769
|
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
20746
20770
|
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
20747
|
-
var __defNormalProp$
|
|
20771
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20748
20772
|
var __spreadValues$f = (a, b) => {
|
|
20749
20773
|
for (var prop in b || (b = {}))
|
|
20750
20774
|
if (__hasOwnProp$g.call(b, prop))
|
|
20751
|
-
__defNormalProp$
|
|
20775
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
20752
20776
|
if (__getOwnPropSymbols$g)
|
|
20753
20777
|
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
20754
20778
|
if (__propIsEnum$g.call(b, prop))
|
|
20755
|
-
__defNormalProp$
|
|
20779
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
20756
20780
|
}
|
|
20757
20781
|
return a;
|
|
20758
20782
|
};
|
|
20759
|
-
var __spreadProps$
|
|
20783
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
20760
20784
|
var __async$i = (__this, __arguments, generator) => {
|
|
20761
20785
|
return new Promise((resolve, reject) => {
|
|
20762
20786
|
var fulfilled = (value) => {
|
|
@@ -20782,13 +20806,13 @@ var NgwLeaflet = (function () {
|
|
|
20782
20806
|
var _a;
|
|
20783
20807
|
const filters = options.filters;
|
|
20784
20808
|
if (filters) {
|
|
20785
|
-
let data = yield createFeatureFieldFilterQueries(__spreadProps$
|
|
20809
|
+
let data = yield createFeatureFieldFilterQueries(__spreadProps$c(__spreadValues$f({}, options), {
|
|
20786
20810
|
filters
|
|
20787
20811
|
}));
|
|
20788
20812
|
const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
|
|
20789
20813
|
if (clientFilterValidate) {
|
|
20790
20814
|
data = data.filter((y) => {
|
|
20791
|
-
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$
|
|
20815
|
+
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$c(__spreadValues$f({}, y.fields), {
|
|
20792
20816
|
id: y.id
|
|
20793
20817
|
}));
|
|
20794
20818
|
const result = propertiesFilter(fields, filters);
|
|
@@ -20876,28 +20900,28 @@ var NgwLeaflet = (function () {
|
|
|
20876
20900
|
return filterOptions;
|
|
20877
20901
|
}
|
|
20878
20902
|
|
|
20879
|
-
var __defProp$
|
|
20880
|
-
var __defProps$
|
|
20881
|
-
var __getOwnPropDescs$
|
|
20903
|
+
var __defProp$m = Object.defineProperty;
|
|
20904
|
+
var __defProps$b = Object.defineProperties;
|
|
20905
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
20882
20906
|
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
20883
20907
|
var __getProtoOf$1 = Object.getPrototypeOf;
|
|
20884
20908
|
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
20885
20909
|
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
20886
20910
|
var __reflectGet$1 = Reflect.get;
|
|
20887
|
-
var __defNormalProp$
|
|
20911
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20888
20912
|
var __spreadValues$e = (a, b) => {
|
|
20889
20913
|
for (var prop in b || (b = {}))
|
|
20890
20914
|
if (__hasOwnProp$f.call(b, prop))
|
|
20891
|
-
__defNormalProp$
|
|
20915
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
20892
20916
|
if (__getOwnPropSymbols$f)
|
|
20893
20917
|
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
20894
20918
|
if (__propIsEnum$f.call(b, prop))
|
|
20895
|
-
__defNormalProp$
|
|
20919
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
20896
20920
|
}
|
|
20897
20921
|
return a;
|
|
20898
20922
|
};
|
|
20899
|
-
var __spreadProps$
|
|
20900
|
-
var __publicField$
|
|
20923
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
20924
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20901
20925
|
var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
|
|
20902
20926
|
var __async$g = (__this, __arguments, generator) => {
|
|
20903
20927
|
return new Promise((resolve, reject) => {
|
|
@@ -20970,11 +20994,11 @@ var NgwLeaflet = (function () {
|
|
|
20970
20994
|
class NgwGeoJsonAdapter extends GeoJsonAdapter {
|
|
20971
20995
|
constructor() {
|
|
20972
20996
|
super(...arguments);
|
|
20973
|
-
__publicField$
|
|
20974
|
-
__publicField$
|
|
20975
|
-
__publicField$
|
|
20976
|
-
__publicField$
|
|
20977
|
-
__publicField$
|
|
20997
|
+
__publicField$g(this, "emitter", new EventEmitter());
|
|
20998
|
+
__publicField$g(this, "__onMapMove");
|
|
20999
|
+
__publicField$g(this, "__onMapMoveStart");
|
|
21000
|
+
__publicField$g(this, "__enableMapMoveListener");
|
|
21001
|
+
__publicField$g(this, "__disableMapMoveListener");
|
|
20978
21002
|
}
|
|
20979
21003
|
addLayer(opt) {
|
|
20980
21004
|
return __async$g(this, null, function* () {
|
|
@@ -21047,10 +21071,10 @@ var NgwLeaflet = (function () {
|
|
|
21047
21071
|
getCount() {
|
|
21048
21072
|
return fetchNgwLayerCount({ connector, resourceId, cache: true });
|
|
21049
21073
|
}
|
|
21050
|
-
updateLayer(
|
|
21074
|
+
updateLayer(opt) {
|
|
21051
21075
|
return __async$g(this, null, function* () {
|
|
21052
21076
|
var _a2;
|
|
21053
|
-
filterArgs =
|
|
21077
|
+
const filterArgs = opt || _lastFilterArgs || {};
|
|
21054
21078
|
if ((_a2 = this.options.strategy) == null ? void 0 : _a2.startsWith("BBOX")) {
|
|
21055
21079
|
yield webMap.onLoad("create");
|
|
21056
21080
|
filterArgs.options = filterArgs.options || {};
|
|
@@ -21075,7 +21099,7 @@ var NgwLeaflet = (function () {
|
|
|
21075
21099
|
try {
|
|
21076
21100
|
this.emitter.emit("preupdate", filterArgs);
|
|
21077
21101
|
webMap._emitLayerEvent("layer:preupdate", options.id || "", filterArgs);
|
|
21078
|
-
const data = yield getData(filterArgs.filters, __spreadProps$
|
|
21102
|
+
const data = yield getData(filterArgs.filters, __spreadProps$b(__spreadValues$e({}, filterArgs.options), {
|
|
21079
21103
|
srs: this.options.srs
|
|
21080
21104
|
}));
|
|
21081
21105
|
let newData = data;
|
|
@@ -21128,7 +21152,7 @@ var NgwLeaflet = (function () {
|
|
|
21128
21152
|
if (this.clearLayer) {
|
|
21129
21153
|
this.clearLayer();
|
|
21130
21154
|
}
|
|
21131
|
-
const data = yield getData(filters, __spreadProps$
|
|
21155
|
+
const data = yield getData(filters, __spreadProps$b(__spreadValues$e({}, opt), {
|
|
21132
21156
|
srs: this.options.srs
|
|
21133
21157
|
}));
|
|
21134
21158
|
this.setData(data);
|
|
@@ -21317,26 +21341,26 @@ var NgwLeaflet = (function () {
|
|
|
21317
21341
|
}
|
|
21318
21342
|
}
|
|
21319
21343
|
|
|
21320
|
-
var __defProp$
|
|
21321
|
-
var __defProps$
|
|
21322
|
-
var __getOwnPropDescs$
|
|
21344
|
+
var __defProp$l = Object.defineProperty;
|
|
21345
|
+
var __defProps$a = Object.defineProperties;
|
|
21346
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
21323
21347
|
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
21324
21348
|
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
21325
21349
|
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
21326
|
-
var __defNormalProp$
|
|
21350
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21327
21351
|
var __spreadValues$d = (a, b) => {
|
|
21328
21352
|
for (var prop in b || (b = {}))
|
|
21329
21353
|
if (__hasOwnProp$e.call(b, prop))
|
|
21330
|
-
__defNormalProp$
|
|
21354
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
21331
21355
|
if (__getOwnPropSymbols$e)
|
|
21332
21356
|
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
21333
21357
|
if (__propIsEnum$e.call(b, prop))
|
|
21334
|
-
__defNormalProp$
|
|
21358
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
21335
21359
|
}
|
|
21336
21360
|
return a;
|
|
21337
21361
|
};
|
|
21338
|
-
var __spreadProps$
|
|
21339
|
-
var __publicField$
|
|
21362
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
21363
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21340
21364
|
var __async$e = (__this, __arguments, generator) => {
|
|
21341
21365
|
return new Promise((resolve, reject) => {
|
|
21342
21366
|
var fulfilled = (value) => {
|
|
@@ -21357,11 +21381,47 @@ var NgwLeaflet = (function () {
|
|
|
21357
21381
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
21358
21382
|
});
|
|
21359
21383
|
};
|
|
21384
|
+
class Legend {
|
|
21385
|
+
constructor({
|
|
21386
|
+
layerId,
|
|
21387
|
+
legend,
|
|
21388
|
+
onSymbolRenderChange
|
|
21389
|
+
}) {
|
|
21390
|
+
__publicField$f(this, "layerId");
|
|
21391
|
+
__publicField$f(this, "legend");
|
|
21392
|
+
__publicField$f(this, "onSymbolRenderChange");
|
|
21393
|
+
this.layerId = layerId;
|
|
21394
|
+
this.legend = this.createLegend(legend);
|
|
21395
|
+
this.onSymbolRenderChange = onSymbolRenderChange;
|
|
21396
|
+
}
|
|
21397
|
+
createLegend(items) {
|
|
21398
|
+
return items.map((params) => __spreadProps$a(__spreadValues$d({}, params), {
|
|
21399
|
+
/** @deprecated use display_name instead */
|
|
21400
|
+
name: params.display_name,
|
|
21401
|
+
/** @deprecated use icon instead */
|
|
21402
|
+
symbol: params.icon
|
|
21403
|
+
}));
|
|
21404
|
+
}
|
|
21405
|
+
setSymbolRender(symbolIndex, status) {
|
|
21406
|
+
const legendItem = this.legend.find((l) => l.index === symbolIndex);
|
|
21407
|
+
if (legendItem) {
|
|
21408
|
+
const render = legendItem.render;
|
|
21409
|
+
if (render !== status) {
|
|
21410
|
+
legendItem.render = status;
|
|
21411
|
+
if (this.onSymbolRenderChange) {
|
|
21412
|
+
this.onSymbolRenderChange(
|
|
21413
|
+
this.legend.filter((l) => l.render).map((l) => l.index)
|
|
21414
|
+
);
|
|
21415
|
+
}
|
|
21416
|
+
}
|
|
21417
|
+
}
|
|
21418
|
+
}
|
|
21419
|
+
}
|
|
21360
21420
|
function createRasterAdapter(_0) {
|
|
21361
21421
|
return __async$e(this, arguments, function* ({
|
|
21362
21422
|
layerOptions,
|
|
21363
|
-
webMap,
|
|
21364
21423
|
connector,
|
|
21424
|
+
webMap,
|
|
21365
21425
|
item
|
|
21366
21426
|
}) {
|
|
21367
21427
|
const resourceCls = item.resource.cls;
|
|
@@ -21390,16 +21450,17 @@ var NgwLeaflet = (function () {
|
|
|
21390
21450
|
constructor(map, _options) {
|
|
21391
21451
|
super(map, _options);
|
|
21392
21452
|
this.map = map;
|
|
21393
|
-
|
|
21394
|
-
__publicField$
|
|
21395
|
-
__publicField$
|
|
21453
|
+
__publicField$f(this, "item", item);
|
|
21454
|
+
__publicField$f(this, "resourceId", resourceId);
|
|
21455
|
+
__publicField$f(this, "_blocked", false);
|
|
21456
|
+
__publicField$f(this, "_layerVisibility");
|
|
21396
21457
|
const opt = ngwApiToAdapterOptions({
|
|
21397
21458
|
options: layerOptions,
|
|
21398
21459
|
webMap,
|
|
21399
21460
|
baseUrl: connector.options.baseUrl || ""
|
|
21400
21461
|
});
|
|
21401
21462
|
if (opt) {
|
|
21402
|
-
const layerAdapterOptions = __spreadProps$
|
|
21463
|
+
const layerAdapterOptions = __spreadProps$a(__spreadValues$d(__spreadValues$d({}, opt), layerOptions.adapterOptions), {
|
|
21403
21464
|
params: { resource: resourceId },
|
|
21404
21465
|
layers: opt.layers || String(resourceId),
|
|
21405
21466
|
resourceId
|
|
@@ -21413,25 +21474,19 @@ var NgwLeaflet = (function () {
|
|
|
21413
21474
|
addLayer(addOptions) {
|
|
21414
21475
|
return super.addLayer(__spreadValues$d(__spreadValues$d({}, this.options), addOptions));
|
|
21415
21476
|
}
|
|
21416
|
-
|
|
21417
|
-
|
|
21418
|
-
|
|
21419
|
-
|
|
21420
|
-
|
|
21421
|
-
}, options));
|
|
21422
|
-
const id = this.options.id;
|
|
21423
|
-
if (id !== void 0) {
|
|
21424
|
-
const legend = {
|
|
21425
|
-
layerId: id,
|
|
21426
|
-
legend: ngwLegend.map(({ display_name, icon }) => ({
|
|
21427
|
-
name: display_name,
|
|
21428
|
-
symbol: icon
|
|
21429
|
-
}))
|
|
21430
|
-
};
|
|
21431
|
-
return [legend];
|
|
21477
|
+
showLayer() {
|
|
21478
|
+
this._layerVisibility = true;
|
|
21479
|
+
if (this.layer) {
|
|
21480
|
+
if (!this._blocked) {
|
|
21481
|
+
webMap.mapAdapter.showLayer(this.layer);
|
|
21432
21482
|
}
|
|
21433
|
-
|
|
21434
|
-
|
|
21483
|
+
}
|
|
21484
|
+
}
|
|
21485
|
+
hideLayer() {
|
|
21486
|
+
this._layerVisibility = false;
|
|
21487
|
+
if (this.layer) {
|
|
21488
|
+
webMap.mapAdapter.hideLayer(this.layer);
|
|
21489
|
+
}
|
|
21435
21490
|
}
|
|
21436
21491
|
getIdentificationIds() {
|
|
21437
21492
|
return __async$e(this, null, function* () {
|
|
@@ -21447,8 +21502,69 @@ var NgwLeaflet = (function () {
|
|
|
21447
21502
|
return [];
|
|
21448
21503
|
});
|
|
21449
21504
|
}
|
|
21450
|
-
|
|
21451
|
-
|
|
21505
|
+
getLegend(options) {
|
|
21506
|
+
return __async$e(this, null, function* () {
|
|
21507
|
+
const id = this.options.id;
|
|
21508
|
+
if (id !== void 0) {
|
|
21509
|
+
const ngwLegend = yield connector.get("render.legend_symbols", __spreadValues$d({
|
|
21510
|
+
params: { id: resourceId },
|
|
21511
|
+
cache: true
|
|
21512
|
+
}, options));
|
|
21513
|
+
const legend = new Legend({
|
|
21514
|
+
layerId: id,
|
|
21515
|
+
legend: ngwLegend,
|
|
21516
|
+
onSymbolRenderChange: this._setLegendSymbol.bind(this)
|
|
21517
|
+
});
|
|
21518
|
+
return [legend];
|
|
21519
|
+
}
|
|
21520
|
+
return [];
|
|
21521
|
+
});
|
|
21522
|
+
}
|
|
21523
|
+
_hideLayer() {
|
|
21524
|
+
if (this.options.id) {
|
|
21525
|
+
webMap.mapAdapter.hideLayer(this.layer);
|
|
21526
|
+
}
|
|
21527
|
+
}
|
|
21528
|
+
_showLayer() {
|
|
21529
|
+
if (this.options.id) {
|
|
21530
|
+
if (this._layerVisibility) {
|
|
21531
|
+
webMap.showLayer(this.options.id, { silent: true });
|
|
21532
|
+
}
|
|
21533
|
+
}
|
|
21534
|
+
}
|
|
21535
|
+
_setLegendSymbol(renderIndexes) {
|
|
21536
|
+
const intervals = this._consolidateIntervals(renderIndexes);
|
|
21537
|
+
if (!intervals.length) {
|
|
21538
|
+
this._hideLayer();
|
|
21539
|
+
this._blocked = true;
|
|
21540
|
+
} else {
|
|
21541
|
+
this._blocked = false;
|
|
21542
|
+
this._showLayer();
|
|
21543
|
+
}
|
|
21544
|
+
if (this.updateLayer) {
|
|
21545
|
+
this.updateLayer({
|
|
21546
|
+
params: {
|
|
21547
|
+
[`symbols[${resourceId}]`]: intervals.join(",") || void 0
|
|
21548
|
+
}
|
|
21549
|
+
});
|
|
21550
|
+
}
|
|
21551
|
+
}
|
|
21552
|
+
_consolidateIntervals(symbols) {
|
|
21553
|
+
const sortedSymbols = symbols.slice().sort((a, b) => a - b);
|
|
21554
|
+
const intervals = [];
|
|
21555
|
+
let start = sortedSymbols[0];
|
|
21556
|
+
let end = start;
|
|
21557
|
+
for (let i = 1; i <= sortedSymbols.length; i++) {
|
|
21558
|
+
if (sortedSymbols[i] === end + 1) {
|
|
21559
|
+
end = sortedSymbols[i];
|
|
21560
|
+
} else {
|
|
21561
|
+
intervals.push(start === end ? `${start}` : `${start}-${end}`);
|
|
21562
|
+
start = sortedSymbols[i];
|
|
21563
|
+
end = start;
|
|
21564
|
+
}
|
|
21565
|
+
}
|
|
21566
|
+
return intervals;
|
|
21567
|
+
}
|
|
21452
21568
|
};
|
|
21453
21569
|
} else {
|
|
21454
21570
|
throw new Error(adapter + " not supported yet. Only TILE");
|
|
@@ -21456,25 +21572,25 @@ var NgwLeaflet = (function () {
|
|
|
21456
21572
|
});
|
|
21457
21573
|
}
|
|
21458
21574
|
|
|
21459
|
-
var __defProp$
|
|
21460
|
-
var __defProps$
|
|
21461
|
-
var __getOwnPropDescs$
|
|
21575
|
+
var __defProp$k = Object.defineProperty;
|
|
21576
|
+
var __defProps$9 = Object.defineProperties;
|
|
21577
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
21462
21578
|
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
21463
21579
|
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
21464
21580
|
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
21465
|
-
var __defNormalProp$
|
|
21581
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21466
21582
|
var __spreadValues$c = (a, b) => {
|
|
21467
21583
|
for (var prop in b || (b = {}))
|
|
21468
21584
|
if (__hasOwnProp$d.call(b, prop))
|
|
21469
|
-
__defNormalProp$
|
|
21585
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
21470
21586
|
if (__getOwnPropSymbols$d)
|
|
21471
21587
|
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
21472
21588
|
if (__propIsEnum$d.call(b, prop))
|
|
21473
|
-
__defNormalProp$
|
|
21589
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
21474
21590
|
}
|
|
21475
21591
|
return a;
|
|
21476
21592
|
};
|
|
21477
|
-
var __spreadProps$
|
|
21593
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
21478
21594
|
var __async$d = (__this, __arguments, generator) => {
|
|
21479
21595
|
return new Promise((resolve, reject) => {
|
|
21480
21596
|
var fulfilled = (value) => {
|
|
@@ -21522,7 +21638,7 @@ var NgwLeaflet = (function () {
|
|
|
21522
21638
|
const firstStyle = childrenStyles && childrenStyles[0];
|
|
21523
21639
|
if (firstStyle) {
|
|
21524
21640
|
return createAsyncAdapter(
|
|
21525
|
-
__spreadProps$
|
|
21641
|
+
__spreadProps$9(__spreadValues$c({}, layerOptions), { resource: firstStyle.resource.id }),
|
|
21526
21642
|
webMap,
|
|
21527
21643
|
connector
|
|
21528
21644
|
);
|
|
@@ -21545,7 +21661,7 @@ var NgwLeaflet = (function () {
|
|
|
21545
21661
|
}
|
|
21546
21662
|
if (item) {
|
|
21547
21663
|
const cls = item.resource.cls;
|
|
21548
|
-
const layerOptions = __spreadProps$
|
|
21664
|
+
const layerOptions = __spreadProps$9(__spreadValues$c({}, options), {
|
|
21549
21665
|
resource: resourceId
|
|
21550
21666
|
});
|
|
21551
21667
|
const adapterOptions = {
|
|
@@ -21582,10 +21698,10 @@ var NgwLeaflet = (function () {
|
|
|
21582
21698
|
item.resource.parent.id
|
|
21583
21699
|
);
|
|
21584
21700
|
if (parentItem) {
|
|
21585
|
-
const parentOptions = __spreadProps$
|
|
21701
|
+
const parentOptions = __spreadProps$9(__spreadValues$c({}, options), {
|
|
21586
21702
|
resource: item.resource.parent.id
|
|
21587
21703
|
});
|
|
21588
|
-
adapter = createGeoJsonAdapter(__spreadProps$
|
|
21704
|
+
adapter = createGeoJsonAdapter(__spreadProps$9(__spreadValues$c({}, adapterOptions), {
|
|
21589
21705
|
item: parentItem,
|
|
21590
21706
|
layerOptions: parentOptions
|
|
21591
21707
|
}));
|
|
@@ -21629,31 +21745,46 @@ var NgwLeaflet = (function () {
|
|
|
21629
21745
|
});
|
|
21630
21746
|
}
|
|
21631
21747
|
|
|
21632
|
-
var __defProp$
|
|
21748
|
+
var __defProp$j = Object.defineProperty;
|
|
21749
|
+
var __defProps$8 = Object.defineProperties;
|
|
21750
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
21633
21751
|
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
21634
21752
|
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
21635
21753
|
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
21636
|
-
var __defNormalProp$
|
|
21754
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21637
21755
|
var __spreadValues$b = (a, b) => {
|
|
21638
21756
|
for (var prop in b || (b = {}))
|
|
21639
21757
|
if (__hasOwnProp$c.call(b, prop))
|
|
21640
|
-
__defNormalProp$
|
|
21758
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
21641
21759
|
if (__getOwnPropSymbols$c)
|
|
21642
21760
|
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
21643
21761
|
if (__propIsEnum$c.call(b, prop))
|
|
21644
|
-
__defNormalProp$
|
|
21762
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
21645
21763
|
}
|
|
21646
21764
|
return a;
|
|
21647
21765
|
};
|
|
21766
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
21767
|
+
var __objRest$1 = (source, exclude) => {
|
|
21768
|
+
var target = {};
|
|
21769
|
+
for (var prop in source)
|
|
21770
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21771
|
+
target[prop] = source[prop];
|
|
21772
|
+
if (source != null && __getOwnPropSymbols$c)
|
|
21773
|
+
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
21774
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
21775
|
+
target[prop] = source[prop];
|
|
21776
|
+
}
|
|
21777
|
+
return target;
|
|
21778
|
+
};
|
|
21648
21779
|
function updateImageParams(params, resourceId) {
|
|
21649
|
-
const { bbox, width, height, nd } =
|
|
21650
|
-
return {
|
|
21780
|
+
const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$1(_a, ["bbox", "width", "height", "nd"]);
|
|
21781
|
+
return __spreadProps$8(__spreadValues$b({}, rest), {
|
|
21651
21782
|
resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
|
|
21652
21783
|
extent: bbox,
|
|
21653
21784
|
size: width + "," + height,
|
|
21654
21785
|
timestamp: Date.now(),
|
|
21655
21786
|
nd: nd != null ? nd : 200
|
|
21656
|
-
};
|
|
21787
|
+
});
|
|
21657
21788
|
}
|
|
21658
21789
|
const vectorLayerGeomToPaintTypeAlias = {
|
|
21659
21790
|
POINT: "point",
|
|
@@ -21713,26 +21844,26 @@ var NgwLeaflet = (function () {
|
|
|
21713
21844
|
return zoom;
|
|
21714
21845
|
}
|
|
21715
21846
|
|
|
21716
|
-
var __defProp$
|
|
21847
|
+
var __defProp$i = Object.defineProperty;
|
|
21717
21848
|
var __defProps$7 = Object.defineProperties;
|
|
21718
21849
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
21719
21850
|
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
21720
21851
|
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
21721
21852
|
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
21722
|
-
var __defNormalProp$
|
|
21853
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21723
21854
|
var __spreadValues$a = (a, b) => {
|
|
21724
21855
|
for (var prop in b || (b = {}))
|
|
21725
21856
|
if (__hasOwnProp$b.call(b, prop))
|
|
21726
|
-
__defNormalProp$
|
|
21857
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
21727
21858
|
if (__getOwnPropSymbols$b)
|
|
21728
21859
|
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
21729
21860
|
if (__propIsEnum$b.call(b, prop))
|
|
21730
|
-
__defNormalProp$
|
|
21861
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
21731
21862
|
}
|
|
21732
21863
|
return a;
|
|
21733
21864
|
};
|
|
21734
21865
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
21735
|
-
var __publicField$
|
|
21866
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21736
21867
|
var __async$c = (__this, __arguments, generator) => {
|
|
21737
21868
|
return new Promise((resolve, reject) => {
|
|
21738
21869
|
var fulfilled = (value) => {
|
|
@@ -21757,11 +21888,11 @@ var NgwLeaflet = (function () {
|
|
|
21757
21888
|
constructor(webMap, item, options, connector, parent, noInit) {
|
|
21758
21889
|
super(__spreadValues$a(__spreadValues$a({}, _NgwWebmapItem.options), options));
|
|
21759
21890
|
this.webMap = webMap;
|
|
21760
|
-
__publicField$
|
|
21761
|
-
__publicField$
|
|
21762
|
-
__publicField$
|
|
21763
|
-
__publicField$
|
|
21764
|
-
__publicField$
|
|
21891
|
+
__publicField$e(this, "item");
|
|
21892
|
+
__publicField$e(this, "connector");
|
|
21893
|
+
__publicField$e(this, "layer");
|
|
21894
|
+
__publicField$e(this, "emitter", new EventEmitter());
|
|
21895
|
+
__publicField$e(this, "_rootDescendantsCount", 0);
|
|
21765
21896
|
if (connector) {
|
|
21766
21897
|
this.connector = connector;
|
|
21767
21898
|
}
|
|
@@ -21823,10 +21954,12 @@ var NgwLeaflet = (function () {
|
|
|
21823
21954
|
}, options));
|
|
21824
21955
|
const legend = {
|
|
21825
21956
|
layerId: id,
|
|
21826
|
-
legend: ngwLegend.map((
|
|
21827
|
-
|
|
21828
|
-
|
|
21829
|
-
|
|
21957
|
+
legend: ngwLegend.map((legend2) => __spreadValues$a({
|
|
21958
|
+
/** @deprecated use display_name instead */
|
|
21959
|
+
name: legend2.display_name,
|
|
21960
|
+
/** @deprecated use icon instead */
|
|
21961
|
+
symbol: legend2.icon
|
|
21962
|
+
}, legend2))
|
|
21830
21963
|
};
|
|
21831
21964
|
return [legend];
|
|
21832
21965
|
}
|
|
@@ -21949,8 +22082,8 @@ var NgwLeaflet = (function () {
|
|
|
21949
22082
|
return totalValue;
|
|
21950
22083
|
}
|
|
21951
22084
|
};
|
|
21952
|
-
__publicField$
|
|
21953
|
-
__publicField$
|
|
22085
|
+
__publicField$e(_NgwWebmapItem, "GetAdapterFromLayerType", {});
|
|
22086
|
+
__publicField$e(_NgwWebmapItem, "options", {
|
|
21954
22087
|
properties: [
|
|
21955
22088
|
{
|
|
21956
22089
|
type: "boolean",
|
|
@@ -21990,23 +22123,23 @@ var NgwLeaflet = (function () {
|
|
|
21990
22123
|
});
|
|
21991
22124
|
let NgwWebmapItem = _NgwWebmapItem;
|
|
21992
22125
|
|
|
21993
|
-
var __defProp$
|
|
22126
|
+
var __defProp$h = Object.defineProperty;
|
|
21994
22127
|
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
21995
22128
|
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
21996
22129
|
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
21997
|
-
var __defNormalProp$
|
|
22130
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21998
22131
|
var __spreadValues$9 = (a, b) => {
|
|
21999
22132
|
for (var prop in b || (b = {}))
|
|
22000
22133
|
if (__hasOwnProp$a.call(b, prop))
|
|
22001
|
-
__defNormalProp$
|
|
22134
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
22002
22135
|
if (__getOwnPropSymbols$a)
|
|
22003
22136
|
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
22004
22137
|
if (__propIsEnum$a.call(b, prop))
|
|
22005
|
-
__defNormalProp$
|
|
22138
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
22006
22139
|
}
|
|
22007
22140
|
return a;
|
|
22008
22141
|
};
|
|
22009
|
-
var __publicField$
|
|
22142
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22010
22143
|
var __async$b = (__this, __arguments, generator) => {
|
|
22011
22144
|
return new Promise((resolve, reject) => {
|
|
22012
22145
|
var fulfilled = (value) => {
|
|
@@ -22036,10 +22169,10 @@ var NgwLeaflet = (function () {
|
|
|
22036
22169
|
}) {
|
|
22037
22170
|
class OnFirstShowAdapter {
|
|
22038
22171
|
constructor() {
|
|
22039
|
-
__publicField$
|
|
22040
|
-
__publicField$
|
|
22041
|
-
__publicField$
|
|
22042
|
-
__publicField$
|
|
22172
|
+
__publicField$d(this, "options", {});
|
|
22173
|
+
__publicField$d(this, "layer", []);
|
|
22174
|
+
__publicField$d(this, "_removed", false);
|
|
22175
|
+
__publicField$d(this, "_creatingInProgress", false);
|
|
22043
22176
|
}
|
|
22044
22177
|
addLayer() {
|
|
22045
22178
|
return this.layer;
|
|
@@ -22167,26 +22300,26 @@ var NgwLeaflet = (function () {
|
|
|
22167
22300
|
|
|
22168
22301
|
const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
|
|
22169
22302
|
|
|
22170
|
-
var __defProp$
|
|
22303
|
+
var __defProp$g = Object.defineProperty;
|
|
22171
22304
|
var __defProps$6 = Object.defineProperties;
|
|
22172
22305
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
22173
22306
|
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
22174
22307
|
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
22175
22308
|
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
22176
|
-
var __defNormalProp$
|
|
22309
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22177
22310
|
var __spreadValues$8 = (a, b) => {
|
|
22178
22311
|
for (var prop in b || (b = {}))
|
|
22179
22312
|
if (__hasOwnProp$9.call(b, prop))
|
|
22180
|
-
__defNormalProp$
|
|
22313
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
22181
22314
|
if (__getOwnPropSymbols$9)
|
|
22182
22315
|
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
22183
22316
|
if (__propIsEnum$9.call(b, prop))
|
|
22184
|
-
__defNormalProp$
|
|
22317
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
22185
22318
|
}
|
|
22186
22319
|
return a;
|
|
22187
22320
|
};
|
|
22188
22321
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
22189
|
-
var __publicField$
|
|
22322
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22190
22323
|
var __async$9 = (__this, __arguments, generator) => {
|
|
22191
22324
|
return new Promise((resolve, reject) => {
|
|
22192
22325
|
var fulfilled = (value) => {
|
|
@@ -22211,21 +22344,21 @@ var NgwLeaflet = (function () {
|
|
|
22211
22344
|
constructor(map, options) {
|
|
22212
22345
|
this.map = map;
|
|
22213
22346
|
this.options = options;
|
|
22214
|
-
__publicField$
|
|
22215
|
-
__publicField$
|
|
22347
|
+
__publicField$c(this, "layer");
|
|
22348
|
+
__publicField$c(this, "NgwWebmapItem", NgwWebmapItem);
|
|
22216
22349
|
/**
|
|
22217
22350
|
* Radius for searching objects in pixels
|
|
22218
22351
|
*/
|
|
22219
|
-
__publicField$
|
|
22352
|
+
__publicField$c(this, "pixelRadius", 10);
|
|
22220
22353
|
// webmapSettings.identify_radius,
|
|
22221
|
-
__publicField$
|
|
22222
|
-
__publicField$
|
|
22223
|
-
__publicField$
|
|
22224
|
-
__publicField$
|
|
22225
|
-
__publicField$
|
|
22226
|
-
__publicField$
|
|
22227
|
-
__publicField$
|
|
22228
|
-
__publicField$
|
|
22354
|
+
__publicField$c(this, "resourceId");
|
|
22355
|
+
__publicField$c(this, "webmapClassName", "webmap");
|
|
22356
|
+
__publicField$c(this, "emitter", new EventEmitter());
|
|
22357
|
+
__publicField$c(this, "_extent");
|
|
22358
|
+
__publicField$c(this, "response");
|
|
22359
|
+
__publicField$c(this, "_webmapLayersIds");
|
|
22360
|
+
__publicField$c(this, "_webmapBaselayersIds", []);
|
|
22361
|
+
__publicField$c(this, "_lastActiveBaselayer");
|
|
22229
22362
|
const r = options.resourceId;
|
|
22230
22363
|
if (Array.isArray(r)) {
|
|
22231
22364
|
this.resourceId = r[0];
|
|
@@ -22534,23 +22667,23 @@ var NgwLeaflet = (function () {
|
|
|
22534
22667
|
}
|
|
22535
22668
|
}
|
|
22536
22669
|
|
|
22537
|
-
var __defProp$
|
|
22670
|
+
var __defProp$f = Object.defineProperty;
|
|
22538
22671
|
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
22539
22672
|
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
22540
22673
|
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
22541
|
-
var __defNormalProp$
|
|
22674
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22542
22675
|
var __spreadValues$7 = (a, b) => {
|
|
22543
22676
|
for (var prop in b || (b = {}))
|
|
22544
22677
|
if (__hasOwnProp$8.call(b, prop))
|
|
22545
|
-
__defNormalProp$
|
|
22678
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
22546
22679
|
if (__getOwnPropSymbols$8)
|
|
22547
22680
|
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
22548
22681
|
if (__propIsEnum$8.call(b, prop))
|
|
22549
|
-
__defNormalProp$
|
|
22682
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
22550
22683
|
}
|
|
22551
22684
|
return a;
|
|
22552
22685
|
};
|
|
22553
|
-
var __publicField$
|
|
22686
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22554
22687
|
var __async$8 = (__this, __arguments, generator) => {
|
|
22555
22688
|
return new Promise((resolve, reject) => {
|
|
22556
22689
|
var fulfilled = (value) => {
|
|
@@ -22574,9 +22707,9 @@ var NgwLeaflet = (function () {
|
|
|
22574
22707
|
class NgwKit {
|
|
22575
22708
|
constructor(options) {
|
|
22576
22709
|
this.options = options;
|
|
22577
|
-
__publicField$
|
|
22578
|
-
__publicField$
|
|
22579
|
-
__publicField$
|
|
22710
|
+
__publicField$b(this, "url");
|
|
22711
|
+
__publicField$b(this, "connector");
|
|
22712
|
+
__publicField$b(this, "webMap");
|
|
22580
22713
|
if (this.options.connector) {
|
|
22581
22714
|
this.url = this.options.connector.options.baseUrl || "";
|
|
22582
22715
|
this.connector = this.options.connector;
|
|
@@ -22637,37 +22770,37 @@ var NgwLeaflet = (function () {
|
|
|
22637
22770
|
}
|
|
22638
22771
|
}
|
|
22639
22772
|
|
|
22640
|
-
var __defProp$
|
|
22773
|
+
var __defProp$e = Object.defineProperty;
|
|
22641
22774
|
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
22642
22775
|
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
22643
22776
|
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
22644
|
-
var __defNormalProp$
|
|
22777
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22645
22778
|
var __spreadValues$6 = (a, b) => {
|
|
22646
22779
|
for (var prop in b || (b = {}))
|
|
22647
22780
|
if (__hasOwnProp$7.call(b, prop))
|
|
22648
|
-
__defNormalProp$
|
|
22781
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
22649
22782
|
if (__getOwnPropSymbols$7)
|
|
22650
22783
|
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
22651
22784
|
if (__propIsEnum$7.call(b, prop))
|
|
22652
|
-
__defNormalProp$
|
|
22785
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
22653
22786
|
}
|
|
22654
22787
|
return a;
|
|
22655
22788
|
};
|
|
22656
|
-
var __publicField$
|
|
22789
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22657
22790
|
class IdentifyItem {
|
|
22658
22791
|
constructor(options) {
|
|
22659
|
-
__publicField$
|
|
22660
|
-
__publicField$
|
|
22661
|
-
__publicField$
|
|
22662
|
-
__publicField$
|
|
22663
|
-
__publicField$
|
|
22664
|
-
__publicField$
|
|
22665
|
-
__publicField$
|
|
22666
|
-
__publicField$
|
|
22667
|
-
__publicField$
|
|
22668
|
-
__publicField$
|
|
22669
|
-
__publicField$
|
|
22670
|
-
__publicField$
|
|
22792
|
+
__publicField$a(this, "id");
|
|
22793
|
+
__publicField$a(this, "label");
|
|
22794
|
+
__publicField$a(this, "layerId");
|
|
22795
|
+
__publicField$a(this, "parent");
|
|
22796
|
+
__publicField$a(this, "fields");
|
|
22797
|
+
__publicField$a(this, "geom");
|
|
22798
|
+
__publicField$a(this, "extensions");
|
|
22799
|
+
__publicField$a(this, "connector");
|
|
22800
|
+
__publicField$a(this, "_item");
|
|
22801
|
+
__publicField$a(this, "_geojson");
|
|
22802
|
+
__publicField$a(this, "_resource");
|
|
22803
|
+
__publicField$a(this, "_extent");
|
|
22671
22804
|
const f = options.feature;
|
|
22672
22805
|
this.id = f.id;
|
|
22673
22806
|
this.geom = f.geom;
|
|
@@ -22753,21 +22886,21 @@ var NgwLeaflet = (function () {
|
|
|
22753
22886
|
});
|
|
22754
22887
|
}
|
|
22755
22888
|
|
|
22756
|
-
var __defProp$
|
|
22889
|
+
var __defProp$d = Object.defineProperty;
|
|
22757
22890
|
var __defProps$5 = Object.defineProperties;
|
|
22758
22891
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
22759
22892
|
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
22760
22893
|
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
22761
22894
|
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
22762
|
-
var __defNormalProp$
|
|
22895
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22763
22896
|
var __spreadValues$5 = (a, b) => {
|
|
22764
22897
|
for (var prop in b || (b = {}))
|
|
22765
22898
|
if (__hasOwnProp$6.call(b, prop))
|
|
22766
|
-
__defNormalProp$
|
|
22899
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
22767
22900
|
if (__getOwnPropSymbols$6)
|
|
22768
22901
|
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
22769
22902
|
if (__propIsEnum$6.call(b, prop))
|
|
22770
|
-
__defNormalProp$
|
|
22903
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
22771
22904
|
}
|
|
22772
22905
|
return a;
|
|
22773
22906
|
};
|
|
@@ -22971,95 +23104,95 @@ var NgwLeaflet = (function () {
|
|
|
22971
23104
|
});
|
|
22972
23105
|
}
|
|
22973
23106
|
|
|
22974
|
-
var __defProp$
|
|
22975
|
-
var __defNormalProp$
|
|
22976
|
-
var __publicField$
|
|
23107
|
+
var __defProp$c = Object.defineProperty;
|
|
23108
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23109
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22977
23110
|
class KeyCodes {
|
|
22978
23111
|
constructor() {
|
|
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$
|
|
23030
|
-
__publicField$
|
|
23031
|
-
__publicField$
|
|
23032
|
-
__publicField$
|
|
23112
|
+
__publicField$9(this, "backspace", 8);
|
|
23113
|
+
__publicField$9(this, "tab", 9);
|
|
23114
|
+
__publicField$9(this, "enter", 13);
|
|
23115
|
+
__publicField$9(this, "shift", 16);
|
|
23116
|
+
__publicField$9(this, "ctrl", 17);
|
|
23117
|
+
__publicField$9(this, "alt", 18);
|
|
23118
|
+
__publicField$9(this, "pause/break", 19);
|
|
23119
|
+
__publicField$9(this, "caps_lock", 20);
|
|
23120
|
+
__publicField$9(this, "escape", 27);
|
|
23121
|
+
__publicField$9(this, "page_up", 33);
|
|
23122
|
+
__publicField$9(this, "page_down", 34);
|
|
23123
|
+
__publicField$9(this, "end", 35);
|
|
23124
|
+
__publicField$9(this, "home", 36);
|
|
23125
|
+
__publicField$9(this, "left_arrow", 37);
|
|
23126
|
+
__publicField$9(this, "up_arrow", 38);
|
|
23127
|
+
__publicField$9(this, "right_arrow", 39);
|
|
23128
|
+
__publicField$9(this, "down_arrow", 40);
|
|
23129
|
+
__publicField$9(this, "insert", 45);
|
|
23130
|
+
__publicField$9(this, "delete", 46);
|
|
23131
|
+
__publicField$9(this, "left_window_key", 91);
|
|
23132
|
+
__publicField$9(this, "right_window_key", 92);
|
|
23133
|
+
__publicField$9(this, "select_key", 93);
|
|
23134
|
+
__publicField$9(this, "numpad_0", 96);
|
|
23135
|
+
__publicField$9(this, "numpad_1", 97);
|
|
23136
|
+
__publicField$9(this, "numpad_2", 98);
|
|
23137
|
+
__publicField$9(this, "numpad_3", 99);
|
|
23138
|
+
__publicField$9(this, "numpad_4", 100);
|
|
23139
|
+
__publicField$9(this, "numpad_5", 101);
|
|
23140
|
+
__publicField$9(this, "numpad_6", 102);
|
|
23141
|
+
__publicField$9(this, "numpad_7", 103);
|
|
23142
|
+
__publicField$9(this, "numpad_8", 104);
|
|
23143
|
+
__publicField$9(this, "numpad_9", 105);
|
|
23144
|
+
__publicField$9(this, "multiply", 106);
|
|
23145
|
+
__publicField$9(this, "add", 107);
|
|
23146
|
+
__publicField$9(this, "subtract", 109);
|
|
23147
|
+
__publicField$9(this, "decimal_point", 110);
|
|
23148
|
+
__publicField$9(this, "divide", 111);
|
|
23149
|
+
__publicField$9(this, "f1", 112);
|
|
23150
|
+
__publicField$9(this, "f2", 113);
|
|
23151
|
+
__publicField$9(this, "f3", 114);
|
|
23152
|
+
__publicField$9(this, "f4", 115);
|
|
23153
|
+
__publicField$9(this, "f5", 116);
|
|
23154
|
+
__publicField$9(this, "f6", 117);
|
|
23155
|
+
__publicField$9(this, "f7", 118);
|
|
23156
|
+
__publicField$9(this, "f8", 119);
|
|
23157
|
+
__publicField$9(this, "f9", 120);
|
|
23158
|
+
__publicField$9(this, "f10", 121);
|
|
23159
|
+
__publicField$9(this, "f11", 122);
|
|
23160
|
+
__publicField$9(this, "f12", 123);
|
|
23161
|
+
__publicField$9(this, "num_lock", 144);
|
|
23162
|
+
__publicField$9(this, "scroll_lock", 145);
|
|
23163
|
+
__publicField$9(this, "semi-colon", 186);
|
|
23164
|
+
__publicField$9(this, "equal_sign", 187);
|
|
23165
|
+
__publicField$9(this, ",", 188);
|
|
23033
23166
|
// "comma";
|
|
23034
|
-
__publicField$
|
|
23167
|
+
__publicField$9(this, "-", 189);
|
|
23035
23168
|
// "dash";
|
|
23036
|
-
__publicField$
|
|
23169
|
+
__publicField$9(this, ".", 190);
|
|
23037
23170
|
// "period";
|
|
23038
|
-
__publicField$
|
|
23171
|
+
__publicField$9(this, "/", 191);
|
|
23039
23172
|
// "forward slash";
|
|
23040
|
-
__publicField$
|
|
23173
|
+
__publicField$9(this, "`", 192);
|
|
23041
23174
|
// "grave accent";
|
|
23042
|
-
__publicField$
|
|
23175
|
+
__publicField$9(this, "[", 219);
|
|
23043
23176
|
// "open bracket";
|
|
23044
|
-
__publicField$
|
|
23177
|
+
__publicField$9(this, "\\", 220);
|
|
23045
23178
|
// "back slash";
|
|
23046
|
-
__publicField$
|
|
23179
|
+
__publicField$9(this, "]", 221);
|
|
23047
23180
|
// "close braket";
|
|
23048
|
-
__publicField$
|
|
23181
|
+
__publicField$9(this, "'", 222);
|
|
23049
23182
|
}
|
|
23050
23183
|
// "single quote"
|
|
23051
23184
|
}
|
|
23052
23185
|
|
|
23053
|
-
var __defProp$
|
|
23054
|
-
var __defNormalProp$
|
|
23055
|
-
var __publicField$
|
|
23186
|
+
var __defProp$b = Object.defineProperty;
|
|
23187
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23188
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23056
23189
|
class Keys {
|
|
23057
23190
|
constructor() {
|
|
23058
|
-
__publicField$
|
|
23059
|
-
__publicField$
|
|
23060
|
-
__publicField$
|
|
23061
|
-
__publicField$
|
|
23062
|
-
__publicField$
|
|
23191
|
+
__publicField$8(this, "keyCodeAlias", new KeyCodes());
|
|
23192
|
+
__publicField$8(this, "keys", {});
|
|
23193
|
+
__publicField$8(this, "_windowOnFocus");
|
|
23194
|
+
__publicField$8(this, "_keysPressed");
|
|
23195
|
+
__publicField$8(this, "_keysReleased");
|
|
23063
23196
|
this._windowOnFocus = this.windowOnFocus.bind(this);
|
|
23064
23197
|
this._keysPressed = this.keysPressed.bind(this);
|
|
23065
23198
|
this._keysReleased = this.keysReleased.bind(this);
|
|
@@ -23098,15 +23231,15 @@ var NgwLeaflet = (function () {
|
|
|
23098
23231
|
}
|
|
23099
23232
|
}
|
|
23100
23233
|
|
|
23101
|
-
var __defProp$
|
|
23102
|
-
var __defNormalProp$
|
|
23103
|
-
var __publicField$
|
|
23234
|
+
var __defProp$a = Object.defineProperty;
|
|
23235
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23236
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23104
23237
|
class StateItem {
|
|
23105
23238
|
constructor(webMap, opt) {
|
|
23106
23239
|
this.webMap = webMap;
|
|
23107
|
-
__publicField$
|
|
23108
|
-
__publicField$
|
|
23109
|
-
__publicField$
|
|
23240
|
+
__publicField$7(this, "name");
|
|
23241
|
+
__publicField$7(this, "event");
|
|
23242
|
+
__publicField$7(this, "value");
|
|
23110
23243
|
if (opt) {
|
|
23111
23244
|
if (opt.value) {
|
|
23112
23245
|
this.setValue(opt.value);
|
|
@@ -23115,7 +23248,11 @@ var NgwLeaflet = (function () {
|
|
|
23115
23248
|
this.name = opt.name;
|
|
23116
23249
|
}
|
|
23117
23250
|
if (opt.event) {
|
|
23118
|
-
|
|
23251
|
+
if (typeof opt.event === "string") {
|
|
23252
|
+
this.event = [opt.event];
|
|
23253
|
+
} else {
|
|
23254
|
+
this.event = opt.event;
|
|
23255
|
+
}
|
|
23119
23256
|
}
|
|
23120
23257
|
}
|
|
23121
23258
|
}
|
|
@@ -23127,6 +23264,34 @@ var NgwLeaflet = (function () {
|
|
|
23127
23264
|
}
|
|
23128
23265
|
}
|
|
23129
23266
|
|
|
23267
|
+
var __defProp$9 = Object.defineProperty;
|
|
23268
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23269
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23270
|
+
class BoundState extends StateItem {
|
|
23271
|
+
constructor() {
|
|
23272
|
+
super(...arguments);
|
|
23273
|
+
__publicField$6(this, "name", "bounds");
|
|
23274
|
+
__publicField$6(this, "event", ["moveend"]);
|
|
23275
|
+
}
|
|
23276
|
+
getValue() {
|
|
23277
|
+
return this.webMap.getBounds();
|
|
23278
|
+
}
|
|
23279
|
+
setValue(bounds) {
|
|
23280
|
+
this.webMap.setView({ bounds });
|
|
23281
|
+
}
|
|
23282
|
+
toString() {
|
|
23283
|
+
const data = this.getValue();
|
|
23284
|
+
if (data) {
|
|
23285
|
+
return data.slice(0, 4).map((x) => x.toFixed(5)).join("_");
|
|
23286
|
+
}
|
|
23287
|
+
return void 0;
|
|
23288
|
+
}
|
|
23289
|
+
parse(str) {
|
|
23290
|
+
const lngLat = str.split("_").map(Number);
|
|
23291
|
+
return lngLat;
|
|
23292
|
+
}
|
|
23293
|
+
}
|
|
23294
|
+
|
|
23130
23295
|
var __defProp$8 = Object.defineProperty;
|
|
23131
23296
|
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23132
23297
|
var __publicField$5 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -23134,7 +23299,7 @@ var NgwLeaflet = (function () {
|
|
|
23134
23299
|
constructor() {
|
|
23135
23300
|
super(...arguments);
|
|
23136
23301
|
__publicField$5(this, "name", "center");
|
|
23137
|
-
__publicField$5(this, "event", "moveend");
|
|
23302
|
+
__publicField$5(this, "event", ["moveend"]);
|
|
23138
23303
|
}
|
|
23139
23304
|
getValue() {
|
|
23140
23305
|
return this.webMap.getCenter();
|
|
@@ -23142,9 +23307,13 @@ var NgwLeaflet = (function () {
|
|
|
23142
23307
|
setValue(val) {
|
|
23143
23308
|
this.webMap.setCenter(val);
|
|
23144
23309
|
}
|
|
23145
|
-
toString(
|
|
23146
|
-
const
|
|
23147
|
-
|
|
23310
|
+
toString() {
|
|
23311
|
+
const data = this.getValue();
|
|
23312
|
+
if (data) {
|
|
23313
|
+
const d = data.map((x) => x.toFixed(5));
|
|
23314
|
+
return d[0] + "_" + d[1];
|
|
23315
|
+
}
|
|
23316
|
+
return "";
|
|
23148
23317
|
}
|
|
23149
23318
|
parse(str) {
|
|
23150
23319
|
const lngLat = str.split("_").map(Number);
|
|
@@ -23159,7 +23328,7 @@ var NgwLeaflet = (function () {
|
|
|
23159
23328
|
constructor() {
|
|
23160
23329
|
super(...arguments);
|
|
23161
23330
|
__publicField$4(this, "name", "zoom");
|
|
23162
|
-
__publicField$4(this, "event", "zoomend");
|
|
23331
|
+
__publicField$4(this, "event", ["zoomend"]);
|
|
23163
23332
|
}
|
|
23164
23333
|
getValue() {
|
|
23165
23334
|
const zoom = this.webMap.getZoom();
|
|
@@ -23168,8 +23337,8 @@ var NgwLeaflet = (function () {
|
|
|
23168
23337
|
setValue(val) {
|
|
23169
23338
|
this.webMap.setZoom(val);
|
|
23170
23339
|
}
|
|
23171
|
-
toString(
|
|
23172
|
-
return String(
|
|
23340
|
+
toString() {
|
|
23341
|
+
return String(this.getValue());
|
|
23173
23342
|
}
|
|
23174
23343
|
parse(str) {
|
|
23175
23344
|
return Number(str);
|
|
@@ -23238,14 +23407,14 @@ var NgwLeaflet = (function () {
|
|
|
23238
23407
|
__publicField$3(this, "mapAdapter");
|
|
23239
23408
|
__publicField$3(this, "runtimeParams", []);
|
|
23240
23409
|
__publicField$3(this, "getPaintFunctions", _WebMapMain.getPaintFunctions);
|
|
23241
|
-
__publicField$3(this, "
|
|
23410
|
+
__publicField$3(this, "mapStateItems", [CenterState, ZoomState, BoundState]);
|
|
23242
23411
|
__publicField$3(this, "id", ID++);
|
|
23243
23412
|
/**
|
|
23244
23413
|
* From runtime params
|
|
23245
23414
|
*/
|
|
23415
|
+
__publicField$3(this, "mapState", []);
|
|
23246
23416
|
__publicField$3(this, "_initMapState", {});
|
|
23247
23417
|
__publicField$3(this, "_starterKits");
|
|
23248
|
-
__publicField$3(this, "_mapState", []);
|
|
23249
23418
|
__publicField$3(this, "_extent");
|
|
23250
23419
|
__publicField$3(this, "_eventsStatus", {});
|
|
23251
23420
|
__publicField$3(this, "_coordFromMapClickAbort");
|
|
@@ -23280,7 +23449,7 @@ var NgwLeaflet = (function () {
|
|
|
23280
23449
|
create() {
|
|
23281
23450
|
return __async$5(this, null, function* () {
|
|
23282
23451
|
if (!this.getEventStatus("create")) {
|
|
23283
|
-
yield this._setInitMapState(this.
|
|
23452
|
+
yield this._setInitMapState(this.mapStateItems);
|
|
23284
23453
|
yield this._setupMap();
|
|
23285
23454
|
this._emitStatusEvent("create", this);
|
|
23286
23455
|
}
|
|
@@ -23300,16 +23469,22 @@ var NgwLeaflet = (function () {
|
|
|
23300
23469
|
this.mapAdapter.destroy();
|
|
23301
23470
|
}
|
|
23302
23471
|
}
|
|
23303
|
-
|
|
23472
|
+
mapStateWithFunc(func) {
|
|
23304
23473
|
const state = {};
|
|
23305
|
-
this.
|
|
23306
|
-
state[x.name] = x
|
|
23474
|
+
this.mapState.forEach((x) => {
|
|
23475
|
+
state[x.name] = func(x);
|
|
23307
23476
|
});
|
|
23308
23477
|
return state;
|
|
23309
23478
|
}
|
|
23479
|
+
getStateAsString() {
|
|
23480
|
+
return this.mapStateWithFunc((x) => x.toString());
|
|
23481
|
+
}
|
|
23482
|
+
getState() {
|
|
23483
|
+
return this.mapStateWithFunc((x) => x.getValue());
|
|
23484
|
+
}
|
|
23310
23485
|
getRuntimeParams() {
|
|
23311
23486
|
const state = {};
|
|
23312
|
-
this.
|
|
23487
|
+
this.mapState.forEach((x) => {
|
|
23313
23488
|
for (const r of this.runtimeParams) {
|
|
23314
23489
|
const val = r.get(x.name);
|
|
23315
23490
|
if (val !== void 0) {
|
|
@@ -23651,7 +23826,7 @@ var NgwLeaflet = (function () {
|
|
|
23651
23826
|
_setInitMapState(states) {
|
|
23652
23827
|
for (const X of states) {
|
|
23653
23828
|
const state = new X(this);
|
|
23654
|
-
this.
|
|
23829
|
+
this.mapState.push(state);
|
|
23655
23830
|
for (const r of this.runtimeParams) {
|
|
23656
23831
|
const str = r.get(state.name);
|
|
23657
23832
|
if (str !== void 0) {
|
|
@@ -23687,13 +23862,15 @@ var NgwLeaflet = (function () {
|
|
|
23687
23862
|
events.forEach((x) => {
|
|
23688
23863
|
this._mapEvents[x] = (data) => {
|
|
23689
23864
|
if (this.runtimeParams.length) {
|
|
23690
|
-
const
|
|
23691
|
-
|
|
23692
|
-
|
|
23865
|
+
const mapStatusEvents = this.mapState.filter(
|
|
23866
|
+
(y) => y.event.includes(x)
|
|
23867
|
+
);
|
|
23868
|
+
mapStatusEvents.forEach((mapStatusEvent) => {
|
|
23869
|
+
const value = mapStatusEvent.toString();
|
|
23693
23870
|
this.runtimeParams.forEach((r) => {
|
|
23694
23871
|
r.set(mapStatusEvent.name, value);
|
|
23695
23872
|
});
|
|
23696
|
-
}
|
|
23873
|
+
});
|
|
23697
23874
|
}
|
|
23698
23875
|
if (this._eventsStatus) {
|
|
23699
23876
|
this.emitter.emit(x, data);
|
|
@@ -24269,11 +24446,11 @@ var NgwLeaflet = (function () {
|
|
|
24269
24446
|
}
|
|
24270
24447
|
return Promise.resolve();
|
|
24271
24448
|
}
|
|
24272
|
-
updateLayer(layerDef) {
|
|
24449
|
+
updateLayer(layerDef, options) {
|
|
24273
24450
|
const layer = this.getLayer(layerDef);
|
|
24274
24451
|
if (layer) {
|
|
24275
24452
|
if (layer.updateLayer) {
|
|
24276
|
-
return Promise.resolve(layer.updateLayer());
|
|
24453
|
+
return Promise.resolve(layer.updateLayer(options));
|
|
24277
24454
|
} else if (this.isLayerVisible(layer)) {
|
|
24278
24455
|
return this.hideLayer(layer, { silent: true }).then(() => {
|
|
24279
24456
|
return this.showLayer(layer, { silent: true });
|