@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 NgwMap = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -476,10 +476,7 @@ var NgwMap = (function (exports) {
476
476
 
477
477
  var __defProp$N = Object.defineProperty;
478
478
  var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
479
- var __publicField$z = (obj, key, value) => {
480
- __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
481
- return value;
482
- };
479
+ var __publicField$z = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
483
480
  class CancelError extends Error {
484
481
  constructor() {
485
482
  super();
@@ -490,10 +487,7 @@ var NgwMap = (function (exports) {
490
487
 
491
488
  var __defProp$M = Object.defineProperty;
492
489
  var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
493
- var __publicField$y = (obj, key, value) => {
494
- __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
495
- return value;
496
- };
490
+ var __publicField$y = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
497
491
  class PromiseControl {
498
492
  constructor(options = {}) {
499
493
  this.options = options;
@@ -575,10 +569,7 @@ var NgwMap = (function (exports) {
575
569
 
576
570
  var __defProp$L = Object.defineProperty;
577
571
  var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
578
- var __publicField$x = (obj, key, value) => {
579
- __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
580
- return value;
581
- };
572
+ var __publicField$x = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
582
573
  class TimeoutError extends Error {
583
574
  constructor() {
584
575
  super();
@@ -589,10 +580,7 @@ var NgwMap = (function (exports) {
589
580
 
590
581
  var __defProp$K = Object.defineProperty;
591
582
  var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
592
- var __publicField$w = (obj, key, value) => {
593
- __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
594
- return value;
595
- };
583
+ var __publicField$w = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
596
584
  var _a;
597
585
  const handleCallback = (resolve, reject, callback, r) => {
598
586
  try {
@@ -602,6 +590,7 @@ var NgwMap = (function (exports) {
602
590
  }
603
591
  };
604
592
  let ID$3 = 0;
593
+ _a = Symbol.toStringTag;
605
594
  const _CancelablePromise = class _CancelablePromise {
606
595
  constructor(executor, timeout) {
607
596
  // @ts-ignore
@@ -781,7 +770,6 @@ var NgwMap = (function (exports) {
781
770
  this._promise = void 0;
782
771
  }
783
772
  };
784
- _a = Symbol.toStringTag;
785
773
  __publicField$w(_CancelablePromise, "CancelError", CancelError);
786
774
  __publicField$w(_CancelablePromise, "TimeoutError", TimeoutError);
787
775
  __publicField$w(_CancelablePromise, "PromiseControl", PromiseControl);
@@ -1081,19 +1069,15 @@ var NgwMap = (function (exports) {
1081
1069
 
1082
1070
  function isEqual(a, b, o, p) {
1083
1071
  if (a instanceof Array) {
1084
- if (!(b instanceof Array))
1085
- return false;
1072
+ if (!(b instanceof Array)) return false;
1086
1073
  return b.sort().join("") === a.sort().join("");
1087
1074
  } else if (a instanceof Date) {
1088
- if (!(b instanceof Date))
1089
- return false;
1075
+ if (!(b instanceof Date)) return false;
1090
1076
  return "" + a === "" + b;
1091
1077
  } else if (a instanceof Function) {
1092
- if (!(b instanceof Function))
1093
- return false;
1078
+ if (!(b instanceof Function)) return false;
1094
1079
  } else if (a instanceof Object) {
1095
- if (!(b instanceof Object))
1096
- return false;
1080
+ if (!(b instanceof Object)) return false;
1097
1081
  if (a === o) {
1098
1082
  return b === p;
1099
1083
  } else {
@@ -1105,10 +1089,8 @@ var NgwMap = (function (exports) {
1105
1089
  function objectDeepEqual(o, p) {
1106
1090
  const keysO = Object.keys(o).sort();
1107
1091
  const keysP = Object.keys(p).sort();
1108
- if (keysO.length !== keysP.length)
1109
- return false;
1110
- if (keysO.join("") !== keysP.join(""))
1111
- return false;
1092
+ if (keysO.length !== keysP.length) return false;
1093
+ if (keysO.join("") !== keysP.join("")) return false;
1112
1094
  for (let i = 0; i < keysO.length; i++) {
1113
1095
  const oVal = o[keysO[i]];
1114
1096
  const pVal = p[keysP[i]];
@@ -1149,10 +1131,7 @@ var NgwMap = (function (exports) {
1149
1131
 
1150
1132
  var __defProp$J = Object.defineProperty;
1151
1133
  var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1152
- var __publicField$v = (obj, key, value) => {
1153
- __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
1154
- return value;
1155
- };
1134
+ var __publicField$v = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
1156
1135
  const _Cache = class _Cache {
1157
1136
  constructor(options = {}) {
1158
1137
  __publicField$v(this, "cache", []);
@@ -1279,10 +1258,7 @@ var NgwMap = (function (exports) {
1279
1258
 
1280
1259
  var __defProp$I = Object.defineProperty;
1281
1260
  var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1282
- var __publicField$u = (obj, key, value) => {
1283
- __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
1284
- return value;
1285
- };
1261
+ var __publicField$u = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
1286
1262
  class NgwError extends Error {
1287
1263
  constructor(er) {
1288
1264
  super();
@@ -1301,10 +1277,7 @@ var NgwMap = (function (exports) {
1301
1277
 
1302
1278
  var __defProp$H = Object.defineProperty;
1303
1279
  var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1304
- var __publicField$t = (obj, key, value) => {
1305
- __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
1306
- return value;
1307
- };
1280
+ var __publicField$t = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
1308
1281
  class ResourceNotFoundError extends NgwError {
1309
1282
  constructor(obj) {
1310
1283
  super(obj);
@@ -1362,10 +1335,7 @@ var NgwMap = (function (exports) {
1362
1335
  return a;
1363
1336
  };
1364
1337
  var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
1365
- var __publicField$s = (obj, key, value) => {
1366
- __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
1367
- return value;
1368
- };
1338
+ var __publicField$s = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
1369
1339
  var __async$l = (__this, __arguments, generator) => {
1370
1340
  return new Promise((resolve, reject) => {
1371
1341
  var fulfilled = (value) => {
@@ -1387,9 +1357,14 @@ var NgwMap = (function (exports) {
1387
1357
  });
1388
1358
  };
1389
1359
  class ResourcesControl {
1390
- constructor(connector) {
1360
+ constructor({
1361
+ connector,
1362
+ cacheId
1363
+ }) {
1364
+ __publicField$s(this, "cache");
1365
+ __publicField$s(this, "connector");
1391
1366
  this.connector = connector;
1392
- __publicField$s(this, "cache", new Cache());
1367
+ this.cache = new Cache({ namespace: cacheId });
1393
1368
  }
1394
1369
  // -------------------------------------------------------------------------
1395
1370
  // Resource Methods
@@ -1402,7 +1377,7 @@ var NgwMap = (function (exports) {
1402
1377
  * Fetching resource would be cached to speed up next call
1403
1378
  */
1404
1379
  getOne(resource, requestOptions) {
1405
- const cache = new Cache();
1380
+ const cache = this.cache;
1406
1381
  const forCache = {};
1407
1382
  const opt = __spreadProps$d(__spreadValues$t({}, requestOptions), { cache: false });
1408
1383
  if (typeof resource === "string") {
@@ -1653,10 +1628,7 @@ var NgwMap = (function (exports) {
1653
1628
 
1654
1629
  var __defProp$F = Object.defineProperty;
1655
1630
  var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1656
- var __publicField$r = (obj, key, value) => {
1657
- __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
1658
- return value;
1659
- };
1631
+ var __publicField$r = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
1660
1632
  class InsufficientPermissionsError extends NgwError {
1661
1633
  constructor(obj) {
1662
1634
  super(obj);
@@ -1736,10 +1708,7 @@ var NgwMap = (function (exports) {
1736
1708
 
1737
1709
  var __defProp$E = Object.defineProperty;
1738
1710
  var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1739
- var __publicField$q = (obj, key, value) => {
1740
- __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
1741
- return value;
1742
- };
1711
+ var __publicField$q = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
1743
1712
  class NetworkError extends Error {
1744
1713
  constructor(url) {
1745
1714
  super();
@@ -1848,10 +1817,7 @@ var NgwMap = (function (exports) {
1848
1817
  }
1849
1818
  return a;
1850
1819
  };
1851
- var __publicField$p = (obj, key, value) => {
1852
- __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
1853
- return value;
1854
- };
1820
+ var __publicField$p = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
1855
1821
  let ID$2 = 0;
1856
1822
  class NgwConnector {
1857
1823
  constructor(options) {
@@ -1860,10 +1826,12 @@ var NgwMap = (function (exports) {
1860
1826
  __publicField$p(this, "emitter", new EventEmitter());
1861
1827
  __publicField$p(this, "user");
1862
1828
  __publicField$p(this, "resources");
1829
+ __publicField$p(this, "cache");
1863
1830
  __publicField$p(this, "routeStr", "/api/component/pyramid/route");
1864
1831
  __publicField$p(this, "activeRequests", []);
1865
1832
  __publicField$p(this, "requestTransform");
1866
1833
  const exist = findConnector(options);
1834
+ this.cache = new Cache({ namespace: options.cacheId });
1867
1835
  if (exist) {
1868
1836
  return exist;
1869
1837
  } else {
@@ -1873,13 +1841,23 @@ var NgwMap = (function (exports) {
1873
1841
  if (this.options.requestTransform) {
1874
1842
  this.requestTransform = this.options.requestTransform;
1875
1843
  }
1876
- this.resources = new ResourcesControl(this);
1844
+ this.resources = new ResourcesControl({
1845
+ connector: this,
1846
+ cacheId: options.cacheId
1847
+ });
1877
1848
  addConnector(this);
1878
1849
  }
1879
1850
  }
1880
1851
  static create(options) {
1881
1852
  return new this(options);
1882
1853
  }
1854
+ /**
1855
+ * Clear the cache.
1856
+ */
1857
+ clearCache() {
1858
+ this.cache.clean();
1859
+ this.resources.cache.clean();
1860
+ }
1883
1861
  setRequestTransform(requestTransform) {
1884
1862
  this.requestTransform = requestTransform;
1885
1863
  }
@@ -1907,7 +1885,6 @@ var NgwMap = (function (exports) {
1907
1885
  * ```
1908
1886
  */
1909
1887
  connect() {
1910
- const cache = new Cache();
1911
1888
  const auth = this.options.auth;
1912
1889
  const makeConnect = () => new CancelablePromise((resolve, reject) => {
1913
1890
  const makeQuery = () => {
@@ -1927,7 +1904,7 @@ var NgwMap = (function (exports) {
1927
1904
  }
1928
1905
  return makeQuery();
1929
1906
  });
1930
- return cache.add("route", makeConnect, {
1907
+ return this.cache.add("route", makeConnect, {
1931
1908
  id: this.id,
1932
1909
  auth,
1933
1910
  baseUrl: this.options.baseUrl
@@ -1950,8 +1927,8 @@ var NgwMap = (function (exports) {
1950
1927
  removeConnector(this);
1951
1928
  this.options.auth = void 0;
1952
1929
  this.user = void 0;
1930
+ this.clearCache();
1953
1931
  this.emitter.emit("logout");
1954
- this.resources.cache.clean();
1955
1932
  }
1956
1933
  getUserInfo(credentials, options) {
1957
1934
  if (this.user && this.user.id) {
@@ -2036,8 +2013,7 @@ var NgwMap = (function (exports) {
2036
2013
  const params = objectRemoveEmpty(params_);
2037
2014
  const makeApiRequest = () => apiRequest({ name, params, requestOptions, connector: this });
2038
2015
  if (requestOptions.cache && method === "GET") {
2039
- const cache = new Cache();
2040
- return cache.add(name, makeApiRequest, __spreadValues$s({
2016
+ return this.cache.add(name, makeApiRequest, __spreadValues$s({
2041
2017
  params
2042
2018
  }, objectRemoveEmpty({
2043
2019
  headers,
@@ -2323,10 +2299,8 @@ var NgwMap = (function (exports) {
2323
2299
  function like(b, a, iLike) {
2324
2300
  a = String(a);
2325
2301
  b = String(b);
2326
- if (a === b)
2327
- return true;
2328
- if (iLike && a.toUpperCase() === b.toUpperCase())
2329
- return true;
2302
+ if (a === b) return true;
2303
+ if (iLike && a.toUpperCase() === b.toUpperCase()) return true;
2330
2304
  const re = `^${reEscape(a)}$`.replace(/%/g, ".*").replace("_", ".");
2331
2305
  return new RegExp(re, iLike ? "i" : "").exec(b) !== null;
2332
2306
  }
@@ -2649,10 +2623,7 @@ var NgwMap = (function (exports) {
2649
2623
 
2650
2624
  var __defProp$z = Object.defineProperty;
2651
2625
  var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2652
- var __publicField$o = (obj, key, value) => {
2653
- __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
2654
- return value;
2655
- };
2626
+ var __publicField$o = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
2656
2627
  class BookmarkItem {
2657
2628
  constructor(options) {
2658
2629
  this.options = options;
@@ -2816,10 +2787,7 @@ var NgwMap = (function (exports) {
2816
2787
 
2817
2788
  var __defProp$y = Object.defineProperty;
2818
2789
  var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2819
- var __publicField$n = (obj, key, value) => {
2820
- __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
2821
- return value;
2822
- };
2790
+ var __publicField$n = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
2823
2791
  class TreeHelper {
2824
2792
  constructor(item) {
2825
2793
  __publicField$n(this, "item");
@@ -2889,10 +2857,7 @@ var NgwMap = (function (exports) {
2889
2857
 
2890
2858
  var __defProp$x = Object.defineProperty;
2891
2859
  var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2892
- var __publicField$m = (obj, key, value) => {
2893
- __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
2894
- return value;
2895
- };
2860
+ var __publicField$m = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
2896
2861
  class BaseProperty {
2897
2862
  constructor(name, item, options) {
2898
2863
  __publicField$m(this, "options");
@@ -3015,10 +2980,7 @@ var NgwMap = (function (exports) {
3015
2980
  }
3016
2981
  return a;
3017
2982
  };
3018
- var __publicField$l = (obj, key, value) => {
3019
- __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
3020
- return value;
3021
- };
2983
+ var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
3022
2984
  const _CheckProperty = class _CheckProperty extends BaseProperty {
3023
2985
  constructor(name, item, options) {
3024
2986
  super(name, item, __spreadValues$o(__spreadValues$o({}, _CheckProperty.options), options));
@@ -3151,10 +3113,7 @@ var NgwMap = (function (exports) {
3151
3113
  }
3152
3114
  return a;
3153
3115
  };
3154
- var __publicField$k = (obj, key, value) => {
3155
- __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
3156
- return value;
3157
- };
3116
+ var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
3158
3117
  const BOOLEAN_TYPE = "boolean";
3159
3118
  const STRING_TYPE = "string";
3160
3119
  const _ItemProperties = class _ItemProperties {
@@ -3246,10 +3205,7 @@ var NgwMap = (function (exports) {
3246
3205
  }
3247
3206
  return a;
3248
3207
  };
3249
- var __publicField$j = (obj, key, value) => {
3250
- __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
3251
- return value;
3252
- };
3208
+ var __publicField$j = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
3253
3209
  let ID$1 = 0;
3254
3210
  class Item {
3255
3211
  constructor(options) {
@@ -3408,10 +3364,7 @@ var NgwMap = (function (exports) {
3408
3364
 
3409
3365
  var __defProp$s = Object.defineProperty;
3410
3366
  var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3411
- var __publicField$i = (obj, key, value) => {
3412
- __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
3413
- return value;
3414
- };
3367
+ var __publicField$i = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
3415
3368
  var __async$k = (__this, __arguments, generator) => {
3416
3369
  return new Promise((resolve, reject) => {
3417
3370
  var fulfilled = (value) => {
@@ -3583,10 +3536,7 @@ var NgwMap = (function (exports) {
3583
3536
  }
3584
3537
  return target;
3585
3538
  };
3586
- var __publicField$h = (obj, key, value) => {
3587
- __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
3588
- return value;
3589
- };
3539
+ var __publicField$h = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
3590
3540
  var __async$i = (__this, __arguments, generator) => {
3591
3541
  return new Promise((resolve, reject) => {
3592
3542
  var fulfilled = (value) => {
@@ -3699,10 +3649,7 @@ var NgwMap = (function (exports) {
3699
3649
  }
3700
3650
  return a;
3701
3651
  };
3702
- var __publicField$g = (obj, key, value) => {
3703
- __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
3704
- return value;
3705
- };
3652
+ var __publicField$g = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
3706
3653
  class QmsKit {
3707
3654
  constructor(options) {
3708
3655
  __publicField$g(this, "options", {
@@ -3988,10 +3935,7 @@ var NgwMap = (function (exports) {
3988
3935
  return a;
3989
3936
  };
3990
3937
  var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
3991
- var __publicField$f = (obj, key, value) => {
3992
- __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
3993
- return value;
3994
- };
3938
+ var __publicField$f = (obj, key, value) => __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
3995
3939
  var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
3996
3940
  var __async$g = (__this, __arguments, generator) => {
3997
3941
  return new Promise((resolve, reject) => {
@@ -4424,10 +4368,7 @@ var NgwMap = (function (exports) {
4424
4368
  return a;
4425
4369
  };
4426
4370
  var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
4427
- var __publicField$e = (obj, key, value) => {
4428
- __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
4429
- return value;
4430
- };
4371
+ var __publicField$e = (obj, key, value) => __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
4431
4372
  var __async$e = (__this, __arguments, generator) => {
4432
4373
  return new Promise((resolve, reject) => {
4433
4374
  var fulfilled = (value) => {
@@ -4817,10 +4758,7 @@ var NgwMap = (function (exports) {
4817
4758
  }
4818
4759
  return a;
4819
4760
  };
4820
- var __publicField$d = (obj, key, value) => {
4821
- __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
4822
- return value;
4823
- };
4761
+ var __publicField$d = (obj, key, value) => __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
4824
4762
  var __async$c = (__this, __arguments, generator) => {
4825
4763
  return new Promise((resolve, reject) => {
4826
4764
  var fulfilled = (value) => {
@@ -5098,10 +5036,7 @@ var NgwMap = (function (exports) {
5098
5036
  }
5099
5037
  return a;
5100
5038
  };
5101
- var __publicField$c = (obj, key, value) => {
5102
- __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
5103
- return value;
5104
- };
5039
+ var __publicField$c = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
5105
5040
  var __async$b = (__this, __arguments, generator) => {
5106
5041
  return new Promise((resolve, reject) => {
5107
5042
  var fulfilled = (value) => {
@@ -5278,10 +5213,7 @@ var NgwMap = (function (exports) {
5278
5213
  }
5279
5214
  return a;
5280
5215
  };
5281
- var __publicField$b = (obj, key, value) => {
5282
- __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
5283
- return value;
5284
- };
5216
+ var __publicField$b = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
5285
5217
  var __async$9 = (__this, __arguments, generator) => {
5286
5218
  return new Promise((resolve, reject) => {
5287
5219
  var fulfilled = (value) => {
@@ -5347,8 +5279,7 @@ var NgwMap = (function (exports) {
5347
5279
  removeLayer() {
5348
5280
  const mapAdapter = this.options.webMap.mapAdapter;
5349
5281
  this.getDependLayers().forEach((x) => {
5350
- if (!("layer" in x))
5351
- return;
5282
+ if (!("layer" in x)) return;
5352
5283
  mapAdapter.removeLayer(x.layer.layer);
5353
5284
  });
5354
5285
  if (this._webmapBaselayersIds.length) {
@@ -5649,10 +5580,7 @@ var NgwMap = (function (exports) {
5649
5580
  }
5650
5581
  return a;
5651
5582
  };
5652
- var __publicField$a = (obj, key, value) => {
5653
- __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
5654
- return value;
5655
- };
5583
+ var __publicField$a = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
5656
5584
  var __async$8 = (__this, __arguments, generator) => {
5657
5585
  return new Promise((resolve, reject) => {
5658
5586
  var fulfilled = (value) => {
@@ -5755,10 +5683,7 @@ var NgwMap = (function (exports) {
5755
5683
  }
5756
5684
  return a;
5757
5685
  };
5758
- var __publicField$9 = (obj, key, value) => {
5759
- __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
5760
- return value;
5761
- };
5686
+ var __publicField$9 = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
5762
5687
  class IdentifyItem {
5763
5688
  constructor(options) {
5764
5689
  __publicField$9(this, "id");
@@ -5961,8 +5886,7 @@ var NgwMap = (function (exports) {
5961
5886
  }
5962
5887
  function convertGeomToWKT(geom) {
5963
5888
  const coordinates = getPolygonCoordinates(geom);
5964
- if (!coordinates)
5965
- return null;
5889
+ if (!coordinates) return null;
5966
5890
  const polygonStr = coordinates.map(([lng, lat]) => {
5967
5891
  const [x, y] = degrees2meters(lng, lat);
5968
5892
  return `${x} ${y}`;
@@ -6651,8 +6575,7 @@ var NgwMap = (function (exports) {
6651
6575
  return value;
6652
6576
  };
6653
6577
  function typeOfValue(value) {
6654
- if (value === null)
6655
- return "null";
6578
+ if (value === null) return "null";
6656
6579
  switch (typeof value) {
6657
6580
  case "string":
6658
6581
  return "string";
@@ -6923,10 +6846,7 @@ var NgwMap = (function (exports) {
6923
6846
 
6924
6847
  var __defProp$a = Object.defineProperty;
6925
6848
  var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6926
- var __publicField$8 = (obj, key, value) => {
6927
- __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
6928
- return value;
6929
- };
6849
+ var __publicField$8 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
6930
6850
  class KeyCodes {
6931
6851
  constructor() {
6932
6852
  __publicField$8(this, "backspace", 8);
@@ -7005,10 +6925,7 @@ var NgwMap = (function (exports) {
7005
6925
 
7006
6926
  var __defProp$9 = Object.defineProperty;
7007
6927
  var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7008
- var __publicField$7 = (obj, key, value) => {
7009
- __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
7010
- return value;
7011
- };
6928
+ var __publicField$7 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
7012
6929
  class Keys {
7013
6930
  constructor() {
7014
6931
  __publicField$7(this, "keyCodeAlias", new KeyCodes());
@@ -7056,10 +6973,7 @@ var NgwMap = (function (exports) {
7056
6973
 
7057
6974
  var __defProp$8 = Object.defineProperty;
7058
6975
  var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7059
- var __publicField$6 = (obj, key, value) => {
7060
- __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
7061
- return value;
7062
- };
6976
+ var __publicField$6 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
7063
6977
  class StateItem {
7064
6978
  constructor(webMap, opt) {
7065
6979
  this.webMap = webMap;
@@ -7088,10 +7002,7 @@ var NgwMap = (function (exports) {
7088
7002
 
7089
7003
  var __defProp$7 = Object.defineProperty;
7090
7004
  var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7091
- var __publicField$5 = (obj, key, value) => {
7092
- __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
7093
- return value;
7094
- };
7005
+ var __publicField$5 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
7095
7006
  class CenterState extends StateItem {
7096
7007
  constructor() {
7097
7008
  super(...arguments);
@@ -7116,10 +7027,7 @@ var NgwMap = (function (exports) {
7116
7027
 
7117
7028
  var __defProp$6 = Object.defineProperty;
7118
7029
  var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7119
- var __publicField$4 = (obj, key, value) => {
7120
- __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
7121
- return value;
7122
- };
7030
+ var __publicField$4 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
7123
7031
  class ZoomState extends StateItem {
7124
7032
  constructor() {
7125
7033
  super(...arguments);
@@ -7149,10 +7057,7 @@ var NgwMap = (function (exports) {
7149
7057
 
7150
7058
  var __defProp$5 = Object.defineProperty;
7151
7059
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7152
- var __publicField$3 = (obj, key, value) => {
7153
- __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
7154
- return value;
7155
- };
7060
+ var __publicField$3 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
7156
7061
  var __async$6 = (__this, __arguments, generator) => {
7157
7062
  return new Promise((resolve, reject) => {
7158
7063
  var fulfilled = (value) => {
@@ -7769,10 +7674,7 @@ var NgwMap = (function (exports) {
7769
7674
  return a;
7770
7675
  };
7771
7676
  var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
7772
- var __publicField$2 = (obj, key, value) => {
7773
- __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
7774
- return value;
7775
- };
7677
+ var __publicField$2 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
7776
7678
  var __async$5 = (__this, __arguments, generator) => {
7777
7679
  return new Promise((resolve, reject) => {
7778
7680
  var fulfilled = (value) => {
@@ -8718,10 +8620,7 @@ var NgwMap = (function (exports) {
8718
8620
 
8719
8621
  var __defProp$3 = Object.defineProperty;
8720
8622
  var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8721
- var __publicField$1 = (obj, key, value) => {
8722
- __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
8723
- return value;
8724
- };
8623
+ var __publicField$1 = (obj, key, value) => __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
8725
8624
  var __async$4 = (__this, __arguments, generator) => {
8726
8625
  return new Promise((resolve, reject) => {
8727
8626
  var fulfilled = (value) => {
@@ -8920,9 +8819,7 @@ var NgwMap = (function (exports) {
8920
8819
  var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
8921
8820
  var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
8922
8821
  var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
8923
- var __knownSymbol = (name, symbol) => {
8924
- return (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
8925
- };
8822
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
8926
8823
  var __objRest = (source, exclude) => {
8927
8824
  var target = {};
8928
8825
  for (var prop in source)
@@ -9215,10 +9112,7 @@ var NgwMap = (function (exports) {
9215
9112
  return a;
9216
9113
  };
9217
9114
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9218
- var __publicField = (obj, key, value) => {
9219
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
9220
- return value;
9221
- };
9115
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
9222
9116
  var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
9223
9117
  var __async$1 = (__this, __arguments, generator) => {
9224
9118
  return new Promise((resolve, reject) => {
@@ -9625,10 +9519,32 @@ var NgwMap = (function (exports) {
9625
9519
  return;
9626
9520
  }
9627
9521
  const radius = getIdentifyRadius(center, zoom, pixelRadius);
9522
+ let geom;
9523
+ if (this.options.highlightIdentification) {
9524
+ const highlightOptions = this.options.highlightIdentification;
9525
+ const highlightDuration = typeof highlightOptions === "number" ? highlightOptions : 1e3;
9526
+ const [lng, lat] = ev.lngLat;
9527
+ geom = {
9528
+ type: "Polygon",
9529
+ coordinates: [getCirclePolygonCoordinates(lng, lat, radius)]
9530
+ };
9531
+ const highlightIdentificationLayer = yield this.addGeoJsonLayer({
9532
+ data: {
9533
+ type: "Feature",
9534
+ geometry: geom
9535
+ }
9536
+ });
9537
+ if (highlightDuration !== Infinity) {
9538
+ setTimeout(() => {
9539
+ this.removeLayer(highlightIdentificationLayer);
9540
+ }, highlightDuration);
9541
+ }
9542
+ }
9628
9543
  const selectPromise = sendIdentifyRequest(ev, {
9629
9544
  layers: ids,
9630
9545
  connector: this.connector,
9631
- radius
9546
+ radius,
9547
+ geom
9632
9548
  }).then((resp) => {
9633
9549
  const identify = __spreadProps(__spreadValues({}, resp), {
9634
9550
  resources: ids,