@nextgis/ngw-map 2.1.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +139 -181
- 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 +139 -181
- 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
package/lib/ngw-map.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 2.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 2.3.0; author: NextGIS */
|
|
2
2
|
var NgwMap = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -476,10 +476,7 @@ var NgwMap = (function (exports) {
|
|
|
476
476
|
|
|
477
477
|
var __defProp$N = Object.defineProperty;
|
|
478
478
|
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
479
|
-
var __publicField$z = (obj, key, value) =>
|
|
480
|
-
__defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
481
|
-
return value;
|
|
482
|
-
};
|
|
479
|
+
var __publicField$z = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
483
480
|
class CancelError extends Error {
|
|
484
481
|
constructor() {
|
|
485
482
|
super();
|
|
@@ -490,10 +487,7 @@ var NgwMap = (function (exports) {
|
|
|
490
487
|
|
|
491
488
|
var __defProp$M = Object.defineProperty;
|
|
492
489
|
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
493
|
-
var __publicField$y = (obj, key, value) =>
|
|
494
|
-
__defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
495
|
-
return value;
|
|
496
|
-
};
|
|
490
|
+
var __publicField$y = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
497
491
|
class PromiseControl {
|
|
498
492
|
constructor(options = {}) {
|
|
499
493
|
this.options = options;
|
|
@@ -575,10 +569,7 @@ var NgwMap = (function (exports) {
|
|
|
575
569
|
|
|
576
570
|
var __defProp$L = Object.defineProperty;
|
|
577
571
|
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
578
|
-
var __publicField$x = (obj, key, value) =>
|
|
579
|
-
__defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
580
|
-
return value;
|
|
581
|
-
};
|
|
572
|
+
var __publicField$x = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
582
573
|
class TimeoutError extends Error {
|
|
583
574
|
constructor() {
|
|
584
575
|
super();
|
|
@@ -589,10 +580,7 @@ var NgwMap = (function (exports) {
|
|
|
589
580
|
|
|
590
581
|
var __defProp$K = Object.defineProperty;
|
|
591
582
|
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
592
|
-
var __publicField$w = (obj, key, value) =>
|
|
593
|
-
__defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
594
|
-
return value;
|
|
595
|
-
};
|
|
583
|
+
var __publicField$w = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
596
584
|
var _a;
|
|
597
585
|
const handleCallback = (resolve, reject, callback, r) => {
|
|
598
586
|
try {
|
|
@@ -602,6 +590,7 @@ var NgwMap = (function (exports) {
|
|
|
602
590
|
}
|
|
603
591
|
};
|
|
604
592
|
let ID$3 = 0;
|
|
593
|
+
_a = Symbol.toStringTag;
|
|
605
594
|
const _CancelablePromise = class _CancelablePromise {
|
|
606
595
|
constructor(executor, timeout) {
|
|
607
596
|
// @ts-ignore
|
|
@@ -781,7 +770,6 @@ var NgwMap = (function (exports) {
|
|
|
781
770
|
this._promise = void 0;
|
|
782
771
|
}
|
|
783
772
|
};
|
|
784
|
-
_a = Symbol.toStringTag;
|
|
785
773
|
__publicField$w(_CancelablePromise, "CancelError", CancelError);
|
|
786
774
|
__publicField$w(_CancelablePromise, "TimeoutError", TimeoutError);
|
|
787
775
|
__publicField$w(_CancelablePromise, "PromiseControl", PromiseControl);
|
|
@@ -1053,21 +1041,43 @@ var NgwMap = (function (exports) {
|
|
|
1053
1041
|
return radius;
|
|
1054
1042
|
}
|
|
1055
1043
|
|
|
1044
|
+
function checkExtent(extent) {
|
|
1045
|
+
const [minLon, minLat, maxLon, maxLat] = extent;
|
|
1046
|
+
const isOrderValid = minLon < maxLon && minLat < maxLat;
|
|
1047
|
+
if (!isOrderValid) {
|
|
1048
|
+
console.log("Error: The extent coordinates are not in the correct order.");
|
|
1049
|
+
console.log(
|
|
1050
|
+
`Received extent: [${minLon}, ${minLat}, ${maxLon}, ${maxLat}]`
|
|
1051
|
+
);
|
|
1052
|
+
const correctedExtent = [
|
|
1053
|
+
Math.min(minLon, maxLon),
|
|
1054
|
+
Math.min(minLat, maxLat),
|
|
1055
|
+
Math.max(minLon, maxLon),
|
|
1056
|
+
Math.max(maxLat, minLat)
|
|
1057
|
+
];
|
|
1058
|
+
console.log(`Expected order: [${correctedExtent.join(", ")}]`);
|
|
1059
|
+
}
|
|
1060
|
+
const isValidLon = minLon >= -180 && maxLon <= 180;
|
|
1061
|
+
const isValidLat = minLat >= -90 && maxLat <= 90;
|
|
1062
|
+
if (!isValidLon || !isValidLat) {
|
|
1063
|
+
console.log(
|
|
1064
|
+
"Warning: The coordinates may not be within valid geographic ranges."
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
return isOrderValid && isValidLon && isValidLat;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1056
1070
|
function isEqual(a, b, o, p) {
|
|
1057
1071
|
if (a instanceof Array) {
|
|
1058
|
-
if (!(b instanceof Array))
|
|
1059
|
-
return false;
|
|
1072
|
+
if (!(b instanceof Array)) return false;
|
|
1060
1073
|
return b.sort().join("") === a.sort().join("");
|
|
1061
1074
|
} else if (a instanceof Date) {
|
|
1062
|
-
if (!(b instanceof Date))
|
|
1063
|
-
return false;
|
|
1075
|
+
if (!(b instanceof Date)) return false;
|
|
1064
1076
|
return "" + a === "" + b;
|
|
1065
1077
|
} else if (a instanceof Function) {
|
|
1066
|
-
if (!(b instanceof Function))
|
|
1067
|
-
return false;
|
|
1078
|
+
if (!(b instanceof Function)) return false;
|
|
1068
1079
|
} else if (a instanceof Object) {
|
|
1069
|
-
if (!(b instanceof Object))
|
|
1070
|
-
return false;
|
|
1080
|
+
if (!(b instanceof Object)) return false;
|
|
1071
1081
|
if (a === o) {
|
|
1072
1082
|
return b === p;
|
|
1073
1083
|
} else {
|
|
@@ -1079,10 +1089,8 @@ var NgwMap = (function (exports) {
|
|
|
1079
1089
|
function objectDeepEqual(o, p) {
|
|
1080
1090
|
const keysO = Object.keys(o).sort();
|
|
1081
1091
|
const keysP = Object.keys(p).sort();
|
|
1082
|
-
if (keysO.length !== keysP.length)
|
|
1083
|
-
|
|
1084
|
-
if (keysO.join("") !== keysP.join(""))
|
|
1085
|
-
return false;
|
|
1092
|
+
if (keysO.length !== keysP.length) return false;
|
|
1093
|
+
if (keysO.join("") !== keysP.join("")) return false;
|
|
1086
1094
|
for (let i = 0; i < keysO.length; i++) {
|
|
1087
1095
|
const oVal = o[keysO[i]];
|
|
1088
1096
|
const pVal = p[keysP[i]];
|
|
@@ -1123,10 +1131,7 @@ var NgwMap = (function (exports) {
|
|
|
1123
1131
|
|
|
1124
1132
|
var __defProp$J = Object.defineProperty;
|
|
1125
1133
|
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1126
|
-
var __publicField$v = (obj, key, value) =>
|
|
1127
|
-
__defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1128
|
-
return value;
|
|
1129
|
-
};
|
|
1134
|
+
var __publicField$v = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1130
1135
|
const _Cache = class _Cache {
|
|
1131
1136
|
constructor(options = {}) {
|
|
1132
1137
|
__publicField$v(this, "cache", []);
|
|
@@ -1253,10 +1258,7 @@ var NgwMap = (function (exports) {
|
|
|
1253
1258
|
|
|
1254
1259
|
var __defProp$I = Object.defineProperty;
|
|
1255
1260
|
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1256
|
-
var __publicField$u = (obj, key, value) =>
|
|
1257
|
-
__defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1258
|
-
return value;
|
|
1259
|
-
};
|
|
1261
|
+
var __publicField$u = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1260
1262
|
class NgwError extends Error {
|
|
1261
1263
|
constructor(er) {
|
|
1262
1264
|
super();
|
|
@@ -1275,10 +1277,7 @@ var NgwMap = (function (exports) {
|
|
|
1275
1277
|
|
|
1276
1278
|
var __defProp$H = Object.defineProperty;
|
|
1277
1279
|
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1278
|
-
var __publicField$t = (obj, key, value) =>
|
|
1279
|
-
__defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1280
|
-
return value;
|
|
1281
|
-
};
|
|
1280
|
+
var __publicField$t = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1282
1281
|
class ResourceNotFoundError extends NgwError {
|
|
1283
1282
|
constructor(obj) {
|
|
1284
1283
|
super(obj);
|
|
@@ -1336,10 +1335,7 @@ var NgwMap = (function (exports) {
|
|
|
1336
1335
|
return a;
|
|
1337
1336
|
};
|
|
1338
1337
|
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
1339
|
-
var __publicField$s = (obj, key, value) =>
|
|
1340
|
-
__defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1341
|
-
return value;
|
|
1342
|
-
};
|
|
1338
|
+
var __publicField$s = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1343
1339
|
var __async$l = (__this, __arguments, generator) => {
|
|
1344
1340
|
return new Promise((resolve, reject) => {
|
|
1345
1341
|
var fulfilled = (value) => {
|
|
@@ -1361,9 +1357,14 @@ var NgwMap = (function (exports) {
|
|
|
1361
1357
|
});
|
|
1362
1358
|
};
|
|
1363
1359
|
class ResourcesControl {
|
|
1364
|
-
constructor(
|
|
1360
|
+
constructor({
|
|
1361
|
+
connector,
|
|
1362
|
+
cacheId
|
|
1363
|
+
}) {
|
|
1364
|
+
__publicField$s(this, "cache");
|
|
1365
|
+
__publicField$s(this, "connector");
|
|
1365
1366
|
this.connector = connector;
|
|
1366
|
-
|
|
1367
|
+
this.cache = new Cache({ namespace: cacheId });
|
|
1367
1368
|
}
|
|
1368
1369
|
// -------------------------------------------------------------------------
|
|
1369
1370
|
// Resource Methods
|
|
@@ -1376,7 +1377,7 @@ var NgwMap = (function (exports) {
|
|
|
1376
1377
|
* Fetching resource would be cached to speed up next call
|
|
1377
1378
|
*/
|
|
1378
1379
|
getOne(resource, requestOptions) {
|
|
1379
|
-
const cache =
|
|
1380
|
+
const cache = this.cache;
|
|
1380
1381
|
const forCache = {};
|
|
1381
1382
|
const opt = __spreadProps$d(__spreadValues$t({}, requestOptions), { cache: false });
|
|
1382
1383
|
if (typeof resource === "string") {
|
|
@@ -1627,10 +1628,7 @@ var NgwMap = (function (exports) {
|
|
|
1627
1628
|
|
|
1628
1629
|
var __defProp$F = Object.defineProperty;
|
|
1629
1630
|
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1630
|
-
var __publicField$r = (obj, key, value) =>
|
|
1631
|
-
__defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1632
|
-
return value;
|
|
1633
|
-
};
|
|
1631
|
+
var __publicField$r = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1634
1632
|
class InsufficientPermissionsError extends NgwError {
|
|
1635
1633
|
constructor(obj) {
|
|
1636
1634
|
super(obj);
|
|
@@ -1710,10 +1708,7 @@ var NgwMap = (function (exports) {
|
|
|
1710
1708
|
|
|
1711
1709
|
var __defProp$E = Object.defineProperty;
|
|
1712
1710
|
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1713
|
-
var __publicField$q = (obj, key, value) =>
|
|
1714
|
-
__defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1715
|
-
return value;
|
|
1716
|
-
};
|
|
1711
|
+
var __publicField$q = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1717
1712
|
class NetworkError extends Error {
|
|
1718
1713
|
constructor(url) {
|
|
1719
1714
|
super();
|
|
@@ -1822,10 +1817,7 @@ var NgwMap = (function (exports) {
|
|
|
1822
1817
|
}
|
|
1823
1818
|
return a;
|
|
1824
1819
|
};
|
|
1825
|
-
var __publicField$p = (obj, key, value) =>
|
|
1826
|
-
__defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1827
|
-
return value;
|
|
1828
|
-
};
|
|
1820
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1829
1821
|
let ID$2 = 0;
|
|
1830
1822
|
class NgwConnector {
|
|
1831
1823
|
constructor(options) {
|
|
@@ -1834,10 +1826,12 @@ var NgwMap = (function (exports) {
|
|
|
1834
1826
|
__publicField$p(this, "emitter", new EventEmitter());
|
|
1835
1827
|
__publicField$p(this, "user");
|
|
1836
1828
|
__publicField$p(this, "resources");
|
|
1829
|
+
__publicField$p(this, "cache");
|
|
1837
1830
|
__publicField$p(this, "routeStr", "/api/component/pyramid/route");
|
|
1838
1831
|
__publicField$p(this, "activeRequests", []);
|
|
1839
1832
|
__publicField$p(this, "requestTransform");
|
|
1840
1833
|
const exist = findConnector(options);
|
|
1834
|
+
this.cache = new Cache({ namespace: options.cacheId });
|
|
1841
1835
|
if (exist) {
|
|
1842
1836
|
return exist;
|
|
1843
1837
|
} else {
|
|
@@ -1847,13 +1841,23 @@ var NgwMap = (function (exports) {
|
|
|
1847
1841
|
if (this.options.requestTransform) {
|
|
1848
1842
|
this.requestTransform = this.options.requestTransform;
|
|
1849
1843
|
}
|
|
1850
|
-
this.resources = new ResourcesControl(
|
|
1844
|
+
this.resources = new ResourcesControl({
|
|
1845
|
+
connector: this,
|
|
1846
|
+
cacheId: options.cacheId
|
|
1847
|
+
});
|
|
1851
1848
|
addConnector(this);
|
|
1852
1849
|
}
|
|
1853
1850
|
}
|
|
1854
1851
|
static create(options) {
|
|
1855
1852
|
return new this(options);
|
|
1856
1853
|
}
|
|
1854
|
+
/**
|
|
1855
|
+
* Clear the cache.
|
|
1856
|
+
*/
|
|
1857
|
+
clearCache() {
|
|
1858
|
+
this.cache.clean();
|
|
1859
|
+
this.resources.cache.clean();
|
|
1860
|
+
}
|
|
1857
1861
|
setRequestTransform(requestTransform) {
|
|
1858
1862
|
this.requestTransform = requestTransform;
|
|
1859
1863
|
}
|
|
@@ -1881,7 +1885,6 @@ var NgwMap = (function (exports) {
|
|
|
1881
1885
|
* ```
|
|
1882
1886
|
*/
|
|
1883
1887
|
connect() {
|
|
1884
|
-
const cache = new Cache();
|
|
1885
1888
|
const auth = this.options.auth;
|
|
1886
1889
|
const makeConnect = () => new CancelablePromise((resolve, reject) => {
|
|
1887
1890
|
const makeQuery = () => {
|
|
@@ -1901,7 +1904,7 @@ var NgwMap = (function (exports) {
|
|
|
1901
1904
|
}
|
|
1902
1905
|
return makeQuery();
|
|
1903
1906
|
});
|
|
1904
|
-
return cache.add("route", makeConnect, {
|
|
1907
|
+
return this.cache.add("route", makeConnect, {
|
|
1905
1908
|
id: this.id,
|
|
1906
1909
|
auth,
|
|
1907
1910
|
baseUrl: this.options.baseUrl
|
|
@@ -1924,8 +1927,8 @@ var NgwMap = (function (exports) {
|
|
|
1924
1927
|
removeConnector(this);
|
|
1925
1928
|
this.options.auth = void 0;
|
|
1926
1929
|
this.user = void 0;
|
|
1930
|
+
this.clearCache();
|
|
1927
1931
|
this.emitter.emit("logout");
|
|
1928
|
-
this.resources.cache.clean();
|
|
1929
1932
|
}
|
|
1930
1933
|
getUserInfo(credentials, options) {
|
|
1931
1934
|
if (this.user && this.user.id) {
|
|
@@ -2010,8 +2013,7 @@ var NgwMap = (function (exports) {
|
|
|
2010
2013
|
const params = objectRemoveEmpty(params_);
|
|
2011
2014
|
const makeApiRequest = () => apiRequest({ name, params, requestOptions, connector: this });
|
|
2012
2015
|
if (requestOptions.cache && method === "GET") {
|
|
2013
|
-
|
|
2014
|
-
return cache.add(name, makeApiRequest, __spreadValues$s({
|
|
2016
|
+
return this.cache.add(name, makeApiRequest, __spreadValues$s({
|
|
2015
2017
|
params
|
|
2016
2018
|
}, objectRemoveEmpty({
|
|
2017
2019
|
headers,
|
|
@@ -2297,10 +2299,8 @@ var NgwMap = (function (exports) {
|
|
|
2297
2299
|
function like(b, a, iLike) {
|
|
2298
2300
|
a = String(a);
|
|
2299
2301
|
b = String(b);
|
|
2300
|
-
if (a === b)
|
|
2301
|
-
|
|
2302
|
-
if (iLike && a.toUpperCase() === b.toUpperCase())
|
|
2303
|
-
return true;
|
|
2302
|
+
if (a === b) return true;
|
|
2303
|
+
if (iLike && a.toUpperCase() === b.toUpperCase()) return true;
|
|
2304
2304
|
const re = `^${reEscape(a)}$`.replace(/%/g, ".*").replace("_", ".");
|
|
2305
2305
|
return new RegExp(re, iLike ? "i" : "").exec(b) !== null;
|
|
2306
2306
|
}
|
|
@@ -2623,10 +2623,7 @@ var NgwMap = (function (exports) {
|
|
|
2623
2623
|
|
|
2624
2624
|
var __defProp$z = Object.defineProperty;
|
|
2625
2625
|
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2626
|
-
var __publicField$o = (obj, key, value) =>
|
|
2627
|
-
__defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2628
|
-
return value;
|
|
2629
|
-
};
|
|
2626
|
+
var __publicField$o = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2630
2627
|
class BookmarkItem {
|
|
2631
2628
|
constructor(options) {
|
|
2632
2629
|
this.options = options;
|
|
@@ -2790,10 +2787,7 @@ var NgwMap = (function (exports) {
|
|
|
2790
2787
|
|
|
2791
2788
|
var __defProp$y = Object.defineProperty;
|
|
2792
2789
|
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2793
|
-
var __publicField$n = (obj, key, value) =>
|
|
2794
|
-
__defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2795
|
-
return value;
|
|
2796
|
-
};
|
|
2790
|
+
var __publicField$n = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2797
2791
|
class TreeHelper {
|
|
2798
2792
|
constructor(item) {
|
|
2799
2793
|
__publicField$n(this, "item");
|
|
@@ -2863,10 +2857,7 @@ var NgwMap = (function (exports) {
|
|
|
2863
2857
|
|
|
2864
2858
|
var __defProp$x = Object.defineProperty;
|
|
2865
2859
|
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2866
|
-
var __publicField$m = (obj, key, value) =>
|
|
2867
|
-
__defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2868
|
-
return value;
|
|
2869
|
-
};
|
|
2860
|
+
var __publicField$m = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2870
2861
|
class BaseProperty {
|
|
2871
2862
|
constructor(name, item, options) {
|
|
2872
2863
|
__publicField$m(this, "options");
|
|
@@ -2989,10 +2980,7 @@ var NgwMap = (function (exports) {
|
|
|
2989
2980
|
}
|
|
2990
2981
|
return a;
|
|
2991
2982
|
};
|
|
2992
|
-
var __publicField$l = (obj, key, value) =>
|
|
2993
|
-
__defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2994
|
-
return value;
|
|
2995
|
-
};
|
|
2983
|
+
var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2996
2984
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
2997
2985
|
constructor(name, item, options) {
|
|
2998
2986
|
super(name, item, __spreadValues$o(__spreadValues$o({}, _CheckProperty.options), options));
|
|
@@ -3125,10 +3113,7 @@ var NgwMap = (function (exports) {
|
|
|
3125
3113
|
}
|
|
3126
3114
|
return a;
|
|
3127
3115
|
};
|
|
3128
|
-
var __publicField$k = (obj, key, value) =>
|
|
3129
|
-
__defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3130
|
-
return value;
|
|
3131
|
-
};
|
|
3116
|
+
var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3132
3117
|
const BOOLEAN_TYPE = "boolean";
|
|
3133
3118
|
const STRING_TYPE = "string";
|
|
3134
3119
|
const _ItemProperties = class _ItemProperties {
|
|
@@ -3220,10 +3205,7 @@ var NgwMap = (function (exports) {
|
|
|
3220
3205
|
}
|
|
3221
3206
|
return a;
|
|
3222
3207
|
};
|
|
3223
|
-
var __publicField$j = (obj, key, value) =>
|
|
3224
|
-
__defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3225
|
-
return value;
|
|
3226
|
-
};
|
|
3208
|
+
var __publicField$j = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3227
3209
|
let ID$1 = 0;
|
|
3228
3210
|
class Item {
|
|
3229
3211
|
constructor(options) {
|
|
@@ -3382,10 +3364,7 @@ var NgwMap = (function (exports) {
|
|
|
3382
3364
|
|
|
3383
3365
|
var __defProp$s = Object.defineProperty;
|
|
3384
3366
|
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3385
|
-
var __publicField$i = (obj, key, value) =>
|
|
3386
|
-
__defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3387
|
-
return value;
|
|
3388
|
-
};
|
|
3367
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3389
3368
|
var __async$k = (__this, __arguments, generator) => {
|
|
3390
3369
|
return new Promise((resolve, reject) => {
|
|
3391
3370
|
var fulfilled = (value) => {
|
|
@@ -3557,10 +3536,7 @@ var NgwMap = (function (exports) {
|
|
|
3557
3536
|
}
|
|
3558
3537
|
return target;
|
|
3559
3538
|
};
|
|
3560
|
-
var __publicField$h = (obj, key, value) =>
|
|
3561
|
-
__defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3562
|
-
return value;
|
|
3563
|
-
};
|
|
3539
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3564
3540
|
var __async$i = (__this, __arguments, generator) => {
|
|
3565
3541
|
return new Promise((resolve, reject) => {
|
|
3566
3542
|
var fulfilled = (value) => {
|
|
@@ -3673,10 +3649,7 @@ var NgwMap = (function (exports) {
|
|
|
3673
3649
|
}
|
|
3674
3650
|
return a;
|
|
3675
3651
|
};
|
|
3676
|
-
var __publicField$g = (obj, key, value) =>
|
|
3677
|
-
__defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3678
|
-
return value;
|
|
3679
|
-
};
|
|
3652
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3680
3653
|
class QmsKit {
|
|
3681
3654
|
constructor(options) {
|
|
3682
3655
|
__publicField$g(this, "options", {
|
|
@@ -3962,10 +3935,7 @@ var NgwMap = (function (exports) {
|
|
|
3962
3935
|
return a;
|
|
3963
3936
|
};
|
|
3964
3937
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
3965
|
-
var __publicField$f = (obj, key, value) =>
|
|
3966
|
-
__defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3967
|
-
return value;
|
|
3968
|
-
};
|
|
3938
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3969
3939
|
var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
|
|
3970
3940
|
var __async$g = (__this, __arguments, generator) => {
|
|
3971
3941
|
return new Promise((resolve, reject) => {
|
|
@@ -4398,10 +4368,7 @@ var NgwMap = (function (exports) {
|
|
|
4398
4368
|
return a;
|
|
4399
4369
|
};
|
|
4400
4370
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
4401
|
-
var __publicField$e = (obj, key, value) =>
|
|
4402
|
-
__defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4403
|
-
return value;
|
|
4404
|
-
};
|
|
4371
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$m(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4405
4372
|
var __async$e = (__this, __arguments, generator) => {
|
|
4406
4373
|
return new Promise((resolve, reject) => {
|
|
4407
4374
|
var fulfilled = (value) => {
|
|
@@ -4791,10 +4758,7 @@ var NgwMap = (function (exports) {
|
|
|
4791
4758
|
}
|
|
4792
4759
|
return a;
|
|
4793
4760
|
};
|
|
4794
|
-
var __publicField$d = (obj, key, value) =>
|
|
4795
|
-
__defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4796
|
-
return value;
|
|
4797
|
-
};
|
|
4761
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4798
4762
|
var __async$c = (__this, __arguments, generator) => {
|
|
4799
4763
|
return new Promise((resolve, reject) => {
|
|
4800
4764
|
var fulfilled = (value) => {
|
|
@@ -5072,10 +5036,7 @@ var NgwMap = (function (exports) {
|
|
|
5072
5036
|
}
|
|
5073
5037
|
return a;
|
|
5074
5038
|
};
|
|
5075
|
-
var __publicField$c = (obj, key, value) =>
|
|
5076
|
-
__defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5077
|
-
return value;
|
|
5078
|
-
};
|
|
5039
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5079
5040
|
var __async$b = (__this, __arguments, generator) => {
|
|
5080
5041
|
return new Promise((resolve, reject) => {
|
|
5081
5042
|
var fulfilled = (value) => {
|
|
@@ -5252,10 +5213,7 @@ var NgwMap = (function (exports) {
|
|
|
5252
5213
|
}
|
|
5253
5214
|
return a;
|
|
5254
5215
|
};
|
|
5255
|
-
var __publicField$b = (obj, key, value) =>
|
|
5256
|
-
__defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5257
|
-
return value;
|
|
5258
|
-
};
|
|
5216
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5259
5217
|
var __async$9 = (__this, __arguments, generator) => {
|
|
5260
5218
|
return new Promise((resolve, reject) => {
|
|
5261
5219
|
var fulfilled = (value) => {
|
|
@@ -5321,8 +5279,7 @@ var NgwMap = (function (exports) {
|
|
|
5321
5279
|
removeLayer() {
|
|
5322
5280
|
const mapAdapter = this.options.webMap.mapAdapter;
|
|
5323
5281
|
this.getDependLayers().forEach((x) => {
|
|
5324
|
-
if (!("layer" in x))
|
|
5325
|
-
return;
|
|
5282
|
+
if (!("layer" in x)) return;
|
|
5326
5283
|
mapAdapter.removeLayer(x.layer.layer);
|
|
5327
5284
|
});
|
|
5328
5285
|
if (this._webmapBaselayersIds.length) {
|
|
@@ -5623,10 +5580,7 @@ var NgwMap = (function (exports) {
|
|
|
5623
5580
|
}
|
|
5624
5581
|
return a;
|
|
5625
5582
|
};
|
|
5626
|
-
var __publicField$a = (obj, key, value) =>
|
|
5627
|
-
__defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5628
|
-
return value;
|
|
5629
|
-
};
|
|
5583
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5630
5584
|
var __async$8 = (__this, __arguments, generator) => {
|
|
5631
5585
|
return new Promise((resolve, reject) => {
|
|
5632
5586
|
var fulfilled = (value) => {
|
|
@@ -5729,10 +5683,7 @@ var NgwMap = (function (exports) {
|
|
|
5729
5683
|
}
|
|
5730
5684
|
return a;
|
|
5731
5685
|
};
|
|
5732
|
-
var __publicField$9 = (obj, key, value) =>
|
|
5733
|
-
__defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5734
|
-
return value;
|
|
5735
|
-
};
|
|
5686
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$f(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5736
5687
|
class IdentifyItem {
|
|
5737
5688
|
constructor(options) {
|
|
5738
5689
|
__publicField$9(this, "id");
|
|
@@ -5935,8 +5886,7 @@ var NgwMap = (function (exports) {
|
|
|
5935
5886
|
}
|
|
5936
5887
|
function convertGeomToWKT(geom) {
|
|
5937
5888
|
const coordinates = getPolygonCoordinates(geom);
|
|
5938
|
-
if (!coordinates)
|
|
5939
|
-
return null;
|
|
5889
|
+
if (!coordinates) return null;
|
|
5940
5890
|
const polygonStr = coordinates.map(([lng, lat]) => {
|
|
5941
5891
|
const [x, y] = degrees2meters(lng, lat);
|
|
5942
5892
|
return `${x} ${y}`;
|
|
@@ -6625,8 +6575,7 @@ var NgwMap = (function (exports) {
|
|
|
6625
6575
|
return value;
|
|
6626
6576
|
};
|
|
6627
6577
|
function typeOfValue(value) {
|
|
6628
|
-
if (value === null)
|
|
6629
|
-
return "null";
|
|
6578
|
+
if (value === null) return "null";
|
|
6630
6579
|
switch (typeof value) {
|
|
6631
6580
|
case "string":
|
|
6632
6581
|
return "string";
|
|
@@ -6897,10 +6846,7 @@ var NgwMap = (function (exports) {
|
|
|
6897
6846
|
|
|
6898
6847
|
var __defProp$a = Object.defineProperty;
|
|
6899
6848
|
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6900
|
-
var __publicField$8 = (obj, key, value) =>
|
|
6901
|
-
__defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6902
|
-
return value;
|
|
6903
|
-
};
|
|
6849
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6904
6850
|
class KeyCodes {
|
|
6905
6851
|
constructor() {
|
|
6906
6852
|
__publicField$8(this, "backspace", 8);
|
|
@@ -6979,10 +6925,7 @@ var NgwMap = (function (exports) {
|
|
|
6979
6925
|
|
|
6980
6926
|
var __defProp$9 = Object.defineProperty;
|
|
6981
6927
|
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6982
|
-
var __publicField$7 = (obj, key, value) =>
|
|
6983
|
-
__defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6984
|
-
return value;
|
|
6985
|
-
};
|
|
6928
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6986
6929
|
class Keys {
|
|
6987
6930
|
constructor() {
|
|
6988
6931
|
__publicField$7(this, "keyCodeAlias", new KeyCodes());
|
|
@@ -7030,10 +6973,7 @@ var NgwMap = (function (exports) {
|
|
|
7030
6973
|
|
|
7031
6974
|
var __defProp$8 = Object.defineProperty;
|
|
7032
6975
|
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7033
|
-
var __publicField$6 = (obj, key, value) =>
|
|
7034
|
-
__defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7035
|
-
return value;
|
|
7036
|
-
};
|
|
6976
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7037
6977
|
class StateItem {
|
|
7038
6978
|
constructor(webMap, opt) {
|
|
7039
6979
|
this.webMap = webMap;
|
|
@@ -7062,10 +7002,7 @@ var NgwMap = (function (exports) {
|
|
|
7062
7002
|
|
|
7063
7003
|
var __defProp$7 = Object.defineProperty;
|
|
7064
7004
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7065
|
-
var __publicField$5 = (obj, key, value) =>
|
|
7066
|
-
__defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7067
|
-
return value;
|
|
7068
|
-
};
|
|
7005
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7069
7006
|
class CenterState extends StateItem {
|
|
7070
7007
|
constructor() {
|
|
7071
7008
|
super(...arguments);
|
|
@@ -7090,10 +7027,7 @@ var NgwMap = (function (exports) {
|
|
|
7090
7027
|
|
|
7091
7028
|
var __defProp$6 = Object.defineProperty;
|
|
7092
7029
|
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7093
|
-
var __publicField$4 = (obj, key, value) =>
|
|
7094
|
-
__defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7095
|
-
return value;
|
|
7096
|
-
};
|
|
7030
|
+
var __publicField$4 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7097
7031
|
class ZoomState extends StateItem {
|
|
7098
7032
|
constructor() {
|
|
7099
7033
|
super(...arguments);
|
|
@@ -7123,10 +7057,7 @@ var NgwMap = (function (exports) {
|
|
|
7123
7057
|
|
|
7124
7058
|
var __defProp$5 = Object.defineProperty;
|
|
7125
7059
|
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7126
|
-
var __publicField$3 = (obj, key, value) =>
|
|
7127
|
-
__defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7128
|
-
return value;
|
|
7129
|
-
};
|
|
7060
|
+
var __publicField$3 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7130
7061
|
var __async$6 = (__this, __arguments, generator) => {
|
|
7131
7062
|
return new Promise((resolve, reject) => {
|
|
7132
7063
|
var fulfilled = (value) => {
|
|
@@ -7408,6 +7339,7 @@ var NgwMap = (function (exports) {
|
|
|
7408
7339
|
* ```
|
|
7409
7340
|
*/
|
|
7410
7341
|
fitBounds(bounds, options) {
|
|
7342
|
+
checkExtent(bounds);
|
|
7411
7343
|
if (bounds.every((x) => defined(x))) {
|
|
7412
7344
|
if (bounds[1] < -85.06) {
|
|
7413
7345
|
bounds[1] = -85.06;
|
|
@@ -7742,10 +7674,7 @@ var NgwMap = (function (exports) {
|
|
|
7742
7674
|
return a;
|
|
7743
7675
|
};
|
|
7744
7676
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
7745
|
-
var __publicField$2 = (obj, key, value) =>
|
|
7746
|
-
__defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7747
|
-
return value;
|
|
7748
|
-
};
|
|
7677
|
+
var __publicField$2 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7749
7678
|
var __async$5 = (__this, __arguments, generator) => {
|
|
7750
7679
|
return new Promise((resolve, reject) => {
|
|
7751
7680
|
var fulfilled = (value) => {
|
|
@@ -8525,6 +8454,13 @@ var NgwMap = (function (exports) {
|
|
|
8525
8454
|
return Promise.resolve(options);
|
|
8526
8455
|
});
|
|
8527
8456
|
}
|
|
8457
|
+
_onLayerDoubleClick(options) {
|
|
8458
|
+
return __async$5(this, null, function* () {
|
|
8459
|
+
const id = options.layer.id;
|
|
8460
|
+
this._emitLayerEvent("layer:dblclick", id || "", options);
|
|
8461
|
+
return Promise.resolve(options);
|
|
8462
|
+
});
|
|
8463
|
+
}
|
|
8528
8464
|
_onLayerSelect(options) {
|
|
8529
8465
|
return __async$5(this, null, function* () {
|
|
8530
8466
|
this._emitLayerEvent("layer:select", options.layer.id || "", options);
|
|
@@ -8536,17 +8472,25 @@ var NgwMap = (function (exports) {
|
|
|
8536
8472
|
onSelect,
|
|
8537
8473
|
onLayerSelect,
|
|
8538
8474
|
onClick,
|
|
8475
|
+
onDoubleClick,
|
|
8539
8476
|
onLayerClick,
|
|
8540
8477
|
onMouseOut,
|
|
8541
8478
|
onMouseOver
|
|
8542
8479
|
} = options;
|
|
8543
8480
|
const onLayerClickFromOpt = onClick || onLayerClick;
|
|
8481
|
+
const onLayerDblClickFromOpt = onDoubleClick || onLayerClick;
|
|
8544
8482
|
options.onClick = (e) => {
|
|
8545
8483
|
if (onLayerClickFromOpt) {
|
|
8546
8484
|
onLayerClickFromOpt(e);
|
|
8547
8485
|
}
|
|
8548
8486
|
return this._onLayerClick(e);
|
|
8549
8487
|
};
|
|
8488
|
+
options.onDoubleClick = (e) => {
|
|
8489
|
+
if (onLayerDblClickFromOpt) {
|
|
8490
|
+
onLayerDblClickFromOpt(e);
|
|
8491
|
+
}
|
|
8492
|
+
return this._onLayerDoubleClick(e);
|
|
8493
|
+
};
|
|
8550
8494
|
options.onMouseOut = (e) => {
|
|
8551
8495
|
const id = e.layer.id;
|
|
8552
8496
|
onMouseOut && onMouseOut(e);
|
|
@@ -8676,10 +8620,7 @@ var NgwMap = (function (exports) {
|
|
|
8676
8620
|
|
|
8677
8621
|
var __defProp$3 = Object.defineProperty;
|
|
8678
8622
|
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8679
|
-
var __publicField$1 = (obj, key, value) =>
|
|
8680
|
-
__defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8681
|
-
return value;
|
|
8682
|
-
};
|
|
8623
|
+
var __publicField$1 = (obj, key, value) => __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8683
8624
|
var __async$4 = (__this, __arguments, generator) => {
|
|
8684
8625
|
return new Promise((resolve, reject) => {
|
|
8685
8626
|
var fulfilled = (value) => {
|
|
@@ -8878,9 +8819,7 @@ var NgwMap = (function (exports) {
|
|
|
8878
8819
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
8879
8820
|
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
8880
8821
|
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
8881
|
-
var __knownSymbol = (name, symbol) =>
|
|
8882
|
-
return (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
8883
|
-
};
|
|
8822
|
+
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
8884
8823
|
var __objRest = (source, exclude) => {
|
|
8885
8824
|
var target = {};
|
|
8886
8825
|
for (var prop in source)
|
|
@@ -9173,10 +9112,7 @@ var NgwMap = (function (exports) {
|
|
|
9173
9112
|
return a;
|
|
9174
9113
|
};
|
|
9175
9114
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
9176
|
-
var __publicField = (obj, key, value) =>
|
|
9177
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9178
|
-
return value;
|
|
9179
|
-
};
|
|
9115
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9180
9116
|
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
|
|
9181
9117
|
var __async$1 = (__this, __arguments, generator) => {
|
|
9182
9118
|
return new Promise((resolve, reject) => {
|
|
@@ -9583,10 +9519,32 @@ var NgwMap = (function (exports) {
|
|
|
9583
9519
|
return;
|
|
9584
9520
|
}
|
|
9585
9521
|
const radius = getIdentifyRadius(center, zoom, pixelRadius);
|
|
9522
|
+
let geom;
|
|
9523
|
+
if (this.options.highlightIdentification) {
|
|
9524
|
+
const highlightOptions = this.options.highlightIdentification;
|
|
9525
|
+
const highlightDuration = typeof highlightOptions === "number" ? highlightOptions : 1e3;
|
|
9526
|
+
const [lng, lat] = ev.lngLat;
|
|
9527
|
+
geom = {
|
|
9528
|
+
type: "Polygon",
|
|
9529
|
+
coordinates: [getCirclePolygonCoordinates(lng, lat, radius)]
|
|
9530
|
+
};
|
|
9531
|
+
const highlightIdentificationLayer = yield this.addGeoJsonLayer({
|
|
9532
|
+
data: {
|
|
9533
|
+
type: "Feature",
|
|
9534
|
+
geometry: geom
|
|
9535
|
+
}
|
|
9536
|
+
});
|
|
9537
|
+
if (highlightDuration !== Infinity) {
|
|
9538
|
+
setTimeout(() => {
|
|
9539
|
+
this.removeLayer(highlightIdentificationLayer);
|
|
9540
|
+
}, highlightDuration);
|
|
9541
|
+
}
|
|
9542
|
+
}
|
|
9586
9543
|
const selectPromise = sendIdentifyRequest(ev, {
|
|
9587
9544
|
layers: ids,
|
|
9588
9545
|
connector: this.connector,
|
|
9589
|
-
radius
|
|
9546
|
+
radius,
|
|
9547
|
+
geom
|
|
9590
9548
|
}).then((resp) => {
|
|
9591
9549
|
const identify = __spreadProps(__spreadValues({}, resp), {
|
|
9592
9550
|
resources: ids,
|