@nextgis/ngw-leaflet 3.0.0-alpha.17 → 3.0.0-alpha.19
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 +938 -827
- 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 +938 -827
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +1 -1
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.18; 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,13 @@ 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
|
-
var _a;
|
|
17045
17044
|
super(options);
|
|
17046
|
-
__publicField$
|
|
17045
|
+
__publicField$D(this, "defaultWmsParams", {
|
|
17047
17046
|
service: "WMS",
|
|
17048
17047
|
request: "GetMap",
|
|
17049
17048
|
version: "1.1.1",
|
|
@@ -17052,7 +17051,7 @@ var NgwLeaflet = (function () {
|
|
|
17052
17051
|
format: "image/jpeg",
|
|
17053
17052
|
transparent: false
|
|
17054
17053
|
});
|
|
17055
|
-
__publicField$
|
|
17054
|
+
__publicField$D(this, "options", {
|
|
17056
17055
|
crs: null,
|
|
17057
17056
|
uppercase: false,
|
|
17058
17057
|
attribution: "",
|
|
@@ -17066,28 +17065,31 @@ var NgwLeaflet = (function () {
|
|
|
17066
17065
|
viewPortBuffer: 0,
|
|
17067
17066
|
setViewDelay: 100
|
|
17068
17067
|
});
|
|
17069
|
-
__publicField$
|
|
17070
|
-
__publicField$
|
|
17071
|
-
__publicField$
|
|
17072
|
-
__publicField$
|
|
17073
|
-
__publicField$
|
|
17068
|
+
__publicField$D(this, "wmsParams");
|
|
17069
|
+
__publicField$D(this, "_url");
|
|
17070
|
+
__publicField$D(this, "_currentUrl");
|
|
17071
|
+
__publicField$D(this, "_currentOverlay");
|
|
17072
|
+
__publicField$D(this, "_loadedOverlay");
|
|
17074
17073
|
this._url = url;
|
|
17075
17074
|
const params = {};
|
|
17076
17075
|
const opts = {};
|
|
17077
17076
|
let opt;
|
|
17078
17077
|
for (opt in options) {
|
|
17078
|
+
const val = options[opt];
|
|
17079
17079
|
if (opt in this.options) {
|
|
17080
|
-
opts[opt] =
|
|
17081
|
-
}
|
|
17082
|
-
|
|
17080
|
+
opts[opt] = val;
|
|
17081
|
+
}
|
|
17082
|
+
}
|
|
17083
|
+
if (options.params) {
|
|
17084
|
+
for (const param in options.params) {
|
|
17085
|
+
const val = options.params[param];
|
|
17086
|
+
if (!isObject$1(val) && !Array.isArray(val) && typeof val !== "function") {
|
|
17087
|
+
params[param] = val;
|
|
17088
|
+
}
|
|
17083
17089
|
}
|
|
17084
17090
|
}
|
|
17085
17091
|
leafletSrcExports.Util.setOptions(this, opts);
|
|
17086
|
-
this.wmsParams = leafletSrcExports.Util.extend(
|
|
17087
|
-
{},
|
|
17088
|
-
this.defaultWmsParams,
|
|
17089
|
-
(_a = params == null ? void 0 : params.params) != null ? _a : {}
|
|
17090
|
-
);
|
|
17092
|
+
this.wmsParams = leafletSrcExports.Util.extend({}, this.defaultWmsParams, params);
|
|
17091
17093
|
}
|
|
17092
17094
|
setParams(params) {
|
|
17093
17095
|
leafletSrcExports.Util.extend(this.wmsParams, params);
|
|
@@ -17234,41 +17236,41 @@ var NgwLeaflet = (function () {
|
|
|
17234
17236
|
}
|
|
17235
17237
|
}
|
|
17236
17238
|
|
|
17237
|
-
var __defProp$
|
|
17238
|
-
var __defProps$
|
|
17239
|
-
var __getOwnPropDescs$
|
|
17240
|
-
var __getOwnPropSymbols$
|
|
17241
|
-
var __hasOwnProp$
|
|
17242
|
-
var __propIsEnum$
|
|
17243
|
-
var __defNormalProp$
|
|
17244
|
-
var __spreadValues$
|
|
17239
|
+
var __defProp$T = Object.defineProperty;
|
|
17240
|
+
var __defProps$o = Object.defineProperties;
|
|
17241
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
17242
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
17243
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
17244
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
17245
|
+
var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17246
|
+
var __spreadValues$A = (a, b) => {
|
|
17245
17247
|
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$
|
|
17248
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
17249
|
+
__defNormalProp$T(a, prop, b[prop]);
|
|
17250
|
+
if (__getOwnPropSymbols$B)
|
|
17251
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
17252
|
+
if (__propIsEnum$B.call(b, prop))
|
|
17253
|
+
__defNormalProp$T(a, prop, b[prop]);
|
|
17252
17254
|
}
|
|
17253
17255
|
return a;
|
|
17254
17256
|
};
|
|
17255
|
-
var __spreadProps$
|
|
17256
|
-
var __publicField$
|
|
17257
|
+
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
17258
|
+
var __publicField$C = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17257
17259
|
class ImageAdapter extends BaseAdapter {
|
|
17258
17260
|
constructor() {
|
|
17259
17261
|
super(...arguments);
|
|
17260
|
-
__publicField$
|
|
17262
|
+
__publicField$C(this, "layer");
|
|
17261
17263
|
}
|
|
17262
17264
|
addLayer(options) {
|
|
17263
17265
|
var _a;
|
|
17264
17266
|
const url = options && options.url;
|
|
17265
17267
|
if (url) {
|
|
17266
17268
|
const updateWmsParamsFromOpt = options.updateWmsParams;
|
|
17267
|
-
this.layer = new ImageLayer(url, __spreadValues$
|
|
17269
|
+
this.layer = new ImageLayer(url, __spreadValues$A(__spreadValues$A(__spreadValues$A({
|
|
17268
17270
|
pane: this.pane,
|
|
17269
17271
|
headers: options.headers,
|
|
17270
17272
|
setViewDelay: options.setViewDelay
|
|
17271
|
-
}, __spreadProps$
|
|
17273
|
+
}, __spreadProps$o(__spreadValues$A({
|
|
17272
17274
|
transparent: true
|
|
17273
17275
|
}, options), {
|
|
17274
17276
|
opacity: (_a = options.opacity) != null ? _a : void 0
|
|
@@ -17291,7 +17293,7 @@ var NgwLeaflet = (function () {
|
|
|
17291
17293
|
}
|
|
17292
17294
|
}
|
|
17293
17295
|
}
|
|
17294
|
-
__publicField$
|
|
17296
|
+
__publicField$C(ImageAdapter, "queue", imageQueue);
|
|
17295
17297
|
|
|
17296
17298
|
function makeRemote(Base) {
|
|
17297
17299
|
return class RemoteTileLayer extends Base {
|
|
@@ -17353,33 +17355,33 @@ var NgwLeaflet = (function () {
|
|
|
17353
17355
|
}
|
|
17354
17356
|
const TileLayer = makeRemote(TileLayerBase);
|
|
17355
17357
|
|
|
17356
|
-
var __defProp$
|
|
17357
|
-
var __defProps$
|
|
17358
|
-
var __getOwnPropDescs$
|
|
17359
|
-
var __getOwnPropSymbols$
|
|
17360
|
-
var __hasOwnProp$
|
|
17361
|
-
var __propIsEnum$
|
|
17362
|
-
var __defNormalProp$
|
|
17363
|
-
var __spreadValues$
|
|
17358
|
+
var __defProp$S = Object.defineProperty;
|
|
17359
|
+
var __defProps$n = Object.defineProperties;
|
|
17360
|
+
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
17361
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
17362
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
17363
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
17364
|
+
var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17365
|
+
var __spreadValues$z = (a, b) => {
|
|
17364
17366
|
for (var prop in b || (b = {}))
|
|
17365
|
-
if (__hasOwnProp$
|
|
17366
|
-
__defNormalProp$
|
|
17367
|
-
if (__getOwnPropSymbols$
|
|
17368
|
-
for (var prop of __getOwnPropSymbols$
|
|
17369
|
-
if (__propIsEnum$
|
|
17370
|
-
__defNormalProp$
|
|
17367
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
17368
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
17369
|
+
if (__getOwnPropSymbols$A)
|
|
17370
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
17371
|
+
if (__propIsEnum$A.call(b, prop))
|
|
17372
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
17371
17373
|
}
|
|
17372
17374
|
return a;
|
|
17373
17375
|
};
|
|
17374
|
-
var __spreadProps$
|
|
17376
|
+
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
17375
17377
|
var __objRest$7 = (source, exclude) => {
|
|
17376
17378
|
var target = {};
|
|
17377
17379
|
for (var prop in source)
|
|
17378
|
-
if (__hasOwnProp$
|
|
17380
|
+
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
17379
17381
|
target[prop] = source[prop];
|
|
17380
|
-
if (source != null && __getOwnPropSymbols$
|
|
17381
|
-
for (var prop of __getOwnPropSymbols$
|
|
17382
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
17382
|
+
if (source != null && __getOwnPropSymbols$A)
|
|
17383
|
+
for (var prop of __getOwnPropSymbols$A(source)) {
|
|
17384
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
|
|
17383
17385
|
target[prop] = source[prop];
|
|
17384
17386
|
}
|
|
17385
17387
|
return target;
|
|
@@ -17390,7 +17392,7 @@ var NgwLeaflet = (function () {
|
|
|
17390
17392
|
if (options) {
|
|
17391
17393
|
const _a = options, { url } = _a, opt = __objRest$7(_a, ["url"]);
|
|
17392
17394
|
if (url) {
|
|
17393
|
-
const tileLayerOptions = __spreadValues$
|
|
17395
|
+
const tileLayerOptions = __spreadValues$z({
|
|
17394
17396
|
pane: this.pane,
|
|
17395
17397
|
attribution: opt.attribution,
|
|
17396
17398
|
minZoom: opt.minZoom,
|
|
@@ -17401,7 +17403,7 @@ var NgwLeaflet = (function () {
|
|
|
17401
17403
|
}
|
|
17402
17404
|
let layer;
|
|
17403
17405
|
if (opt.headers || opt.withCredentials) {
|
|
17404
|
-
layer = new TileLayer(url, __spreadProps$
|
|
17406
|
+
layer = new TileLayer(url, __spreadProps$n(__spreadValues$z({}, tileLayerOptions), {
|
|
17405
17407
|
headers: opt.headers,
|
|
17406
17408
|
withCredentials: opt.withCredentials,
|
|
17407
17409
|
setViewDelay: opt.setViewDelay
|
|
@@ -17424,29 +17426,29 @@ var NgwLeaflet = (function () {
|
|
|
17424
17426
|
}
|
|
17425
17427
|
}
|
|
17426
17428
|
|
|
17427
|
-
var __defProp$
|
|
17428
|
-
var __defProps$
|
|
17429
|
-
var __getOwnPropDescs$
|
|
17430
|
-
var __getOwnPropSymbols$
|
|
17431
|
-
var __hasOwnProp$
|
|
17432
|
-
var __propIsEnum$
|
|
17433
|
-
var __defNormalProp$
|
|
17434
|
-
var __spreadValues$
|
|
17429
|
+
var __defProp$R = Object.defineProperty;
|
|
17430
|
+
var __defProps$m = Object.defineProperties;
|
|
17431
|
+
var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
|
|
17432
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
17433
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
17434
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
17435
|
+
var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17436
|
+
var __spreadValues$y = (a, b) => {
|
|
17435
17437
|
for (var prop in b || (b = {}))
|
|
17436
|
-
if (__hasOwnProp$
|
|
17437
|
-
__defNormalProp$
|
|
17438
|
-
if (__getOwnPropSymbols$
|
|
17439
|
-
for (var prop of __getOwnPropSymbols$
|
|
17440
|
-
if (__propIsEnum$
|
|
17441
|
-
__defNormalProp$
|
|
17438
|
+
if (__hasOwnProp$z.call(b, prop))
|
|
17439
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
17440
|
+
if (__getOwnPropSymbols$z)
|
|
17441
|
+
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
17442
|
+
if (__propIsEnum$z.call(b, prop))
|
|
17443
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
17442
17444
|
}
|
|
17443
17445
|
return a;
|
|
17444
17446
|
};
|
|
17445
|
-
var __spreadProps$
|
|
17447
|
+
var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
|
|
17446
17448
|
class OsmAdapter extends TileAdapter {
|
|
17447
17449
|
addLayer(options) {
|
|
17448
17450
|
const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
|
17449
|
-
return super.addLayer(__spreadProps$
|
|
17451
|
+
return super.addLayer(__spreadProps$m(__spreadValues$y({
|
|
17450
17452
|
name: "OpenStreetMap",
|
|
17451
17453
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
|
17452
17454
|
}, options), {
|
|
@@ -17462,33 +17464,33 @@ var NgwLeaflet = (function () {
|
|
|
17462
17464
|
}
|
|
17463
17465
|
const WmsLayer = makeRemote(WmsLayerBase);
|
|
17464
17466
|
|
|
17465
|
-
var __defProp$
|
|
17466
|
-
var __defProps$
|
|
17467
|
-
var __getOwnPropDescs$
|
|
17468
|
-
var __getOwnPropSymbols$
|
|
17469
|
-
var __hasOwnProp$
|
|
17470
|
-
var __propIsEnum$
|
|
17471
|
-
var __defNormalProp$
|
|
17472
|
-
var __spreadValues$
|
|
17467
|
+
var __defProp$Q = Object.defineProperty;
|
|
17468
|
+
var __defProps$l = Object.defineProperties;
|
|
17469
|
+
var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
|
|
17470
|
+
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
17471
|
+
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
17472
|
+
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
17473
|
+
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17474
|
+
var __spreadValues$x = (a, b) => {
|
|
17473
17475
|
for (var prop in b || (b = {}))
|
|
17474
|
-
if (__hasOwnProp$
|
|
17475
|
-
__defNormalProp$
|
|
17476
|
-
if (__getOwnPropSymbols$
|
|
17477
|
-
for (var prop of __getOwnPropSymbols$
|
|
17478
|
-
if (__propIsEnum$
|
|
17479
|
-
__defNormalProp$
|
|
17476
|
+
if (__hasOwnProp$y.call(b, prop))
|
|
17477
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
17478
|
+
if (__getOwnPropSymbols$y)
|
|
17479
|
+
for (var prop of __getOwnPropSymbols$y(b)) {
|
|
17480
|
+
if (__propIsEnum$y.call(b, prop))
|
|
17481
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
17480
17482
|
}
|
|
17481
17483
|
return a;
|
|
17482
17484
|
};
|
|
17483
|
-
var __spreadProps$
|
|
17485
|
+
var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
|
|
17484
17486
|
var __objRest$6 = (source, exclude) => {
|
|
17485
17487
|
var target = {};
|
|
17486
17488
|
for (var prop in source)
|
|
17487
|
-
if (__hasOwnProp$
|
|
17489
|
+
if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
17488
17490
|
target[prop] = source[prop];
|
|
17489
|
-
if (source != null && __getOwnPropSymbols$
|
|
17490
|
-
for (var prop of __getOwnPropSymbols$
|
|
17491
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
17491
|
+
if (source != null && __getOwnPropSymbols$y)
|
|
17492
|
+
for (var prop of __getOwnPropSymbols$y(source)) {
|
|
17493
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
|
|
17492
17494
|
target[prop] = source[prop];
|
|
17493
17495
|
}
|
|
17494
17496
|
return target;
|
|
@@ -17498,7 +17500,7 @@ var NgwLeaflet = (function () {
|
|
|
17498
17500
|
Object.assign(this.options, options);
|
|
17499
17501
|
const _a = options, { url } = _a, opt = __objRest$6(_a, ["url"]);
|
|
17500
17502
|
if (url) {
|
|
17501
|
-
const layerOptions = __spreadValues$
|
|
17503
|
+
const layerOptions = __spreadValues$x({
|
|
17502
17504
|
pane: this.pane,
|
|
17503
17505
|
attribution: opt.attribution,
|
|
17504
17506
|
minZoom: opt.minZoom,
|
|
@@ -17509,7 +17511,7 @@ var NgwLeaflet = (function () {
|
|
|
17509
17511
|
}, options.nativeOptions);
|
|
17510
17512
|
let layer;
|
|
17511
17513
|
if (opt.headers || opt.withCredentials) {
|
|
17512
|
-
layer = new WmsLayer(url, __spreadProps$
|
|
17514
|
+
layer = new WmsLayer(url, __spreadProps$l(__spreadValues$x({}, layerOptions), {
|
|
17513
17515
|
headers: opt.headers,
|
|
17514
17516
|
withCredentials: opt.withCredentials
|
|
17515
17517
|
}));
|
|
@@ -17529,33 +17531,33 @@ var NgwLeaflet = (function () {
|
|
|
17529
17531
|
];
|
|
17530
17532
|
}
|
|
17531
17533
|
|
|
17532
|
-
var __defProp$
|
|
17533
|
-
var __getOwnPropSymbols$
|
|
17534
|
-
var __hasOwnProp$
|
|
17535
|
-
var __propIsEnum$
|
|
17536
|
-
var __defNormalProp$
|
|
17537
|
-
var __spreadValues$
|
|
17534
|
+
var __defProp$P = Object.defineProperty;
|
|
17535
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
17536
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
17537
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
17538
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17539
|
+
var __spreadValues$w = (a, b) => {
|
|
17538
17540
|
for (var prop in b || (b = {}))
|
|
17539
|
-
if (__hasOwnProp$
|
|
17540
|
-
__defNormalProp$
|
|
17541
|
-
if (__getOwnPropSymbols$
|
|
17542
|
-
for (var prop of __getOwnPropSymbols$
|
|
17543
|
-
if (__propIsEnum$
|
|
17544
|
-
__defNormalProp$
|
|
17541
|
+
if (__hasOwnProp$x.call(b, prop))
|
|
17542
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
17543
|
+
if (__getOwnPropSymbols$x)
|
|
17544
|
+
for (var prop of __getOwnPropSymbols$x(b)) {
|
|
17545
|
+
if (__propIsEnum$x.call(b, prop))
|
|
17546
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
17545
17547
|
}
|
|
17546
17548
|
return a;
|
|
17547
17549
|
};
|
|
17548
|
-
var __publicField$
|
|
17550
|
+
var __publicField$B = (obj, key, value) => __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17549
17551
|
const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
17550
17552
|
constructor() {
|
|
17551
|
-
__publicField$
|
|
17552
|
-
__publicField$
|
|
17553
|
-
__publicField$
|
|
17554
|
-
__publicField$
|
|
17555
|
-
__publicField$
|
|
17556
|
-
__publicField$
|
|
17557
|
-
__publicField$
|
|
17558
|
-
__publicField$
|
|
17553
|
+
__publicField$B(this, "options", { target: "map" });
|
|
17554
|
+
__publicField$B(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
|
|
17555
|
+
__publicField$B(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
|
|
17556
|
+
__publicField$B(this, "emitter", new EventEmitter());
|
|
17557
|
+
__publicField$B(this, "map");
|
|
17558
|
+
__publicField$B(this, "_resizeObserver");
|
|
17559
|
+
__publicField$B(this, "_unselectCb", []);
|
|
17560
|
+
__publicField$B(this, "_universalEvents", [
|
|
17559
17561
|
"move",
|
|
17560
17562
|
"zoom",
|
|
17561
17563
|
"zoomend",
|
|
@@ -17563,14 +17565,14 @@ var NgwLeaflet = (function () {
|
|
|
17563
17565
|
"moveend",
|
|
17564
17566
|
"movestart"
|
|
17565
17567
|
]);
|
|
17566
|
-
__publicField$
|
|
17568
|
+
__publicField$B(this, "_positionEvents", [
|
|
17567
17569
|
"mousemove",
|
|
17568
17570
|
"mouseout",
|
|
17569
17571
|
"mouseover"
|
|
17570
17572
|
]);
|
|
17571
17573
|
}
|
|
17572
17574
|
create(options) {
|
|
17573
|
-
this.options = __spreadValues$
|
|
17575
|
+
this.options = __spreadValues$w({}, options);
|
|
17574
17576
|
if (this.options.target) {
|
|
17575
17577
|
const {
|
|
17576
17578
|
zoom,
|
|
@@ -17580,7 +17582,7 @@ var NgwLeaflet = (function () {
|
|
|
17580
17582
|
maxBounds: mb,
|
|
17581
17583
|
mapAdapterOptions
|
|
17582
17584
|
} = this.options;
|
|
17583
|
-
this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$
|
|
17585
|
+
this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$w({
|
|
17584
17586
|
attributionControl: false,
|
|
17585
17587
|
zoomControl: false,
|
|
17586
17588
|
maxBounds: mb ? arrayToBoundsExpression(mb) : void 0,
|
|
@@ -17863,7 +17865,7 @@ var NgwLeaflet = (function () {
|
|
|
17863
17865
|
}
|
|
17864
17866
|
}
|
|
17865
17867
|
};
|
|
17866
|
-
__publicField$
|
|
17868
|
+
__publicField$B(_LeafletMapAdapter, "layerAdapters", {
|
|
17867
17869
|
GEOJSON: GeoJsonAdapter,
|
|
17868
17870
|
IMAGE: ImageAdapter,
|
|
17869
17871
|
TILE: TileAdapter,
|
|
@@ -17871,11 +17873,11 @@ var NgwLeaflet = (function () {
|
|
|
17871
17873
|
// // MVT: MvtAdapter,
|
|
17872
17874
|
OSM: OsmAdapter
|
|
17873
17875
|
});
|
|
17874
|
-
__publicField$
|
|
17876
|
+
__publicField$B(_LeafletMapAdapter, "controlAdapters", {
|
|
17875
17877
|
ZOOM: leafletSrcExports.Control.Zoom,
|
|
17876
17878
|
ATTRIBUTION: AttributionControl
|
|
17877
17879
|
});
|
|
17878
|
-
__publicField$
|
|
17880
|
+
__publicField$B(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
|
|
17879
17881
|
let LeafletMapAdapter = _LeafletMapAdapter;
|
|
17880
17882
|
|
|
17881
17883
|
const svgPath = {
|
|
@@ -17963,23 +17965,23 @@ var NgwLeaflet = (function () {
|
|
|
17963
17965
|
});
|
|
17964
17966
|
}
|
|
17965
17967
|
|
|
17966
|
-
var __defProp$
|
|
17967
|
-
var __getOwnPropSymbols$
|
|
17968
|
-
var __hasOwnProp$
|
|
17969
|
-
var __propIsEnum$
|
|
17970
|
-
var __defNormalProp$
|
|
17971
|
-
var __spreadValues$
|
|
17968
|
+
var __defProp$O = Object.defineProperty;
|
|
17969
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
17970
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
17971
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
17972
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17973
|
+
var __spreadValues$v = (a, b) => {
|
|
17972
17974
|
for (var prop in b || (b = {}))
|
|
17973
|
-
if (__hasOwnProp$
|
|
17974
|
-
__defNormalProp$
|
|
17975
|
-
if (__getOwnPropSymbols$
|
|
17976
|
-
for (var prop of __getOwnPropSymbols$
|
|
17977
|
-
if (__propIsEnum$
|
|
17978
|
-
__defNormalProp$
|
|
17975
|
+
if (__hasOwnProp$w.call(b, prop))
|
|
17976
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
17977
|
+
if (__getOwnPropSymbols$w)
|
|
17978
|
+
for (var prop of __getOwnPropSymbols$w(b)) {
|
|
17979
|
+
if (__propIsEnum$w.call(b, prop))
|
|
17980
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
17979
17981
|
}
|
|
17980
17982
|
return a;
|
|
17981
17983
|
};
|
|
17982
|
-
var __async$
|
|
17984
|
+
var __async$v = (__this, __arguments, generator) => {
|
|
17983
17985
|
return new Promise((resolve, reject) => {
|
|
17984
17986
|
var fulfilled = (value) => {
|
|
17985
17987
|
try {
|
|
@@ -18000,7 +18002,7 @@ var NgwLeaflet = (function () {
|
|
|
18000
18002
|
});
|
|
18001
18003
|
};
|
|
18002
18004
|
function apiRequest(opt) {
|
|
18003
|
-
return __async$
|
|
18005
|
+
return __async$v(this, null, function* () {
|
|
18004
18006
|
const { params, name, connector, requestOptions } = opt;
|
|
18005
18007
|
const apiItems = yield connector.connect();
|
|
18006
18008
|
let apiItem = apiItems && apiItems[name];
|
|
@@ -18038,7 +18040,7 @@ var NgwLeaflet = (function () {
|
|
|
18038
18040
|
}
|
|
18039
18041
|
}
|
|
18040
18042
|
if (url) {
|
|
18041
|
-
return connector.makeQuery(url, params, __spreadValues$
|
|
18043
|
+
return connector.makeQuery(url, params, __spreadValues$v({
|
|
18042
18044
|
cacheName: name
|
|
18043
18045
|
}, requestOptions));
|
|
18044
18046
|
} else {
|
|
@@ -18050,12 +18052,12 @@ var NgwLeaflet = (function () {
|
|
|
18050
18052
|
});
|
|
18051
18053
|
}
|
|
18052
18054
|
|
|
18053
|
-
var __defProp$
|
|
18054
|
-
var __defNormalProp$
|
|
18055
|
-
var __publicField$
|
|
18055
|
+
var __defProp$N = Object.defineProperty;
|
|
18056
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18057
|
+
var __publicField$A = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18056
18058
|
const _Cache = class _Cache {
|
|
18057
18059
|
constructor(options = {}) {
|
|
18058
|
-
__publicField$
|
|
18060
|
+
__publicField$A(this, "cache", []);
|
|
18059
18061
|
var _a;
|
|
18060
18062
|
const namespace = (_a = options.namespace) != null ? _a : "default";
|
|
18061
18063
|
if (_Cache.instance[namespace]) {
|
|
@@ -18186,12 +18188,12 @@ var NgwLeaflet = (function () {
|
|
|
18186
18188
|
return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
|
|
18187
18189
|
}
|
|
18188
18190
|
};
|
|
18189
|
-
__publicField$
|
|
18191
|
+
__publicField$A(_Cache, "instance", {});
|
|
18190
18192
|
let Cache = _Cache;
|
|
18191
18193
|
|
|
18192
18194
|
var pkg = {
|
|
18193
18195
|
name: "@nextgis/ngw-connector",
|
|
18194
|
-
version: "3.0.0-alpha.
|
|
18196
|
+
version: "3.0.0-alpha.18",
|
|
18195
18197
|
_priority: 12,
|
|
18196
18198
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
18197
18199
|
main: "index.js",
|
|
@@ -18200,15 +18202,15 @@ var NgwLeaflet = (function () {
|
|
|
18200
18202
|
jsdelivr: "lib/ngw-connector.global.prod.js",
|
|
18201
18203
|
types: "lib/index.d.ts",
|
|
18202
18204
|
dependencies: {
|
|
18203
|
-
"@nextgis/cache": "^3.0.0-alpha.
|
|
18204
|
-
"@nextgis/cancelable-promise": "^3.0.0-alpha.
|
|
18205
|
-
"@nextgis/utils": "^3.0.0-alpha.
|
|
18205
|
+
"@nextgis/cache": "^3.0.0-alpha.17",
|
|
18206
|
+
"@nextgis/cancelable-promise": "^3.0.0-alpha.17",
|
|
18207
|
+
"@nextgis/utils": "^3.0.0-alpha.17",
|
|
18206
18208
|
"@types/events": "^3.0.0",
|
|
18207
18209
|
events: "*",
|
|
18208
18210
|
"form-data": "^4.0.0"
|
|
18209
18211
|
},
|
|
18210
18212
|
devDependencies: {
|
|
18211
|
-
"@nextgis/build-tools": "^3.0.0-alpha.
|
|
18213
|
+
"@nextgis/build-tools": "^3.0.0-alpha.17"
|
|
18212
18214
|
},
|
|
18213
18215
|
scripts: {
|
|
18214
18216
|
clean: "rimraf ./lib",
|
|
@@ -18255,46 +18257,46 @@ var NgwLeaflet = (function () {
|
|
|
18255
18257
|
}
|
|
18256
18258
|
}
|
|
18257
18259
|
|
|
18258
|
-
var __defProp$
|
|
18259
|
-
var __defNormalProp$
|
|
18260
|
-
var __publicField$
|
|
18260
|
+
var __defProp$M = Object.defineProperty;
|
|
18261
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18262
|
+
var __publicField$z = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18261
18263
|
class NgwError extends Error {
|
|
18262
18264
|
constructor(er) {
|
|
18263
18265
|
super();
|
|
18264
|
-
__publicField$
|
|
18265
|
-
__publicField$
|
|
18266
|
-
__publicField$
|
|
18267
|
-
__publicField$
|
|
18268
|
-
__publicField$
|
|
18269
|
-
__publicField$
|
|
18270
|
-
__publicField$
|
|
18271
|
-
__publicField$
|
|
18266
|
+
__publicField$z(this, "name", "NgwError");
|
|
18267
|
+
__publicField$z(this, "title");
|
|
18268
|
+
__publicField$z(this, "message");
|
|
18269
|
+
__publicField$z(this, "detail");
|
|
18270
|
+
__publicField$z(this, "exception");
|
|
18271
|
+
__publicField$z(this, "status_code");
|
|
18272
|
+
__publicField$z(this, "data");
|
|
18273
|
+
__publicField$z(this, "guru_meditation");
|
|
18272
18274
|
Object.assign(this, er);
|
|
18273
18275
|
Object.setPrototypeOf(this, NgwError.prototype);
|
|
18274
18276
|
}
|
|
18275
18277
|
}
|
|
18276
18278
|
|
|
18277
|
-
var __defProp$
|
|
18278
|
-
var __defNormalProp$
|
|
18279
|
-
var __publicField$
|
|
18279
|
+
var __defProp$L = Object.defineProperty;
|
|
18280
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18281
|
+
var __publicField$y = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18280
18282
|
class InsufficientPermissionsError extends NgwError {
|
|
18281
18283
|
constructor(obj) {
|
|
18282
18284
|
super(obj);
|
|
18283
|
-
__publicField$
|
|
18284
|
-
__publicField$
|
|
18285
|
+
__publicField$y(this, "name", "InsufficientPermissionsError");
|
|
18286
|
+
__publicField$y(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
|
|
18285
18287
|
Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
|
|
18286
18288
|
}
|
|
18287
18289
|
}
|
|
18288
18290
|
|
|
18289
|
-
var __defProp$
|
|
18290
|
-
var __defNormalProp$
|
|
18291
|
-
var __publicField$
|
|
18291
|
+
var __defProp$K = Object.defineProperty;
|
|
18292
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18293
|
+
var __publicField$x = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18292
18294
|
let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
|
|
18293
18295
|
constructor(obj) {
|
|
18294
18296
|
super(obj);
|
|
18295
|
-
__publicField$
|
|
18296
|
-
__publicField$
|
|
18297
|
-
__publicField$
|
|
18297
|
+
__publicField$x(this, "message", "There is no response from the server or problem connecting to server.");
|
|
18298
|
+
__publicField$x(this, "title", "Network error");
|
|
18299
|
+
__publicField$x(this, "detail", "Check network connectivity and try again later.");
|
|
18298
18300
|
Object.setPrototypeOf(this, NetworksResponseError.prototype);
|
|
18299
18301
|
}
|
|
18300
18302
|
};
|
|
@@ -18331,27 +18333,27 @@ var NgwLeaflet = (function () {
|
|
|
18331
18333
|
return false;
|
|
18332
18334
|
}
|
|
18333
18335
|
|
|
18334
|
-
var __defProp$
|
|
18335
|
-
var __defNormalProp$
|
|
18336
|
-
var __publicField$
|
|
18336
|
+
var __defProp$J = Object.defineProperty;
|
|
18337
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18338
|
+
var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, key + "" , value);
|
|
18337
18339
|
class NetworkError extends Error {
|
|
18338
18340
|
constructor(url) {
|
|
18339
18341
|
super();
|
|
18340
|
-
__publicField$
|
|
18342
|
+
__publicField$w(this, "name", "NetworkError");
|
|
18341
18343
|
Object.setPrototypeOf(this, NetworkError.prototype);
|
|
18342
18344
|
this.message = `Unable to request ${url}.
|
|
18343
18345
|
Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
|
|
18344
18346
|
}
|
|
18345
18347
|
}
|
|
18346
18348
|
|
|
18347
|
-
var __defProp$
|
|
18348
|
-
var __defNormalProp$
|
|
18349
|
-
var __publicField$
|
|
18349
|
+
var __defProp$I = Object.defineProperty;
|
|
18350
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18351
|
+
var __publicField$v = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18350
18352
|
class ResourceNotFoundError extends NgwError {
|
|
18351
18353
|
constructor(obj) {
|
|
18352
18354
|
super(obj);
|
|
18353
|
-
__publicField$
|
|
18354
|
-
__publicField$
|
|
18355
|
+
__publicField$v(this, "name", "ResourceNotFoundError");
|
|
18356
|
+
__publicField$v(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
|
|
18355
18357
|
Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
|
|
18356
18358
|
}
|
|
18357
18359
|
}
|
|
@@ -18368,13 +18370,13 @@ var NgwLeaflet = (function () {
|
|
|
18368
18370
|
isError: isError
|
|
18369
18371
|
});
|
|
18370
18372
|
|
|
18371
|
-
var __defProp$
|
|
18372
|
-
var __defNormalProp$
|
|
18373
|
-
var __publicField$
|
|
18373
|
+
var __defProp$H = Object.defineProperty;
|
|
18374
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18375
|
+
var __publicField$u = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18374
18376
|
class BaseAPIError extends Error {
|
|
18375
18377
|
constructor(message) {
|
|
18376
18378
|
super(message || "Something went wrong.");
|
|
18377
|
-
__publicField$
|
|
18379
|
+
__publicField$u(this, "title");
|
|
18378
18380
|
this.name = "BaseAPIError";
|
|
18379
18381
|
this.title = "Unknown API error";
|
|
18380
18382
|
if (Error.captureStackTrace) {
|
|
@@ -18386,7 +18388,7 @@ var NgwLeaflet = (function () {
|
|
|
18386
18388
|
// prettier-ignore
|
|
18387
18389
|
constructor(message) {
|
|
18388
18390
|
super(message || "There is no response from the server or problem connecting to server.");
|
|
18389
|
-
__publicField$
|
|
18391
|
+
__publicField$u(this, "detail");
|
|
18390
18392
|
this.title = "Network error";
|
|
18391
18393
|
this.detail = "Check network connectivity and try again later.";
|
|
18392
18394
|
}
|
|
@@ -18400,8 +18402,8 @@ var NgwLeaflet = (function () {
|
|
|
18400
18402
|
class ServerResponseError extends BaseAPIError {
|
|
18401
18403
|
constructor(data) {
|
|
18402
18404
|
super(data.message);
|
|
18403
|
-
__publicField$
|
|
18404
|
-
__publicField$
|
|
18405
|
+
__publicField$u(this, "detail");
|
|
18406
|
+
__publicField$u(this, "data");
|
|
18405
18407
|
this.title = data.title || this.title;
|
|
18406
18408
|
this.detail = data.detail || null;
|
|
18407
18409
|
this.data = data;
|
|
@@ -18411,8 +18413,8 @@ var NgwLeaflet = (function () {
|
|
|
18411
18413
|
// prettier-ignore
|
|
18412
18414
|
constructor(message, data = {}) {
|
|
18413
18415
|
super(message || "Unexpected error while processing long-running request.");
|
|
18414
|
-
__publicField$
|
|
18415
|
-
__publicField$
|
|
18416
|
+
__publicField$u(this, "title");
|
|
18417
|
+
__publicField$u(this, "data");
|
|
18416
18418
|
this.name = "LunkwillError";
|
|
18417
18419
|
this.title = "Long-running request error";
|
|
18418
18420
|
this.data = data;
|
|
@@ -18432,35 +18434,35 @@ var NgwLeaflet = (function () {
|
|
|
18432
18434
|
}
|
|
18433
18435
|
}
|
|
18434
18436
|
|
|
18435
|
-
var __defProp$
|
|
18436
|
-
var __getOwnPropSymbols$
|
|
18437
|
-
var __hasOwnProp$
|
|
18438
|
-
var __propIsEnum$
|
|
18439
|
-
var __defNormalProp$
|
|
18440
|
-
var __spreadValues$
|
|
18437
|
+
var __defProp$G = Object.defineProperty;
|
|
18438
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
18439
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
18440
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
18441
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18442
|
+
var __spreadValues$u = (a, b) => {
|
|
18441
18443
|
for (var prop in b || (b = {}))
|
|
18442
|
-
if (__hasOwnProp$
|
|
18443
|
-
__defNormalProp$
|
|
18444
|
-
if (__getOwnPropSymbols$
|
|
18445
|
-
for (var prop of __getOwnPropSymbols$
|
|
18446
|
-
if (__propIsEnum$
|
|
18447
|
-
__defNormalProp$
|
|
18444
|
+
if (__hasOwnProp$v.call(b, prop))
|
|
18445
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
18446
|
+
if (__getOwnPropSymbols$v)
|
|
18447
|
+
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
18448
|
+
if (__propIsEnum$v.call(b, prop))
|
|
18449
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
18448
18450
|
}
|
|
18449
18451
|
return a;
|
|
18450
18452
|
};
|
|
18451
18453
|
var __objRest$5 = (source, exclude) => {
|
|
18452
18454
|
var target = {};
|
|
18453
18455
|
for (var prop in source)
|
|
18454
|
-
if (__hasOwnProp$
|
|
18456
|
+
if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
18455
18457
|
target[prop] = source[prop];
|
|
18456
|
-
if (source != null && __getOwnPropSymbols$
|
|
18457
|
-
for (var prop of __getOwnPropSymbols$
|
|
18458
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
18458
|
+
if (source != null && __getOwnPropSymbols$v)
|
|
18459
|
+
for (var prop of __getOwnPropSymbols$v(source)) {
|
|
18460
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
|
|
18459
18461
|
target[prop] = source[prop];
|
|
18460
18462
|
}
|
|
18461
18463
|
return target;
|
|
18462
18464
|
};
|
|
18463
|
-
var __async$
|
|
18465
|
+
var __async$u = (__this, __arguments, generator) => {
|
|
18464
18466
|
return new Promise((resolve, reject) => {
|
|
18465
18467
|
var fulfilled = (value) => {
|
|
18466
18468
|
try {
|
|
@@ -18485,7 +18487,7 @@ var NgwLeaflet = (function () {
|
|
|
18485
18487
|
return ct !== void 0 && ct !== null && ct.includes("application/vnd.lunkwill.request-summary+json");
|
|
18486
18488
|
}
|
|
18487
18489
|
function responseJson(response) {
|
|
18488
|
-
return __async$
|
|
18490
|
+
return __async$u(this, null, function* () {
|
|
18489
18491
|
try {
|
|
18490
18492
|
return response.json();
|
|
18491
18493
|
} catch (e) {
|
|
@@ -18494,7 +18496,7 @@ var NgwLeaflet = (function () {
|
|
|
18494
18496
|
});
|
|
18495
18497
|
}
|
|
18496
18498
|
function lunkwillResponseUrl(lwResp) {
|
|
18497
|
-
return __async$
|
|
18499
|
+
return __async$u(this, null, function* () {
|
|
18498
18500
|
const lwData = yield responseJson(lwResp);
|
|
18499
18501
|
let delay = lwData.delay_ms;
|
|
18500
18502
|
const retry = lwData.retry_ms !== void 0 ? lwData.retry_ms : 2e3;
|
|
@@ -18538,7 +18540,7 @@ var NgwLeaflet = (function () {
|
|
|
18538
18540
|
});
|
|
18539
18541
|
}
|
|
18540
18542
|
function lunkwillFetch(lwRespUrl) {
|
|
18541
|
-
return __async$
|
|
18543
|
+
return __async$u(this, null, function* () {
|
|
18542
18544
|
try {
|
|
18543
18545
|
return yield window.fetch(lwRespUrl, { credentials: "same-origin" });
|
|
18544
18546
|
} catch (e) {
|
|
@@ -18586,14 +18588,14 @@ var NgwLeaflet = (function () {
|
|
|
18586
18588
|
return path + urlParams;
|
|
18587
18589
|
}
|
|
18588
18590
|
function request(path, options, cacheEngine) {
|
|
18589
|
-
return __async$
|
|
18591
|
+
return __async$u(this, null, function* () {
|
|
18590
18592
|
var _b, _c;
|
|
18591
18593
|
const defaults = {
|
|
18592
18594
|
method: "GET",
|
|
18593
18595
|
credentials: "same-origin",
|
|
18594
18596
|
headers: {}
|
|
18595
18597
|
};
|
|
18596
|
-
const _a = __spreadValues$
|
|
18598
|
+
const _a = __spreadValues$u(__spreadValues$u({}, defaults), options), {
|
|
18597
18599
|
withCredentials,
|
|
18598
18600
|
responseType,
|
|
18599
18601
|
cacheProps,
|
|
@@ -18630,7 +18632,7 @@ var NgwLeaflet = (function () {
|
|
|
18630
18632
|
opt.headers = headers;
|
|
18631
18633
|
}
|
|
18632
18634
|
const url = generateUrl(path, query);
|
|
18633
|
-
const makeRequest = () => __async$
|
|
18635
|
+
const makeRequest = () => __async$u(this, null, function* () {
|
|
18634
18636
|
let response;
|
|
18635
18637
|
try {
|
|
18636
18638
|
response = yield fetch(url, opt);
|
|
@@ -18673,7 +18675,7 @@ var NgwLeaflet = (function () {
|
|
|
18673
18675
|
if (cacheEngine) {
|
|
18674
18676
|
if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
|
|
18675
18677
|
if (cache !== false) {
|
|
18676
|
-
const props = cacheProps ? cacheProps : __spreadValues$
|
|
18678
|
+
const props = cacheProps ? cacheProps : __spreadValues$u({}, objectRemoveEmpty({
|
|
18677
18679
|
withCredentials,
|
|
18678
18680
|
responseType
|
|
18679
18681
|
}));
|
|
@@ -18693,38 +18695,38 @@ var NgwLeaflet = (function () {
|
|
|
18693
18695
|
});
|
|
18694
18696
|
}
|
|
18695
18697
|
|
|
18696
|
-
var __defProp$
|
|
18697
|
-
var __defProps$
|
|
18698
|
-
var __getOwnPropDescs$
|
|
18699
|
-
var __getOwnPropSymbols$
|
|
18700
|
-
var __hasOwnProp$
|
|
18701
|
-
var __propIsEnum$
|
|
18702
|
-
var __defNormalProp$
|
|
18703
|
-
var __spreadValues$
|
|
18698
|
+
var __defProp$F = Object.defineProperty;
|
|
18699
|
+
var __defProps$k = Object.defineProperties;
|
|
18700
|
+
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
18701
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
18702
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
18703
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
18704
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18705
|
+
var __spreadValues$t = (a, b) => {
|
|
18704
18706
|
for (var prop in b || (b = {}))
|
|
18705
|
-
if (__hasOwnProp$
|
|
18706
|
-
__defNormalProp$
|
|
18707
|
-
if (__getOwnPropSymbols$
|
|
18708
|
-
for (var prop of __getOwnPropSymbols$
|
|
18709
|
-
if (__propIsEnum$
|
|
18710
|
-
__defNormalProp$
|
|
18707
|
+
if (__hasOwnProp$u.call(b, prop))
|
|
18708
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
18709
|
+
if (__getOwnPropSymbols$u)
|
|
18710
|
+
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
18711
|
+
if (__propIsEnum$u.call(b, prop))
|
|
18712
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
18711
18713
|
}
|
|
18712
18714
|
return a;
|
|
18713
18715
|
};
|
|
18714
|
-
var __spreadProps$
|
|
18716
|
+
var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
|
|
18715
18717
|
var __objRest$4 = (source, exclude) => {
|
|
18716
18718
|
var target = {};
|
|
18717
18719
|
for (var prop in source)
|
|
18718
|
-
if (__hasOwnProp$
|
|
18720
|
+
if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
18719
18721
|
target[prop] = source[prop];
|
|
18720
|
-
if (source != null && __getOwnPropSymbols$
|
|
18721
|
-
for (var prop of __getOwnPropSymbols$
|
|
18722
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
18722
|
+
if (source != null && __getOwnPropSymbols$u)
|
|
18723
|
+
for (var prop of __getOwnPropSymbols$u(source)) {
|
|
18724
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
|
|
18723
18725
|
target[prop] = source[prop];
|
|
18724
18726
|
}
|
|
18725
18727
|
return target;
|
|
18726
18728
|
};
|
|
18727
|
-
var __async$
|
|
18729
|
+
var __async$t = (__this, __arguments, generator) => {
|
|
18728
18730
|
return new Promise((resolve, reject) => {
|
|
18729
18731
|
var fulfilled = (value) => {
|
|
18730
18732
|
try {
|
|
@@ -18775,7 +18777,7 @@ var NgwLeaflet = (function () {
|
|
|
18775
18777
|
}
|
|
18776
18778
|
function route(name, connector, ...rest) {
|
|
18777
18779
|
const result = {
|
|
18778
|
-
url: (opt) => __async$
|
|
18780
|
+
url: (opt) => __async$t(this, null, function* () {
|
|
18779
18781
|
var _a;
|
|
18780
18782
|
const routeData = yield connector.connect();
|
|
18781
18783
|
const template = routeURL(
|
|
@@ -18803,10 +18805,10 @@ var NgwLeaflet = (function () {
|
|
|
18803
18805
|
routeData,
|
|
18804
18806
|
...rest
|
|
18805
18807
|
);
|
|
18806
|
-
const headers = objectRemoveEmpty(__spreadValues$
|
|
18808
|
+
const headers = objectRemoveEmpty(__spreadValues$t(__spreadValues$t({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
|
|
18807
18809
|
return request(
|
|
18808
18810
|
template,
|
|
18809
|
-
__spreadProps$
|
|
18811
|
+
__spreadProps$k(__spreadValues$t({
|
|
18810
18812
|
headers
|
|
18811
18813
|
}, restOpt), {
|
|
18812
18814
|
method
|
|
@@ -18930,39 +18932,39 @@ var NgwLeaflet = (function () {
|
|
|
18930
18932
|
}
|
|
18931
18933
|
}
|
|
18932
18934
|
|
|
18933
|
-
var __defProp$
|
|
18934
|
-
var __defProps$
|
|
18935
|
-
var __getOwnPropDescs$
|
|
18936
|
-
var __getOwnPropSymbols$
|
|
18937
|
-
var __hasOwnProp$
|
|
18938
|
-
var __propIsEnum$
|
|
18939
|
-
var __defNormalProp$
|
|
18940
|
-
var __spreadValues$
|
|
18935
|
+
var __defProp$E = Object.defineProperty;
|
|
18936
|
+
var __defProps$j = Object.defineProperties;
|
|
18937
|
+
var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
|
|
18938
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
18939
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
18940
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
18941
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18942
|
+
var __spreadValues$s = (a, b) => {
|
|
18941
18943
|
for (var prop in b || (b = {}))
|
|
18942
|
-
if (__hasOwnProp$
|
|
18943
|
-
__defNormalProp$
|
|
18944
|
-
if (__getOwnPropSymbols$
|
|
18945
|
-
for (var prop of __getOwnPropSymbols$
|
|
18946
|
-
if (__propIsEnum$
|
|
18947
|
-
__defNormalProp$
|
|
18944
|
+
if (__hasOwnProp$t.call(b, prop))
|
|
18945
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
18946
|
+
if (__getOwnPropSymbols$t)
|
|
18947
|
+
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
18948
|
+
if (__propIsEnum$t.call(b, prop))
|
|
18949
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
18948
18950
|
}
|
|
18949
18951
|
return a;
|
|
18950
18952
|
};
|
|
18951
|
-
var __spreadProps$
|
|
18953
|
+
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
|
|
18952
18954
|
var __objRest$3 = (source, exclude) => {
|
|
18953
18955
|
var target = {};
|
|
18954
18956
|
for (var prop in source)
|
|
18955
|
-
if (__hasOwnProp$
|
|
18957
|
+
if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
18956
18958
|
target[prop] = source[prop];
|
|
18957
|
-
if (source != null && __getOwnPropSymbols$
|
|
18958
|
-
for (var prop of __getOwnPropSymbols$
|
|
18959
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
18959
|
+
if (source != null && __getOwnPropSymbols$t)
|
|
18960
|
+
for (var prop of __getOwnPropSymbols$t(source)) {
|
|
18961
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
|
|
18960
18962
|
target[prop] = source[prop];
|
|
18961
18963
|
}
|
|
18962
18964
|
return target;
|
|
18963
18965
|
};
|
|
18964
|
-
var __publicField$
|
|
18965
|
-
var __async$
|
|
18966
|
+
var __publicField$t = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18967
|
+
var __async$s = (__this, __arguments, generator) => {
|
|
18966
18968
|
return new Promise((resolve, reject) => {
|
|
18967
18969
|
var fulfilled = (value) => {
|
|
18968
18970
|
try {
|
|
@@ -18987,18 +18989,18 @@ var NgwLeaflet = (function () {
|
|
|
18987
18989
|
class NgwConnector {
|
|
18988
18990
|
constructor(options) {
|
|
18989
18991
|
this.options = options;
|
|
18990
|
-
__publicField$
|
|
18991
|
-
__publicField$
|
|
18992
|
-
__publicField$
|
|
18993
|
-
__publicField$
|
|
18994
|
-
__publicField$
|
|
18992
|
+
__publicField$t(this, "id", ID$2++);
|
|
18993
|
+
__publicField$t(this, "emitter", new EventEmitter());
|
|
18994
|
+
__publicField$t(this, "user");
|
|
18995
|
+
__publicField$t(this, "cache");
|
|
18996
|
+
__publicField$t(this, "withCredentials");
|
|
18995
18997
|
// Dedicated cache for route requests, as these are executed before any other requests.
|
|
18996
18998
|
// This cache does not need to be cleared during the session.
|
|
18997
|
-
__publicField$
|
|
18998
|
-
__publicField$
|
|
18999
|
-
__publicField$
|
|
19000
|
-
__publicField$
|
|
19001
|
-
__publicField$
|
|
18999
|
+
__publicField$t(this, "routeCache");
|
|
19000
|
+
__publicField$t(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
|
|
19001
|
+
__publicField$t(this, "routeStr", "/api/component/pyramid/route");
|
|
19002
|
+
__publicField$t(this, "activeRequests", {});
|
|
19003
|
+
__publicField$t(this, "requestTransform");
|
|
19002
19004
|
const exist = findConnector(options);
|
|
19003
19005
|
this.cache = new Cache({ namespace: options.cacheId });
|
|
19004
19006
|
this.routeCache = new Cache({ namespace: "routecache" });
|
|
@@ -19051,7 +19053,7 @@ var NgwLeaflet = (function () {
|
|
|
19051
19053
|
* ```
|
|
19052
19054
|
*/
|
|
19053
19055
|
connect() {
|
|
19054
|
-
return __async$
|
|
19056
|
+
return __async$s(this, arguments, function* ({
|
|
19055
19057
|
signal
|
|
19056
19058
|
} = {}) {
|
|
19057
19059
|
const auth = this.options.auth;
|
|
@@ -19090,14 +19092,14 @@ var NgwLeaflet = (function () {
|
|
|
19090
19092
|
this.emitter.emit("logout");
|
|
19091
19093
|
}
|
|
19092
19094
|
getUserInfo(credentials, options) {
|
|
19093
|
-
return __async$
|
|
19095
|
+
return __async$s(this, null, function* () {
|
|
19094
19096
|
if (this.user && this.user.id) {
|
|
19095
19097
|
return this.user;
|
|
19096
19098
|
}
|
|
19097
19099
|
if (credentials) {
|
|
19098
19100
|
this.options.auth = credentials;
|
|
19099
19101
|
}
|
|
19100
|
-
const options_ = __spreadValues$
|
|
19102
|
+
const options_ = __spreadValues$s({
|
|
19101
19103
|
headers: this.getAuthorizationHeaders(credentials),
|
|
19102
19104
|
cache: true
|
|
19103
19105
|
}, options);
|
|
@@ -19138,7 +19140,7 @@ var NgwLeaflet = (function () {
|
|
|
19138
19140
|
this.activeRequests = {};
|
|
19139
19141
|
}
|
|
19140
19142
|
getActiveApiRequests() {
|
|
19141
|
-
return __spreadValues$
|
|
19143
|
+
return __spreadValues$s({}, this.activeRequests);
|
|
19142
19144
|
}
|
|
19143
19145
|
route(name, ...rest) {
|
|
19144
19146
|
return route(name, this, ...rest);
|
|
@@ -19150,7 +19152,7 @@ var NgwLeaflet = (function () {
|
|
|
19150
19152
|
* @param options - Request options
|
|
19151
19153
|
*/
|
|
19152
19154
|
makeQuery(_0, _1) {
|
|
19153
|
-
return __async$
|
|
19155
|
+
return __async$s(this, arguments, function* (url, params, options = {}) {
|
|
19154
19156
|
var _b;
|
|
19155
19157
|
url = (this.options.baseUrl ? this.options.baseUrl : "") + url;
|
|
19156
19158
|
if (!url) {
|
|
@@ -19161,7 +19163,7 @@ var NgwLeaflet = (function () {
|
|
|
19161
19163
|
url = template(url, restParams);
|
|
19162
19164
|
}
|
|
19163
19165
|
url = encodeURI(fixUrlStr(url));
|
|
19164
|
-
options = __spreadValues$
|
|
19166
|
+
options = __spreadValues$s({ withCredentials: this.withCredentials }, options);
|
|
19165
19167
|
const {
|
|
19166
19168
|
cache,
|
|
19167
19169
|
signal: externalSignal,
|
|
@@ -19183,7 +19185,7 @@ var NgwLeaflet = (function () {
|
|
|
19183
19185
|
});
|
|
19184
19186
|
}
|
|
19185
19187
|
options.signal = internalSignal;
|
|
19186
|
-
const createPromise = () => __async$
|
|
19188
|
+
const createPromise = () => __async$s(this, null, function* () {
|
|
19187
19189
|
const id = REQUEST_ID++;
|
|
19188
19190
|
this.activeRequests[id] = internalAbortController;
|
|
19189
19191
|
try {
|
|
@@ -19193,7 +19195,7 @@ var NgwLeaflet = (function () {
|
|
|
19193
19195
|
}
|
|
19194
19196
|
});
|
|
19195
19197
|
if (method === "GET" && cache !== false) {
|
|
19196
|
-
const cacheOptions = cacheProps ? cacheProps : __spreadProps$
|
|
19198
|
+
const cacheOptions = cacheProps ? cacheProps : __spreadProps$j(__spreadValues$s({}, objectRemoveEmpty({
|
|
19197
19199
|
headers,
|
|
19198
19200
|
withCredentials,
|
|
19199
19201
|
responseType,
|
|
@@ -19216,7 +19218,7 @@ var NgwLeaflet = (function () {
|
|
|
19216
19218
|
var _a;
|
|
19217
19219
|
if (this.user) {
|
|
19218
19220
|
options = options || {};
|
|
19219
|
-
options.headers = __spreadValues$
|
|
19221
|
+
options.headers = __spreadValues$s(__spreadValues$s({}, this.getAuthorizationHeaders()), options.headers);
|
|
19220
19222
|
}
|
|
19221
19223
|
if (this.requestTransform) {
|
|
19222
19224
|
const [transUrl, transOptions] = this.requestTransform(url, options);
|
|
@@ -19247,7 +19249,7 @@ var NgwLeaflet = (function () {
|
|
|
19247
19249
|
});
|
|
19248
19250
|
}
|
|
19249
19251
|
_login(credentials, options) {
|
|
19250
|
-
return __async$
|
|
19252
|
+
return __async$s(this, null, function* () {
|
|
19251
19253
|
try {
|
|
19252
19254
|
const data = yield this.getUserInfo(credentials, options);
|
|
19253
19255
|
this.user = data;
|
|
@@ -19275,7 +19277,7 @@ var NgwLeaflet = (function () {
|
|
|
19275
19277
|
return er;
|
|
19276
19278
|
}
|
|
19277
19279
|
}
|
|
19278
|
-
__publicField$
|
|
19280
|
+
__publicField$t(NgwConnector, "errors", errors);
|
|
19279
19281
|
|
|
19280
19282
|
function resourceCompare(res1, res2) {
|
|
19281
19283
|
return objectDeepEqual(res1, res2);
|
|
@@ -19305,27 +19307,27 @@ var NgwLeaflet = (function () {
|
|
|
19305
19307
|
return query;
|
|
19306
19308
|
}
|
|
19307
19309
|
|
|
19308
|
-
var __defProp$
|
|
19309
|
-
var __defProps$
|
|
19310
|
-
var __getOwnPropDescs$
|
|
19311
|
-
var __getOwnPropSymbols$
|
|
19312
|
-
var __hasOwnProp$
|
|
19313
|
-
var __propIsEnum$
|
|
19314
|
-
var __defNormalProp$
|
|
19315
|
-
var __spreadValues$
|
|
19310
|
+
var __defProp$D = Object.defineProperty;
|
|
19311
|
+
var __defProps$i = Object.defineProperties;
|
|
19312
|
+
var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
|
|
19313
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
19314
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
19315
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
19316
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19317
|
+
var __spreadValues$r = (a, b) => {
|
|
19316
19318
|
for (var prop in b || (b = {}))
|
|
19317
|
-
if (__hasOwnProp$
|
|
19318
|
-
__defNormalProp$
|
|
19319
|
-
if (__getOwnPropSymbols$
|
|
19320
|
-
for (var prop of __getOwnPropSymbols$
|
|
19321
|
-
if (__propIsEnum$
|
|
19322
|
-
__defNormalProp$
|
|
19319
|
+
if (__hasOwnProp$s.call(b, prop))
|
|
19320
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
19321
|
+
if (__getOwnPropSymbols$s)
|
|
19322
|
+
for (var prop of __getOwnPropSymbols$s(b)) {
|
|
19323
|
+
if (__propIsEnum$s.call(b, prop))
|
|
19324
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
19323
19325
|
}
|
|
19324
19326
|
return a;
|
|
19325
19327
|
};
|
|
19326
|
-
var __spreadProps$
|
|
19327
|
-
var __publicField$
|
|
19328
|
-
var __async$
|
|
19328
|
+
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
19329
|
+
var __publicField$s = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19330
|
+
var __async$r = (__this, __arguments, generator) => {
|
|
19329
19331
|
return new Promise((resolve, reject) => {
|
|
19330
19332
|
var fulfilled = (value) => {
|
|
19331
19333
|
try {
|
|
@@ -19350,8 +19352,8 @@ var NgwLeaflet = (function () {
|
|
|
19350
19352
|
connector,
|
|
19351
19353
|
cacheId
|
|
19352
19354
|
}) {
|
|
19353
|
-
__publicField$
|
|
19354
|
-
__publicField$
|
|
19355
|
+
__publicField$s(this, "cache");
|
|
19356
|
+
__publicField$s(this, "connector");
|
|
19355
19357
|
this.connector = connector;
|
|
19356
19358
|
this.cache = new Cache({ namespace: cacheId });
|
|
19357
19359
|
}
|
|
@@ -19366,7 +19368,7 @@ var NgwLeaflet = (function () {
|
|
|
19366
19368
|
* Fetching resource would be cached to speed up next call
|
|
19367
19369
|
*/
|
|
19368
19370
|
getOne(resource, requestOptions) {
|
|
19369
|
-
const opt = __spreadValues$
|
|
19371
|
+
const opt = __spreadValues$r({}, requestOptions);
|
|
19370
19372
|
if (typeof resource === "string") ; else if (typeof resource === "number") ; else if (isObject(resource)) {
|
|
19371
19373
|
if (resource.id !== void 0) {
|
|
19372
19374
|
resource.id;
|
|
@@ -19443,8 +19445,8 @@ var NgwLeaflet = (function () {
|
|
|
19443
19445
|
} else {
|
|
19444
19446
|
Object.assign(query, resourceToQuery(resource));
|
|
19445
19447
|
}
|
|
19446
|
-
return this.connector.route("resource.search").get(__spreadProps$
|
|
19447
|
-
query: __spreadValues$
|
|
19448
|
+
return this.connector.route("resource.search").get(__spreadProps$i(__spreadValues$r({}, requestOptions), {
|
|
19449
|
+
query: __spreadValues$r({
|
|
19448
19450
|
serialization: "full"
|
|
19449
19451
|
}, query)
|
|
19450
19452
|
})).then((resources) => {
|
|
@@ -19497,7 +19499,7 @@ var NgwLeaflet = (function () {
|
|
|
19497
19499
|
});
|
|
19498
19500
|
}
|
|
19499
19501
|
_getChildrenOf(_0, _1) {
|
|
19500
|
-
return __async$
|
|
19502
|
+
return __async$r(this, arguments, function* (parentDef, requestOptions, _items = []) {
|
|
19501
19503
|
let parent = void 0;
|
|
19502
19504
|
if (typeof parentDef === "string") {
|
|
19503
19505
|
parent = yield this.getId(parentDef, requestOptions);
|
|
@@ -19506,7 +19508,7 @@ var NgwLeaflet = (function () {
|
|
|
19506
19508
|
} else {
|
|
19507
19509
|
parent = parentDef;
|
|
19508
19510
|
}
|
|
19509
|
-
const items = yield this.connector.route("resource.collection").get(__spreadProps$
|
|
19511
|
+
const items = yield this.connector.route("resource.collection").get(__spreadProps$i(__spreadValues$r({}, requestOptions), {
|
|
19510
19512
|
query: {
|
|
19511
19513
|
parent
|
|
19512
19514
|
}
|
|
@@ -19534,7 +19536,7 @@ var NgwLeaflet = (function () {
|
|
|
19534
19536
|
});
|
|
19535
19537
|
}
|
|
19536
19538
|
_cleanResourceItemCache(id) {
|
|
19537
|
-
return __async$
|
|
19539
|
+
return __async$r(this, null, function* () {
|
|
19538
19540
|
var _a;
|
|
19539
19541
|
const all = this.cache.all();
|
|
19540
19542
|
const toDelete = [];
|
|
@@ -19587,13 +19589,13 @@ var NgwLeaflet = (function () {
|
|
|
19587
19589
|
}
|
|
19588
19590
|
}
|
|
19589
19591
|
|
|
19590
|
-
var __defProp$
|
|
19591
|
-
var __defNormalProp$
|
|
19592
|
-
var __publicField$
|
|
19592
|
+
var __defProp$C = Object.defineProperty;
|
|
19593
|
+
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19594
|
+
var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, key + "" , value);
|
|
19593
19595
|
class NgwConnectorExtended extends NgwConnector {
|
|
19594
19596
|
constructor(options) {
|
|
19595
19597
|
super(options);
|
|
19596
|
-
__publicField$
|
|
19598
|
+
__publicField$r(this, "resources");
|
|
19597
19599
|
this.resources = new ResourcesControl({
|
|
19598
19600
|
connector: this,
|
|
19599
19601
|
cacheId: options.cacheId
|
|
@@ -19803,25 +19805,25 @@ var NgwLeaflet = (function () {
|
|
|
19803
19805
|
}
|
|
19804
19806
|
}
|
|
19805
19807
|
|
|
19806
|
-
var __defProp$
|
|
19807
|
-
var __defProps$
|
|
19808
|
-
var __getOwnPropDescs$
|
|
19809
|
-
var __getOwnPropSymbols$
|
|
19810
|
-
var __hasOwnProp$
|
|
19811
|
-
var __propIsEnum$
|
|
19812
|
-
var __defNormalProp$
|
|
19813
|
-
var __spreadValues$
|
|
19808
|
+
var __defProp$B = Object.defineProperty;
|
|
19809
|
+
var __defProps$h = Object.defineProperties;
|
|
19810
|
+
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
19811
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
19812
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
19813
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
19814
|
+
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19815
|
+
var __spreadValues$q = (a, b) => {
|
|
19814
19816
|
for (var prop in b || (b = {}))
|
|
19815
|
-
if (__hasOwnProp$
|
|
19816
|
-
__defNormalProp$
|
|
19817
|
-
if (__getOwnPropSymbols$
|
|
19818
|
-
for (var prop of __getOwnPropSymbols$
|
|
19819
|
-
if (__propIsEnum$
|
|
19820
|
-
__defNormalProp$
|
|
19817
|
+
if (__hasOwnProp$r.call(b, prop))
|
|
19818
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
19819
|
+
if (__getOwnPropSymbols$r)
|
|
19820
|
+
for (var prop of __getOwnPropSymbols$r(b)) {
|
|
19821
|
+
if (__propIsEnum$r.call(b, prop))
|
|
19822
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
19821
19823
|
}
|
|
19822
19824
|
return a;
|
|
19823
19825
|
};
|
|
19824
|
-
var __spreadProps$
|
|
19826
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
19825
19827
|
function getNgwWebmapExtent(webmap) {
|
|
19826
19828
|
const bottom = webmap["extent_bottom"];
|
|
19827
19829
|
const left = webmap["extent_left"];
|
|
@@ -19888,14 +19890,14 @@ var NgwLeaflet = (function () {
|
|
|
19888
19890
|
if (resource.cls && resource.parent && resource.cls.indexOf("style") !== -1) {
|
|
19889
19891
|
return connector.getResource(resource.parent.id, options).then((res) => {
|
|
19890
19892
|
if (res) {
|
|
19891
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
19893
|
+
return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
|
|
19892
19894
|
resourceId: res.resource.id,
|
|
19893
19895
|
connector
|
|
19894
19896
|
}));
|
|
19895
19897
|
}
|
|
19896
19898
|
});
|
|
19897
19899
|
} else {
|
|
19898
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
19900
|
+
return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
|
|
19899
19901
|
resourceId: resource.id,
|
|
19900
19902
|
connector
|
|
19901
19903
|
}));
|
|
@@ -19903,10 +19905,10 @@ var NgwLeaflet = (function () {
|
|
|
19903
19905
|
}
|
|
19904
19906
|
}
|
|
19905
19907
|
|
|
19906
|
-
var __defProp$
|
|
19907
|
-
var __defNormalProp$
|
|
19908
|
-
var __publicField$
|
|
19909
|
-
var __async$
|
|
19908
|
+
var __defProp$A = Object.defineProperty;
|
|
19909
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19910
|
+
var __publicField$q = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19911
|
+
var __async$q = (__this, __arguments, generator) => {
|
|
19910
19912
|
return new Promise((resolve, reject) => {
|
|
19911
19913
|
var fulfilled = (value) => {
|
|
19912
19914
|
try {
|
|
@@ -19928,18 +19930,18 @@ var NgwLeaflet = (function () {
|
|
|
19928
19930
|
};
|
|
19929
19931
|
class NgwResource {
|
|
19930
19932
|
constructor() {
|
|
19931
|
-
__publicField$
|
|
19932
|
-
__publicField$
|
|
19933
|
-
__publicField$
|
|
19933
|
+
__publicField$q(this, "item");
|
|
19934
|
+
__publicField$q(this, "connector");
|
|
19935
|
+
__publicField$q(this, "_extent");
|
|
19934
19936
|
}
|
|
19935
19937
|
/** @deprecated use {@link NgwResource.getBounds} instead */
|
|
19936
19938
|
getExtent() {
|
|
19937
|
-
return __async$
|
|
19939
|
+
return __async$q(this, null, function* () {
|
|
19938
19940
|
return this.getBounds();
|
|
19939
19941
|
});
|
|
19940
19942
|
}
|
|
19941
19943
|
getBounds(options) {
|
|
19942
|
-
return __async$
|
|
19944
|
+
return __async$q(this, null, function* () {
|
|
19943
19945
|
if (this._extent) {
|
|
19944
19946
|
return this._extent;
|
|
19945
19947
|
}
|
|
@@ -19955,7 +19957,7 @@ var NgwLeaflet = (function () {
|
|
|
19955
19957
|
}
|
|
19956
19958
|
}
|
|
19957
19959
|
|
|
19958
|
-
var __async$
|
|
19960
|
+
var __async$p = (__this, __arguments, generator) => {
|
|
19959
19961
|
return new Promise((resolve, reject) => {
|
|
19960
19962
|
var fulfilled = (value) => {
|
|
19961
19963
|
try {
|
|
@@ -19976,7 +19978,7 @@ var NgwLeaflet = (function () {
|
|
|
19976
19978
|
});
|
|
19977
19979
|
};
|
|
19978
19980
|
function resourceIdFromLayerOptions(options, connector) {
|
|
19979
|
-
return __async$
|
|
19981
|
+
return __async$p(this, null, function* () {
|
|
19980
19982
|
const resource = options.resource;
|
|
19981
19983
|
const item = resource;
|
|
19982
19984
|
let { keyname, resourceId } = options;
|
|
@@ -20001,24 +20003,24 @@ var NgwLeaflet = (function () {
|
|
|
20001
20003
|
});
|
|
20002
20004
|
}
|
|
20003
20005
|
|
|
20004
|
-
var __defProp$
|
|
20005
|
-
var __getOwnPropSymbols$
|
|
20006
|
-
var __hasOwnProp$
|
|
20007
|
-
var __propIsEnum$
|
|
20008
|
-
var __defNormalProp$
|
|
20009
|
-
var __spreadValues$
|
|
20006
|
+
var __defProp$z = Object.defineProperty;
|
|
20007
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
20008
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
20009
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
20010
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20011
|
+
var __spreadValues$p = (a, b) => {
|
|
20010
20012
|
for (var prop in b || (b = {}))
|
|
20011
|
-
if (__hasOwnProp$
|
|
20012
|
-
__defNormalProp$
|
|
20013
|
-
if (__getOwnPropSymbols$
|
|
20014
|
-
for (var prop of __getOwnPropSymbols$
|
|
20015
|
-
if (__propIsEnum$
|
|
20016
|
-
__defNormalProp$
|
|
20013
|
+
if (__hasOwnProp$q.call(b, prop))
|
|
20014
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
20015
|
+
if (__getOwnPropSymbols$q)
|
|
20016
|
+
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
20017
|
+
if (__propIsEnum$q.call(b, prop))
|
|
20018
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
20017
20019
|
}
|
|
20018
20020
|
return a;
|
|
20019
20021
|
};
|
|
20020
|
-
var __publicField$
|
|
20021
|
-
var __async$
|
|
20022
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20023
|
+
var __async$o = (__this, __arguments, generator) => {
|
|
20022
20024
|
return new Promise((resolve, reject) => {
|
|
20023
20025
|
var fulfilled = (value) => {
|
|
20024
20026
|
try {
|
|
@@ -20039,7 +20041,7 @@ var NgwLeaflet = (function () {
|
|
|
20039
20041
|
});
|
|
20040
20042
|
};
|
|
20041
20043
|
function createOnFirstShowAdapter(_0) {
|
|
20042
|
-
return __async$
|
|
20044
|
+
return __async$o(this, arguments, function* ({
|
|
20043
20045
|
webMap,
|
|
20044
20046
|
adapterOptions = {},
|
|
20045
20047
|
onLayerAdded,
|
|
@@ -20047,10 +20049,10 @@ var NgwLeaflet = (function () {
|
|
|
20047
20049
|
}) {
|
|
20048
20050
|
class OnFirstShowAdapter {
|
|
20049
20051
|
constructor() {
|
|
20050
|
-
__publicField$
|
|
20051
|
-
__publicField$
|
|
20052
|
-
__publicField$
|
|
20053
|
-
__publicField$
|
|
20052
|
+
__publicField$p(this, "options", {});
|
|
20053
|
+
__publicField$p(this, "layer", []);
|
|
20054
|
+
__publicField$p(this, "_removed", false);
|
|
20055
|
+
__publicField$p(this, "_creatingInProgress", false);
|
|
20054
20056
|
}
|
|
20055
20057
|
addLayer() {
|
|
20056
20058
|
return this.layer;
|
|
@@ -20065,7 +20067,7 @@ var NgwLeaflet = (function () {
|
|
|
20065
20067
|
return this._removed;
|
|
20066
20068
|
}
|
|
20067
20069
|
showLayer() {
|
|
20068
|
-
return __async$
|
|
20070
|
+
return __async$o(this, null, function* () {
|
|
20069
20071
|
this.options.visibility = true;
|
|
20070
20072
|
if (this.layer.length) {
|
|
20071
20073
|
for (const x of this.layer) {
|
|
@@ -20077,7 +20079,7 @@ var NgwLeaflet = (function () {
|
|
|
20077
20079
|
});
|
|
20078
20080
|
}
|
|
20079
20081
|
hideLayer() {
|
|
20080
|
-
return __async$
|
|
20082
|
+
return __async$o(this, null, function* () {
|
|
20081
20083
|
this.options.visibility = false;
|
|
20082
20084
|
if (this.layer) {
|
|
20083
20085
|
for (const x of this.layer) {
|
|
@@ -20087,12 +20089,12 @@ var NgwLeaflet = (function () {
|
|
|
20087
20089
|
});
|
|
20088
20090
|
}
|
|
20089
20091
|
loadLayer() {
|
|
20090
|
-
return __async$
|
|
20092
|
+
return __async$o(this, null, function* () {
|
|
20091
20093
|
if (!this.layer.length && !this._creatingInProgress) {
|
|
20092
20094
|
this._creatingInProgress = true;
|
|
20093
20095
|
const Adapter = yield createAdapter(this);
|
|
20094
20096
|
if (Adapter) {
|
|
20095
|
-
const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$
|
|
20097
|
+
const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$p({}, adapterOptions));
|
|
20096
20098
|
const realLayer = yield adapter.addLayer({
|
|
20097
20099
|
order: this.options.order,
|
|
20098
20100
|
headers: this.options.headers,
|
|
@@ -20121,7 +20123,7 @@ var NgwLeaflet = (function () {
|
|
|
20121
20123
|
});
|
|
20122
20124
|
}
|
|
20123
20125
|
|
|
20124
|
-
var __async$
|
|
20126
|
+
var __async$n = (__this, __arguments, generator) => {
|
|
20125
20127
|
return new Promise((resolve, reject) => {
|
|
20126
20128
|
var fulfilled = (value) => {
|
|
20127
20129
|
try {
|
|
@@ -20142,7 +20144,7 @@ var NgwLeaflet = (function () {
|
|
|
20142
20144
|
});
|
|
20143
20145
|
};
|
|
20144
20146
|
function createOnFirstShowNgwAdapter(_0) {
|
|
20145
|
-
return __async$
|
|
20147
|
+
return __async$n(this, arguments, function* ({
|
|
20146
20148
|
webMap,
|
|
20147
20149
|
connector,
|
|
20148
20150
|
item,
|
|
@@ -20180,26 +20182,26 @@ var NgwLeaflet = (function () {
|
|
|
20180
20182
|
defaultRequestLimit: 7e3
|
|
20181
20183
|
};
|
|
20182
20184
|
|
|
20183
|
-
var __defProp$
|
|
20184
|
-
var __defProps$
|
|
20185
|
-
var __getOwnPropDescs$
|
|
20186
|
-
var __getOwnPropSymbols$
|
|
20187
|
-
var __hasOwnProp$
|
|
20188
|
-
var __propIsEnum$
|
|
20189
|
-
var __defNormalProp$
|
|
20190
|
-
var __spreadValues$
|
|
20185
|
+
var __defProp$y = Object.defineProperty;
|
|
20186
|
+
var __defProps$g = Object.defineProperties;
|
|
20187
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
20188
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
20189
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
20190
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
20191
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20192
|
+
var __spreadValues$o = (a, b) => {
|
|
20191
20193
|
for (var prop in b || (b = {}))
|
|
20192
|
-
if (__hasOwnProp$
|
|
20193
|
-
__defNormalProp$
|
|
20194
|
-
if (__getOwnPropSymbols$
|
|
20195
|
-
for (var prop of __getOwnPropSymbols$
|
|
20196
|
-
if (__propIsEnum$
|
|
20197
|
-
__defNormalProp$
|
|
20194
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
20195
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
20196
|
+
if (__getOwnPropSymbols$p)
|
|
20197
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
20198
|
+
if (__propIsEnum$p.call(b, prop))
|
|
20199
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
20198
20200
|
}
|
|
20199
20201
|
return a;
|
|
20200
20202
|
};
|
|
20201
|
-
var __spreadProps$
|
|
20202
|
-
var __async$
|
|
20203
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
20204
|
+
var __async$m = (__this, __arguments, generator) => {
|
|
20203
20205
|
return new Promise((resolve, reject) => {
|
|
20204
20206
|
var fulfilled = (value) => {
|
|
20205
20207
|
try {
|
|
@@ -20266,7 +20268,7 @@ var NgwLeaflet = (function () {
|
|
|
20266
20268
|
);
|
|
20267
20269
|
}
|
|
20268
20270
|
function createFeatureFieldFilterQueries(opt) {
|
|
20269
|
-
return __async$
|
|
20271
|
+
return __async$m(this, null, function* () {
|
|
20270
20272
|
const queries = getQueries(opt);
|
|
20271
20273
|
const itemsParts = yield Promise.all(queries);
|
|
20272
20274
|
const ids = [];
|
|
@@ -20310,13 +20312,13 @@ var NgwLeaflet = (function () {
|
|
|
20310
20312
|
for (const f of filters_) {
|
|
20311
20313
|
if (isPropertyFilter(f)) {
|
|
20312
20314
|
_queries.push(
|
|
20313
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
20315
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
|
|
20314
20316
|
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
20315
20317
|
}))
|
|
20316
20318
|
);
|
|
20317
20319
|
} else {
|
|
20318
20320
|
getQueries(
|
|
20319
|
-
__spreadProps$
|
|
20321
|
+
__spreadProps$g(__spreadValues$o({}, opt), {
|
|
20320
20322
|
filters: f
|
|
20321
20323
|
}),
|
|
20322
20324
|
_queries,
|
|
@@ -20337,7 +20339,7 @@ var NgwLeaflet = (function () {
|
|
|
20337
20339
|
if (propertiesFilterList.length) {
|
|
20338
20340
|
for (const x of propertiesFilterList) {
|
|
20339
20341
|
getQueries(
|
|
20340
|
-
__spreadProps$
|
|
20342
|
+
__spreadProps$g(__spreadValues$o({}, opt), {
|
|
20341
20343
|
filters: x
|
|
20342
20344
|
}),
|
|
20343
20345
|
_queries,
|
|
@@ -20346,7 +20348,7 @@ var NgwLeaflet = (function () {
|
|
|
20346
20348
|
}
|
|
20347
20349
|
} else {
|
|
20348
20350
|
_queries.push(
|
|
20349
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
20351
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
|
|
20350
20352
|
paramList: [..._parentAllParams, ...paramList, ...filters2]
|
|
20351
20353
|
}))
|
|
20352
20354
|
);
|
|
@@ -20362,7 +20364,7 @@ var NgwLeaflet = (function () {
|
|
|
20362
20364
|
return `POLYGON((${polygon.join(", ")}))`;
|
|
20363
20365
|
}
|
|
20364
20366
|
function fetchNgwLayerItemsRequest(options) {
|
|
20365
|
-
const params = __spreadValues$
|
|
20367
|
+
const params = __spreadValues$o({}, FEATURE_REQUEST_PARAMS);
|
|
20366
20368
|
const {
|
|
20367
20369
|
limit,
|
|
20368
20370
|
query,
|
|
@@ -20400,7 +20402,7 @@ var NgwLeaflet = (function () {
|
|
|
20400
20402
|
if (paramList) {
|
|
20401
20403
|
Object.assign(params, paramListToQuery(paramList));
|
|
20402
20404
|
}
|
|
20403
|
-
return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$
|
|
20405
|
+
return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$o(__spreadValues$o({}, params), query), cache, signal });
|
|
20404
20406
|
}
|
|
20405
20407
|
|
|
20406
20408
|
function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
@@ -20429,26 +20431,26 @@ var NgwLeaflet = (function () {
|
|
|
20429
20431
|
return fields;
|
|
20430
20432
|
}
|
|
20431
20433
|
|
|
20432
|
-
var __defProp$
|
|
20433
|
-
var __defProps$
|
|
20434
|
-
var __getOwnPropDescs$
|
|
20435
|
-
var __getOwnPropSymbols$
|
|
20436
|
-
var __hasOwnProp$
|
|
20437
|
-
var __propIsEnum$
|
|
20438
|
-
var __defNormalProp$
|
|
20439
|
-
var __spreadValues$
|
|
20434
|
+
var __defProp$x = Object.defineProperty;
|
|
20435
|
+
var __defProps$f = Object.defineProperties;
|
|
20436
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
20437
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
20438
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
20439
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
20440
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20441
|
+
var __spreadValues$n = (a, b) => {
|
|
20440
20442
|
for (var prop in b || (b = {}))
|
|
20441
|
-
if (__hasOwnProp$
|
|
20442
|
-
__defNormalProp$
|
|
20443
|
-
if (__getOwnPropSymbols$
|
|
20444
|
-
for (var prop of __getOwnPropSymbols$
|
|
20445
|
-
if (__propIsEnum$
|
|
20446
|
-
__defNormalProp$
|
|
20443
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
20444
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
20445
|
+
if (__getOwnPropSymbols$o)
|
|
20446
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
20447
|
+
if (__propIsEnum$o.call(b, prop))
|
|
20448
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
20447
20449
|
}
|
|
20448
20450
|
return a;
|
|
20449
20451
|
};
|
|
20450
|
-
var __spreadProps$
|
|
20451
|
-
var __async$
|
|
20452
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
20453
|
+
var __async$l = (__this, __arguments, generator) => {
|
|
20452
20454
|
return new Promise((resolve, reject) => {
|
|
20453
20455
|
var fulfilled = (value) => {
|
|
20454
20456
|
try {
|
|
@@ -20469,17 +20471,17 @@ var NgwLeaflet = (function () {
|
|
|
20469
20471
|
});
|
|
20470
20472
|
};
|
|
20471
20473
|
function fetchNgwLayerItems(options) {
|
|
20472
|
-
return __async$
|
|
20474
|
+
return __async$l(this, null, function* () {
|
|
20473
20475
|
var _a;
|
|
20474
20476
|
const filters = options.filters;
|
|
20475
20477
|
if (filters) {
|
|
20476
|
-
let data = yield createFeatureFieldFilterQueries(__spreadProps$
|
|
20478
|
+
let data = yield createFeatureFieldFilterQueries(__spreadProps$f(__spreadValues$n({}, options), {
|
|
20477
20479
|
filters
|
|
20478
20480
|
}));
|
|
20479
20481
|
const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
|
|
20480
20482
|
if (clientFilterValidate) {
|
|
20481
20483
|
data = data.filter((y) => {
|
|
20482
|
-
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$
|
|
20484
|
+
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$f(__spreadValues$n({}, y.fields), {
|
|
20483
20485
|
id: y.id
|
|
20484
20486
|
}));
|
|
20485
20487
|
const result = propertiesFilter(fields, filters);
|
|
@@ -20597,26 +20599,26 @@ var NgwLeaflet = (function () {
|
|
|
20597
20599
|
}
|
|
20598
20600
|
}
|
|
20599
20601
|
|
|
20600
|
-
var __defProp$
|
|
20601
|
-
var __defProps$
|
|
20602
|
-
var __getOwnPropDescs$
|
|
20603
|
-
var __getOwnPropSymbols$
|
|
20604
|
-
var __hasOwnProp$
|
|
20605
|
-
var __propIsEnum$
|
|
20606
|
-
var __defNormalProp$
|
|
20607
|
-
var __spreadValues$
|
|
20602
|
+
var __defProp$w = Object.defineProperty;
|
|
20603
|
+
var __defProps$e = Object.defineProperties;
|
|
20604
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
20605
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
20606
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
20607
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
20608
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20609
|
+
var __spreadValues$m = (a, b) => {
|
|
20608
20610
|
for (var prop in b || (b = {}))
|
|
20609
|
-
if (__hasOwnProp$
|
|
20610
|
-
__defNormalProp$
|
|
20611
|
-
if (__getOwnPropSymbols$
|
|
20612
|
-
for (var prop of __getOwnPropSymbols$
|
|
20613
|
-
if (__propIsEnum$
|
|
20614
|
-
__defNormalProp$
|
|
20611
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
20612
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
20613
|
+
if (__getOwnPropSymbols$n)
|
|
20614
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
20615
|
+
if (__propIsEnum$n.call(b, prop))
|
|
20616
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
20615
20617
|
}
|
|
20616
20618
|
return a;
|
|
20617
20619
|
};
|
|
20618
|
-
var __spreadProps$
|
|
20619
|
-
var __async$
|
|
20620
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
20621
|
+
var __async$k = (__this, __arguments, generator) => {
|
|
20620
20622
|
return new Promise((resolve, reject) => {
|
|
20621
20623
|
var fulfilled = (value) => {
|
|
20622
20624
|
try {
|
|
@@ -20637,56 +20639,56 @@ var NgwLeaflet = (function () {
|
|
|
20637
20639
|
});
|
|
20638
20640
|
};
|
|
20639
20641
|
function fetchNgwLayerItem(options) {
|
|
20640
|
-
return __async$
|
|
20641
|
-
const params = __spreadValues$
|
|
20642
|
+
return __async$k(this, null, function* () {
|
|
20643
|
+
const params = __spreadValues$m({}, FEATURE_REQUEST_PARAMS);
|
|
20642
20644
|
updateItemRequestParam(params, options);
|
|
20643
20645
|
const resp = yield options.connector.route("feature_layer.feature.item", {
|
|
20644
20646
|
id: Number(options.resourceId),
|
|
20645
20647
|
fid: options.featureId
|
|
20646
|
-
}).get(__spreadProps$
|
|
20647
|
-
const toGeojson = () => __async$
|
|
20648
|
+
}).get(__spreadProps$e(__spreadValues$m({}, options), { query: params }));
|
|
20649
|
+
const toGeojson = () => __async$k(this, null, function* () {
|
|
20648
20650
|
if (resp.geom) {
|
|
20649
20651
|
return createGeoJsonFeature(resp);
|
|
20650
20652
|
} else {
|
|
20651
|
-
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$
|
|
20653
|
+
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$m({}, options), {
|
|
20652
20654
|
geom: true,
|
|
20653
20655
|
fields: null,
|
|
20654
20656
|
extensions: null
|
|
20655
20657
|
}));
|
|
20656
20658
|
const geom = onlyGeomItem.geom;
|
|
20657
|
-
return createGeoJsonFeature(__spreadProps$
|
|
20659
|
+
return createGeoJsonFeature(__spreadProps$e(__spreadValues$m({}, resp), { geom }));
|
|
20658
20660
|
}
|
|
20659
20661
|
});
|
|
20660
|
-
return __spreadProps$
|
|
20662
|
+
return __spreadProps$e(__spreadValues$m({}, resp), {
|
|
20661
20663
|
toGeojson
|
|
20662
20664
|
});
|
|
20663
20665
|
});
|
|
20664
20666
|
}
|
|
20665
20667
|
|
|
20666
|
-
var __defProp$
|
|
20667
|
-
var __getOwnPropSymbols$
|
|
20668
|
-
var __hasOwnProp$
|
|
20669
|
-
var __propIsEnum$
|
|
20670
|
-
var __defNormalProp$
|
|
20671
|
-
var __spreadValues$
|
|
20668
|
+
var __defProp$v = Object.defineProperty;
|
|
20669
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
20670
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
20671
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
20672
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20673
|
+
var __spreadValues$l = (a, b) => {
|
|
20672
20674
|
for (var prop in b || (b = {}))
|
|
20673
|
-
if (__hasOwnProp$
|
|
20674
|
-
__defNormalProp$
|
|
20675
|
-
if (__getOwnPropSymbols$
|
|
20676
|
-
for (var prop of __getOwnPropSymbols$
|
|
20677
|
-
if (__propIsEnum$
|
|
20678
|
-
__defNormalProp$
|
|
20675
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
20676
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
20677
|
+
if (__getOwnPropSymbols$m)
|
|
20678
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
20679
|
+
if (__propIsEnum$m.call(b, prop))
|
|
20680
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
20679
20681
|
}
|
|
20680
20682
|
return a;
|
|
20681
20683
|
};
|
|
20682
|
-
var __publicField$
|
|
20684
|
+
var __publicField$o = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20683
20685
|
class BookmarkItem {
|
|
20684
20686
|
constructor(options) {
|
|
20685
20687
|
this.options = options;
|
|
20686
|
-
__publicField$
|
|
20687
|
-
__publicField$
|
|
20688
|
-
__publicField$
|
|
20689
|
-
__publicField$
|
|
20688
|
+
__publicField$o(this, "name");
|
|
20689
|
+
__publicField$o(this, "resourceId");
|
|
20690
|
+
__publicField$o(this, "item");
|
|
20691
|
+
__publicField$o(this, "_extent");
|
|
20690
20692
|
this.resourceId = options.resourceId;
|
|
20691
20693
|
const item = options.item;
|
|
20692
20694
|
this.item = item;
|
|
@@ -20716,7 +20718,7 @@ var NgwLeaflet = (function () {
|
|
|
20716
20718
|
if (this.item.geom) {
|
|
20717
20719
|
return Promise.resolve(createGeoJsonFeature(this.item));
|
|
20718
20720
|
} else {
|
|
20719
|
-
return fetchNgwLayerItem(__spreadValues$
|
|
20721
|
+
return fetchNgwLayerItem(__spreadValues$l({
|
|
20720
20722
|
resourceId: this.resourceId,
|
|
20721
20723
|
featureId: this.item.id,
|
|
20722
20724
|
connector: this.options.connector,
|
|
@@ -20734,19 +20736,19 @@ var NgwLeaflet = (function () {
|
|
|
20734
20736
|
|
|
20735
20737
|
const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
|
|
20736
20738
|
|
|
20737
|
-
var __defProp$
|
|
20738
|
-
var __defNormalProp$
|
|
20739
|
-
var __publicField$
|
|
20739
|
+
var __defProp$u = Object.defineProperty;
|
|
20740
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20741
|
+
var __publicField$n = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20740
20742
|
class BaseProperty {
|
|
20741
20743
|
constructor(name, item, options) {
|
|
20742
|
-
__publicField$
|
|
20743
|
-
__publicField$
|
|
20744
|
-
__publicField$
|
|
20745
|
-
__publicField$
|
|
20746
|
-
__publicField$
|
|
20747
|
-
__publicField$
|
|
20748
|
-
__publicField$
|
|
20749
|
-
__publicField$
|
|
20744
|
+
__publicField$n(this, "options");
|
|
20745
|
+
__publicField$n(this, "emitter", new EventEmitter());
|
|
20746
|
+
__publicField$n(this, "name");
|
|
20747
|
+
__publicField$n(this, "item");
|
|
20748
|
+
__publicField$n(this, "_blocked", false);
|
|
20749
|
+
__publicField$n(this, "_container");
|
|
20750
|
+
__publicField$n(this, "_value");
|
|
20751
|
+
__publicField$n(this, "_removeEventsListener");
|
|
20750
20752
|
this.item = item;
|
|
20751
20753
|
this.options = Object.assign({}, options);
|
|
20752
20754
|
this.name = name;
|
|
@@ -20843,26 +20845,26 @@ var NgwLeaflet = (function () {
|
|
|
20843
20845
|
}
|
|
20844
20846
|
}
|
|
20845
20847
|
|
|
20846
|
-
var __defProp$
|
|
20847
|
-
var __getOwnPropSymbols$
|
|
20848
|
-
var __hasOwnProp$
|
|
20849
|
-
var __propIsEnum$
|
|
20850
|
-
var __defNormalProp$
|
|
20851
|
-
var __spreadValues$
|
|
20848
|
+
var __defProp$t = Object.defineProperty;
|
|
20849
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
20850
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
20851
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
20852
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20853
|
+
var __spreadValues$k = (a, b) => {
|
|
20852
20854
|
for (var prop in b || (b = {}))
|
|
20853
|
-
if (__hasOwnProp$
|
|
20854
|
-
__defNormalProp$
|
|
20855
|
-
if (__getOwnPropSymbols$
|
|
20856
|
-
for (var prop of __getOwnPropSymbols$
|
|
20857
|
-
if (__propIsEnum$
|
|
20858
|
-
__defNormalProp$
|
|
20855
|
+
if (__hasOwnProp$l.call(b, prop))
|
|
20856
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
20857
|
+
if (__getOwnPropSymbols$l)
|
|
20858
|
+
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
20859
|
+
if (__propIsEnum$l.call(b, prop))
|
|
20860
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
20859
20861
|
}
|
|
20860
20862
|
return a;
|
|
20861
20863
|
};
|
|
20862
|
-
var __publicField$
|
|
20864
|
+
var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, key + "" , value);
|
|
20863
20865
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
20864
20866
|
constructor(name, item, options) {
|
|
20865
|
-
super(name, item, __spreadValues$
|
|
20867
|
+
super(name, item, __spreadValues$k(__spreadValues$k({}, _CheckProperty.options), options));
|
|
20866
20868
|
this.set(this.get());
|
|
20867
20869
|
}
|
|
20868
20870
|
update(value, options) {
|
|
@@ -20958,7 +20960,7 @@ var NgwLeaflet = (function () {
|
|
|
20958
20960
|
const child = children[fry];
|
|
20959
20961
|
const property = child.properties && child.properties.property(this.name);
|
|
20960
20962
|
if (property) {
|
|
20961
|
-
property.set(value, __spreadValues$
|
|
20963
|
+
property.set(value, __spreadValues$k(__spreadValues$k({}, options), {
|
|
20962
20964
|
propagation: true,
|
|
20963
20965
|
bubble: false
|
|
20964
20966
|
}));
|
|
@@ -20967,7 +20969,7 @@ var NgwLeaflet = (function () {
|
|
|
20967
20969
|
}
|
|
20968
20970
|
}
|
|
20969
20971
|
};
|
|
20970
|
-
__publicField$
|
|
20972
|
+
__publicField$m(_CheckProperty, "options", {
|
|
20971
20973
|
hierarchy: true,
|
|
20972
20974
|
bubble: false,
|
|
20973
20975
|
propagation: false,
|
|
@@ -20976,31 +20978,31 @@ var NgwLeaflet = (function () {
|
|
|
20976
20978
|
});
|
|
20977
20979
|
let CheckProperty = _CheckProperty;
|
|
20978
20980
|
|
|
20979
|
-
var __defProp$
|
|
20980
|
-
var __getOwnPropSymbols$
|
|
20981
|
-
var __hasOwnProp$
|
|
20982
|
-
var __propIsEnum$
|
|
20983
|
-
var __defNormalProp$
|
|
20984
|
-
var __spreadValues$
|
|
20981
|
+
var __defProp$s = Object.defineProperty;
|
|
20982
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
20983
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
20984
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
20985
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20986
|
+
var __spreadValues$j = (a, b) => {
|
|
20985
20987
|
for (var prop in b || (b = {}))
|
|
20986
|
-
if (__hasOwnProp$
|
|
20987
|
-
__defNormalProp$
|
|
20988
|
-
if (__getOwnPropSymbols$
|
|
20989
|
-
for (var prop of __getOwnPropSymbols$
|
|
20990
|
-
if (__propIsEnum$
|
|
20991
|
-
__defNormalProp$
|
|
20988
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
20989
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
20990
|
+
if (__getOwnPropSymbols$k)
|
|
20991
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
20992
|
+
if (__propIsEnum$k.call(b, prop))
|
|
20993
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
20992
20994
|
}
|
|
20993
20995
|
return a;
|
|
20994
20996
|
};
|
|
20995
|
-
var __publicField$
|
|
20997
|
+
var __publicField$l = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20996
20998
|
const BOOLEAN_TYPE = "boolean";
|
|
20997
20999
|
const STRING_TYPE = "string";
|
|
20998
21000
|
const _ItemProperties = class _ItemProperties {
|
|
20999
21001
|
constructor(item, propertiesList) {
|
|
21000
21002
|
this.item = item;
|
|
21001
|
-
__publicField$
|
|
21002
|
-
__publicField$
|
|
21003
|
-
__publicField$
|
|
21003
|
+
__publicField$l(this, "options", {});
|
|
21004
|
+
__publicField$l(this, "_properties", {});
|
|
21005
|
+
__publicField$l(this, "_propertiesList", []);
|
|
21004
21006
|
if (propertiesList) {
|
|
21005
21007
|
propertiesList.forEach(this._setPropertyHandler.bind(this));
|
|
21006
21008
|
}
|
|
@@ -21040,7 +21042,7 @@ var NgwLeaflet = (function () {
|
|
|
21040
21042
|
_setPropertyHandler(propOpt) {
|
|
21041
21043
|
const Handler = this._getHandler(propOpt);
|
|
21042
21044
|
if (Handler && propOpt.name) {
|
|
21043
|
-
const options = __spreadValues$
|
|
21045
|
+
const options = __spreadValues$j({}, propOpt);
|
|
21044
21046
|
this._properties[propOpt.name] = new Handler(
|
|
21045
21047
|
propOpt.name,
|
|
21046
21048
|
this.item,
|
|
@@ -21063,7 +21065,7 @@ var NgwLeaflet = (function () {
|
|
|
21063
21065
|
return Handler;
|
|
21064
21066
|
}
|
|
21065
21067
|
};
|
|
21066
|
-
__publicField$
|
|
21068
|
+
__publicField$l(_ItemProperties, "handlers", {
|
|
21067
21069
|
CheckProperty
|
|
21068
21070
|
});
|
|
21069
21071
|
let ItemProperties = _ItemProperties;
|
|
@@ -21170,14 +21172,14 @@ var NgwLeaflet = (function () {
|
|
|
21170
21172
|
return true;
|
|
21171
21173
|
}
|
|
21172
21174
|
|
|
21173
|
-
var __defProp$
|
|
21174
|
-
var __defNormalProp$
|
|
21175
|
-
var __publicField$
|
|
21175
|
+
var __defProp$r = Object.defineProperty;
|
|
21176
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21177
|
+
var __publicField$k = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21176
21178
|
class TreeHelper {
|
|
21177
21179
|
constructor(item) {
|
|
21178
|
-
__publicField$
|
|
21179
|
-
__publicField$
|
|
21180
|
-
__publicField$
|
|
21180
|
+
__publicField$k(this, "item");
|
|
21181
|
+
__publicField$k(this, "_children", []);
|
|
21182
|
+
__publicField$k(this, "_parent");
|
|
21181
21183
|
this.item = item;
|
|
21182
21184
|
}
|
|
21183
21185
|
setParent(parent) {
|
|
@@ -21240,32 +21242,32 @@ var NgwLeaflet = (function () {
|
|
|
21240
21242
|
}
|
|
21241
21243
|
}
|
|
21242
21244
|
|
|
21243
|
-
var __defProp$
|
|
21244
|
-
var __getOwnPropSymbols$
|
|
21245
|
-
var __hasOwnProp$
|
|
21246
|
-
var __propIsEnum$
|
|
21247
|
-
var __defNormalProp$
|
|
21248
|
-
var __spreadValues$
|
|
21245
|
+
var __defProp$q = Object.defineProperty;
|
|
21246
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
21247
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
21248
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
21249
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21250
|
+
var __spreadValues$i = (a, b) => {
|
|
21249
21251
|
for (var prop in b || (b = {}))
|
|
21250
|
-
if (__hasOwnProp$
|
|
21251
|
-
__defNormalProp$
|
|
21252
|
-
if (__getOwnPropSymbols$
|
|
21253
|
-
for (var prop of __getOwnPropSymbols$
|
|
21254
|
-
if (__propIsEnum$
|
|
21255
|
-
__defNormalProp$
|
|
21252
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
21253
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
21254
|
+
if (__getOwnPropSymbols$j)
|
|
21255
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
21256
|
+
if (__propIsEnum$j.call(b, prop))
|
|
21257
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
21256
21258
|
}
|
|
21257
21259
|
return a;
|
|
21258
21260
|
};
|
|
21259
|
-
var __publicField$
|
|
21261
|
+
var __publicField$j = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21260
21262
|
let ID$1 = 0;
|
|
21261
21263
|
class Item {
|
|
21262
21264
|
constructor(options) {
|
|
21263
|
-
__publicField$
|
|
21264
|
-
__publicField$
|
|
21265
|
-
__publicField$
|
|
21266
|
-
__publicField$
|
|
21265
|
+
__publicField$j(this, "options", {});
|
|
21266
|
+
__publicField$j(this, "properties");
|
|
21267
|
+
__publicField$j(this, "tree");
|
|
21268
|
+
__publicField$j(this, "id", ID$1);
|
|
21267
21269
|
ID$1 += 1;
|
|
21268
|
-
this.options = __spreadValues$
|
|
21270
|
+
this.options = __spreadValues$i({}, options);
|
|
21269
21271
|
this.tree = new TreeHelper(this);
|
|
21270
21272
|
}
|
|
21271
21273
|
initProperties() {
|
|
@@ -21317,6 +21319,168 @@ var NgwLeaflet = (function () {
|
|
|
21317
21319
|
}
|
|
21318
21320
|
}
|
|
21319
21321
|
|
|
21322
|
+
function createLayerSymbolParam(resourceId, intervals) {
|
|
21323
|
+
return { [`symbols[${resourceId}]`]: intervals.join(",") || void 0 };
|
|
21324
|
+
}
|
|
21325
|
+
|
|
21326
|
+
var __defProp$p = Object.defineProperty;
|
|
21327
|
+
var __defProps$d = Object.defineProperties;
|
|
21328
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
21329
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
21330
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
21331
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
21332
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21333
|
+
var __spreadValues$h = (a, b) => {
|
|
21334
|
+
for (var prop in b || (b = {}))
|
|
21335
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
21336
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
21337
|
+
if (__getOwnPropSymbols$i)
|
|
21338
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
21339
|
+
if (__propIsEnum$i.call(b, prop))
|
|
21340
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
21341
|
+
}
|
|
21342
|
+
return a;
|
|
21343
|
+
};
|
|
21344
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
21345
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21346
|
+
var __async$j = (__this, __arguments, generator) => {
|
|
21347
|
+
return new Promise((resolve, reject) => {
|
|
21348
|
+
var fulfilled = (value) => {
|
|
21349
|
+
try {
|
|
21350
|
+
step(generator.next(value));
|
|
21351
|
+
} catch (e) {
|
|
21352
|
+
reject(e);
|
|
21353
|
+
}
|
|
21354
|
+
};
|
|
21355
|
+
var rejected = (value) => {
|
|
21356
|
+
try {
|
|
21357
|
+
step(generator.throw(value));
|
|
21358
|
+
} catch (e) {
|
|
21359
|
+
reject(e);
|
|
21360
|
+
}
|
|
21361
|
+
};
|
|
21362
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
21363
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
21364
|
+
});
|
|
21365
|
+
};
|
|
21366
|
+
class Legend {
|
|
21367
|
+
constructor({
|
|
21368
|
+
legendSymbols,
|
|
21369
|
+
resourceId,
|
|
21370
|
+
connector,
|
|
21371
|
+
layerId,
|
|
21372
|
+
legend,
|
|
21373
|
+
webMap,
|
|
21374
|
+
layer,
|
|
21375
|
+
onSymbolRenderChange
|
|
21376
|
+
}) {
|
|
21377
|
+
__publicField$i(this, "layerId");
|
|
21378
|
+
__publicField$i(this, "layer");
|
|
21379
|
+
__publicField$i(this, "resourceId");
|
|
21380
|
+
__publicField$i(this, "legendSymbols", "expand");
|
|
21381
|
+
__publicField$i(this, "legend");
|
|
21382
|
+
// private blocked: boolean = false;
|
|
21383
|
+
__publicField$i(this, "layerVisibility", true);
|
|
21384
|
+
// private symbolRenderIndexes?: number[];
|
|
21385
|
+
__publicField$i(this, "onSymbolRenderChange");
|
|
21386
|
+
__publicField$i(this, "webMap");
|
|
21387
|
+
__publicField$i(this, "connector");
|
|
21388
|
+
if (legendSymbols) {
|
|
21389
|
+
this.legendSymbols = legendSymbols;
|
|
21390
|
+
}
|
|
21391
|
+
this.connector = connector;
|
|
21392
|
+
this.layer = layer;
|
|
21393
|
+
this.layerId = layerId;
|
|
21394
|
+
if (legend) {
|
|
21395
|
+
this.legend = this.createLegend(legend);
|
|
21396
|
+
}
|
|
21397
|
+
this.resourceId = resourceId;
|
|
21398
|
+
this.webMap = webMap;
|
|
21399
|
+
this.onSymbolRenderChange = onSymbolRenderChange;
|
|
21400
|
+
}
|
|
21401
|
+
attachLayer(layer) {
|
|
21402
|
+
this.layerId = String(layer.id);
|
|
21403
|
+
this.layer = layer;
|
|
21404
|
+
}
|
|
21405
|
+
create() {
|
|
21406
|
+
return __async$j(this, arguments, function* (options = {}) {
|
|
21407
|
+
if (this.connector) {
|
|
21408
|
+
const ngwLegend = yield this.connector.route("render.legend_symbols", {
|
|
21409
|
+
id: this.resourceId
|
|
21410
|
+
}).get(__spreadValues$h({}, options));
|
|
21411
|
+
this.legend = ngwLegend;
|
|
21412
|
+
return this.createLegend(ngwLegend);
|
|
21413
|
+
}
|
|
21414
|
+
});
|
|
21415
|
+
}
|
|
21416
|
+
createLegend(items) {
|
|
21417
|
+
return items.map((params) => __spreadProps$d(__spreadValues$h({}, params), {
|
|
21418
|
+
/** @deprecated use display_name instead */
|
|
21419
|
+
name: params.display_name,
|
|
21420
|
+
/** @deprecated use icon instead */
|
|
21421
|
+
symbol: params.icon
|
|
21422
|
+
}));
|
|
21423
|
+
}
|
|
21424
|
+
setSymbolRender(symbolIndex, status) {
|
|
21425
|
+
if (this.legend) {
|
|
21426
|
+
const legendItem = this.legend.find((l) => l.index === symbolIndex);
|
|
21427
|
+
if (legendItem) {
|
|
21428
|
+
const render = legendItem.render;
|
|
21429
|
+
if (render !== status) {
|
|
21430
|
+
legendItem.render = status;
|
|
21431
|
+
const newSymbols = this.legend.filter((l) => l.render).map((l) => l.index);
|
|
21432
|
+
this.setLegendSymbol(newSymbols);
|
|
21433
|
+
if (this.onSymbolRenderChange) {
|
|
21434
|
+
this.onSymbolRenderChange(newSymbols);
|
|
21435
|
+
}
|
|
21436
|
+
}
|
|
21437
|
+
}
|
|
21438
|
+
}
|
|
21439
|
+
}
|
|
21440
|
+
setLegendSymbol(symbolRenderIndexes) {
|
|
21441
|
+
const intervals = this._consolidateIntervals(symbolRenderIndexes);
|
|
21442
|
+
if (!intervals.length) {
|
|
21443
|
+
this._hideLayer();
|
|
21444
|
+
}
|
|
21445
|
+
if (this.layer.updateLayer) {
|
|
21446
|
+
this.layer.updateLayer({
|
|
21447
|
+
params: __spreadValues$h({}, createLayerSymbolParam(this.resourceId, intervals))
|
|
21448
|
+
});
|
|
21449
|
+
}
|
|
21450
|
+
if (intervals.length) {
|
|
21451
|
+
this._showLayer();
|
|
21452
|
+
}
|
|
21453
|
+
}
|
|
21454
|
+
_hideLayer() {
|
|
21455
|
+
if (this.layer.options.id) {
|
|
21456
|
+
this.webMap.mapAdapter.hideLayer(this.layer.layer);
|
|
21457
|
+
}
|
|
21458
|
+
}
|
|
21459
|
+
_showLayer() {
|
|
21460
|
+
if (this.layer.options.id) {
|
|
21461
|
+
if (this.layerVisibility) {
|
|
21462
|
+
this.webMap.showLayer(this.layer.options.id, { silent: true });
|
|
21463
|
+
}
|
|
21464
|
+
}
|
|
21465
|
+
}
|
|
21466
|
+
_consolidateIntervals(symbols) {
|
|
21467
|
+
const sortedSymbols = symbols.slice().sort((a, b) => a - b);
|
|
21468
|
+
const intervals = [];
|
|
21469
|
+
let start = sortedSymbols[0];
|
|
21470
|
+
let end = start;
|
|
21471
|
+
for (let i = 1; i <= sortedSymbols.length; i++) {
|
|
21472
|
+
if (sortedSymbols[i] === end + 1) {
|
|
21473
|
+
end = sortedSymbols[i];
|
|
21474
|
+
} else {
|
|
21475
|
+
intervals.push(start === end ? `${start}` : `${start}-${end}`);
|
|
21476
|
+
start = sortedSymbols[i];
|
|
21477
|
+
end = start;
|
|
21478
|
+
}
|
|
21479
|
+
}
|
|
21480
|
+
return intervals;
|
|
21481
|
+
}
|
|
21482
|
+
}
|
|
21483
|
+
|
|
21320
21484
|
var __defProp$o = Object.defineProperty;
|
|
21321
21485
|
var __defProps$c = Object.defineProperties;
|
|
21322
21486
|
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
@@ -21358,14 +21522,23 @@ var NgwLeaflet = (function () {
|
|
|
21358
21522
|
});
|
|
21359
21523
|
};
|
|
21360
21524
|
const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
21361
|
-
constructor(
|
|
21525
|
+
constructor({
|
|
21526
|
+
webMap,
|
|
21527
|
+
item,
|
|
21528
|
+
options,
|
|
21529
|
+
connector,
|
|
21530
|
+
parent,
|
|
21531
|
+
noInit
|
|
21532
|
+
}) {
|
|
21362
21533
|
super(__spreadValues$g(__spreadValues$g({}, _NgwWebmapItem.options), options));
|
|
21363
|
-
this.webMap = webMap;
|
|
21364
21534
|
__publicField$h(this, "item");
|
|
21535
|
+
__publicField$h(this, "webMap");
|
|
21365
21536
|
__publicField$h(this, "connector");
|
|
21366
21537
|
__publicField$h(this, "layer");
|
|
21538
|
+
__publicField$h(this, "legend");
|
|
21367
21539
|
__publicField$h(this, "emitter", new EventEmitter());
|
|
21368
21540
|
__publicField$h(this, "_rootDescendantsCount", 0);
|
|
21541
|
+
this.webMap = webMap;
|
|
21369
21542
|
if (connector) {
|
|
21370
21543
|
this.connector = connector;
|
|
21371
21544
|
}
|
|
@@ -21388,14 +21561,14 @@ var NgwLeaflet = (function () {
|
|
|
21388
21561
|
}
|
|
21389
21562
|
static create(webMap, item, options, connector, parent) {
|
|
21390
21563
|
return __async$i(this, null, function* () {
|
|
21391
|
-
const ngwWebmapItem = new _NgwWebmapItem(
|
|
21564
|
+
const ngwWebmapItem = new _NgwWebmapItem({
|
|
21392
21565
|
webMap,
|
|
21393
21566
|
item,
|
|
21394
21567
|
options,
|
|
21395
21568
|
connector,
|
|
21396
21569
|
parent,
|
|
21397
|
-
true
|
|
21398
|
-
);
|
|
21570
|
+
noInit: true
|
|
21571
|
+
});
|
|
21399
21572
|
yield ngwWebmapItem._init(item);
|
|
21400
21573
|
return ngwWebmapItem;
|
|
21401
21574
|
});
|
|
@@ -21417,22 +21590,34 @@ var NgwLeaflet = (function () {
|
|
|
21417
21590
|
}
|
|
21418
21591
|
getLegend(options) {
|
|
21419
21592
|
return __async$i(this, null, function* () {
|
|
21420
|
-
var _a;
|
|
21593
|
+
var _a, _b;
|
|
21421
21594
|
const id = (_a = this.layer) == null ? void 0 : _a.id;
|
|
21422
21595
|
if (id !== void 0) {
|
|
21423
21596
|
const connector = this.connector;
|
|
21424
21597
|
if (connector && "resourceId" in this.item) {
|
|
21425
|
-
const
|
|
21426
|
-
|
|
21427
|
-
|
|
21428
|
-
|
|
21429
|
-
|
|
21430
|
-
|
|
21431
|
-
|
|
21432
|
-
|
|
21433
|
-
|
|
21434
|
-
|
|
21435
|
-
|
|
21598
|
+
const resourceId = Number(this.item.resourceId);
|
|
21599
|
+
if (this.item.item_type === "layer") {
|
|
21600
|
+
if (this.layer) {
|
|
21601
|
+
const legend = new Legend({
|
|
21602
|
+
connector: this.connector,
|
|
21603
|
+
layerId: id,
|
|
21604
|
+
layer: this.layer,
|
|
21605
|
+
resourceId,
|
|
21606
|
+
webMap: this.webMap,
|
|
21607
|
+
legendSymbols: (_b = this.item.legend_symbols) != null ? _b : void 0,
|
|
21608
|
+
onSymbolRenderChange: (indexes) => {
|
|
21609
|
+
this.webMap.emitter.emit("event-symbol-render:change", {
|
|
21610
|
+
layerId: id,
|
|
21611
|
+
resourceId,
|
|
21612
|
+
indexes
|
|
21613
|
+
});
|
|
21614
|
+
}
|
|
21615
|
+
});
|
|
21616
|
+
yield legend.create(options);
|
|
21617
|
+
return [legend];
|
|
21618
|
+
}
|
|
21619
|
+
}
|
|
21620
|
+
return [];
|
|
21436
21621
|
}
|
|
21437
21622
|
}
|
|
21438
21623
|
return [];
|
|
@@ -21487,13 +21672,13 @@ var NgwLeaflet = (function () {
|
|
|
21487
21672
|
if (group.children && group.children.length) {
|
|
21488
21673
|
const children = this.getChildren(group);
|
|
21489
21674
|
for (const child of children) {
|
|
21490
|
-
const childItem = new this.constructor(
|
|
21491
|
-
this.webMap,
|
|
21492
|
-
child,
|
|
21493
|
-
this.options,
|
|
21494
|
-
this.connector,
|
|
21495
|
-
this
|
|
21496
|
-
);
|
|
21675
|
+
const childItem = new this.constructor({
|
|
21676
|
+
webMap: this.webMap,
|
|
21677
|
+
item: child,
|
|
21678
|
+
options: this.options,
|
|
21679
|
+
connector: this.connector,
|
|
21680
|
+
parent: this
|
|
21681
|
+
});
|
|
21497
21682
|
this.tree.addChild(childItem);
|
|
21498
21683
|
}
|
|
21499
21684
|
}
|
|
@@ -21521,6 +21706,15 @@ var NgwLeaflet = (function () {
|
|
|
21521
21706
|
}
|
|
21522
21707
|
if (adapter) {
|
|
21523
21708
|
return this.webMap.addLayer(adapter, options).then((newLayer) => {
|
|
21709
|
+
this.webMap.emitter.on("layer:toggle", (e) => {
|
|
21710
|
+
if (e.id === newLayer.id) {
|
|
21711
|
+
const enabled = this.properties.get("visibility");
|
|
21712
|
+
const mapVisible = this.webMap.isLayerVisible(newLayer);
|
|
21713
|
+
if (enabled !== mapVisible) {
|
|
21714
|
+
this.properties.set("visibility", mapVisible);
|
|
21715
|
+
}
|
|
21716
|
+
}
|
|
21717
|
+
});
|
|
21524
21718
|
setNewLayer(newLayer);
|
|
21525
21719
|
});
|
|
21526
21720
|
}
|
|
@@ -21823,12 +22017,12 @@ var NgwLeaflet = (function () {
|
|
|
21823
22017
|
headers,
|
|
21824
22018
|
drawOrderEnabled: (_a = webmap.draw_order_enabled) != null ? _a : false
|
|
21825
22019
|
});
|
|
21826
|
-
const layer = new this.NgwWebmapItem(
|
|
21827
|
-
this.options.webMap,
|
|
21828
|
-
webmap.root_item,
|
|
22020
|
+
const layer = new this.NgwWebmapItem({
|
|
22021
|
+
webMap: this.options.webMap,
|
|
22022
|
+
item: webmap.root_item,
|
|
21829
22023
|
options,
|
|
21830
22024
|
connector
|
|
21831
|
-
);
|
|
22025
|
+
});
|
|
21832
22026
|
layer.emitter.on("init", () => {
|
|
21833
22027
|
resolve(layer);
|
|
21834
22028
|
});
|
|
@@ -21894,6 +22088,7 @@ var NgwLeaflet = (function () {
|
|
|
21894
22088
|
}
|
|
21895
22089
|
}
|
|
21896
22090
|
_updateItemsParams(item, webMap, data) {
|
|
22091
|
+
var _a;
|
|
21897
22092
|
if (item) {
|
|
21898
22093
|
if (item.item_type === "group" || item.item_type === "root") {
|
|
21899
22094
|
if ("children" in item && item.children) {
|
|
@@ -21926,6 +22121,9 @@ var NgwLeaflet = (function () {
|
|
|
21926
22121
|
item = __spreadValues$f(__spreadValues$f({}, layerItem), layerAdapterOptions);
|
|
21927
22122
|
}
|
|
21928
22123
|
}
|
|
22124
|
+
if (typeof ((_a = this.options.nativeOptions) == null ? void 0 : _a.beforeItemCreated) === "function") {
|
|
22125
|
+
item = this.options.nativeOptions.beforeItemCreated(item);
|
|
22126
|
+
}
|
|
21929
22127
|
return item;
|
|
21930
22128
|
}
|
|
21931
22129
|
}
|
|
@@ -22811,42 +23009,6 @@ var NgwLeaflet = (function () {
|
|
|
22811
23009
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
22812
23010
|
});
|
|
22813
23011
|
};
|
|
22814
|
-
class Legend {
|
|
22815
|
-
constructor({
|
|
22816
|
-
layerId,
|
|
22817
|
-
legend,
|
|
22818
|
-
onSymbolRenderChange
|
|
22819
|
-
}) {
|
|
22820
|
-
__publicField$c(this, "layerId");
|
|
22821
|
-
__publicField$c(this, "legend");
|
|
22822
|
-
__publicField$c(this, "onSymbolRenderChange");
|
|
22823
|
-
this.layerId = layerId;
|
|
22824
|
-
this.legend = this.createLegend(legend);
|
|
22825
|
-
this.onSymbolRenderChange = onSymbolRenderChange;
|
|
22826
|
-
}
|
|
22827
|
-
createLegend(items) {
|
|
22828
|
-
return items.map((params) => __spreadProps$7(__spreadValues$9({}, params), {
|
|
22829
|
-
/** @deprecated use display_name instead */
|
|
22830
|
-
name: params.display_name,
|
|
22831
|
-
/** @deprecated use icon instead */
|
|
22832
|
-
symbol: params.icon
|
|
22833
|
-
}));
|
|
22834
|
-
}
|
|
22835
|
-
setSymbolRender(symbolIndex, status) {
|
|
22836
|
-
const legendItem = this.legend.find((l) => l.index === symbolIndex);
|
|
22837
|
-
if (legendItem) {
|
|
22838
|
-
const render = legendItem.render;
|
|
22839
|
-
if (render !== status) {
|
|
22840
|
-
legendItem.render = status;
|
|
22841
|
-
if (this.onSymbolRenderChange) {
|
|
22842
|
-
this.onSymbolRenderChange(
|
|
22843
|
-
this.legend.filter((l) => l.render).map((l) => l.index)
|
|
22844
|
-
);
|
|
22845
|
-
}
|
|
22846
|
-
}
|
|
22847
|
-
}
|
|
22848
|
-
}
|
|
22849
|
-
}
|
|
22850
23012
|
function createRasterAdapter(_0) {
|
|
22851
23013
|
return __async$b(this, arguments, function* ({
|
|
22852
23014
|
layerOptions,
|
|
@@ -22882,8 +23044,8 @@ var NgwLeaflet = (function () {
|
|
|
22882
23044
|
this.map = map;
|
|
22883
23045
|
__publicField$c(this, "item", item);
|
|
22884
23046
|
__publicField$c(this, "resourceId", resourceId);
|
|
22885
|
-
__publicField$c(this, "
|
|
22886
|
-
__publicField$c(this, "
|
|
23047
|
+
__publicField$c(this, "blocked", false);
|
|
23048
|
+
__publicField$c(this, "layerVisibility");
|
|
22887
23049
|
const opt = ngwApiToAdapterOptions({
|
|
22888
23050
|
options: layerOptions,
|
|
22889
23051
|
webMap,
|
|
@@ -22904,24 +23066,6 @@ var NgwLeaflet = (function () {
|
|
|
22904
23066
|
addLayer(addOptions) {
|
|
22905
23067
|
return super.addLayer(__spreadValues$9(__spreadValues$9({}, this.options), addOptions));
|
|
22906
23068
|
}
|
|
22907
|
-
showLayer() {
|
|
22908
|
-
this._layerVisibility = true;
|
|
22909
|
-
if (!this._blocked) {
|
|
22910
|
-
if (super.showLayer) {
|
|
22911
|
-
super.showLayer(this.layer);
|
|
22912
|
-
} else if (this.layer) {
|
|
22913
|
-
webMap.mapAdapter.showLayer(this.layer);
|
|
22914
|
-
}
|
|
22915
|
-
}
|
|
22916
|
-
}
|
|
22917
|
-
hideLayer() {
|
|
22918
|
-
this._layerVisibility = false;
|
|
22919
|
-
if (super.hideLayer) {
|
|
22920
|
-
super.hideLayer(this.layer);
|
|
22921
|
-
} else if (this.layer) {
|
|
22922
|
-
webMap.mapAdapter.hideLayer(this.layer);
|
|
22923
|
-
}
|
|
22924
|
-
}
|
|
22925
23069
|
getIdentificationIds() {
|
|
22926
23070
|
return __async$b(this, null, function* () {
|
|
22927
23071
|
if (this.item) {
|
|
@@ -22947,59 +23091,16 @@ var NgwLeaflet = (function () {
|
|
|
22947
23091
|
}, options));
|
|
22948
23092
|
const legend = new Legend({
|
|
22949
23093
|
layerId: id,
|
|
22950
|
-
|
|
22951
|
-
|
|
23094
|
+
layer: this,
|
|
23095
|
+
resourceId,
|
|
23096
|
+
webMap,
|
|
23097
|
+
legend: ngwLegend
|
|
22952
23098
|
});
|
|
22953
23099
|
return [legend];
|
|
22954
23100
|
}
|
|
22955
23101
|
return [];
|
|
22956
23102
|
});
|
|
22957
23103
|
}
|
|
22958
|
-
_hideLayer() {
|
|
22959
|
-
if (this.options.id) {
|
|
22960
|
-
webMap.mapAdapter.hideLayer(this.layer);
|
|
22961
|
-
}
|
|
22962
|
-
}
|
|
22963
|
-
_showLayer() {
|
|
22964
|
-
if (this.options.id) {
|
|
22965
|
-
if (this._layerVisibility) {
|
|
22966
|
-
webMap.showLayer(this.options.id, { silent: true });
|
|
22967
|
-
}
|
|
22968
|
-
}
|
|
22969
|
-
}
|
|
22970
|
-
_setLegendSymbol(renderIndexes) {
|
|
22971
|
-
const intervals = this._consolidateIntervals(renderIndexes);
|
|
22972
|
-
if (!intervals.length) {
|
|
22973
|
-
this._hideLayer();
|
|
22974
|
-
this._blocked = true;
|
|
22975
|
-
} else {
|
|
22976
|
-
this._blocked = false;
|
|
22977
|
-
this._showLayer();
|
|
22978
|
-
}
|
|
22979
|
-
if (this.updateLayer) {
|
|
22980
|
-
this.updateLayer({
|
|
22981
|
-
params: {
|
|
22982
|
-
[`symbols[${resourceId}]`]: intervals.join(",") || void 0
|
|
22983
|
-
}
|
|
22984
|
-
});
|
|
22985
|
-
}
|
|
22986
|
-
}
|
|
22987
|
-
_consolidateIntervals(symbols) {
|
|
22988
|
-
const sortedSymbols = symbols.slice().sort((a, b) => a - b);
|
|
22989
|
-
const intervals = [];
|
|
22990
|
-
let start = sortedSymbols[0];
|
|
22991
|
-
let end = start;
|
|
22992
|
-
for (let i = 1; i <= sortedSymbols.length; i++) {
|
|
22993
|
-
if (sortedSymbols[i] === end + 1) {
|
|
22994
|
-
end = sortedSymbols[i];
|
|
22995
|
-
} else {
|
|
22996
|
-
intervals.push(start === end ? `${start}` : `${start}-${end}`);
|
|
22997
|
-
start = sortedSymbols[i];
|
|
22998
|
-
end = start;
|
|
22999
|
-
}
|
|
23000
|
-
}
|
|
23001
|
-
return intervals;
|
|
23002
|
-
}
|
|
23003
23104
|
};
|
|
23004
23105
|
} else {
|
|
23005
23106
|
throw new Error(adapter + " not supported yet. Only TILE");
|
|
@@ -23361,16 +23462,25 @@ var NgwLeaflet = (function () {
|
|
|
23361
23462
|
});
|
|
23362
23463
|
}
|
|
23363
23464
|
resource(opt) {
|
|
23465
|
+
return __async$8(this, null, function* () {
|
|
23466
|
+
const composite = yield this.composite(opt);
|
|
23467
|
+
return composite.feature_layer;
|
|
23468
|
+
});
|
|
23469
|
+
}
|
|
23470
|
+
composite(opt) {
|
|
23364
23471
|
return __async$8(this, null, function* () {
|
|
23365
23472
|
if (this._resource && this._resource.feature_layer) {
|
|
23366
|
-
return this._resource
|
|
23473
|
+
return this._resource;
|
|
23367
23474
|
}
|
|
23368
23475
|
const resp = yield this.connector.getResource(this.layerId, opt);
|
|
23369
|
-
if (!
|
|
23370
|
-
throw new Error("Resource
|
|
23476
|
+
if (!resp) {
|
|
23477
|
+
throw new Error("Resource does not exist");
|
|
23478
|
+
}
|
|
23479
|
+
if (!resp.feature_layer) {
|
|
23480
|
+
throw new Error("Resource is not a vector layer");
|
|
23371
23481
|
}
|
|
23372
23482
|
this._resource = resp;
|
|
23373
|
-
return resp
|
|
23483
|
+
return resp;
|
|
23374
23484
|
});
|
|
23375
23485
|
}
|
|
23376
23486
|
getBounds(opt) {
|
|
@@ -23383,7 +23493,7 @@ var NgwLeaflet = (function () {
|
|
|
23383
23493
|
resourceId: this.layerId
|
|
23384
23494
|
}, opt));
|
|
23385
23495
|
}
|
|
23386
|
-
geojson(options) {
|
|
23496
|
+
geojson(options = {}) {
|
|
23387
23497
|
if (this._geojson) {
|
|
23388
23498
|
return Promise.resolve(this._geojson);
|
|
23389
23499
|
}
|
|
@@ -26345,7 +26455,8 @@ var NgwLeaflet = (function () {
|
|
|
26345
26455
|
const identFunc = typeof layer.getIdentificationIds === "function" ? layer.getIdentificationIds : false;
|
|
26346
26456
|
const interactive = (_a = layer.options.interactive) != null ? _a : true;
|
|
26347
26457
|
if (identFunc && layer.options.selectable && interactive && this.isLayerVisible(layer)) {
|
|
26348
|
-
|
|
26458
|
+
const layerIds = identFunc.call(layer);
|
|
26459
|
+
promises.push(layerIds);
|
|
26349
26460
|
}
|
|
26350
26461
|
}
|
|
26351
26462
|
const getIdsPromise = Promise.all(promises);
|