@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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-leaflet; version: 2.2.2; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 2.3.0; author: NextGIS */
2
2
  function styleInject(css, ref) {
3
3
  if ( ref === void 0 ) ref = {};
4
4
  var insertAt = ref.insertAt;
@@ -14857,21 +14857,43 @@ function getIdentifyRadius(center, zoom, pixelRadius) {
14857
14857
  return radius;
14858
14858
  }
14859
14859
 
14860
+ function checkExtent(extent) {
14861
+ const [minLon, minLat, maxLon, maxLat] = extent;
14862
+ const isOrderValid = minLon < maxLon && minLat < maxLat;
14863
+ if (!isOrderValid) {
14864
+ console.log("Error: The extent coordinates are not in the correct order.");
14865
+ console.log(
14866
+ `Received extent: [${minLon}, ${minLat}, ${maxLon}, ${maxLat}]`
14867
+ );
14868
+ const correctedExtent = [
14869
+ Math.min(minLon, maxLon),
14870
+ Math.min(minLat, maxLat),
14871
+ Math.max(minLon, maxLon),
14872
+ Math.max(maxLat, minLat)
14873
+ ];
14874
+ console.log(`Expected order: [${correctedExtent.join(", ")}]`);
14875
+ }
14876
+ const isValidLon = minLon >= -180 && maxLon <= 180;
14877
+ const isValidLat = minLat >= -90 && maxLat <= 90;
14878
+ if (!isValidLon || !isValidLat) {
14879
+ console.log(
14880
+ "Warning: The coordinates may not be within valid geographic ranges."
14881
+ );
14882
+ }
14883
+ return isOrderValid && isValidLon && isValidLat;
14884
+ }
14885
+
14860
14886
  function isEqual(a, b, o, p) {
14861
14887
  if (a instanceof Array) {
14862
- if (!(b instanceof Array))
14863
- return false;
14888
+ if (!(b instanceof Array)) return false;
14864
14889
  return b.sort().join("") === a.sort().join("");
14865
14890
  } else if (a instanceof Date) {
14866
- if (!(b instanceof Date))
14867
- return false;
14891
+ if (!(b instanceof Date)) return false;
14868
14892
  return "" + a === "" + b;
14869
14893
  } else if (a instanceof Function) {
14870
- if (!(b instanceof Function))
14871
- return false;
14894
+ if (!(b instanceof Function)) return false;
14872
14895
  } else if (a instanceof Object) {
14873
- if (!(b instanceof Object))
14874
- return false;
14896
+ if (!(b instanceof Object)) return false;
14875
14897
  if (a === o) {
14876
14898
  return b === p;
14877
14899
  } else {
@@ -14883,10 +14905,8 @@ function isEqual(a, b, o, p) {
14883
14905
  function objectDeepEqual(o, p) {
14884
14906
  const keysO = Object.keys(o).sort();
14885
14907
  const keysP = Object.keys(p).sort();
14886
- if (keysO.length !== keysP.length)
14887
- return false;
14888
- if (keysO.join("") !== keysP.join(""))
14889
- return false;
14908
+ if (keysO.length !== keysP.length) return false;
14909
+ if (keysO.join("") !== keysP.join("")) return false;
14890
14910
  for (let i = 0; i < keysO.length; i++) {
14891
14911
  const oVal = o[keysO[i]];
14892
14912
  const pVal = p[keysP[i]];
@@ -15030,10 +15050,7 @@ function createFeaturePositionOptions(features) {
15030
15050
 
15031
15051
  var __defProp$$ = Object.defineProperty;
15032
15052
  var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15033
- var __publicField$I = (obj, key, value) => {
15034
- __defNormalProp$$(obj, typeof key !== "symbol" ? key + "" : key, value);
15035
- return value;
15036
- };
15053
+ var __publicField$I = (obj, key, value) => __defNormalProp$$(obj, typeof key !== "symbol" ? key + "" : key, value);
15037
15054
  class BaseAdapter {
15038
15055
  constructor(map, options) {
15039
15056
  this.map = map;
@@ -15115,20 +15132,18 @@ var __spreadValues$C = (a, b) => {
15115
15132
  }
15116
15133
  return a;
15117
15134
  };
15118
- var __publicField$H = (obj, key, value) => {
15119
- __defNormalProp$Z(obj, typeof key !== "symbol" ? key + "" : key, value);
15120
- return value;
15121
- };
15135
+ var __publicField$H = (obj, key, value) => __defNormalProp$Z(obj, typeof key !== "symbol" ? key + "" : key, value);
15122
15136
  class GeoJsonEvents {
15123
15137
  constructor(layer) {
15124
15138
  __publicField$H(this, "layer");
15125
15139
  __publicField$H(this, "_onclick");
15140
+ __publicField$H(this, "_ondblclick");
15126
15141
  __publicField$H(this, "_mouseout");
15127
15142
  __publicField$H(this, "_mouseover");
15128
15143
  this.layer = layer;
15129
15144
  }
15130
15145
  handleMouseEvents(layer) {
15131
- const { onClick, onLayerClick, onMouseOut, onMouseOver } = this.layer.options;
15146
+ const { onClick, onDoubleClick, onLayerClick, onMouseOut, onMouseOver } = this.layer.options;
15132
15147
  const onClick_ = onClick || onLayerClick;
15133
15148
  if (onClick_) {
15134
15149
  this._onclick = (e) => {
@@ -15139,6 +15154,16 @@ class GeoJsonEvents {
15139
15154
  };
15140
15155
  layer.on("click", this._onclick, this);
15141
15156
  }
15157
+ if (onDoubleClick) {
15158
+ this._ondblclick = (e) => {
15159
+ leafletSrcExports.DomEvent.stopPropagation(e);
15160
+ const selected = !!this.layer._getSelected(layer);
15161
+ onDoubleClick(__spreadValues$C({
15162
+ selected
15163
+ }, this._createMouseEvent(e)));
15164
+ };
15165
+ layer.on("dblclick", this._ondblclick, this);
15166
+ }
15142
15167
  if (onMouseOut) {
15143
15168
  this._mouseout = (e) => {
15144
15169
  onMouseOut(this._createMouseEvent(e));
@@ -15766,8 +15791,7 @@ const array = (args) => {
15766
15791
  return value;
15767
15792
  };
15768
15793
  function typeOfValue(value) {
15769
- if (value === null)
15770
- return "null";
15794
+ if (value === null) return "null";
15771
15795
  switch (typeof value) {
15772
15796
  case "string":
15773
15797
  return "string";
@@ -15922,10 +15946,8 @@ function reEscape(s) {
15922
15946
  function like(b, a, iLike) {
15923
15947
  a = String(a);
15924
15948
  b = String(b);
15925
- if (a === b)
15926
- return true;
15927
- if (iLike && a.toUpperCase() === b.toUpperCase())
15928
- return true;
15949
+ if (a === b) return true;
15950
+ if (iLike && a.toUpperCase() === b.toUpperCase()) return true;
15929
15951
  const re = `^${reEscape(a)}$`.replace(/%/g, ".*").replace("_", ".");
15930
15952
  return new RegExp(re, iLike ? "i" : "").exec(b) !== null;
15931
15953
  }
@@ -16163,10 +16185,7 @@ var __objRest$4 = (source, exclude) => {
16163
16185
  }
16164
16186
  return target;
16165
16187
  };
16166
- var __publicField$G = (obj, key, value) => {
16167
- __defNormalProp$U(obj, typeof key !== "symbol" ? key + "" : key, value);
16168
- return value;
16169
- };
16188
+ var __publicField$G = (obj, key, value) => __defNormalProp$U(obj, typeof key !== "symbol" ? key + "" : key, value);
16170
16189
  class GeoJsonPaint {
16171
16190
  constructor(layer) {
16172
16191
  __publicField$G(this, "layer");
@@ -16315,10 +16334,7 @@ var __spreadValues$w = (a, b) => {
16315
16334
  return a;
16316
16335
  };
16317
16336
  var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
16318
- var __publicField$F = (obj, key, value) => {
16319
- __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
16320
- return value;
16321
- };
16337
+ var __publicField$F = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
16322
16338
  var __async$l = (__this, __arguments, generator) => {
16323
16339
  return new Promise((resolve, reject) => {
16324
16340
  var fulfilled = (value) => {
@@ -16905,10 +16921,7 @@ function callAjax(src, headers) {
16905
16921
 
16906
16922
  var __defProp$S = Object.defineProperty;
16907
16923
  var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16908
- var __publicField$E = (obj, key, value) => {
16909
- __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
16910
- return value;
16911
- };
16924
+ var __publicField$E = (obj, key, value) => __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
16912
16925
  class Queue {
16913
16926
  /**
16914
16927
  * @param {PromiseQueueOptions} options - Configuration options for the queue.
@@ -16997,10 +17010,7 @@ const imageQueue = new Queue({ concurrency: 6, delay: 200 });
16997
17010
 
16998
17011
  var __defProp$R = Object.defineProperty;
16999
17012
  var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17000
- var __publicField$D = (obj, key, value) => {
17001
- __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
17002
- return value;
17003
- };
17013
+ var __publicField$D = (obj, key, value) => __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
17004
17014
  class ImageOverlay extends leafletSrcExports.ImageOverlay {
17005
17015
  constructor(imageUrl, bounds, options) {
17006
17016
  super(imageUrl, bounds, options);
@@ -17031,10 +17041,7 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
17031
17041
 
17032
17042
  var __defProp$Q = Object.defineProperty;
17033
17043
  var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17034
- var __publicField$C = (obj, key, value) => {
17035
- __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
17036
- return value;
17037
- };
17044
+ var __publicField$C = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
17038
17045
  class ImageLayer extends leafletSrcExports.Layer {
17039
17046
  constructor(url, options) {
17040
17047
  super(options);
@@ -17238,10 +17245,7 @@ var __spreadValues$v = (a, b) => {
17238
17245
  }
17239
17246
  return a;
17240
17247
  };
17241
- var __publicField$B = (obj, key, value) => {
17242
- __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
17243
- return value;
17244
- };
17248
+ var __publicField$B = (obj, key, value) => __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
17245
17249
  class ImageAdapter extends BaseAdapter {
17246
17250
  constructor() {
17247
17251
  super(...arguments);
@@ -17519,10 +17523,7 @@ var __spreadValues$r = (a, b) => {
17519
17523
  }
17520
17524
  return a;
17521
17525
  };
17522
- var __publicField$A = (obj, key, value) => {
17523
- __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
17524
- return value;
17525
- };
17526
+ var __publicField$A = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
17526
17527
  const _LeafletMapAdapter = class _LeafletMapAdapter {
17527
17528
  constructor() {
17528
17529
  __publicField$A(this, "options", { target: "map" });
@@ -17600,8 +17601,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
17600
17601
  }
17601
17602
  setView(lngLatOrOpt, zoom) {
17602
17603
  const map = this.map;
17603
- if (!map)
17604
- return;
17604
+ if (!map) return;
17605
17605
  if (Array.isArray(lngLatOrOpt)) {
17606
17606
  const lngLat = lngLatOrOpt;
17607
17607
  const [lng, lat] = lngLat;
@@ -17669,8 +17669,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
17669
17669
  return (_a = this.map && this.map.getZoom()) != null ? _a : void 0;
17670
17670
  }
17671
17671
  getBounds() {
17672
- if (!this.map)
17673
- return void 0;
17672
+ if (!this.map) return void 0;
17674
17673
  const b = this.map.getBounds();
17675
17674
  const sw = b.getSouthWest();
17676
17675
  const ne = b.getNorthEast();
@@ -17859,10 +17858,7 @@ let LeafletMapAdapter = _LeafletMapAdapter;
17859
17858
 
17860
17859
  var __defProp$K = Object.defineProperty;
17861
17860
  var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17862
- var __publicField$z = (obj, key, value) => {
17863
- __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
17864
- return value;
17865
- };
17861
+ var __publicField$z = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
17866
17862
  class CancelError extends Error {
17867
17863
  constructor() {
17868
17864
  super();
@@ -17873,10 +17869,7 @@ class CancelError extends Error {
17873
17869
 
17874
17870
  var __defProp$J = Object.defineProperty;
17875
17871
  var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17876
- var __publicField$y = (obj, key, value) => {
17877
- __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
17878
- return value;
17879
- };
17872
+ var __publicField$y = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
17880
17873
  class PromiseControl {
17881
17874
  constructor(options = {}) {
17882
17875
  this.options = options;
@@ -17958,10 +17951,7 @@ class PromiseControl {
17958
17951
 
17959
17952
  var __defProp$I = Object.defineProperty;
17960
17953
  var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17961
- var __publicField$x = (obj, key, value) => {
17962
- __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
17963
- return value;
17964
- };
17954
+ var __publicField$x = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
17965
17955
  class TimeoutError extends Error {
17966
17956
  constructor() {
17967
17957
  super();
@@ -17972,10 +17962,7 @@ class TimeoutError extends Error {
17972
17962
 
17973
17963
  var __defProp$H = Object.defineProperty;
17974
17964
  var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17975
- var __publicField$w = (obj, key, value) => {
17976
- __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
17977
- return value;
17978
- };
17965
+ var __publicField$w = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
17979
17966
  var _a;
17980
17967
  const handleCallback = (resolve, reject, callback, r) => {
17981
17968
  try {
@@ -17985,6 +17972,7 @@ const handleCallback = (resolve, reject, callback, r) => {
17985
17972
  }
17986
17973
  };
17987
17974
  let ID$3 = 0;
17975
+ _a = Symbol.toStringTag;
17988
17976
  const _CancelablePromise = class _CancelablePromise {
17989
17977
  constructor(executor, timeout) {
17990
17978
  // @ts-ignore
@@ -18164,7 +18152,6 @@ const _CancelablePromise = class _CancelablePromise {
18164
18152
  this._promise = void 0;
18165
18153
  }
18166
18154
  };
18167
- _a = Symbol.toStringTag;
18168
18155
  __publicField$w(_CancelablePromise, "CancelError", CancelError);
18169
18156
  __publicField$w(_CancelablePromise, "TimeoutError", TimeoutError);
18170
18157
  __publicField$w(_CancelablePromise, "PromiseControl", PromiseControl);
@@ -18245,10 +18232,7 @@ function getIcon(opt = {}) {
18245
18232
 
18246
18233
  var __defProp$G = Object.defineProperty;
18247
18234
  var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18248
- var __publicField$v = (obj, key, value) => {
18249
- __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
18250
- return value;
18251
- };
18235
+ var __publicField$v = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
18252
18236
  const _Cache = class _Cache {
18253
18237
  constructor(options = {}) {
18254
18238
  __publicField$v(this, "cache", []);
@@ -18375,10 +18359,7 @@ let Cache = _Cache;
18375
18359
 
18376
18360
  var __defProp$F = Object.defineProperty;
18377
18361
  var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18378
- var __publicField$u = (obj, key, value) => {
18379
- __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
18380
- return value;
18381
- };
18362
+ var __publicField$u = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
18382
18363
  class NgwError extends Error {
18383
18364
  constructor(er) {
18384
18365
  super();
@@ -18397,10 +18378,7 @@ class NgwError extends Error {
18397
18378
 
18398
18379
  var __defProp$E = Object.defineProperty;
18399
18380
  var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18400
- var __publicField$t = (obj, key, value) => {
18401
- __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
18402
- return value;
18403
- };
18381
+ var __publicField$t = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
18404
18382
  class ResourceNotFoundError extends NgwError {
18405
18383
  constructor(obj) {
18406
18384
  super(obj);
@@ -18458,10 +18436,7 @@ var __spreadValues$q = (a, b) => {
18458
18436
  return a;
18459
18437
  };
18460
18438
  var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
18461
- var __publicField$s = (obj, key, value) => {
18462
- __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
18463
- return value;
18464
- };
18439
+ var __publicField$s = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
18465
18440
  var __async$k = (__this, __arguments, generator) => {
18466
18441
  return new Promise((resolve, reject) => {
18467
18442
  var fulfilled = (value) => {
@@ -18483,9 +18458,14 @@ var __async$k = (__this, __arguments, generator) => {
18483
18458
  });
18484
18459
  };
18485
18460
  class ResourcesControl {
18486
- constructor(connector) {
18461
+ constructor({
18462
+ connector,
18463
+ cacheId
18464
+ }) {
18465
+ __publicField$s(this, "cache");
18466
+ __publicField$s(this, "connector");
18487
18467
  this.connector = connector;
18488
- __publicField$s(this, "cache", new Cache());
18468
+ this.cache = new Cache({ namespace: cacheId });
18489
18469
  }
18490
18470
  // -------------------------------------------------------------------------
18491
18471
  // Resource Methods
@@ -18498,7 +18478,7 @@ class ResourcesControl {
18498
18478
  * Fetching resource would be cached to speed up next call
18499
18479
  */
18500
18480
  getOne(resource, requestOptions) {
18501
- const cache = new Cache();
18481
+ const cache = this.cache;
18502
18482
  const forCache = {};
18503
18483
  const opt = __spreadProps$e(__spreadValues$q({}, requestOptions), { cache: false });
18504
18484
  if (typeof resource === "string") {
@@ -18749,10 +18729,7 @@ function removeConnector(connector) {
18749
18729
 
18750
18730
  var __defProp$C = Object.defineProperty;
18751
18731
  var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18752
- var __publicField$r = (obj, key, value) => {
18753
- __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
18754
- return value;
18755
- };
18732
+ var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
18756
18733
  class InsufficientPermissionsError extends NgwError {
18757
18734
  constructor(obj) {
18758
18735
  super(obj);
@@ -18832,10 +18809,7 @@ function apiRequest(opt) {
18832
18809
 
18833
18810
  var __defProp$B = Object.defineProperty;
18834
18811
  var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18835
- var __publicField$q = (obj, key, value) => {
18836
- __defNormalProp$B(obj, typeof key !== "symbol" ? key + "" : key, value);
18837
- return value;
18838
- };
18812
+ var __publicField$q = (obj, key, value) => __defNormalProp$B(obj, typeof key !== "symbol" ? key + "" : key, value);
18839
18813
  class NetworkError extends Error {
18840
18814
  constructor(url) {
18841
18815
  super();
@@ -18944,10 +18918,7 @@ var __spreadValues$p = (a, b) => {
18944
18918
  }
18945
18919
  return a;
18946
18920
  };
18947
- var __publicField$p = (obj, key, value) => {
18948
- __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
18949
- return value;
18950
- };
18921
+ var __publicField$p = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
18951
18922
  let ID$2 = 0;
18952
18923
  class NgwConnector {
18953
18924
  constructor(options) {
@@ -18956,10 +18927,12 @@ class NgwConnector {
18956
18927
  __publicField$p(this, "emitter", new EventEmitter());
18957
18928
  __publicField$p(this, "user");
18958
18929
  __publicField$p(this, "resources");
18930
+ __publicField$p(this, "cache");
18959
18931
  __publicField$p(this, "routeStr", "/api/component/pyramid/route");
18960
18932
  __publicField$p(this, "activeRequests", []);
18961
18933
  __publicField$p(this, "requestTransform");
18962
18934
  const exist = findConnector(options);
18935
+ this.cache = new Cache({ namespace: options.cacheId });
18963
18936
  if (exist) {
18964
18937
  return exist;
18965
18938
  } else {
@@ -18969,13 +18942,23 @@ class NgwConnector {
18969
18942
  if (this.options.requestTransform) {
18970
18943
  this.requestTransform = this.options.requestTransform;
18971
18944
  }
18972
- this.resources = new ResourcesControl(this);
18945
+ this.resources = new ResourcesControl({
18946
+ connector: this,
18947
+ cacheId: options.cacheId
18948
+ });
18973
18949
  addConnector(this);
18974
18950
  }
18975
18951
  }
18976
18952
  static create(options) {
18977
18953
  return new this(options);
18978
18954
  }
18955
+ /**
18956
+ * Clear the cache.
18957
+ */
18958
+ clearCache() {
18959
+ this.cache.clean();
18960
+ this.resources.cache.clean();
18961
+ }
18979
18962
  setRequestTransform(requestTransform) {
18980
18963
  this.requestTransform = requestTransform;
18981
18964
  }
@@ -19003,7 +18986,6 @@ class NgwConnector {
19003
18986
  * ```
19004
18987
  */
19005
18988
  connect() {
19006
- const cache = new Cache();
19007
18989
  const auth = this.options.auth;
19008
18990
  const makeConnect = () => new CancelablePromise((resolve, reject) => {
19009
18991
  const makeQuery = () => {
@@ -19023,7 +19005,7 @@ class NgwConnector {
19023
19005
  }
19024
19006
  return makeQuery();
19025
19007
  });
19026
- return cache.add("route", makeConnect, {
19008
+ return this.cache.add("route", makeConnect, {
19027
19009
  id: this.id,
19028
19010
  auth,
19029
19011
  baseUrl: this.options.baseUrl
@@ -19046,8 +19028,8 @@ class NgwConnector {
19046
19028
  removeConnector(this);
19047
19029
  this.options.auth = void 0;
19048
19030
  this.user = void 0;
19031
+ this.clearCache();
19049
19032
  this.emitter.emit("logout");
19050
- this.resources.cache.clean();
19051
19033
  }
19052
19034
  getUserInfo(credentials, options) {
19053
19035
  if (this.user && this.user.id) {
@@ -19132,8 +19114,7 @@ class NgwConnector {
19132
19114
  const params = objectRemoveEmpty(params_);
19133
19115
  const makeApiRequest = () => apiRequest({ name, params, requestOptions, connector: this });
19134
19116
  if (requestOptions.cache && method === "GET") {
19135
- const cache = new Cache();
19136
- return cache.add(name, makeApiRequest, __spreadValues$p({
19117
+ return this.cache.add(name, makeApiRequest, __spreadValues$p({
19137
19118
  params
19138
19119
  }, objectRemoveEmpty({
19139
19120
  headers,
@@ -19649,10 +19630,7 @@ function fetchNgwLayerItem(options) {
19649
19630
 
19650
19631
  var __defProp$x = Object.defineProperty;
19651
19632
  var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19652
- var __publicField$o = (obj, key, value) => {
19653
- __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
19654
- return value;
19655
- };
19633
+ var __publicField$o = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
19656
19634
  class BookmarkItem {
19657
19635
  constructor(options) {
19658
19636
  this.options = options;
@@ -19816,10 +19794,7 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
19816
19794
 
19817
19795
  var __defProp$w = Object.defineProperty;
19818
19796
  var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19819
- var __publicField$n = (obj, key, value) => {
19820
- __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
19821
- return value;
19822
- };
19797
+ var __publicField$n = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
19823
19798
  class TreeHelper {
19824
19799
  constructor(item) {
19825
19800
  __publicField$n(this, "item");
@@ -19889,10 +19864,7 @@ class TreeHelper {
19889
19864
 
19890
19865
  var __defProp$v = Object.defineProperty;
19891
19866
  var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19892
- var __publicField$m = (obj, key, value) => {
19893
- __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
19894
- return value;
19895
- };
19867
+ var __publicField$m = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
19896
19868
  class BaseProperty {
19897
19869
  constructor(name, item, options) {
19898
19870
  __publicField$m(this, "options");
@@ -20015,10 +19987,7 @@ var __spreadValues$m = (a, b) => {
20015
19987
  }
20016
19988
  return a;
20017
19989
  };
20018
- var __publicField$l = (obj, key, value) => {
20019
- __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
20020
- return value;
20021
- };
19990
+ var __publicField$l = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
20022
19991
  const _CheckProperty = class _CheckProperty extends BaseProperty {
20023
19992
  constructor(name, item, options) {
20024
19993
  super(name, item, __spreadValues$m(__spreadValues$m({}, _CheckProperty.options), options));
@@ -20151,10 +20120,7 @@ var __spreadValues$l = (a, b) => {
20151
20120
  }
20152
20121
  return a;
20153
20122
  };
20154
- var __publicField$k = (obj, key, value) => {
20155
- __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
20156
- return value;
20157
- };
20123
+ var __publicField$k = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
20158
20124
  const BOOLEAN_TYPE = "boolean";
20159
20125
  const STRING_TYPE = "string";
20160
20126
  const _ItemProperties = class _ItemProperties {
@@ -20246,10 +20212,7 @@ var __spreadValues$k = (a, b) => {
20246
20212
  }
20247
20213
  return a;
20248
20214
  };
20249
- var __publicField$j = (obj, key, value) => {
20250
- __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
20251
- return value;
20252
- };
20215
+ var __publicField$j = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
20253
20216
  let ID$1 = 0;
20254
20217
  class Item {
20255
20218
  constructor(options) {
@@ -20408,10 +20371,7 @@ function fetchNgwResourceExtent(item, connector, options) {
20408
20371
 
20409
20372
  var __defProp$q = Object.defineProperty;
20410
20373
  var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20411
- var __publicField$i = (obj, key, value) => {
20412
- __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
20413
- return value;
20414
- };
20374
+ var __publicField$i = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
20415
20375
  var __async$j = (__this, __arguments, generator) => {
20416
20376
  return new Promise((resolve, reject) => {
20417
20377
  var fulfilled = (value) => {
@@ -20583,10 +20543,7 @@ var __objRest$1 = (source, exclude) => {
20583
20543
  }
20584
20544
  return target;
20585
20545
  };
20586
- var __publicField$h = (obj, key, value) => {
20587
- __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
20588
- return value;
20589
- };
20546
+ var __publicField$h = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
20590
20547
  var __async$h = (__this, __arguments, generator) => {
20591
20548
  return new Promise((resolve, reject) => {
20592
20549
  var fulfilled = (value) => {
@@ -20699,10 +20656,7 @@ var __spreadValues$h = (a, b) => {
20699
20656
  }
20700
20657
  return a;
20701
20658
  };
20702
- var __publicField$g = (obj, key, value) => {
20703
- __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
20704
- return value;
20705
- };
20659
+ var __publicField$g = (obj, key, value) => __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
20706
20660
  class QmsKit {
20707
20661
  constructor(options) {
20708
20662
  __publicField$g(this, "options", {
@@ -20988,10 +20942,7 @@ var __spreadValues$e = (a, b) => {
20988
20942
  return a;
20989
20943
  };
20990
20944
  var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
20991
- var __publicField$f = (obj, key, value) => {
20992
- __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
20993
- return value;
20994
- };
20945
+ var __publicField$f = (obj, key, value) => __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
20995
20946
  var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
20996
20947
  var __async$f = (__this, __arguments, generator) => {
20997
20948
  return new Promise((resolve, reject) => {
@@ -21424,10 +21375,7 @@ var __spreadValues$d = (a, b) => {
21424
21375
  return a;
21425
21376
  };
21426
21377
  var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
21427
- var __publicField$e = (obj, key, value) => {
21428
- __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
21429
- return value;
21430
- };
21378
+ var __publicField$e = (obj, key, value) => __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
21431
21379
  var __async$d = (__this, __arguments, generator) => {
21432
21380
  return new Promise((resolve, reject) => {
21433
21381
  var fulfilled = (value) => {
@@ -21817,10 +21765,7 @@ var __spreadValues$a = (a, b) => {
21817
21765
  }
21818
21766
  return a;
21819
21767
  };
21820
- var __publicField$d = (obj, key, value) => {
21821
- __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
21822
- return value;
21823
- };
21768
+ var __publicField$d = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
21824
21769
  var __async$b = (__this, __arguments, generator) => {
21825
21770
  return new Promise((resolve, reject) => {
21826
21771
  var fulfilled = (value) => {
@@ -22098,10 +22043,7 @@ var __spreadValues$9 = (a, b) => {
22098
22043
  }
22099
22044
  return a;
22100
22045
  };
22101
- var __publicField$c = (obj, key, value) => {
22102
- __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
22103
- return value;
22104
- };
22046
+ var __publicField$c = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
22105
22047
  var __async$a = (__this, __arguments, generator) => {
22106
22048
  return new Promise((resolve, reject) => {
22107
22049
  var fulfilled = (value) => {
@@ -22278,10 +22220,7 @@ var __spreadValues$8 = (a, b) => {
22278
22220
  }
22279
22221
  return a;
22280
22222
  };
22281
- var __publicField$b = (obj, key, value) => {
22282
- __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
22283
- return value;
22284
- };
22223
+ var __publicField$b = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
22285
22224
  var __async$8 = (__this, __arguments, generator) => {
22286
22225
  return new Promise((resolve, reject) => {
22287
22226
  var fulfilled = (value) => {
@@ -22347,8 +22286,7 @@ class NgwWebmapLayerAdapter {
22347
22286
  removeLayer() {
22348
22287
  const mapAdapter = this.options.webMap.mapAdapter;
22349
22288
  this.getDependLayers().forEach((x) => {
22350
- if (!("layer" in x))
22351
- return;
22289
+ if (!("layer" in x)) return;
22352
22290
  mapAdapter.removeLayer(x.layer.layer);
22353
22291
  });
22354
22292
  if (this._webmapBaselayersIds.length) {
@@ -22649,10 +22587,7 @@ var __spreadValues$7 = (a, b) => {
22649
22587
  }
22650
22588
  return a;
22651
22589
  };
22652
- var __publicField$a = (obj, key, value) => {
22653
- __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
22654
- return value;
22655
- };
22590
+ var __publicField$a = (obj, key, value) => __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
22656
22591
  var __async$7 = (__this, __arguments, generator) => {
22657
22592
  return new Promise((resolve, reject) => {
22658
22593
  var fulfilled = (value) => {
@@ -22755,10 +22690,7 @@ var __spreadValues$6 = (a, b) => {
22755
22690
  }
22756
22691
  return a;
22757
22692
  };
22758
- var __publicField$9 = (obj, key, value) => {
22759
- __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
22760
- return value;
22761
- };
22693
+ var __publicField$9 = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
22762
22694
  class IdentifyItem {
22763
22695
  constructor(options) {
22764
22696
  __publicField$9(this, "id");
@@ -22961,8 +22893,7 @@ function featureLayerIdentify(options) {
22961
22893
  }
22962
22894
  function convertGeomToWKT(geom) {
22963
22895
  const coordinates = getPolygonCoordinates(geom);
22964
- if (!coordinates)
22965
- return null;
22896
+ if (!coordinates) return null;
22966
22897
  const polygonStr = coordinates.map(([lng, lat]) => {
22967
22898
  const [x, y] = degrees2meters(lng, lat);
22968
22899
  return `${x} ${y}`;
@@ -23058,10 +22989,7 @@ function getCompanyLogo(connector, options) {
23058
22989
 
23059
22990
  var __defProp$b = Object.defineProperty;
23060
22991
  var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23061
- var __publicField$8 = (obj, key, value) => {
23062
- __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
23063
- return value;
23064
- };
22992
+ var __publicField$8 = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
23065
22993
  class KeyCodes {
23066
22994
  constructor() {
23067
22995
  __publicField$8(this, "backspace", 8);
@@ -23140,10 +23068,7 @@ class KeyCodes {
23140
23068
 
23141
23069
  var __defProp$a = Object.defineProperty;
23142
23070
  var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23143
- var __publicField$7 = (obj, key, value) => {
23144
- __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
23145
- return value;
23146
- };
23071
+ var __publicField$7 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
23147
23072
  class Keys {
23148
23073
  constructor() {
23149
23074
  __publicField$7(this, "keyCodeAlias", new KeyCodes());
@@ -23191,10 +23116,7 @@ class Keys {
23191
23116
 
23192
23117
  var __defProp$9 = Object.defineProperty;
23193
23118
  var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23194
- var __publicField$6 = (obj, key, value) => {
23195
- __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
23196
- return value;
23197
- };
23119
+ var __publicField$6 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
23198
23120
  class StateItem {
23199
23121
  constructor(webMap, opt) {
23200
23122
  this.webMap = webMap;
@@ -23223,10 +23145,7 @@ class StateItem {
23223
23145
 
23224
23146
  var __defProp$8 = Object.defineProperty;
23225
23147
  var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23226
- var __publicField$5 = (obj, key, value) => {
23227
- __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
23228
- return value;
23229
- };
23148
+ var __publicField$5 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
23230
23149
  class CenterState extends StateItem {
23231
23150
  constructor() {
23232
23151
  super(...arguments);
@@ -23251,10 +23170,7 @@ class CenterState extends StateItem {
23251
23170
 
23252
23171
  var __defProp$7 = Object.defineProperty;
23253
23172
  var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23254
- var __publicField$4 = (obj, key, value) => {
23255
- __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
23256
- return value;
23257
- };
23173
+ var __publicField$4 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
23258
23174
  class ZoomState extends StateItem {
23259
23175
  constructor() {
23260
23176
  super(...arguments);
@@ -23284,10 +23200,7 @@ function clearObject(obj) {
23284
23200
 
23285
23201
  var __defProp$6 = Object.defineProperty;
23286
23202
  var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23287
- var __publicField$3 = (obj, key, value) => {
23288
- __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
23289
- return value;
23290
- };
23203
+ var __publicField$3 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
23291
23204
  var __async$5 = (__this, __arguments, generator) => {
23292
23205
  return new Promise((resolve, reject) => {
23293
23206
  var fulfilled = (value) => {
@@ -23569,6 +23482,7 @@ const _WebMapMain = class _WebMapMain {
23569
23482
  * ```
23570
23483
  */
23571
23484
  fitBounds(bounds, options) {
23485
+ checkExtent(bounds);
23572
23486
  if (bounds.every((x) => defined(x))) {
23573
23487
  if (bounds[1] < -85.06) {
23574
23488
  bounds[1] = -85.06;
@@ -23903,10 +23817,7 @@ var __spreadValues$4 = (a, b) => {
23903
23817
  return a;
23904
23818
  };
23905
23819
  var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
23906
- var __publicField$2 = (obj, key, value) => {
23907
- __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
23908
- return value;
23909
- };
23820
+ var __publicField$2 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
23910
23821
  var __async$4 = (__this, __arguments, generator) => {
23911
23822
  return new Promise((resolve, reject) => {
23912
23823
  var fulfilled = (value) => {
@@ -24686,6 +24597,13 @@ class WebMapLayers extends WebMapMain {
24686
24597
  return Promise.resolve(options);
24687
24598
  });
24688
24599
  }
24600
+ _onLayerDoubleClick(options) {
24601
+ return __async$4(this, null, function* () {
24602
+ const id = options.layer.id;
24603
+ this._emitLayerEvent("layer:dblclick", id || "", options);
24604
+ return Promise.resolve(options);
24605
+ });
24606
+ }
24689
24607
  _onLayerSelect(options) {
24690
24608
  return __async$4(this, null, function* () {
24691
24609
  this._emitLayerEvent("layer:select", options.layer.id || "", options);
@@ -24697,17 +24615,25 @@ class WebMapLayers extends WebMapMain {
24697
24615
  onSelect,
24698
24616
  onLayerSelect,
24699
24617
  onClick,
24618
+ onDoubleClick,
24700
24619
  onLayerClick,
24701
24620
  onMouseOut,
24702
24621
  onMouseOver
24703
24622
  } = options;
24704
24623
  const onLayerClickFromOpt = onClick || onLayerClick;
24624
+ const onLayerDblClickFromOpt = onDoubleClick || onLayerClick;
24705
24625
  options.onClick = (e) => {
24706
24626
  if (onLayerClickFromOpt) {
24707
24627
  onLayerClickFromOpt(e);
24708
24628
  }
24709
24629
  return this._onLayerClick(e);
24710
24630
  };
24631
+ options.onDoubleClick = (e) => {
24632
+ if (onLayerDblClickFromOpt) {
24633
+ onLayerDblClickFromOpt(e);
24634
+ }
24635
+ return this._onLayerDoubleClick(e);
24636
+ };
24711
24637
  options.onMouseOut = (e) => {
24712
24638
  const id = e.layer.id;
24713
24639
  onMouseOut && onMouseOut(e);
@@ -24837,10 +24763,7 @@ function createToggleControl(createButtonControl, options) {
24837
24763
 
24838
24764
  var __defProp$4 = Object.defineProperty;
24839
24765
  var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
24840
- var __publicField$1 = (obj, key, value) => {
24841
- __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
24842
- return value;
24843
- };
24766
+ var __publicField$1 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
24844
24767
  var __async$3 = (__this, __arguments, generator) => {
24845
24768
  return new Promise((resolve, reject) => {
24846
24769
  var fulfilled = (value) => {
@@ -25039,9 +24962,7 @@ function setWebMap(id, webMap) {
25039
24962
  var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
25040
24963
  var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
25041
24964
  var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
25042
- var __knownSymbol = (name, symbol) => {
25043
- return (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
25044
- };
24965
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
25045
24966
  var __objRest = (source, exclude) => {
25046
24967
  var target = {};
25047
24968
  for (var prop in source)
@@ -25307,10 +25228,7 @@ var __spreadValues$1 = (a, b) => {
25307
25228
  return a;
25308
25229
  };
25309
25230
  var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
25310
- var __publicField = (obj, key, value) => {
25311
- __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
25312
- return value;
25313
- };
25231
+ var __publicField = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
25314
25232
  var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
25315
25233
  var __async$1 = (__this, __arguments, generator) => {
25316
25234
  return new Promise((resolve, reject) => {
@@ -25717,10 +25635,32 @@ const _NgwMap = class _NgwMap extends WebMap {
25717
25635
  return;
25718
25636
  }
25719
25637
  const radius = getIdentifyRadius(center, zoom, pixelRadius);
25638
+ let geom;
25639
+ if (this.options.highlightIdentification) {
25640
+ const highlightOptions = this.options.highlightIdentification;
25641
+ const highlightDuration = typeof highlightOptions === "number" ? highlightOptions : 1e3;
25642
+ const [lng, lat] = ev.lngLat;
25643
+ geom = {
25644
+ type: "Polygon",
25645
+ coordinates: [getCirclePolygonCoordinates(lng, lat, radius)]
25646
+ };
25647
+ const highlightIdentificationLayer = yield this.addGeoJsonLayer({
25648
+ data: {
25649
+ type: "Feature",
25650
+ geometry: geom
25651
+ }
25652
+ });
25653
+ if (highlightDuration !== Infinity) {
25654
+ setTimeout(() => {
25655
+ this.removeLayer(highlightIdentificationLayer);
25656
+ }, highlightDuration);
25657
+ }
25658
+ }
25720
25659
  const selectPromise = sendIdentifyRequest(ev, {
25721
25660
  layers: ids,
25722
25661
  connector: this.connector,
25723
- radius
25662
+ radius,
25663
+ geom
25724
25664
  }).then((resp) => {
25725
25665
  const identify = __spreadProps$1(__spreadValues$1({}, resp), {
25726
25666
  resources: ids,