@nextgis/ngw-leaflet 3.0.0-alpha.16 → 3.0.0-alpha.18
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 +936 -831
- 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 +936 -831
- 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.17; author: NextGIS */
|
|
2
2
|
var NgwLeaflet = (function () {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -15032,15 +15032,15 @@ var NgwLeaflet = (function () {
|
|
|
15032
15032
|
};
|
|
15033
15033
|
}
|
|
15034
15034
|
|
|
15035
|
-
var __defProp$
|
|
15036
|
-
var __defNormalProp$
|
|
15037
|
-
var __publicField$
|
|
15035
|
+
var __defProp$13 = Object.defineProperty;
|
|
15036
|
+
var __defNormalProp$13 = (obj, key, value) => key in obj ? __defProp$13(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15037
|
+
var __publicField$J = (obj, key, value) => __defNormalProp$13(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15038
15038
|
class BaseAdapter {
|
|
15039
15039
|
constructor(map, options) {
|
|
15040
15040
|
this.map = map;
|
|
15041
15041
|
this.options = options;
|
|
15042
|
-
__publicField$
|
|
15043
|
-
__publicField$
|
|
15042
|
+
__publicField$J(this, "layer");
|
|
15043
|
+
__publicField$J(this, "pane", "order-0");
|
|
15044
15044
|
if (options.order !== void 0) {
|
|
15045
15045
|
const pane = "order-" + options.order;
|
|
15046
15046
|
let exist = map.getPane(pane);
|
|
@@ -15069,19 +15069,19 @@ var NgwLeaflet = (function () {
|
|
|
15069
15069
|
};
|
|
15070
15070
|
}
|
|
15071
15071
|
|
|
15072
|
-
var __defProp$
|
|
15073
|
-
var __getOwnPropSymbols$
|
|
15074
|
-
var __hasOwnProp$
|
|
15075
|
-
var __propIsEnum$
|
|
15076
|
-
var __defNormalProp$
|
|
15077
|
-
var __spreadValues$
|
|
15072
|
+
var __defProp$12 = Object.defineProperty;
|
|
15073
|
+
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
15074
|
+
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
15075
|
+
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
15076
|
+
var __defNormalProp$12 = (obj, key, value) => key in obj ? __defProp$12(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15077
|
+
var __spreadValues$I = (a, b) => {
|
|
15078
15078
|
for (var prop in b || (b = {}))
|
|
15079
|
-
if (__hasOwnProp$
|
|
15080
|
-
__defNormalProp$
|
|
15081
|
-
if (__getOwnPropSymbols$
|
|
15082
|
-
for (var prop of __getOwnPropSymbols$
|
|
15083
|
-
if (__propIsEnum$
|
|
15084
|
-
__defNormalProp$
|
|
15079
|
+
if (__hasOwnProp$J.call(b, prop))
|
|
15080
|
+
__defNormalProp$12(a, prop, b[prop]);
|
|
15081
|
+
if (__getOwnPropSymbols$J)
|
|
15082
|
+
for (var prop of __getOwnPropSymbols$J(b)) {
|
|
15083
|
+
if (__propIsEnum$J.call(b, prop))
|
|
15084
|
+
__defNormalProp$12(a, prop, b[prop]);
|
|
15085
15085
|
}
|
|
15086
15086
|
return a;
|
|
15087
15087
|
};
|
|
@@ -15091,7 +15091,7 @@ var NgwLeaflet = (function () {
|
|
|
15091
15091
|
}) {
|
|
15092
15092
|
const layer_ = source.target;
|
|
15093
15093
|
const feature = layer_.feature;
|
|
15094
|
-
const opt = __spreadValues$
|
|
15094
|
+
const opt = __spreadValues$I({
|
|
15095
15095
|
layer,
|
|
15096
15096
|
feature,
|
|
15097
15097
|
event: convertMapClickEvent(source),
|
|
@@ -15100,30 +15100,30 @@ var NgwLeaflet = (function () {
|
|
|
15100
15100
|
return opt;
|
|
15101
15101
|
}
|
|
15102
15102
|
|
|
15103
|
-
var __defProp$
|
|
15104
|
-
var __getOwnPropSymbols$
|
|
15105
|
-
var __hasOwnProp$
|
|
15106
|
-
var __propIsEnum$
|
|
15107
|
-
var __defNormalProp$
|
|
15108
|
-
var __spreadValues$
|
|
15103
|
+
var __defProp$11 = Object.defineProperty;
|
|
15104
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
15105
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
15106
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
15107
|
+
var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15108
|
+
var __spreadValues$H = (a, b) => {
|
|
15109
15109
|
for (var prop in b || (b = {}))
|
|
15110
|
-
if (__hasOwnProp$
|
|
15111
|
-
__defNormalProp$
|
|
15112
|
-
if (__getOwnPropSymbols$
|
|
15113
|
-
for (var prop of __getOwnPropSymbols$
|
|
15114
|
-
if (__propIsEnum$
|
|
15115
|
-
__defNormalProp$
|
|
15110
|
+
if (__hasOwnProp$I.call(b, prop))
|
|
15111
|
+
__defNormalProp$11(a, prop, b[prop]);
|
|
15112
|
+
if (__getOwnPropSymbols$I)
|
|
15113
|
+
for (var prop of __getOwnPropSymbols$I(b)) {
|
|
15114
|
+
if (__propIsEnum$I.call(b, prop))
|
|
15115
|
+
__defNormalProp$11(a, prop, b[prop]);
|
|
15116
15116
|
}
|
|
15117
15117
|
return a;
|
|
15118
15118
|
};
|
|
15119
|
-
var __publicField$
|
|
15119
|
+
var __publicField$I = (obj, key, value) => __defNormalProp$11(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15120
15120
|
class GeoJsonEvents {
|
|
15121
15121
|
constructor(layer) {
|
|
15122
|
-
__publicField$
|
|
15123
|
-
__publicField$
|
|
15124
|
-
__publicField$
|
|
15125
|
-
__publicField$
|
|
15126
|
-
__publicField$
|
|
15122
|
+
__publicField$I(this, "layer");
|
|
15123
|
+
__publicField$I(this, "_onclick");
|
|
15124
|
+
__publicField$I(this, "_ondblclick");
|
|
15125
|
+
__publicField$I(this, "_mouseout");
|
|
15126
|
+
__publicField$I(this, "_mouseover");
|
|
15127
15127
|
this.layer = layer;
|
|
15128
15128
|
}
|
|
15129
15129
|
handleMouseEvents(layer) {
|
|
@@ -15132,7 +15132,7 @@ var NgwLeaflet = (function () {
|
|
|
15132
15132
|
if (onClick_) {
|
|
15133
15133
|
this._onclick = (e) => {
|
|
15134
15134
|
const selected = !!this.layer._getSelected(layer);
|
|
15135
|
-
onClick_(__spreadValues$
|
|
15135
|
+
onClick_(__spreadValues$H({
|
|
15136
15136
|
selected
|
|
15137
15137
|
}, this._createMouseEvent(e)));
|
|
15138
15138
|
};
|
|
@@ -15142,7 +15142,7 @@ var NgwLeaflet = (function () {
|
|
|
15142
15142
|
this._ondblclick = (e) => {
|
|
15143
15143
|
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
15144
15144
|
const selected = !!this.layer._getSelected(layer);
|
|
15145
|
-
onDoubleClick(__spreadValues$
|
|
15145
|
+
onDoubleClick(__spreadValues$H({
|
|
15146
15146
|
selected
|
|
15147
15147
|
}, this._createMouseEvent(e)));
|
|
15148
15148
|
};
|
|
@@ -15801,19 +15801,19 @@ var NgwLeaflet = (function () {
|
|
|
15801
15801
|
typeof: evaluateArgs(([arg]) => typeOfValue(arg))
|
|
15802
15802
|
};
|
|
15803
15803
|
|
|
15804
|
-
var __defProp
|
|
15805
|
-
var __getOwnPropSymbols$
|
|
15806
|
-
var __hasOwnProp$
|
|
15807
|
-
var __propIsEnum$
|
|
15808
|
-
var __defNormalProp
|
|
15809
|
-
var __spreadValues$
|
|
15804
|
+
var __defProp$10 = Object.defineProperty;
|
|
15805
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
15806
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
15807
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
15808
|
+
var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15809
|
+
var __spreadValues$G = (a, b) => {
|
|
15810
15810
|
for (var prop in b || (b = {}))
|
|
15811
|
-
if (__hasOwnProp$
|
|
15812
|
-
__defNormalProp
|
|
15813
|
-
if (__getOwnPropSymbols$
|
|
15814
|
-
for (var prop of __getOwnPropSymbols$
|
|
15815
|
-
if (__propIsEnum$
|
|
15816
|
-
__defNormalProp
|
|
15811
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
15812
|
+
__defNormalProp$10(a, prop, b[prop]);
|
|
15813
|
+
if (__getOwnPropSymbols$H)
|
|
15814
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
15815
|
+
if (__propIsEnum$H.call(b, prop))
|
|
15816
|
+
__defNormalProp$10(a, prop, b[prop]);
|
|
15817
15817
|
}
|
|
15818
15818
|
return a;
|
|
15819
15819
|
};
|
|
@@ -15825,7 +15825,7 @@ var NgwLeaflet = (function () {
|
|
|
15825
15825
|
}
|
|
15826
15826
|
return false;
|
|
15827
15827
|
}
|
|
15828
|
-
const expressions = __spreadValues$
|
|
15828
|
+
const expressions = __spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G({}, mathExpressions), typeExpressions), stringExpressions), lookupExpressions), decisionExpressions), interpolationExpressions);
|
|
15829
15829
|
function evaluate(expression, data = {}) {
|
|
15830
15830
|
const [name, ...args] = expression;
|
|
15831
15831
|
const expressionFun = expressions[name];
|
|
@@ -15838,19 +15838,19 @@ var NgwLeaflet = (function () {
|
|
|
15838
15838
|
throw new Error(`Expression "${name}" is not supported.`);
|
|
15839
15839
|
}
|
|
15840
15840
|
|
|
15841
|
-
var __defProp
|
|
15842
|
-
var __getOwnPropSymbols$
|
|
15843
|
-
var __hasOwnProp$
|
|
15844
|
-
var __propIsEnum$
|
|
15845
|
-
var __defNormalProp
|
|
15846
|
-
var __spreadValues$
|
|
15841
|
+
var __defProp$$ = Object.defineProperty;
|
|
15842
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
15843
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
15844
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
15845
|
+
var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15846
|
+
var __spreadValues$F = (a, b) => {
|
|
15847
15847
|
for (var prop in b || (b = {}))
|
|
15848
|
-
if (__hasOwnProp$
|
|
15849
|
-
__defNormalProp
|
|
15850
|
-
if (__getOwnPropSymbols$
|
|
15851
|
-
for (var prop of __getOwnPropSymbols$
|
|
15852
|
-
if (__propIsEnum$
|
|
15853
|
-
__defNormalProp
|
|
15848
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
15849
|
+
__defNormalProp$$(a, prop, b[prop]);
|
|
15850
|
+
if (__getOwnPropSymbols$G)
|
|
15851
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
15852
|
+
if (__propIsEnum$G.call(b, prop))
|
|
15853
|
+
__defNormalProp$$(a, prop, b[prop]);
|
|
15854
15854
|
}
|
|
15855
15855
|
return a;
|
|
15856
15856
|
};
|
|
@@ -15883,25 +15883,25 @@ var NgwLeaflet = (function () {
|
|
|
15883
15883
|
for (const p in expressions) {
|
|
15884
15884
|
fromCb[p] = expressions[p](feature);
|
|
15885
15885
|
}
|
|
15886
|
-
return __spreadValues$
|
|
15886
|
+
return __spreadValues$F(__spreadValues$F({}, paint), fromCb);
|
|
15887
15887
|
};
|
|
15888
15888
|
}
|
|
15889
15889
|
return;
|
|
15890
15890
|
}
|
|
15891
15891
|
|
|
15892
|
-
var __defProp$
|
|
15893
|
-
var __getOwnPropSymbols$
|
|
15894
|
-
var __hasOwnProp$
|
|
15895
|
-
var __propIsEnum$
|
|
15896
|
-
var __defNormalProp$
|
|
15897
|
-
var __spreadValues$
|
|
15892
|
+
var __defProp$_ = Object.defineProperty;
|
|
15893
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
15894
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
15895
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
15896
|
+
var __defNormalProp$_ = (obj, key, value) => key in obj ? __defProp$_(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15897
|
+
var __spreadValues$E = (a, b) => {
|
|
15898
15898
|
for (var prop in b || (b = {}))
|
|
15899
|
-
if (__hasOwnProp$
|
|
15900
|
-
__defNormalProp$
|
|
15901
|
-
if (__getOwnPropSymbols$
|
|
15902
|
-
for (var prop of __getOwnPropSymbols$
|
|
15903
|
-
if (__propIsEnum$
|
|
15904
|
-
__defNormalProp$
|
|
15899
|
+
if (__hasOwnProp$F.call(b, prop))
|
|
15900
|
+
__defNormalProp$_(a, prop, b[prop]);
|
|
15901
|
+
if (__getOwnPropSymbols$F)
|
|
15902
|
+
for (var prop of __getOwnPropSymbols$F(b)) {
|
|
15903
|
+
if (__propIsEnum$F.call(b, prop))
|
|
15904
|
+
__defNormalProp$_(a, prop, b[prop]);
|
|
15905
15905
|
}
|
|
15906
15906
|
return a;
|
|
15907
15907
|
};
|
|
@@ -15948,7 +15948,7 @@ var NgwLeaflet = (function () {
|
|
|
15948
15948
|
return false;
|
|
15949
15949
|
}
|
|
15950
15950
|
function featureFilter(feature, filters) {
|
|
15951
|
-
const properties = __spreadValues$
|
|
15951
|
+
const properties = __spreadValues$E({}, feature.properties);
|
|
15952
15952
|
if (properties) {
|
|
15953
15953
|
properties.$id = feature.id;
|
|
15954
15954
|
return propertiesFilter(properties, filters);
|
|
@@ -16002,19 +16002,19 @@ var NgwLeaflet = (function () {
|
|
|
16002
16002
|
return false;
|
|
16003
16003
|
}
|
|
16004
16004
|
|
|
16005
|
-
var __defProp$
|
|
16006
|
-
var __getOwnPropSymbols$
|
|
16007
|
-
var __hasOwnProp$
|
|
16008
|
-
var __propIsEnum$
|
|
16009
|
-
var __defNormalProp$
|
|
16010
|
-
var __spreadValues$
|
|
16005
|
+
var __defProp$Z = Object.defineProperty;
|
|
16006
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
16007
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
16008
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
16009
|
+
var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16010
|
+
var __spreadValues$D = (a, b) => {
|
|
16011
16011
|
for (var prop in b || (b = {}))
|
|
16012
|
-
if (__hasOwnProp$
|
|
16013
|
-
__defNormalProp$
|
|
16014
|
-
if (__getOwnPropSymbols$
|
|
16015
|
-
for (var prop of __getOwnPropSymbols$
|
|
16016
|
-
if (__propIsEnum$
|
|
16017
|
-
__defNormalProp$
|
|
16012
|
+
if (__hasOwnProp$E.call(b, prop))
|
|
16013
|
+
__defNormalProp$Z(a, prop, b[prop]);
|
|
16014
|
+
if (__getOwnPropSymbols$E)
|
|
16015
|
+
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
16016
|
+
if (__propIsEnum$E.call(b, prop))
|
|
16017
|
+
__defNormalProp$Z(a, prop, b[prop]);
|
|
16018
16018
|
}
|
|
16019
16019
|
return a;
|
|
16020
16020
|
};
|
|
@@ -16043,7 +16043,7 @@ var NgwLeaflet = (function () {
|
|
|
16043
16043
|
return (feature) => {
|
|
16044
16044
|
const paint = paintsFilters.find((x) => featureFilter(feature, x[0]));
|
|
16045
16045
|
if (paint) {
|
|
16046
|
-
return __spreadValues$
|
|
16046
|
+
return __spreadValues$D(__spreadValues$D({}, mask), paint[1]);
|
|
16047
16047
|
}
|
|
16048
16048
|
return mask;
|
|
16049
16049
|
};
|
|
@@ -16067,8 +16067,8 @@ var NgwLeaflet = (function () {
|
|
|
16067
16067
|
}
|
|
16068
16068
|
function finalizePaint({ paint, defaultPaint }) {
|
|
16069
16069
|
var _a;
|
|
16070
|
-
let newPaint = __spreadValues$
|
|
16071
|
-
newPaint = __spreadValues$
|
|
16070
|
+
let newPaint = __spreadValues$D({}, defaultPaint);
|
|
16071
|
+
newPaint = __spreadValues$D(__spreadValues$D({}, newPaint), paint);
|
|
16072
16072
|
newPaint.fill = (_a = newPaint.fill) != null ? _a : true;
|
|
16073
16073
|
newPaint.stroke = newPaint.stroke !== void 0 ? newPaint.stroke : !newPaint.fill || !!(newPaint.strokeColor || newPaint.strokeOpacity);
|
|
16074
16074
|
return newPaint;
|
|
@@ -16081,7 +16081,7 @@ var NgwLeaflet = (function () {
|
|
|
16081
16081
|
if (!paint) {
|
|
16082
16082
|
throw new Error("paint is empty");
|
|
16083
16083
|
}
|
|
16084
|
-
let newPaint = __spreadValues$
|
|
16084
|
+
let newPaint = __spreadValues$D({}, defaultPaint);
|
|
16085
16085
|
if (isPaintCallback(paint)) {
|
|
16086
16086
|
const getPaintFunction = (feature) => {
|
|
16087
16087
|
const getPaint = preparePaint({
|
|
@@ -16138,41 +16138,41 @@ var NgwLeaflet = (function () {
|
|
|
16138
16138
|
return newPaint;
|
|
16139
16139
|
}
|
|
16140
16140
|
|
|
16141
|
-
var __defProp$
|
|
16142
|
-
var __defProps$
|
|
16143
|
-
var __getOwnPropDescs$
|
|
16144
|
-
var __getOwnPropSymbols$
|
|
16145
|
-
var __hasOwnProp$
|
|
16146
|
-
var __propIsEnum$
|
|
16147
|
-
var __defNormalProp$
|
|
16148
|
-
var __spreadValues$
|
|
16141
|
+
var __defProp$Y = Object.defineProperty;
|
|
16142
|
+
var __defProps$q = Object.defineProperties;
|
|
16143
|
+
var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
|
|
16144
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
16145
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
16146
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
16147
|
+
var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16148
|
+
var __spreadValues$C = (a, b) => {
|
|
16149
16149
|
for (var prop in b || (b = {}))
|
|
16150
|
-
if (__hasOwnProp$
|
|
16151
|
-
__defNormalProp$
|
|
16152
|
-
if (__getOwnPropSymbols$
|
|
16153
|
-
for (var prop of __getOwnPropSymbols$
|
|
16154
|
-
if (__propIsEnum$
|
|
16155
|
-
__defNormalProp$
|
|
16150
|
+
if (__hasOwnProp$D.call(b, prop))
|
|
16151
|
+
__defNormalProp$Y(a, prop, b[prop]);
|
|
16152
|
+
if (__getOwnPropSymbols$D)
|
|
16153
|
+
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
16154
|
+
if (__propIsEnum$D.call(b, prop))
|
|
16155
|
+
__defNormalProp$Y(a, prop, b[prop]);
|
|
16156
16156
|
}
|
|
16157
16157
|
return a;
|
|
16158
16158
|
};
|
|
16159
|
-
var __spreadProps$
|
|
16159
|
+
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
16160
16160
|
var __objRest$8 = (source, exclude) => {
|
|
16161
16161
|
var target = {};
|
|
16162
16162
|
for (var prop in source)
|
|
16163
|
-
if (__hasOwnProp$
|
|
16163
|
+
if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16164
16164
|
target[prop] = source[prop];
|
|
16165
|
-
if (source != null && __getOwnPropSymbols$
|
|
16166
|
-
for (var prop of __getOwnPropSymbols$
|
|
16167
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
16165
|
+
if (source != null && __getOwnPropSymbols$D)
|
|
16166
|
+
for (var prop of __getOwnPropSymbols$D(source)) {
|
|
16167
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
|
|
16168
16168
|
target[prop] = source[prop];
|
|
16169
16169
|
}
|
|
16170
16170
|
return target;
|
|
16171
16171
|
};
|
|
16172
|
-
var __publicField$
|
|
16172
|
+
var __publicField$H = (obj, key, value) => __defNormalProp$Y(obj, key + "" , value);
|
|
16173
16173
|
class GeoJsonPaint {
|
|
16174
16174
|
constructor(layer) {
|
|
16175
|
-
__publicField$
|
|
16175
|
+
__publicField$H(this, "layer");
|
|
16176
16176
|
this.layer = layer;
|
|
16177
16177
|
}
|
|
16178
16178
|
setPaintEachLayer(paint) {
|
|
@@ -16251,7 +16251,7 @@ var NgwLeaflet = (function () {
|
|
|
16251
16251
|
if (html) {
|
|
16252
16252
|
element.innerHTML = html;
|
|
16253
16253
|
}
|
|
16254
|
-
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$
|
|
16254
|
+
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$q(__spreadValues$C({
|
|
16255
16255
|
className: ""
|
|
16256
16256
|
}, toLIconOpt), {
|
|
16257
16257
|
html: element
|
|
@@ -16277,7 +16277,7 @@ var NgwLeaflet = (function () {
|
|
|
16277
16277
|
}
|
|
16278
16278
|
return (_, latlng) => {
|
|
16279
16279
|
const p = PAINT;
|
|
16280
|
-
return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$
|
|
16280
|
+
return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$C(__spreadValues$C({}, p), icon)));
|
|
16281
16281
|
};
|
|
16282
16282
|
}
|
|
16283
16283
|
createPaintOptions(paint) {
|
|
@@ -16299,27 +16299,27 @@ var NgwLeaflet = (function () {
|
|
|
16299
16299
|
}
|
|
16300
16300
|
}
|
|
16301
16301
|
|
|
16302
|
-
var __defProp$
|
|
16303
|
-
var __defProps$
|
|
16304
|
-
var __getOwnPropDescs$
|
|
16305
|
-
var __getOwnPropSymbols$
|
|
16306
|
-
var __hasOwnProp$
|
|
16307
|
-
var __propIsEnum$
|
|
16308
|
-
var __defNormalProp$
|
|
16309
|
-
var __spreadValues$
|
|
16302
|
+
var __defProp$X = Object.defineProperty;
|
|
16303
|
+
var __defProps$p = Object.defineProperties;
|
|
16304
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
16305
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
16306
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
16307
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
16308
|
+
var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16309
|
+
var __spreadValues$B = (a, b) => {
|
|
16310
16310
|
for (var prop in b || (b = {}))
|
|
16311
|
-
if (__hasOwnProp$
|
|
16312
|
-
__defNormalProp$
|
|
16313
|
-
if (__getOwnPropSymbols$
|
|
16314
|
-
for (var prop of __getOwnPropSymbols$
|
|
16315
|
-
if (__propIsEnum$
|
|
16316
|
-
__defNormalProp$
|
|
16311
|
+
if (__hasOwnProp$C.call(b, prop))
|
|
16312
|
+
__defNormalProp$X(a, prop, b[prop]);
|
|
16313
|
+
if (__getOwnPropSymbols$C)
|
|
16314
|
+
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
16315
|
+
if (__propIsEnum$C.call(b, prop))
|
|
16316
|
+
__defNormalProp$X(a, prop, b[prop]);
|
|
16317
16317
|
}
|
|
16318
16318
|
return a;
|
|
16319
16319
|
};
|
|
16320
|
-
var __spreadProps$
|
|
16321
|
-
var __publicField$
|
|
16322
|
-
var __async$
|
|
16320
|
+
var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
|
|
16321
|
+
var __publicField$G = (obj, key, value) => __defNormalProp$X(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16322
|
+
var __async$w = (__this, __arguments, generator) => {
|
|
16323
16323
|
return new Promise((resolve, reject) => {
|
|
16324
16324
|
var fulfilled = (value) => {
|
|
16325
16325
|
try {
|
|
@@ -16342,22 +16342,22 @@ var NgwLeaflet = (function () {
|
|
|
16342
16342
|
class GeoJsonAdapter extends BaseAdapter {
|
|
16343
16343
|
constructor(map, options) {
|
|
16344
16344
|
super(map, options);
|
|
16345
|
-
__publicField$
|
|
16346
|
-
__publicField$
|
|
16347
|
-
__publicField$
|
|
16348
|
-
__publicField$
|
|
16349
|
-
__publicField$
|
|
16350
|
-
__publicField$
|
|
16351
|
-
__publicField$
|
|
16352
|
-
__publicField$
|
|
16353
|
-
__publicField$
|
|
16354
|
-
__publicField$
|
|
16355
|
-
__publicField$
|
|
16356
|
-
__publicField$
|
|
16357
|
-
__publicField$
|
|
16345
|
+
__publicField$G(this, "layer");
|
|
16346
|
+
__publicField$G(this, "selected", false);
|
|
16347
|
+
__publicField$G(this, "type");
|
|
16348
|
+
__publicField$G(this, "_layers", []);
|
|
16349
|
+
__publicField$G(this, "_events");
|
|
16350
|
+
__publicField$G(this, "paint");
|
|
16351
|
+
__publicField$G(this, "selectedPaint");
|
|
16352
|
+
__publicField$G(this, "_selectedLayers", []);
|
|
16353
|
+
__publicField$G(this, "_filteredLayers", []);
|
|
16354
|
+
__publicField$G(this, "_filterFun");
|
|
16355
|
+
__publicField$G(this, "_openedPopup", []);
|
|
16356
|
+
__publicField$G(this, "_paint");
|
|
16357
|
+
__publicField$G(this, "$updateTooltip", debounce(() => {
|
|
16358
16358
|
this.updateTooltip();
|
|
16359
16359
|
}, 300));
|
|
16360
|
-
__publicField$
|
|
16360
|
+
__publicField$G(this, "$unselect", () => {
|
|
16361
16361
|
this.unselect();
|
|
16362
16362
|
});
|
|
16363
16363
|
this._events = new GeoJsonEvents(this);
|
|
@@ -16366,7 +16366,7 @@ var NgwLeaflet = (function () {
|
|
|
16366
16366
|
addLayer(options) {
|
|
16367
16367
|
Object.assign(this.options, options);
|
|
16368
16368
|
this.paint = options.paint;
|
|
16369
|
-
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$
|
|
16369
|
+
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$p(__spreadValues$B({}, options.nativeOptions), {
|
|
16370
16370
|
pane: this.pane
|
|
16371
16371
|
}));
|
|
16372
16372
|
this.selectedPaint = options.selectedPaint;
|
|
@@ -16415,7 +16415,7 @@ var NgwLeaflet = (function () {
|
|
|
16415
16415
|
}
|
|
16416
16416
|
getSelected() {
|
|
16417
16417
|
return this._selectedLayers.map((x) => {
|
|
16418
|
-
return __spreadValues$
|
|
16418
|
+
return __spreadValues$B({
|
|
16419
16419
|
target: this,
|
|
16420
16420
|
feature: x.feature,
|
|
16421
16421
|
layer: x
|
|
@@ -16434,14 +16434,14 @@ var NgwLeaflet = (function () {
|
|
|
16434
16434
|
const filteredLayers = [];
|
|
16435
16435
|
this._layers.forEach(({ feature, layer }) => {
|
|
16436
16436
|
if (layer) {
|
|
16437
|
-
const ok = fun ? fun(__spreadValues$
|
|
16437
|
+
const ok = fun ? fun(__spreadValues$B({
|
|
16438
16438
|
target: this,
|
|
16439
16439
|
feature,
|
|
16440
16440
|
layer
|
|
16441
16441
|
}, createFeaturePositionOptions(feature))) : true;
|
|
16442
16442
|
if (ok) {
|
|
16443
16443
|
layer_.addLayer(layer);
|
|
16444
|
-
filteredLayers.push(__spreadValues$
|
|
16444
|
+
filteredLayers.push(__spreadValues$B({
|
|
16445
16445
|
target: this,
|
|
16446
16446
|
feature,
|
|
16447
16447
|
layer
|
|
@@ -16462,7 +16462,7 @@ var NgwLeaflet = (function () {
|
|
|
16462
16462
|
getLayers() {
|
|
16463
16463
|
return this._layers.map(({ layer, feature }) => {
|
|
16464
16464
|
const visible = layer && !!layer._map;
|
|
16465
|
-
return __spreadValues$
|
|
16465
|
+
return __spreadValues$B({
|
|
16466
16466
|
feature,
|
|
16467
16467
|
layer,
|
|
16468
16468
|
visible,
|
|
@@ -16580,13 +16580,13 @@ var NgwLeaflet = (function () {
|
|
|
16580
16580
|
}
|
|
16581
16581
|
}
|
|
16582
16582
|
updatePaint(paint) {
|
|
16583
|
-
this.paint = __spreadValues$
|
|
16583
|
+
this.paint = __spreadValues$B(__spreadValues$B({}, this.paint), paint);
|
|
16584
16584
|
for (const l of this._layers) {
|
|
16585
16585
|
this._paint.setPaint(l, this.paint);
|
|
16586
16586
|
}
|
|
16587
16587
|
}
|
|
16588
16588
|
updateSelectedPaint(paint) {
|
|
16589
|
-
this.selectedPaint = __spreadValues$
|
|
16589
|
+
this.selectedPaint = __spreadValues$B(__spreadValues$B({}, this.selectedPaint), paint);
|
|
16590
16590
|
for (const l of this._selectedLayers) {
|
|
16591
16591
|
this._paint.setPaint(l, this.selectedPaint);
|
|
16592
16592
|
}
|
|
@@ -16603,7 +16603,7 @@ var NgwLeaflet = (function () {
|
|
|
16603
16603
|
if (feature.properties && labelField) {
|
|
16604
16604
|
message = feature.properties[labelField];
|
|
16605
16605
|
} else if (label) {
|
|
16606
|
-
message = label(__spreadValues$
|
|
16606
|
+
message = label(__spreadValues$B(__spreadValues$B({
|
|
16607
16607
|
target: this
|
|
16608
16608
|
}, layerDef), createFeaturePositionOptions(feature)));
|
|
16609
16609
|
}
|
|
@@ -16614,7 +16614,7 @@ var NgwLeaflet = (function () {
|
|
|
16614
16614
|
}
|
|
16615
16615
|
}
|
|
16616
16616
|
_openPopup(_0) {
|
|
16617
|
-
return __async$
|
|
16617
|
+
return __async$w(this, arguments, function* (def, options = {}, type, latLng) {
|
|
16618
16618
|
var _a, _b;
|
|
16619
16619
|
const { feature, layer } = def;
|
|
16620
16620
|
const {
|
|
@@ -16622,7 +16622,7 @@ var NgwLeaflet = (function () {
|
|
|
16622
16622
|
autoPan,
|
|
16623
16623
|
maxWidth,
|
|
16624
16624
|
closeButton: closeButton_
|
|
16625
|
-
} = __spreadValues$
|
|
16625
|
+
} = __spreadValues$B({
|
|
16626
16626
|
minWidth: 300
|
|
16627
16627
|
}, options);
|
|
16628
16628
|
const closeButton = closeButton_ != null ? closeButton_ : !this.options.selectOnHover;
|
|
@@ -16638,7 +16638,7 @@ var NgwLeaflet = (function () {
|
|
|
16638
16638
|
};
|
|
16639
16639
|
let content;
|
|
16640
16640
|
if (options.createPopupContent) {
|
|
16641
|
-
content = yield options.createPopupContent(__spreadValues$
|
|
16641
|
+
content = yield options.createPopupContent(__spreadValues$B({
|
|
16642
16642
|
layer,
|
|
16643
16643
|
feature,
|
|
16644
16644
|
target: this,
|
|
@@ -16716,9 +16716,9 @@ var NgwLeaflet = (function () {
|
|
|
16716
16716
|
lopt = {
|
|
16717
16717
|
style: (feature) => {
|
|
16718
16718
|
if (feature) {
|
|
16719
|
-
return this._paint.preparePaint(__spreadValues$
|
|
16719
|
+
return this._paint.preparePaint(__spreadValues$B(__spreadValues$B({}, PAINT), paint(feature)));
|
|
16720
16720
|
} else {
|
|
16721
|
-
return this._paint.preparePaint(__spreadProps$
|
|
16721
|
+
return this._paint.preparePaint(__spreadProps$p(__spreadValues$B({}, PAINT), { type: "path" }));
|
|
16722
16722
|
}
|
|
16723
16723
|
}
|
|
16724
16724
|
};
|
|
@@ -16734,7 +16734,7 @@ var NgwLeaflet = (function () {
|
|
|
16734
16734
|
_onEachFeature(feature, layer) {
|
|
16735
16735
|
const layer_ = this.layer;
|
|
16736
16736
|
if (layer_) {
|
|
16737
|
-
const def = __spreadValues$
|
|
16737
|
+
const def = __spreadValues$B({
|
|
16738
16738
|
target: this,
|
|
16739
16739
|
feature,
|
|
16740
16740
|
layer
|
|
@@ -16769,7 +16769,7 @@ var NgwLeaflet = (function () {
|
|
|
16769
16769
|
setTimeout(() => {
|
|
16770
16770
|
if (popup) {
|
|
16771
16771
|
this._openPopup(
|
|
16772
|
-
__spreadValues$
|
|
16772
|
+
__spreadValues$B({
|
|
16773
16773
|
target: this,
|
|
16774
16774
|
layer,
|
|
16775
16775
|
feature
|
|
@@ -16787,7 +16787,7 @@ var NgwLeaflet = (function () {
|
|
|
16787
16787
|
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
16788
16788
|
const layer = e.target;
|
|
16789
16789
|
const feature = layer.feature;
|
|
16790
|
-
const def = __spreadValues$
|
|
16790
|
+
const def = __spreadValues$B({
|
|
16791
16791
|
target: this,
|
|
16792
16792
|
layer,
|
|
16793
16793
|
feature
|
|
@@ -16820,7 +16820,7 @@ var NgwLeaflet = (function () {
|
|
|
16820
16820
|
}
|
|
16821
16821
|
if (this.options.onSelect) {
|
|
16822
16822
|
const features = def.feature ? [def.feature] : [];
|
|
16823
|
-
this.options.onSelect(__spreadValues$
|
|
16823
|
+
this.options.onSelect(__spreadValues$B({
|
|
16824
16824
|
type,
|
|
16825
16825
|
layer: this,
|
|
16826
16826
|
features
|
|
@@ -16912,20 +16912,20 @@ var NgwLeaflet = (function () {
|
|
|
16912
16912
|
return [promise, abortFunc];
|
|
16913
16913
|
}
|
|
16914
16914
|
|
|
16915
|
-
var __defProp$
|
|
16916
|
-
var __defNormalProp$
|
|
16917
|
-
var __publicField$
|
|
16915
|
+
var __defProp$W = Object.defineProperty;
|
|
16916
|
+
var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16917
|
+
var __publicField$F = (obj, key, value) => __defNormalProp$W(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16918
16918
|
class Queue {
|
|
16919
16919
|
/**
|
|
16920
16920
|
* @param {PromiseQueueOptions} options - Configuration options for the queue.
|
|
16921
16921
|
*/
|
|
16922
16922
|
constructor({ concurrency = 1, delay = 0 } = {}) {
|
|
16923
|
-
__publicField$
|
|
16924
|
-
__publicField$
|
|
16925
|
-
__publicField$
|
|
16926
|
-
__publicField$
|
|
16927
|
-
__publicField$
|
|
16928
|
-
__publicField$
|
|
16923
|
+
__publicField$F(this, "queue", []);
|
|
16924
|
+
__publicField$F(this, "concurrency");
|
|
16925
|
+
__publicField$F(this, "activeCount", 0);
|
|
16926
|
+
__publicField$F(this, "timeoutId");
|
|
16927
|
+
__publicField$F(this, "delay");
|
|
16928
|
+
__publicField$F(this, "toAbort", []);
|
|
16929
16929
|
this.concurrency = concurrency;
|
|
16930
16930
|
this.delay = delay;
|
|
16931
16931
|
}
|
|
@@ -17001,13 +17001,13 @@ var NgwLeaflet = (function () {
|
|
|
17001
17001
|
|
|
17002
17002
|
const imageQueue = new Queue({ concurrency: 6, delay: 200 });
|
|
17003
17003
|
|
|
17004
|
-
var __defProp$
|
|
17005
|
-
var __defNormalProp$
|
|
17006
|
-
var __publicField$
|
|
17004
|
+
var __defProp$V = Object.defineProperty;
|
|
17005
|
+
var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17006
|
+
var __publicField$E = (obj, key, value) => __defNormalProp$V(obj, key + "" , value);
|
|
17007
17007
|
class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
17008
17008
|
constructor(imageUrl, bounds, options) {
|
|
17009
17009
|
super(imageUrl, bounds, options);
|
|
17010
|
-
__publicField$
|
|
17010
|
+
__publicField$E(this, "_aborter");
|
|
17011
17011
|
}
|
|
17012
17012
|
cancelLoad() {
|
|
17013
17013
|
if (this._aborter) {
|
|
@@ -17036,14 +17036,14 @@ var NgwLeaflet = (function () {
|
|
|
17036
17036
|
}
|
|
17037
17037
|
}
|
|
17038
17038
|
|
|
17039
|
-
var __defProp$
|
|
17040
|
-
var __defNormalProp$
|
|
17041
|
-
var __publicField$
|
|
17039
|
+
var __defProp$U = Object.defineProperty;
|
|
17040
|
+
var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17041
|
+
var __publicField$D = (obj, key, value) => __defNormalProp$U(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17042
17042
|
class ImageLayer extends leafletSrcExports.Layer {
|
|
17043
17043
|
constructor(url, options) {
|
|
17044
17044
|
var _a;
|
|
17045
17045
|
super(options);
|
|
17046
|
-
__publicField$
|
|
17046
|
+
__publicField$D(this, "defaultWmsParams", {
|
|
17047
17047
|
service: "WMS",
|
|
17048
17048
|
request: "GetMap",
|
|
17049
17049
|
version: "1.1.1",
|
|
@@ -17052,7 +17052,7 @@ var NgwLeaflet = (function () {
|
|
|
17052
17052
|
format: "image/jpeg",
|
|
17053
17053
|
transparent: false
|
|
17054
17054
|
});
|
|
17055
|
-
__publicField$
|
|
17055
|
+
__publicField$D(this, "options", {
|
|
17056
17056
|
crs: null,
|
|
17057
17057
|
uppercase: false,
|
|
17058
17058
|
attribution: "",
|
|
@@ -17066,11 +17066,11 @@ var NgwLeaflet = (function () {
|
|
|
17066
17066
|
viewPortBuffer: 0,
|
|
17067
17067
|
setViewDelay: 100
|
|
17068
17068
|
});
|
|
17069
|
-
__publicField$
|
|
17070
|
-
__publicField$
|
|
17071
|
-
__publicField$
|
|
17072
|
-
__publicField$
|
|
17073
|
-
__publicField$
|
|
17069
|
+
__publicField$D(this, "wmsParams");
|
|
17070
|
+
__publicField$D(this, "_url");
|
|
17071
|
+
__publicField$D(this, "_currentUrl");
|
|
17072
|
+
__publicField$D(this, "_currentOverlay");
|
|
17073
|
+
__publicField$D(this, "_loadedOverlay");
|
|
17074
17074
|
this._url = url;
|
|
17075
17075
|
const params = {};
|
|
17076
17076
|
const opts = {};
|
|
@@ -17078,7 +17078,7 @@ var NgwLeaflet = (function () {
|
|
|
17078
17078
|
for (opt in options) {
|
|
17079
17079
|
if (opt in this.options) {
|
|
17080
17080
|
opts[opt] = options[opt];
|
|
17081
|
-
} else {
|
|
17081
|
+
} else if (!isObject$1(options[opt])) {
|
|
17082
17082
|
params[opt] = options[opt];
|
|
17083
17083
|
}
|
|
17084
17084
|
}
|
|
@@ -17234,47 +17234,45 @@ var NgwLeaflet = (function () {
|
|
|
17234
17234
|
}
|
|
17235
17235
|
}
|
|
17236
17236
|
|
|
17237
|
-
var __defProp$
|
|
17238
|
-
var __defProps$
|
|
17239
|
-
var __getOwnPropDescs$
|
|
17240
|
-
var __getOwnPropSymbols$
|
|
17241
|
-
var __hasOwnProp$
|
|
17242
|
-
var __propIsEnum$
|
|
17243
|
-
var __defNormalProp$
|
|
17244
|
-
var __spreadValues$
|
|
17237
|
+
var __defProp$T = Object.defineProperty;
|
|
17238
|
+
var __defProps$o = Object.defineProperties;
|
|
17239
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
17240
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
17241
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
17242
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
17243
|
+
var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17244
|
+
var __spreadValues$A = (a, b) => {
|
|
17245
17245
|
for (var prop in b || (b = {}))
|
|
17246
|
-
if (__hasOwnProp$
|
|
17247
|
-
__defNormalProp$
|
|
17248
|
-
if (__getOwnPropSymbols$
|
|
17249
|
-
for (var prop of __getOwnPropSymbols$
|
|
17250
|
-
if (__propIsEnum$
|
|
17251
|
-
__defNormalProp$
|
|
17246
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
17247
|
+
__defNormalProp$T(a, prop, b[prop]);
|
|
17248
|
+
if (__getOwnPropSymbols$B)
|
|
17249
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
17250
|
+
if (__propIsEnum$B.call(b, prop))
|
|
17251
|
+
__defNormalProp$T(a, prop, b[prop]);
|
|
17252
17252
|
}
|
|
17253
17253
|
return a;
|
|
17254
17254
|
};
|
|
17255
|
-
var __spreadProps$
|
|
17256
|
-
var __publicField$
|
|
17255
|
+
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
17256
|
+
var __publicField$C = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17257
17257
|
class ImageAdapter extends BaseAdapter {
|
|
17258
17258
|
constructor() {
|
|
17259
17259
|
super(...arguments);
|
|
17260
|
-
__publicField$
|
|
17260
|
+
__publicField$C(this, "layer");
|
|
17261
17261
|
}
|
|
17262
17262
|
addLayer(options) {
|
|
17263
17263
|
var _a;
|
|
17264
17264
|
const url = options && options.url;
|
|
17265
17265
|
if (url) {
|
|
17266
17266
|
const updateWmsParamsFromOpt = options.updateWmsParams;
|
|
17267
|
-
this.layer = new ImageLayer(url,
|
|
17267
|
+
this.layer = new ImageLayer(url, __spreadValues$A(__spreadValues$A(__spreadValues$A({
|
|
17268
17268
|
pane: this.pane,
|
|
17269
17269
|
headers: options.headers,
|
|
17270
17270
|
setViewDelay: options.setViewDelay
|
|
17271
|
-
}, __spreadProps$
|
|
17271
|
+
}, __spreadProps$o(__spreadValues$A({
|
|
17272
17272
|
transparent: true
|
|
17273
17273
|
}, options), {
|
|
17274
17274
|
opacity: (_a = options.opacity) != null ? _a : void 0
|
|
17275
|
-
})), options.params), options.nativeOptions)
|
|
17276
|
-
maxZoom: 12
|
|
17277
|
-
}));
|
|
17275
|
+
})), options.params), options.nativeOptions));
|
|
17278
17276
|
if (updateWmsParamsFromOpt) {
|
|
17279
17277
|
const updateWmsParams = this.layer.updateWmsParams;
|
|
17280
17278
|
this.layer.updateWmsParams = function(map) {
|
|
@@ -17293,7 +17291,7 @@ var NgwLeaflet = (function () {
|
|
|
17293
17291
|
}
|
|
17294
17292
|
}
|
|
17295
17293
|
}
|
|
17296
|
-
__publicField$
|
|
17294
|
+
__publicField$C(ImageAdapter, "queue", imageQueue);
|
|
17297
17295
|
|
|
17298
17296
|
function makeRemote(Base) {
|
|
17299
17297
|
return class RemoteTileLayer extends Base {
|
|
@@ -17355,33 +17353,33 @@ var NgwLeaflet = (function () {
|
|
|
17355
17353
|
}
|
|
17356
17354
|
const TileLayer = makeRemote(TileLayerBase);
|
|
17357
17355
|
|
|
17358
|
-
var __defProp$
|
|
17359
|
-
var __defProps$
|
|
17360
|
-
var __getOwnPropDescs$
|
|
17361
|
-
var __getOwnPropSymbols$
|
|
17362
|
-
var __hasOwnProp$
|
|
17363
|
-
var __propIsEnum$
|
|
17364
|
-
var __defNormalProp$
|
|
17365
|
-
var __spreadValues$
|
|
17366
|
-
for (var prop in b || (b = {}))
|
|
17367
|
-
if (__hasOwnProp$
|
|
17368
|
-
__defNormalProp$
|
|
17369
|
-
if (__getOwnPropSymbols$
|
|
17370
|
-
for (var prop of __getOwnPropSymbols$
|
|
17371
|
-
if (__propIsEnum$
|
|
17372
|
-
__defNormalProp$
|
|
17356
|
+
var __defProp$S = Object.defineProperty;
|
|
17357
|
+
var __defProps$n = Object.defineProperties;
|
|
17358
|
+
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
17359
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
17360
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
17361
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
17362
|
+
var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17363
|
+
var __spreadValues$z = (a, b) => {
|
|
17364
|
+
for (var prop in b || (b = {}))
|
|
17365
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
17366
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
17367
|
+
if (__getOwnPropSymbols$A)
|
|
17368
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
17369
|
+
if (__propIsEnum$A.call(b, prop))
|
|
17370
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
17373
17371
|
}
|
|
17374
17372
|
return a;
|
|
17375
17373
|
};
|
|
17376
|
-
var __spreadProps$
|
|
17374
|
+
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
17377
17375
|
var __objRest$7 = (source, exclude) => {
|
|
17378
17376
|
var target = {};
|
|
17379
17377
|
for (var prop in source)
|
|
17380
|
-
if (__hasOwnProp$
|
|
17378
|
+
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
17381
17379
|
target[prop] = source[prop];
|
|
17382
|
-
if (source != null && __getOwnPropSymbols$
|
|
17383
|
-
for (var prop of __getOwnPropSymbols$
|
|
17384
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
17380
|
+
if (source != null && __getOwnPropSymbols$A)
|
|
17381
|
+
for (var prop of __getOwnPropSymbols$A(source)) {
|
|
17382
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
|
|
17385
17383
|
target[prop] = source[prop];
|
|
17386
17384
|
}
|
|
17387
17385
|
return target;
|
|
@@ -17392,7 +17390,7 @@ var NgwLeaflet = (function () {
|
|
|
17392
17390
|
if (options) {
|
|
17393
17391
|
const _a = options, { url } = _a, opt = __objRest$7(_a, ["url"]);
|
|
17394
17392
|
if (url) {
|
|
17395
|
-
const tileLayerOptions = __spreadValues$
|
|
17393
|
+
const tileLayerOptions = __spreadValues$z({
|
|
17396
17394
|
pane: this.pane,
|
|
17397
17395
|
attribution: opt.attribution,
|
|
17398
17396
|
minZoom: opt.minZoom,
|
|
@@ -17403,7 +17401,7 @@ var NgwLeaflet = (function () {
|
|
|
17403
17401
|
}
|
|
17404
17402
|
let layer;
|
|
17405
17403
|
if (opt.headers || opt.withCredentials) {
|
|
17406
|
-
layer = new TileLayer(url, __spreadProps$
|
|
17404
|
+
layer = new TileLayer(url, __spreadProps$n(__spreadValues$z({}, tileLayerOptions), {
|
|
17407
17405
|
headers: opt.headers,
|
|
17408
17406
|
withCredentials: opt.withCredentials,
|
|
17409
17407
|
setViewDelay: opt.setViewDelay
|
|
@@ -17426,29 +17424,29 @@ var NgwLeaflet = (function () {
|
|
|
17426
17424
|
}
|
|
17427
17425
|
}
|
|
17428
17426
|
|
|
17429
|
-
var __defProp$
|
|
17430
|
-
var __defProps$
|
|
17431
|
-
var __getOwnPropDescs$
|
|
17432
|
-
var __getOwnPropSymbols$
|
|
17433
|
-
var __hasOwnProp$
|
|
17434
|
-
var __propIsEnum$
|
|
17435
|
-
var __defNormalProp$
|
|
17436
|
-
var __spreadValues$
|
|
17427
|
+
var __defProp$R = Object.defineProperty;
|
|
17428
|
+
var __defProps$m = Object.defineProperties;
|
|
17429
|
+
var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
|
|
17430
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
17431
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
17432
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
17433
|
+
var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17434
|
+
var __spreadValues$y = (a, b) => {
|
|
17437
17435
|
for (var prop in b || (b = {}))
|
|
17438
|
-
if (__hasOwnProp$
|
|
17439
|
-
__defNormalProp$
|
|
17440
|
-
if (__getOwnPropSymbols$
|
|
17441
|
-
for (var prop of __getOwnPropSymbols$
|
|
17442
|
-
if (__propIsEnum$
|
|
17443
|
-
__defNormalProp$
|
|
17436
|
+
if (__hasOwnProp$z.call(b, prop))
|
|
17437
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
17438
|
+
if (__getOwnPropSymbols$z)
|
|
17439
|
+
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
17440
|
+
if (__propIsEnum$z.call(b, prop))
|
|
17441
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
17444
17442
|
}
|
|
17445
17443
|
return a;
|
|
17446
17444
|
};
|
|
17447
|
-
var __spreadProps$
|
|
17445
|
+
var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
|
|
17448
17446
|
class OsmAdapter extends TileAdapter {
|
|
17449
17447
|
addLayer(options) {
|
|
17450
17448
|
const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
|
17451
|
-
return super.addLayer(__spreadProps$
|
|
17449
|
+
return super.addLayer(__spreadProps$m(__spreadValues$y({
|
|
17452
17450
|
name: "OpenStreetMap",
|
|
17453
17451
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
|
17454
17452
|
}, options), {
|
|
@@ -17464,33 +17462,33 @@ var NgwLeaflet = (function () {
|
|
|
17464
17462
|
}
|
|
17465
17463
|
const WmsLayer = makeRemote(WmsLayerBase);
|
|
17466
17464
|
|
|
17467
|
-
var __defProp$
|
|
17468
|
-
var __defProps$
|
|
17469
|
-
var __getOwnPropDescs$
|
|
17470
|
-
var __getOwnPropSymbols$
|
|
17471
|
-
var __hasOwnProp$
|
|
17472
|
-
var __propIsEnum$
|
|
17473
|
-
var __defNormalProp$
|
|
17474
|
-
var __spreadValues$
|
|
17465
|
+
var __defProp$Q = Object.defineProperty;
|
|
17466
|
+
var __defProps$l = Object.defineProperties;
|
|
17467
|
+
var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
|
|
17468
|
+
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
17469
|
+
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
17470
|
+
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
17471
|
+
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17472
|
+
var __spreadValues$x = (a, b) => {
|
|
17475
17473
|
for (var prop in b || (b = {}))
|
|
17476
|
-
if (__hasOwnProp$
|
|
17477
|
-
__defNormalProp$
|
|
17478
|
-
if (__getOwnPropSymbols$
|
|
17479
|
-
for (var prop of __getOwnPropSymbols$
|
|
17480
|
-
if (__propIsEnum$
|
|
17481
|
-
__defNormalProp$
|
|
17474
|
+
if (__hasOwnProp$y.call(b, prop))
|
|
17475
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
17476
|
+
if (__getOwnPropSymbols$y)
|
|
17477
|
+
for (var prop of __getOwnPropSymbols$y(b)) {
|
|
17478
|
+
if (__propIsEnum$y.call(b, prop))
|
|
17479
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
17482
17480
|
}
|
|
17483
17481
|
return a;
|
|
17484
17482
|
};
|
|
17485
|
-
var __spreadProps$
|
|
17483
|
+
var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
|
|
17486
17484
|
var __objRest$6 = (source, exclude) => {
|
|
17487
17485
|
var target = {};
|
|
17488
17486
|
for (var prop in source)
|
|
17489
|
-
if (__hasOwnProp$
|
|
17487
|
+
if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
17490
17488
|
target[prop] = source[prop];
|
|
17491
|
-
if (source != null && __getOwnPropSymbols$
|
|
17492
|
-
for (var prop of __getOwnPropSymbols$
|
|
17493
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
17489
|
+
if (source != null && __getOwnPropSymbols$y)
|
|
17490
|
+
for (var prop of __getOwnPropSymbols$y(source)) {
|
|
17491
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
|
|
17494
17492
|
target[prop] = source[prop];
|
|
17495
17493
|
}
|
|
17496
17494
|
return target;
|
|
@@ -17500,7 +17498,7 @@ var NgwLeaflet = (function () {
|
|
|
17500
17498
|
Object.assign(this.options, options);
|
|
17501
17499
|
const _a = options, { url } = _a, opt = __objRest$6(_a, ["url"]);
|
|
17502
17500
|
if (url) {
|
|
17503
|
-
const layerOptions = __spreadValues$
|
|
17501
|
+
const layerOptions = __spreadValues$x({
|
|
17504
17502
|
pane: this.pane,
|
|
17505
17503
|
attribution: opt.attribution,
|
|
17506
17504
|
minZoom: opt.minZoom,
|
|
@@ -17511,7 +17509,7 @@ var NgwLeaflet = (function () {
|
|
|
17511
17509
|
}, options.nativeOptions);
|
|
17512
17510
|
let layer;
|
|
17513
17511
|
if (opt.headers || opt.withCredentials) {
|
|
17514
|
-
layer = new WmsLayer(url, __spreadProps$
|
|
17512
|
+
layer = new WmsLayer(url, __spreadProps$l(__spreadValues$x({}, layerOptions), {
|
|
17515
17513
|
headers: opt.headers,
|
|
17516
17514
|
withCredentials: opt.withCredentials
|
|
17517
17515
|
}));
|
|
@@ -17531,33 +17529,33 @@ var NgwLeaflet = (function () {
|
|
|
17531
17529
|
];
|
|
17532
17530
|
}
|
|
17533
17531
|
|
|
17534
|
-
var __defProp$
|
|
17535
|
-
var __getOwnPropSymbols$
|
|
17536
|
-
var __hasOwnProp$
|
|
17537
|
-
var __propIsEnum$
|
|
17538
|
-
var __defNormalProp$
|
|
17539
|
-
var __spreadValues$
|
|
17532
|
+
var __defProp$P = Object.defineProperty;
|
|
17533
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
17534
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
17535
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
17536
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17537
|
+
var __spreadValues$w = (a, b) => {
|
|
17540
17538
|
for (var prop in b || (b = {}))
|
|
17541
|
-
if (__hasOwnProp$
|
|
17542
|
-
__defNormalProp$
|
|
17543
|
-
if (__getOwnPropSymbols$
|
|
17544
|
-
for (var prop of __getOwnPropSymbols$
|
|
17545
|
-
if (__propIsEnum$
|
|
17546
|
-
__defNormalProp$
|
|
17539
|
+
if (__hasOwnProp$x.call(b, prop))
|
|
17540
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
17541
|
+
if (__getOwnPropSymbols$x)
|
|
17542
|
+
for (var prop of __getOwnPropSymbols$x(b)) {
|
|
17543
|
+
if (__propIsEnum$x.call(b, prop))
|
|
17544
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
17547
17545
|
}
|
|
17548
17546
|
return a;
|
|
17549
17547
|
};
|
|
17550
|
-
var __publicField$
|
|
17548
|
+
var __publicField$B = (obj, key, value) => __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17551
17549
|
const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
17552
17550
|
constructor() {
|
|
17553
|
-
__publicField$
|
|
17554
|
-
__publicField$
|
|
17555
|
-
__publicField$
|
|
17556
|
-
__publicField$
|
|
17557
|
-
__publicField$
|
|
17558
|
-
__publicField$
|
|
17559
|
-
__publicField$
|
|
17560
|
-
__publicField$
|
|
17551
|
+
__publicField$B(this, "options", { target: "map" });
|
|
17552
|
+
__publicField$B(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
|
|
17553
|
+
__publicField$B(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
|
|
17554
|
+
__publicField$B(this, "emitter", new EventEmitter());
|
|
17555
|
+
__publicField$B(this, "map");
|
|
17556
|
+
__publicField$B(this, "_resizeObserver");
|
|
17557
|
+
__publicField$B(this, "_unselectCb", []);
|
|
17558
|
+
__publicField$B(this, "_universalEvents", [
|
|
17561
17559
|
"move",
|
|
17562
17560
|
"zoom",
|
|
17563
17561
|
"zoomend",
|
|
@@ -17565,14 +17563,14 @@ var NgwLeaflet = (function () {
|
|
|
17565
17563
|
"moveend",
|
|
17566
17564
|
"movestart"
|
|
17567
17565
|
]);
|
|
17568
|
-
__publicField$
|
|
17566
|
+
__publicField$B(this, "_positionEvents", [
|
|
17569
17567
|
"mousemove",
|
|
17570
17568
|
"mouseout",
|
|
17571
17569
|
"mouseover"
|
|
17572
17570
|
]);
|
|
17573
17571
|
}
|
|
17574
17572
|
create(options) {
|
|
17575
|
-
this.options = __spreadValues$
|
|
17573
|
+
this.options = __spreadValues$w({}, options);
|
|
17576
17574
|
if (this.options.target) {
|
|
17577
17575
|
const {
|
|
17578
17576
|
zoom,
|
|
@@ -17582,7 +17580,7 @@ var NgwLeaflet = (function () {
|
|
|
17582
17580
|
maxBounds: mb,
|
|
17583
17581
|
mapAdapterOptions
|
|
17584
17582
|
} = this.options;
|
|
17585
|
-
this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$
|
|
17583
|
+
this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$w({
|
|
17586
17584
|
attributionControl: false,
|
|
17587
17585
|
zoomControl: false,
|
|
17588
17586
|
maxBounds: mb ? arrayToBoundsExpression(mb) : void 0,
|
|
@@ -17865,7 +17863,7 @@ var NgwLeaflet = (function () {
|
|
|
17865
17863
|
}
|
|
17866
17864
|
}
|
|
17867
17865
|
};
|
|
17868
|
-
__publicField$
|
|
17866
|
+
__publicField$B(_LeafletMapAdapter, "layerAdapters", {
|
|
17869
17867
|
GEOJSON: GeoJsonAdapter,
|
|
17870
17868
|
IMAGE: ImageAdapter,
|
|
17871
17869
|
TILE: TileAdapter,
|
|
@@ -17873,11 +17871,11 @@ var NgwLeaflet = (function () {
|
|
|
17873
17871
|
// // MVT: MvtAdapter,
|
|
17874
17872
|
OSM: OsmAdapter
|
|
17875
17873
|
});
|
|
17876
|
-
__publicField$
|
|
17874
|
+
__publicField$B(_LeafletMapAdapter, "controlAdapters", {
|
|
17877
17875
|
ZOOM: leafletSrcExports.Control.Zoom,
|
|
17878
17876
|
ATTRIBUTION: AttributionControl
|
|
17879
17877
|
});
|
|
17880
|
-
__publicField$
|
|
17878
|
+
__publicField$B(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
|
|
17881
17879
|
let LeafletMapAdapter = _LeafletMapAdapter;
|
|
17882
17880
|
|
|
17883
17881
|
const svgPath = {
|
|
@@ -17965,23 +17963,23 @@ var NgwLeaflet = (function () {
|
|
|
17965
17963
|
});
|
|
17966
17964
|
}
|
|
17967
17965
|
|
|
17968
|
-
var __defProp$
|
|
17969
|
-
var __getOwnPropSymbols$
|
|
17970
|
-
var __hasOwnProp$
|
|
17971
|
-
var __propIsEnum$
|
|
17972
|
-
var __defNormalProp$
|
|
17973
|
-
var __spreadValues$
|
|
17966
|
+
var __defProp$O = Object.defineProperty;
|
|
17967
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
17968
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
17969
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
17970
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17971
|
+
var __spreadValues$v = (a, b) => {
|
|
17974
17972
|
for (var prop in b || (b = {}))
|
|
17975
|
-
if (__hasOwnProp$
|
|
17976
|
-
__defNormalProp$
|
|
17977
|
-
if (__getOwnPropSymbols$
|
|
17978
|
-
for (var prop of __getOwnPropSymbols$
|
|
17979
|
-
if (__propIsEnum$
|
|
17980
|
-
__defNormalProp$
|
|
17973
|
+
if (__hasOwnProp$w.call(b, prop))
|
|
17974
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
17975
|
+
if (__getOwnPropSymbols$w)
|
|
17976
|
+
for (var prop of __getOwnPropSymbols$w(b)) {
|
|
17977
|
+
if (__propIsEnum$w.call(b, prop))
|
|
17978
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
17981
17979
|
}
|
|
17982
17980
|
return a;
|
|
17983
17981
|
};
|
|
17984
|
-
var __async$
|
|
17982
|
+
var __async$v = (__this, __arguments, generator) => {
|
|
17985
17983
|
return new Promise((resolve, reject) => {
|
|
17986
17984
|
var fulfilled = (value) => {
|
|
17987
17985
|
try {
|
|
@@ -18002,7 +18000,7 @@ var NgwLeaflet = (function () {
|
|
|
18002
18000
|
});
|
|
18003
18001
|
};
|
|
18004
18002
|
function apiRequest(opt) {
|
|
18005
|
-
return __async$
|
|
18003
|
+
return __async$v(this, null, function* () {
|
|
18006
18004
|
const { params, name, connector, requestOptions } = opt;
|
|
18007
18005
|
const apiItems = yield connector.connect();
|
|
18008
18006
|
let apiItem = apiItems && apiItems[name];
|
|
@@ -18040,7 +18038,7 @@ var NgwLeaflet = (function () {
|
|
|
18040
18038
|
}
|
|
18041
18039
|
}
|
|
18042
18040
|
if (url) {
|
|
18043
|
-
return connector.makeQuery(url, params, __spreadValues$
|
|
18041
|
+
return connector.makeQuery(url, params, __spreadValues$v({
|
|
18044
18042
|
cacheName: name
|
|
18045
18043
|
}, requestOptions));
|
|
18046
18044
|
} else {
|
|
@@ -18052,12 +18050,12 @@ var NgwLeaflet = (function () {
|
|
|
18052
18050
|
});
|
|
18053
18051
|
}
|
|
18054
18052
|
|
|
18055
|
-
var __defProp$
|
|
18056
|
-
var __defNormalProp$
|
|
18057
|
-
var __publicField$
|
|
18053
|
+
var __defProp$N = Object.defineProperty;
|
|
18054
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18055
|
+
var __publicField$A = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18058
18056
|
const _Cache = class _Cache {
|
|
18059
18057
|
constructor(options = {}) {
|
|
18060
|
-
__publicField$
|
|
18058
|
+
__publicField$A(this, "cache", []);
|
|
18061
18059
|
var _a;
|
|
18062
18060
|
const namespace = (_a = options.namespace) != null ? _a : "default";
|
|
18063
18061
|
if (_Cache.instance[namespace]) {
|
|
@@ -18188,12 +18186,12 @@ var NgwLeaflet = (function () {
|
|
|
18188
18186
|
return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
|
|
18189
18187
|
}
|
|
18190
18188
|
};
|
|
18191
|
-
__publicField$
|
|
18189
|
+
__publicField$A(_Cache, "instance", {});
|
|
18192
18190
|
let Cache = _Cache;
|
|
18193
18191
|
|
|
18194
18192
|
var pkg = {
|
|
18195
18193
|
name: "@nextgis/ngw-connector",
|
|
18196
|
-
version: "3.0.0-alpha.
|
|
18194
|
+
version: "3.0.0-alpha.17",
|
|
18197
18195
|
_priority: 12,
|
|
18198
18196
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
18199
18197
|
main: "index.js",
|
|
@@ -18202,15 +18200,15 @@ var NgwLeaflet = (function () {
|
|
|
18202
18200
|
jsdelivr: "lib/ngw-connector.global.prod.js",
|
|
18203
18201
|
types: "lib/index.d.ts",
|
|
18204
18202
|
dependencies: {
|
|
18205
|
-
"@nextgis/cache": "^3.0.0-alpha.
|
|
18206
|
-
"@nextgis/cancelable-promise": "^3.0.0-alpha.
|
|
18207
|
-
"@nextgis/utils": "^3.0.0-alpha.
|
|
18203
|
+
"@nextgis/cache": "^3.0.0-alpha.17",
|
|
18204
|
+
"@nextgis/cancelable-promise": "^3.0.0-alpha.17",
|
|
18205
|
+
"@nextgis/utils": "^3.0.0-alpha.17",
|
|
18208
18206
|
"@types/events": "^3.0.0",
|
|
18209
18207
|
events: "*",
|
|
18210
18208
|
"form-data": "^4.0.0"
|
|
18211
18209
|
},
|
|
18212
18210
|
devDependencies: {
|
|
18213
|
-
"@nextgis/build-tools": "^3.0.0-alpha.
|
|
18211
|
+
"@nextgis/build-tools": "^3.0.0-alpha.17"
|
|
18214
18212
|
},
|
|
18215
18213
|
scripts: {
|
|
18216
18214
|
clean: "rimraf ./lib",
|
|
@@ -18257,46 +18255,46 @@ var NgwLeaflet = (function () {
|
|
|
18257
18255
|
}
|
|
18258
18256
|
}
|
|
18259
18257
|
|
|
18260
|
-
var __defProp$
|
|
18261
|
-
var __defNormalProp$
|
|
18262
|
-
var __publicField$
|
|
18258
|
+
var __defProp$M = Object.defineProperty;
|
|
18259
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18260
|
+
var __publicField$z = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18263
18261
|
class NgwError extends Error {
|
|
18264
18262
|
constructor(er) {
|
|
18265
18263
|
super();
|
|
18266
|
-
__publicField$
|
|
18267
|
-
__publicField$
|
|
18268
|
-
__publicField$
|
|
18269
|
-
__publicField$
|
|
18270
|
-
__publicField$
|
|
18271
|
-
__publicField$
|
|
18272
|
-
__publicField$
|
|
18273
|
-
__publicField$
|
|
18264
|
+
__publicField$z(this, "name", "NgwError");
|
|
18265
|
+
__publicField$z(this, "title");
|
|
18266
|
+
__publicField$z(this, "message");
|
|
18267
|
+
__publicField$z(this, "detail");
|
|
18268
|
+
__publicField$z(this, "exception");
|
|
18269
|
+
__publicField$z(this, "status_code");
|
|
18270
|
+
__publicField$z(this, "data");
|
|
18271
|
+
__publicField$z(this, "guru_meditation");
|
|
18274
18272
|
Object.assign(this, er);
|
|
18275
18273
|
Object.setPrototypeOf(this, NgwError.prototype);
|
|
18276
18274
|
}
|
|
18277
18275
|
}
|
|
18278
18276
|
|
|
18279
|
-
var __defProp$
|
|
18280
|
-
var __defNormalProp$
|
|
18281
|
-
var __publicField$
|
|
18277
|
+
var __defProp$L = Object.defineProperty;
|
|
18278
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18279
|
+
var __publicField$y = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18282
18280
|
class InsufficientPermissionsError extends NgwError {
|
|
18283
18281
|
constructor(obj) {
|
|
18284
18282
|
super(obj);
|
|
18285
|
-
__publicField$
|
|
18286
|
-
__publicField$
|
|
18283
|
+
__publicField$y(this, "name", "InsufficientPermissionsError");
|
|
18284
|
+
__publicField$y(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
|
|
18287
18285
|
Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
|
|
18288
18286
|
}
|
|
18289
18287
|
}
|
|
18290
18288
|
|
|
18291
|
-
var __defProp$
|
|
18292
|
-
var __defNormalProp$
|
|
18293
|
-
var __publicField$
|
|
18289
|
+
var __defProp$K = Object.defineProperty;
|
|
18290
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18291
|
+
var __publicField$x = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18294
18292
|
let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
|
|
18295
18293
|
constructor(obj) {
|
|
18296
18294
|
super(obj);
|
|
18297
|
-
__publicField$
|
|
18298
|
-
__publicField$
|
|
18299
|
-
__publicField$
|
|
18295
|
+
__publicField$x(this, "message", "There is no response from the server or problem connecting to server.");
|
|
18296
|
+
__publicField$x(this, "title", "Network error");
|
|
18297
|
+
__publicField$x(this, "detail", "Check network connectivity and try again later.");
|
|
18300
18298
|
Object.setPrototypeOf(this, NetworksResponseError.prototype);
|
|
18301
18299
|
}
|
|
18302
18300
|
};
|
|
@@ -18333,27 +18331,27 @@ var NgwLeaflet = (function () {
|
|
|
18333
18331
|
return false;
|
|
18334
18332
|
}
|
|
18335
18333
|
|
|
18336
|
-
var __defProp$
|
|
18337
|
-
var __defNormalProp$
|
|
18338
|
-
var __publicField$
|
|
18334
|
+
var __defProp$J = Object.defineProperty;
|
|
18335
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18336
|
+
var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, key + "" , value);
|
|
18339
18337
|
class NetworkError extends Error {
|
|
18340
18338
|
constructor(url) {
|
|
18341
18339
|
super();
|
|
18342
|
-
__publicField$
|
|
18340
|
+
__publicField$w(this, "name", "NetworkError");
|
|
18343
18341
|
Object.setPrototypeOf(this, NetworkError.prototype);
|
|
18344
18342
|
this.message = `Unable to request ${url}.
|
|
18345
18343
|
Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
|
|
18346
18344
|
}
|
|
18347
18345
|
}
|
|
18348
18346
|
|
|
18349
|
-
var __defProp$
|
|
18350
|
-
var __defNormalProp$
|
|
18351
|
-
var __publicField$
|
|
18347
|
+
var __defProp$I = Object.defineProperty;
|
|
18348
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18349
|
+
var __publicField$v = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18352
18350
|
class ResourceNotFoundError extends NgwError {
|
|
18353
18351
|
constructor(obj) {
|
|
18354
18352
|
super(obj);
|
|
18355
|
-
__publicField$
|
|
18356
|
-
__publicField$
|
|
18353
|
+
__publicField$v(this, "name", "ResourceNotFoundError");
|
|
18354
|
+
__publicField$v(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
|
|
18357
18355
|
Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
|
|
18358
18356
|
}
|
|
18359
18357
|
}
|
|
@@ -18370,13 +18368,13 @@ var NgwLeaflet = (function () {
|
|
|
18370
18368
|
isError: isError
|
|
18371
18369
|
});
|
|
18372
18370
|
|
|
18373
|
-
var __defProp$
|
|
18374
|
-
var __defNormalProp$
|
|
18375
|
-
var __publicField$
|
|
18371
|
+
var __defProp$H = Object.defineProperty;
|
|
18372
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18373
|
+
var __publicField$u = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18376
18374
|
class BaseAPIError extends Error {
|
|
18377
18375
|
constructor(message) {
|
|
18378
18376
|
super(message || "Something went wrong.");
|
|
18379
|
-
__publicField$
|
|
18377
|
+
__publicField$u(this, "title");
|
|
18380
18378
|
this.name = "BaseAPIError";
|
|
18381
18379
|
this.title = "Unknown API error";
|
|
18382
18380
|
if (Error.captureStackTrace) {
|
|
@@ -18388,7 +18386,7 @@ var NgwLeaflet = (function () {
|
|
|
18388
18386
|
// prettier-ignore
|
|
18389
18387
|
constructor(message) {
|
|
18390
18388
|
super(message || "There is no response from the server or problem connecting to server.");
|
|
18391
|
-
__publicField$
|
|
18389
|
+
__publicField$u(this, "detail");
|
|
18392
18390
|
this.title = "Network error";
|
|
18393
18391
|
this.detail = "Check network connectivity and try again later.";
|
|
18394
18392
|
}
|
|
@@ -18402,8 +18400,8 @@ var NgwLeaflet = (function () {
|
|
|
18402
18400
|
class ServerResponseError extends BaseAPIError {
|
|
18403
18401
|
constructor(data) {
|
|
18404
18402
|
super(data.message);
|
|
18405
|
-
__publicField$
|
|
18406
|
-
__publicField$
|
|
18403
|
+
__publicField$u(this, "detail");
|
|
18404
|
+
__publicField$u(this, "data");
|
|
18407
18405
|
this.title = data.title || this.title;
|
|
18408
18406
|
this.detail = data.detail || null;
|
|
18409
18407
|
this.data = data;
|
|
@@ -18413,8 +18411,8 @@ var NgwLeaflet = (function () {
|
|
|
18413
18411
|
// prettier-ignore
|
|
18414
18412
|
constructor(message, data = {}) {
|
|
18415
18413
|
super(message || "Unexpected error while processing long-running request.");
|
|
18416
|
-
__publicField$
|
|
18417
|
-
__publicField$
|
|
18414
|
+
__publicField$u(this, "title");
|
|
18415
|
+
__publicField$u(this, "data");
|
|
18418
18416
|
this.name = "LunkwillError";
|
|
18419
18417
|
this.title = "Long-running request error";
|
|
18420
18418
|
this.data = data;
|
|
@@ -18434,35 +18432,35 @@ var NgwLeaflet = (function () {
|
|
|
18434
18432
|
}
|
|
18435
18433
|
}
|
|
18436
18434
|
|
|
18437
|
-
var __defProp$
|
|
18438
|
-
var __getOwnPropSymbols$
|
|
18439
|
-
var __hasOwnProp$
|
|
18440
|
-
var __propIsEnum$
|
|
18441
|
-
var __defNormalProp$
|
|
18442
|
-
var __spreadValues$
|
|
18435
|
+
var __defProp$G = Object.defineProperty;
|
|
18436
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
18437
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
18438
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
18439
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18440
|
+
var __spreadValues$u = (a, b) => {
|
|
18443
18441
|
for (var prop in b || (b = {}))
|
|
18444
|
-
if (__hasOwnProp$
|
|
18445
|
-
__defNormalProp$
|
|
18446
|
-
if (__getOwnPropSymbols$
|
|
18447
|
-
for (var prop of __getOwnPropSymbols$
|
|
18448
|
-
if (__propIsEnum$
|
|
18449
|
-
__defNormalProp$
|
|
18442
|
+
if (__hasOwnProp$v.call(b, prop))
|
|
18443
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
18444
|
+
if (__getOwnPropSymbols$v)
|
|
18445
|
+
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
18446
|
+
if (__propIsEnum$v.call(b, prop))
|
|
18447
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
18450
18448
|
}
|
|
18451
18449
|
return a;
|
|
18452
18450
|
};
|
|
18453
18451
|
var __objRest$5 = (source, exclude) => {
|
|
18454
18452
|
var target = {};
|
|
18455
18453
|
for (var prop in source)
|
|
18456
|
-
if (__hasOwnProp$
|
|
18454
|
+
if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
18457
18455
|
target[prop] = source[prop];
|
|
18458
|
-
if (source != null && __getOwnPropSymbols$
|
|
18459
|
-
for (var prop of __getOwnPropSymbols$
|
|
18460
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
18456
|
+
if (source != null && __getOwnPropSymbols$v)
|
|
18457
|
+
for (var prop of __getOwnPropSymbols$v(source)) {
|
|
18458
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
|
|
18461
18459
|
target[prop] = source[prop];
|
|
18462
18460
|
}
|
|
18463
18461
|
return target;
|
|
18464
18462
|
};
|
|
18465
|
-
var __async$
|
|
18463
|
+
var __async$u = (__this, __arguments, generator) => {
|
|
18466
18464
|
return new Promise((resolve, reject) => {
|
|
18467
18465
|
var fulfilled = (value) => {
|
|
18468
18466
|
try {
|
|
@@ -18487,7 +18485,7 @@ var NgwLeaflet = (function () {
|
|
|
18487
18485
|
return ct !== void 0 && ct !== null && ct.includes("application/vnd.lunkwill.request-summary+json");
|
|
18488
18486
|
}
|
|
18489
18487
|
function responseJson(response) {
|
|
18490
|
-
return __async$
|
|
18488
|
+
return __async$u(this, null, function* () {
|
|
18491
18489
|
try {
|
|
18492
18490
|
return response.json();
|
|
18493
18491
|
} catch (e) {
|
|
@@ -18496,7 +18494,7 @@ var NgwLeaflet = (function () {
|
|
|
18496
18494
|
});
|
|
18497
18495
|
}
|
|
18498
18496
|
function lunkwillResponseUrl(lwResp) {
|
|
18499
|
-
return __async$
|
|
18497
|
+
return __async$u(this, null, function* () {
|
|
18500
18498
|
const lwData = yield responseJson(lwResp);
|
|
18501
18499
|
let delay = lwData.delay_ms;
|
|
18502
18500
|
const retry = lwData.retry_ms !== void 0 ? lwData.retry_ms : 2e3;
|
|
@@ -18540,7 +18538,7 @@ var NgwLeaflet = (function () {
|
|
|
18540
18538
|
});
|
|
18541
18539
|
}
|
|
18542
18540
|
function lunkwillFetch(lwRespUrl) {
|
|
18543
|
-
return __async$
|
|
18541
|
+
return __async$u(this, null, function* () {
|
|
18544
18542
|
try {
|
|
18545
18543
|
return yield window.fetch(lwRespUrl, { credentials: "same-origin" });
|
|
18546
18544
|
} catch (e) {
|
|
@@ -18588,14 +18586,14 @@ var NgwLeaflet = (function () {
|
|
|
18588
18586
|
return path + urlParams;
|
|
18589
18587
|
}
|
|
18590
18588
|
function request(path, options, cacheEngine) {
|
|
18591
|
-
return __async$
|
|
18589
|
+
return __async$u(this, null, function* () {
|
|
18592
18590
|
var _b, _c;
|
|
18593
18591
|
const defaults = {
|
|
18594
18592
|
method: "GET",
|
|
18595
18593
|
credentials: "same-origin",
|
|
18596
18594
|
headers: {}
|
|
18597
18595
|
};
|
|
18598
|
-
const _a = __spreadValues$
|
|
18596
|
+
const _a = __spreadValues$u(__spreadValues$u({}, defaults), options), {
|
|
18599
18597
|
withCredentials,
|
|
18600
18598
|
responseType,
|
|
18601
18599
|
cacheProps,
|
|
@@ -18632,7 +18630,7 @@ var NgwLeaflet = (function () {
|
|
|
18632
18630
|
opt.headers = headers;
|
|
18633
18631
|
}
|
|
18634
18632
|
const url = generateUrl(path, query);
|
|
18635
|
-
const makeRequest = () => __async$
|
|
18633
|
+
const makeRequest = () => __async$u(this, null, function* () {
|
|
18636
18634
|
let response;
|
|
18637
18635
|
try {
|
|
18638
18636
|
response = yield fetch(url, opt);
|
|
@@ -18675,7 +18673,7 @@ var NgwLeaflet = (function () {
|
|
|
18675
18673
|
if (cacheEngine) {
|
|
18676
18674
|
if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
|
|
18677
18675
|
if (cache !== false) {
|
|
18678
|
-
const props = cacheProps ? cacheProps : __spreadValues$
|
|
18676
|
+
const props = cacheProps ? cacheProps : __spreadValues$u({}, objectRemoveEmpty({
|
|
18679
18677
|
withCredentials,
|
|
18680
18678
|
responseType
|
|
18681
18679
|
}));
|
|
@@ -18695,38 +18693,38 @@ var NgwLeaflet = (function () {
|
|
|
18695
18693
|
});
|
|
18696
18694
|
}
|
|
18697
18695
|
|
|
18698
|
-
var __defProp$
|
|
18699
|
-
var __defProps$
|
|
18700
|
-
var __getOwnPropDescs$
|
|
18701
|
-
var __getOwnPropSymbols$
|
|
18702
|
-
var __hasOwnProp$
|
|
18703
|
-
var __propIsEnum$
|
|
18704
|
-
var __defNormalProp$
|
|
18705
|
-
var __spreadValues$
|
|
18696
|
+
var __defProp$F = Object.defineProperty;
|
|
18697
|
+
var __defProps$k = Object.defineProperties;
|
|
18698
|
+
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
18699
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
18700
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
18701
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
18702
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18703
|
+
var __spreadValues$t = (a, b) => {
|
|
18706
18704
|
for (var prop in b || (b = {}))
|
|
18707
|
-
if (__hasOwnProp$
|
|
18708
|
-
__defNormalProp$
|
|
18709
|
-
if (__getOwnPropSymbols$
|
|
18710
|
-
for (var prop of __getOwnPropSymbols$
|
|
18711
|
-
if (__propIsEnum$
|
|
18712
|
-
__defNormalProp$
|
|
18705
|
+
if (__hasOwnProp$u.call(b, prop))
|
|
18706
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
18707
|
+
if (__getOwnPropSymbols$u)
|
|
18708
|
+
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
18709
|
+
if (__propIsEnum$u.call(b, prop))
|
|
18710
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
18713
18711
|
}
|
|
18714
18712
|
return a;
|
|
18715
18713
|
};
|
|
18716
|
-
var __spreadProps$
|
|
18714
|
+
var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
|
|
18717
18715
|
var __objRest$4 = (source, exclude) => {
|
|
18718
18716
|
var target = {};
|
|
18719
18717
|
for (var prop in source)
|
|
18720
|
-
if (__hasOwnProp$
|
|
18718
|
+
if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
18721
18719
|
target[prop] = source[prop];
|
|
18722
|
-
if (source != null && __getOwnPropSymbols$
|
|
18723
|
-
for (var prop of __getOwnPropSymbols$
|
|
18724
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
18720
|
+
if (source != null && __getOwnPropSymbols$u)
|
|
18721
|
+
for (var prop of __getOwnPropSymbols$u(source)) {
|
|
18722
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
|
|
18725
18723
|
target[prop] = source[prop];
|
|
18726
18724
|
}
|
|
18727
18725
|
return target;
|
|
18728
18726
|
};
|
|
18729
|
-
var __async$
|
|
18727
|
+
var __async$t = (__this, __arguments, generator) => {
|
|
18730
18728
|
return new Promise((resolve, reject) => {
|
|
18731
18729
|
var fulfilled = (value) => {
|
|
18732
18730
|
try {
|
|
@@ -18777,7 +18775,7 @@ var NgwLeaflet = (function () {
|
|
|
18777
18775
|
}
|
|
18778
18776
|
function route(name, connector, ...rest) {
|
|
18779
18777
|
const result = {
|
|
18780
|
-
url: (opt) => __async$
|
|
18778
|
+
url: (opt) => __async$t(this, null, function* () {
|
|
18781
18779
|
var _a;
|
|
18782
18780
|
const routeData = yield connector.connect();
|
|
18783
18781
|
const template = routeURL(
|
|
@@ -18805,10 +18803,10 @@ var NgwLeaflet = (function () {
|
|
|
18805
18803
|
routeData,
|
|
18806
18804
|
...rest
|
|
18807
18805
|
);
|
|
18808
|
-
const headers = objectRemoveEmpty(__spreadValues$
|
|
18806
|
+
const headers = objectRemoveEmpty(__spreadValues$t(__spreadValues$t({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
|
|
18809
18807
|
return request(
|
|
18810
18808
|
template,
|
|
18811
|
-
__spreadProps$
|
|
18809
|
+
__spreadProps$k(__spreadValues$t({
|
|
18812
18810
|
headers
|
|
18813
18811
|
}, restOpt), {
|
|
18814
18812
|
method
|
|
@@ -18932,39 +18930,39 @@ var NgwLeaflet = (function () {
|
|
|
18932
18930
|
}
|
|
18933
18931
|
}
|
|
18934
18932
|
|
|
18935
|
-
var __defProp$
|
|
18936
|
-
var __defProps$
|
|
18937
|
-
var __getOwnPropDescs$
|
|
18938
|
-
var __getOwnPropSymbols$
|
|
18939
|
-
var __hasOwnProp$
|
|
18940
|
-
var __propIsEnum$
|
|
18941
|
-
var __defNormalProp$
|
|
18942
|
-
var __spreadValues$
|
|
18933
|
+
var __defProp$E = Object.defineProperty;
|
|
18934
|
+
var __defProps$j = Object.defineProperties;
|
|
18935
|
+
var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
|
|
18936
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
18937
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
18938
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
18939
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18940
|
+
var __spreadValues$s = (a, b) => {
|
|
18943
18941
|
for (var prop in b || (b = {}))
|
|
18944
|
-
if (__hasOwnProp$
|
|
18945
|
-
__defNormalProp$
|
|
18946
|
-
if (__getOwnPropSymbols$
|
|
18947
|
-
for (var prop of __getOwnPropSymbols$
|
|
18948
|
-
if (__propIsEnum$
|
|
18949
|
-
__defNormalProp$
|
|
18942
|
+
if (__hasOwnProp$t.call(b, prop))
|
|
18943
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
18944
|
+
if (__getOwnPropSymbols$t)
|
|
18945
|
+
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
18946
|
+
if (__propIsEnum$t.call(b, prop))
|
|
18947
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
18950
18948
|
}
|
|
18951
18949
|
return a;
|
|
18952
18950
|
};
|
|
18953
|
-
var __spreadProps$
|
|
18951
|
+
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
|
|
18954
18952
|
var __objRest$3 = (source, exclude) => {
|
|
18955
18953
|
var target = {};
|
|
18956
18954
|
for (var prop in source)
|
|
18957
|
-
if (__hasOwnProp$
|
|
18955
|
+
if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
18958
18956
|
target[prop] = source[prop];
|
|
18959
|
-
if (source != null && __getOwnPropSymbols$
|
|
18960
|
-
for (var prop of __getOwnPropSymbols$
|
|
18961
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
18957
|
+
if (source != null && __getOwnPropSymbols$t)
|
|
18958
|
+
for (var prop of __getOwnPropSymbols$t(source)) {
|
|
18959
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
|
|
18962
18960
|
target[prop] = source[prop];
|
|
18963
18961
|
}
|
|
18964
18962
|
return target;
|
|
18965
18963
|
};
|
|
18966
|
-
var __publicField$
|
|
18967
|
-
var __async$
|
|
18964
|
+
var __publicField$t = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18965
|
+
var __async$s = (__this, __arguments, generator) => {
|
|
18968
18966
|
return new Promise((resolve, reject) => {
|
|
18969
18967
|
var fulfilled = (value) => {
|
|
18970
18968
|
try {
|
|
@@ -18989,18 +18987,18 @@ var NgwLeaflet = (function () {
|
|
|
18989
18987
|
class NgwConnector {
|
|
18990
18988
|
constructor(options) {
|
|
18991
18989
|
this.options = options;
|
|
18992
|
-
__publicField$
|
|
18993
|
-
__publicField$
|
|
18994
|
-
__publicField$
|
|
18995
|
-
__publicField$
|
|
18996
|
-
__publicField$
|
|
18990
|
+
__publicField$t(this, "id", ID$2++);
|
|
18991
|
+
__publicField$t(this, "emitter", new EventEmitter());
|
|
18992
|
+
__publicField$t(this, "user");
|
|
18993
|
+
__publicField$t(this, "cache");
|
|
18994
|
+
__publicField$t(this, "withCredentials");
|
|
18997
18995
|
// Dedicated cache for route requests, as these are executed before any other requests.
|
|
18998
18996
|
// This cache does not need to be cleared during the session.
|
|
18999
|
-
__publicField$
|
|
19000
|
-
__publicField$
|
|
19001
|
-
__publicField$
|
|
19002
|
-
__publicField$
|
|
19003
|
-
__publicField$
|
|
18997
|
+
__publicField$t(this, "routeCache");
|
|
18998
|
+
__publicField$t(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
|
|
18999
|
+
__publicField$t(this, "routeStr", "/api/component/pyramid/route");
|
|
19000
|
+
__publicField$t(this, "activeRequests", {});
|
|
19001
|
+
__publicField$t(this, "requestTransform");
|
|
19004
19002
|
const exist = findConnector(options);
|
|
19005
19003
|
this.cache = new Cache({ namespace: options.cacheId });
|
|
19006
19004
|
this.routeCache = new Cache({ namespace: "routecache" });
|
|
@@ -19053,7 +19051,7 @@ var NgwLeaflet = (function () {
|
|
|
19053
19051
|
* ```
|
|
19054
19052
|
*/
|
|
19055
19053
|
connect() {
|
|
19056
|
-
return __async$
|
|
19054
|
+
return __async$s(this, arguments, function* ({
|
|
19057
19055
|
signal
|
|
19058
19056
|
} = {}) {
|
|
19059
19057
|
const auth = this.options.auth;
|
|
@@ -19092,14 +19090,14 @@ var NgwLeaflet = (function () {
|
|
|
19092
19090
|
this.emitter.emit("logout");
|
|
19093
19091
|
}
|
|
19094
19092
|
getUserInfo(credentials, options) {
|
|
19095
|
-
return __async$
|
|
19093
|
+
return __async$s(this, null, function* () {
|
|
19096
19094
|
if (this.user && this.user.id) {
|
|
19097
19095
|
return this.user;
|
|
19098
19096
|
}
|
|
19099
19097
|
if (credentials) {
|
|
19100
19098
|
this.options.auth = credentials;
|
|
19101
19099
|
}
|
|
19102
|
-
const options_ = __spreadValues$
|
|
19100
|
+
const options_ = __spreadValues$s({
|
|
19103
19101
|
headers: this.getAuthorizationHeaders(credentials),
|
|
19104
19102
|
cache: true
|
|
19105
19103
|
}, options);
|
|
@@ -19140,7 +19138,7 @@ var NgwLeaflet = (function () {
|
|
|
19140
19138
|
this.activeRequests = {};
|
|
19141
19139
|
}
|
|
19142
19140
|
getActiveApiRequests() {
|
|
19143
|
-
return __spreadValues$
|
|
19141
|
+
return __spreadValues$s({}, this.activeRequests);
|
|
19144
19142
|
}
|
|
19145
19143
|
route(name, ...rest) {
|
|
19146
19144
|
return route(name, this, ...rest);
|
|
@@ -19152,7 +19150,7 @@ var NgwLeaflet = (function () {
|
|
|
19152
19150
|
* @param options - Request options
|
|
19153
19151
|
*/
|
|
19154
19152
|
makeQuery(_0, _1) {
|
|
19155
|
-
return __async$
|
|
19153
|
+
return __async$s(this, arguments, function* (url, params, options = {}) {
|
|
19156
19154
|
var _b;
|
|
19157
19155
|
url = (this.options.baseUrl ? this.options.baseUrl : "") + url;
|
|
19158
19156
|
if (!url) {
|
|
@@ -19163,7 +19161,7 @@ var NgwLeaflet = (function () {
|
|
|
19163
19161
|
url = template(url, restParams);
|
|
19164
19162
|
}
|
|
19165
19163
|
url = encodeURI(fixUrlStr(url));
|
|
19166
|
-
options = __spreadValues$
|
|
19164
|
+
options = __spreadValues$s({ withCredentials: this.withCredentials }, options);
|
|
19167
19165
|
const {
|
|
19168
19166
|
cache,
|
|
19169
19167
|
signal: externalSignal,
|
|
@@ -19185,7 +19183,7 @@ var NgwLeaflet = (function () {
|
|
|
19185
19183
|
});
|
|
19186
19184
|
}
|
|
19187
19185
|
options.signal = internalSignal;
|
|
19188
|
-
const createPromise = () => __async$
|
|
19186
|
+
const createPromise = () => __async$s(this, null, function* () {
|
|
19189
19187
|
const id = REQUEST_ID++;
|
|
19190
19188
|
this.activeRequests[id] = internalAbortController;
|
|
19191
19189
|
try {
|
|
@@ -19195,7 +19193,7 @@ var NgwLeaflet = (function () {
|
|
|
19195
19193
|
}
|
|
19196
19194
|
});
|
|
19197
19195
|
if (method === "GET" && cache !== false) {
|
|
19198
|
-
const cacheOptions = cacheProps ? cacheProps : __spreadProps$
|
|
19196
|
+
const cacheOptions = cacheProps ? cacheProps : __spreadProps$j(__spreadValues$s({}, objectRemoveEmpty({
|
|
19199
19197
|
headers,
|
|
19200
19198
|
withCredentials,
|
|
19201
19199
|
responseType,
|
|
@@ -19218,7 +19216,7 @@ var NgwLeaflet = (function () {
|
|
|
19218
19216
|
var _a;
|
|
19219
19217
|
if (this.user) {
|
|
19220
19218
|
options = options || {};
|
|
19221
|
-
options.headers = __spreadValues$
|
|
19219
|
+
options.headers = __spreadValues$s(__spreadValues$s({}, this.getAuthorizationHeaders()), options.headers);
|
|
19222
19220
|
}
|
|
19223
19221
|
if (this.requestTransform) {
|
|
19224
19222
|
const [transUrl, transOptions] = this.requestTransform(url, options);
|
|
@@ -19249,7 +19247,7 @@ var NgwLeaflet = (function () {
|
|
|
19249
19247
|
});
|
|
19250
19248
|
}
|
|
19251
19249
|
_login(credentials, options) {
|
|
19252
|
-
return __async$
|
|
19250
|
+
return __async$s(this, null, function* () {
|
|
19253
19251
|
try {
|
|
19254
19252
|
const data = yield this.getUserInfo(credentials, options);
|
|
19255
19253
|
this.user = data;
|
|
@@ -19277,7 +19275,7 @@ var NgwLeaflet = (function () {
|
|
|
19277
19275
|
return er;
|
|
19278
19276
|
}
|
|
19279
19277
|
}
|
|
19280
|
-
__publicField$
|
|
19278
|
+
__publicField$t(NgwConnector, "errors", errors);
|
|
19281
19279
|
|
|
19282
19280
|
function resourceCompare(res1, res2) {
|
|
19283
19281
|
return objectDeepEqual(res1, res2);
|
|
@@ -19307,27 +19305,27 @@ var NgwLeaflet = (function () {
|
|
|
19307
19305
|
return query;
|
|
19308
19306
|
}
|
|
19309
19307
|
|
|
19310
|
-
var __defProp$
|
|
19311
|
-
var __defProps$
|
|
19312
|
-
var __getOwnPropDescs$
|
|
19313
|
-
var __getOwnPropSymbols$
|
|
19314
|
-
var __hasOwnProp$
|
|
19315
|
-
var __propIsEnum$
|
|
19316
|
-
var __defNormalProp$
|
|
19317
|
-
var __spreadValues$
|
|
19308
|
+
var __defProp$D = Object.defineProperty;
|
|
19309
|
+
var __defProps$i = Object.defineProperties;
|
|
19310
|
+
var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
|
|
19311
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
19312
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
19313
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
19314
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19315
|
+
var __spreadValues$r = (a, b) => {
|
|
19318
19316
|
for (var prop in b || (b = {}))
|
|
19319
|
-
if (__hasOwnProp$
|
|
19320
|
-
__defNormalProp$
|
|
19321
|
-
if (__getOwnPropSymbols$
|
|
19322
|
-
for (var prop of __getOwnPropSymbols$
|
|
19323
|
-
if (__propIsEnum$
|
|
19324
|
-
__defNormalProp$
|
|
19317
|
+
if (__hasOwnProp$s.call(b, prop))
|
|
19318
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
19319
|
+
if (__getOwnPropSymbols$s)
|
|
19320
|
+
for (var prop of __getOwnPropSymbols$s(b)) {
|
|
19321
|
+
if (__propIsEnum$s.call(b, prop))
|
|
19322
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
19325
19323
|
}
|
|
19326
19324
|
return a;
|
|
19327
19325
|
};
|
|
19328
|
-
var __spreadProps$
|
|
19329
|
-
var __publicField$
|
|
19330
|
-
var __async$
|
|
19326
|
+
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
19327
|
+
var __publicField$s = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19328
|
+
var __async$r = (__this, __arguments, generator) => {
|
|
19331
19329
|
return new Promise((resolve, reject) => {
|
|
19332
19330
|
var fulfilled = (value) => {
|
|
19333
19331
|
try {
|
|
@@ -19352,8 +19350,8 @@ var NgwLeaflet = (function () {
|
|
|
19352
19350
|
connector,
|
|
19353
19351
|
cacheId
|
|
19354
19352
|
}) {
|
|
19355
|
-
__publicField$
|
|
19356
|
-
__publicField$
|
|
19353
|
+
__publicField$s(this, "cache");
|
|
19354
|
+
__publicField$s(this, "connector");
|
|
19357
19355
|
this.connector = connector;
|
|
19358
19356
|
this.cache = new Cache({ namespace: cacheId });
|
|
19359
19357
|
}
|
|
@@ -19368,7 +19366,7 @@ var NgwLeaflet = (function () {
|
|
|
19368
19366
|
* Fetching resource would be cached to speed up next call
|
|
19369
19367
|
*/
|
|
19370
19368
|
getOne(resource, requestOptions) {
|
|
19371
|
-
const opt = __spreadValues$
|
|
19369
|
+
const opt = __spreadValues$r({}, requestOptions);
|
|
19372
19370
|
if (typeof resource === "string") ; else if (typeof resource === "number") ; else if (isObject(resource)) {
|
|
19373
19371
|
if (resource.id !== void 0) {
|
|
19374
19372
|
resource.id;
|
|
@@ -19445,8 +19443,8 @@ var NgwLeaflet = (function () {
|
|
|
19445
19443
|
} else {
|
|
19446
19444
|
Object.assign(query, resourceToQuery(resource));
|
|
19447
19445
|
}
|
|
19448
|
-
return this.connector.route("resource.search").get(__spreadProps$
|
|
19449
|
-
query: __spreadValues$
|
|
19446
|
+
return this.connector.route("resource.search").get(__spreadProps$i(__spreadValues$r({}, requestOptions), {
|
|
19447
|
+
query: __spreadValues$r({
|
|
19450
19448
|
serialization: "full"
|
|
19451
19449
|
}, query)
|
|
19452
19450
|
})).then((resources) => {
|
|
@@ -19499,7 +19497,7 @@ var NgwLeaflet = (function () {
|
|
|
19499
19497
|
});
|
|
19500
19498
|
}
|
|
19501
19499
|
_getChildrenOf(_0, _1) {
|
|
19502
|
-
return __async$
|
|
19500
|
+
return __async$r(this, arguments, function* (parentDef, requestOptions, _items = []) {
|
|
19503
19501
|
let parent = void 0;
|
|
19504
19502
|
if (typeof parentDef === "string") {
|
|
19505
19503
|
parent = yield this.getId(parentDef, requestOptions);
|
|
@@ -19508,7 +19506,7 @@ var NgwLeaflet = (function () {
|
|
|
19508
19506
|
} else {
|
|
19509
19507
|
parent = parentDef;
|
|
19510
19508
|
}
|
|
19511
|
-
const items = yield this.connector.route("resource.collection").get(__spreadProps$
|
|
19509
|
+
const items = yield this.connector.route("resource.collection").get(__spreadProps$i(__spreadValues$r({}, requestOptions), {
|
|
19512
19510
|
query: {
|
|
19513
19511
|
parent
|
|
19514
19512
|
}
|
|
@@ -19536,7 +19534,7 @@ var NgwLeaflet = (function () {
|
|
|
19536
19534
|
});
|
|
19537
19535
|
}
|
|
19538
19536
|
_cleanResourceItemCache(id) {
|
|
19539
|
-
return __async$
|
|
19537
|
+
return __async$r(this, null, function* () {
|
|
19540
19538
|
var _a;
|
|
19541
19539
|
const all = this.cache.all();
|
|
19542
19540
|
const toDelete = [];
|
|
@@ -19589,13 +19587,13 @@ var NgwLeaflet = (function () {
|
|
|
19589
19587
|
}
|
|
19590
19588
|
}
|
|
19591
19589
|
|
|
19592
|
-
var __defProp$
|
|
19593
|
-
var __defNormalProp$
|
|
19594
|
-
var __publicField$
|
|
19590
|
+
var __defProp$C = Object.defineProperty;
|
|
19591
|
+
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19592
|
+
var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, key + "" , value);
|
|
19595
19593
|
class NgwConnectorExtended extends NgwConnector {
|
|
19596
19594
|
constructor(options) {
|
|
19597
19595
|
super(options);
|
|
19598
|
-
__publicField$
|
|
19596
|
+
__publicField$r(this, "resources");
|
|
19599
19597
|
this.resources = new ResourcesControl({
|
|
19600
19598
|
connector: this,
|
|
19601
19599
|
cacheId: options.cacheId
|
|
@@ -19805,25 +19803,25 @@ var NgwLeaflet = (function () {
|
|
|
19805
19803
|
}
|
|
19806
19804
|
}
|
|
19807
19805
|
|
|
19808
|
-
var __defProp$
|
|
19809
|
-
var __defProps$
|
|
19810
|
-
var __getOwnPropDescs$
|
|
19811
|
-
var __getOwnPropSymbols$
|
|
19812
|
-
var __hasOwnProp$
|
|
19813
|
-
var __propIsEnum$
|
|
19814
|
-
var __defNormalProp$
|
|
19815
|
-
var __spreadValues$
|
|
19806
|
+
var __defProp$B = Object.defineProperty;
|
|
19807
|
+
var __defProps$h = Object.defineProperties;
|
|
19808
|
+
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
19809
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
19810
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
19811
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
19812
|
+
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19813
|
+
var __spreadValues$q = (a, b) => {
|
|
19816
19814
|
for (var prop in b || (b = {}))
|
|
19817
|
-
if (__hasOwnProp$
|
|
19818
|
-
__defNormalProp$
|
|
19819
|
-
if (__getOwnPropSymbols$
|
|
19820
|
-
for (var prop of __getOwnPropSymbols$
|
|
19821
|
-
if (__propIsEnum$
|
|
19822
|
-
__defNormalProp$
|
|
19815
|
+
if (__hasOwnProp$r.call(b, prop))
|
|
19816
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
19817
|
+
if (__getOwnPropSymbols$r)
|
|
19818
|
+
for (var prop of __getOwnPropSymbols$r(b)) {
|
|
19819
|
+
if (__propIsEnum$r.call(b, prop))
|
|
19820
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
19823
19821
|
}
|
|
19824
19822
|
return a;
|
|
19825
19823
|
};
|
|
19826
|
-
var __spreadProps$
|
|
19824
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
19827
19825
|
function getNgwWebmapExtent(webmap) {
|
|
19828
19826
|
const bottom = webmap["extent_bottom"];
|
|
19829
19827
|
const left = webmap["extent_left"];
|
|
@@ -19865,7 +19863,7 @@ var NgwLeaflet = (function () {
|
|
|
19865
19863
|
id: Number(resourceId),
|
|
19866
19864
|
fid: featureId
|
|
19867
19865
|
}).get({ cache, signal }).then((resp) => {
|
|
19868
|
-
if (resp) {
|
|
19866
|
+
if (resp && resp.extent) {
|
|
19869
19867
|
const { maxLat, maxLon, minLat, minLon } = resp.extent;
|
|
19870
19868
|
const extentArray = [minLon, minLat, maxLon, maxLat];
|
|
19871
19869
|
return extentArray;
|
|
@@ -19890,14 +19888,14 @@ var NgwLeaflet = (function () {
|
|
|
19890
19888
|
if (resource.cls && resource.parent && resource.cls.indexOf("style") !== -1) {
|
|
19891
19889
|
return connector.getResource(resource.parent.id, options).then((res) => {
|
|
19892
19890
|
if (res) {
|
|
19893
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
19891
|
+
return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
|
|
19894
19892
|
resourceId: res.resource.id,
|
|
19895
19893
|
connector
|
|
19896
19894
|
}));
|
|
19897
19895
|
}
|
|
19898
19896
|
});
|
|
19899
19897
|
} else {
|
|
19900
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
19898
|
+
return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
|
|
19901
19899
|
resourceId: resource.id,
|
|
19902
19900
|
connector
|
|
19903
19901
|
}));
|
|
@@ -19905,10 +19903,10 @@ var NgwLeaflet = (function () {
|
|
|
19905
19903
|
}
|
|
19906
19904
|
}
|
|
19907
19905
|
|
|
19908
|
-
var __defProp$
|
|
19909
|
-
var __defNormalProp$
|
|
19910
|
-
var __publicField$
|
|
19911
|
-
var __async$
|
|
19906
|
+
var __defProp$A = Object.defineProperty;
|
|
19907
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19908
|
+
var __publicField$q = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19909
|
+
var __async$q = (__this, __arguments, generator) => {
|
|
19912
19910
|
return new Promise((resolve, reject) => {
|
|
19913
19911
|
var fulfilled = (value) => {
|
|
19914
19912
|
try {
|
|
@@ -19930,18 +19928,18 @@ var NgwLeaflet = (function () {
|
|
|
19930
19928
|
};
|
|
19931
19929
|
class NgwResource {
|
|
19932
19930
|
constructor() {
|
|
19933
|
-
__publicField$
|
|
19934
|
-
__publicField$
|
|
19935
|
-
__publicField$
|
|
19931
|
+
__publicField$q(this, "item");
|
|
19932
|
+
__publicField$q(this, "connector");
|
|
19933
|
+
__publicField$q(this, "_extent");
|
|
19936
19934
|
}
|
|
19937
19935
|
/** @deprecated use {@link NgwResource.getBounds} instead */
|
|
19938
19936
|
getExtent() {
|
|
19939
|
-
return __async$
|
|
19937
|
+
return __async$q(this, null, function* () {
|
|
19940
19938
|
return this.getBounds();
|
|
19941
19939
|
});
|
|
19942
19940
|
}
|
|
19943
19941
|
getBounds(options) {
|
|
19944
|
-
return __async$
|
|
19942
|
+
return __async$q(this, null, function* () {
|
|
19945
19943
|
if (this._extent) {
|
|
19946
19944
|
return this._extent;
|
|
19947
19945
|
}
|
|
@@ -19957,7 +19955,7 @@ var NgwLeaflet = (function () {
|
|
|
19957
19955
|
}
|
|
19958
19956
|
}
|
|
19959
19957
|
|
|
19960
|
-
var __async$
|
|
19958
|
+
var __async$p = (__this, __arguments, generator) => {
|
|
19961
19959
|
return new Promise((resolve, reject) => {
|
|
19962
19960
|
var fulfilled = (value) => {
|
|
19963
19961
|
try {
|
|
@@ -19978,7 +19976,7 @@ var NgwLeaflet = (function () {
|
|
|
19978
19976
|
});
|
|
19979
19977
|
};
|
|
19980
19978
|
function resourceIdFromLayerOptions(options, connector) {
|
|
19981
|
-
return __async$
|
|
19979
|
+
return __async$p(this, null, function* () {
|
|
19982
19980
|
const resource = options.resource;
|
|
19983
19981
|
const item = resource;
|
|
19984
19982
|
let { keyname, resourceId } = options;
|
|
@@ -20003,24 +20001,24 @@ var NgwLeaflet = (function () {
|
|
|
20003
20001
|
});
|
|
20004
20002
|
}
|
|
20005
20003
|
|
|
20006
|
-
var __defProp$
|
|
20007
|
-
var __getOwnPropSymbols$
|
|
20008
|
-
var __hasOwnProp$
|
|
20009
|
-
var __propIsEnum$
|
|
20010
|
-
var __defNormalProp$
|
|
20011
|
-
var __spreadValues$
|
|
20004
|
+
var __defProp$z = Object.defineProperty;
|
|
20005
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
20006
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
20007
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
20008
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20009
|
+
var __spreadValues$p = (a, b) => {
|
|
20012
20010
|
for (var prop in b || (b = {}))
|
|
20013
|
-
if (__hasOwnProp$
|
|
20014
|
-
__defNormalProp$
|
|
20015
|
-
if (__getOwnPropSymbols$
|
|
20016
|
-
for (var prop of __getOwnPropSymbols$
|
|
20017
|
-
if (__propIsEnum$
|
|
20018
|
-
__defNormalProp$
|
|
20011
|
+
if (__hasOwnProp$q.call(b, prop))
|
|
20012
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
20013
|
+
if (__getOwnPropSymbols$q)
|
|
20014
|
+
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
20015
|
+
if (__propIsEnum$q.call(b, prop))
|
|
20016
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
20019
20017
|
}
|
|
20020
20018
|
return a;
|
|
20021
20019
|
};
|
|
20022
|
-
var __publicField$
|
|
20023
|
-
var __async$
|
|
20020
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20021
|
+
var __async$o = (__this, __arguments, generator) => {
|
|
20024
20022
|
return new Promise((resolve, reject) => {
|
|
20025
20023
|
var fulfilled = (value) => {
|
|
20026
20024
|
try {
|
|
@@ -20041,7 +20039,7 @@ var NgwLeaflet = (function () {
|
|
|
20041
20039
|
});
|
|
20042
20040
|
};
|
|
20043
20041
|
function createOnFirstShowAdapter(_0) {
|
|
20044
|
-
return __async$
|
|
20042
|
+
return __async$o(this, arguments, function* ({
|
|
20045
20043
|
webMap,
|
|
20046
20044
|
adapterOptions = {},
|
|
20047
20045
|
onLayerAdded,
|
|
@@ -20049,10 +20047,10 @@ var NgwLeaflet = (function () {
|
|
|
20049
20047
|
}) {
|
|
20050
20048
|
class OnFirstShowAdapter {
|
|
20051
20049
|
constructor() {
|
|
20052
|
-
__publicField$
|
|
20053
|
-
__publicField$
|
|
20054
|
-
__publicField$
|
|
20055
|
-
__publicField$
|
|
20050
|
+
__publicField$p(this, "options", {});
|
|
20051
|
+
__publicField$p(this, "layer", []);
|
|
20052
|
+
__publicField$p(this, "_removed", false);
|
|
20053
|
+
__publicField$p(this, "_creatingInProgress", false);
|
|
20056
20054
|
}
|
|
20057
20055
|
addLayer() {
|
|
20058
20056
|
return this.layer;
|
|
@@ -20067,7 +20065,7 @@ var NgwLeaflet = (function () {
|
|
|
20067
20065
|
return this._removed;
|
|
20068
20066
|
}
|
|
20069
20067
|
showLayer() {
|
|
20070
|
-
return __async$
|
|
20068
|
+
return __async$o(this, null, function* () {
|
|
20071
20069
|
this.options.visibility = true;
|
|
20072
20070
|
if (this.layer.length) {
|
|
20073
20071
|
for (const x of this.layer) {
|
|
@@ -20079,7 +20077,7 @@ var NgwLeaflet = (function () {
|
|
|
20079
20077
|
});
|
|
20080
20078
|
}
|
|
20081
20079
|
hideLayer() {
|
|
20082
|
-
return __async$
|
|
20080
|
+
return __async$o(this, null, function* () {
|
|
20083
20081
|
this.options.visibility = false;
|
|
20084
20082
|
if (this.layer) {
|
|
20085
20083
|
for (const x of this.layer) {
|
|
@@ -20089,12 +20087,12 @@ var NgwLeaflet = (function () {
|
|
|
20089
20087
|
});
|
|
20090
20088
|
}
|
|
20091
20089
|
loadLayer() {
|
|
20092
|
-
return __async$
|
|
20090
|
+
return __async$o(this, null, function* () {
|
|
20093
20091
|
if (!this.layer.length && !this._creatingInProgress) {
|
|
20094
20092
|
this._creatingInProgress = true;
|
|
20095
20093
|
const Adapter = yield createAdapter(this);
|
|
20096
20094
|
if (Adapter) {
|
|
20097
|
-
const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$
|
|
20095
|
+
const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$p({}, adapterOptions));
|
|
20098
20096
|
const realLayer = yield adapter.addLayer({
|
|
20099
20097
|
order: this.options.order,
|
|
20100
20098
|
headers: this.options.headers,
|
|
@@ -20123,7 +20121,7 @@ var NgwLeaflet = (function () {
|
|
|
20123
20121
|
});
|
|
20124
20122
|
}
|
|
20125
20123
|
|
|
20126
|
-
var __async$
|
|
20124
|
+
var __async$n = (__this, __arguments, generator) => {
|
|
20127
20125
|
return new Promise((resolve, reject) => {
|
|
20128
20126
|
var fulfilled = (value) => {
|
|
20129
20127
|
try {
|
|
@@ -20144,7 +20142,7 @@ var NgwLeaflet = (function () {
|
|
|
20144
20142
|
});
|
|
20145
20143
|
};
|
|
20146
20144
|
function createOnFirstShowNgwAdapter(_0) {
|
|
20147
|
-
return __async$
|
|
20145
|
+
return __async$n(this, arguments, function* ({
|
|
20148
20146
|
webMap,
|
|
20149
20147
|
connector,
|
|
20150
20148
|
item,
|
|
@@ -20182,26 +20180,26 @@ var NgwLeaflet = (function () {
|
|
|
20182
20180
|
defaultRequestLimit: 7e3
|
|
20183
20181
|
};
|
|
20184
20182
|
|
|
20185
|
-
var __defProp$
|
|
20186
|
-
var __defProps$
|
|
20187
|
-
var __getOwnPropDescs$
|
|
20188
|
-
var __getOwnPropSymbols$
|
|
20189
|
-
var __hasOwnProp$
|
|
20190
|
-
var __propIsEnum$
|
|
20191
|
-
var __defNormalProp$
|
|
20192
|
-
var __spreadValues$
|
|
20183
|
+
var __defProp$y = Object.defineProperty;
|
|
20184
|
+
var __defProps$g = Object.defineProperties;
|
|
20185
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
20186
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
20187
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
20188
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
20189
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20190
|
+
var __spreadValues$o = (a, b) => {
|
|
20193
20191
|
for (var prop in b || (b = {}))
|
|
20194
|
-
if (__hasOwnProp$
|
|
20195
|
-
__defNormalProp$
|
|
20196
|
-
if (__getOwnPropSymbols$
|
|
20197
|
-
for (var prop of __getOwnPropSymbols$
|
|
20198
|
-
if (__propIsEnum$
|
|
20199
|
-
__defNormalProp$
|
|
20192
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
20193
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
20194
|
+
if (__getOwnPropSymbols$p)
|
|
20195
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
20196
|
+
if (__propIsEnum$p.call(b, prop))
|
|
20197
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
20200
20198
|
}
|
|
20201
20199
|
return a;
|
|
20202
20200
|
};
|
|
20203
|
-
var __spreadProps$
|
|
20204
|
-
var __async$
|
|
20201
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
20202
|
+
var __async$m = (__this, __arguments, generator) => {
|
|
20205
20203
|
return new Promise((resolve, reject) => {
|
|
20206
20204
|
var fulfilled = (value) => {
|
|
20207
20205
|
try {
|
|
@@ -20223,7 +20221,8 @@ var NgwLeaflet = (function () {
|
|
|
20223
20221
|
};
|
|
20224
20222
|
const FEATURE_REQUEST_PARAMS = {
|
|
20225
20223
|
srs: 4326,
|
|
20226
|
-
geom_format: "geojson"
|
|
20224
|
+
geom_format: "geojson",
|
|
20225
|
+
dt_format: "iso"
|
|
20227
20226
|
};
|
|
20228
20227
|
function createGeoJsonFeature(item) {
|
|
20229
20228
|
const geometry = item.geom;
|
|
@@ -20267,7 +20266,7 @@ var NgwLeaflet = (function () {
|
|
|
20267
20266
|
);
|
|
20268
20267
|
}
|
|
20269
20268
|
function createFeatureFieldFilterQueries(opt) {
|
|
20270
|
-
return __async$
|
|
20269
|
+
return __async$m(this, null, function* () {
|
|
20271
20270
|
const queries = getQueries(opt);
|
|
20272
20271
|
const itemsParts = yield Promise.all(queries);
|
|
20273
20272
|
const ids = [];
|
|
@@ -20311,13 +20310,13 @@ var NgwLeaflet = (function () {
|
|
|
20311
20310
|
for (const f of filters_) {
|
|
20312
20311
|
if (isPropertyFilter(f)) {
|
|
20313
20312
|
_queries.push(
|
|
20314
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
20313
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
|
|
20315
20314
|
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
20316
20315
|
}))
|
|
20317
20316
|
);
|
|
20318
20317
|
} else {
|
|
20319
20318
|
getQueries(
|
|
20320
|
-
__spreadProps$
|
|
20319
|
+
__spreadProps$g(__spreadValues$o({}, opt), {
|
|
20321
20320
|
filters: f
|
|
20322
20321
|
}),
|
|
20323
20322
|
_queries,
|
|
@@ -20338,7 +20337,7 @@ var NgwLeaflet = (function () {
|
|
|
20338
20337
|
if (propertiesFilterList.length) {
|
|
20339
20338
|
for (const x of propertiesFilterList) {
|
|
20340
20339
|
getQueries(
|
|
20341
|
-
__spreadProps$
|
|
20340
|
+
__spreadProps$g(__spreadValues$o({}, opt), {
|
|
20342
20341
|
filters: x
|
|
20343
20342
|
}),
|
|
20344
20343
|
_queries,
|
|
@@ -20347,7 +20346,7 @@ var NgwLeaflet = (function () {
|
|
|
20347
20346
|
}
|
|
20348
20347
|
} else {
|
|
20349
20348
|
_queries.push(
|
|
20350
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
20349
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
|
|
20351
20350
|
paramList: [..._parentAllParams, ...paramList, ...filters2]
|
|
20352
20351
|
}))
|
|
20353
20352
|
);
|
|
@@ -20363,7 +20362,7 @@ var NgwLeaflet = (function () {
|
|
|
20363
20362
|
return `POLYGON((${polygon.join(", ")}))`;
|
|
20364
20363
|
}
|
|
20365
20364
|
function fetchNgwLayerItemsRequest(options) {
|
|
20366
|
-
const params = __spreadValues$
|
|
20365
|
+
const params = __spreadValues$o({}, FEATURE_REQUEST_PARAMS);
|
|
20367
20366
|
const {
|
|
20368
20367
|
limit,
|
|
20369
20368
|
query,
|
|
@@ -20401,7 +20400,7 @@ var NgwLeaflet = (function () {
|
|
|
20401
20400
|
if (paramList) {
|
|
20402
20401
|
Object.assign(params, paramListToQuery(paramList));
|
|
20403
20402
|
}
|
|
20404
|
-
return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$
|
|
20403
|
+
return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$o(__spreadValues$o({}, params), query), cache, signal });
|
|
20405
20404
|
}
|
|
20406
20405
|
|
|
20407
20406
|
function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
@@ -20430,26 +20429,26 @@ var NgwLeaflet = (function () {
|
|
|
20430
20429
|
return fields;
|
|
20431
20430
|
}
|
|
20432
20431
|
|
|
20433
|
-
var __defProp$
|
|
20434
|
-
var __defProps$
|
|
20435
|
-
var __getOwnPropDescs$
|
|
20436
|
-
var __getOwnPropSymbols$
|
|
20437
|
-
var __hasOwnProp$
|
|
20438
|
-
var __propIsEnum$
|
|
20439
|
-
var __defNormalProp$
|
|
20440
|
-
var __spreadValues$
|
|
20432
|
+
var __defProp$x = Object.defineProperty;
|
|
20433
|
+
var __defProps$f = Object.defineProperties;
|
|
20434
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
20435
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
20436
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
20437
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
20438
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20439
|
+
var __spreadValues$n = (a, b) => {
|
|
20441
20440
|
for (var prop in b || (b = {}))
|
|
20442
|
-
if (__hasOwnProp$
|
|
20443
|
-
__defNormalProp$
|
|
20444
|
-
if (__getOwnPropSymbols$
|
|
20445
|
-
for (var prop of __getOwnPropSymbols$
|
|
20446
|
-
if (__propIsEnum$
|
|
20447
|
-
__defNormalProp$
|
|
20441
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
20442
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
20443
|
+
if (__getOwnPropSymbols$o)
|
|
20444
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
20445
|
+
if (__propIsEnum$o.call(b, prop))
|
|
20446
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
20448
20447
|
}
|
|
20449
20448
|
return a;
|
|
20450
20449
|
};
|
|
20451
|
-
var __spreadProps$
|
|
20452
|
-
var __async$
|
|
20450
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
20451
|
+
var __async$l = (__this, __arguments, generator) => {
|
|
20453
20452
|
return new Promise((resolve, reject) => {
|
|
20454
20453
|
var fulfilled = (value) => {
|
|
20455
20454
|
try {
|
|
@@ -20470,17 +20469,17 @@ var NgwLeaflet = (function () {
|
|
|
20470
20469
|
});
|
|
20471
20470
|
};
|
|
20472
20471
|
function fetchNgwLayerItems(options) {
|
|
20473
|
-
return __async$
|
|
20472
|
+
return __async$l(this, null, function* () {
|
|
20474
20473
|
var _a;
|
|
20475
20474
|
const filters = options.filters;
|
|
20476
20475
|
if (filters) {
|
|
20477
|
-
let data = yield createFeatureFieldFilterQueries(__spreadProps$
|
|
20476
|
+
let data = yield createFeatureFieldFilterQueries(__spreadProps$f(__spreadValues$n({}, options), {
|
|
20478
20477
|
filters
|
|
20479
20478
|
}));
|
|
20480
20479
|
const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
|
|
20481
20480
|
if (clientFilterValidate) {
|
|
20482
20481
|
data = data.filter((y) => {
|
|
20483
|
-
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$
|
|
20482
|
+
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$f(__spreadValues$n({}, y.fields), {
|
|
20484
20483
|
id: y.id
|
|
20485
20484
|
}));
|
|
20486
20485
|
const result = propertiesFilter(fields, filters);
|
|
@@ -20598,26 +20597,26 @@ var NgwLeaflet = (function () {
|
|
|
20598
20597
|
}
|
|
20599
20598
|
}
|
|
20600
20599
|
|
|
20601
|
-
var __defProp$
|
|
20602
|
-
var __defProps$
|
|
20603
|
-
var __getOwnPropDescs$
|
|
20604
|
-
var __getOwnPropSymbols$
|
|
20605
|
-
var __hasOwnProp$
|
|
20606
|
-
var __propIsEnum$
|
|
20607
|
-
var __defNormalProp$
|
|
20608
|
-
var __spreadValues$
|
|
20600
|
+
var __defProp$w = Object.defineProperty;
|
|
20601
|
+
var __defProps$e = Object.defineProperties;
|
|
20602
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
20603
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
20604
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
20605
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
20606
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20607
|
+
var __spreadValues$m = (a, b) => {
|
|
20609
20608
|
for (var prop in b || (b = {}))
|
|
20610
|
-
if (__hasOwnProp$
|
|
20611
|
-
__defNormalProp$
|
|
20612
|
-
if (__getOwnPropSymbols$
|
|
20613
|
-
for (var prop of __getOwnPropSymbols$
|
|
20614
|
-
if (__propIsEnum$
|
|
20615
|
-
__defNormalProp$
|
|
20609
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
20610
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
20611
|
+
if (__getOwnPropSymbols$n)
|
|
20612
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
20613
|
+
if (__propIsEnum$n.call(b, prop))
|
|
20614
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
20616
20615
|
}
|
|
20617
20616
|
return a;
|
|
20618
20617
|
};
|
|
20619
|
-
var __spreadProps$
|
|
20620
|
-
var __async$
|
|
20618
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
20619
|
+
var __async$k = (__this, __arguments, generator) => {
|
|
20621
20620
|
return new Promise((resolve, reject) => {
|
|
20622
20621
|
var fulfilled = (value) => {
|
|
20623
20622
|
try {
|
|
@@ -20638,56 +20637,56 @@ var NgwLeaflet = (function () {
|
|
|
20638
20637
|
});
|
|
20639
20638
|
};
|
|
20640
20639
|
function fetchNgwLayerItem(options) {
|
|
20641
|
-
return __async$
|
|
20642
|
-
const params = __spreadValues$
|
|
20640
|
+
return __async$k(this, null, function* () {
|
|
20641
|
+
const params = __spreadValues$m({}, FEATURE_REQUEST_PARAMS);
|
|
20643
20642
|
updateItemRequestParam(params, options);
|
|
20644
20643
|
const resp = yield options.connector.route("feature_layer.feature.item", {
|
|
20645
20644
|
id: Number(options.resourceId),
|
|
20646
20645
|
fid: options.featureId
|
|
20647
|
-
}).get(__spreadProps$
|
|
20648
|
-
const toGeojson = () => __async$
|
|
20646
|
+
}).get(__spreadProps$e(__spreadValues$m({}, options), { query: params }));
|
|
20647
|
+
const toGeojson = () => __async$k(this, null, function* () {
|
|
20649
20648
|
if (resp.geom) {
|
|
20650
20649
|
return createGeoJsonFeature(resp);
|
|
20651
20650
|
} else {
|
|
20652
|
-
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$
|
|
20651
|
+
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$m({}, options), {
|
|
20653
20652
|
geom: true,
|
|
20654
20653
|
fields: null,
|
|
20655
20654
|
extensions: null
|
|
20656
20655
|
}));
|
|
20657
20656
|
const geom = onlyGeomItem.geom;
|
|
20658
|
-
return createGeoJsonFeature(__spreadProps$
|
|
20657
|
+
return createGeoJsonFeature(__spreadProps$e(__spreadValues$m({}, resp), { geom }));
|
|
20659
20658
|
}
|
|
20660
20659
|
});
|
|
20661
|
-
return __spreadProps$
|
|
20660
|
+
return __spreadProps$e(__spreadValues$m({}, resp), {
|
|
20662
20661
|
toGeojson
|
|
20663
20662
|
});
|
|
20664
20663
|
});
|
|
20665
20664
|
}
|
|
20666
20665
|
|
|
20667
|
-
var __defProp$
|
|
20668
|
-
var __getOwnPropSymbols$
|
|
20669
|
-
var __hasOwnProp$
|
|
20670
|
-
var __propIsEnum$
|
|
20671
|
-
var __defNormalProp$
|
|
20672
|
-
var __spreadValues$
|
|
20666
|
+
var __defProp$v = Object.defineProperty;
|
|
20667
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
20668
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
20669
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
20670
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20671
|
+
var __spreadValues$l = (a, b) => {
|
|
20673
20672
|
for (var prop in b || (b = {}))
|
|
20674
|
-
if (__hasOwnProp$
|
|
20675
|
-
__defNormalProp$
|
|
20676
|
-
if (__getOwnPropSymbols$
|
|
20677
|
-
for (var prop of __getOwnPropSymbols$
|
|
20678
|
-
if (__propIsEnum$
|
|
20679
|
-
__defNormalProp$
|
|
20673
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
20674
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
20675
|
+
if (__getOwnPropSymbols$m)
|
|
20676
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
20677
|
+
if (__propIsEnum$m.call(b, prop))
|
|
20678
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
20680
20679
|
}
|
|
20681
20680
|
return a;
|
|
20682
20681
|
};
|
|
20683
|
-
var __publicField$
|
|
20682
|
+
var __publicField$o = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20684
20683
|
class BookmarkItem {
|
|
20685
20684
|
constructor(options) {
|
|
20686
20685
|
this.options = options;
|
|
20687
|
-
__publicField$
|
|
20688
|
-
__publicField$
|
|
20689
|
-
__publicField$
|
|
20690
|
-
__publicField$
|
|
20686
|
+
__publicField$o(this, "name");
|
|
20687
|
+
__publicField$o(this, "resourceId");
|
|
20688
|
+
__publicField$o(this, "item");
|
|
20689
|
+
__publicField$o(this, "_extent");
|
|
20691
20690
|
this.resourceId = options.resourceId;
|
|
20692
20691
|
const item = options.item;
|
|
20693
20692
|
this.item = item;
|
|
@@ -20705,17 +20704,19 @@ var NgwLeaflet = (function () {
|
|
|
20705
20704
|
id: this.resourceId,
|
|
20706
20705
|
fid: this.item.id
|
|
20707
20706
|
}).get(opt).then((resp) => {
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
|
|
20711
|
-
|
|
20707
|
+
if (resp.extent) {
|
|
20708
|
+
const { minLat, minLon, maxLat, maxLon } = resp.extent;
|
|
20709
|
+
const lonLat = [minLon, minLat, maxLon, maxLat];
|
|
20710
|
+
this._extent = lonLat;
|
|
20711
|
+
return lonLat;
|
|
20712
|
+
}
|
|
20712
20713
|
});
|
|
20713
20714
|
}
|
|
20714
20715
|
geoJson(opt) {
|
|
20715
20716
|
if (this.item.geom) {
|
|
20716
20717
|
return Promise.resolve(createGeoJsonFeature(this.item));
|
|
20717
20718
|
} else {
|
|
20718
|
-
return fetchNgwLayerItem(__spreadValues$
|
|
20719
|
+
return fetchNgwLayerItem(__spreadValues$l({
|
|
20719
20720
|
resourceId: this.resourceId,
|
|
20720
20721
|
featureId: this.item.id,
|
|
20721
20722
|
connector: this.options.connector,
|
|
@@ -20733,19 +20734,19 @@ var NgwLeaflet = (function () {
|
|
|
20733
20734
|
|
|
20734
20735
|
const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
|
|
20735
20736
|
|
|
20736
|
-
var __defProp$
|
|
20737
|
-
var __defNormalProp$
|
|
20738
|
-
var __publicField$
|
|
20737
|
+
var __defProp$u = Object.defineProperty;
|
|
20738
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20739
|
+
var __publicField$n = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20739
20740
|
class BaseProperty {
|
|
20740
20741
|
constructor(name, item, options) {
|
|
20741
|
-
__publicField$
|
|
20742
|
-
__publicField$
|
|
20743
|
-
__publicField$
|
|
20744
|
-
__publicField$
|
|
20745
|
-
__publicField$
|
|
20746
|
-
__publicField$
|
|
20747
|
-
__publicField$
|
|
20748
|
-
__publicField$
|
|
20742
|
+
__publicField$n(this, "options");
|
|
20743
|
+
__publicField$n(this, "emitter", new EventEmitter());
|
|
20744
|
+
__publicField$n(this, "name");
|
|
20745
|
+
__publicField$n(this, "item");
|
|
20746
|
+
__publicField$n(this, "_blocked", false);
|
|
20747
|
+
__publicField$n(this, "_container");
|
|
20748
|
+
__publicField$n(this, "_value");
|
|
20749
|
+
__publicField$n(this, "_removeEventsListener");
|
|
20749
20750
|
this.item = item;
|
|
20750
20751
|
this.options = Object.assign({}, options);
|
|
20751
20752
|
this.name = name;
|
|
@@ -20840,28 +20841,28 @@ var NgwLeaflet = (function () {
|
|
|
20840
20841
|
});
|
|
20841
20842
|
return isBlocked;
|
|
20842
20843
|
}
|
|
20843
|
-
}
|
|
20844
|
-
|
|
20845
|
-
var __defProp$
|
|
20846
|
-
var __getOwnPropSymbols$
|
|
20847
|
-
var __hasOwnProp$
|
|
20848
|
-
var __propIsEnum$
|
|
20849
|
-
var __defNormalProp$
|
|
20850
|
-
var __spreadValues$
|
|
20844
|
+
}
|
|
20845
|
+
|
|
20846
|
+
var __defProp$t = Object.defineProperty;
|
|
20847
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
20848
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
20849
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
20850
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20851
|
+
var __spreadValues$k = (a, b) => {
|
|
20851
20852
|
for (var prop in b || (b = {}))
|
|
20852
|
-
if (__hasOwnProp$
|
|
20853
|
-
__defNormalProp$
|
|
20854
|
-
if (__getOwnPropSymbols$
|
|
20855
|
-
for (var prop of __getOwnPropSymbols$
|
|
20856
|
-
if (__propIsEnum$
|
|
20857
|
-
__defNormalProp$
|
|
20853
|
+
if (__hasOwnProp$l.call(b, prop))
|
|
20854
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
20855
|
+
if (__getOwnPropSymbols$l)
|
|
20856
|
+
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
20857
|
+
if (__propIsEnum$l.call(b, prop))
|
|
20858
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
20858
20859
|
}
|
|
20859
20860
|
return a;
|
|
20860
20861
|
};
|
|
20861
|
-
var __publicField$
|
|
20862
|
+
var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, key + "" , value);
|
|
20862
20863
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
20863
20864
|
constructor(name, item, options) {
|
|
20864
|
-
super(name, item, __spreadValues$
|
|
20865
|
+
super(name, item, __spreadValues$k(__spreadValues$k({}, _CheckProperty.options), options));
|
|
20865
20866
|
this.set(this.get());
|
|
20866
20867
|
}
|
|
20867
20868
|
update(value, options) {
|
|
@@ -20957,7 +20958,7 @@ var NgwLeaflet = (function () {
|
|
|
20957
20958
|
const child = children[fry];
|
|
20958
20959
|
const property = child.properties && child.properties.property(this.name);
|
|
20959
20960
|
if (property) {
|
|
20960
|
-
property.set(value, __spreadValues$
|
|
20961
|
+
property.set(value, __spreadValues$k(__spreadValues$k({}, options), {
|
|
20961
20962
|
propagation: true,
|
|
20962
20963
|
bubble: false
|
|
20963
20964
|
}));
|
|
@@ -20966,7 +20967,7 @@ var NgwLeaflet = (function () {
|
|
|
20966
20967
|
}
|
|
20967
20968
|
}
|
|
20968
20969
|
};
|
|
20969
|
-
__publicField$
|
|
20970
|
+
__publicField$m(_CheckProperty, "options", {
|
|
20970
20971
|
hierarchy: true,
|
|
20971
20972
|
bubble: false,
|
|
20972
20973
|
propagation: false,
|
|
@@ -20975,31 +20976,31 @@ var NgwLeaflet = (function () {
|
|
|
20975
20976
|
});
|
|
20976
20977
|
let CheckProperty = _CheckProperty;
|
|
20977
20978
|
|
|
20978
|
-
var __defProp$
|
|
20979
|
-
var __getOwnPropSymbols$
|
|
20980
|
-
var __hasOwnProp$
|
|
20981
|
-
var __propIsEnum$
|
|
20982
|
-
var __defNormalProp$
|
|
20983
|
-
var __spreadValues$
|
|
20979
|
+
var __defProp$s = Object.defineProperty;
|
|
20980
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
20981
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
20982
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
20983
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20984
|
+
var __spreadValues$j = (a, b) => {
|
|
20984
20985
|
for (var prop in b || (b = {}))
|
|
20985
|
-
if (__hasOwnProp$
|
|
20986
|
-
__defNormalProp$
|
|
20987
|
-
if (__getOwnPropSymbols$
|
|
20988
|
-
for (var prop of __getOwnPropSymbols$
|
|
20989
|
-
if (__propIsEnum$
|
|
20990
|
-
__defNormalProp$
|
|
20986
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
20987
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
20988
|
+
if (__getOwnPropSymbols$k)
|
|
20989
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
20990
|
+
if (__propIsEnum$k.call(b, prop))
|
|
20991
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
20991
20992
|
}
|
|
20992
20993
|
return a;
|
|
20993
20994
|
};
|
|
20994
|
-
var __publicField$
|
|
20995
|
+
var __publicField$l = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20995
20996
|
const BOOLEAN_TYPE = "boolean";
|
|
20996
20997
|
const STRING_TYPE = "string";
|
|
20997
20998
|
const _ItemProperties = class _ItemProperties {
|
|
20998
20999
|
constructor(item, propertiesList) {
|
|
20999
21000
|
this.item = item;
|
|
21000
|
-
__publicField$
|
|
21001
|
-
__publicField$
|
|
21002
|
-
__publicField$
|
|
21001
|
+
__publicField$l(this, "options", {});
|
|
21002
|
+
__publicField$l(this, "_properties", {});
|
|
21003
|
+
__publicField$l(this, "_propertiesList", []);
|
|
21003
21004
|
if (propertiesList) {
|
|
21004
21005
|
propertiesList.forEach(this._setPropertyHandler.bind(this));
|
|
21005
21006
|
}
|
|
@@ -21039,7 +21040,7 @@ var NgwLeaflet = (function () {
|
|
|
21039
21040
|
_setPropertyHandler(propOpt) {
|
|
21040
21041
|
const Handler = this._getHandler(propOpt);
|
|
21041
21042
|
if (Handler && propOpt.name) {
|
|
21042
|
-
const options = __spreadValues$
|
|
21043
|
+
const options = __spreadValues$j({}, propOpt);
|
|
21043
21044
|
this._properties[propOpt.name] = new Handler(
|
|
21044
21045
|
propOpt.name,
|
|
21045
21046
|
this.item,
|
|
@@ -21062,7 +21063,7 @@ var NgwLeaflet = (function () {
|
|
|
21062
21063
|
return Handler;
|
|
21063
21064
|
}
|
|
21064
21065
|
};
|
|
21065
|
-
__publicField$
|
|
21066
|
+
__publicField$l(_ItemProperties, "handlers", {
|
|
21066
21067
|
CheckProperty
|
|
21067
21068
|
});
|
|
21068
21069
|
let ItemProperties = _ItemProperties;
|
|
@@ -21169,14 +21170,14 @@ var NgwLeaflet = (function () {
|
|
|
21169
21170
|
return true;
|
|
21170
21171
|
}
|
|
21171
21172
|
|
|
21172
|
-
var __defProp$
|
|
21173
|
-
var __defNormalProp$
|
|
21174
|
-
var __publicField$
|
|
21173
|
+
var __defProp$r = Object.defineProperty;
|
|
21174
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21175
|
+
var __publicField$k = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21175
21176
|
class TreeHelper {
|
|
21176
21177
|
constructor(item) {
|
|
21177
|
-
__publicField$
|
|
21178
|
-
__publicField$
|
|
21179
|
-
__publicField$
|
|
21178
|
+
__publicField$k(this, "item");
|
|
21179
|
+
__publicField$k(this, "_children", []);
|
|
21180
|
+
__publicField$k(this, "_parent");
|
|
21180
21181
|
this.item = item;
|
|
21181
21182
|
}
|
|
21182
21183
|
setParent(parent) {
|
|
@@ -21239,32 +21240,32 @@ var NgwLeaflet = (function () {
|
|
|
21239
21240
|
}
|
|
21240
21241
|
}
|
|
21241
21242
|
|
|
21242
|
-
var __defProp$
|
|
21243
|
-
var __getOwnPropSymbols$
|
|
21244
|
-
var __hasOwnProp$
|
|
21245
|
-
var __propIsEnum$
|
|
21246
|
-
var __defNormalProp$
|
|
21247
|
-
var __spreadValues$
|
|
21243
|
+
var __defProp$q = Object.defineProperty;
|
|
21244
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
21245
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
21246
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
21247
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21248
|
+
var __spreadValues$i = (a, b) => {
|
|
21248
21249
|
for (var prop in b || (b = {}))
|
|
21249
|
-
if (__hasOwnProp$
|
|
21250
|
-
__defNormalProp$
|
|
21251
|
-
if (__getOwnPropSymbols$
|
|
21252
|
-
for (var prop of __getOwnPropSymbols$
|
|
21253
|
-
if (__propIsEnum$
|
|
21254
|
-
__defNormalProp$
|
|
21250
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
21251
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
21252
|
+
if (__getOwnPropSymbols$j)
|
|
21253
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
21254
|
+
if (__propIsEnum$j.call(b, prop))
|
|
21255
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
21255
21256
|
}
|
|
21256
21257
|
return a;
|
|
21257
21258
|
};
|
|
21258
|
-
var __publicField$
|
|
21259
|
+
var __publicField$j = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21259
21260
|
let ID$1 = 0;
|
|
21260
21261
|
class Item {
|
|
21261
21262
|
constructor(options) {
|
|
21262
|
-
__publicField$
|
|
21263
|
-
__publicField$
|
|
21264
|
-
__publicField$
|
|
21265
|
-
__publicField$
|
|
21263
|
+
__publicField$j(this, "options", {});
|
|
21264
|
+
__publicField$j(this, "properties");
|
|
21265
|
+
__publicField$j(this, "tree");
|
|
21266
|
+
__publicField$j(this, "id", ID$1);
|
|
21266
21267
|
ID$1 += 1;
|
|
21267
|
-
this.options = __spreadValues$
|
|
21268
|
+
this.options = __spreadValues$i({}, options);
|
|
21268
21269
|
this.tree = new TreeHelper(this);
|
|
21269
21270
|
}
|
|
21270
21271
|
initProperties() {
|
|
@@ -21316,6 +21317,161 @@ var NgwLeaflet = (function () {
|
|
|
21316
21317
|
}
|
|
21317
21318
|
}
|
|
21318
21319
|
|
|
21320
|
+
var __defProp$p = Object.defineProperty;
|
|
21321
|
+
var __defProps$d = Object.defineProperties;
|
|
21322
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
21323
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
21324
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
21325
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
21326
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21327
|
+
var __spreadValues$h = (a, b) => {
|
|
21328
|
+
for (var prop in b || (b = {}))
|
|
21329
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
21330
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
21331
|
+
if (__getOwnPropSymbols$i)
|
|
21332
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
21333
|
+
if (__propIsEnum$i.call(b, prop))
|
|
21334
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
21335
|
+
}
|
|
21336
|
+
return a;
|
|
21337
|
+
};
|
|
21338
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
21339
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21340
|
+
var __async$j = (__this, __arguments, generator) => {
|
|
21341
|
+
return new Promise((resolve, reject) => {
|
|
21342
|
+
var fulfilled = (value) => {
|
|
21343
|
+
try {
|
|
21344
|
+
step(generator.next(value));
|
|
21345
|
+
} catch (e) {
|
|
21346
|
+
reject(e);
|
|
21347
|
+
}
|
|
21348
|
+
};
|
|
21349
|
+
var rejected = (value) => {
|
|
21350
|
+
try {
|
|
21351
|
+
step(generator.throw(value));
|
|
21352
|
+
} catch (e) {
|
|
21353
|
+
reject(e);
|
|
21354
|
+
}
|
|
21355
|
+
};
|
|
21356
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
21357
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
21358
|
+
});
|
|
21359
|
+
};
|
|
21360
|
+
class Legend {
|
|
21361
|
+
constructor({
|
|
21362
|
+
legendSymbols,
|
|
21363
|
+
resourceId,
|
|
21364
|
+
connector,
|
|
21365
|
+
layerId,
|
|
21366
|
+
legend,
|
|
21367
|
+
webMap,
|
|
21368
|
+
layer,
|
|
21369
|
+
onSymbolRenderChange
|
|
21370
|
+
}) {
|
|
21371
|
+
__publicField$i(this, "layerId");
|
|
21372
|
+
__publicField$i(this, "layer");
|
|
21373
|
+
__publicField$i(this, "resourceId");
|
|
21374
|
+
__publicField$i(this, "legendSymbols", "expand");
|
|
21375
|
+
__publicField$i(this, "legend");
|
|
21376
|
+
// private blocked: boolean = false;
|
|
21377
|
+
__publicField$i(this, "layerVisibility", true);
|
|
21378
|
+
// private symbolRenderIndexes?: number[];
|
|
21379
|
+
__publicField$i(this, "onSymbolRenderChange");
|
|
21380
|
+
__publicField$i(this, "webMap");
|
|
21381
|
+
__publicField$i(this, "connector");
|
|
21382
|
+
if (legendSymbols) {
|
|
21383
|
+
this.legendSymbols = legendSymbols;
|
|
21384
|
+
}
|
|
21385
|
+
this.connector = connector;
|
|
21386
|
+
this.layer = layer;
|
|
21387
|
+
this.layerId = layerId;
|
|
21388
|
+
this.legend = this.createLegend(legend);
|
|
21389
|
+
this.resourceId = resourceId;
|
|
21390
|
+
this.webMap = webMap;
|
|
21391
|
+
this.onSymbolRenderChange = onSymbolRenderChange;
|
|
21392
|
+
}
|
|
21393
|
+
attachLayer(layer) {
|
|
21394
|
+
this.layerId = String(layer.id);
|
|
21395
|
+
this.layer = layer;
|
|
21396
|
+
}
|
|
21397
|
+
create(options) {
|
|
21398
|
+
return __async$j(this, null, function* () {
|
|
21399
|
+
if (this.connector) {
|
|
21400
|
+
const ngwLegend = yield this.connector.route("render.legend_symbols", {
|
|
21401
|
+
id: this.resourceId
|
|
21402
|
+
}).get(__spreadValues$h({}, options));
|
|
21403
|
+
return this.createLegend(ngwLegend);
|
|
21404
|
+
}
|
|
21405
|
+
});
|
|
21406
|
+
}
|
|
21407
|
+
createLegend(items) {
|
|
21408
|
+
return items.map((params) => __spreadProps$d(__spreadValues$h({}, params), {
|
|
21409
|
+
/** @deprecated use display_name instead */
|
|
21410
|
+
name: params.display_name,
|
|
21411
|
+
/** @deprecated use icon instead */
|
|
21412
|
+
symbol: params.icon
|
|
21413
|
+
}));
|
|
21414
|
+
}
|
|
21415
|
+
setSymbolRender(symbolIndex, status) {
|
|
21416
|
+
const legendItem = this.legend.find((l) => l.index === symbolIndex);
|
|
21417
|
+
if (legendItem) {
|
|
21418
|
+
const render = legendItem.render;
|
|
21419
|
+
if (render !== status) {
|
|
21420
|
+
legendItem.render = status;
|
|
21421
|
+
const newSymbols = this.legend.filter((l) => l.render).map((l) => l.index);
|
|
21422
|
+
this.setLegendSymbol(newSymbols);
|
|
21423
|
+
if (this.onSymbolRenderChange) {
|
|
21424
|
+
this.onSymbolRenderChange(newSymbols);
|
|
21425
|
+
}
|
|
21426
|
+
}
|
|
21427
|
+
}
|
|
21428
|
+
}
|
|
21429
|
+
setLegendSymbol(symbolRenderIndexes) {
|
|
21430
|
+
const intervals = this._consolidateIntervals(symbolRenderIndexes);
|
|
21431
|
+
if (!intervals.length) {
|
|
21432
|
+
this._hideLayer();
|
|
21433
|
+
}
|
|
21434
|
+
if (this.layer.updateLayer) {
|
|
21435
|
+
this.layer.updateLayer({
|
|
21436
|
+
params: {
|
|
21437
|
+
[`symbols[${this.resourceId}]`]: intervals.join(",") || void 0
|
|
21438
|
+
}
|
|
21439
|
+
});
|
|
21440
|
+
}
|
|
21441
|
+
if (intervals.length) {
|
|
21442
|
+
this._showLayer();
|
|
21443
|
+
}
|
|
21444
|
+
}
|
|
21445
|
+
_hideLayer() {
|
|
21446
|
+
if (this.layer.options.id) {
|
|
21447
|
+
this.webMap.mapAdapter.hideLayer(this.layer.layer);
|
|
21448
|
+
}
|
|
21449
|
+
}
|
|
21450
|
+
_showLayer() {
|
|
21451
|
+
if (this.layer.options.id) {
|
|
21452
|
+
if (this.layerVisibility) {
|
|
21453
|
+
this.webMap.showLayer(this.layer.options.id, { silent: true });
|
|
21454
|
+
}
|
|
21455
|
+
}
|
|
21456
|
+
}
|
|
21457
|
+
_consolidateIntervals(symbols) {
|
|
21458
|
+
const sortedSymbols = symbols.slice().sort((a, b) => a - b);
|
|
21459
|
+
const intervals = [];
|
|
21460
|
+
let start = sortedSymbols[0];
|
|
21461
|
+
let end = start;
|
|
21462
|
+
for (let i = 1; i <= sortedSymbols.length; i++) {
|
|
21463
|
+
if (sortedSymbols[i] === end + 1) {
|
|
21464
|
+
end = sortedSymbols[i];
|
|
21465
|
+
} else {
|
|
21466
|
+
intervals.push(start === end ? `${start}` : `${start}-${end}`);
|
|
21467
|
+
start = sortedSymbols[i];
|
|
21468
|
+
end = start;
|
|
21469
|
+
}
|
|
21470
|
+
}
|
|
21471
|
+
return intervals;
|
|
21472
|
+
}
|
|
21473
|
+
}
|
|
21474
|
+
|
|
21319
21475
|
var __defProp$o = Object.defineProperty;
|
|
21320
21476
|
var __defProps$c = Object.defineProperties;
|
|
21321
21477
|
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
@@ -21357,14 +21513,23 @@ var NgwLeaflet = (function () {
|
|
|
21357
21513
|
});
|
|
21358
21514
|
};
|
|
21359
21515
|
const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
21360
|
-
constructor(
|
|
21516
|
+
constructor({
|
|
21517
|
+
webMap,
|
|
21518
|
+
item,
|
|
21519
|
+
options,
|
|
21520
|
+
connector,
|
|
21521
|
+
parent,
|
|
21522
|
+
noInit
|
|
21523
|
+
}) {
|
|
21361
21524
|
super(__spreadValues$g(__spreadValues$g({}, _NgwWebmapItem.options), options));
|
|
21362
|
-
this.webMap = webMap;
|
|
21363
21525
|
__publicField$h(this, "item");
|
|
21526
|
+
__publicField$h(this, "webMap");
|
|
21364
21527
|
__publicField$h(this, "connector");
|
|
21365
21528
|
__publicField$h(this, "layer");
|
|
21529
|
+
__publicField$h(this, "legend");
|
|
21366
21530
|
__publicField$h(this, "emitter", new EventEmitter());
|
|
21367
21531
|
__publicField$h(this, "_rootDescendantsCount", 0);
|
|
21532
|
+
this.webMap = webMap;
|
|
21368
21533
|
if (connector) {
|
|
21369
21534
|
this.connector = connector;
|
|
21370
21535
|
}
|
|
@@ -21387,14 +21552,14 @@ var NgwLeaflet = (function () {
|
|
|
21387
21552
|
}
|
|
21388
21553
|
static create(webMap, item, options, connector, parent) {
|
|
21389
21554
|
return __async$i(this, null, function* () {
|
|
21390
|
-
const ngwWebmapItem = new _NgwWebmapItem(
|
|
21555
|
+
const ngwWebmapItem = new _NgwWebmapItem({
|
|
21391
21556
|
webMap,
|
|
21392
21557
|
item,
|
|
21393
21558
|
options,
|
|
21394
21559
|
connector,
|
|
21395
21560
|
parent,
|
|
21396
|
-
true
|
|
21397
|
-
);
|
|
21561
|
+
noInit: true
|
|
21562
|
+
});
|
|
21398
21563
|
yield ngwWebmapItem._init(item);
|
|
21399
21564
|
return ngwWebmapItem;
|
|
21400
21565
|
});
|
|
@@ -21416,22 +21581,36 @@ var NgwLeaflet = (function () {
|
|
|
21416
21581
|
}
|
|
21417
21582
|
getLegend(options) {
|
|
21418
21583
|
return __async$i(this, null, function* () {
|
|
21419
|
-
var _a;
|
|
21584
|
+
var _a, _b;
|
|
21420
21585
|
const id = (_a = this.layer) == null ? void 0 : _a.id;
|
|
21421
21586
|
if (id !== void 0) {
|
|
21422
21587
|
const connector = this.connector;
|
|
21423
21588
|
if (connector && "resourceId" in this.item) {
|
|
21424
|
-
const
|
|
21425
|
-
|
|
21426
|
-
|
|
21427
|
-
|
|
21428
|
-
|
|
21429
|
-
|
|
21430
|
-
|
|
21431
|
-
|
|
21432
|
-
|
|
21433
|
-
|
|
21434
|
-
|
|
21589
|
+
const resourceId = Number(this.item.resourceId);
|
|
21590
|
+
if (this.item.item_type === "layer") {
|
|
21591
|
+
const ngwLegend = yield connector.route("render.legend_symbols", {
|
|
21592
|
+
id: resourceId
|
|
21593
|
+
}).get(__spreadValues$g({}, options));
|
|
21594
|
+
if (this.layer && ngwLegend) {
|
|
21595
|
+
const legend = new Legend({
|
|
21596
|
+
layerId: id,
|
|
21597
|
+
legend: ngwLegend,
|
|
21598
|
+
layer: this.layer,
|
|
21599
|
+
resourceId,
|
|
21600
|
+
webMap: this.webMap,
|
|
21601
|
+
legendSymbols: (_b = this.item.legend_symbols) != null ? _b : void 0,
|
|
21602
|
+
onSymbolRenderChange: (indexes) => {
|
|
21603
|
+
this.webMap.emitter.emit("event-symbol-render:change", {
|
|
21604
|
+
layerId: id,
|
|
21605
|
+
resourceId,
|
|
21606
|
+
indexes
|
|
21607
|
+
});
|
|
21608
|
+
}
|
|
21609
|
+
});
|
|
21610
|
+
return [legend];
|
|
21611
|
+
}
|
|
21612
|
+
}
|
|
21613
|
+
return [];
|
|
21435
21614
|
}
|
|
21436
21615
|
}
|
|
21437
21616
|
return [];
|
|
@@ -21486,13 +21665,13 @@ var NgwLeaflet = (function () {
|
|
|
21486
21665
|
if (group.children && group.children.length) {
|
|
21487
21666
|
const children = this.getChildren(group);
|
|
21488
21667
|
for (const child of children) {
|
|
21489
|
-
const childItem = new this.constructor(
|
|
21490
|
-
this.webMap,
|
|
21491
|
-
child,
|
|
21492
|
-
this.options,
|
|
21493
|
-
this.connector,
|
|
21494
|
-
this
|
|
21495
|
-
);
|
|
21668
|
+
const childItem = new this.constructor({
|
|
21669
|
+
webMap: this.webMap,
|
|
21670
|
+
item: child,
|
|
21671
|
+
options: this.options,
|
|
21672
|
+
connector: this.connector,
|
|
21673
|
+
parent: this
|
|
21674
|
+
});
|
|
21496
21675
|
this.tree.addChild(childItem);
|
|
21497
21676
|
}
|
|
21498
21677
|
}
|
|
@@ -21520,6 +21699,15 @@ var NgwLeaflet = (function () {
|
|
|
21520
21699
|
}
|
|
21521
21700
|
if (adapter) {
|
|
21522
21701
|
return this.webMap.addLayer(adapter, options).then((newLayer) => {
|
|
21702
|
+
this.webMap.emitter.on("layer:toggle", (e) => {
|
|
21703
|
+
if (e.id === newLayer.id) {
|
|
21704
|
+
const enabled = this.properties.get("visibility");
|
|
21705
|
+
const mapVisible = this.webMap.isLayerVisible(newLayer);
|
|
21706
|
+
if (enabled !== mapVisible) {
|
|
21707
|
+
this.properties.set("visibility", mapVisible);
|
|
21708
|
+
}
|
|
21709
|
+
}
|
|
21710
|
+
});
|
|
21523
21711
|
setNewLayer(newLayer);
|
|
21524
21712
|
});
|
|
21525
21713
|
}
|
|
@@ -21822,12 +22010,12 @@ var NgwLeaflet = (function () {
|
|
|
21822
22010
|
headers,
|
|
21823
22011
|
drawOrderEnabled: (_a = webmap.draw_order_enabled) != null ? _a : false
|
|
21824
22012
|
});
|
|
21825
|
-
const layer = new this.NgwWebmapItem(
|
|
21826
|
-
this.options.webMap,
|
|
21827
|
-
webmap.root_item,
|
|
22013
|
+
const layer = new this.NgwWebmapItem({
|
|
22014
|
+
webMap: this.options.webMap,
|
|
22015
|
+
item: webmap.root_item,
|
|
21828
22016
|
options,
|
|
21829
22017
|
connector
|
|
21830
|
-
);
|
|
22018
|
+
});
|
|
21831
22019
|
layer.emitter.on("init", () => {
|
|
21832
22020
|
resolve(layer);
|
|
21833
22021
|
});
|
|
@@ -21893,6 +22081,7 @@ var NgwLeaflet = (function () {
|
|
|
21893
22081
|
}
|
|
21894
22082
|
}
|
|
21895
22083
|
_updateItemsParams(item, webMap, data) {
|
|
22084
|
+
var _a;
|
|
21896
22085
|
if (item) {
|
|
21897
22086
|
if (item.item_type === "group" || item.item_type === "root") {
|
|
21898
22087
|
if ("children" in item && item.children) {
|
|
@@ -21925,6 +22114,9 @@ var NgwLeaflet = (function () {
|
|
|
21925
22114
|
item = __spreadValues$f(__spreadValues$f({}, layerItem), layerAdapterOptions);
|
|
21926
22115
|
}
|
|
21927
22116
|
}
|
|
22117
|
+
if (typeof ((_a = this.options.nativeOptions) == null ? void 0 : _a.beforeItemCreated) === "function") {
|
|
22118
|
+
item = this.options.nativeOptions.beforeItemCreated(item);
|
|
22119
|
+
}
|
|
21928
22120
|
return item;
|
|
21929
22121
|
}
|
|
21930
22122
|
}
|
|
@@ -22810,42 +23002,6 @@ var NgwLeaflet = (function () {
|
|
|
22810
23002
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
22811
23003
|
});
|
|
22812
23004
|
};
|
|
22813
|
-
class Legend {
|
|
22814
|
-
constructor({
|
|
22815
|
-
layerId,
|
|
22816
|
-
legend,
|
|
22817
|
-
onSymbolRenderChange
|
|
22818
|
-
}) {
|
|
22819
|
-
__publicField$c(this, "layerId");
|
|
22820
|
-
__publicField$c(this, "legend");
|
|
22821
|
-
__publicField$c(this, "onSymbolRenderChange");
|
|
22822
|
-
this.layerId = layerId;
|
|
22823
|
-
this.legend = this.createLegend(legend);
|
|
22824
|
-
this.onSymbolRenderChange = onSymbolRenderChange;
|
|
22825
|
-
}
|
|
22826
|
-
createLegend(items) {
|
|
22827
|
-
return items.map((params) => __spreadProps$7(__spreadValues$9({}, params), {
|
|
22828
|
-
/** @deprecated use display_name instead */
|
|
22829
|
-
name: params.display_name,
|
|
22830
|
-
/** @deprecated use icon instead */
|
|
22831
|
-
symbol: params.icon
|
|
22832
|
-
}));
|
|
22833
|
-
}
|
|
22834
|
-
setSymbolRender(symbolIndex, status) {
|
|
22835
|
-
const legendItem = this.legend.find((l) => l.index === symbolIndex);
|
|
22836
|
-
if (legendItem) {
|
|
22837
|
-
const render = legendItem.render;
|
|
22838
|
-
if (render !== status) {
|
|
22839
|
-
legendItem.render = status;
|
|
22840
|
-
if (this.onSymbolRenderChange) {
|
|
22841
|
-
this.onSymbolRenderChange(
|
|
22842
|
-
this.legend.filter((l) => l.render).map((l) => l.index)
|
|
22843
|
-
);
|
|
22844
|
-
}
|
|
22845
|
-
}
|
|
22846
|
-
}
|
|
22847
|
-
}
|
|
22848
|
-
}
|
|
22849
23005
|
function createRasterAdapter(_0) {
|
|
22850
23006
|
return __async$b(this, arguments, function* ({
|
|
22851
23007
|
layerOptions,
|
|
@@ -22881,8 +23037,8 @@ var NgwLeaflet = (function () {
|
|
|
22881
23037
|
this.map = map;
|
|
22882
23038
|
__publicField$c(this, "item", item);
|
|
22883
23039
|
__publicField$c(this, "resourceId", resourceId);
|
|
22884
|
-
__publicField$c(this, "
|
|
22885
|
-
__publicField$c(this, "
|
|
23040
|
+
__publicField$c(this, "blocked", false);
|
|
23041
|
+
__publicField$c(this, "layerVisibility");
|
|
22886
23042
|
const opt = ngwApiToAdapterOptions({
|
|
22887
23043
|
options: layerOptions,
|
|
22888
23044
|
webMap,
|
|
@@ -22903,24 +23059,6 @@ var NgwLeaflet = (function () {
|
|
|
22903
23059
|
addLayer(addOptions) {
|
|
22904
23060
|
return super.addLayer(__spreadValues$9(__spreadValues$9({}, this.options), addOptions));
|
|
22905
23061
|
}
|
|
22906
|
-
showLayer() {
|
|
22907
|
-
this._layerVisibility = true;
|
|
22908
|
-
if (!this._blocked) {
|
|
22909
|
-
if (super.showLayer) {
|
|
22910
|
-
super.showLayer(this.layer);
|
|
22911
|
-
} else if (this.layer) {
|
|
22912
|
-
webMap.mapAdapter.showLayer(this.layer);
|
|
22913
|
-
}
|
|
22914
|
-
}
|
|
22915
|
-
}
|
|
22916
|
-
hideLayer() {
|
|
22917
|
-
this._layerVisibility = false;
|
|
22918
|
-
if (super.hideLayer) {
|
|
22919
|
-
super.hideLayer(this.layer);
|
|
22920
|
-
} else if (this.layer) {
|
|
22921
|
-
webMap.mapAdapter.hideLayer(this.layer);
|
|
22922
|
-
}
|
|
22923
|
-
}
|
|
22924
23062
|
getIdentificationIds() {
|
|
22925
23063
|
return __async$b(this, null, function* () {
|
|
22926
23064
|
if (this.item) {
|
|
@@ -22946,59 +23084,16 @@ var NgwLeaflet = (function () {
|
|
|
22946
23084
|
}, options));
|
|
22947
23085
|
const legend = new Legend({
|
|
22948
23086
|
layerId: id,
|
|
22949
|
-
|
|
22950
|
-
|
|
23087
|
+
layer: this,
|
|
23088
|
+
resourceId,
|
|
23089
|
+
webMap,
|
|
23090
|
+
legend: ngwLegend
|
|
22951
23091
|
});
|
|
22952
23092
|
return [legend];
|
|
22953
23093
|
}
|
|
22954
23094
|
return [];
|
|
22955
23095
|
});
|
|
22956
23096
|
}
|
|
22957
|
-
_hideLayer() {
|
|
22958
|
-
if (this.options.id) {
|
|
22959
|
-
webMap.mapAdapter.hideLayer(this.layer);
|
|
22960
|
-
}
|
|
22961
|
-
}
|
|
22962
|
-
_showLayer() {
|
|
22963
|
-
if (this.options.id) {
|
|
22964
|
-
if (this._layerVisibility) {
|
|
22965
|
-
webMap.showLayer(this.options.id, { silent: true });
|
|
22966
|
-
}
|
|
22967
|
-
}
|
|
22968
|
-
}
|
|
22969
|
-
_setLegendSymbol(renderIndexes) {
|
|
22970
|
-
const intervals = this._consolidateIntervals(renderIndexes);
|
|
22971
|
-
if (!intervals.length) {
|
|
22972
|
-
this._hideLayer();
|
|
22973
|
-
this._blocked = true;
|
|
22974
|
-
} else {
|
|
22975
|
-
this._blocked = false;
|
|
22976
|
-
this._showLayer();
|
|
22977
|
-
}
|
|
22978
|
-
if (this.updateLayer) {
|
|
22979
|
-
this.updateLayer({
|
|
22980
|
-
params: {
|
|
22981
|
-
[`symbols[${resourceId}]`]: intervals.join(",") || void 0
|
|
22982
|
-
}
|
|
22983
|
-
});
|
|
22984
|
-
}
|
|
22985
|
-
}
|
|
22986
|
-
_consolidateIntervals(symbols) {
|
|
22987
|
-
const sortedSymbols = symbols.slice().sort((a, b) => a - b);
|
|
22988
|
-
const intervals = [];
|
|
22989
|
-
let start = sortedSymbols[0];
|
|
22990
|
-
let end = start;
|
|
22991
|
-
for (let i = 1; i <= sortedSymbols.length; i++) {
|
|
22992
|
-
if (sortedSymbols[i] === end + 1) {
|
|
22993
|
-
end = sortedSymbols[i];
|
|
22994
|
-
} else {
|
|
22995
|
-
intervals.push(start === end ? `${start}` : `${start}-${end}`);
|
|
22996
|
-
start = sortedSymbols[i];
|
|
22997
|
-
end = start;
|
|
22998
|
-
}
|
|
22999
|
-
}
|
|
23000
|
-
return intervals;
|
|
23001
|
-
}
|
|
23002
23097
|
};
|
|
23003
23098
|
} else {
|
|
23004
23099
|
throw new Error(adapter + " not supported yet. Only TILE");
|
|
@@ -23360,16 +23455,25 @@ var NgwLeaflet = (function () {
|
|
|
23360
23455
|
});
|
|
23361
23456
|
}
|
|
23362
23457
|
resource(opt) {
|
|
23458
|
+
return __async$8(this, null, function* () {
|
|
23459
|
+
const composite = yield this.composite(opt);
|
|
23460
|
+
return composite.feature_layer;
|
|
23461
|
+
});
|
|
23462
|
+
}
|
|
23463
|
+
composite(opt) {
|
|
23363
23464
|
return __async$8(this, null, function* () {
|
|
23364
23465
|
if (this._resource && this._resource.feature_layer) {
|
|
23365
|
-
return this._resource
|
|
23466
|
+
return this._resource;
|
|
23366
23467
|
}
|
|
23367
23468
|
const resp = yield this.connector.getResource(this.layerId, opt);
|
|
23368
|
-
if (!
|
|
23369
|
-
throw new Error("Resource
|
|
23469
|
+
if (!resp) {
|
|
23470
|
+
throw new Error("Resource does not exist");
|
|
23471
|
+
}
|
|
23472
|
+
if (!resp.feature_layer) {
|
|
23473
|
+
throw new Error("Resource is not a vector layer");
|
|
23370
23474
|
}
|
|
23371
23475
|
this._resource = resp;
|
|
23372
|
-
return resp
|
|
23476
|
+
return resp;
|
|
23373
23477
|
});
|
|
23374
23478
|
}
|
|
23375
23479
|
getBounds(opt) {
|
|
@@ -23382,7 +23486,7 @@ var NgwLeaflet = (function () {
|
|
|
23382
23486
|
resourceId: this.layerId
|
|
23383
23487
|
}, opt));
|
|
23384
23488
|
}
|
|
23385
|
-
geojson(options) {
|
|
23489
|
+
geojson(options = {}) {
|
|
23386
23490
|
if (this._geojson) {
|
|
23387
23491
|
return Promise.resolve(this._geojson);
|
|
23388
23492
|
}
|
|
@@ -26344,7 +26448,8 @@ var NgwLeaflet = (function () {
|
|
|
26344
26448
|
const identFunc = typeof layer.getIdentificationIds === "function" ? layer.getIdentificationIds : false;
|
|
26345
26449
|
const interactive = (_a = layer.options.interactive) != null ? _a : true;
|
|
26346
26450
|
if (identFunc && layer.options.selectable && interactive && this.isLayerVisible(layer)) {
|
|
26347
|
-
|
|
26451
|
+
const layerIds = identFunc.call(layer);
|
|
26452
|
+
promises.push(layerIds);
|
|
26348
26453
|
}
|
|
26349
26454
|
}
|
|
26350
26455
|
const getIdsPromise = Promise.all(promises);
|