@nextgis/ngw-leaflet 2.2.2 → 2.3.0
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 +162 -222
- 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 +162 -222
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +1 -1
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +5 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 2.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 2.3.0; author: NextGIS */
|
|
2
2
|
var NgwLeaflet = (function () {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -14860,21 +14860,43 @@ var NgwLeaflet = (function () {
|
|
|
14860
14860
|
return radius;
|
|
14861
14861
|
}
|
|
14862
14862
|
|
|
14863
|
+
function checkExtent(extent) {
|
|
14864
|
+
const [minLon, minLat, maxLon, maxLat] = extent;
|
|
14865
|
+
const isOrderValid = minLon < maxLon && minLat < maxLat;
|
|
14866
|
+
if (!isOrderValid) {
|
|
14867
|
+
console.log("Error: The extent coordinates are not in the correct order.");
|
|
14868
|
+
console.log(
|
|
14869
|
+
`Received extent: [${minLon}, ${minLat}, ${maxLon}, ${maxLat}]`
|
|
14870
|
+
);
|
|
14871
|
+
const correctedExtent = [
|
|
14872
|
+
Math.min(minLon, maxLon),
|
|
14873
|
+
Math.min(minLat, maxLat),
|
|
14874
|
+
Math.max(minLon, maxLon),
|
|
14875
|
+
Math.max(maxLat, minLat)
|
|
14876
|
+
];
|
|
14877
|
+
console.log(`Expected order: [${correctedExtent.join(", ")}]`);
|
|
14878
|
+
}
|
|
14879
|
+
const isValidLon = minLon >= -180 && maxLon <= 180;
|
|
14880
|
+
const isValidLat = minLat >= -90 && maxLat <= 90;
|
|
14881
|
+
if (!isValidLon || !isValidLat) {
|
|
14882
|
+
console.log(
|
|
14883
|
+
"Warning: The coordinates may not be within valid geographic ranges."
|
|
14884
|
+
);
|
|
14885
|
+
}
|
|
14886
|
+
return isOrderValid && isValidLon && isValidLat;
|
|
14887
|
+
}
|
|
14888
|
+
|
|
14863
14889
|
function isEqual(a, b, o, p) {
|
|
14864
14890
|
if (a instanceof Array) {
|
|
14865
|
-
if (!(b instanceof Array))
|
|
14866
|
-
return false;
|
|
14891
|
+
if (!(b instanceof Array)) return false;
|
|
14867
14892
|
return b.sort().join("") === a.sort().join("");
|
|
14868
14893
|
} else if (a instanceof Date) {
|
|
14869
|
-
if (!(b instanceof Date))
|
|
14870
|
-
return false;
|
|
14894
|
+
if (!(b instanceof Date)) return false;
|
|
14871
14895
|
return "" + a === "" + b;
|
|
14872
14896
|
} else if (a instanceof Function) {
|
|
14873
|
-
if (!(b instanceof Function))
|
|
14874
|
-
return false;
|
|
14897
|
+
if (!(b instanceof Function)) return false;
|
|
14875
14898
|
} else if (a instanceof Object) {
|
|
14876
|
-
if (!(b instanceof Object))
|
|
14877
|
-
return false;
|
|
14899
|
+
if (!(b instanceof Object)) return false;
|
|
14878
14900
|
if (a === o) {
|
|
14879
14901
|
return b === p;
|
|
14880
14902
|
} else {
|
|
@@ -14886,10 +14908,8 @@ var NgwLeaflet = (function () {
|
|
|
14886
14908
|
function objectDeepEqual(o, p) {
|
|
14887
14909
|
const keysO = Object.keys(o).sort();
|
|
14888
14910
|
const keysP = Object.keys(p).sort();
|
|
14889
|
-
if (keysO.length !== keysP.length)
|
|
14890
|
-
|
|
14891
|
-
if (keysO.join("") !== keysP.join(""))
|
|
14892
|
-
return false;
|
|
14911
|
+
if (keysO.length !== keysP.length) return false;
|
|
14912
|
+
if (keysO.join("") !== keysP.join("")) return false;
|
|
14893
14913
|
for (let i = 0; i < keysO.length; i++) {
|
|
14894
14914
|
const oVal = o[keysO[i]];
|
|
14895
14915
|
const pVal = p[keysP[i]];
|
|
@@ -15033,10 +15053,7 @@ var NgwLeaflet = (function () {
|
|
|
15033
15053
|
|
|
15034
15054
|
var __defProp$$ = Object.defineProperty;
|
|
15035
15055
|
var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15036
|
-
var __publicField$I = (obj, key, value) =>
|
|
15037
|
-
__defNormalProp$$(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15038
|
-
return value;
|
|
15039
|
-
};
|
|
15056
|
+
var __publicField$I = (obj, key, value) => __defNormalProp$$(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15040
15057
|
class BaseAdapter {
|
|
15041
15058
|
constructor(map, options) {
|
|
15042
15059
|
this.map = map;
|
|
@@ -15118,20 +15135,18 @@ var NgwLeaflet = (function () {
|
|
|
15118
15135
|
}
|
|
15119
15136
|
return a;
|
|
15120
15137
|
};
|
|
15121
|
-
var __publicField$H = (obj, key, value) =>
|
|
15122
|
-
__defNormalProp$Z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15123
|
-
return value;
|
|
15124
|
-
};
|
|
15138
|
+
var __publicField$H = (obj, key, value) => __defNormalProp$Z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15125
15139
|
class GeoJsonEvents {
|
|
15126
15140
|
constructor(layer) {
|
|
15127
15141
|
__publicField$H(this, "layer");
|
|
15128
15142
|
__publicField$H(this, "_onclick");
|
|
15143
|
+
__publicField$H(this, "_ondblclick");
|
|
15129
15144
|
__publicField$H(this, "_mouseout");
|
|
15130
15145
|
__publicField$H(this, "_mouseover");
|
|
15131
15146
|
this.layer = layer;
|
|
15132
15147
|
}
|
|
15133
15148
|
handleMouseEvents(layer) {
|
|
15134
|
-
const { onClick, onLayerClick, onMouseOut, onMouseOver } = this.layer.options;
|
|
15149
|
+
const { onClick, onDoubleClick, onLayerClick, onMouseOut, onMouseOver } = this.layer.options;
|
|
15135
15150
|
const onClick_ = onClick || onLayerClick;
|
|
15136
15151
|
if (onClick_) {
|
|
15137
15152
|
this._onclick = (e) => {
|
|
@@ -15142,6 +15157,16 @@ var NgwLeaflet = (function () {
|
|
|
15142
15157
|
};
|
|
15143
15158
|
layer.on("click", this._onclick, this);
|
|
15144
15159
|
}
|
|
15160
|
+
if (onDoubleClick) {
|
|
15161
|
+
this._ondblclick = (e) => {
|
|
15162
|
+
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
15163
|
+
const selected = !!this.layer._getSelected(layer);
|
|
15164
|
+
onDoubleClick(__spreadValues$C({
|
|
15165
|
+
selected
|
|
15166
|
+
}, this._createMouseEvent(e)));
|
|
15167
|
+
};
|
|
15168
|
+
layer.on("dblclick", this._ondblclick, this);
|
|
15169
|
+
}
|
|
15145
15170
|
if (onMouseOut) {
|
|
15146
15171
|
this._mouseout = (e) => {
|
|
15147
15172
|
onMouseOut(this._createMouseEvent(e));
|
|
@@ -15769,8 +15794,7 @@ var NgwLeaflet = (function () {
|
|
|
15769
15794
|
return value;
|
|
15770
15795
|
};
|
|
15771
15796
|
function typeOfValue(value) {
|
|
15772
|
-
if (value === null)
|
|
15773
|
-
return "null";
|
|
15797
|
+
if (value === null) return "null";
|
|
15774
15798
|
switch (typeof value) {
|
|
15775
15799
|
case "string":
|
|
15776
15800
|
return "string";
|
|
@@ -15925,10 +15949,8 @@ var NgwLeaflet = (function () {
|
|
|
15925
15949
|
function like(b, a, iLike) {
|
|
15926
15950
|
a = String(a);
|
|
15927
15951
|
b = String(b);
|
|
15928
|
-
if (a === b)
|
|
15929
|
-
|
|
15930
|
-
if (iLike && a.toUpperCase() === b.toUpperCase())
|
|
15931
|
-
return true;
|
|
15952
|
+
if (a === b) return true;
|
|
15953
|
+
if (iLike && a.toUpperCase() === b.toUpperCase()) return true;
|
|
15932
15954
|
const re = `^${reEscape(a)}$`.replace(/%/g, ".*").replace("_", ".");
|
|
15933
15955
|
return new RegExp(re, iLike ? "i" : "").exec(b) !== null;
|
|
15934
15956
|
}
|
|
@@ -16166,10 +16188,7 @@ var NgwLeaflet = (function () {
|
|
|
16166
16188
|
}
|
|
16167
16189
|
return target;
|
|
16168
16190
|
};
|
|
16169
|
-
var __publicField$G = (obj, key, value) =>
|
|
16170
|
-
__defNormalProp$U(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16171
|
-
return value;
|
|
16172
|
-
};
|
|
16191
|
+
var __publicField$G = (obj, key, value) => __defNormalProp$U(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16173
16192
|
class GeoJsonPaint {
|
|
16174
16193
|
constructor(layer) {
|
|
16175
16194
|
__publicField$G(this, "layer");
|
|
@@ -16318,10 +16337,7 @@ var NgwLeaflet = (function () {
|
|
|
16318
16337
|
return a;
|
|
16319
16338
|
};
|
|
16320
16339
|
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
16321
|
-
var __publicField$F = (obj, key, value) =>
|
|
16322
|
-
__defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16323
|
-
return value;
|
|
16324
|
-
};
|
|
16340
|
+
var __publicField$F = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16325
16341
|
var __async$l = (__this, __arguments, generator) => {
|
|
16326
16342
|
return new Promise((resolve, reject) => {
|
|
16327
16343
|
var fulfilled = (value) => {
|
|
@@ -16908,10 +16924,7 @@ var NgwLeaflet = (function () {
|
|
|
16908
16924
|
|
|
16909
16925
|
var __defProp$S = Object.defineProperty;
|
|
16910
16926
|
var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16911
|
-
var __publicField$E = (obj, key, value) =>
|
|
16912
|
-
__defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16913
|
-
return value;
|
|
16914
|
-
};
|
|
16927
|
+
var __publicField$E = (obj, key, value) => __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16915
16928
|
class Queue {
|
|
16916
16929
|
/**
|
|
16917
16930
|
* @param {PromiseQueueOptions} options - Configuration options for the queue.
|
|
@@ -17000,10 +17013,7 @@ var NgwLeaflet = (function () {
|
|
|
17000
17013
|
|
|
17001
17014
|
var __defProp$R = Object.defineProperty;
|
|
17002
17015
|
var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17003
|
-
var __publicField$D = (obj, key, value) =>
|
|
17004
|
-
__defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17005
|
-
return value;
|
|
17006
|
-
};
|
|
17016
|
+
var __publicField$D = (obj, key, value) => __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17007
17017
|
class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
17008
17018
|
constructor(imageUrl, bounds, options) {
|
|
17009
17019
|
super(imageUrl, bounds, options);
|
|
@@ -17034,10 +17044,7 @@ var NgwLeaflet = (function () {
|
|
|
17034
17044
|
|
|
17035
17045
|
var __defProp$Q = Object.defineProperty;
|
|
17036
17046
|
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17037
|
-
var __publicField$C = (obj, key, value) =>
|
|
17038
|
-
__defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17039
|
-
return value;
|
|
17040
|
-
};
|
|
17047
|
+
var __publicField$C = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17041
17048
|
class ImageLayer extends leafletSrcExports.Layer {
|
|
17042
17049
|
constructor(url, options) {
|
|
17043
17050
|
super(options);
|
|
@@ -17241,10 +17248,7 @@ var NgwLeaflet = (function () {
|
|
|
17241
17248
|
}
|
|
17242
17249
|
return a;
|
|
17243
17250
|
};
|
|
17244
|
-
var __publicField$B = (obj, key, value) =>
|
|
17245
|
-
__defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17246
|
-
return value;
|
|
17247
|
-
};
|
|
17251
|
+
var __publicField$B = (obj, key, value) => __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17248
17252
|
class ImageAdapter extends BaseAdapter {
|
|
17249
17253
|
constructor() {
|
|
17250
17254
|
super(...arguments);
|
|
@@ -17522,10 +17526,7 @@ var NgwLeaflet = (function () {
|
|
|
17522
17526
|
}
|
|
17523
17527
|
return a;
|
|
17524
17528
|
};
|
|
17525
|
-
var __publicField$A = (obj, key, value) =>
|
|
17526
|
-
__defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17527
|
-
return value;
|
|
17528
|
-
};
|
|
17529
|
+
var __publicField$A = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17529
17530
|
const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
17530
17531
|
constructor() {
|
|
17531
17532
|
__publicField$A(this, "options", { target: "map" });
|
|
@@ -17603,8 +17604,7 @@ var NgwLeaflet = (function () {
|
|
|
17603
17604
|
}
|
|
17604
17605
|
setView(lngLatOrOpt, zoom) {
|
|
17605
17606
|
const map = this.map;
|
|
17606
|
-
if (!map)
|
|
17607
|
-
return;
|
|
17607
|
+
if (!map) return;
|
|
17608
17608
|
if (Array.isArray(lngLatOrOpt)) {
|
|
17609
17609
|
const lngLat = lngLatOrOpt;
|
|
17610
17610
|
const [lng, lat] = lngLat;
|
|
@@ -17672,8 +17672,7 @@ var NgwLeaflet = (function () {
|
|
|
17672
17672
|
return (_a = this.map && this.map.getZoom()) != null ? _a : void 0;
|
|
17673
17673
|
}
|
|
17674
17674
|
getBounds() {
|
|
17675
|
-
if (!this.map)
|
|
17676
|
-
return void 0;
|
|
17675
|
+
if (!this.map) return void 0;
|
|
17677
17676
|
const b = this.map.getBounds();
|
|
17678
17677
|
const sw = b.getSouthWest();
|
|
17679
17678
|
const ne = b.getNorthEast();
|
|
@@ -17862,10 +17861,7 @@ var NgwLeaflet = (function () {
|
|
|
17862
17861
|
|
|
17863
17862
|
var __defProp$K = Object.defineProperty;
|
|
17864
17863
|
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17865
|
-
var __publicField$z = (obj, key, value) =>
|
|
17866
|
-
__defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17867
|
-
return value;
|
|
17868
|
-
};
|
|
17864
|
+
var __publicField$z = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17869
17865
|
class CancelError extends Error {
|
|
17870
17866
|
constructor() {
|
|
17871
17867
|
super();
|
|
@@ -17876,10 +17872,7 @@ var NgwLeaflet = (function () {
|
|
|
17876
17872
|
|
|
17877
17873
|
var __defProp$J = Object.defineProperty;
|
|
17878
17874
|
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17879
|
-
var __publicField$y = (obj, key, value) =>
|
|
17880
|
-
__defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17881
|
-
return value;
|
|
17882
|
-
};
|
|
17875
|
+
var __publicField$y = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17883
17876
|
class PromiseControl {
|
|
17884
17877
|
constructor(options = {}) {
|
|
17885
17878
|
this.options = options;
|
|
@@ -17961,10 +17954,7 @@ var NgwLeaflet = (function () {
|
|
|
17961
17954
|
|
|
17962
17955
|
var __defProp$I = Object.defineProperty;
|
|
17963
17956
|
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17964
|
-
var __publicField$x = (obj, key, value) =>
|
|
17965
|
-
__defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17966
|
-
return value;
|
|
17967
|
-
};
|
|
17957
|
+
var __publicField$x = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17968
17958
|
class TimeoutError extends Error {
|
|
17969
17959
|
constructor() {
|
|
17970
17960
|
super();
|
|
@@ -17975,10 +17965,7 @@ var NgwLeaflet = (function () {
|
|
|
17975
17965
|
|
|
17976
17966
|
var __defProp$H = Object.defineProperty;
|
|
17977
17967
|
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17978
|
-
var __publicField$w = (obj, key, value) =>
|
|
17979
|
-
__defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17980
|
-
return value;
|
|
17981
|
-
};
|
|
17968
|
+
var __publicField$w = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
17982
17969
|
var _a;
|
|
17983
17970
|
const handleCallback = (resolve, reject, callback, r) => {
|
|
17984
17971
|
try {
|
|
@@ -17988,6 +17975,7 @@ var NgwLeaflet = (function () {
|
|
|
17988
17975
|
}
|
|
17989
17976
|
};
|
|
17990
17977
|
let ID$3 = 0;
|
|
17978
|
+
_a = Symbol.toStringTag;
|
|
17991
17979
|
const _CancelablePromise = class _CancelablePromise {
|
|
17992
17980
|
constructor(executor, timeout) {
|
|
17993
17981
|
// @ts-ignore
|
|
@@ -18167,7 +18155,6 @@ var NgwLeaflet = (function () {
|
|
|
18167
18155
|
this._promise = void 0;
|
|
18168
18156
|
}
|
|
18169
18157
|
};
|
|
18170
|
-
_a = Symbol.toStringTag;
|
|
18171
18158
|
__publicField$w(_CancelablePromise, "CancelError", CancelError);
|
|
18172
18159
|
__publicField$w(_CancelablePromise, "TimeoutError", TimeoutError);
|
|
18173
18160
|
__publicField$w(_CancelablePromise, "PromiseControl", PromiseControl);
|
|
@@ -18248,10 +18235,7 @@ var NgwLeaflet = (function () {
|
|
|
18248
18235
|
|
|
18249
18236
|
var __defProp$G = Object.defineProperty;
|
|
18250
18237
|
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18251
|
-
var __publicField$v = (obj, key, value) =>
|
|
18252
|
-
__defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18253
|
-
return value;
|
|
18254
|
-
};
|
|
18238
|
+
var __publicField$v = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18255
18239
|
const _Cache = class _Cache {
|
|
18256
18240
|
constructor(options = {}) {
|
|
18257
18241
|
__publicField$v(this, "cache", []);
|
|
@@ -18378,10 +18362,7 @@ var NgwLeaflet = (function () {
|
|
|
18378
18362
|
|
|
18379
18363
|
var __defProp$F = Object.defineProperty;
|
|
18380
18364
|
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18381
|
-
var __publicField$u = (obj, key, value) =>
|
|
18382
|
-
__defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18383
|
-
return value;
|
|
18384
|
-
};
|
|
18365
|
+
var __publicField$u = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18385
18366
|
class NgwError extends Error {
|
|
18386
18367
|
constructor(er) {
|
|
18387
18368
|
super();
|
|
@@ -18400,10 +18381,7 @@ var NgwLeaflet = (function () {
|
|
|
18400
18381
|
|
|
18401
18382
|
var __defProp$E = Object.defineProperty;
|
|
18402
18383
|
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18403
|
-
var __publicField$t = (obj, key, value) =>
|
|
18404
|
-
__defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18405
|
-
return value;
|
|
18406
|
-
};
|
|
18384
|
+
var __publicField$t = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18407
18385
|
class ResourceNotFoundError extends NgwError {
|
|
18408
18386
|
constructor(obj) {
|
|
18409
18387
|
super(obj);
|
|
@@ -18461,10 +18439,7 @@ var NgwLeaflet = (function () {
|
|
|
18461
18439
|
return a;
|
|
18462
18440
|
};
|
|
18463
18441
|
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
18464
|
-
var __publicField$s = (obj, key, value) =>
|
|
18465
|
-
__defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18466
|
-
return value;
|
|
18467
|
-
};
|
|
18442
|
+
var __publicField$s = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18468
18443
|
var __async$k = (__this, __arguments, generator) => {
|
|
18469
18444
|
return new Promise((resolve, reject) => {
|
|
18470
18445
|
var fulfilled = (value) => {
|
|
@@ -18486,9 +18461,14 @@ var NgwLeaflet = (function () {
|
|
|
18486
18461
|
});
|
|
18487
18462
|
};
|
|
18488
18463
|
class ResourcesControl {
|
|
18489
|
-
constructor(
|
|
18464
|
+
constructor({
|
|
18465
|
+
connector,
|
|
18466
|
+
cacheId
|
|
18467
|
+
}) {
|
|
18468
|
+
__publicField$s(this, "cache");
|
|
18469
|
+
__publicField$s(this, "connector");
|
|
18490
18470
|
this.connector = connector;
|
|
18491
|
-
|
|
18471
|
+
this.cache = new Cache({ namespace: cacheId });
|
|
18492
18472
|
}
|
|
18493
18473
|
// -------------------------------------------------------------------------
|
|
18494
18474
|
// Resource Methods
|
|
@@ -18501,7 +18481,7 @@ var NgwLeaflet = (function () {
|
|
|
18501
18481
|
* Fetching resource would be cached to speed up next call
|
|
18502
18482
|
*/
|
|
18503
18483
|
getOne(resource, requestOptions) {
|
|
18504
|
-
const cache =
|
|
18484
|
+
const cache = this.cache;
|
|
18505
18485
|
const forCache = {};
|
|
18506
18486
|
const opt = __spreadProps$e(__spreadValues$q({}, requestOptions), { cache: false });
|
|
18507
18487
|
if (typeof resource === "string") {
|
|
@@ -18752,10 +18732,7 @@ var NgwLeaflet = (function () {
|
|
|
18752
18732
|
|
|
18753
18733
|
var __defProp$C = Object.defineProperty;
|
|
18754
18734
|
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18755
|
-
var __publicField$r = (obj, key, value) =>
|
|
18756
|
-
__defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18757
|
-
return value;
|
|
18758
|
-
};
|
|
18735
|
+
var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18759
18736
|
class InsufficientPermissionsError extends NgwError {
|
|
18760
18737
|
constructor(obj) {
|
|
18761
18738
|
super(obj);
|
|
@@ -18835,10 +18812,7 @@ var NgwLeaflet = (function () {
|
|
|
18835
18812
|
|
|
18836
18813
|
var __defProp$B = Object.defineProperty;
|
|
18837
18814
|
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18838
|
-
var __publicField$q = (obj, key, value) =>
|
|
18839
|
-
__defNormalProp$B(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18840
|
-
return value;
|
|
18841
|
-
};
|
|
18815
|
+
var __publicField$q = (obj, key, value) => __defNormalProp$B(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18842
18816
|
class NetworkError extends Error {
|
|
18843
18817
|
constructor(url) {
|
|
18844
18818
|
super();
|
|
@@ -18947,10 +18921,7 @@ var NgwLeaflet = (function () {
|
|
|
18947
18921
|
}
|
|
18948
18922
|
return a;
|
|
18949
18923
|
};
|
|
18950
|
-
var __publicField$p = (obj, key, value) =>
|
|
18951
|
-
__defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18952
|
-
return value;
|
|
18953
|
-
};
|
|
18924
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18954
18925
|
let ID$2 = 0;
|
|
18955
18926
|
class NgwConnector {
|
|
18956
18927
|
constructor(options) {
|
|
@@ -18959,10 +18930,12 @@ var NgwLeaflet = (function () {
|
|
|
18959
18930
|
__publicField$p(this, "emitter", new EventEmitter());
|
|
18960
18931
|
__publicField$p(this, "user");
|
|
18961
18932
|
__publicField$p(this, "resources");
|
|
18933
|
+
__publicField$p(this, "cache");
|
|
18962
18934
|
__publicField$p(this, "routeStr", "/api/component/pyramid/route");
|
|
18963
18935
|
__publicField$p(this, "activeRequests", []);
|
|
18964
18936
|
__publicField$p(this, "requestTransform");
|
|
18965
18937
|
const exist = findConnector(options);
|
|
18938
|
+
this.cache = new Cache({ namespace: options.cacheId });
|
|
18966
18939
|
if (exist) {
|
|
18967
18940
|
return exist;
|
|
18968
18941
|
} else {
|
|
@@ -18972,13 +18945,23 @@ var NgwLeaflet = (function () {
|
|
|
18972
18945
|
if (this.options.requestTransform) {
|
|
18973
18946
|
this.requestTransform = this.options.requestTransform;
|
|
18974
18947
|
}
|
|
18975
|
-
this.resources = new ResourcesControl(
|
|
18948
|
+
this.resources = new ResourcesControl({
|
|
18949
|
+
connector: this,
|
|
18950
|
+
cacheId: options.cacheId
|
|
18951
|
+
});
|
|
18976
18952
|
addConnector(this);
|
|
18977
18953
|
}
|
|
18978
18954
|
}
|
|
18979
18955
|
static create(options) {
|
|
18980
18956
|
return new this(options);
|
|
18981
18957
|
}
|
|
18958
|
+
/**
|
|
18959
|
+
* Clear the cache.
|
|
18960
|
+
*/
|
|
18961
|
+
clearCache() {
|
|
18962
|
+
this.cache.clean();
|
|
18963
|
+
this.resources.cache.clean();
|
|
18964
|
+
}
|
|
18982
18965
|
setRequestTransform(requestTransform) {
|
|
18983
18966
|
this.requestTransform = requestTransform;
|
|
18984
18967
|
}
|
|
@@ -19006,7 +18989,6 @@ var NgwLeaflet = (function () {
|
|
|
19006
18989
|
* ```
|
|
19007
18990
|
*/
|
|
19008
18991
|
connect() {
|
|
19009
|
-
const cache = new Cache();
|
|
19010
18992
|
const auth = this.options.auth;
|
|
19011
18993
|
const makeConnect = () => new CancelablePromise((resolve, reject) => {
|
|
19012
18994
|
const makeQuery = () => {
|
|
@@ -19026,7 +19008,7 @@ var NgwLeaflet = (function () {
|
|
|
19026
19008
|
}
|
|
19027
19009
|
return makeQuery();
|
|
19028
19010
|
});
|
|
19029
|
-
return cache.add("route", makeConnect, {
|
|
19011
|
+
return this.cache.add("route", makeConnect, {
|
|
19030
19012
|
id: this.id,
|
|
19031
19013
|
auth,
|
|
19032
19014
|
baseUrl: this.options.baseUrl
|
|
@@ -19049,8 +19031,8 @@ var NgwLeaflet = (function () {
|
|
|
19049
19031
|
removeConnector(this);
|
|
19050
19032
|
this.options.auth = void 0;
|
|
19051
19033
|
this.user = void 0;
|
|
19034
|
+
this.clearCache();
|
|
19052
19035
|
this.emitter.emit("logout");
|
|
19053
|
-
this.resources.cache.clean();
|
|
19054
19036
|
}
|
|
19055
19037
|
getUserInfo(credentials, options) {
|
|
19056
19038
|
if (this.user && this.user.id) {
|
|
@@ -19135,8 +19117,7 @@ var NgwLeaflet = (function () {
|
|
|
19135
19117
|
const params = objectRemoveEmpty(params_);
|
|
19136
19118
|
const makeApiRequest = () => apiRequest({ name, params, requestOptions, connector: this });
|
|
19137
19119
|
if (requestOptions.cache && method === "GET") {
|
|
19138
|
-
|
|
19139
|
-
return cache.add(name, makeApiRequest, __spreadValues$p({
|
|
19120
|
+
return this.cache.add(name, makeApiRequest, __spreadValues$p({
|
|
19140
19121
|
params
|
|
19141
19122
|
}, objectRemoveEmpty({
|
|
19142
19123
|
headers,
|
|
@@ -19652,10 +19633,7 @@ var NgwLeaflet = (function () {
|
|
|
19652
19633
|
|
|
19653
19634
|
var __defProp$x = Object.defineProperty;
|
|
19654
19635
|
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19655
|
-
var __publicField$o = (obj, key, value) =>
|
|
19656
|
-
__defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19657
|
-
return value;
|
|
19658
|
-
};
|
|
19636
|
+
var __publicField$o = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19659
19637
|
class BookmarkItem {
|
|
19660
19638
|
constructor(options) {
|
|
19661
19639
|
this.options = options;
|
|
@@ -19819,10 +19797,7 @@ var NgwLeaflet = (function () {
|
|
|
19819
19797
|
|
|
19820
19798
|
var __defProp$w = Object.defineProperty;
|
|
19821
19799
|
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19822
|
-
var __publicField$n = (obj, key, value) =>
|
|
19823
|
-
__defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19824
|
-
return value;
|
|
19825
|
-
};
|
|
19800
|
+
var __publicField$n = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19826
19801
|
class TreeHelper {
|
|
19827
19802
|
constructor(item) {
|
|
19828
19803
|
__publicField$n(this, "item");
|
|
@@ -19892,10 +19867,7 @@ var NgwLeaflet = (function () {
|
|
|
19892
19867
|
|
|
19893
19868
|
var __defProp$v = Object.defineProperty;
|
|
19894
19869
|
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19895
|
-
var __publicField$m = (obj, key, value) =>
|
|
19896
|
-
__defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19897
|
-
return value;
|
|
19898
|
-
};
|
|
19870
|
+
var __publicField$m = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19899
19871
|
class BaseProperty {
|
|
19900
19872
|
constructor(name, item, options) {
|
|
19901
19873
|
__publicField$m(this, "options");
|
|
@@ -20018,10 +19990,7 @@ var NgwLeaflet = (function () {
|
|
|
20018
19990
|
}
|
|
20019
19991
|
return a;
|
|
20020
19992
|
};
|
|
20021
|
-
var __publicField$l = (obj, key, value) =>
|
|
20022
|
-
__defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20023
|
-
return value;
|
|
20024
|
-
};
|
|
19993
|
+
var __publicField$l = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20025
19994
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
20026
19995
|
constructor(name, item, options) {
|
|
20027
19996
|
super(name, item, __spreadValues$m(__spreadValues$m({}, _CheckProperty.options), options));
|
|
@@ -20154,10 +20123,7 @@ var NgwLeaflet = (function () {
|
|
|
20154
20123
|
}
|
|
20155
20124
|
return a;
|
|
20156
20125
|
};
|
|
20157
|
-
var __publicField$k = (obj, key, value) =>
|
|
20158
|
-
__defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20159
|
-
return value;
|
|
20160
|
-
};
|
|
20126
|
+
var __publicField$k = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20161
20127
|
const BOOLEAN_TYPE = "boolean";
|
|
20162
20128
|
const STRING_TYPE = "string";
|
|
20163
20129
|
const _ItemProperties = class _ItemProperties {
|
|
@@ -20249,10 +20215,7 @@ var NgwLeaflet = (function () {
|
|
|
20249
20215
|
}
|
|
20250
20216
|
return a;
|
|
20251
20217
|
};
|
|
20252
|
-
var __publicField$j = (obj, key, value) =>
|
|
20253
|
-
__defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20254
|
-
return value;
|
|
20255
|
-
};
|
|
20218
|
+
var __publicField$j = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20256
20219
|
let ID$1 = 0;
|
|
20257
20220
|
class Item {
|
|
20258
20221
|
constructor(options) {
|
|
@@ -20411,10 +20374,7 @@ var NgwLeaflet = (function () {
|
|
|
20411
20374
|
|
|
20412
20375
|
var __defProp$q = Object.defineProperty;
|
|
20413
20376
|
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20414
|
-
var __publicField$i = (obj, key, value) =>
|
|
20415
|
-
__defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20416
|
-
return value;
|
|
20417
|
-
};
|
|
20377
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20418
20378
|
var __async$j = (__this, __arguments, generator) => {
|
|
20419
20379
|
return new Promise((resolve, reject) => {
|
|
20420
20380
|
var fulfilled = (value) => {
|
|
@@ -20586,10 +20546,7 @@ var NgwLeaflet = (function () {
|
|
|
20586
20546
|
}
|
|
20587
20547
|
return target;
|
|
20588
20548
|
};
|
|
20589
|
-
var __publicField$h = (obj, key, value) =>
|
|
20590
|
-
__defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20591
|
-
return value;
|
|
20592
|
-
};
|
|
20549
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20593
20550
|
var __async$h = (__this, __arguments, generator) => {
|
|
20594
20551
|
return new Promise((resolve, reject) => {
|
|
20595
20552
|
var fulfilled = (value) => {
|
|
@@ -20702,10 +20659,7 @@ var NgwLeaflet = (function () {
|
|
|
20702
20659
|
}
|
|
20703
20660
|
return a;
|
|
20704
20661
|
};
|
|
20705
|
-
var __publicField$g = (obj, key, value) =>
|
|
20706
|
-
__defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20707
|
-
return value;
|
|
20708
|
-
};
|
|
20662
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20709
20663
|
class QmsKit {
|
|
20710
20664
|
constructor(options) {
|
|
20711
20665
|
__publicField$g(this, "options", {
|
|
@@ -20991,10 +20945,7 @@ var NgwLeaflet = (function () {
|
|
|
20991
20945
|
return a;
|
|
20992
20946
|
};
|
|
20993
20947
|
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
20994
|
-
var __publicField$f = (obj, key, value) =>
|
|
20995
|
-
__defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20996
|
-
return value;
|
|
20997
|
-
};
|
|
20948
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20998
20949
|
var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
|
|
20999
20950
|
var __async$f = (__this, __arguments, generator) => {
|
|
21000
20951
|
return new Promise((resolve, reject) => {
|
|
@@ -21427,10 +21378,7 @@ var NgwLeaflet = (function () {
|
|
|
21427
21378
|
return a;
|
|
21428
21379
|
};
|
|
21429
21380
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
21430
|
-
var __publicField$e = (obj, key, value) =>
|
|
21431
|
-
__defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21432
|
-
return value;
|
|
21433
|
-
};
|
|
21381
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21434
21382
|
var __async$d = (__this, __arguments, generator) => {
|
|
21435
21383
|
return new Promise((resolve, reject) => {
|
|
21436
21384
|
var fulfilled = (value) => {
|
|
@@ -21820,10 +21768,7 @@ var NgwLeaflet = (function () {
|
|
|
21820
21768
|
}
|
|
21821
21769
|
return a;
|
|
21822
21770
|
};
|
|
21823
|
-
var __publicField$d = (obj, key, value) =>
|
|
21824
|
-
__defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21825
|
-
return value;
|
|
21826
|
-
};
|
|
21771
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21827
21772
|
var __async$b = (__this, __arguments, generator) => {
|
|
21828
21773
|
return new Promise((resolve, reject) => {
|
|
21829
21774
|
var fulfilled = (value) => {
|
|
@@ -22101,10 +22046,7 @@ var NgwLeaflet = (function () {
|
|
|
22101
22046
|
}
|
|
22102
22047
|
return a;
|
|
22103
22048
|
};
|
|
22104
|
-
var __publicField$c = (obj, key, value) =>
|
|
22105
|
-
__defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22106
|
-
return value;
|
|
22107
|
-
};
|
|
22049
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22108
22050
|
var __async$a = (__this, __arguments, generator) => {
|
|
22109
22051
|
return new Promise((resolve, reject) => {
|
|
22110
22052
|
var fulfilled = (value) => {
|
|
@@ -22281,10 +22223,7 @@ var NgwLeaflet = (function () {
|
|
|
22281
22223
|
}
|
|
22282
22224
|
return a;
|
|
22283
22225
|
};
|
|
22284
|
-
var __publicField$b = (obj, key, value) =>
|
|
22285
|
-
__defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22286
|
-
return value;
|
|
22287
|
-
};
|
|
22226
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22288
22227
|
var __async$8 = (__this, __arguments, generator) => {
|
|
22289
22228
|
return new Promise((resolve, reject) => {
|
|
22290
22229
|
var fulfilled = (value) => {
|
|
@@ -22350,8 +22289,7 @@ var NgwLeaflet = (function () {
|
|
|
22350
22289
|
removeLayer() {
|
|
22351
22290
|
const mapAdapter = this.options.webMap.mapAdapter;
|
|
22352
22291
|
this.getDependLayers().forEach((x) => {
|
|
22353
|
-
if (!("layer" in x))
|
|
22354
|
-
return;
|
|
22292
|
+
if (!("layer" in x)) return;
|
|
22355
22293
|
mapAdapter.removeLayer(x.layer.layer);
|
|
22356
22294
|
});
|
|
22357
22295
|
if (this._webmapBaselayersIds.length) {
|
|
@@ -22652,10 +22590,7 @@ var NgwLeaflet = (function () {
|
|
|
22652
22590
|
}
|
|
22653
22591
|
return a;
|
|
22654
22592
|
};
|
|
22655
|
-
var __publicField$a = (obj, key, value) =>
|
|
22656
|
-
__defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22657
|
-
return value;
|
|
22658
|
-
};
|
|
22593
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22659
22594
|
var __async$7 = (__this, __arguments, generator) => {
|
|
22660
22595
|
return new Promise((resolve, reject) => {
|
|
22661
22596
|
var fulfilled = (value) => {
|
|
@@ -22758,10 +22693,7 @@ var NgwLeaflet = (function () {
|
|
|
22758
22693
|
}
|
|
22759
22694
|
return a;
|
|
22760
22695
|
};
|
|
22761
|
-
var __publicField$9 = (obj, key, value) =>
|
|
22762
|
-
__defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22763
|
-
return value;
|
|
22764
|
-
};
|
|
22696
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22765
22697
|
class IdentifyItem {
|
|
22766
22698
|
constructor(options) {
|
|
22767
22699
|
__publicField$9(this, "id");
|
|
@@ -22964,8 +22896,7 @@ var NgwLeaflet = (function () {
|
|
|
22964
22896
|
}
|
|
22965
22897
|
function convertGeomToWKT(geom) {
|
|
22966
22898
|
const coordinates = getPolygonCoordinates(geom);
|
|
22967
|
-
if (!coordinates)
|
|
22968
|
-
return null;
|
|
22899
|
+
if (!coordinates) return null;
|
|
22969
22900
|
const polygonStr = coordinates.map(([lng, lat]) => {
|
|
22970
22901
|
const [x, y] = degrees2meters(lng, lat);
|
|
22971
22902
|
return `${x} ${y}`;
|
|
@@ -23061,10 +22992,7 @@ var NgwLeaflet = (function () {
|
|
|
23061
22992
|
|
|
23062
22993
|
var __defProp$b = Object.defineProperty;
|
|
23063
22994
|
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23064
|
-
var __publicField$8 = (obj, key, value) =>
|
|
23065
|
-
__defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23066
|
-
return value;
|
|
23067
|
-
};
|
|
22995
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23068
22996
|
class KeyCodes {
|
|
23069
22997
|
constructor() {
|
|
23070
22998
|
__publicField$8(this, "backspace", 8);
|
|
@@ -23143,10 +23071,7 @@ var NgwLeaflet = (function () {
|
|
|
23143
23071
|
|
|
23144
23072
|
var __defProp$a = Object.defineProperty;
|
|
23145
23073
|
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23146
|
-
var __publicField$7 = (obj, key, value) =>
|
|
23147
|
-
__defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23148
|
-
return value;
|
|
23149
|
-
};
|
|
23074
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23150
23075
|
class Keys {
|
|
23151
23076
|
constructor() {
|
|
23152
23077
|
__publicField$7(this, "keyCodeAlias", new KeyCodes());
|
|
@@ -23194,10 +23119,7 @@ var NgwLeaflet = (function () {
|
|
|
23194
23119
|
|
|
23195
23120
|
var __defProp$9 = Object.defineProperty;
|
|
23196
23121
|
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23197
|
-
var __publicField$6 = (obj, key, value) =>
|
|
23198
|
-
__defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23199
|
-
return value;
|
|
23200
|
-
};
|
|
23122
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23201
23123
|
class StateItem {
|
|
23202
23124
|
constructor(webMap, opt) {
|
|
23203
23125
|
this.webMap = webMap;
|
|
@@ -23226,10 +23148,7 @@ var NgwLeaflet = (function () {
|
|
|
23226
23148
|
|
|
23227
23149
|
var __defProp$8 = Object.defineProperty;
|
|
23228
23150
|
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23229
|
-
var __publicField$5 = (obj, key, value) =>
|
|
23230
|
-
__defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23231
|
-
return value;
|
|
23232
|
-
};
|
|
23151
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23233
23152
|
class CenterState extends StateItem {
|
|
23234
23153
|
constructor() {
|
|
23235
23154
|
super(...arguments);
|
|
@@ -23254,10 +23173,7 @@ var NgwLeaflet = (function () {
|
|
|
23254
23173
|
|
|
23255
23174
|
var __defProp$7 = Object.defineProperty;
|
|
23256
23175
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23257
|
-
var __publicField$4 = (obj, key, value) =>
|
|
23258
|
-
__defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23259
|
-
return value;
|
|
23260
|
-
};
|
|
23176
|
+
var __publicField$4 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23261
23177
|
class ZoomState extends StateItem {
|
|
23262
23178
|
constructor() {
|
|
23263
23179
|
super(...arguments);
|
|
@@ -23287,10 +23203,7 @@ var NgwLeaflet = (function () {
|
|
|
23287
23203
|
|
|
23288
23204
|
var __defProp$6 = Object.defineProperty;
|
|
23289
23205
|
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23290
|
-
var __publicField$3 = (obj, key, value) =>
|
|
23291
|
-
__defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23292
|
-
return value;
|
|
23293
|
-
};
|
|
23206
|
+
var __publicField$3 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23294
23207
|
var __async$5 = (__this, __arguments, generator) => {
|
|
23295
23208
|
return new Promise((resolve, reject) => {
|
|
23296
23209
|
var fulfilled = (value) => {
|
|
@@ -23572,6 +23485,7 @@ var NgwLeaflet = (function () {
|
|
|
23572
23485
|
* ```
|
|
23573
23486
|
*/
|
|
23574
23487
|
fitBounds(bounds, options) {
|
|
23488
|
+
checkExtent(bounds);
|
|
23575
23489
|
if (bounds.every((x) => defined(x))) {
|
|
23576
23490
|
if (bounds[1] < -85.06) {
|
|
23577
23491
|
bounds[1] = -85.06;
|
|
@@ -23906,10 +23820,7 @@ var NgwLeaflet = (function () {
|
|
|
23906
23820
|
return a;
|
|
23907
23821
|
};
|
|
23908
23822
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
23909
|
-
var __publicField$2 = (obj, key, value) =>
|
|
23910
|
-
__defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23911
|
-
return value;
|
|
23912
|
-
};
|
|
23823
|
+
var __publicField$2 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23913
23824
|
var __async$4 = (__this, __arguments, generator) => {
|
|
23914
23825
|
return new Promise((resolve, reject) => {
|
|
23915
23826
|
var fulfilled = (value) => {
|
|
@@ -24689,6 +24600,13 @@ var NgwLeaflet = (function () {
|
|
|
24689
24600
|
return Promise.resolve(options);
|
|
24690
24601
|
});
|
|
24691
24602
|
}
|
|
24603
|
+
_onLayerDoubleClick(options) {
|
|
24604
|
+
return __async$4(this, null, function* () {
|
|
24605
|
+
const id = options.layer.id;
|
|
24606
|
+
this._emitLayerEvent("layer:dblclick", id || "", options);
|
|
24607
|
+
return Promise.resolve(options);
|
|
24608
|
+
});
|
|
24609
|
+
}
|
|
24692
24610
|
_onLayerSelect(options) {
|
|
24693
24611
|
return __async$4(this, null, function* () {
|
|
24694
24612
|
this._emitLayerEvent("layer:select", options.layer.id || "", options);
|
|
@@ -24700,17 +24618,25 @@ var NgwLeaflet = (function () {
|
|
|
24700
24618
|
onSelect,
|
|
24701
24619
|
onLayerSelect,
|
|
24702
24620
|
onClick,
|
|
24621
|
+
onDoubleClick,
|
|
24703
24622
|
onLayerClick,
|
|
24704
24623
|
onMouseOut,
|
|
24705
24624
|
onMouseOver
|
|
24706
24625
|
} = options;
|
|
24707
24626
|
const onLayerClickFromOpt = onClick || onLayerClick;
|
|
24627
|
+
const onLayerDblClickFromOpt = onDoubleClick || onLayerClick;
|
|
24708
24628
|
options.onClick = (e) => {
|
|
24709
24629
|
if (onLayerClickFromOpt) {
|
|
24710
24630
|
onLayerClickFromOpt(e);
|
|
24711
24631
|
}
|
|
24712
24632
|
return this._onLayerClick(e);
|
|
24713
24633
|
};
|
|
24634
|
+
options.onDoubleClick = (e) => {
|
|
24635
|
+
if (onLayerDblClickFromOpt) {
|
|
24636
|
+
onLayerDblClickFromOpt(e);
|
|
24637
|
+
}
|
|
24638
|
+
return this._onLayerDoubleClick(e);
|
|
24639
|
+
};
|
|
24714
24640
|
options.onMouseOut = (e) => {
|
|
24715
24641
|
const id = e.layer.id;
|
|
24716
24642
|
onMouseOut && onMouseOut(e);
|
|
@@ -24840,10 +24766,7 @@ var NgwLeaflet = (function () {
|
|
|
24840
24766
|
|
|
24841
24767
|
var __defProp$4 = Object.defineProperty;
|
|
24842
24768
|
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
24843
|
-
var __publicField$1 = (obj, key, value) =>
|
|
24844
|
-
__defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24845
|
-
return value;
|
|
24846
|
-
};
|
|
24769
|
+
var __publicField$1 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24847
24770
|
var __async$3 = (__this, __arguments, generator) => {
|
|
24848
24771
|
return new Promise((resolve, reject) => {
|
|
24849
24772
|
var fulfilled = (value) => {
|
|
@@ -25042,9 +24965,7 @@ var NgwLeaflet = (function () {
|
|
|
25042
24965
|
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
25043
24966
|
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
25044
24967
|
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
25045
|
-
var __knownSymbol = (name, symbol) =>
|
|
25046
|
-
return (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
25047
|
-
};
|
|
24968
|
+
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
25048
24969
|
var __objRest = (source, exclude) => {
|
|
25049
24970
|
var target = {};
|
|
25050
24971
|
for (var prop in source)
|
|
@@ -25310,10 +25231,7 @@ var NgwLeaflet = (function () {
|
|
|
25310
25231
|
return a;
|
|
25311
25232
|
};
|
|
25312
25233
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
25313
|
-
var __publicField = (obj, key, value) =>
|
|
25314
|
-
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
25315
|
-
return value;
|
|
25316
|
-
};
|
|
25234
|
+
var __publicField = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
25317
25235
|
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
|
|
25318
25236
|
var __async$1 = (__this, __arguments, generator) => {
|
|
25319
25237
|
return new Promise((resolve, reject) => {
|
|
@@ -25720,10 +25638,32 @@ var NgwLeaflet = (function () {
|
|
|
25720
25638
|
return;
|
|
25721
25639
|
}
|
|
25722
25640
|
const radius = getIdentifyRadius(center, zoom, pixelRadius);
|
|
25641
|
+
let geom;
|
|
25642
|
+
if (this.options.highlightIdentification) {
|
|
25643
|
+
const highlightOptions = this.options.highlightIdentification;
|
|
25644
|
+
const highlightDuration = typeof highlightOptions === "number" ? highlightOptions : 1e3;
|
|
25645
|
+
const [lng, lat] = ev.lngLat;
|
|
25646
|
+
geom = {
|
|
25647
|
+
type: "Polygon",
|
|
25648
|
+
coordinates: [getCirclePolygonCoordinates(lng, lat, radius)]
|
|
25649
|
+
};
|
|
25650
|
+
const highlightIdentificationLayer = yield this.addGeoJsonLayer({
|
|
25651
|
+
data: {
|
|
25652
|
+
type: "Feature",
|
|
25653
|
+
geometry: geom
|
|
25654
|
+
}
|
|
25655
|
+
});
|
|
25656
|
+
if (highlightDuration !== Infinity) {
|
|
25657
|
+
setTimeout(() => {
|
|
25658
|
+
this.removeLayer(highlightIdentificationLayer);
|
|
25659
|
+
}, highlightDuration);
|
|
25660
|
+
}
|
|
25661
|
+
}
|
|
25723
25662
|
const selectPromise = sendIdentifyRequest(ev, {
|
|
25724
25663
|
layers: ids,
|
|
25725
25664
|
connector: this.connector,
|
|
25726
|
-
radius
|
|
25665
|
+
radius,
|
|
25666
|
+
geom
|
|
25727
25667
|
}).then((resp) => {
|
|
25728
25668
|
const identify = __spreadProps$1(__spreadValues$1({}, resp), {
|
|
25729
25669
|
resources: ids,
|