@nextgis/ngw-map 2.2.3 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -0
- package/lib/ngw-map.cjs.js +25 -6
- package/lib/ngw-map.cjs.js.map +1 -1
- package/lib/ngw-map.cjs.prod.js +1 -1
- package/lib/ngw-map.cjs.prod.js.map +1 -1
- package/lib/ngw-map.esm-browser.js +113 -191
- package/lib/ngw-map.esm-browser.js.map +1 -1
- package/lib/ngw-map.esm-browser.prod.js +1 -1
- package/lib/ngw-map.esm-browser.prod.js.map +1 -1
- package/lib/ngw-map.esm-bundler.js +26 -7
- package/lib/ngw-map.esm-bundler.js.map +1 -1
- package/lib/ngw-map.esm-bundler.prod.js +1 -1
- package/lib/ngw-map.esm-bundler.prod.js.map +1 -1
- package/lib/ngw-map.global.js +113 -191
- package/lib/ngw-map.global.js.map +1 -1
- package/lib/ngw-map.global.prod.js +1 -1
- package/lib/ngw-map.global.prod.js.map +1 -1
- package/package.json +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 2.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 2.4.0; author: NextGIS */
|
|
2
2
|
var domain;
|
|
3
3
|
|
|
4
4
|
// This constructor is used to store event handlers. Instantiating this is
|
|
@@ -473,10 +473,7 @@ function unwrapListeners(arr) {
|
|
|
473
473
|
|
|
474
474
|
var __defProp$N = Object.defineProperty;
|
|
475
475
|
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
476
|
-
var __publicField$z = (obj, key, value) =>
|
|
477
|
-
__defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
478
|
-
return value;
|
|
479
|
-
};
|
|
476
|
+
var __publicField$z = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
480
477
|
class CancelError extends Error {
|
|
481
478
|
constructor() {
|
|
482
479
|
super();
|
|
@@ -487,10 +484,7 @@ class CancelError extends Error {
|
|
|
487
484
|
|
|
488
485
|
var __defProp$M = Object.defineProperty;
|
|
489
486
|
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
490
|
-
var __publicField$y = (obj, key, value) =>
|
|
491
|
-
__defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
492
|
-
return value;
|
|
493
|
-
};
|
|
487
|
+
var __publicField$y = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
494
488
|
class PromiseControl {
|
|
495
489
|
constructor(options = {}) {
|
|
496
490
|
this.options = options;
|
|
@@ -572,10 +566,7 @@ class PromiseControl {
|
|
|
572
566
|
|
|
573
567
|
var __defProp$L = Object.defineProperty;
|
|
574
568
|
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
575
|
-
var __publicField$x = (obj, key, value) =>
|
|
576
|
-
__defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
577
|
-
return value;
|
|
578
|
-
};
|
|
569
|
+
var __publicField$x = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
579
570
|
class TimeoutError extends Error {
|
|
580
571
|
constructor() {
|
|
581
572
|
super();
|
|
@@ -586,10 +577,7 @@ class TimeoutError extends Error {
|
|
|
586
577
|
|
|
587
578
|
var __defProp$K = Object.defineProperty;
|
|
588
579
|
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
589
|
-
var __publicField$w = (obj, key, value) =>
|
|
590
|
-
__defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
591
|
-
return value;
|
|
592
|
-
};
|
|
580
|
+
var __publicField$w = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
593
581
|
var _a;
|
|
594
582
|
const handleCallback = (resolve, reject, callback, r) => {
|
|
595
583
|
try {
|
|
@@ -599,6 +587,7 @@ const handleCallback = (resolve, reject, callback, r) => {
|
|
|
599
587
|
}
|
|
600
588
|
};
|
|
601
589
|
let ID$3 = 0;
|
|
590
|
+
_a = Symbol.toStringTag;
|
|
602
591
|
const _CancelablePromise = class _CancelablePromise {
|
|
603
592
|
constructor(executor, timeout) {
|
|
604
593
|
// @ts-ignore
|
|
@@ -778,7 +767,6 @@ const _CancelablePromise = class _CancelablePromise {
|
|
|
778
767
|
this._promise = void 0;
|
|
779
768
|
}
|
|
780
769
|
};
|
|
781
|
-
_a = Symbol.toStringTag;
|
|
782
770
|
__publicField$w(_CancelablePromise, "CancelError", CancelError);
|
|
783
771
|
__publicField$w(_CancelablePromise, "TimeoutError", TimeoutError);
|
|
784
772
|
__publicField$w(_CancelablePromise, "PromiseControl", PromiseControl);
|
|
@@ -1078,19 +1066,15 @@ function checkExtent(extent) {
|
|
|
1078
1066
|
|
|
1079
1067
|
function isEqual(a, b, o, p) {
|
|
1080
1068
|
if (a instanceof Array) {
|
|
1081
|
-
if (!(b instanceof Array))
|
|
1082
|
-
return false;
|
|
1069
|
+
if (!(b instanceof Array)) return false;
|
|
1083
1070
|
return b.sort().join("") === a.sort().join("");
|
|
1084
1071
|
} else if (a instanceof Date) {
|
|
1085
|
-
if (!(b instanceof Date))
|
|
1086
|
-
return false;
|
|
1072
|
+
if (!(b instanceof Date)) return false;
|
|
1087
1073
|
return "" + a === "" + b;
|
|
1088
1074
|
} else if (a instanceof Function) {
|
|
1089
|
-
if (!(b instanceof Function))
|
|
1090
|
-
return false;
|
|
1075
|
+
if (!(b instanceof Function)) return false;
|
|
1091
1076
|
} else if (a instanceof Object) {
|
|
1092
|
-
if (!(b instanceof Object))
|
|
1093
|
-
return false;
|
|
1077
|
+
if (!(b instanceof Object)) return false;
|
|
1094
1078
|
if (a === o) {
|
|
1095
1079
|
return b === p;
|
|
1096
1080
|
} else {
|
|
@@ -1102,10 +1086,8 @@ function isEqual(a, b, o, p) {
|
|
|
1102
1086
|
function objectDeepEqual(o, p) {
|
|
1103
1087
|
const keysO = Object.keys(o).sort();
|
|
1104
1088
|
const keysP = Object.keys(p).sort();
|
|
1105
|
-
if (keysO.length !== keysP.length)
|
|
1106
|
-
|
|
1107
|
-
if (keysO.join("") !== keysP.join(""))
|
|
1108
|
-
return false;
|
|
1089
|
+
if (keysO.length !== keysP.length) return false;
|
|
1090
|
+
if (keysO.join("") !== keysP.join("")) return false;
|
|
1109
1091
|
for (let i = 0; i < keysO.length; i++) {
|
|
1110
1092
|
const oVal = o[keysO[i]];
|
|
1111
1093
|
const pVal = p[keysP[i]];
|
|
@@ -1146,10 +1128,7 @@ function fixUrlStr(url) {
|
|
|
1146
1128
|
|
|
1147
1129
|
var __defProp$J = Object.defineProperty;
|
|
1148
1130
|
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1149
|
-
var __publicField$v = (obj, key, value) =>
|
|
1150
|
-
__defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1151
|
-
return value;
|
|
1152
|
-
};
|
|
1131
|
+
var __publicField$v = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1153
1132
|
const _Cache = class _Cache {
|
|
1154
1133
|
constructor(options = {}) {
|
|
1155
1134
|
__publicField$v(this, "cache", []);
|
|
@@ -1276,10 +1255,7 @@ let Cache = _Cache;
|
|
|
1276
1255
|
|
|
1277
1256
|
var __defProp$I = Object.defineProperty;
|
|
1278
1257
|
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1279
|
-
var __publicField$u = (obj, key, value) =>
|
|
1280
|
-
__defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1281
|
-
return value;
|
|
1282
|
-
};
|
|
1258
|
+
var __publicField$u = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1283
1259
|
class NgwError extends Error {
|
|
1284
1260
|
constructor(er) {
|
|
1285
1261
|
super();
|
|
@@ -1298,10 +1274,7 @@ class NgwError extends Error {
|
|
|
1298
1274
|
|
|
1299
1275
|
var __defProp$H = Object.defineProperty;
|
|
1300
1276
|
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1301
|
-
var __publicField$t = (obj, key, value) =>
|
|
1302
|
-
__defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1303
|
-
return value;
|
|
1304
|
-
};
|
|
1277
|
+
var __publicField$t = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1305
1278
|
class ResourceNotFoundError extends NgwError {
|
|
1306
1279
|
constructor(obj) {
|
|
1307
1280
|
super(obj);
|
|
@@ -1359,10 +1332,7 @@ var __spreadValues$t = (a, b) => {
|
|
|
1359
1332
|
return a;
|
|
1360
1333
|
};
|
|
1361
1334
|
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
1362
|
-
var __publicField$s = (obj, key, value) =>
|
|
1363
|
-
__defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1364
|
-
return value;
|
|
1365
|
-
};
|
|
1335
|
+
var __publicField$s = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1366
1336
|
var __async$l = (__this, __arguments, generator) => {
|
|
1367
1337
|
return new Promise((resolve, reject) => {
|
|
1368
1338
|
var fulfilled = (value) => {
|
|
@@ -1384,9 +1354,14 @@ var __async$l = (__this, __arguments, generator) => {
|
|
|
1384
1354
|
});
|
|
1385
1355
|
};
|
|
1386
1356
|
class ResourcesControl {
|
|
1387
|
-
constructor(
|
|
1357
|
+
constructor({
|
|
1358
|
+
connector,
|
|
1359
|
+
cacheId
|
|
1360
|
+
}) {
|
|
1361
|
+
__publicField$s(this, "cache");
|
|
1362
|
+
__publicField$s(this, "connector");
|
|
1388
1363
|
this.connector = connector;
|
|
1389
|
-
|
|
1364
|
+
this.cache = new Cache({ namespace: cacheId });
|
|
1390
1365
|
}
|
|
1391
1366
|
// -------------------------------------------------------------------------
|
|
1392
1367
|
// Resource Methods
|
|
@@ -1399,7 +1374,7 @@ class ResourcesControl {
|
|
|
1399
1374
|
* Fetching resource would be cached to speed up next call
|
|
1400
1375
|
*/
|
|
1401
1376
|
getOne(resource, requestOptions) {
|
|
1402
|
-
const cache =
|
|
1377
|
+
const cache = this.cache;
|
|
1403
1378
|
const forCache = {};
|
|
1404
1379
|
const opt = __spreadProps$d(__spreadValues$t({}, requestOptions), { cache: false });
|
|
1405
1380
|
if (typeof resource === "string") {
|
|
@@ -1428,7 +1403,10 @@ class ResourcesControl {
|
|
|
1428
1403
|
}
|
|
1429
1404
|
return CancelablePromise.resolve(void 0);
|
|
1430
1405
|
};
|
|
1431
|
-
|
|
1406
|
+
if (requestOptions == null ? void 0 : requestOptions.cache) {
|
|
1407
|
+
return cache.addFull("resource", makeRequest, forCache);
|
|
1408
|
+
}
|
|
1409
|
+
return makeRequest();
|
|
1432
1410
|
}
|
|
1433
1411
|
getOneOrFail(resource, requestOptions) {
|
|
1434
1412
|
return this.getOne(resource, requestOptions).then((res) => {
|
|
@@ -1589,14 +1567,17 @@ class ResourcesControl {
|
|
|
1589
1567
|
}
|
|
1590
1568
|
_fetchResourceById(id, requestOptions) {
|
|
1591
1569
|
const promise = () => this.connector.get("resource.item", requestOptions, { id });
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1570
|
+
if (requestOptions == null ? void 0 : requestOptions.cache) {
|
|
1571
|
+
return this.cache.add("resource.item", promise, {
|
|
1572
|
+
id
|
|
1573
|
+
}).catch((er) => {
|
|
1574
|
+
if (!(er instanceof ResourceNotFoundError)) {
|
|
1575
|
+
throw er;
|
|
1576
|
+
}
|
|
1577
|
+
return void 0;
|
|
1578
|
+
});
|
|
1579
|
+
}
|
|
1580
|
+
return promise();
|
|
1600
1581
|
}
|
|
1601
1582
|
_fetchResourceBy(resource, requestOptions) {
|
|
1602
1583
|
return this.getMany(resource, requestOptions).then((resources) => {
|
|
@@ -1650,10 +1631,7 @@ function removeConnector(connector) {
|
|
|
1650
1631
|
|
|
1651
1632
|
var __defProp$F = Object.defineProperty;
|
|
1652
1633
|
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1653
|
-
var __publicField$r = (obj, key, value) =>
|
|
1654
|
-
__defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1655
|
-
return value;
|
|
1656
|
-
};
|
|
1634
|
+
var __publicField$r = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1657
1635
|
class InsufficientPermissionsError extends NgwError {
|
|
1658
1636
|
constructor(obj) {
|
|
1659
1637
|
super(obj);
|
|
@@ -1679,7 +1657,7 @@ function template(str, data) {
|
|
|
1679
1657
|
function apiRequest(opt) {
|
|
1680
1658
|
const params = opt.params;
|
|
1681
1659
|
return new CancelablePromise((resolve, reject) => {
|
|
1682
|
-
opt.connector.connect().then((apiItems) => {
|
|
1660
|
+
return opt.connector.connect().then((apiItems) => {
|
|
1683
1661
|
let apiItem = apiItems && apiItems[opt.name];
|
|
1684
1662
|
if (apiItem) {
|
|
1685
1663
|
apiItem = [...apiItem];
|
|
@@ -1733,10 +1711,7 @@ function apiRequest(opt) {
|
|
|
1733
1711
|
|
|
1734
1712
|
var __defProp$E = Object.defineProperty;
|
|
1735
1713
|
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1736
|
-
var __publicField$q = (obj, key, value) =>
|
|
1737
|
-
__defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1738
|
-
return value;
|
|
1739
|
-
};
|
|
1714
|
+
var __publicField$q = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1740
1715
|
class NetworkError extends Error {
|
|
1741
1716
|
constructor(url) {
|
|
1742
1717
|
super();
|
|
@@ -1845,10 +1820,7 @@ var __spreadValues$s = (a, b) => {
|
|
|
1845
1820
|
}
|
|
1846
1821
|
return a;
|
|
1847
1822
|
};
|
|
1848
|
-
var __publicField$p = (obj, key, value) =>
|
|
1849
|
-
__defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1850
|
-
return value;
|
|
1851
|
-
};
|
|
1823
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1852
1824
|
let ID$2 = 0;
|
|
1853
1825
|
class NgwConnector {
|
|
1854
1826
|
constructor(options) {
|
|
@@ -1857,10 +1829,12 @@ class NgwConnector {
|
|
|
1857
1829
|
__publicField$p(this, "emitter", new EventEmitter());
|
|
1858
1830
|
__publicField$p(this, "user");
|
|
1859
1831
|
__publicField$p(this, "resources");
|
|
1832
|
+
__publicField$p(this, "cache");
|
|
1860
1833
|
__publicField$p(this, "routeStr", "/api/component/pyramid/route");
|
|
1861
1834
|
__publicField$p(this, "activeRequests", []);
|
|
1862
1835
|
__publicField$p(this, "requestTransform");
|
|
1863
1836
|
const exist = findConnector(options);
|
|
1837
|
+
this.cache = new Cache({ namespace: options.cacheId });
|
|
1864
1838
|
if (exist) {
|
|
1865
1839
|
return exist;
|
|
1866
1840
|
} else {
|
|
@@ -1870,13 +1844,23 @@ class NgwConnector {
|
|
|
1870
1844
|
if (this.options.requestTransform) {
|
|
1871
1845
|
this.requestTransform = this.options.requestTransform;
|
|
1872
1846
|
}
|
|
1873
|
-
this.resources = new ResourcesControl(
|
|
1847
|
+
this.resources = new ResourcesControl({
|
|
1848
|
+
connector: this,
|
|
1849
|
+
cacheId: options.cacheId
|
|
1850
|
+
});
|
|
1874
1851
|
addConnector(this);
|
|
1875
1852
|
}
|
|
1876
1853
|
}
|
|
1877
1854
|
static create(options) {
|
|
1878
1855
|
return new this(options);
|
|
1879
1856
|
}
|
|
1857
|
+
/**
|
|
1858
|
+
* Clear the cache.
|
|
1859
|
+
*/
|
|
1860
|
+
clearCache() {
|
|
1861
|
+
this.cache.clean();
|
|
1862
|
+
this.resources.cache.clean();
|
|
1863
|
+
}
|
|
1880
1864
|
setRequestTransform(requestTransform) {
|
|
1881
1865
|
this.requestTransform = requestTransform;
|
|
1882
1866
|
}
|
|
@@ -1904,7 +1888,6 @@ class NgwConnector {
|
|
|
1904
1888
|
* ```
|
|
1905
1889
|
*/
|
|
1906
1890
|
connect() {
|
|
1907
|
-
const cache = new Cache();
|
|
1908
1891
|
const auth = this.options.auth;
|
|
1909
1892
|
const makeConnect = () => new CancelablePromise((resolve, reject) => {
|
|
1910
1893
|
const makeQuery = () => {
|
|
@@ -1924,7 +1907,7 @@ class NgwConnector {
|
|
|
1924
1907
|
}
|
|
1925
1908
|
return makeQuery();
|
|
1926
1909
|
});
|
|
1927
|
-
return cache.add("route", makeConnect, {
|
|
1910
|
+
return this.cache.add("route", makeConnect, {
|
|
1928
1911
|
id: this.id,
|
|
1929
1912
|
auth,
|
|
1930
1913
|
baseUrl: this.options.baseUrl
|
|
@@ -1947,8 +1930,8 @@ class NgwConnector {
|
|
|
1947
1930
|
removeConnector(this);
|
|
1948
1931
|
this.options.auth = void 0;
|
|
1949
1932
|
this.user = void 0;
|
|
1933
|
+
this.clearCache();
|
|
1950
1934
|
this.emitter.emit("logout");
|
|
1951
|
-
this.resources.cache.clean();
|
|
1952
1935
|
}
|
|
1953
1936
|
getUserInfo(credentials, options) {
|
|
1954
1937
|
if (this.user && this.user.id) {
|
|
@@ -2033,8 +2016,7 @@ class NgwConnector {
|
|
|
2033
2016
|
const params = objectRemoveEmpty(params_);
|
|
2034
2017
|
const makeApiRequest = () => apiRequest({ name, params, requestOptions, connector: this });
|
|
2035
2018
|
if (requestOptions.cache && method === "GET") {
|
|
2036
|
-
|
|
2037
|
-
return cache.add(name, makeApiRequest, __spreadValues$s({
|
|
2019
|
+
return this.cache.add(name, makeApiRequest, __spreadValues$s({
|
|
2038
2020
|
params
|
|
2039
2021
|
}, objectRemoveEmpty({
|
|
2040
2022
|
headers,
|
|
@@ -2320,10 +2302,8 @@ function reEscape(s) {
|
|
|
2320
2302
|
function like(b, a, iLike) {
|
|
2321
2303
|
a = String(a);
|
|
2322
2304
|
b = String(b);
|
|
2323
|
-
if (a === b)
|
|
2324
|
-
|
|
2325
|
-
if (iLike && a.toUpperCase() === b.toUpperCase())
|
|
2326
|
-
return true;
|
|
2305
|
+
if (a === b) return true;
|
|
2306
|
+
if (iLike && a.toUpperCase() === b.toUpperCase()) return true;
|
|
2327
2307
|
const re = `^${reEscape(a)}$`.replace(/%/g, ".*").replace("_", ".");
|
|
2328
2308
|
return new RegExp(re, iLike ? "i" : "").exec(b) !== null;
|
|
2329
2309
|
}
|
|
@@ -2646,10 +2626,7 @@ function fetchNgwLayerItem(options) {
|
|
|
2646
2626
|
|
|
2647
2627
|
var __defProp$z = Object.defineProperty;
|
|
2648
2628
|
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2649
|
-
var __publicField$o = (obj, key, value) =>
|
|
2650
|
-
__defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2651
|
-
return value;
|
|
2652
|
-
};
|
|
2629
|
+
var __publicField$o = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2653
2630
|
class BookmarkItem {
|
|
2654
2631
|
constructor(options) {
|
|
2655
2632
|
this.options = options;
|
|
@@ -2813,10 +2790,7 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
|
|
|
2813
2790
|
|
|
2814
2791
|
var __defProp$y = Object.defineProperty;
|
|
2815
2792
|
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2816
|
-
var __publicField$n = (obj, key, value) =>
|
|
2817
|
-
__defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2818
|
-
return value;
|
|
2819
|
-
};
|
|
2793
|
+
var __publicField$n = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2820
2794
|
class TreeHelper {
|
|
2821
2795
|
constructor(item) {
|
|
2822
2796
|
__publicField$n(this, "item");
|
|
@@ -2886,10 +2860,7 @@ class TreeHelper {
|
|
|
2886
2860
|
|
|
2887
2861
|
var __defProp$x = Object.defineProperty;
|
|
2888
2862
|
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2889
|
-
var __publicField$m = (obj, key, value) =>
|
|
2890
|
-
__defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2891
|
-
return value;
|
|
2892
|
-
};
|
|
2863
|
+
var __publicField$m = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2893
2864
|
class BaseProperty {
|
|
2894
2865
|
constructor(name, item, options) {
|
|
2895
2866
|
__publicField$m(this, "options");
|
|
@@ -3012,10 +2983,7 @@ var __spreadValues$o = (a, b) => {
|
|
|
3012
2983
|
}
|
|
3013
2984
|
return a;
|
|
3014
2985
|
};
|
|
3015
|
-
var __publicField$l = (obj, key, value) =>
|
|
3016
|
-
__defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3017
|
-
return value;
|
|
3018
|
-
};
|
|
2986
|
+
var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3019
2987
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
3020
2988
|
constructor(name, item, options) {
|
|
3021
2989
|
super(name, item, __spreadValues$o(__spreadValues$o({}, _CheckProperty.options), options));
|
|
@@ -3148,10 +3116,7 @@ var __spreadValues$n = (a, b) => {
|
|
|
3148
3116
|
}
|
|
3149
3117
|
return a;
|
|
3150
3118
|
};
|
|
3151
|
-
var __publicField$k = (obj, key, value) =>
|
|
3152
|
-
__defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3153
|
-
return value;
|
|
3154
|
-
};
|
|
3119
|
+
var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3155
3120
|
const BOOLEAN_TYPE = "boolean";
|
|
3156
3121
|
const STRING_TYPE = "string";
|
|
3157
3122
|
const _ItemProperties = class _ItemProperties {
|
|
@@ -3243,10 +3208,7 @@ var __spreadValues$m = (a, b) => {
|
|
|
3243
3208
|
}
|
|
3244
3209
|
return a;
|
|
3245
3210
|
};
|
|
3246
|
-
var __publicField$j = (obj, key, value) =>
|
|
3247
|
-
__defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3248
|
-
return value;
|
|
3249
|
-
};
|
|
3211
|
+
var __publicField$j = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3250
3212
|
let ID$1 = 0;
|
|
3251
3213
|
class Item {
|
|
3252
3214
|
constructor(options) {
|
|
@@ -3405,10 +3367,7 @@ function fetchNgwResourceExtent(item, connector, options) {
|
|
|
3405
3367
|
|
|
3406
3368
|
var __defProp$s = Object.defineProperty;
|
|
3407
3369
|
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3408
|
-
var __publicField$i = (obj, key, value) =>
|
|
3409
|
-
__defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3410
|
-
return value;
|
|
3411
|
-
};
|
|
3370
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3412
3371
|
var __async$k = (__this, __arguments, generator) => {
|
|
3413
3372
|
return new Promise((resolve, reject) => {
|
|
3414
3373
|
var fulfilled = (value) => {
|
|
@@ -3580,10 +3539,7 @@ var __objRest$1 = (source, exclude) => {
|
|
|
3580
3539
|
}
|
|
3581
3540
|
return target;
|
|
3582
3541
|
};
|
|
3583
|
-
var __publicField$h = (obj, key, value) =>
|
|
3584
|
-
__defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3585
|
-
return value;
|
|
3586
|
-
};
|
|
3542
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3587
3543
|
var __async$i = (__this, __arguments, generator) => {
|
|
3588
3544
|
return new Promise((resolve, reject) => {
|
|
3589
3545
|
var fulfilled = (value) => {
|
|
@@ -3696,10 +3652,7 @@ var __spreadValues$j = (a, b) => {
|
|
|
3696
3652
|
}
|
|
3697
3653
|
return a;
|
|
3698
3654
|
};
|
|
3699
|
-
var __publicField$g = (obj, key, value) =>
|
|
3700
|
-
__defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3701
|
-
return value;
|
|
3702
|
-
};
|
|
3655
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3703
3656
|
class QmsKit {
|
|
3704
3657
|
constructor(options) {
|
|
3705
3658
|
__publicField$g(this, "options", {
|
|
@@ -3985,10 +3938,7 @@ var __spreadValues$g = (a, b) => {
|
|
|
3985
3938
|
return a;
|
|
3986
3939
|
};
|
|
3987
3940
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
3988
|
-
var __publicField$f = (obj, key, value) =>
|
|
3989
|
-
__defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3990
|
-
return value;
|
|
3991
|
-
};
|
|
3941
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3992
3942
|
var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
|
|
3993
3943
|
var __async$g = (__this, __arguments, generator) => {
|
|
3994
3944
|
return new Promise((resolve, reject) => {
|
|
@@ -4421,10 +4371,7 @@ var __spreadValues$f = (a, b) => {
|
|
|
4421
4371
|
return a;
|
|
4422
4372
|
};
|
|
4423
4373
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
4424
|
-
var __publicField$e = (obj, key, value) =>
|
|
4425
|
-
__defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4426
|
-
return value;
|
|
4427
|
-
};
|
|
4374
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4428
4375
|
var __async$e = (__this, __arguments, generator) => {
|
|
4429
4376
|
return new Promise((resolve, reject) => {
|
|
4430
4377
|
var fulfilled = (value) => {
|
|
@@ -4814,10 +4761,7 @@ var __spreadValues$c = (a, b) => {
|
|
|
4814
4761
|
}
|
|
4815
4762
|
return a;
|
|
4816
4763
|
};
|
|
4817
|
-
var __publicField$d = (obj, key, value) =>
|
|
4818
|
-
__defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4819
|
-
return value;
|
|
4820
|
-
};
|
|
4764
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4821
4765
|
var __async$c = (__this, __arguments, generator) => {
|
|
4822
4766
|
return new Promise((resolve, reject) => {
|
|
4823
4767
|
var fulfilled = (value) => {
|
|
@@ -5095,10 +5039,7 @@ var __spreadValues$b = (a, b) => {
|
|
|
5095
5039
|
}
|
|
5096
5040
|
return a;
|
|
5097
5041
|
};
|
|
5098
|
-
var __publicField$c = (obj, key, value) =>
|
|
5099
|
-
__defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5100
|
-
return value;
|
|
5101
|
-
};
|
|
5042
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5102
5043
|
var __async$b = (__this, __arguments, generator) => {
|
|
5103
5044
|
return new Promise((resolve, reject) => {
|
|
5104
5045
|
var fulfilled = (value) => {
|
|
@@ -5275,10 +5216,7 @@ var __spreadValues$a = (a, b) => {
|
|
|
5275
5216
|
}
|
|
5276
5217
|
return a;
|
|
5277
5218
|
};
|
|
5278
|
-
var __publicField$b = (obj, key, value) =>
|
|
5279
|
-
__defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5280
|
-
return value;
|
|
5281
|
-
};
|
|
5219
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5282
5220
|
var __async$9 = (__this, __arguments, generator) => {
|
|
5283
5221
|
return new Promise((resolve, reject) => {
|
|
5284
5222
|
var fulfilled = (value) => {
|
|
@@ -5344,8 +5282,7 @@ class NgwWebmapLayerAdapter {
|
|
|
5344
5282
|
removeLayer() {
|
|
5345
5283
|
const mapAdapter = this.options.webMap.mapAdapter;
|
|
5346
5284
|
this.getDependLayers().forEach((x) => {
|
|
5347
|
-
if (!("layer" in x))
|
|
5348
|
-
return;
|
|
5285
|
+
if (!("layer" in x)) return;
|
|
5349
5286
|
mapAdapter.removeLayer(x.layer.layer);
|
|
5350
5287
|
});
|
|
5351
5288
|
if (this._webmapBaselayersIds.length) {
|
|
@@ -5646,10 +5583,7 @@ var __spreadValues$9 = (a, b) => {
|
|
|
5646
5583
|
}
|
|
5647
5584
|
return a;
|
|
5648
5585
|
};
|
|
5649
|
-
var __publicField$a = (obj, key, value) =>
|
|
5650
|
-
__defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5651
|
-
return value;
|
|
5652
|
-
};
|
|
5586
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5653
5587
|
var __async$8 = (__this, __arguments, generator) => {
|
|
5654
5588
|
return new Promise((resolve, reject) => {
|
|
5655
5589
|
var fulfilled = (value) => {
|
|
@@ -5752,10 +5686,7 @@ var __spreadValues$8 = (a, b) => {
|
|
|
5752
5686
|
}
|
|
5753
5687
|
return a;
|
|
5754
5688
|
};
|
|
5755
|
-
var __publicField$9 = (obj, key, value) =>
|
|
5756
|
-
__defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5757
|
-
return value;
|
|
5758
|
-
};
|
|
5689
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5759
5690
|
class IdentifyItem {
|
|
5760
5691
|
constructor(options) {
|
|
5761
5692
|
__publicField$9(this, "id");
|
|
@@ -5958,8 +5889,7 @@ function featureLayerIdentify(options) {
|
|
|
5958
5889
|
}
|
|
5959
5890
|
function convertGeomToWKT(geom) {
|
|
5960
5891
|
const coordinates = getPolygonCoordinates(geom);
|
|
5961
|
-
if (!coordinates)
|
|
5962
|
-
return null;
|
|
5892
|
+
if (!coordinates) return null;
|
|
5963
5893
|
const polygonStr = coordinates.map(([lng, lat]) => {
|
|
5964
5894
|
const [x, y] = degrees2meters(lng, lat);
|
|
5965
5895
|
return `${x} ${y}`;
|
|
@@ -6648,8 +6578,7 @@ const array = (args) => {
|
|
|
6648
6578
|
return value;
|
|
6649
6579
|
};
|
|
6650
6580
|
function typeOfValue(value) {
|
|
6651
|
-
if (value === null)
|
|
6652
|
-
return "null";
|
|
6581
|
+
if (value === null) return "null";
|
|
6653
6582
|
switch (typeof value) {
|
|
6654
6583
|
case "string":
|
|
6655
6584
|
return "string";
|
|
@@ -6920,10 +6849,7 @@ function preparePaint({
|
|
|
6920
6849
|
|
|
6921
6850
|
var __defProp$a = Object.defineProperty;
|
|
6922
6851
|
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6923
|
-
var __publicField$8 = (obj, key, value) =>
|
|
6924
|
-
__defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6925
|
-
return value;
|
|
6926
|
-
};
|
|
6852
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6927
6853
|
class KeyCodes {
|
|
6928
6854
|
constructor() {
|
|
6929
6855
|
__publicField$8(this, "backspace", 8);
|
|
@@ -7002,10 +6928,7 @@ class KeyCodes {
|
|
|
7002
6928
|
|
|
7003
6929
|
var __defProp$9 = Object.defineProperty;
|
|
7004
6930
|
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7005
|
-
var __publicField$7 = (obj, key, value) =>
|
|
7006
|
-
__defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7007
|
-
return value;
|
|
7008
|
-
};
|
|
6931
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7009
6932
|
class Keys {
|
|
7010
6933
|
constructor() {
|
|
7011
6934
|
__publicField$7(this, "keyCodeAlias", new KeyCodes());
|
|
@@ -7053,10 +6976,7 @@ class Keys {
|
|
|
7053
6976
|
|
|
7054
6977
|
var __defProp$8 = Object.defineProperty;
|
|
7055
6978
|
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7056
|
-
var __publicField$6 = (obj, key, value) =>
|
|
7057
|
-
__defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7058
|
-
return value;
|
|
7059
|
-
};
|
|
6979
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7060
6980
|
class StateItem {
|
|
7061
6981
|
constructor(webMap, opt) {
|
|
7062
6982
|
this.webMap = webMap;
|
|
@@ -7085,10 +7005,7 @@ class StateItem {
|
|
|
7085
7005
|
|
|
7086
7006
|
var __defProp$7 = Object.defineProperty;
|
|
7087
7007
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7088
|
-
var __publicField$5 = (obj, key, value) =>
|
|
7089
|
-
__defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7090
|
-
return value;
|
|
7091
|
-
};
|
|
7008
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7092
7009
|
class CenterState extends StateItem {
|
|
7093
7010
|
constructor() {
|
|
7094
7011
|
super(...arguments);
|
|
@@ -7113,10 +7030,7 @@ class CenterState extends StateItem {
|
|
|
7113
7030
|
|
|
7114
7031
|
var __defProp$6 = Object.defineProperty;
|
|
7115
7032
|
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7116
|
-
var __publicField$4 = (obj, key, value) =>
|
|
7117
|
-
__defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7118
|
-
return value;
|
|
7119
|
-
};
|
|
7033
|
+
var __publicField$4 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7120
7034
|
class ZoomState extends StateItem {
|
|
7121
7035
|
constructor() {
|
|
7122
7036
|
super(...arguments);
|
|
@@ -7146,10 +7060,7 @@ function clearObject(obj) {
|
|
|
7146
7060
|
|
|
7147
7061
|
var __defProp$5 = Object.defineProperty;
|
|
7148
7062
|
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7149
|
-
var __publicField$3 = (obj, key, value) =>
|
|
7150
|
-
__defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7151
|
-
return value;
|
|
7152
|
-
};
|
|
7063
|
+
var __publicField$3 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7153
7064
|
var __async$6 = (__this, __arguments, generator) => {
|
|
7154
7065
|
return new Promise((resolve, reject) => {
|
|
7155
7066
|
var fulfilled = (value) => {
|
|
@@ -7766,10 +7677,7 @@ var __spreadValues$3 = (a, b) => {
|
|
|
7766
7677
|
return a;
|
|
7767
7678
|
};
|
|
7768
7679
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
7769
|
-
var __publicField$2 = (obj, key, value) =>
|
|
7770
|
-
__defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7771
|
-
return value;
|
|
7772
|
-
};
|
|
7680
|
+
var __publicField$2 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7773
7681
|
var __async$5 = (__this, __arguments, generator) => {
|
|
7774
7682
|
return new Promise((resolve, reject) => {
|
|
7775
7683
|
var fulfilled = (value) => {
|
|
@@ -8715,10 +8623,7 @@ function createToggleControl(createButtonControl, options) {
|
|
|
8715
8623
|
|
|
8716
8624
|
var __defProp$3 = Object.defineProperty;
|
|
8717
8625
|
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8718
|
-
var __publicField$1 = (obj, key, value) =>
|
|
8719
|
-
__defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8720
|
-
return value;
|
|
8721
|
-
};
|
|
8626
|
+
var __publicField$1 = (obj, key, value) => __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8722
8627
|
var __async$4 = (__this, __arguments, generator) => {
|
|
8723
8628
|
return new Promise((resolve, reject) => {
|
|
8724
8629
|
var fulfilled = (value) => {
|
|
@@ -8917,9 +8822,7 @@ function setWebMap(id, webMap) {
|
|
|
8917
8822
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
8918
8823
|
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
8919
8824
|
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
8920
|
-
var __knownSymbol = (name, symbol) =>
|
|
8921
|
-
return (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
8922
|
-
};
|
|
8825
|
+
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
8923
8826
|
var __objRest = (source, exclude) => {
|
|
8924
8827
|
var target = {};
|
|
8925
8828
|
for (var prop in source)
|
|
@@ -9212,10 +9115,7 @@ var __spreadValues = (a, b) => {
|
|
|
9212
9115
|
return a;
|
|
9213
9116
|
};
|
|
9214
9117
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
9215
|
-
var __publicField = (obj, key, value) =>
|
|
9216
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9217
|
-
return value;
|
|
9218
|
-
};
|
|
9118
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9219
9119
|
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
|
|
9220
9120
|
var __async$1 = (__this, __arguments, generator) => {
|
|
9221
9121
|
return new Promise((resolve, reject) => {
|
|
@@ -9622,10 +9522,32 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
9622
9522
|
return;
|
|
9623
9523
|
}
|
|
9624
9524
|
const radius = getIdentifyRadius(center, zoom, pixelRadius);
|
|
9525
|
+
let geom;
|
|
9526
|
+
if (this.options.highlightIdentification) {
|
|
9527
|
+
const highlightOptions = this.options.highlightIdentification;
|
|
9528
|
+
const highlightDuration = typeof highlightOptions === "number" ? highlightOptions : 1e3;
|
|
9529
|
+
const [lng, lat] = ev.lngLat;
|
|
9530
|
+
geom = {
|
|
9531
|
+
type: "Polygon",
|
|
9532
|
+
coordinates: [getCirclePolygonCoordinates(lng, lat, radius)]
|
|
9533
|
+
};
|
|
9534
|
+
const highlightIdentificationLayer = yield this.addGeoJsonLayer({
|
|
9535
|
+
data: {
|
|
9536
|
+
type: "Feature",
|
|
9537
|
+
geometry: geom
|
|
9538
|
+
}
|
|
9539
|
+
});
|
|
9540
|
+
if (highlightDuration !== Infinity) {
|
|
9541
|
+
setTimeout(() => {
|
|
9542
|
+
this.removeLayer(highlightIdentificationLayer);
|
|
9543
|
+
}, highlightDuration);
|
|
9544
|
+
}
|
|
9545
|
+
}
|
|
9625
9546
|
const selectPromise = sendIdentifyRequest(ev, {
|
|
9626
9547
|
layers: ids,
|
|
9627
9548
|
connector: this.connector,
|
|
9628
|
-
radius
|
|
9549
|
+
radius,
|
|
9550
|
+
geom
|
|
9629
9551
|
}).then((resp) => {
|
|
9630
9552
|
const identify = __spreadProps(__spreadValues({}, resp), {
|
|
9631
9553
|
resources: ids,
|