@nextgis/ngw-map 2.2.3 → 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-map; version: 2.2.3; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 2.3.0; author: NextGIS */
2
2
  var domain;
3
3
 
4
4
  // This constructor is used to store event handlers. Instantiating this is
@@ -473,10 +473,7 @@ function unwrapListeners(arr) {
473
473
 
474
474
  var __defProp$N = Object.defineProperty;
475
475
  var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
476
- var __publicField$z = (obj, key, value) => {
477
- __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
478
- return value;
479
- };
476
+ var __publicField$z = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
480
477
  class CancelError extends Error {
481
478
  constructor() {
482
479
  super();
@@ -487,10 +484,7 @@ class CancelError extends Error {
487
484
 
488
485
  var __defProp$M = Object.defineProperty;
489
486
  var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
490
- var __publicField$y = (obj, key, value) => {
491
- __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
492
- return value;
493
- };
487
+ var __publicField$y = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
494
488
  class PromiseControl {
495
489
  constructor(options = {}) {
496
490
  this.options = options;
@@ -572,10 +566,7 @@ class PromiseControl {
572
566
 
573
567
  var __defProp$L = Object.defineProperty;
574
568
  var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
575
- var __publicField$x = (obj, key, value) => {
576
- __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
577
- return value;
578
- };
569
+ var __publicField$x = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
579
570
  class TimeoutError extends Error {
580
571
  constructor() {
581
572
  super();
@@ -586,10 +577,7 @@ class TimeoutError extends Error {
586
577
 
587
578
  var __defProp$K = Object.defineProperty;
588
579
  var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
589
- var __publicField$w = (obj, key, value) => {
590
- __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
591
- return value;
592
- };
580
+ var __publicField$w = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
593
581
  var _a;
594
582
  const handleCallback = (resolve, reject, callback, r) => {
595
583
  try {
@@ -599,6 +587,7 @@ const handleCallback = (resolve, reject, callback, r) => {
599
587
  }
600
588
  };
601
589
  let ID$3 = 0;
590
+ _a = Symbol.toStringTag;
602
591
  const _CancelablePromise = class _CancelablePromise {
603
592
  constructor(executor, timeout) {
604
593
  // @ts-ignore
@@ -778,7 +767,6 @@ const _CancelablePromise = class _CancelablePromise {
778
767
  this._promise = void 0;
779
768
  }
780
769
  };
781
- _a = Symbol.toStringTag;
782
770
  __publicField$w(_CancelablePromise, "CancelError", CancelError);
783
771
  __publicField$w(_CancelablePromise, "TimeoutError", TimeoutError);
784
772
  __publicField$w(_CancelablePromise, "PromiseControl", PromiseControl);
@@ -1078,19 +1066,15 @@ function checkExtent(extent) {
1078
1066
 
1079
1067
  function isEqual(a, b, o, p) {
1080
1068
  if (a instanceof Array) {
1081
- if (!(b instanceof Array))
1082
- return false;
1069
+ if (!(b instanceof Array)) return false;
1083
1070
  return b.sort().join("") === a.sort().join("");
1084
1071
  } else if (a instanceof Date) {
1085
- if (!(b instanceof Date))
1086
- return false;
1072
+ if (!(b instanceof Date)) return false;
1087
1073
  return "" + a === "" + b;
1088
1074
  } else if (a instanceof Function) {
1089
- if (!(b instanceof Function))
1090
- return false;
1075
+ if (!(b instanceof Function)) return false;
1091
1076
  } else if (a instanceof Object) {
1092
- if (!(b instanceof Object))
1093
- return false;
1077
+ if (!(b instanceof Object)) return false;
1094
1078
  if (a === o) {
1095
1079
  return b === p;
1096
1080
  } else {
@@ -1102,10 +1086,8 @@ function isEqual(a, b, o, p) {
1102
1086
  function objectDeepEqual(o, p) {
1103
1087
  const keysO = Object.keys(o).sort();
1104
1088
  const keysP = Object.keys(p).sort();
1105
- if (keysO.length !== keysP.length)
1106
- return false;
1107
- if (keysO.join("") !== keysP.join(""))
1108
- return false;
1089
+ if (keysO.length !== keysP.length) return false;
1090
+ if (keysO.join("") !== keysP.join("")) return false;
1109
1091
  for (let i = 0; i < keysO.length; i++) {
1110
1092
  const oVal = o[keysO[i]];
1111
1093
  const pVal = p[keysP[i]];
@@ -1146,10 +1128,7 @@ function fixUrlStr(url) {
1146
1128
 
1147
1129
  var __defProp$J = Object.defineProperty;
1148
1130
  var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1149
- var __publicField$v = (obj, key, value) => {
1150
- __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
1151
- return value;
1152
- };
1131
+ var __publicField$v = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
1153
1132
  const _Cache = class _Cache {
1154
1133
  constructor(options = {}) {
1155
1134
  __publicField$v(this, "cache", []);
@@ -1276,10 +1255,7 @@ let Cache = _Cache;
1276
1255
 
1277
1256
  var __defProp$I = Object.defineProperty;
1278
1257
  var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1279
- var __publicField$u = (obj, key, value) => {
1280
- __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
1281
- return value;
1282
- };
1258
+ var __publicField$u = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
1283
1259
  class NgwError extends Error {
1284
1260
  constructor(er) {
1285
1261
  super();
@@ -1298,10 +1274,7 @@ class NgwError extends Error {
1298
1274
 
1299
1275
  var __defProp$H = Object.defineProperty;
1300
1276
  var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1301
- var __publicField$t = (obj, key, value) => {
1302
- __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
1303
- return value;
1304
- };
1277
+ var __publicField$t = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
1305
1278
  class ResourceNotFoundError extends NgwError {
1306
1279
  constructor(obj) {
1307
1280
  super(obj);
@@ -1359,10 +1332,7 @@ var __spreadValues$t = (a, b) => {
1359
1332
  return a;
1360
1333
  };
1361
1334
  var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
1362
- var __publicField$s = (obj, key, value) => {
1363
- __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
1364
- return value;
1365
- };
1335
+ var __publicField$s = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
1366
1336
  var __async$l = (__this, __arguments, generator) => {
1367
1337
  return new Promise((resolve, reject) => {
1368
1338
  var fulfilled = (value) => {
@@ -1384,9 +1354,14 @@ var __async$l = (__this, __arguments, generator) => {
1384
1354
  });
1385
1355
  };
1386
1356
  class ResourcesControl {
1387
- constructor(connector) {
1357
+ constructor({
1358
+ connector,
1359
+ cacheId
1360
+ }) {
1361
+ __publicField$s(this, "cache");
1362
+ __publicField$s(this, "connector");
1388
1363
  this.connector = connector;
1389
- __publicField$s(this, "cache", new Cache());
1364
+ this.cache = new Cache({ namespace: cacheId });
1390
1365
  }
1391
1366
  // -------------------------------------------------------------------------
1392
1367
  // Resource Methods
@@ -1399,7 +1374,7 @@ class ResourcesControl {
1399
1374
  * Fetching resource would be cached to speed up next call
1400
1375
  */
1401
1376
  getOne(resource, requestOptions) {
1402
- const cache = new Cache();
1377
+ const cache = this.cache;
1403
1378
  const forCache = {};
1404
1379
  const opt = __spreadProps$d(__spreadValues$t({}, requestOptions), { cache: false });
1405
1380
  if (typeof resource === "string") {
@@ -1650,10 +1625,7 @@ function removeConnector(connector) {
1650
1625
 
1651
1626
  var __defProp$F = Object.defineProperty;
1652
1627
  var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1653
- var __publicField$r = (obj, key, value) => {
1654
- __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
1655
- return value;
1656
- };
1628
+ var __publicField$r = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
1657
1629
  class InsufficientPermissionsError extends NgwError {
1658
1630
  constructor(obj) {
1659
1631
  super(obj);
@@ -1733,10 +1705,7 @@ function apiRequest(opt) {
1733
1705
 
1734
1706
  var __defProp$E = Object.defineProperty;
1735
1707
  var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1736
- var __publicField$q = (obj, key, value) => {
1737
- __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
1738
- return value;
1739
- };
1708
+ var __publicField$q = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
1740
1709
  class NetworkError extends Error {
1741
1710
  constructor(url) {
1742
1711
  super();
@@ -1845,10 +1814,7 @@ var __spreadValues$s = (a, b) => {
1845
1814
  }
1846
1815
  return a;
1847
1816
  };
1848
- var __publicField$p = (obj, key, value) => {
1849
- __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
1850
- return value;
1851
- };
1817
+ var __publicField$p = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
1852
1818
  let ID$2 = 0;
1853
1819
  class NgwConnector {
1854
1820
  constructor(options) {
@@ -1857,10 +1823,12 @@ class NgwConnector {
1857
1823
  __publicField$p(this, "emitter", new EventEmitter());
1858
1824
  __publicField$p(this, "user");
1859
1825
  __publicField$p(this, "resources");
1826
+ __publicField$p(this, "cache");
1860
1827
  __publicField$p(this, "routeStr", "/api/component/pyramid/route");
1861
1828
  __publicField$p(this, "activeRequests", []);
1862
1829
  __publicField$p(this, "requestTransform");
1863
1830
  const exist = findConnector(options);
1831
+ this.cache = new Cache({ namespace: options.cacheId });
1864
1832
  if (exist) {
1865
1833
  return exist;
1866
1834
  } else {
@@ -1870,13 +1838,23 @@ class NgwConnector {
1870
1838
  if (this.options.requestTransform) {
1871
1839
  this.requestTransform = this.options.requestTransform;
1872
1840
  }
1873
- this.resources = new ResourcesControl(this);
1841
+ this.resources = new ResourcesControl({
1842
+ connector: this,
1843
+ cacheId: options.cacheId
1844
+ });
1874
1845
  addConnector(this);
1875
1846
  }
1876
1847
  }
1877
1848
  static create(options) {
1878
1849
  return new this(options);
1879
1850
  }
1851
+ /**
1852
+ * Clear the cache.
1853
+ */
1854
+ clearCache() {
1855
+ this.cache.clean();
1856
+ this.resources.cache.clean();
1857
+ }
1880
1858
  setRequestTransform(requestTransform) {
1881
1859
  this.requestTransform = requestTransform;
1882
1860
  }
@@ -1904,7 +1882,6 @@ class NgwConnector {
1904
1882
  * ```
1905
1883
  */
1906
1884
  connect() {
1907
- const cache = new Cache();
1908
1885
  const auth = this.options.auth;
1909
1886
  const makeConnect = () => new CancelablePromise((resolve, reject) => {
1910
1887
  const makeQuery = () => {
@@ -1924,7 +1901,7 @@ class NgwConnector {
1924
1901
  }
1925
1902
  return makeQuery();
1926
1903
  });
1927
- return cache.add("route", makeConnect, {
1904
+ return this.cache.add("route", makeConnect, {
1928
1905
  id: this.id,
1929
1906
  auth,
1930
1907
  baseUrl: this.options.baseUrl
@@ -1947,8 +1924,8 @@ class NgwConnector {
1947
1924
  removeConnector(this);
1948
1925
  this.options.auth = void 0;
1949
1926
  this.user = void 0;
1927
+ this.clearCache();
1950
1928
  this.emitter.emit("logout");
1951
- this.resources.cache.clean();
1952
1929
  }
1953
1930
  getUserInfo(credentials, options) {
1954
1931
  if (this.user && this.user.id) {
@@ -2033,8 +2010,7 @@ class NgwConnector {
2033
2010
  const params = objectRemoveEmpty(params_);
2034
2011
  const makeApiRequest = () => apiRequest({ name, params, requestOptions, connector: this });
2035
2012
  if (requestOptions.cache && method === "GET") {
2036
- const cache = new Cache();
2037
- return cache.add(name, makeApiRequest, __spreadValues$s({
2013
+ return this.cache.add(name, makeApiRequest, __spreadValues$s({
2038
2014
  params
2039
2015
  }, objectRemoveEmpty({
2040
2016
  headers,
@@ -2320,10 +2296,8 @@ function reEscape(s) {
2320
2296
  function like(b, a, iLike) {
2321
2297
  a = String(a);
2322
2298
  b = String(b);
2323
- if (a === b)
2324
- return true;
2325
- if (iLike && a.toUpperCase() === b.toUpperCase())
2326
- return true;
2299
+ if (a === b) return true;
2300
+ if (iLike && a.toUpperCase() === b.toUpperCase()) return true;
2327
2301
  const re = `^${reEscape(a)}$`.replace(/%/g, ".*").replace("_", ".");
2328
2302
  return new RegExp(re, iLike ? "i" : "").exec(b) !== null;
2329
2303
  }
@@ -2646,10 +2620,7 @@ function fetchNgwLayerItem(options) {
2646
2620
 
2647
2621
  var __defProp$z = Object.defineProperty;
2648
2622
  var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2649
- var __publicField$o = (obj, key, value) => {
2650
- __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
2651
- return value;
2652
- };
2623
+ var __publicField$o = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
2653
2624
  class BookmarkItem {
2654
2625
  constructor(options) {
2655
2626
  this.options = options;
@@ -2813,10 +2784,7 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
2813
2784
 
2814
2785
  var __defProp$y = Object.defineProperty;
2815
2786
  var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2816
- var __publicField$n = (obj, key, value) => {
2817
- __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
2818
- return value;
2819
- };
2787
+ var __publicField$n = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
2820
2788
  class TreeHelper {
2821
2789
  constructor(item) {
2822
2790
  __publicField$n(this, "item");
@@ -2886,10 +2854,7 @@ class TreeHelper {
2886
2854
 
2887
2855
  var __defProp$x = Object.defineProperty;
2888
2856
  var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2889
- var __publicField$m = (obj, key, value) => {
2890
- __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
2891
- return value;
2892
- };
2857
+ var __publicField$m = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
2893
2858
  class BaseProperty {
2894
2859
  constructor(name, item, options) {
2895
2860
  __publicField$m(this, "options");
@@ -3012,10 +2977,7 @@ var __spreadValues$o = (a, b) => {
3012
2977
  }
3013
2978
  return a;
3014
2979
  };
3015
- var __publicField$l = (obj, key, value) => {
3016
- __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
3017
- return value;
3018
- };
2980
+ var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
3019
2981
  const _CheckProperty = class _CheckProperty extends BaseProperty {
3020
2982
  constructor(name, item, options) {
3021
2983
  super(name, item, __spreadValues$o(__spreadValues$o({}, _CheckProperty.options), options));
@@ -3148,10 +3110,7 @@ var __spreadValues$n = (a, b) => {
3148
3110
  }
3149
3111
  return a;
3150
3112
  };
3151
- var __publicField$k = (obj, key, value) => {
3152
- __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
3153
- return value;
3154
- };
3113
+ var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
3155
3114
  const BOOLEAN_TYPE = "boolean";
3156
3115
  const STRING_TYPE = "string";
3157
3116
  const _ItemProperties = class _ItemProperties {
@@ -3243,10 +3202,7 @@ var __spreadValues$m = (a, b) => {
3243
3202
  }
3244
3203
  return a;
3245
3204
  };
3246
- var __publicField$j = (obj, key, value) => {
3247
- __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
3248
- return value;
3249
- };
3205
+ var __publicField$j = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
3250
3206
  let ID$1 = 0;
3251
3207
  class Item {
3252
3208
  constructor(options) {
@@ -3405,10 +3361,7 @@ function fetchNgwResourceExtent(item, connector, options) {
3405
3361
 
3406
3362
  var __defProp$s = Object.defineProperty;
3407
3363
  var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3408
- var __publicField$i = (obj, key, value) => {
3409
- __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
3410
- return value;
3411
- };
3364
+ var __publicField$i = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
3412
3365
  var __async$k = (__this, __arguments, generator) => {
3413
3366
  return new Promise((resolve, reject) => {
3414
3367
  var fulfilled = (value) => {
@@ -3580,10 +3533,7 @@ var __objRest$1 = (source, exclude) => {
3580
3533
  }
3581
3534
  return target;
3582
3535
  };
3583
- var __publicField$h = (obj, key, value) => {
3584
- __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
3585
- return value;
3586
- };
3536
+ var __publicField$h = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
3587
3537
  var __async$i = (__this, __arguments, generator) => {
3588
3538
  return new Promise((resolve, reject) => {
3589
3539
  var fulfilled = (value) => {
@@ -3696,10 +3646,7 @@ var __spreadValues$j = (a, b) => {
3696
3646
  }
3697
3647
  return a;
3698
3648
  };
3699
- var __publicField$g = (obj, key, value) => {
3700
- __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
3701
- return value;
3702
- };
3649
+ var __publicField$g = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
3703
3650
  class QmsKit {
3704
3651
  constructor(options) {
3705
3652
  __publicField$g(this, "options", {
@@ -3985,10 +3932,7 @@ var __spreadValues$g = (a, b) => {
3985
3932
  return a;
3986
3933
  };
3987
3934
  var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
3988
- var __publicField$f = (obj, key, value) => {
3989
- __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
3990
- return value;
3991
- };
3935
+ var __publicField$f = (obj, key, value) => __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
3992
3936
  var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
3993
3937
  var __async$g = (__this, __arguments, generator) => {
3994
3938
  return new Promise((resolve, reject) => {
@@ -4421,10 +4365,7 @@ var __spreadValues$f = (a, b) => {
4421
4365
  return a;
4422
4366
  };
4423
4367
  var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
4424
- var __publicField$e = (obj, key, value) => {
4425
- __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
4426
- return value;
4427
- };
4368
+ var __publicField$e = (obj, key, value) => __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
4428
4369
  var __async$e = (__this, __arguments, generator) => {
4429
4370
  return new Promise((resolve, reject) => {
4430
4371
  var fulfilled = (value) => {
@@ -4814,10 +4755,7 @@ var __spreadValues$c = (a, b) => {
4814
4755
  }
4815
4756
  return a;
4816
4757
  };
4817
- var __publicField$d = (obj, key, value) => {
4818
- __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
4819
- return value;
4820
- };
4758
+ var __publicField$d = (obj, key, value) => __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
4821
4759
  var __async$c = (__this, __arguments, generator) => {
4822
4760
  return new Promise((resolve, reject) => {
4823
4761
  var fulfilled = (value) => {
@@ -5095,10 +5033,7 @@ var __spreadValues$b = (a, b) => {
5095
5033
  }
5096
5034
  return a;
5097
5035
  };
5098
- var __publicField$c = (obj, key, value) => {
5099
- __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
5100
- return value;
5101
- };
5036
+ var __publicField$c = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
5102
5037
  var __async$b = (__this, __arguments, generator) => {
5103
5038
  return new Promise((resolve, reject) => {
5104
5039
  var fulfilled = (value) => {
@@ -5275,10 +5210,7 @@ var __spreadValues$a = (a, b) => {
5275
5210
  }
5276
5211
  return a;
5277
5212
  };
5278
- var __publicField$b = (obj, key, value) => {
5279
- __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
5280
- return value;
5281
- };
5213
+ var __publicField$b = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
5282
5214
  var __async$9 = (__this, __arguments, generator) => {
5283
5215
  return new Promise((resolve, reject) => {
5284
5216
  var fulfilled = (value) => {
@@ -5344,8 +5276,7 @@ class NgwWebmapLayerAdapter {
5344
5276
  removeLayer() {
5345
5277
  const mapAdapter = this.options.webMap.mapAdapter;
5346
5278
  this.getDependLayers().forEach((x) => {
5347
- if (!("layer" in x))
5348
- return;
5279
+ if (!("layer" in x)) return;
5349
5280
  mapAdapter.removeLayer(x.layer.layer);
5350
5281
  });
5351
5282
  if (this._webmapBaselayersIds.length) {
@@ -5646,10 +5577,7 @@ var __spreadValues$9 = (a, b) => {
5646
5577
  }
5647
5578
  return a;
5648
5579
  };
5649
- var __publicField$a = (obj, key, value) => {
5650
- __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
5651
- return value;
5652
- };
5580
+ var __publicField$a = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
5653
5581
  var __async$8 = (__this, __arguments, generator) => {
5654
5582
  return new Promise((resolve, reject) => {
5655
5583
  var fulfilled = (value) => {
@@ -5752,10 +5680,7 @@ var __spreadValues$8 = (a, b) => {
5752
5680
  }
5753
5681
  return a;
5754
5682
  };
5755
- var __publicField$9 = (obj, key, value) => {
5756
- __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
5757
- return value;
5758
- };
5683
+ var __publicField$9 = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
5759
5684
  class IdentifyItem {
5760
5685
  constructor(options) {
5761
5686
  __publicField$9(this, "id");
@@ -5958,8 +5883,7 @@ function featureLayerIdentify(options) {
5958
5883
  }
5959
5884
  function convertGeomToWKT(geom) {
5960
5885
  const coordinates = getPolygonCoordinates(geom);
5961
- if (!coordinates)
5962
- return null;
5886
+ if (!coordinates) return null;
5963
5887
  const polygonStr = coordinates.map(([lng, lat]) => {
5964
5888
  const [x, y] = degrees2meters(lng, lat);
5965
5889
  return `${x} ${y}`;
@@ -6648,8 +6572,7 @@ const array = (args) => {
6648
6572
  return value;
6649
6573
  };
6650
6574
  function typeOfValue(value) {
6651
- if (value === null)
6652
- return "null";
6575
+ if (value === null) return "null";
6653
6576
  switch (typeof value) {
6654
6577
  case "string":
6655
6578
  return "string";
@@ -6920,10 +6843,7 @@ function preparePaint({
6920
6843
 
6921
6844
  var __defProp$a = Object.defineProperty;
6922
6845
  var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6923
- var __publicField$8 = (obj, key, value) => {
6924
- __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
6925
- return value;
6926
- };
6846
+ var __publicField$8 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
6927
6847
  class KeyCodes {
6928
6848
  constructor() {
6929
6849
  __publicField$8(this, "backspace", 8);
@@ -7002,10 +6922,7 @@ class KeyCodes {
7002
6922
 
7003
6923
  var __defProp$9 = Object.defineProperty;
7004
6924
  var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7005
- var __publicField$7 = (obj, key, value) => {
7006
- __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
7007
- return value;
7008
- };
6925
+ var __publicField$7 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
7009
6926
  class Keys {
7010
6927
  constructor() {
7011
6928
  __publicField$7(this, "keyCodeAlias", new KeyCodes());
@@ -7053,10 +6970,7 @@ class Keys {
7053
6970
 
7054
6971
  var __defProp$8 = Object.defineProperty;
7055
6972
  var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7056
- var __publicField$6 = (obj, key, value) => {
7057
- __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
7058
- return value;
7059
- };
6973
+ var __publicField$6 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
7060
6974
  class StateItem {
7061
6975
  constructor(webMap, opt) {
7062
6976
  this.webMap = webMap;
@@ -7085,10 +6999,7 @@ class StateItem {
7085
6999
 
7086
7000
  var __defProp$7 = Object.defineProperty;
7087
7001
  var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7088
- var __publicField$5 = (obj, key, value) => {
7089
- __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
7090
- return value;
7091
- };
7002
+ var __publicField$5 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
7092
7003
  class CenterState extends StateItem {
7093
7004
  constructor() {
7094
7005
  super(...arguments);
@@ -7113,10 +7024,7 @@ class CenterState extends StateItem {
7113
7024
 
7114
7025
  var __defProp$6 = Object.defineProperty;
7115
7026
  var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7116
- var __publicField$4 = (obj, key, value) => {
7117
- __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
7118
- return value;
7119
- };
7027
+ var __publicField$4 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
7120
7028
  class ZoomState extends StateItem {
7121
7029
  constructor() {
7122
7030
  super(...arguments);
@@ -7146,10 +7054,7 @@ function clearObject(obj) {
7146
7054
 
7147
7055
  var __defProp$5 = Object.defineProperty;
7148
7056
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7149
- var __publicField$3 = (obj, key, value) => {
7150
- __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
7151
- return value;
7152
- };
7057
+ var __publicField$3 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
7153
7058
  var __async$6 = (__this, __arguments, generator) => {
7154
7059
  return new Promise((resolve, reject) => {
7155
7060
  var fulfilled = (value) => {
@@ -7766,10 +7671,7 @@ var __spreadValues$3 = (a, b) => {
7766
7671
  return a;
7767
7672
  };
7768
7673
  var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
7769
- var __publicField$2 = (obj, key, value) => {
7770
- __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
7771
- return value;
7772
- };
7674
+ var __publicField$2 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
7773
7675
  var __async$5 = (__this, __arguments, generator) => {
7774
7676
  return new Promise((resolve, reject) => {
7775
7677
  var fulfilled = (value) => {
@@ -8715,10 +8617,7 @@ function createToggleControl(createButtonControl, options) {
8715
8617
 
8716
8618
  var __defProp$3 = Object.defineProperty;
8717
8619
  var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8718
- var __publicField$1 = (obj, key, value) => {
8719
- __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
8720
- return value;
8721
- };
8620
+ var __publicField$1 = (obj, key, value) => __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
8722
8621
  var __async$4 = (__this, __arguments, generator) => {
8723
8622
  return new Promise((resolve, reject) => {
8724
8623
  var fulfilled = (value) => {
@@ -8917,9 +8816,7 @@ function setWebMap(id, webMap) {
8917
8816
  var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
8918
8817
  var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
8919
8818
  var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
8920
- var __knownSymbol = (name, symbol) => {
8921
- return (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
8922
- };
8819
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
8923
8820
  var __objRest = (source, exclude) => {
8924
8821
  var target = {};
8925
8822
  for (var prop in source)
@@ -9212,10 +9109,7 @@ var __spreadValues = (a, b) => {
9212
9109
  return a;
9213
9110
  };
9214
9111
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9215
- var __publicField = (obj, key, value) => {
9216
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
9217
- return value;
9218
- };
9112
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
9219
9113
  var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
9220
9114
  var __async$1 = (__this, __arguments, generator) => {
9221
9115
  return new Promise((resolve, reject) => {
@@ -9622,10 +9516,32 @@ const _NgwMap = class _NgwMap extends WebMap {
9622
9516
  return;
9623
9517
  }
9624
9518
  const radius = getIdentifyRadius(center, zoom, pixelRadius);
9519
+ let geom;
9520
+ if (this.options.highlightIdentification) {
9521
+ const highlightOptions = this.options.highlightIdentification;
9522
+ const highlightDuration = typeof highlightOptions === "number" ? highlightOptions : 1e3;
9523
+ const [lng, lat] = ev.lngLat;
9524
+ geom = {
9525
+ type: "Polygon",
9526
+ coordinates: [getCirclePolygonCoordinates(lng, lat, radius)]
9527
+ };
9528
+ const highlightIdentificationLayer = yield this.addGeoJsonLayer({
9529
+ data: {
9530
+ type: "Feature",
9531
+ geometry: geom
9532
+ }
9533
+ });
9534
+ if (highlightDuration !== Infinity) {
9535
+ setTimeout(() => {
9536
+ this.removeLayer(highlightIdentificationLayer);
9537
+ }, highlightDuration);
9538
+ }
9539
+ }
9625
9540
  const selectPromise = sendIdentifyRequest(ev, {
9626
9541
  layers: ids,
9627
9542
  connector: this.connector,
9628
- radius
9543
+ radius,
9544
+ geom
9629
9545
  }).then((resp) => {
9630
9546
  const identify = __spreadProps(__spreadValues({}, resp), {
9631
9547
  resources: ids,