@nextgis/ngw-map 3.0.0-alpha.2 → 3.0.0-alpha.4

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: 3.0.0-alpha.2; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 3.0.0-alpha.4; author: NextGIS */
2
2
  var domain;
3
3
 
4
4
  // This constructor is used to store event handlers. Instantiating this is
@@ -824,12 +824,12 @@ function fixUrlStr(url) {
824
824
  return url.replace(/([^:]\/)\/+/g, "$1");
825
825
  }
826
826
 
827
- var __defProp$K = Object.defineProperty;
828
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
829
- var __publicField$v = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
827
+ var __defProp$L = Object.defineProperty;
828
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
829
+ var __publicField$w = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
830
830
  const _Cache = class _Cache {
831
831
  constructor(options = {}) {
832
- __publicField$v(this, "cache", []);
832
+ __publicField$w(this, "cache", []);
833
833
  var _a;
834
834
  const namespace = (_a = options.namespace) != null ? _a : "default";
835
835
  if (_Cache.instance[namespace]) {
@@ -935,12 +935,12 @@ const _Cache = class _Cache {
935
935
  return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
936
936
  }
937
937
  };
938
- __publicField$v(_Cache, "instance", {});
938
+ __publicField$w(_Cache, "instance", {});
939
939
  let Cache = _Cache;
940
940
 
941
941
  var pkg = {
942
942
  name: "@nextgis/ngw-connector",
943
- version: "3.0.0-alpha.2",
943
+ version: "3.0.0-alpha.4",
944
944
  _priority: 12,
945
945
  description: "A lightweight HTTP client optimized for use with NextGIS Web API",
946
946
  main: "index.js",
@@ -949,15 +949,15 @@ var pkg = {
949
949
  jsdelivr: "lib/ngw-connector.global.prod.js",
950
950
  types: "lib/index.d.ts",
951
951
  dependencies: {
952
- "@nextgis/cache": "^3.0.0-alpha.1",
953
- "@nextgis/cancelable-promise": "^3.0.0-alpha.1",
954
- "@nextgis/utils": "^3.0.0-alpha.1",
952
+ "@nextgis/cache": "^3.0.0-alpha.4",
953
+ "@nextgis/cancelable-promise": "^3.0.0-alpha.3",
954
+ "@nextgis/utils": "^3.0.0-alpha.4",
955
955
  "@types/events": "^3.0.0",
956
956
  events: "*",
957
957
  "form-data": "^4.0.0"
958
958
  },
959
959
  devDependencies: {
960
- "@nextgis/build-tools": "^3.0.0-alpha.1"
960
+ "@nextgis/build-tools": "^3.0.0-alpha.3"
961
961
  },
962
962
  scripts: {
963
963
  clean: "rimraf ./lib",
@@ -994,33 +994,33 @@ var pkg = {
994
994
  gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
995
995
  };
996
996
 
997
- var __defProp$J = Object.defineProperty;
998
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
999
- var __publicField$u = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
997
+ var __defProp$K = Object.defineProperty;
998
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
999
+ var __publicField$v = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
1000
1000
  class NgwError extends Error {
1001
1001
  constructor(er) {
1002
1002
  super();
1003
- __publicField$u(this, "name", "NgwError");
1004
- __publicField$u(this, "title");
1005
- __publicField$u(this, "message");
1006
- __publicField$u(this, "detail");
1007
- __publicField$u(this, "exception");
1008
- __publicField$u(this, "status_code");
1009
- __publicField$u(this, "data");
1010
- __publicField$u(this, "guru_meditation");
1003
+ __publicField$v(this, "name", "NgwError");
1004
+ __publicField$v(this, "title");
1005
+ __publicField$v(this, "message");
1006
+ __publicField$v(this, "detail");
1007
+ __publicField$v(this, "exception");
1008
+ __publicField$v(this, "status_code");
1009
+ __publicField$v(this, "data");
1010
+ __publicField$v(this, "guru_meditation");
1011
1011
  Object.assign(this, er);
1012
1012
  Object.setPrototypeOf(this, NgwError.prototype);
1013
1013
  }
1014
1014
  }
1015
1015
 
1016
- var __defProp$I = Object.defineProperty;
1017
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1018
- var __publicField$t = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
1016
+ var __defProp$J = Object.defineProperty;
1017
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1018
+ var __publicField$u = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
1019
1019
  class ResourceNotFoundError extends NgwError {
1020
1020
  constructor(obj) {
1021
1021
  super(obj);
1022
- __publicField$t(this, "name", "ResourceNotFoundError");
1023
- __publicField$t(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
1022
+ __publicField$u(this, "name", "ResourceNotFoundError");
1023
+ __publicField$u(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
1024
1024
  Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
1025
1025
  }
1026
1026
  }
@@ -1054,23 +1054,23 @@ function resourceToQuery(resource, prefix = "") {
1054
1054
  return query;
1055
1055
  }
1056
1056
 
1057
- var __defProp$H = Object.defineProperty;
1057
+ var __defProp$I = Object.defineProperty;
1058
1058
  var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
1059
1059
  var __hasOwnProp$w = Object.prototype.hasOwnProperty;
1060
1060
  var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
1061
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1061
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1062
1062
  var __spreadValues$v = (a, b) => {
1063
1063
  for (var prop in b || (b = {}))
1064
1064
  if (__hasOwnProp$w.call(b, prop))
1065
- __defNormalProp$H(a, prop, b[prop]);
1065
+ __defNormalProp$I(a, prop, b[prop]);
1066
1066
  if (__getOwnPropSymbols$w)
1067
1067
  for (var prop of __getOwnPropSymbols$w(b)) {
1068
1068
  if (__propIsEnum$w.call(b, prop))
1069
- __defNormalProp$H(a, prop, b[prop]);
1069
+ __defNormalProp$I(a, prop, b[prop]);
1070
1070
  }
1071
1071
  return a;
1072
1072
  };
1073
- var __publicField$s = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
1073
+ var __publicField$t = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
1074
1074
  var __async$s = (__this, __arguments, generator) => {
1075
1075
  return new Promise((resolve, reject) => {
1076
1076
  var fulfilled = (value) => {
@@ -1096,8 +1096,8 @@ class ResourcesControl {
1096
1096
  connector,
1097
1097
  cacheId
1098
1098
  }) {
1099
- __publicField$s(this, "cache");
1100
- __publicField$s(this, "connector");
1099
+ __publicField$t(this, "cache");
1100
+ __publicField$t(this, "connector");
1101
1101
  this.connector = connector;
1102
1102
  this.cache = new Cache({ namespace: cacheId });
1103
1103
  }
@@ -1350,14 +1350,14 @@ class AbortError extends Error {
1350
1350
  }
1351
1351
  }
1352
1352
 
1353
- var __defProp$G = Object.defineProperty;
1354
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1355
- var __publicField$r = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
1353
+ var __defProp$H = Object.defineProperty;
1354
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1355
+ var __publicField$s = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
1356
1356
  class InsufficientPermissionsError extends NgwError {
1357
1357
  constructor(obj) {
1358
1358
  super(obj);
1359
- __publicField$r(this, "name", "InsufficientPermissionsError");
1360
- __publicField$r(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
1359
+ __publicField$s(this, "name", "InsufficientPermissionsError");
1360
+ __publicField$s(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
1361
1361
  Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
1362
1362
  }
1363
1363
  }
@@ -1375,19 +1375,19 @@ function template(str, data) {
1375
1375
  });
1376
1376
  }
1377
1377
 
1378
- var __defProp$F = Object.defineProperty;
1378
+ var __defProp$G = Object.defineProperty;
1379
1379
  var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
1380
1380
  var __hasOwnProp$v = Object.prototype.hasOwnProperty;
1381
1381
  var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
1382
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1382
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1383
1383
  var __spreadValues$u = (a, b) => {
1384
1384
  for (var prop in b || (b = {}))
1385
1385
  if (__hasOwnProp$v.call(b, prop))
1386
- __defNormalProp$F(a, prop, b[prop]);
1386
+ __defNormalProp$G(a, prop, b[prop]);
1387
1387
  if (__getOwnPropSymbols$v)
1388
1388
  for (var prop of __getOwnPropSymbols$v(b)) {
1389
1389
  if (__propIsEnum$v.call(b, prop))
1390
- __defNormalProp$F(a, prop, b[prop]);
1390
+ __defNormalProp$G(a, prop, b[prop]);
1391
1391
  }
1392
1392
  return a;
1393
1393
  };
@@ -1462,13 +1462,13 @@ function apiRequest(opt) {
1462
1462
  });
1463
1463
  }
1464
1464
 
1465
- var __defProp$E = Object.defineProperty;
1466
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1467
- var __publicField$q = (obj, key, value) => __defNormalProp$E(obj, key + "" , value);
1465
+ var __defProp$F = Object.defineProperty;
1466
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1467
+ var __publicField$r = (obj, key, value) => __defNormalProp$F(obj, key + "" , value);
1468
1468
  class NetworkError extends Error {
1469
1469
  constructor(url) {
1470
1470
  super();
1471
- __publicField$q(this, "name", "NetworkError");
1471
+ __publicField$r(this, "name", "NetworkError");
1472
1472
  Object.setPrototypeOf(this, NetworkError.prototype);
1473
1473
  this.message = `Unable to request ${url}.
1474
1474
  Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
@@ -1557,26 +1557,26 @@ let loadData;
1557
1557
  };
1558
1558
  }
1559
1559
 
1560
- var __defProp$D = Object.defineProperty;
1561
- var __defProps$f = Object.defineProperties;
1562
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
1560
+ var __defProp$E = Object.defineProperty;
1561
+ var __defProps$g = Object.defineProperties;
1562
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
1563
1563
  var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
1564
1564
  var __hasOwnProp$u = Object.prototype.hasOwnProperty;
1565
1565
  var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
1566
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1566
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1567
1567
  var __spreadValues$t = (a, b) => {
1568
1568
  for (var prop in b || (b = {}))
1569
1569
  if (__hasOwnProp$u.call(b, prop))
1570
- __defNormalProp$D(a, prop, b[prop]);
1570
+ __defNormalProp$E(a, prop, b[prop]);
1571
1571
  if (__getOwnPropSymbols$u)
1572
1572
  for (var prop of __getOwnPropSymbols$u(b)) {
1573
1573
  if (__propIsEnum$u.call(b, prop))
1574
- __defNormalProp$D(a, prop, b[prop]);
1574
+ __defNormalProp$E(a, prop, b[prop]);
1575
1575
  }
1576
1576
  return a;
1577
1577
  };
1578
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
1579
- var __objRest$2 = (source, exclude) => {
1578
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
1579
+ var __objRest$3 = (source, exclude) => {
1580
1580
  var target = {};
1581
1581
  for (var prop in source)
1582
1582
  if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1588,7 +1588,7 @@ var __objRest$2 = (source, exclude) => {
1588
1588
  }
1589
1589
  return target;
1590
1590
  };
1591
- var __publicField$p = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
1591
+ var __publicField$q = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
1592
1592
  var __async$q = (__this, __arguments, generator) => {
1593
1593
  return new Promise((resolve, reject) => {
1594
1594
  var fulfilled = (value) => {
@@ -1614,16 +1614,16 @@ let REQUEST_ID = 0;
1614
1614
  class NgwConnector {
1615
1615
  constructor(options) {
1616
1616
  this.options = options;
1617
- __publicField$p(this, "id", ID$2++);
1618
- __publicField$p(this, "emitter", new EventEmitter());
1619
- __publicField$p(this, "user");
1620
- __publicField$p(this, "resources");
1621
- __publicField$p(this, "cache");
1622
- __publicField$p(this, "withCredentials");
1623
- __publicField$p(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
1624
- __publicField$p(this, "routeStr", "/api/component/pyramid/route");
1625
- __publicField$p(this, "activeRequests", {});
1626
- __publicField$p(this, "requestTransform");
1617
+ __publicField$q(this, "id", ID$2++);
1618
+ __publicField$q(this, "emitter", new EventEmitter());
1619
+ __publicField$q(this, "user");
1620
+ __publicField$q(this, "resources");
1621
+ __publicField$q(this, "cache");
1622
+ __publicField$q(this, "withCredentials");
1623
+ __publicField$q(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
1624
+ __publicField$q(this, "routeStr", "/api/component/pyramid/route");
1625
+ __publicField$q(this, "activeRequests", {});
1626
+ __publicField$q(this, "requestTransform");
1627
1627
  const exist = findConnector(options);
1628
1628
  this.cache = new Cache({ namespace: options.cacheId });
1629
1629
  if (exist) {
@@ -1760,8 +1760,7 @@ class NgwConnector {
1760
1760
  credentials = credentials || this.options.auth;
1761
1761
  if (credentials) {
1762
1762
  const { login, password } = credentials;
1763
- const str = `${login}:${password}`;
1764
- const encodedStr = encodeURIComponent(str);
1763
+ const encodedStr = [login, password].map(encodeURIComponent).join(":");
1765
1764
  {
1766
1765
  return window.btoa(encodedStr);
1767
1766
  }
@@ -1908,7 +1907,7 @@ class NgwConnector {
1908
1907
  throw new Error("Empty `url` not allowed");
1909
1908
  }
1910
1909
  if (params) {
1911
- const _a = params, restParams = __objRest$2(_a, ["paramList"]);
1910
+ const _a = params, restParams = __objRest$3(_a, ["paramList"]);
1912
1911
  url = template(url, restParams);
1913
1912
  }
1914
1913
  url = encodeURI(fixUrlStr(url));
@@ -1944,7 +1943,7 @@ class NgwConnector {
1944
1943
  }
1945
1944
  });
1946
1945
  if (cache && method === "GET") {
1947
- const cacheOptions = cacheProps ? cacheProps : __spreadProps$f(__spreadValues$t({}, objectRemoveEmpty({
1946
+ const cacheOptions = cacheProps ? cacheProps : __spreadProps$g(__spreadValues$t({}, objectRemoveEmpty({
1948
1947
  headers,
1949
1948
  withCredentials,
1950
1949
  responseType,
@@ -2106,24 +2105,24 @@ class NgwConnector {
2106
2105
  return er;
2107
2106
  }
2108
2107
  }
2109
- __publicField$p(NgwConnector, "errors", {
2108
+ __publicField$q(NgwConnector, "errors", {
2110
2109
  NgwError,
2111
2110
  ResourceNotFoundError
2112
2111
  });
2113
2112
 
2114
- var __defProp$C = Object.defineProperty;
2113
+ var __defProp$D = Object.defineProperty;
2115
2114
  var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
2116
2115
  var __hasOwnProp$t = Object.prototype.hasOwnProperty;
2117
2116
  var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
2118
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2117
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2119
2118
  var __spreadValues$s = (a, b) => {
2120
2119
  for (var prop in b || (b = {}))
2121
2120
  if (__hasOwnProp$t.call(b, prop))
2122
- __defNormalProp$C(a, prop, b[prop]);
2121
+ __defNormalProp$D(a, prop, b[prop]);
2123
2122
  if (__getOwnPropSymbols$t)
2124
2123
  for (var prop of __getOwnPropSymbols$t(b)) {
2125
2124
  if (__propIsEnum$t.call(b, prop))
2126
- __defNormalProp$C(a, prop, b[prop]);
2125
+ __defNormalProp$D(a, prop, b[prop]);
2127
2126
  }
2128
2127
  return a;
2129
2128
  };
@@ -2205,25 +2204,25 @@ function propertiesFilter(properties, filters) {
2205
2204
  return logic === "any" ? filters_.some(filterFunction) : filters_.every(filterFunction);
2206
2205
  }
2207
2206
 
2208
- var __defProp$B = Object.defineProperty;
2209
- var __defProps$e = Object.defineProperties;
2210
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
2207
+ var __defProp$C = Object.defineProperty;
2208
+ var __defProps$f = Object.defineProperties;
2209
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
2211
2210
  var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
2212
2211
  var __hasOwnProp$s = Object.prototype.hasOwnProperty;
2213
2212
  var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
2214
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2213
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2215
2214
  var __spreadValues$r = (a, b) => {
2216
2215
  for (var prop in b || (b = {}))
2217
2216
  if (__hasOwnProp$s.call(b, prop))
2218
- __defNormalProp$B(a, prop, b[prop]);
2217
+ __defNormalProp$C(a, prop, b[prop]);
2219
2218
  if (__getOwnPropSymbols$s)
2220
2219
  for (var prop of __getOwnPropSymbols$s(b)) {
2221
2220
  if (__propIsEnum$s.call(b, prop))
2222
- __defNormalProp$B(a, prop, b[prop]);
2221
+ __defNormalProp$C(a, prop, b[prop]);
2223
2222
  }
2224
2223
  return a;
2225
2224
  };
2226
- var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
2225
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
2227
2226
  var __async$p = (__this, __arguments, generator) => {
2228
2227
  return new Promise((resolve, reject) => {
2229
2228
  var fulfilled = (value) => {
@@ -2328,13 +2327,13 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
2328
2327
  for (const f of filters_) {
2329
2328
  if (isPropertyFilter(f)) {
2330
2329
  _queries.push(
2331
- fetchNgwLayerItemsRequest(__spreadProps$e(__spreadValues$r({}, opt), {
2330
+ fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$r({}, opt), {
2332
2331
  paramList: [..._parentAllParams, ...paramList, createParam(f)]
2333
2332
  }))
2334
2333
  );
2335
2334
  } else {
2336
2335
  getQueries(
2337
- __spreadProps$e(__spreadValues$r({}, opt), {
2336
+ __spreadProps$f(__spreadValues$r({}, opt), {
2338
2337
  filters: f
2339
2338
  }),
2340
2339
  _queries,
@@ -2355,7 +2354,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
2355
2354
  if (propertiesFilterList.length) {
2356
2355
  for (const x of propertiesFilterList) {
2357
2356
  getQueries(
2358
- __spreadProps$e(__spreadValues$r({}, opt), {
2357
+ __spreadProps$f(__spreadValues$r({}, opt), {
2359
2358
  filters: x
2360
2359
  }),
2361
2360
  _queries,
@@ -2364,7 +2363,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
2364
2363
  }
2365
2364
  } else {
2366
2365
  _queries.push(
2367
- fetchNgwLayerItemsRequest(__spreadProps$e(__spreadValues$r({}, opt), {
2366
+ fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$r({}, opt), {
2368
2367
  paramList: [..._parentAllParams, ...paramList, ...filters2]
2369
2368
  }))
2370
2369
  );
@@ -2429,25 +2428,25 @@ function fetchNgwLayerItemsRequest(options) {
2429
2428
  );
2430
2429
  }
2431
2430
 
2432
- var __defProp$A = Object.defineProperty;
2433
- var __defProps$d = Object.defineProperties;
2434
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
2431
+ var __defProp$B = Object.defineProperty;
2432
+ var __defProps$e = Object.defineProperties;
2433
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
2435
2434
  var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
2436
2435
  var __hasOwnProp$r = Object.prototype.hasOwnProperty;
2437
2436
  var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
2438
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2437
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2439
2438
  var __spreadValues$q = (a, b) => {
2440
2439
  for (var prop in b || (b = {}))
2441
2440
  if (__hasOwnProp$r.call(b, prop))
2442
- __defNormalProp$A(a, prop, b[prop]);
2441
+ __defNormalProp$B(a, prop, b[prop]);
2443
2442
  if (__getOwnPropSymbols$r)
2444
2443
  for (var prop of __getOwnPropSymbols$r(b)) {
2445
2444
  if (__propIsEnum$r.call(b, prop))
2446
- __defNormalProp$A(a, prop, b[prop]);
2445
+ __defNormalProp$B(a, prop, b[prop]);
2447
2446
  }
2448
2447
  return a;
2449
2448
  };
2450
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
2449
+ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
2451
2450
  var __async$o = (__this, __arguments, generator) => {
2452
2451
  return new Promise((resolve, reject) => {
2453
2452
  var fulfilled = (value) => {
@@ -2485,45 +2484,45 @@ function fetchNgwLayerItem(options) {
2485
2484
  if (resp.geom) {
2486
2485
  return createGeoJsonFeature(resp);
2487
2486
  } else {
2488
- const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$d(__spreadValues$q({}, options), {
2487
+ const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$q({}, options), {
2489
2488
  geom: true,
2490
2489
  fields: null,
2491
2490
  extensions: null
2492
2491
  }));
2493
2492
  const geom = onlyGeomItem.geom;
2494
- return createGeoJsonFeature(__spreadProps$d(__spreadValues$q({}, resp), { geom }));
2493
+ return createGeoJsonFeature(__spreadProps$e(__spreadValues$q({}, resp), { geom }));
2495
2494
  }
2496
2495
  });
2497
- return __spreadProps$d(__spreadValues$q({}, resp), {
2496
+ return __spreadProps$e(__spreadValues$q({}, resp), {
2498
2497
  toGeojson
2499
2498
  });
2500
2499
  });
2501
2500
  }
2502
2501
 
2503
- var __defProp$z = Object.defineProperty;
2502
+ var __defProp$A = Object.defineProperty;
2504
2503
  var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
2505
2504
  var __hasOwnProp$q = Object.prototype.hasOwnProperty;
2506
2505
  var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
2507
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2506
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2508
2507
  var __spreadValues$p = (a, b) => {
2509
2508
  for (var prop in b || (b = {}))
2510
2509
  if (__hasOwnProp$q.call(b, prop))
2511
- __defNormalProp$z(a, prop, b[prop]);
2510
+ __defNormalProp$A(a, prop, b[prop]);
2512
2511
  if (__getOwnPropSymbols$q)
2513
2512
  for (var prop of __getOwnPropSymbols$q(b)) {
2514
2513
  if (__propIsEnum$q.call(b, prop))
2515
- __defNormalProp$z(a, prop, b[prop]);
2514
+ __defNormalProp$A(a, prop, b[prop]);
2516
2515
  }
2517
2516
  return a;
2518
2517
  };
2519
- var __publicField$o = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
2518
+ var __publicField$p = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
2520
2519
  class BookmarkItem {
2521
2520
  constructor(options) {
2522
2521
  this.options = options;
2523
- __publicField$o(this, "name");
2524
- __publicField$o(this, "resourceId");
2525
- __publicField$o(this, "item");
2526
- __publicField$o(this, "_extent");
2522
+ __publicField$p(this, "name");
2523
+ __publicField$p(this, "resourceId");
2524
+ __publicField$p(this, "item");
2525
+ __publicField$p(this, "_extent");
2527
2526
  this.resourceId = options.resourceId;
2528
2527
  const item = options.item;
2529
2528
  this.item = item;
@@ -2669,14 +2668,14 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
2669
2668
  return true;
2670
2669
  }
2671
2670
 
2672
- var __defProp$y = Object.defineProperty;
2673
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2674
- var __publicField$n = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
2671
+ var __defProp$z = Object.defineProperty;
2672
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2673
+ var __publicField$o = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
2675
2674
  class TreeHelper {
2676
2675
  constructor(item) {
2677
- __publicField$n(this, "item");
2678
- __publicField$n(this, "_children", []);
2679
- __publicField$n(this, "_parent");
2676
+ __publicField$o(this, "item");
2677
+ __publicField$o(this, "_children", []);
2678
+ __publicField$o(this, "_parent");
2680
2679
  this.item = item;
2681
2680
  }
2682
2681
  setParent(parent) {
@@ -2739,19 +2738,19 @@ class TreeHelper {
2739
2738
  }
2740
2739
  }
2741
2740
 
2742
- var __defProp$x = Object.defineProperty;
2743
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2744
- var __publicField$m = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
2741
+ var __defProp$y = Object.defineProperty;
2742
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2743
+ var __publicField$n = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
2745
2744
  class BaseProperty {
2746
2745
  constructor(name, item, options) {
2747
- __publicField$m(this, "options");
2748
- __publicField$m(this, "emitter", new EventEmitter());
2749
- __publicField$m(this, "name");
2750
- __publicField$m(this, "item");
2751
- __publicField$m(this, "_blocked", false);
2752
- __publicField$m(this, "_container");
2753
- __publicField$m(this, "_value");
2754
- __publicField$m(this, "_removeEventsListener");
2746
+ __publicField$n(this, "options");
2747
+ __publicField$n(this, "emitter", new EventEmitter());
2748
+ __publicField$n(this, "name");
2749
+ __publicField$n(this, "item");
2750
+ __publicField$n(this, "_blocked", false);
2751
+ __publicField$n(this, "_container");
2752
+ __publicField$n(this, "_value");
2753
+ __publicField$n(this, "_removeEventsListener");
2755
2754
  this.item = item;
2756
2755
  this.options = Object.assign({}, options);
2757
2756
  this.name = name;
@@ -2848,23 +2847,23 @@ class BaseProperty {
2848
2847
  }
2849
2848
  }
2850
2849
 
2851
- var __defProp$w = Object.defineProperty;
2850
+ var __defProp$x = Object.defineProperty;
2852
2851
  var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
2853
2852
  var __hasOwnProp$p = Object.prototype.hasOwnProperty;
2854
2853
  var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
2855
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2854
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2856
2855
  var __spreadValues$o = (a, b) => {
2857
2856
  for (var prop in b || (b = {}))
2858
2857
  if (__hasOwnProp$p.call(b, prop))
2859
- __defNormalProp$w(a, prop, b[prop]);
2858
+ __defNormalProp$x(a, prop, b[prop]);
2860
2859
  if (__getOwnPropSymbols$p)
2861
2860
  for (var prop of __getOwnPropSymbols$p(b)) {
2862
2861
  if (__propIsEnum$p.call(b, prop))
2863
- __defNormalProp$w(a, prop, b[prop]);
2862
+ __defNormalProp$x(a, prop, b[prop]);
2864
2863
  }
2865
2864
  return a;
2866
2865
  };
2867
- var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, key + "" , value);
2866
+ var __publicField$m = (obj, key, value) => __defNormalProp$x(obj, key + "" , value);
2868
2867
  const _CheckProperty = class _CheckProperty extends BaseProperty {
2869
2868
  constructor(name, item, options) {
2870
2869
  super(name, item, __spreadValues$o(__spreadValues$o({}, _CheckProperty.options), options));
@@ -2972,7 +2971,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
2972
2971
  }
2973
2972
  }
2974
2973
  };
2975
- __publicField$l(_CheckProperty, "options", {
2974
+ __publicField$m(_CheckProperty, "options", {
2976
2975
  hierarchy: true,
2977
2976
  bubble: false,
2978
2977
  propagation: false,
@@ -2981,31 +2980,31 @@ __publicField$l(_CheckProperty, "options", {
2981
2980
  });
2982
2981
  let CheckProperty = _CheckProperty;
2983
2982
 
2984
- var __defProp$v = Object.defineProperty;
2983
+ var __defProp$w = Object.defineProperty;
2985
2984
  var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
2986
2985
  var __hasOwnProp$o = Object.prototype.hasOwnProperty;
2987
2986
  var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
2988
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2987
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2989
2988
  var __spreadValues$n = (a, b) => {
2990
2989
  for (var prop in b || (b = {}))
2991
2990
  if (__hasOwnProp$o.call(b, prop))
2992
- __defNormalProp$v(a, prop, b[prop]);
2991
+ __defNormalProp$w(a, prop, b[prop]);
2993
2992
  if (__getOwnPropSymbols$o)
2994
2993
  for (var prop of __getOwnPropSymbols$o(b)) {
2995
2994
  if (__propIsEnum$o.call(b, prop))
2996
- __defNormalProp$v(a, prop, b[prop]);
2995
+ __defNormalProp$w(a, prop, b[prop]);
2997
2996
  }
2998
2997
  return a;
2999
2998
  };
3000
- var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
2999
+ var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
3001
3000
  const BOOLEAN_TYPE = "boolean";
3002
3001
  const STRING_TYPE = "string";
3003
3002
  const _ItemProperties = class _ItemProperties {
3004
3003
  constructor(item, propertiesList) {
3005
3004
  this.item = item;
3006
- __publicField$k(this, "options", {});
3007
- __publicField$k(this, "_properties", {});
3008
- __publicField$k(this, "_propertiesList", []);
3005
+ __publicField$l(this, "options", {});
3006
+ __publicField$l(this, "_properties", {});
3007
+ __publicField$l(this, "_propertiesList", []);
3009
3008
  if (propertiesList) {
3010
3009
  propertiesList.forEach(this._setPropertyHandler.bind(this));
3011
3010
  }
@@ -3068,35 +3067,35 @@ const _ItemProperties = class _ItemProperties {
3068
3067
  return Handler;
3069
3068
  }
3070
3069
  };
3071
- __publicField$k(_ItemProperties, "handlers", {
3070
+ __publicField$l(_ItemProperties, "handlers", {
3072
3071
  CheckProperty
3073
3072
  });
3074
3073
  let ItemProperties = _ItemProperties;
3075
3074
 
3076
- var __defProp$u = Object.defineProperty;
3075
+ var __defProp$v = Object.defineProperty;
3077
3076
  var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
3078
3077
  var __hasOwnProp$n = Object.prototype.hasOwnProperty;
3079
3078
  var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
3080
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3079
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3081
3080
  var __spreadValues$m = (a, b) => {
3082
3081
  for (var prop in b || (b = {}))
3083
3082
  if (__hasOwnProp$n.call(b, prop))
3084
- __defNormalProp$u(a, prop, b[prop]);
3083
+ __defNormalProp$v(a, prop, b[prop]);
3085
3084
  if (__getOwnPropSymbols$n)
3086
3085
  for (var prop of __getOwnPropSymbols$n(b)) {
3087
3086
  if (__propIsEnum$n.call(b, prop))
3088
- __defNormalProp$u(a, prop, b[prop]);
3087
+ __defNormalProp$v(a, prop, b[prop]);
3089
3088
  }
3090
3089
  return a;
3091
3090
  };
3092
- var __publicField$j = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
3091
+ var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
3093
3092
  let ID$1 = 0;
3094
3093
  class Item {
3095
3094
  constructor(options) {
3096
- __publicField$j(this, "options", {});
3097
- __publicField$j(this, "properties");
3098
- __publicField$j(this, "tree");
3099
- __publicField$j(this, "id", ID$1);
3095
+ __publicField$k(this, "options", {});
3096
+ __publicField$k(this, "properties");
3097
+ __publicField$k(this, "tree");
3098
+ __publicField$k(this, "id", ID$1);
3100
3099
  ID$1 += 1;
3101
3100
  this.options = __spreadValues$m({}, options);
3102
3101
  this.tree = new TreeHelper(this);
@@ -3150,25 +3149,25 @@ class WebmapLayerOpacityPropertyHandler extends BaseProperty {
3150
3149
  }
3151
3150
  }
3152
3151
 
3153
- var __defProp$t = Object.defineProperty;
3154
- var __defProps$c = Object.defineProperties;
3155
- var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
3152
+ var __defProp$u = Object.defineProperty;
3153
+ var __defProps$d = Object.defineProperties;
3154
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
3156
3155
  var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
3157
3156
  var __hasOwnProp$m = Object.prototype.hasOwnProperty;
3158
3157
  var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
3159
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3158
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3160
3159
  var __spreadValues$l = (a, b) => {
3161
3160
  for (var prop in b || (b = {}))
3162
3161
  if (__hasOwnProp$m.call(b, prop))
3163
- __defNormalProp$t(a, prop, b[prop]);
3162
+ __defNormalProp$u(a, prop, b[prop]);
3164
3163
  if (__getOwnPropSymbols$m)
3165
3164
  for (var prop of __getOwnPropSymbols$m(b)) {
3166
3165
  if (__propIsEnum$m.call(b, prop))
3167
- __defNormalProp$t(a, prop, b[prop]);
3166
+ __defNormalProp$u(a, prop, b[prop]);
3168
3167
  }
3169
3168
  return a;
3170
3169
  };
3171
- var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
3170
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
3172
3171
  function getNgwWebmapExtent(webmap) {
3173
3172
  const bottom = webmap["extent_bottom"];
3174
3173
  const left = webmap["extent_left"];
@@ -3236,14 +3235,14 @@ function fetchNgwResourceExtent(item, connector, options) {
3236
3235
  if (resource.cls && resource.cls.indexOf("style") !== -1) {
3237
3236
  return connector.getResource(resource.parent.id, options).then((res) => {
3238
3237
  if (res) {
3239
- return fetchNgwLayerExtent(__spreadProps$c(__spreadValues$l({}, options), {
3238
+ return fetchNgwLayerExtent(__spreadProps$d(__spreadValues$l({}, options), {
3240
3239
  resourceId: res.resource.id,
3241
3240
  connector
3242
3241
  }));
3243
3242
  }
3244
3243
  });
3245
3244
  } else {
3246
- return fetchNgwLayerExtent(__spreadProps$c(__spreadValues$l({}, options), {
3245
+ return fetchNgwLayerExtent(__spreadProps$d(__spreadValues$l({}, options), {
3247
3246
  resourceId: resource.id,
3248
3247
  connector
3249
3248
  }));
@@ -3251,9 +3250,9 @@ function fetchNgwResourceExtent(item, connector, options) {
3251
3250
  }
3252
3251
  }
3253
3252
 
3254
- var __defProp$s = Object.defineProperty;
3255
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3256
- var __publicField$i = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
3253
+ var __defProp$t = Object.defineProperty;
3254
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3255
+ var __publicField$j = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
3257
3256
  var __async$n = (__this, __arguments, generator) => {
3258
3257
  return new Promise((resolve, reject) => {
3259
3258
  var fulfilled = (value) => {
@@ -3276,9 +3275,9 @@ var __async$n = (__this, __arguments, generator) => {
3276
3275
  };
3277
3276
  class NgwResource {
3278
3277
  constructor() {
3279
- __publicField$i(this, "item");
3280
- __publicField$i(this, "connector");
3281
- __publicField$i(this, "_extent");
3278
+ __publicField$j(this, "item");
3279
+ __publicField$j(this, "connector");
3280
+ __publicField$j(this, "_extent");
3282
3281
  }
3283
3282
  /** @deprecated use {@link NgwResource.getBounds} instead */
3284
3283
  getExtent() {
@@ -3397,23 +3396,23 @@ function updateQmsOptions(qms) {
3397
3396
  };
3398
3397
  }
3399
3398
 
3400
- var __defProp$r = Object.defineProperty;
3399
+ var __defProp$s = Object.defineProperty;
3401
3400
  var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
3402
3401
  var __hasOwnProp$l = Object.prototype.hasOwnProperty;
3403
3402
  var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
3404
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3403
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3405
3404
  var __spreadValues$k = (a, b) => {
3406
3405
  for (var prop in b || (b = {}))
3407
3406
  if (__hasOwnProp$l.call(b, prop))
3408
- __defNormalProp$r(a, prop, b[prop]);
3407
+ __defNormalProp$s(a, prop, b[prop]);
3409
3408
  if (__getOwnPropSymbols$l)
3410
3409
  for (var prop of __getOwnPropSymbols$l(b)) {
3411
3410
  if (__propIsEnum$l.call(b, prop))
3412
- __defNormalProp$r(a, prop, b[prop]);
3411
+ __defNormalProp$s(a, prop, b[prop]);
3413
3412
  }
3414
3413
  return a;
3415
3414
  };
3416
- var __objRest$1 = (source, exclude) => {
3415
+ var __objRest$2 = (source, exclude) => {
3417
3416
  var target = {};
3418
3417
  for (var prop in source)
3419
3418
  if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -3425,7 +3424,7 @@ var __objRest$1 = (source, exclude) => {
3425
3424
  }
3426
3425
  return target;
3427
3426
  };
3428
- var __publicField$h = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
3427
+ var __publicField$i = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
3429
3428
  var __async$l = (__this, __arguments, generator) => {
3430
3429
  return new Promise((resolve, reject) => {
3431
3430
  var fulfilled = (value) => {
@@ -3450,7 +3449,7 @@ const URL = "https://qms.nextgis.com";
3450
3449
  function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
3451
3450
  let webMap;
3452
3451
  if ("webMap" in webMapOrOptions) {
3453
- const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$1(_a, ["webMap", "url"]);
3452
+ const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$2(_a, ["webMap", "url"]);
3454
3453
  webMap = webMap_;
3455
3454
  if (url_) {
3456
3455
  url = url_;
@@ -3466,9 +3465,9 @@ function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
3466
3465
  }
3467
3466
  class QmsAdapter {
3468
3467
  constructor(map, options) {
3469
- __publicField$h(this, "qms");
3470
- __publicField$h(this, "options");
3471
- __publicField$h(this, "map");
3468
+ __publicField$i(this, "qms");
3469
+ __publicField$i(this, "options");
3470
+ __publicField$i(this, "map");
3472
3471
  this.map = map;
3473
3472
  const opt = __spreadValues$k(__spreadValues$k({}, createOpt), options);
3474
3473
  this.options = opt;
@@ -3522,29 +3521,29 @@ function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
3522
3521
  return QmsAdapter;
3523
3522
  }
3524
3523
 
3525
- var __defProp$q = Object.defineProperty;
3524
+ var __defProp$r = Object.defineProperty;
3526
3525
  var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
3527
3526
  var __hasOwnProp$k = Object.prototype.hasOwnProperty;
3528
3527
  var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
3529
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3528
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3530
3529
  var __spreadValues$j = (a, b) => {
3531
3530
  for (var prop in b || (b = {}))
3532
3531
  if (__hasOwnProp$k.call(b, prop))
3533
- __defNormalProp$q(a, prop, b[prop]);
3532
+ __defNormalProp$r(a, prop, b[prop]);
3534
3533
  if (__getOwnPropSymbols$k)
3535
3534
  for (var prop of __getOwnPropSymbols$k(b)) {
3536
3535
  if (__propIsEnum$k.call(b, prop))
3537
- __defNormalProp$q(a, prop, b[prop]);
3536
+ __defNormalProp$r(a, prop, b[prop]);
3538
3537
  }
3539
3538
  return a;
3540
3539
  };
3541
- var __publicField$g = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
3540
+ var __publicField$h = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
3542
3541
  class QmsKit {
3543
3542
  constructor(options) {
3544
- __publicField$g(this, "options", {
3543
+ __publicField$h(this, "options", {
3545
3544
  url: "https://qms.nextgis.com"
3546
3545
  });
3547
- __publicField$g(this, "url");
3546
+ __publicField$h(this, "url");
3548
3547
  this.options = __spreadValues$j(__spreadValues$j({}, this.options), options);
3549
3548
  this.url = this.options.url;
3550
3549
  }
@@ -3560,31 +3559,31 @@ class QmsKit {
3560
3559
  return createQmsAdapter({ webMap, url: this.url });
3561
3560
  }
3562
3561
  }
3563
- __publicField$g(QmsKit, "utils", {
3562
+ __publicField$h(QmsKit, "utils", {
3564
3563
  createQmsAdapter
3565
3564
  });
3566
3565
 
3567
- var __defProp$p = Object.defineProperty;
3568
- var __defProps$b = Object.defineProperties;
3569
- var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
3566
+ var __defProp$q = Object.defineProperty;
3567
+ var __defProps$c = Object.defineProperties;
3568
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
3570
3569
  var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
3571
3570
  var __getProtoOf$2 = Object.getPrototypeOf;
3572
3571
  var __hasOwnProp$j = Object.prototype.hasOwnProperty;
3573
3572
  var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
3574
3573
  var __reflectGet$2 = Reflect.get;
3575
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3574
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3576
3575
  var __spreadValues$i = (a, b) => {
3577
3576
  for (var prop in b || (b = {}))
3578
3577
  if (__hasOwnProp$j.call(b, prop))
3579
- __defNormalProp$p(a, prop, b[prop]);
3578
+ __defNormalProp$q(a, prop, b[prop]);
3580
3579
  if (__getOwnPropSymbols$j)
3581
3580
  for (var prop of __getOwnPropSymbols$j(b)) {
3582
3581
  if (__propIsEnum$j.call(b, prop))
3583
- __defNormalProp$p(a, prop, b[prop]);
3582
+ __defNormalProp$q(a, prop, b[prop]);
3584
3583
  }
3585
3584
  return a;
3586
3585
  };
3587
- var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
3586
+ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
3588
3587
  var __superGet$2 = (cls, obj, key) => __reflectGet$2(__getProtoOf$2(cls), key, obj);
3589
3588
  var __async$k = (__this, __arguments, generator) => {
3590
3589
  return new Promise((resolve, reject) => {
@@ -3629,7 +3628,7 @@ function createBasemapLayerAdapter(_0) {
3629
3628
  class BasemapTileAdapter extends TileAdapter {
3630
3629
  addLayer(opt) {
3631
3630
  return __async$k(this, null, function* () {
3632
- return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$b(__spreadValues$i({}, opt), { url }));
3631
+ return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$c(__spreadValues$i({}, opt), { url }));
3633
3632
  });
3634
3633
  }
3635
3634
  }
@@ -3708,25 +3707,25 @@ function prepareNgwFieldsToPropertiesFilter(fields) {
3708
3707
  return fields;
3709
3708
  }
3710
3709
 
3711
- var __defProp$o = Object.defineProperty;
3712
- var __defProps$a = Object.defineProperties;
3713
- var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
3710
+ var __defProp$p = Object.defineProperty;
3711
+ var __defProps$b = Object.defineProperties;
3712
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
3714
3713
  var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
3715
3714
  var __hasOwnProp$i = Object.prototype.hasOwnProperty;
3716
3715
  var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
3717
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3716
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3718
3717
  var __spreadValues$h = (a, b) => {
3719
3718
  for (var prop in b || (b = {}))
3720
3719
  if (__hasOwnProp$i.call(b, prop))
3721
- __defNormalProp$o(a, prop, b[prop]);
3720
+ __defNormalProp$p(a, prop, b[prop]);
3722
3721
  if (__getOwnPropSymbols$i)
3723
3722
  for (var prop of __getOwnPropSymbols$i(b)) {
3724
3723
  if (__propIsEnum$i.call(b, prop))
3725
- __defNormalProp$o(a, prop, b[prop]);
3724
+ __defNormalProp$p(a, prop, b[prop]);
3726
3725
  }
3727
3726
  return a;
3728
3727
  };
3729
- var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
3728
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
3730
3729
  var __async$j = (__this, __arguments, generator) => {
3731
3730
  return new Promise((resolve, reject) => {
3732
3731
  var fulfilled = (value) => {
@@ -3752,13 +3751,13 @@ function fetchNgwLayerItems(options) {
3752
3751
  var _a;
3753
3752
  const filters = options.filters;
3754
3753
  if (filters) {
3755
- let data = yield createFeatureFieldFilterQueries(__spreadProps$a(__spreadValues$h({}, options), {
3754
+ let data = yield createFeatureFieldFilterQueries(__spreadProps$b(__spreadValues$h({}, options), {
3756
3755
  filters
3757
3756
  }));
3758
3757
  const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
3759
3758
  if (clientFilterValidate) {
3760
3759
  data = data.filter((y) => {
3761
- const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$a(__spreadValues$h({}, y.fields), {
3760
+ const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$b(__spreadValues$h({}, y.fields), {
3762
3761
  id: y.id
3763
3762
  }));
3764
3763
  const result = propertiesFilter(fields, filters);
@@ -3846,28 +3845,28 @@ function getLayerFilterOptions(options) {
3846
3845
  return filterOptions;
3847
3846
  }
3848
3847
 
3849
- var __defProp$n = Object.defineProperty;
3850
- var __defProps$9 = Object.defineProperties;
3851
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
3848
+ var __defProp$o = Object.defineProperty;
3849
+ var __defProps$a = Object.defineProperties;
3850
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
3852
3851
  var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
3853
3852
  var __getProtoOf$1 = Object.getPrototypeOf;
3854
3853
  var __hasOwnProp$h = Object.prototype.hasOwnProperty;
3855
3854
  var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
3856
3855
  var __reflectGet$1 = Reflect.get;
3857
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3856
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3858
3857
  var __spreadValues$g = (a, b) => {
3859
3858
  for (var prop in b || (b = {}))
3860
3859
  if (__hasOwnProp$h.call(b, prop))
3861
- __defNormalProp$n(a, prop, b[prop]);
3860
+ __defNormalProp$o(a, prop, b[prop]);
3862
3861
  if (__getOwnPropSymbols$h)
3863
3862
  for (var prop of __getOwnPropSymbols$h(b)) {
3864
3863
  if (__propIsEnum$h.call(b, prop))
3865
- __defNormalProp$n(a, prop, b[prop]);
3864
+ __defNormalProp$o(a, prop, b[prop]);
3866
3865
  }
3867
3866
  return a;
3868
3867
  };
3869
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
3870
- var __publicField$f = (obj, key, value) => __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
3868
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
3869
+ var __publicField$g = (obj, key, value) => __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
3871
3870
  var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
3872
3871
  var __async$h = (__this, __arguments, generator) => {
3873
3872
  return new Promise((resolve, reject) => {
@@ -3940,11 +3939,11 @@ function createGeoJsonAdapter(props) {
3940
3939
  class NgwGeoJsonAdapter extends GeoJsonAdapter {
3941
3940
  constructor() {
3942
3941
  super(...arguments);
3943
- __publicField$f(this, "emitter", new EventEmitter());
3944
- __publicField$f(this, "__onMapMove");
3945
- __publicField$f(this, "__onMapMoveStart");
3946
- __publicField$f(this, "__enableMapMoveListener");
3947
- __publicField$f(this, "__disableMapMoveListener");
3942
+ __publicField$g(this, "emitter", new EventEmitter());
3943
+ __publicField$g(this, "__onMapMove");
3944
+ __publicField$g(this, "__onMapMoveStart");
3945
+ __publicField$g(this, "__enableMapMoveListener");
3946
+ __publicField$g(this, "__disableMapMoveListener");
3948
3947
  }
3949
3948
  addLayer(opt) {
3950
3949
  return __async$h(this, null, function* () {
@@ -4017,10 +4016,10 @@ function createGeoJsonAdapter(props) {
4017
4016
  getCount() {
4018
4017
  return fetchNgwLayerCount({ connector, resourceId, cache: true });
4019
4018
  }
4020
- updateLayer(filterArgs) {
4019
+ updateLayer(opt) {
4021
4020
  return __async$h(this, null, function* () {
4022
4021
  var _a2;
4023
- filterArgs = filterArgs || _lastFilterArgs || {};
4022
+ const filterArgs = opt || _lastFilterArgs || {};
4024
4023
  if ((_a2 = this.options.strategy) == null ? void 0 : _a2.startsWith("BBOX")) {
4025
4024
  yield webMap.onLoad("create");
4026
4025
  filterArgs.options = filterArgs.options || {};
@@ -4045,7 +4044,7 @@ function createGeoJsonAdapter(props) {
4045
4044
  try {
4046
4045
  this.emitter.emit("preupdate", filterArgs);
4047
4046
  webMap._emitLayerEvent("layer:preupdate", options.id || "", filterArgs);
4048
- const data = yield getData(filterArgs.filters, __spreadProps$9(__spreadValues$g({}, filterArgs.options), {
4047
+ const data = yield getData(filterArgs.filters, __spreadProps$a(__spreadValues$g({}, filterArgs.options), {
4049
4048
  srs: this.options.srs
4050
4049
  }));
4051
4050
  let newData = data;
@@ -4098,7 +4097,7 @@ function createGeoJsonAdapter(props) {
4098
4097
  if (this.clearLayer) {
4099
4098
  this.clearLayer();
4100
4099
  }
4101
- const data = yield getData(filters, __spreadProps$9(__spreadValues$g({}, opt), {
4100
+ const data = yield getData(filters, __spreadProps$a(__spreadValues$g({}, opt), {
4102
4101
  srs: this.options.srs
4103
4102
  }));
4104
4103
  this.setData(data);
@@ -4287,26 +4286,26 @@ function ngwApiToAdapterOptions({
4287
4286
  }
4288
4287
  }
4289
4288
 
4290
- var __defProp$m = Object.defineProperty;
4291
- var __defProps$8 = Object.defineProperties;
4292
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
4289
+ var __defProp$n = Object.defineProperty;
4290
+ var __defProps$9 = Object.defineProperties;
4291
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
4293
4292
  var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
4294
4293
  var __hasOwnProp$g = Object.prototype.hasOwnProperty;
4295
4294
  var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
4296
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4295
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4297
4296
  var __spreadValues$f = (a, b) => {
4298
4297
  for (var prop in b || (b = {}))
4299
4298
  if (__hasOwnProp$g.call(b, prop))
4300
- __defNormalProp$m(a, prop, b[prop]);
4299
+ __defNormalProp$n(a, prop, b[prop]);
4301
4300
  if (__getOwnPropSymbols$g)
4302
4301
  for (var prop of __getOwnPropSymbols$g(b)) {
4303
4302
  if (__propIsEnum$g.call(b, prop))
4304
- __defNormalProp$m(a, prop, b[prop]);
4303
+ __defNormalProp$n(a, prop, b[prop]);
4305
4304
  }
4306
4305
  return a;
4307
4306
  };
4308
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
4309
- var __publicField$e = (obj, key, value) => __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
4307
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
4308
+ var __publicField$f = (obj, key, value) => __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
4310
4309
  var __async$f = (__this, __arguments, generator) => {
4311
4310
  return new Promise((resolve, reject) => {
4312
4311
  var fulfilled = (value) => {
@@ -4327,11 +4326,47 @@ var __async$f = (__this, __arguments, generator) => {
4327
4326
  step((generator = generator.apply(__this, __arguments)).next());
4328
4327
  });
4329
4328
  };
4329
+ class Legend {
4330
+ constructor({
4331
+ layerId,
4332
+ legend,
4333
+ onSymbolRenderChange
4334
+ }) {
4335
+ __publicField$f(this, "layerId");
4336
+ __publicField$f(this, "legend");
4337
+ __publicField$f(this, "onSymbolRenderChange");
4338
+ this.layerId = layerId;
4339
+ this.legend = this.createLegend(legend);
4340
+ this.onSymbolRenderChange = onSymbolRenderChange;
4341
+ }
4342
+ createLegend(items) {
4343
+ return items.map((params) => __spreadProps$9(__spreadValues$f({}, params), {
4344
+ /** @deprecated use display_name instead */
4345
+ name: params.display_name,
4346
+ /** @deprecated use icon instead */
4347
+ symbol: params.icon
4348
+ }));
4349
+ }
4350
+ setSymbolRender(symbolIndex, status) {
4351
+ const legendItem = this.legend.find((l) => l.index === symbolIndex);
4352
+ if (legendItem) {
4353
+ const render = legendItem.render;
4354
+ if (render !== status) {
4355
+ legendItem.render = status;
4356
+ if (this.onSymbolRenderChange) {
4357
+ this.onSymbolRenderChange(
4358
+ this.legend.filter((l) => l.render).map((l) => l.index)
4359
+ );
4360
+ }
4361
+ }
4362
+ }
4363
+ }
4364
+ }
4330
4365
  function createRasterAdapter(_0) {
4331
4366
  return __async$f(this, arguments, function* ({
4332
4367
  layerOptions,
4333
- webMap,
4334
4368
  connector,
4369
+ webMap,
4335
4370
  item
4336
4371
  }) {
4337
4372
  const resourceCls = item.resource.cls;
@@ -4360,16 +4395,17 @@ function createRasterAdapter(_0) {
4360
4395
  constructor(map, _options) {
4361
4396
  super(map, _options);
4362
4397
  this.map = map;
4363
- // options = {};
4364
- __publicField$e(this, "item", item);
4365
- __publicField$e(this, "resourceId", resourceId);
4398
+ __publicField$f(this, "item", item);
4399
+ __publicField$f(this, "resourceId", resourceId);
4400
+ __publicField$f(this, "_blocked", false);
4401
+ __publicField$f(this, "_layerVisibility");
4366
4402
  const opt = ngwApiToAdapterOptions({
4367
4403
  options: layerOptions,
4368
4404
  webMap,
4369
4405
  baseUrl: connector.options.baseUrl || ""
4370
4406
  });
4371
4407
  if (opt) {
4372
- const layerAdapterOptions = __spreadProps$8(__spreadValues$f(__spreadValues$f({}, opt), layerOptions.adapterOptions), {
4408
+ const layerAdapterOptions = __spreadProps$9(__spreadValues$f(__spreadValues$f({}, opt), layerOptions.adapterOptions), {
4373
4409
  params: { resource: resourceId },
4374
4410
  layers: opt.layers || String(resourceId),
4375
4411
  resourceId
@@ -4383,25 +4419,19 @@ function createRasterAdapter(_0) {
4383
4419
  addLayer(addOptions) {
4384
4420
  return super.addLayer(__spreadValues$f(__spreadValues$f({}, this.options), addOptions));
4385
4421
  }
4386
- getLegend(options) {
4387
- return __async$f(this, null, function* () {
4388
- const ngwLegend = yield connector.get("render.legend_symbols", __spreadValues$f({
4389
- params: { id: resourceId },
4390
- cache: true
4391
- }, options));
4392
- const id = this.options.id;
4393
- if (id !== void 0) {
4394
- const legend = {
4395
- layerId: id,
4396
- legend: ngwLegend.map(({ display_name, icon }) => ({
4397
- name: display_name,
4398
- symbol: icon
4399
- }))
4400
- };
4401
- return [legend];
4422
+ showLayer() {
4423
+ this._layerVisibility = true;
4424
+ if (this.layer) {
4425
+ if (!this._blocked) {
4426
+ webMap.mapAdapter.showLayer(this.layer);
4402
4427
  }
4403
- return [];
4404
- });
4428
+ }
4429
+ }
4430
+ hideLayer() {
4431
+ this._layerVisibility = false;
4432
+ if (this.layer) {
4433
+ webMap.mapAdapter.hideLayer(this.layer);
4434
+ }
4405
4435
  }
4406
4436
  getIdentificationIds() {
4407
4437
  return __async$f(this, null, function* () {
@@ -4417,8 +4447,69 @@ function createRasterAdapter(_0) {
4417
4447
  return [];
4418
4448
  });
4419
4449
  }
4420
- // beforeRemove() {
4421
- // }
4450
+ getLegend(options) {
4451
+ return __async$f(this, null, function* () {
4452
+ const id = this.options.id;
4453
+ if (id !== void 0) {
4454
+ const ngwLegend = yield connector.get("render.legend_symbols", __spreadValues$f({
4455
+ params: { id: resourceId },
4456
+ cache: true
4457
+ }, options));
4458
+ const legend = new Legend({
4459
+ layerId: id,
4460
+ legend: ngwLegend,
4461
+ onSymbolRenderChange: this._setLegendSymbol.bind(this)
4462
+ });
4463
+ return [legend];
4464
+ }
4465
+ return [];
4466
+ });
4467
+ }
4468
+ _hideLayer() {
4469
+ if (this.options.id) {
4470
+ webMap.mapAdapter.hideLayer(this.layer);
4471
+ }
4472
+ }
4473
+ _showLayer() {
4474
+ if (this.options.id) {
4475
+ if (this._layerVisibility) {
4476
+ webMap.showLayer(this.options.id, { silent: true });
4477
+ }
4478
+ }
4479
+ }
4480
+ _setLegendSymbol(renderIndexes) {
4481
+ const intervals = this._consolidateIntervals(renderIndexes);
4482
+ if (!intervals.length) {
4483
+ this._hideLayer();
4484
+ this._blocked = true;
4485
+ } else {
4486
+ this._blocked = false;
4487
+ this._showLayer();
4488
+ }
4489
+ if (this.updateLayer) {
4490
+ this.updateLayer({
4491
+ params: {
4492
+ [`symbols[${resourceId}]`]: intervals.join(",") || void 0
4493
+ }
4494
+ });
4495
+ }
4496
+ }
4497
+ _consolidateIntervals(symbols) {
4498
+ const sortedSymbols = symbols.slice().sort((a, b) => a - b);
4499
+ const intervals = [];
4500
+ let start = sortedSymbols[0];
4501
+ let end = start;
4502
+ for (let i = 1; i <= sortedSymbols.length; i++) {
4503
+ if (sortedSymbols[i] === end + 1) {
4504
+ end = sortedSymbols[i];
4505
+ } else {
4506
+ intervals.push(start === end ? `${start}` : `${start}-${end}`);
4507
+ start = sortedSymbols[i];
4508
+ end = start;
4509
+ }
4510
+ }
4511
+ return intervals;
4512
+ }
4422
4513
  };
4423
4514
  } else {
4424
4515
  throw new Error(adapter + " not supported yet. Only TILE");
@@ -4426,25 +4517,25 @@ function createRasterAdapter(_0) {
4426
4517
  });
4427
4518
  }
4428
4519
 
4429
- var __defProp$l = Object.defineProperty;
4430
- var __defProps$7 = Object.defineProperties;
4431
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
4520
+ var __defProp$m = Object.defineProperty;
4521
+ var __defProps$8 = Object.defineProperties;
4522
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
4432
4523
  var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
4433
4524
  var __hasOwnProp$f = Object.prototype.hasOwnProperty;
4434
4525
  var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
4435
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4526
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4436
4527
  var __spreadValues$e = (a, b) => {
4437
4528
  for (var prop in b || (b = {}))
4438
4529
  if (__hasOwnProp$f.call(b, prop))
4439
- __defNormalProp$l(a, prop, b[prop]);
4530
+ __defNormalProp$m(a, prop, b[prop]);
4440
4531
  if (__getOwnPropSymbols$f)
4441
4532
  for (var prop of __getOwnPropSymbols$f(b)) {
4442
4533
  if (__propIsEnum$f.call(b, prop))
4443
- __defNormalProp$l(a, prop, b[prop]);
4534
+ __defNormalProp$m(a, prop, b[prop]);
4444
4535
  }
4445
4536
  return a;
4446
4537
  };
4447
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
4538
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
4448
4539
  var __async$e = (__this, __arguments, generator) => {
4449
4540
  return new Promise((resolve, reject) => {
4450
4541
  var fulfilled = (value) => {
@@ -4492,7 +4583,7 @@ function createAdapterFromFirstStyle(_0) {
4492
4583
  const firstStyle = childrenStyles && childrenStyles[0];
4493
4584
  if (firstStyle) {
4494
4585
  return createAsyncAdapter(
4495
- __spreadProps$7(__spreadValues$e({}, layerOptions), { resource: firstStyle.resource.id }),
4586
+ __spreadProps$8(__spreadValues$e({}, layerOptions), { resource: firstStyle.resource.id }),
4496
4587
  webMap,
4497
4588
  connector
4498
4589
  );
@@ -4515,7 +4606,7 @@ function createAsyncAdapter(options, webMap, connector) {
4515
4606
  }
4516
4607
  if (item) {
4517
4608
  const cls = item.resource.cls;
4518
- const layerOptions = __spreadProps$7(__spreadValues$e({}, options), {
4609
+ const layerOptions = __spreadProps$8(__spreadValues$e({}, options), {
4519
4610
  resource: resourceId
4520
4611
  });
4521
4612
  const adapterOptions = {
@@ -4552,10 +4643,10 @@ function createAsyncAdapter(options, webMap, connector) {
4552
4643
  item.resource.parent.id
4553
4644
  );
4554
4645
  if (parentItem) {
4555
- const parentOptions = __spreadProps$7(__spreadValues$e({}, options), {
4646
+ const parentOptions = __spreadProps$8(__spreadValues$e({}, options), {
4556
4647
  resource: item.resource.parent.id
4557
4648
  });
4558
- adapter = createGeoJsonAdapter(__spreadProps$7(__spreadValues$e({}, adapterOptions), {
4649
+ adapter = createGeoJsonAdapter(__spreadProps$8(__spreadValues$e({}, adapterOptions), {
4559
4650
  item: parentItem,
4560
4651
  layerOptions: parentOptions
4561
4652
  }));
@@ -4599,31 +4690,46 @@ function createAsyncAdapter(options, webMap, connector) {
4599
4690
  });
4600
4691
  }
4601
4692
 
4602
- var __defProp$k = Object.defineProperty;
4693
+ var __defProp$l = Object.defineProperty;
4694
+ var __defProps$7 = Object.defineProperties;
4695
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
4603
4696
  var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
4604
4697
  var __hasOwnProp$e = Object.prototype.hasOwnProperty;
4605
4698
  var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
4606
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4699
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4607
4700
  var __spreadValues$d = (a, b) => {
4608
4701
  for (var prop in b || (b = {}))
4609
4702
  if (__hasOwnProp$e.call(b, prop))
4610
- __defNormalProp$k(a, prop, b[prop]);
4703
+ __defNormalProp$l(a, prop, b[prop]);
4611
4704
  if (__getOwnPropSymbols$e)
4612
4705
  for (var prop of __getOwnPropSymbols$e(b)) {
4613
4706
  if (__propIsEnum$e.call(b, prop))
4614
- __defNormalProp$k(a, prop, b[prop]);
4707
+ __defNormalProp$l(a, prop, b[prop]);
4615
4708
  }
4616
4709
  return a;
4617
4710
  };
4711
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
4712
+ var __objRest$1 = (source, exclude) => {
4713
+ var target = {};
4714
+ for (var prop in source)
4715
+ if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
4716
+ target[prop] = source[prop];
4717
+ if (source != null && __getOwnPropSymbols$e)
4718
+ for (var prop of __getOwnPropSymbols$e(source)) {
4719
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
4720
+ target[prop] = source[prop];
4721
+ }
4722
+ return target;
4723
+ };
4618
4724
  function updateImageParams(params, resourceId) {
4619
- const { bbox, width, height, nd } = params;
4620
- return {
4725
+ const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$1(_a, ["bbox", "width", "height", "nd"]);
4726
+ return __spreadProps$7(__spreadValues$d({}, rest), {
4621
4727
  resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
4622
4728
  extent: bbox,
4623
4729
  size: width + "," + height,
4624
4730
  timestamp: Date.now(),
4625
4731
  nd: nd != null ? nd : 200
4626
- };
4732
+ });
4627
4733
  }
4628
4734
  const vectorLayerGeomToPaintTypeAlias = {
4629
4735
  POINT: "point",
@@ -4683,26 +4789,26 @@ function setScaleRatio(scale, lat = 0) {
4683
4789
  return zoom;
4684
4790
  }
4685
4791
 
4686
- var __defProp$j = Object.defineProperty;
4792
+ var __defProp$k = Object.defineProperty;
4687
4793
  var __defProps$6 = Object.defineProperties;
4688
4794
  var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
4689
4795
  var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
4690
4796
  var __hasOwnProp$d = Object.prototype.hasOwnProperty;
4691
4797
  var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
4692
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4798
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4693
4799
  var __spreadValues$c = (a, b) => {
4694
4800
  for (var prop in b || (b = {}))
4695
4801
  if (__hasOwnProp$d.call(b, prop))
4696
- __defNormalProp$j(a, prop, b[prop]);
4802
+ __defNormalProp$k(a, prop, b[prop]);
4697
4803
  if (__getOwnPropSymbols$d)
4698
4804
  for (var prop of __getOwnPropSymbols$d(b)) {
4699
4805
  if (__propIsEnum$d.call(b, prop))
4700
- __defNormalProp$j(a, prop, b[prop]);
4806
+ __defNormalProp$k(a, prop, b[prop]);
4701
4807
  }
4702
4808
  return a;
4703
4809
  };
4704
4810
  var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
4705
- var __publicField$d = (obj, key, value) => __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
4811
+ var __publicField$e = (obj, key, value) => __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
4706
4812
  var __async$d = (__this, __arguments, generator) => {
4707
4813
  return new Promise((resolve, reject) => {
4708
4814
  var fulfilled = (value) => {
@@ -4727,11 +4833,11 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
4727
4833
  constructor(webMap, item, options, connector, parent, noInit) {
4728
4834
  super(__spreadValues$c(__spreadValues$c({}, _NgwWebmapItem.options), options));
4729
4835
  this.webMap = webMap;
4730
- __publicField$d(this, "item");
4731
- __publicField$d(this, "connector");
4732
- __publicField$d(this, "layer");
4733
- __publicField$d(this, "emitter", new EventEmitter());
4734
- __publicField$d(this, "_rootDescendantsCount", 0);
4836
+ __publicField$e(this, "item");
4837
+ __publicField$e(this, "connector");
4838
+ __publicField$e(this, "layer");
4839
+ __publicField$e(this, "emitter", new EventEmitter());
4840
+ __publicField$e(this, "_rootDescendantsCount", 0);
4735
4841
  if (connector) {
4736
4842
  this.connector = connector;
4737
4843
  }
@@ -4793,10 +4899,12 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
4793
4899
  }, options));
4794
4900
  const legend = {
4795
4901
  layerId: id,
4796
- legend: ngwLegend.map(({ display_name, icon }) => ({
4797
- name: display_name,
4798
- symbol: icon
4799
- }))
4902
+ legend: ngwLegend.map((legend2) => __spreadValues$c({
4903
+ /** @deprecated use display_name instead */
4904
+ name: legend2.display_name,
4905
+ /** @deprecated use icon instead */
4906
+ symbol: legend2.icon
4907
+ }, legend2))
4800
4908
  };
4801
4909
  return [legend];
4802
4910
  }
@@ -4919,8 +5027,8 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
4919
5027
  return totalValue;
4920
5028
  }
4921
5029
  };
4922
- __publicField$d(_NgwWebmapItem, "GetAdapterFromLayerType", {});
4923
- __publicField$d(_NgwWebmapItem, "options", {
5030
+ __publicField$e(_NgwWebmapItem, "GetAdapterFromLayerType", {});
5031
+ __publicField$e(_NgwWebmapItem, "options", {
4924
5032
  properties: [
4925
5033
  {
4926
5034
  type: "boolean",
@@ -4960,23 +5068,23 @@ __publicField$d(_NgwWebmapItem, "options", {
4960
5068
  });
4961
5069
  let NgwWebmapItem = _NgwWebmapItem;
4962
5070
 
4963
- var __defProp$i = Object.defineProperty;
5071
+ var __defProp$j = Object.defineProperty;
4964
5072
  var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
4965
5073
  var __hasOwnProp$c = Object.prototype.hasOwnProperty;
4966
5074
  var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
4967
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5075
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4968
5076
  var __spreadValues$b = (a, b) => {
4969
5077
  for (var prop in b || (b = {}))
4970
5078
  if (__hasOwnProp$c.call(b, prop))
4971
- __defNormalProp$i(a, prop, b[prop]);
5079
+ __defNormalProp$j(a, prop, b[prop]);
4972
5080
  if (__getOwnPropSymbols$c)
4973
5081
  for (var prop of __getOwnPropSymbols$c(b)) {
4974
5082
  if (__propIsEnum$c.call(b, prop))
4975
- __defNormalProp$i(a, prop, b[prop]);
5083
+ __defNormalProp$j(a, prop, b[prop]);
4976
5084
  }
4977
5085
  return a;
4978
5086
  };
4979
- var __publicField$c = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
5087
+ var __publicField$d = (obj, key, value) => __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
4980
5088
  var __async$c = (__this, __arguments, generator) => {
4981
5089
  return new Promise((resolve, reject) => {
4982
5090
  var fulfilled = (value) => {
@@ -5006,10 +5114,10 @@ function createOnFirstShowAdapter(_0) {
5006
5114
  }) {
5007
5115
  class OnFirstShowAdapter {
5008
5116
  constructor() {
5009
- __publicField$c(this, "options", {});
5010
- __publicField$c(this, "layer", []);
5011
- __publicField$c(this, "_removed", false);
5012
- __publicField$c(this, "_creatingInProgress", false);
5117
+ __publicField$d(this, "options", {});
5118
+ __publicField$d(this, "layer", []);
5119
+ __publicField$d(this, "_removed", false);
5120
+ __publicField$d(this, "_creatingInProgress", false);
5013
5121
  }
5014
5122
  addLayer() {
5015
5123
  return this.layer;
@@ -5137,26 +5245,26 @@ function createOnFirstShowNgwAdapter(_0) {
5137
5245
 
5138
5246
  const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
5139
5247
 
5140
- var __defProp$h = Object.defineProperty;
5248
+ var __defProp$i = Object.defineProperty;
5141
5249
  var __defProps$5 = Object.defineProperties;
5142
5250
  var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
5143
5251
  var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
5144
5252
  var __hasOwnProp$b = Object.prototype.hasOwnProperty;
5145
5253
  var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
5146
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5254
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5147
5255
  var __spreadValues$a = (a, b) => {
5148
5256
  for (var prop in b || (b = {}))
5149
5257
  if (__hasOwnProp$b.call(b, prop))
5150
- __defNormalProp$h(a, prop, b[prop]);
5258
+ __defNormalProp$i(a, prop, b[prop]);
5151
5259
  if (__getOwnPropSymbols$b)
5152
5260
  for (var prop of __getOwnPropSymbols$b(b)) {
5153
5261
  if (__propIsEnum$b.call(b, prop))
5154
- __defNormalProp$h(a, prop, b[prop]);
5262
+ __defNormalProp$i(a, prop, b[prop]);
5155
5263
  }
5156
5264
  return a;
5157
5265
  };
5158
5266
  var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
5159
- var __publicField$b = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
5267
+ var __publicField$c = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
5160
5268
  var __async$a = (__this, __arguments, generator) => {
5161
5269
  return new Promise((resolve, reject) => {
5162
5270
  var fulfilled = (value) => {
@@ -5181,21 +5289,21 @@ class NgwWebmapLayerAdapter {
5181
5289
  constructor(map, options) {
5182
5290
  this.map = map;
5183
5291
  this.options = options;
5184
- __publicField$b(this, "layer");
5185
- __publicField$b(this, "NgwWebmapItem", NgwWebmapItem);
5292
+ __publicField$c(this, "layer");
5293
+ __publicField$c(this, "NgwWebmapItem", NgwWebmapItem);
5186
5294
  /**
5187
5295
  * Radius for searching objects in pixels
5188
5296
  */
5189
- __publicField$b(this, "pixelRadius", 10);
5297
+ __publicField$c(this, "pixelRadius", 10);
5190
5298
  // webmapSettings.identify_radius,
5191
- __publicField$b(this, "resourceId");
5192
- __publicField$b(this, "webmapClassName", "webmap");
5193
- __publicField$b(this, "emitter", new EventEmitter());
5194
- __publicField$b(this, "_extent");
5195
- __publicField$b(this, "response");
5196
- __publicField$b(this, "_webmapLayersIds");
5197
- __publicField$b(this, "_webmapBaselayersIds", []);
5198
- __publicField$b(this, "_lastActiveBaselayer");
5299
+ __publicField$c(this, "resourceId");
5300
+ __publicField$c(this, "webmapClassName", "webmap");
5301
+ __publicField$c(this, "emitter", new EventEmitter());
5302
+ __publicField$c(this, "_extent");
5303
+ __publicField$c(this, "response");
5304
+ __publicField$c(this, "_webmapLayersIds");
5305
+ __publicField$c(this, "_webmapBaselayersIds", []);
5306
+ __publicField$c(this, "_lastActiveBaselayer");
5199
5307
  const r = options.resourceId;
5200
5308
  if (Array.isArray(r)) {
5201
5309
  this.resourceId = r[0];
@@ -5504,23 +5612,23 @@ class NgwWebmapLayerAdapter {
5504
5612
  }
5505
5613
  }
5506
5614
 
5507
- var __defProp$g = Object.defineProperty;
5615
+ var __defProp$h = Object.defineProperty;
5508
5616
  var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
5509
5617
  var __hasOwnProp$a = Object.prototype.hasOwnProperty;
5510
5618
  var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
5511
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5619
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5512
5620
  var __spreadValues$9 = (a, b) => {
5513
5621
  for (var prop in b || (b = {}))
5514
5622
  if (__hasOwnProp$a.call(b, prop))
5515
- __defNormalProp$g(a, prop, b[prop]);
5623
+ __defNormalProp$h(a, prop, b[prop]);
5516
5624
  if (__getOwnPropSymbols$a)
5517
5625
  for (var prop of __getOwnPropSymbols$a(b)) {
5518
5626
  if (__propIsEnum$a.call(b, prop))
5519
- __defNormalProp$g(a, prop, b[prop]);
5627
+ __defNormalProp$h(a, prop, b[prop]);
5520
5628
  }
5521
5629
  return a;
5522
5630
  };
5523
- var __publicField$a = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
5631
+ var __publicField$b = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
5524
5632
  var __async$9 = (__this, __arguments, generator) => {
5525
5633
  return new Promise((resolve, reject) => {
5526
5634
  var fulfilled = (value) => {
@@ -5544,9 +5652,9 @@ var __async$9 = (__this, __arguments, generator) => {
5544
5652
  class NgwKit {
5545
5653
  constructor(options) {
5546
5654
  this.options = options;
5547
- __publicField$a(this, "url");
5548
- __publicField$a(this, "connector");
5549
- __publicField$a(this, "webMap");
5655
+ __publicField$b(this, "url");
5656
+ __publicField$b(this, "connector");
5657
+ __publicField$b(this, "webMap");
5550
5658
  if (this.options.connector) {
5551
5659
  this.url = this.options.connector.options.baseUrl || "";
5552
5660
  this.connector = this.options.connector;
@@ -5607,37 +5715,37 @@ class NgwKit {
5607
5715
  }
5608
5716
  }
5609
5717
 
5610
- var __defProp$f = Object.defineProperty;
5718
+ var __defProp$g = Object.defineProperty;
5611
5719
  var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
5612
5720
  var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
5613
5721
  var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
5614
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5722
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5615
5723
  var __spreadValues$8 = (a, b) => {
5616
5724
  for (var prop in b || (b = {}))
5617
5725
  if (__hasOwnProp$9.call(b, prop))
5618
- __defNormalProp$f(a, prop, b[prop]);
5726
+ __defNormalProp$g(a, prop, b[prop]);
5619
5727
  if (__getOwnPropSymbols$9)
5620
5728
  for (var prop of __getOwnPropSymbols$9(b)) {
5621
5729
  if (__propIsEnum$9.call(b, prop))
5622
- __defNormalProp$f(a, prop, b[prop]);
5730
+ __defNormalProp$g(a, prop, b[prop]);
5623
5731
  }
5624
5732
  return a;
5625
5733
  };
5626
- var __publicField$9 = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
5734
+ var __publicField$a = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
5627
5735
  class IdentifyItem {
5628
5736
  constructor(options) {
5629
- __publicField$9(this, "id");
5630
- __publicField$9(this, "label");
5631
- __publicField$9(this, "layerId");
5632
- __publicField$9(this, "parent");
5633
- __publicField$9(this, "fields");
5634
- __publicField$9(this, "geom");
5635
- __publicField$9(this, "extensions");
5636
- __publicField$9(this, "connector");
5637
- __publicField$9(this, "_item");
5638
- __publicField$9(this, "_geojson");
5639
- __publicField$9(this, "_resource");
5640
- __publicField$9(this, "_extent");
5737
+ __publicField$a(this, "id");
5738
+ __publicField$a(this, "label");
5739
+ __publicField$a(this, "layerId");
5740
+ __publicField$a(this, "parent");
5741
+ __publicField$a(this, "fields");
5742
+ __publicField$a(this, "geom");
5743
+ __publicField$a(this, "extensions");
5744
+ __publicField$a(this, "connector");
5745
+ __publicField$a(this, "_item");
5746
+ __publicField$a(this, "_geojson");
5747
+ __publicField$a(this, "_resource");
5748
+ __publicField$a(this, "_extent");
5641
5749
  const f = options.feature;
5642
5750
  this.id = f.id;
5643
5751
  this.geom = f.geom;
@@ -5723,21 +5831,21 @@ function fetchNgwLayerFeature(options) {
5723
5831
  });
5724
5832
  }
5725
5833
 
5726
- var __defProp$e = Object.defineProperty;
5834
+ var __defProp$f = Object.defineProperty;
5727
5835
  var __defProps$4 = Object.defineProperties;
5728
5836
  var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
5729
5837
  var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
5730
5838
  var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
5731
5839
  var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
5732
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5840
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5733
5841
  var __spreadValues$7 = (a, b) => {
5734
5842
  for (var prop in b || (b = {}))
5735
5843
  if (__hasOwnProp$8.call(b, prop))
5736
- __defNormalProp$e(a, prop, b[prop]);
5844
+ __defNormalProp$f(a, prop, b[prop]);
5737
5845
  if (__getOwnPropSymbols$8)
5738
5846
  for (var prop of __getOwnPropSymbols$8(b)) {
5739
5847
  if (__propIsEnum$8.call(b, prop))
5740
- __defNormalProp$e(a, prop, b[prop]);
5848
+ __defNormalProp$f(a, prop, b[prop]);
5741
5849
  }
5742
5850
  return a;
5743
5851
  };
@@ -6581,19 +6689,19 @@ const typeExpressions = {
6581
6689
  typeof: evaluateArgs(([arg]) => typeOfValue(arg))
6582
6690
  };
6583
6691
 
6584
- var __defProp$d = Object.defineProperty;
6692
+ var __defProp$e = Object.defineProperty;
6585
6693
  var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
6586
6694
  var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
6587
6695
  var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
6588
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6696
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6589
6697
  var __spreadValues$6 = (a, b) => {
6590
6698
  for (var prop in b || (b = {}))
6591
6699
  if (__hasOwnProp$7.call(b, prop))
6592
- __defNormalProp$d(a, prop, b[prop]);
6700
+ __defNormalProp$e(a, prop, b[prop]);
6593
6701
  if (__getOwnPropSymbols$7)
6594
6702
  for (var prop of __getOwnPropSymbols$7(b)) {
6595
6703
  if (__propIsEnum$7.call(b, prop))
6596
- __defNormalProp$d(a, prop, b[prop]);
6704
+ __defNormalProp$e(a, prop, b[prop]);
6597
6705
  }
6598
6706
  return a;
6599
6707
  };
@@ -6618,19 +6726,19 @@ function evaluate(expression, data = {}) {
6618
6726
  throw new Error(`Expression "${name}" is not supported.`);
6619
6727
  }
6620
6728
 
6621
- var __defProp$c = Object.defineProperty;
6729
+ var __defProp$d = Object.defineProperty;
6622
6730
  var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
6623
6731
  var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
6624
6732
  var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
6625
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6733
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6626
6734
  var __spreadValues$5 = (a, b) => {
6627
6735
  for (var prop in b || (b = {}))
6628
6736
  if (__hasOwnProp$6.call(b, prop))
6629
- __defNormalProp$c(a, prop, b[prop]);
6737
+ __defNormalProp$d(a, prop, b[prop]);
6630
6738
  if (__getOwnPropSymbols$6)
6631
6739
  for (var prop of __getOwnPropSymbols$6(b)) {
6632
6740
  if (__propIsEnum$6.call(b, prop))
6633
- __defNormalProp$c(a, prop, b[prop]);
6741
+ __defNormalProp$d(a, prop, b[prop]);
6634
6742
  }
6635
6743
  return a;
6636
6744
  };
@@ -6669,19 +6777,19 @@ function createExpressionCallback(paint) {
6669
6777
  return;
6670
6778
  }
6671
6779
 
6672
- var __defProp$b = Object.defineProperty;
6780
+ var __defProp$c = Object.defineProperty;
6673
6781
  var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
6674
6782
  var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
6675
6783
  var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
6676
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6784
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6677
6785
  var __spreadValues$4 = (a, b) => {
6678
6786
  for (var prop in b || (b = {}))
6679
6787
  if (__hasOwnProp$5.call(b, prop))
6680
- __defNormalProp$b(a, prop, b[prop]);
6788
+ __defNormalProp$c(a, prop, b[prop]);
6681
6789
  if (__getOwnPropSymbols$5)
6682
6790
  for (var prop of __getOwnPropSymbols$5(b)) {
6683
6791
  if (__propIsEnum$5.call(b, prop))
6684
- __defNormalProp$b(a, prop, b[prop]);
6792
+ __defNormalProp$c(a, prop, b[prop]);
6685
6793
  }
6686
6794
  return a;
6687
6795
  };
@@ -6805,95 +6913,95 @@ function preparePaint({
6805
6913
  return newPaint;
6806
6914
  }
6807
6915
 
6808
- var __defProp$a = Object.defineProperty;
6809
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6810
- var __publicField$8 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
6916
+ var __defProp$b = Object.defineProperty;
6917
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6918
+ var __publicField$9 = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
6811
6919
  class KeyCodes {
6812
6920
  constructor() {
6813
- __publicField$8(this, "backspace", 8);
6814
- __publicField$8(this, "tab", 9);
6815
- __publicField$8(this, "enter", 13);
6816
- __publicField$8(this, "shift", 16);
6817
- __publicField$8(this, "ctrl", 17);
6818
- __publicField$8(this, "alt", 18);
6819
- __publicField$8(this, "pause/break", 19);
6820
- __publicField$8(this, "caps_lock", 20);
6821
- __publicField$8(this, "escape", 27);
6822
- __publicField$8(this, "page_up", 33);
6823
- __publicField$8(this, "page_down", 34);
6824
- __publicField$8(this, "end", 35);
6825
- __publicField$8(this, "home", 36);
6826
- __publicField$8(this, "left_arrow", 37);
6827
- __publicField$8(this, "up_arrow", 38);
6828
- __publicField$8(this, "right_arrow", 39);
6829
- __publicField$8(this, "down_arrow", 40);
6830
- __publicField$8(this, "insert", 45);
6831
- __publicField$8(this, "delete", 46);
6832
- __publicField$8(this, "left_window_key", 91);
6833
- __publicField$8(this, "right_window_key", 92);
6834
- __publicField$8(this, "select_key", 93);
6835
- __publicField$8(this, "numpad_0", 96);
6836
- __publicField$8(this, "numpad_1", 97);
6837
- __publicField$8(this, "numpad_2", 98);
6838
- __publicField$8(this, "numpad_3", 99);
6839
- __publicField$8(this, "numpad_4", 100);
6840
- __publicField$8(this, "numpad_5", 101);
6841
- __publicField$8(this, "numpad_6", 102);
6842
- __publicField$8(this, "numpad_7", 103);
6843
- __publicField$8(this, "numpad_8", 104);
6844
- __publicField$8(this, "numpad_9", 105);
6845
- __publicField$8(this, "multiply", 106);
6846
- __publicField$8(this, "add", 107);
6847
- __publicField$8(this, "subtract", 109);
6848
- __publicField$8(this, "decimal_point", 110);
6849
- __publicField$8(this, "divide", 111);
6850
- __publicField$8(this, "f1", 112);
6851
- __publicField$8(this, "f2", 113);
6852
- __publicField$8(this, "f3", 114);
6853
- __publicField$8(this, "f4", 115);
6854
- __publicField$8(this, "f5", 116);
6855
- __publicField$8(this, "f6", 117);
6856
- __publicField$8(this, "f7", 118);
6857
- __publicField$8(this, "f8", 119);
6858
- __publicField$8(this, "f9", 120);
6859
- __publicField$8(this, "f10", 121);
6860
- __publicField$8(this, "f11", 122);
6861
- __publicField$8(this, "f12", 123);
6862
- __publicField$8(this, "num_lock", 144);
6863
- __publicField$8(this, "scroll_lock", 145);
6864
- __publicField$8(this, "semi-colon", 186);
6865
- __publicField$8(this, "equal_sign", 187);
6866
- __publicField$8(this, ",", 188);
6921
+ __publicField$9(this, "backspace", 8);
6922
+ __publicField$9(this, "tab", 9);
6923
+ __publicField$9(this, "enter", 13);
6924
+ __publicField$9(this, "shift", 16);
6925
+ __publicField$9(this, "ctrl", 17);
6926
+ __publicField$9(this, "alt", 18);
6927
+ __publicField$9(this, "pause/break", 19);
6928
+ __publicField$9(this, "caps_lock", 20);
6929
+ __publicField$9(this, "escape", 27);
6930
+ __publicField$9(this, "page_up", 33);
6931
+ __publicField$9(this, "page_down", 34);
6932
+ __publicField$9(this, "end", 35);
6933
+ __publicField$9(this, "home", 36);
6934
+ __publicField$9(this, "left_arrow", 37);
6935
+ __publicField$9(this, "up_arrow", 38);
6936
+ __publicField$9(this, "right_arrow", 39);
6937
+ __publicField$9(this, "down_arrow", 40);
6938
+ __publicField$9(this, "insert", 45);
6939
+ __publicField$9(this, "delete", 46);
6940
+ __publicField$9(this, "left_window_key", 91);
6941
+ __publicField$9(this, "right_window_key", 92);
6942
+ __publicField$9(this, "select_key", 93);
6943
+ __publicField$9(this, "numpad_0", 96);
6944
+ __publicField$9(this, "numpad_1", 97);
6945
+ __publicField$9(this, "numpad_2", 98);
6946
+ __publicField$9(this, "numpad_3", 99);
6947
+ __publicField$9(this, "numpad_4", 100);
6948
+ __publicField$9(this, "numpad_5", 101);
6949
+ __publicField$9(this, "numpad_6", 102);
6950
+ __publicField$9(this, "numpad_7", 103);
6951
+ __publicField$9(this, "numpad_8", 104);
6952
+ __publicField$9(this, "numpad_9", 105);
6953
+ __publicField$9(this, "multiply", 106);
6954
+ __publicField$9(this, "add", 107);
6955
+ __publicField$9(this, "subtract", 109);
6956
+ __publicField$9(this, "decimal_point", 110);
6957
+ __publicField$9(this, "divide", 111);
6958
+ __publicField$9(this, "f1", 112);
6959
+ __publicField$9(this, "f2", 113);
6960
+ __publicField$9(this, "f3", 114);
6961
+ __publicField$9(this, "f4", 115);
6962
+ __publicField$9(this, "f5", 116);
6963
+ __publicField$9(this, "f6", 117);
6964
+ __publicField$9(this, "f7", 118);
6965
+ __publicField$9(this, "f8", 119);
6966
+ __publicField$9(this, "f9", 120);
6967
+ __publicField$9(this, "f10", 121);
6968
+ __publicField$9(this, "f11", 122);
6969
+ __publicField$9(this, "f12", 123);
6970
+ __publicField$9(this, "num_lock", 144);
6971
+ __publicField$9(this, "scroll_lock", 145);
6972
+ __publicField$9(this, "semi-colon", 186);
6973
+ __publicField$9(this, "equal_sign", 187);
6974
+ __publicField$9(this, ",", 188);
6867
6975
  // "comma";
6868
- __publicField$8(this, "-", 189);
6976
+ __publicField$9(this, "-", 189);
6869
6977
  // "dash";
6870
- __publicField$8(this, ".", 190);
6978
+ __publicField$9(this, ".", 190);
6871
6979
  // "period";
6872
- __publicField$8(this, "/", 191);
6980
+ __publicField$9(this, "/", 191);
6873
6981
  // "forward slash";
6874
- __publicField$8(this, "`", 192);
6982
+ __publicField$9(this, "`", 192);
6875
6983
  // "grave accent";
6876
- __publicField$8(this, "[", 219);
6984
+ __publicField$9(this, "[", 219);
6877
6985
  // "open bracket";
6878
- __publicField$8(this, "\\", 220);
6986
+ __publicField$9(this, "\\", 220);
6879
6987
  // "back slash";
6880
- __publicField$8(this, "]", 221);
6988
+ __publicField$9(this, "]", 221);
6881
6989
  // "close braket";
6882
- __publicField$8(this, "'", 222);
6990
+ __publicField$9(this, "'", 222);
6883
6991
  }
6884
6992
  // "single quote"
6885
6993
  }
6886
6994
 
6887
- var __defProp$9 = Object.defineProperty;
6888
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6889
- var __publicField$7 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
6995
+ var __defProp$a = Object.defineProperty;
6996
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6997
+ var __publicField$8 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
6890
6998
  class Keys {
6891
6999
  constructor() {
6892
- __publicField$7(this, "keyCodeAlias", new KeyCodes());
6893
- __publicField$7(this, "keys", {});
6894
- __publicField$7(this, "_windowOnFocus");
6895
- __publicField$7(this, "_keysPressed");
6896
- __publicField$7(this, "_keysReleased");
7000
+ __publicField$8(this, "keyCodeAlias", new KeyCodes());
7001
+ __publicField$8(this, "keys", {});
7002
+ __publicField$8(this, "_windowOnFocus");
7003
+ __publicField$8(this, "_keysPressed");
7004
+ __publicField$8(this, "_keysReleased");
6897
7005
  this._windowOnFocus = this.windowOnFocus.bind(this);
6898
7006
  this._keysPressed = this.keysPressed.bind(this);
6899
7007
  this._keysReleased = this.keysReleased.bind(this);
@@ -6932,15 +7040,15 @@ class Keys {
6932
7040
  }
6933
7041
  }
6934
7042
 
6935
- var __defProp$8 = Object.defineProperty;
6936
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6937
- var __publicField$6 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
7043
+ var __defProp$9 = Object.defineProperty;
7044
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7045
+ var __publicField$7 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
6938
7046
  class StateItem {
6939
7047
  constructor(webMap, opt) {
6940
7048
  this.webMap = webMap;
6941
- __publicField$6(this, "name");
6942
- __publicField$6(this, "event");
6943
- __publicField$6(this, "value");
7049
+ __publicField$7(this, "name");
7050
+ __publicField$7(this, "event");
7051
+ __publicField$7(this, "value");
6944
7052
  if (opt) {
6945
7053
  if (opt.value) {
6946
7054
  this.setValue(opt.value);
@@ -6949,7 +7057,11 @@ class StateItem {
6949
7057
  this.name = opt.name;
6950
7058
  }
6951
7059
  if (opt.event) {
6952
- this.event = opt.event;
7060
+ if (typeof opt.event === "string") {
7061
+ this.event = [opt.event];
7062
+ } else {
7063
+ this.event = opt.event;
7064
+ }
6953
7065
  }
6954
7066
  }
6955
7067
  }
@@ -6961,6 +7073,34 @@ class StateItem {
6961
7073
  }
6962
7074
  }
6963
7075
 
7076
+ var __defProp$8 = Object.defineProperty;
7077
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7078
+ var __publicField$6 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
7079
+ class BoundState extends StateItem {
7080
+ constructor() {
7081
+ super(...arguments);
7082
+ __publicField$6(this, "name", "bounds");
7083
+ __publicField$6(this, "event", ["moveend"]);
7084
+ }
7085
+ getValue() {
7086
+ return this.webMap.getBounds();
7087
+ }
7088
+ setValue(bounds) {
7089
+ this.webMap.setView({ bounds });
7090
+ }
7091
+ toString() {
7092
+ const data = this.getValue();
7093
+ if (data) {
7094
+ return data.slice(0, 4).map((x) => x.toFixed(5)).join("_");
7095
+ }
7096
+ return void 0;
7097
+ }
7098
+ parse(str) {
7099
+ const lngLat = str.split("_").map(Number);
7100
+ return lngLat;
7101
+ }
7102
+ }
7103
+
6964
7104
  var __defProp$7 = Object.defineProperty;
6965
7105
  var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6966
7106
  var __publicField$5 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -6968,7 +7108,7 @@ class CenterState extends StateItem {
6968
7108
  constructor() {
6969
7109
  super(...arguments);
6970
7110
  __publicField$5(this, "name", "center");
6971
- __publicField$5(this, "event", "moveend");
7111
+ __publicField$5(this, "event", ["moveend"]);
6972
7112
  }
6973
7113
  getValue() {
6974
7114
  return this.webMap.getCenter();
@@ -6976,9 +7116,13 @@ class CenterState extends StateItem {
6976
7116
  setValue(val) {
6977
7117
  this.webMap.setCenter(val);
6978
7118
  }
6979
- toString(data) {
6980
- const d = data.map((x) => x.toFixed(5));
6981
- return d[0] + "_" + d[1];
7119
+ toString() {
7120
+ const data = this.getValue();
7121
+ if (data) {
7122
+ const d = data.map((x) => x.toFixed(5));
7123
+ return d[0] + "_" + d[1];
7124
+ }
7125
+ return "";
6982
7126
  }
6983
7127
  parse(str) {
6984
7128
  const lngLat = str.split("_").map(Number);
@@ -6993,7 +7137,7 @@ class ZoomState extends StateItem {
6993
7137
  constructor() {
6994
7138
  super(...arguments);
6995
7139
  __publicField$4(this, "name", "zoom");
6996
- __publicField$4(this, "event", "zoomend");
7140
+ __publicField$4(this, "event", ["zoomend"]);
6997
7141
  }
6998
7142
  getValue() {
6999
7143
  const zoom = this.webMap.getZoom();
@@ -7002,8 +7146,8 @@ class ZoomState extends StateItem {
7002
7146
  setValue(val) {
7003
7147
  this.webMap.setZoom(val);
7004
7148
  }
7005
- toString(val) {
7006
- return String(val);
7149
+ toString() {
7150
+ return String(this.getValue());
7007
7151
  }
7008
7152
  parse(str) {
7009
7153
  return Number(str);
@@ -7072,14 +7216,14 @@ const _WebMapMain = class _WebMapMain {
7072
7216
  __publicField$3(this, "mapAdapter");
7073
7217
  __publicField$3(this, "runtimeParams", []);
7074
7218
  __publicField$3(this, "getPaintFunctions", _WebMapMain.getPaintFunctions);
7075
- __publicField$3(this, "mapState", [CenterState, ZoomState]);
7219
+ __publicField$3(this, "mapStateItems", [CenterState, ZoomState, BoundState]);
7076
7220
  __publicField$3(this, "id", ID++);
7077
7221
  /**
7078
7222
  * From runtime params
7079
7223
  */
7224
+ __publicField$3(this, "mapState", []);
7080
7225
  __publicField$3(this, "_initMapState", {});
7081
7226
  __publicField$3(this, "_starterKits");
7082
- __publicField$3(this, "_mapState", []);
7083
7227
  __publicField$3(this, "_extent");
7084
7228
  __publicField$3(this, "_eventsStatus", {});
7085
7229
  __publicField$3(this, "_coordFromMapClickAbort");
@@ -7114,7 +7258,7 @@ const _WebMapMain = class _WebMapMain {
7114
7258
  create() {
7115
7259
  return __async$6(this, null, function* () {
7116
7260
  if (!this.getEventStatus("create")) {
7117
- yield this._setInitMapState(this.mapState);
7261
+ yield this._setInitMapState(this.mapStateItems);
7118
7262
  yield this._setupMap();
7119
7263
  this._emitStatusEvent("create", this);
7120
7264
  }
@@ -7134,16 +7278,22 @@ const _WebMapMain = class _WebMapMain {
7134
7278
  this.mapAdapter.destroy();
7135
7279
  }
7136
7280
  }
7137
- getState() {
7281
+ mapStateWithFunc(func) {
7138
7282
  const state = {};
7139
- this._mapState.forEach((x) => {
7140
- state[x.name] = x.getValue();
7283
+ this.mapState.forEach((x) => {
7284
+ state[x.name] = func(x);
7141
7285
  });
7142
7286
  return state;
7143
7287
  }
7288
+ getStateAsString() {
7289
+ return this.mapStateWithFunc((x) => x.toString());
7290
+ }
7291
+ getState() {
7292
+ return this.mapStateWithFunc((x) => x.getValue());
7293
+ }
7144
7294
  getRuntimeParams() {
7145
7295
  const state = {};
7146
- this._mapState.forEach((x) => {
7296
+ this.mapState.forEach((x) => {
7147
7297
  for (const r of this.runtimeParams) {
7148
7298
  const val = r.get(x.name);
7149
7299
  if (val !== void 0) {
@@ -7485,7 +7635,7 @@ const _WebMapMain = class _WebMapMain {
7485
7635
  _setInitMapState(states) {
7486
7636
  for (const X of states) {
7487
7637
  const state = new X(this);
7488
- this._mapState.push(state);
7638
+ this.mapState.push(state);
7489
7639
  for (const r of this.runtimeParams) {
7490
7640
  const str = r.get(state.name);
7491
7641
  if (str !== void 0) {
@@ -7521,13 +7671,15 @@ const _WebMapMain = class _WebMapMain {
7521
7671
  events.forEach((x) => {
7522
7672
  this._mapEvents[x] = (data) => {
7523
7673
  if (this.runtimeParams.length) {
7524
- const mapStatusEvent = this._mapState.find((y) => y.event === x);
7525
- if (mapStatusEvent) {
7526
- const value = mapStatusEvent.toString(mapStatusEvent.getValue());
7674
+ const mapStatusEvents = this.mapState.filter(
7675
+ (y) => y.event.includes(x)
7676
+ );
7677
+ mapStatusEvents.forEach((mapStatusEvent) => {
7678
+ const value = mapStatusEvent.toString();
7527
7679
  this.runtimeParams.forEach((r) => {
7528
7680
  r.set(mapStatusEvent.name, value);
7529
7681
  });
7530
- }
7682
+ });
7531
7683
  }
7532
7684
  if (this._eventsStatus) {
7533
7685
  this.emitter.emit(x, data);
@@ -8103,11 +8255,11 @@ class WebMapLayers extends WebMapMain {
8103
8255
  }
8104
8256
  return Promise.resolve();
8105
8257
  }
8106
- updateLayer(layerDef) {
8258
+ updateLayer(layerDef, options) {
8107
8259
  const layer = this.getLayer(layerDef);
8108
8260
  if (layer) {
8109
8261
  if (layer.updateLayer) {
8110
- return Promise.resolve(layer.updateLayer());
8262
+ return Promise.resolve(layer.updateLayer(options));
8111
8263
  } else if (this.isLayerVisible(layer)) {
8112
8264
  return this.hideLayer(layer, { silent: true }).then(() => {
8113
8265
  return this.showLayer(layer, { silent: true });