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