@nextgis/ngw-map 3.0.0-alpha.3 → 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/ngw-map.cjs.js +1 -1
- package/lib/ngw-map.esm-browser.js +596 -443
- 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 +596 -443
- 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 +8 -8
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,9 +952,9 @@ 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.
|
|
955
|
+
"@nextgis/cache": "^3.0.0-alpha.4",
|
|
956
956
|
"@nextgis/cancelable-promise": "^3.0.0-alpha.3",
|
|
957
|
-
"@nextgis/utils": "^3.0.0-alpha.
|
|
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"
|
|
@@ -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) {
|
|
@@ -1910,7 +1910,7 @@ var NgwMap = (function (exports) {
|
|
|
1910
1910
|
throw new Error("Empty `url` not allowed");
|
|
1911
1911
|
}
|
|
1912
1912
|
if (params) {
|
|
1913
|
-
const _a = params, restParams = __objRest$
|
|
1913
|
+
const _a = params, restParams = __objRest$3(_a, ["paramList"]);
|
|
1914
1914
|
url = template(url, restParams);
|
|
1915
1915
|
}
|
|
1916
1916
|
url = encodeURI(fixUrlStr(url));
|
|
@@ -1946,7 +1946,7 @@ var NgwMap = (function (exports) {
|
|
|
1946
1946
|
}
|
|
1947
1947
|
});
|
|
1948
1948
|
if (cache && method === "GET") {
|
|
1949
|
-
const cacheOptions = cacheProps ? cacheProps : __spreadProps$
|
|
1949
|
+
const cacheOptions = cacheProps ? cacheProps : __spreadProps$g(__spreadValues$t({}, objectRemoveEmpty({
|
|
1950
1950
|
headers,
|
|
1951
1951
|
withCredentials,
|
|
1952
1952
|
responseType,
|
|
@@ -2108,24 +2108,24 @@ var NgwMap = (function (exports) {
|
|
|
2108
2108
|
return er;
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
2111
|
-
__publicField$
|
|
2111
|
+
__publicField$q(NgwConnector, "errors", {
|
|
2112
2112
|
NgwError,
|
|
2113
2113
|
ResourceNotFoundError
|
|
2114
2114
|
});
|
|
2115
2115
|
|
|
2116
|
-
var __defProp$
|
|
2116
|
+
var __defProp$D = Object.defineProperty;
|
|
2117
2117
|
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
2118
2118
|
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
2119
2119
|
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
2120
|
-
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;
|
|
2121
2121
|
var __spreadValues$s = (a, b) => {
|
|
2122
2122
|
for (var prop in b || (b = {}))
|
|
2123
2123
|
if (__hasOwnProp$t.call(b, prop))
|
|
2124
|
-
__defNormalProp$
|
|
2124
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
2125
2125
|
if (__getOwnPropSymbols$t)
|
|
2126
2126
|
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
2127
2127
|
if (__propIsEnum$t.call(b, prop))
|
|
2128
|
-
__defNormalProp$
|
|
2128
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
2129
2129
|
}
|
|
2130
2130
|
return a;
|
|
2131
2131
|
};
|
|
@@ -2207,25 +2207,25 @@ var NgwMap = (function (exports) {
|
|
|
2207
2207
|
return logic === "any" ? filters_.some(filterFunction) : filters_.every(filterFunction);
|
|
2208
2208
|
}
|
|
2209
2209
|
|
|
2210
|
-
var __defProp$
|
|
2211
|
-
var __defProps$
|
|
2212
|
-
var __getOwnPropDescs$
|
|
2210
|
+
var __defProp$C = Object.defineProperty;
|
|
2211
|
+
var __defProps$f = Object.defineProperties;
|
|
2212
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
2213
2213
|
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
2214
2214
|
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
2215
2215
|
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
2216
|
-
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;
|
|
2217
2217
|
var __spreadValues$r = (a, b) => {
|
|
2218
2218
|
for (var prop in b || (b = {}))
|
|
2219
2219
|
if (__hasOwnProp$s.call(b, prop))
|
|
2220
|
-
__defNormalProp$
|
|
2220
|
+
__defNormalProp$C(a, prop, b[prop]);
|
|
2221
2221
|
if (__getOwnPropSymbols$s)
|
|
2222
2222
|
for (var prop of __getOwnPropSymbols$s(b)) {
|
|
2223
2223
|
if (__propIsEnum$s.call(b, prop))
|
|
2224
|
-
__defNormalProp$
|
|
2224
|
+
__defNormalProp$C(a, prop, b[prop]);
|
|
2225
2225
|
}
|
|
2226
2226
|
return a;
|
|
2227
2227
|
};
|
|
2228
|
-
var __spreadProps$
|
|
2228
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
2229
2229
|
var __async$p = (__this, __arguments, generator) => {
|
|
2230
2230
|
return new Promise((resolve, reject) => {
|
|
2231
2231
|
var fulfilled = (value) => {
|
|
@@ -2330,13 +2330,13 @@ var NgwMap = (function (exports) {
|
|
|
2330
2330
|
for (const f of filters_) {
|
|
2331
2331
|
if (isPropertyFilter(f)) {
|
|
2332
2332
|
_queries.push(
|
|
2333
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
2333
|
+
fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$r({}, opt), {
|
|
2334
2334
|
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
2335
2335
|
}))
|
|
2336
2336
|
);
|
|
2337
2337
|
} else {
|
|
2338
2338
|
getQueries(
|
|
2339
|
-
__spreadProps$
|
|
2339
|
+
__spreadProps$f(__spreadValues$r({}, opt), {
|
|
2340
2340
|
filters: f
|
|
2341
2341
|
}),
|
|
2342
2342
|
_queries,
|
|
@@ -2357,7 +2357,7 @@ var NgwMap = (function (exports) {
|
|
|
2357
2357
|
if (propertiesFilterList.length) {
|
|
2358
2358
|
for (const x of propertiesFilterList) {
|
|
2359
2359
|
getQueries(
|
|
2360
|
-
__spreadProps$
|
|
2360
|
+
__spreadProps$f(__spreadValues$r({}, opt), {
|
|
2361
2361
|
filters: x
|
|
2362
2362
|
}),
|
|
2363
2363
|
_queries,
|
|
@@ -2366,7 +2366,7 @@ var NgwMap = (function (exports) {
|
|
|
2366
2366
|
}
|
|
2367
2367
|
} else {
|
|
2368
2368
|
_queries.push(
|
|
2369
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
2369
|
+
fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$r({}, opt), {
|
|
2370
2370
|
paramList: [..._parentAllParams, ...paramList, ...filters2]
|
|
2371
2371
|
}))
|
|
2372
2372
|
);
|
|
@@ -2431,25 +2431,25 @@ var NgwMap = (function (exports) {
|
|
|
2431
2431
|
);
|
|
2432
2432
|
}
|
|
2433
2433
|
|
|
2434
|
-
var __defProp$
|
|
2435
|
-
var __defProps$
|
|
2436
|
-
var __getOwnPropDescs$
|
|
2434
|
+
var __defProp$B = Object.defineProperty;
|
|
2435
|
+
var __defProps$e = Object.defineProperties;
|
|
2436
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
2437
2437
|
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
2438
2438
|
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
2439
2439
|
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
2440
|
-
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;
|
|
2441
2441
|
var __spreadValues$q = (a, b) => {
|
|
2442
2442
|
for (var prop in b || (b = {}))
|
|
2443
2443
|
if (__hasOwnProp$r.call(b, prop))
|
|
2444
|
-
__defNormalProp$
|
|
2444
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
2445
2445
|
if (__getOwnPropSymbols$r)
|
|
2446
2446
|
for (var prop of __getOwnPropSymbols$r(b)) {
|
|
2447
2447
|
if (__propIsEnum$r.call(b, prop))
|
|
2448
|
-
__defNormalProp$
|
|
2448
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
2449
2449
|
}
|
|
2450
2450
|
return a;
|
|
2451
2451
|
};
|
|
2452
|
-
var __spreadProps$
|
|
2452
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
2453
2453
|
var __async$o = (__this, __arguments, generator) => {
|
|
2454
2454
|
return new Promise((resolve, reject) => {
|
|
2455
2455
|
var fulfilled = (value) => {
|
|
@@ -2487,45 +2487,45 @@ var NgwMap = (function (exports) {
|
|
|
2487
2487
|
if (resp.geom) {
|
|
2488
2488
|
return createGeoJsonFeature(resp);
|
|
2489
2489
|
} else {
|
|
2490
|
-
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$
|
|
2490
|
+
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$q({}, options), {
|
|
2491
2491
|
geom: true,
|
|
2492
2492
|
fields: null,
|
|
2493
2493
|
extensions: null
|
|
2494
2494
|
}));
|
|
2495
2495
|
const geom = onlyGeomItem.geom;
|
|
2496
|
-
return createGeoJsonFeature(__spreadProps$
|
|
2496
|
+
return createGeoJsonFeature(__spreadProps$e(__spreadValues$q({}, resp), { geom }));
|
|
2497
2497
|
}
|
|
2498
2498
|
});
|
|
2499
|
-
return __spreadProps$
|
|
2499
|
+
return __spreadProps$e(__spreadValues$q({}, resp), {
|
|
2500
2500
|
toGeojson
|
|
2501
2501
|
});
|
|
2502
2502
|
});
|
|
2503
2503
|
}
|
|
2504
2504
|
|
|
2505
|
-
var __defProp$
|
|
2505
|
+
var __defProp$A = Object.defineProperty;
|
|
2506
2506
|
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
2507
2507
|
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
2508
2508
|
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
2509
|
-
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;
|
|
2510
2510
|
var __spreadValues$p = (a, b) => {
|
|
2511
2511
|
for (var prop in b || (b = {}))
|
|
2512
2512
|
if (__hasOwnProp$q.call(b, prop))
|
|
2513
|
-
__defNormalProp$
|
|
2513
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
2514
2514
|
if (__getOwnPropSymbols$q)
|
|
2515
2515
|
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
2516
2516
|
if (__propIsEnum$q.call(b, prop))
|
|
2517
|
-
__defNormalProp$
|
|
2517
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
2518
2518
|
}
|
|
2519
2519
|
return a;
|
|
2520
2520
|
};
|
|
2521
|
-
var __publicField$
|
|
2521
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2522
2522
|
class BookmarkItem {
|
|
2523
2523
|
constructor(options) {
|
|
2524
2524
|
this.options = options;
|
|
2525
|
-
__publicField$
|
|
2526
|
-
__publicField$
|
|
2527
|
-
__publicField$
|
|
2528
|
-
__publicField$
|
|
2525
|
+
__publicField$p(this, "name");
|
|
2526
|
+
__publicField$p(this, "resourceId");
|
|
2527
|
+
__publicField$p(this, "item");
|
|
2528
|
+
__publicField$p(this, "_extent");
|
|
2529
2529
|
this.resourceId = options.resourceId;
|
|
2530
2530
|
const item = options.item;
|
|
2531
2531
|
this.item = item;
|
|
@@ -2671,14 +2671,14 @@ var NgwMap = (function (exports) {
|
|
|
2671
2671
|
return true;
|
|
2672
2672
|
}
|
|
2673
2673
|
|
|
2674
|
-
var __defProp$
|
|
2675
|
-
var __defNormalProp$
|
|
2676
|
-
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);
|
|
2677
2677
|
class TreeHelper {
|
|
2678
2678
|
constructor(item) {
|
|
2679
|
-
__publicField$
|
|
2680
|
-
__publicField$
|
|
2681
|
-
__publicField$
|
|
2679
|
+
__publicField$o(this, "item");
|
|
2680
|
+
__publicField$o(this, "_children", []);
|
|
2681
|
+
__publicField$o(this, "_parent");
|
|
2682
2682
|
this.item = item;
|
|
2683
2683
|
}
|
|
2684
2684
|
setParent(parent) {
|
|
@@ -2741,19 +2741,19 @@ var NgwMap = (function (exports) {
|
|
|
2741
2741
|
}
|
|
2742
2742
|
}
|
|
2743
2743
|
|
|
2744
|
-
var __defProp$
|
|
2745
|
-
var __defNormalProp$
|
|
2746
|
-
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);
|
|
2747
2747
|
class BaseProperty {
|
|
2748
2748
|
constructor(name, item, options) {
|
|
2749
|
-
__publicField$
|
|
2750
|
-
__publicField$
|
|
2751
|
-
__publicField$
|
|
2752
|
-
__publicField$
|
|
2753
|
-
__publicField$
|
|
2754
|
-
__publicField$
|
|
2755
|
-
__publicField$
|
|
2756
|
-
__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");
|
|
2757
2757
|
this.item = item;
|
|
2758
2758
|
this.options = Object.assign({}, options);
|
|
2759
2759
|
this.name = name;
|
|
@@ -2850,23 +2850,23 @@ var NgwMap = (function (exports) {
|
|
|
2850
2850
|
}
|
|
2851
2851
|
}
|
|
2852
2852
|
|
|
2853
|
-
var __defProp$
|
|
2853
|
+
var __defProp$x = Object.defineProperty;
|
|
2854
2854
|
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
2855
2855
|
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
2856
2856
|
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
2857
|
-
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;
|
|
2858
2858
|
var __spreadValues$o = (a, b) => {
|
|
2859
2859
|
for (var prop in b || (b = {}))
|
|
2860
2860
|
if (__hasOwnProp$p.call(b, prop))
|
|
2861
|
-
__defNormalProp$
|
|
2861
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
2862
2862
|
if (__getOwnPropSymbols$p)
|
|
2863
2863
|
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
2864
2864
|
if (__propIsEnum$p.call(b, prop))
|
|
2865
|
-
__defNormalProp$
|
|
2865
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
2866
2866
|
}
|
|
2867
2867
|
return a;
|
|
2868
2868
|
};
|
|
2869
|
-
var __publicField$
|
|
2869
|
+
var __publicField$m = (obj, key, value) => __defNormalProp$x(obj, key + "" , value);
|
|
2870
2870
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
2871
2871
|
constructor(name, item, options) {
|
|
2872
2872
|
super(name, item, __spreadValues$o(__spreadValues$o({}, _CheckProperty.options), options));
|
|
@@ -2974,7 +2974,7 @@ var NgwMap = (function (exports) {
|
|
|
2974
2974
|
}
|
|
2975
2975
|
}
|
|
2976
2976
|
};
|
|
2977
|
-
__publicField$
|
|
2977
|
+
__publicField$m(_CheckProperty, "options", {
|
|
2978
2978
|
hierarchy: true,
|
|
2979
2979
|
bubble: false,
|
|
2980
2980
|
propagation: false,
|
|
@@ -2983,31 +2983,31 @@ var NgwMap = (function (exports) {
|
|
|
2983
2983
|
});
|
|
2984
2984
|
let CheckProperty = _CheckProperty;
|
|
2985
2985
|
|
|
2986
|
-
var __defProp$
|
|
2986
|
+
var __defProp$w = Object.defineProperty;
|
|
2987
2987
|
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
2988
2988
|
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
2989
2989
|
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
2990
|
-
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;
|
|
2991
2991
|
var __spreadValues$n = (a, b) => {
|
|
2992
2992
|
for (var prop in b || (b = {}))
|
|
2993
2993
|
if (__hasOwnProp$o.call(b, prop))
|
|
2994
|
-
__defNormalProp$
|
|
2994
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
2995
2995
|
if (__getOwnPropSymbols$o)
|
|
2996
2996
|
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
2997
2997
|
if (__propIsEnum$o.call(b, prop))
|
|
2998
|
-
__defNormalProp$
|
|
2998
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
2999
2999
|
}
|
|
3000
3000
|
return a;
|
|
3001
3001
|
};
|
|
3002
|
-
var __publicField$
|
|
3002
|
+
var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3003
3003
|
const BOOLEAN_TYPE = "boolean";
|
|
3004
3004
|
const STRING_TYPE = "string";
|
|
3005
3005
|
const _ItemProperties = class _ItemProperties {
|
|
3006
3006
|
constructor(item, propertiesList) {
|
|
3007
3007
|
this.item = item;
|
|
3008
|
-
__publicField$
|
|
3009
|
-
__publicField$
|
|
3010
|
-
__publicField$
|
|
3008
|
+
__publicField$l(this, "options", {});
|
|
3009
|
+
__publicField$l(this, "_properties", {});
|
|
3010
|
+
__publicField$l(this, "_propertiesList", []);
|
|
3011
3011
|
if (propertiesList) {
|
|
3012
3012
|
propertiesList.forEach(this._setPropertyHandler.bind(this));
|
|
3013
3013
|
}
|
|
@@ -3070,35 +3070,35 @@ var NgwMap = (function (exports) {
|
|
|
3070
3070
|
return Handler;
|
|
3071
3071
|
}
|
|
3072
3072
|
};
|
|
3073
|
-
__publicField$
|
|
3073
|
+
__publicField$l(_ItemProperties, "handlers", {
|
|
3074
3074
|
CheckProperty
|
|
3075
3075
|
});
|
|
3076
3076
|
let ItemProperties = _ItemProperties;
|
|
3077
3077
|
|
|
3078
|
-
var __defProp$
|
|
3078
|
+
var __defProp$v = Object.defineProperty;
|
|
3079
3079
|
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
3080
3080
|
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
3081
3081
|
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
3082
|
-
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;
|
|
3083
3083
|
var __spreadValues$m = (a, b) => {
|
|
3084
3084
|
for (var prop in b || (b = {}))
|
|
3085
3085
|
if (__hasOwnProp$n.call(b, prop))
|
|
3086
|
-
__defNormalProp$
|
|
3086
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
3087
3087
|
if (__getOwnPropSymbols$n)
|
|
3088
3088
|
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
3089
3089
|
if (__propIsEnum$n.call(b, prop))
|
|
3090
|
-
__defNormalProp$
|
|
3090
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
3091
3091
|
}
|
|
3092
3092
|
return a;
|
|
3093
3093
|
};
|
|
3094
|
-
var __publicField$
|
|
3094
|
+
var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3095
3095
|
let ID$1 = 0;
|
|
3096
3096
|
class Item {
|
|
3097
3097
|
constructor(options) {
|
|
3098
|
-
__publicField$
|
|
3099
|
-
__publicField$
|
|
3100
|
-
__publicField$
|
|
3101
|
-
__publicField$
|
|
3098
|
+
__publicField$k(this, "options", {});
|
|
3099
|
+
__publicField$k(this, "properties");
|
|
3100
|
+
__publicField$k(this, "tree");
|
|
3101
|
+
__publicField$k(this, "id", ID$1);
|
|
3102
3102
|
ID$1 += 1;
|
|
3103
3103
|
this.options = __spreadValues$m({}, options);
|
|
3104
3104
|
this.tree = new TreeHelper(this);
|
|
@@ -3152,25 +3152,25 @@ var NgwMap = (function (exports) {
|
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
3154
|
|
|
3155
|
-
var __defProp$
|
|
3156
|
-
var __defProps$
|
|
3157
|
-
var __getOwnPropDescs$
|
|
3155
|
+
var __defProp$u = Object.defineProperty;
|
|
3156
|
+
var __defProps$d = Object.defineProperties;
|
|
3157
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
3158
3158
|
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
3159
3159
|
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
3160
3160
|
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
3161
|
-
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;
|
|
3162
3162
|
var __spreadValues$l = (a, b) => {
|
|
3163
3163
|
for (var prop in b || (b = {}))
|
|
3164
3164
|
if (__hasOwnProp$m.call(b, prop))
|
|
3165
|
-
__defNormalProp$
|
|
3165
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
3166
3166
|
if (__getOwnPropSymbols$m)
|
|
3167
3167
|
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
3168
3168
|
if (__propIsEnum$m.call(b, prop))
|
|
3169
|
-
__defNormalProp$
|
|
3169
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
3170
3170
|
}
|
|
3171
3171
|
return a;
|
|
3172
3172
|
};
|
|
3173
|
-
var __spreadProps$
|
|
3173
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
3174
3174
|
function getNgwWebmapExtent(webmap) {
|
|
3175
3175
|
const bottom = webmap["extent_bottom"];
|
|
3176
3176
|
const left = webmap["extent_left"];
|
|
@@ -3238,14 +3238,14 @@ var NgwMap = (function (exports) {
|
|
|
3238
3238
|
if (resource.cls && resource.cls.indexOf("style") !== -1) {
|
|
3239
3239
|
return connector.getResource(resource.parent.id, options).then((res) => {
|
|
3240
3240
|
if (res) {
|
|
3241
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
3241
|
+
return fetchNgwLayerExtent(__spreadProps$d(__spreadValues$l({}, options), {
|
|
3242
3242
|
resourceId: res.resource.id,
|
|
3243
3243
|
connector
|
|
3244
3244
|
}));
|
|
3245
3245
|
}
|
|
3246
3246
|
});
|
|
3247
3247
|
} else {
|
|
3248
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
3248
|
+
return fetchNgwLayerExtent(__spreadProps$d(__spreadValues$l({}, options), {
|
|
3249
3249
|
resourceId: resource.id,
|
|
3250
3250
|
connector
|
|
3251
3251
|
}));
|
|
@@ -3253,9 +3253,9 @@ var NgwMap = (function (exports) {
|
|
|
3253
3253
|
}
|
|
3254
3254
|
}
|
|
3255
3255
|
|
|
3256
|
-
var __defProp$
|
|
3257
|
-
var __defNormalProp$
|
|
3258
|
-
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);
|
|
3259
3259
|
var __async$n = (__this, __arguments, generator) => {
|
|
3260
3260
|
return new Promise((resolve, reject) => {
|
|
3261
3261
|
var fulfilled = (value) => {
|
|
@@ -3278,9 +3278,9 @@ var NgwMap = (function (exports) {
|
|
|
3278
3278
|
};
|
|
3279
3279
|
class NgwResource {
|
|
3280
3280
|
constructor() {
|
|
3281
|
-
__publicField$
|
|
3282
|
-
__publicField$
|
|
3283
|
-
__publicField$
|
|
3281
|
+
__publicField$j(this, "item");
|
|
3282
|
+
__publicField$j(this, "connector");
|
|
3283
|
+
__publicField$j(this, "_extent");
|
|
3284
3284
|
}
|
|
3285
3285
|
/** @deprecated use {@link NgwResource.getBounds} instead */
|
|
3286
3286
|
getExtent() {
|
|
@@ -3399,23 +3399,23 @@ var NgwMap = (function (exports) {
|
|
|
3399
3399
|
};
|
|
3400
3400
|
}
|
|
3401
3401
|
|
|
3402
|
-
var __defProp$
|
|
3402
|
+
var __defProp$s = Object.defineProperty;
|
|
3403
3403
|
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
3404
3404
|
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
3405
3405
|
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
3406
|
-
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;
|
|
3407
3407
|
var __spreadValues$k = (a, b) => {
|
|
3408
3408
|
for (var prop in b || (b = {}))
|
|
3409
3409
|
if (__hasOwnProp$l.call(b, prop))
|
|
3410
|
-
__defNormalProp$
|
|
3410
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
3411
3411
|
if (__getOwnPropSymbols$l)
|
|
3412
3412
|
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
3413
3413
|
if (__propIsEnum$l.call(b, prop))
|
|
3414
|
-
__defNormalProp$
|
|
3414
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
3415
3415
|
}
|
|
3416
3416
|
return a;
|
|
3417
3417
|
};
|
|
3418
|
-
var __objRest$
|
|
3418
|
+
var __objRest$2 = (source, exclude) => {
|
|
3419
3419
|
var target = {};
|
|
3420
3420
|
for (var prop in source)
|
|
3421
3421
|
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -3427,7 +3427,7 @@ var NgwMap = (function (exports) {
|
|
|
3427
3427
|
}
|
|
3428
3428
|
return target;
|
|
3429
3429
|
};
|
|
3430
|
-
var __publicField$
|
|
3430
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3431
3431
|
var __async$l = (__this, __arguments, generator) => {
|
|
3432
3432
|
return new Promise((resolve, reject) => {
|
|
3433
3433
|
var fulfilled = (value) => {
|
|
@@ -3452,7 +3452,7 @@ var NgwMap = (function (exports) {
|
|
|
3452
3452
|
function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
3453
3453
|
let webMap;
|
|
3454
3454
|
if ("webMap" in webMapOrOptions) {
|
|
3455
|
-
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"]);
|
|
3456
3456
|
webMap = webMap_;
|
|
3457
3457
|
if (url_) {
|
|
3458
3458
|
url = url_;
|
|
@@ -3468,9 +3468,9 @@ var NgwMap = (function (exports) {
|
|
|
3468
3468
|
}
|
|
3469
3469
|
class QmsAdapter {
|
|
3470
3470
|
constructor(map, options) {
|
|
3471
|
-
__publicField$
|
|
3472
|
-
__publicField$
|
|
3473
|
-
__publicField$
|
|
3471
|
+
__publicField$i(this, "qms");
|
|
3472
|
+
__publicField$i(this, "options");
|
|
3473
|
+
__publicField$i(this, "map");
|
|
3474
3474
|
this.map = map;
|
|
3475
3475
|
const opt = __spreadValues$k(__spreadValues$k({}, createOpt), options);
|
|
3476
3476
|
this.options = opt;
|
|
@@ -3524,29 +3524,29 @@ var NgwMap = (function (exports) {
|
|
|
3524
3524
|
return QmsAdapter;
|
|
3525
3525
|
}
|
|
3526
3526
|
|
|
3527
|
-
var __defProp$
|
|
3527
|
+
var __defProp$r = Object.defineProperty;
|
|
3528
3528
|
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
3529
3529
|
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
3530
3530
|
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
3531
|
-
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;
|
|
3532
3532
|
var __spreadValues$j = (a, b) => {
|
|
3533
3533
|
for (var prop in b || (b = {}))
|
|
3534
3534
|
if (__hasOwnProp$k.call(b, prop))
|
|
3535
|
-
__defNormalProp$
|
|
3535
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
3536
3536
|
if (__getOwnPropSymbols$k)
|
|
3537
3537
|
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
3538
3538
|
if (__propIsEnum$k.call(b, prop))
|
|
3539
|
-
__defNormalProp$
|
|
3539
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
3540
3540
|
}
|
|
3541
3541
|
return a;
|
|
3542
3542
|
};
|
|
3543
|
-
var __publicField$
|
|
3543
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3544
3544
|
class QmsKit {
|
|
3545
3545
|
constructor(options) {
|
|
3546
|
-
__publicField$
|
|
3546
|
+
__publicField$h(this, "options", {
|
|
3547
3547
|
url: "https://qms.nextgis.com"
|
|
3548
3548
|
});
|
|
3549
|
-
__publicField$
|
|
3549
|
+
__publicField$h(this, "url");
|
|
3550
3550
|
this.options = __spreadValues$j(__spreadValues$j({}, this.options), options);
|
|
3551
3551
|
this.url = this.options.url;
|
|
3552
3552
|
}
|
|
@@ -3562,31 +3562,31 @@ var NgwMap = (function (exports) {
|
|
|
3562
3562
|
return createQmsAdapter({ webMap, url: this.url });
|
|
3563
3563
|
}
|
|
3564
3564
|
}
|
|
3565
|
-
__publicField$
|
|
3565
|
+
__publicField$h(QmsKit, "utils", {
|
|
3566
3566
|
createQmsAdapter
|
|
3567
3567
|
});
|
|
3568
3568
|
|
|
3569
|
-
var __defProp$
|
|
3570
|
-
var __defProps$
|
|
3571
|
-
var __getOwnPropDescs$
|
|
3569
|
+
var __defProp$q = Object.defineProperty;
|
|
3570
|
+
var __defProps$c = Object.defineProperties;
|
|
3571
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
3572
3572
|
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
3573
3573
|
var __getProtoOf$2 = Object.getPrototypeOf;
|
|
3574
3574
|
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
3575
3575
|
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
3576
3576
|
var __reflectGet$2 = Reflect.get;
|
|
3577
|
-
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;
|
|
3578
3578
|
var __spreadValues$i = (a, b) => {
|
|
3579
3579
|
for (var prop in b || (b = {}))
|
|
3580
3580
|
if (__hasOwnProp$j.call(b, prop))
|
|
3581
|
-
__defNormalProp$
|
|
3581
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
3582
3582
|
if (__getOwnPropSymbols$j)
|
|
3583
3583
|
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
3584
3584
|
if (__propIsEnum$j.call(b, prop))
|
|
3585
|
-
__defNormalProp$
|
|
3585
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
3586
3586
|
}
|
|
3587
3587
|
return a;
|
|
3588
3588
|
};
|
|
3589
|
-
var __spreadProps$
|
|
3589
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
3590
3590
|
var __superGet$2 = (cls, obj, key) => __reflectGet$2(__getProtoOf$2(cls), key, obj);
|
|
3591
3591
|
var __async$k = (__this, __arguments, generator) => {
|
|
3592
3592
|
return new Promise((resolve, reject) => {
|
|
@@ -3631,7 +3631,7 @@ var NgwMap = (function (exports) {
|
|
|
3631
3631
|
class BasemapTileAdapter extends TileAdapter {
|
|
3632
3632
|
addLayer(opt) {
|
|
3633
3633
|
return __async$k(this, null, function* () {
|
|
3634
|
-
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 }));
|
|
3635
3635
|
});
|
|
3636
3636
|
}
|
|
3637
3637
|
}
|
|
@@ -3710,25 +3710,25 @@ var NgwMap = (function (exports) {
|
|
|
3710
3710
|
return fields;
|
|
3711
3711
|
}
|
|
3712
3712
|
|
|
3713
|
-
var __defProp$
|
|
3714
|
-
var __defProps$
|
|
3715
|
-
var __getOwnPropDescs$
|
|
3713
|
+
var __defProp$p = Object.defineProperty;
|
|
3714
|
+
var __defProps$b = Object.defineProperties;
|
|
3715
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
3716
3716
|
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
3717
3717
|
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
3718
3718
|
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
3719
|
-
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;
|
|
3720
3720
|
var __spreadValues$h = (a, b) => {
|
|
3721
3721
|
for (var prop in b || (b = {}))
|
|
3722
3722
|
if (__hasOwnProp$i.call(b, prop))
|
|
3723
|
-
__defNormalProp$
|
|
3723
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
3724
3724
|
if (__getOwnPropSymbols$i)
|
|
3725
3725
|
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
3726
3726
|
if (__propIsEnum$i.call(b, prop))
|
|
3727
|
-
__defNormalProp$
|
|
3727
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
3728
3728
|
}
|
|
3729
3729
|
return a;
|
|
3730
3730
|
};
|
|
3731
|
-
var __spreadProps$
|
|
3731
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
3732
3732
|
var __async$j = (__this, __arguments, generator) => {
|
|
3733
3733
|
return new Promise((resolve, reject) => {
|
|
3734
3734
|
var fulfilled = (value) => {
|
|
@@ -3754,13 +3754,13 @@ var NgwMap = (function (exports) {
|
|
|
3754
3754
|
var _a;
|
|
3755
3755
|
const filters = options.filters;
|
|
3756
3756
|
if (filters) {
|
|
3757
|
-
let data = yield createFeatureFieldFilterQueries(__spreadProps$
|
|
3757
|
+
let data = yield createFeatureFieldFilterQueries(__spreadProps$b(__spreadValues$h({}, options), {
|
|
3758
3758
|
filters
|
|
3759
3759
|
}));
|
|
3760
3760
|
const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
|
|
3761
3761
|
if (clientFilterValidate) {
|
|
3762
3762
|
data = data.filter((y) => {
|
|
3763
|
-
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$
|
|
3763
|
+
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$b(__spreadValues$h({}, y.fields), {
|
|
3764
3764
|
id: y.id
|
|
3765
3765
|
}));
|
|
3766
3766
|
const result = propertiesFilter(fields, filters);
|
|
@@ -3848,28 +3848,28 @@ var NgwMap = (function (exports) {
|
|
|
3848
3848
|
return filterOptions;
|
|
3849
3849
|
}
|
|
3850
3850
|
|
|
3851
|
-
var __defProp$
|
|
3852
|
-
var __defProps$
|
|
3853
|
-
var __getOwnPropDescs$
|
|
3851
|
+
var __defProp$o = Object.defineProperty;
|
|
3852
|
+
var __defProps$a = Object.defineProperties;
|
|
3853
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
3854
3854
|
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
3855
3855
|
var __getProtoOf$1 = Object.getPrototypeOf;
|
|
3856
3856
|
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
3857
3857
|
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
3858
3858
|
var __reflectGet$1 = Reflect.get;
|
|
3859
|
-
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;
|
|
3860
3860
|
var __spreadValues$g = (a, b) => {
|
|
3861
3861
|
for (var prop in b || (b = {}))
|
|
3862
3862
|
if (__hasOwnProp$h.call(b, prop))
|
|
3863
|
-
__defNormalProp$
|
|
3863
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
3864
3864
|
if (__getOwnPropSymbols$h)
|
|
3865
3865
|
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
3866
3866
|
if (__propIsEnum$h.call(b, prop))
|
|
3867
|
-
__defNormalProp$
|
|
3867
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
3868
3868
|
}
|
|
3869
3869
|
return a;
|
|
3870
3870
|
};
|
|
3871
|
-
var __spreadProps$
|
|
3872
|
-
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);
|
|
3873
3873
|
var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
|
|
3874
3874
|
var __async$h = (__this, __arguments, generator) => {
|
|
3875
3875
|
return new Promise((resolve, reject) => {
|
|
@@ -3942,11 +3942,11 @@ var NgwMap = (function (exports) {
|
|
|
3942
3942
|
class NgwGeoJsonAdapter extends GeoJsonAdapter {
|
|
3943
3943
|
constructor() {
|
|
3944
3944
|
super(...arguments);
|
|
3945
|
-
__publicField$
|
|
3946
|
-
__publicField$
|
|
3947
|
-
__publicField$
|
|
3948
|
-
__publicField$
|
|
3949
|
-
__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");
|
|
3950
3950
|
}
|
|
3951
3951
|
addLayer(opt) {
|
|
3952
3952
|
return __async$h(this, null, function* () {
|
|
@@ -4019,10 +4019,10 @@ var NgwMap = (function (exports) {
|
|
|
4019
4019
|
getCount() {
|
|
4020
4020
|
return fetchNgwLayerCount({ connector, resourceId, cache: true });
|
|
4021
4021
|
}
|
|
4022
|
-
updateLayer(
|
|
4022
|
+
updateLayer(opt) {
|
|
4023
4023
|
return __async$h(this, null, function* () {
|
|
4024
4024
|
var _a2;
|
|
4025
|
-
filterArgs =
|
|
4025
|
+
const filterArgs = opt || _lastFilterArgs || {};
|
|
4026
4026
|
if ((_a2 = this.options.strategy) == null ? void 0 : _a2.startsWith("BBOX")) {
|
|
4027
4027
|
yield webMap.onLoad("create");
|
|
4028
4028
|
filterArgs.options = filterArgs.options || {};
|
|
@@ -4047,7 +4047,7 @@ var NgwMap = (function (exports) {
|
|
|
4047
4047
|
try {
|
|
4048
4048
|
this.emitter.emit("preupdate", filterArgs);
|
|
4049
4049
|
webMap._emitLayerEvent("layer:preupdate", options.id || "", filterArgs);
|
|
4050
|
-
const data = yield getData(filterArgs.filters, __spreadProps$
|
|
4050
|
+
const data = yield getData(filterArgs.filters, __spreadProps$a(__spreadValues$g({}, filterArgs.options), {
|
|
4051
4051
|
srs: this.options.srs
|
|
4052
4052
|
}));
|
|
4053
4053
|
let newData = data;
|
|
@@ -4100,7 +4100,7 @@ var NgwMap = (function (exports) {
|
|
|
4100
4100
|
if (this.clearLayer) {
|
|
4101
4101
|
this.clearLayer();
|
|
4102
4102
|
}
|
|
4103
|
-
const data = yield getData(filters, __spreadProps$
|
|
4103
|
+
const data = yield getData(filters, __spreadProps$a(__spreadValues$g({}, opt), {
|
|
4104
4104
|
srs: this.options.srs
|
|
4105
4105
|
}));
|
|
4106
4106
|
this.setData(data);
|
|
@@ -4289,26 +4289,26 @@ var NgwMap = (function (exports) {
|
|
|
4289
4289
|
}
|
|
4290
4290
|
}
|
|
4291
4291
|
|
|
4292
|
-
var __defProp$
|
|
4293
|
-
var __defProps$
|
|
4294
|
-
var __getOwnPropDescs$
|
|
4292
|
+
var __defProp$n = Object.defineProperty;
|
|
4293
|
+
var __defProps$9 = Object.defineProperties;
|
|
4294
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
4295
4295
|
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
4296
4296
|
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
4297
4297
|
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
4298
|
-
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;
|
|
4299
4299
|
var __spreadValues$f = (a, b) => {
|
|
4300
4300
|
for (var prop in b || (b = {}))
|
|
4301
4301
|
if (__hasOwnProp$g.call(b, prop))
|
|
4302
|
-
__defNormalProp$
|
|
4302
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
4303
4303
|
if (__getOwnPropSymbols$g)
|
|
4304
4304
|
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
4305
4305
|
if (__propIsEnum$g.call(b, prop))
|
|
4306
|
-
__defNormalProp$
|
|
4306
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
4307
4307
|
}
|
|
4308
4308
|
return a;
|
|
4309
4309
|
};
|
|
4310
|
-
var __spreadProps$
|
|
4311
|
-
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);
|
|
4312
4312
|
var __async$f = (__this, __arguments, generator) => {
|
|
4313
4313
|
return new Promise((resolve, reject) => {
|
|
4314
4314
|
var fulfilled = (value) => {
|
|
@@ -4329,11 +4329,47 @@ var NgwMap = (function (exports) {
|
|
|
4329
4329
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
4330
4330
|
});
|
|
4331
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
|
+
}
|
|
4332
4368
|
function createRasterAdapter(_0) {
|
|
4333
4369
|
return __async$f(this, arguments, function* ({
|
|
4334
4370
|
layerOptions,
|
|
4335
|
-
webMap,
|
|
4336
4371
|
connector,
|
|
4372
|
+
webMap,
|
|
4337
4373
|
item
|
|
4338
4374
|
}) {
|
|
4339
4375
|
const resourceCls = item.resource.cls;
|
|
@@ -4362,16 +4398,17 @@ var NgwMap = (function (exports) {
|
|
|
4362
4398
|
constructor(map, _options) {
|
|
4363
4399
|
super(map, _options);
|
|
4364
4400
|
this.map = map;
|
|
4365
|
-
|
|
4366
|
-
__publicField$
|
|
4367
|
-
__publicField$
|
|
4401
|
+
__publicField$f(this, "item", item);
|
|
4402
|
+
__publicField$f(this, "resourceId", resourceId);
|
|
4403
|
+
__publicField$f(this, "_blocked", false);
|
|
4404
|
+
__publicField$f(this, "_layerVisibility");
|
|
4368
4405
|
const opt = ngwApiToAdapterOptions({
|
|
4369
4406
|
options: layerOptions,
|
|
4370
4407
|
webMap,
|
|
4371
4408
|
baseUrl: connector.options.baseUrl || ""
|
|
4372
4409
|
});
|
|
4373
4410
|
if (opt) {
|
|
4374
|
-
const layerAdapterOptions = __spreadProps$
|
|
4411
|
+
const layerAdapterOptions = __spreadProps$9(__spreadValues$f(__spreadValues$f({}, opt), layerOptions.adapterOptions), {
|
|
4375
4412
|
params: { resource: resourceId },
|
|
4376
4413
|
layers: opt.layers || String(resourceId),
|
|
4377
4414
|
resourceId
|
|
@@ -4385,25 +4422,19 @@ var NgwMap = (function (exports) {
|
|
|
4385
4422
|
addLayer(addOptions) {
|
|
4386
4423
|
return super.addLayer(__spreadValues$f(__spreadValues$f({}, this.options), addOptions));
|
|
4387
4424
|
}
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
}, options));
|
|
4394
|
-
const id = this.options.id;
|
|
4395
|
-
if (id !== void 0) {
|
|
4396
|
-
const legend = {
|
|
4397
|
-
layerId: id,
|
|
4398
|
-
legend: ngwLegend.map(({ display_name, icon }) => ({
|
|
4399
|
-
name: display_name,
|
|
4400
|
-
symbol: icon
|
|
4401
|
-
}))
|
|
4402
|
-
};
|
|
4403
|
-
return [legend];
|
|
4425
|
+
showLayer() {
|
|
4426
|
+
this._layerVisibility = true;
|
|
4427
|
+
if (this.layer) {
|
|
4428
|
+
if (!this._blocked) {
|
|
4429
|
+
webMap.mapAdapter.showLayer(this.layer);
|
|
4404
4430
|
}
|
|
4405
|
-
|
|
4406
|
-
|
|
4431
|
+
}
|
|
4432
|
+
}
|
|
4433
|
+
hideLayer() {
|
|
4434
|
+
this._layerVisibility = false;
|
|
4435
|
+
if (this.layer) {
|
|
4436
|
+
webMap.mapAdapter.hideLayer(this.layer);
|
|
4437
|
+
}
|
|
4407
4438
|
}
|
|
4408
4439
|
getIdentificationIds() {
|
|
4409
4440
|
return __async$f(this, null, function* () {
|
|
@@ -4419,8 +4450,69 @@ var NgwMap = (function (exports) {
|
|
|
4419
4450
|
return [];
|
|
4420
4451
|
});
|
|
4421
4452
|
}
|
|
4422
|
-
|
|
4423
|
-
|
|
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
|
+
}
|
|
4424
4516
|
};
|
|
4425
4517
|
} else {
|
|
4426
4518
|
throw new Error(adapter + " not supported yet. Only TILE");
|
|
@@ -4428,25 +4520,25 @@ var NgwMap = (function (exports) {
|
|
|
4428
4520
|
});
|
|
4429
4521
|
}
|
|
4430
4522
|
|
|
4431
|
-
var __defProp$
|
|
4432
|
-
var __defProps$
|
|
4433
|
-
var __getOwnPropDescs$
|
|
4523
|
+
var __defProp$m = Object.defineProperty;
|
|
4524
|
+
var __defProps$8 = Object.defineProperties;
|
|
4525
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
4434
4526
|
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
4435
4527
|
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
4436
4528
|
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
4437
|
-
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;
|
|
4438
4530
|
var __spreadValues$e = (a, b) => {
|
|
4439
4531
|
for (var prop in b || (b = {}))
|
|
4440
4532
|
if (__hasOwnProp$f.call(b, prop))
|
|
4441
|
-
__defNormalProp$
|
|
4533
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
4442
4534
|
if (__getOwnPropSymbols$f)
|
|
4443
4535
|
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
4444
4536
|
if (__propIsEnum$f.call(b, prop))
|
|
4445
|
-
__defNormalProp$
|
|
4537
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
4446
4538
|
}
|
|
4447
4539
|
return a;
|
|
4448
4540
|
};
|
|
4449
|
-
var __spreadProps$
|
|
4541
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
4450
4542
|
var __async$e = (__this, __arguments, generator) => {
|
|
4451
4543
|
return new Promise((resolve, reject) => {
|
|
4452
4544
|
var fulfilled = (value) => {
|
|
@@ -4494,7 +4586,7 @@ var NgwMap = (function (exports) {
|
|
|
4494
4586
|
const firstStyle = childrenStyles && childrenStyles[0];
|
|
4495
4587
|
if (firstStyle) {
|
|
4496
4588
|
return createAsyncAdapter(
|
|
4497
|
-
__spreadProps$
|
|
4589
|
+
__spreadProps$8(__spreadValues$e({}, layerOptions), { resource: firstStyle.resource.id }),
|
|
4498
4590
|
webMap,
|
|
4499
4591
|
connector
|
|
4500
4592
|
);
|
|
@@ -4517,7 +4609,7 @@ var NgwMap = (function (exports) {
|
|
|
4517
4609
|
}
|
|
4518
4610
|
if (item) {
|
|
4519
4611
|
const cls = item.resource.cls;
|
|
4520
|
-
const layerOptions = __spreadProps$
|
|
4612
|
+
const layerOptions = __spreadProps$8(__spreadValues$e({}, options), {
|
|
4521
4613
|
resource: resourceId
|
|
4522
4614
|
});
|
|
4523
4615
|
const adapterOptions = {
|
|
@@ -4554,10 +4646,10 @@ var NgwMap = (function (exports) {
|
|
|
4554
4646
|
item.resource.parent.id
|
|
4555
4647
|
);
|
|
4556
4648
|
if (parentItem) {
|
|
4557
|
-
const parentOptions = __spreadProps$
|
|
4649
|
+
const parentOptions = __spreadProps$8(__spreadValues$e({}, options), {
|
|
4558
4650
|
resource: item.resource.parent.id
|
|
4559
4651
|
});
|
|
4560
|
-
adapter = createGeoJsonAdapter(__spreadProps$
|
|
4652
|
+
adapter = createGeoJsonAdapter(__spreadProps$8(__spreadValues$e({}, adapterOptions), {
|
|
4561
4653
|
item: parentItem,
|
|
4562
4654
|
layerOptions: parentOptions
|
|
4563
4655
|
}));
|
|
@@ -4601,31 +4693,46 @@ var NgwMap = (function (exports) {
|
|
|
4601
4693
|
});
|
|
4602
4694
|
}
|
|
4603
4695
|
|
|
4604
|
-
var __defProp$
|
|
4696
|
+
var __defProp$l = Object.defineProperty;
|
|
4697
|
+
var __defProps$7 = Object.defineProperties;
|
|
4698
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
4605
4699
|
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
4606
4700
|
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
4607
4701
|
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
4608
|
-
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;
|
|
4609
4703
|
var __spreadValues$d = (a, b) => {
|
|
4610
4704
|
for (var prop in b || (b = {}))
|
|
4611
4705
|
if (__hasOwnProp$e.call(b, prop))
|
|
4612
|
-
__defNormalProp$
|
|
4706
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
4613
4707
|
if (__getOwnPropSymbols$e)
|
|
4614
4708
|
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
4615
4709
|
if (__propIsEnum$e.call(b, prop))
|
|
4616
|
-
__defNormalProp$
|
|
4710
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
4617
4711
|
}
|
|
4618
4712
|
return a;
|
|
4619
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
|
+
};
|
|
4620
4727
|
function updateImageParams(params, resourceId) {
|
|
4621
|
-
const { bbox, width, height, nd } =
|
|
4622
|
-
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), {
|
|
4623
4730
|
resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
|
|
4624
4731
|
extent: bbox,
|
|
4625
4732
|
size: width + "," + height,
|
|
4626
4733
|
timestamp: Date.now(),
|
|
4627
4734
|
nd: nd != null ? nd : 200
|
|
4628
|
-
};
|
|
4735
|
+
});
|
|
4629
4736
|
}
|
|
4630
4737
|
const vectorLayerGeomToPaintTypeAlias = {
|
|
4631
4738
|
POINT: "point",
|
|
@@ -4685,26 +4792,26 @@ var NgwMap = (function (exports) {
|
|
|
4685
4792
|
return zoom;
|
|
4686
4793
|
}
|
|
4687
4794
|
|
|
4688
|
-
var __defProp$
|
|
4795
|
+
var __defProp$k = Object.defineProperty;
|
|
4689
4796
|
var __defProps$6 = Object.defineProperties;
|
|
4690
4797
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
4691
4798
|
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
4692
4799
|
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
4693
4800
|
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
4694
|
-
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;
|
|
4695
4802
|
var __spreadValues$c = (a, b) => {
|
|
4696
4803
|
for (var prop in b || (b = {}))
|
|
4697
4804
|
if (__hasOwnProp$d.call(b, prop))
|
|
4698
|
-
__defNormalProp$
|
|
4805
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
4699
4806
|
if (__getOwnPropSymbols$d)
|
|
4700
4807
|
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
4701
4808
|
if (__propIsEnum$d.call(b, prop))
|
|
4702
|
-
__defNormalProp$
|
|
4809
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
4703
4810
|
}
|
|
4704
4811
|
return a;
|
|
4705
4812
|
};
|
|
4706
4813
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
4707
|
-
var __publicField$
|
|
4814
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4708
4815
|
var __async$d = (__this, __arguments, generator) => {
|
|
4709
4816
|
return new Promise((resolve, reject) => {
|
|
4710
4817
|
var fulfilled = (value) => {
|
|
@@ -4729,11 +4836,11 @@ var NgwMap = (function (exports) {
|
|
|
4729
4836
|
constructor(webMap, item, options, connector, parent, noInit) {
|
|
4730
4837
|
super(__spreadValues$c(__spreadValues$c({}, _NgwWebmapItem.options), options));
|
|
4731
4838
|
this.webMap = webMap;
|
|
4732
|
-
__publicField$
|
|
4733
|
-
__publicField$
|
|
4734
|
-
__publicField$
|
|
4735
|
-
__publicField$
|
|
4736
|
-
__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);
|
|
4737
4844
|
if (connector) {
|
|
4738
4845
|
this.connector = connector;
|
|
4739
4846
|
}
|
|
@@ -4795,10 +4902,12 @@ var NgwMap = (function (exports) {
|
|
|
4795
4902
|
}, options));
|
|
4796
4903
|
const legend = {
|
|
4797
4904
|
layerId: id,
|
|
4798
|
-
legend: ngwLegend.map((
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
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))
|
|
4802
4911
|
};
|
|
4803
4912
|
return [legend];
|
|
4804
4913
|
}
|
|
@@ -4921,8 +5030,8 @@ var NgwMap = (function (exports) {
|
|
|
4921
5030
|
return totalValue;
|
|
4922
5031
|
}
|
|
4923
5032
|
};
|
|
4924
|
-
__publicField$
|
|
4925
|
-
__publicField$
|
|
5033
|
+
__publicField$e(_NgwWebmapItem, "GetAdapterFromLayerType", {});
|
|
5034
|
+
__publicField$e(_NgwWebmapItem, "options", {
|
|
4926
5035
|
properties: [
|
|
4927
5036
|
{
|
|
4928
5037
|
type: "boolean",
|
|
@@ -4962,23 +5071,23 @@ var NgwMap = (function (exports) {
|
|
|
4962
5071
|
});
|
|
4963
5072
|
let NgwWebmapItem = _NgwWebmapItem;
|
|
4964
5073
|
|
|
4965
|
-
var __defProp$
|
|
5074
|
+
var __defProp$j = Object.defineProperty;
|
|
4966
5075
|
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
4967
5076
|
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
4968
5077
|
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
4969
|
-
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;
|
|
4970
5079
|
var __spreadValues$b = (a, b) => {
|
|
4971
5080
|
for (var prop in b || (b = {}))
|
|
4972
5081
|
if (__hasOwnProp$c.call(b, prop))
|
|
4973
|
-
__defNormalProp$
|
|
5082
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
4974
5083
|
if (__getOwnPropSymbols$c)
|
|
4975
5084
|
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
4976
5085
|
if (__propIsEnum$c.call(b, prop))
|
|
4977
|
-
__defNormalProp$
|
|
5086
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
4978
5087
|
}
|
|
4979
5088
|
return a;
|
|
4980
5089
|
};
|
|
4981
|
-
var __publicField$
|
|
5090
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$j(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4982
5091
|
var __async$c = (__this, __arguments, generator) => {
|
|
4983
5092
|
return new Promise((resolve, reject) => {
|
|
4984
5093
|
var fulfilled = (value) => {
|
|
@@ -5008,10 +5117,10 @@ var NgwMap = (function (exports) {
|
|
|
5008
5117
|
}) {
|
|
5009
5118
|
class OnFirstShowAdapter {
|
|
5010
5119
|
constructor() {
|
|
5011
|
-
__publicField$
|
|
5012
|
-
__publicField$
|
|
5013
|
-
__publicField$
|
|
5014
|
-
__publicField$
|
|
5120
|
+
__publicField$d(this, "options", {});
|
|
5121
|
+
__publicField$d(this, "layer", []);
|
|
5122
|
+
__publicField$d(this, "_removed", false);
|
|
5123
|
+
__publicField$d(this, "_creatingInProgress", false);
|
|
5015
5124
|
}
|
|
5016
5125
|
addLayer() {
|
|
5017
5126
|
return this.layer;
|
|
@@ -5139,26 +5248,26 @@ var NgwMap = (function (exports) {
|
|
|
5139
5248
|
|
|
5140
5249
|
const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
|
|
5141
5250
|
|
|
5142
|
-
var __defProp$
|
|
5251
|
+
var __defProp$i = Object.defineProperty;
|
|
5143
5252
|
var __defProps$5 = Object.defineProperties;
|
|
5144
5253
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
5145
5254
|
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
5146
5255
|
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
5147
5256
|
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
5148
|
-
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;
|
|
5149
5258
|
var __spreadValues$a = (a, b) => {
|
|
5150
5259
|
for (var prop in b || (b = {}))
|
|
5151
5260
|
if (__hasOwnProp$b.call(b, prop))
|
|
5152
|
-
__defNormalProp$
|
|
5261
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
5153
5262
|
if (__getOwnPropSymbols$b)
|
|
5154
5263
|
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
5155
5264
|
if (__propIsEnum$b.call(b, prop))
|
|
5156
|
-
__defNormalProp$
|
|
5265
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
5157
5266
|
}
|
|
5158
5267
|
return a;
|
|
5159
5268
|
};
|
|
5160
5269
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
5161
|
-
var __publicField$
|
|
5270
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5162
5271
|
var __async$a = (__this, __arguments, generator) => {
|
|
5163
5272
|
return new Promise((resolve, reject) => {
|
|
5164
5273
|
var fulfilled = (value) => {
|
|
@@ -5183,21 +5292,21 @@ var NgwMap = (function (exports) {
|
|
|
5183
5292
|
constructor(map, options) {
|
|
5184
5293
|
this.map = map;
|
|
5185
5294
|
this.options = options;
|
|
5186
|
-
__publicField$
|
|
5187
|
-
__publicField$
|
|
5295
|
+
__publicField$c(this, "layer");
|
|
5296
|
+
__publicField$c(this, "NgwWebmapItem", NgwWebmapItem);
|
|
5188
5297
|
/**
|
|
5189
5298
|
* Radius for searching objects in pixels
|
|
5190
5299
|
*/
|
|
5191
|
-
__publicField$
|
|
5300
|
+
__publicField$c(this, "pixelRadius", 10);
|
|
5192
5301
|
// webmapSettings.identify_radius,
|
|
5193
|
-
__publicField$
|
|
5194
|
-
__publicField$
|
|
5195
|
-
__publicField$
|
|
5196
|
-
__publicField$
|
|
5197
|
-
__publicField$
|
|
5198
|
-
__publicField$
|
|
5199
|
-
__publicField$
|
|
5200
|
-
__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");
|
|
5201
5310
|
const r = options.resourceId;
|
|
5202
5311
|
if (Array.isArray(r)) {
|
|
5203
5312
|
this.resourceId = r[0];
|
|
@@ -5506,23 +5615,23 @@ var NgwMap = (function (exports) {
|
|
|
5506
5615
|
}
|
|
5507
5616
|
}
|
|
5508
5617
|
|
|
5509
|
-
var __defProp$
|
|
5618
|
+
var __defProp$h = Object.defineProperty;
|
|
5510
5619
|
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
5511
5620
|
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
5512
5621
|
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
5513
|
-
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;
|
|
5514
5623
|
var __spreadValues$9 = (a, b) => {
|
|
5515
5624
|
for (var prop in b || (b = {}))
|
|
5516
5625
|
if (__hasOwnProp$a.call(b, prop))
|
|
5517
|
-
__defNormalProp$
|
|
5626
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
5518
5627
|
if (__getOwnPropSymbols$a)
|
|
5519
5628
|
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
5520
5629
|
if (__propIsEnum$a.call(b, prop))
|
|
5521
|
-
__defNormalProp$
|
|
5630
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
5522
5631
|
}
|
|
5523
5632
|
return a;
|
|
5524
5633
|
};
|
|
5525
|
-
var __publicField$
|
|
5634
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5526
5635
|
var __async$9 = (__this, __arguments, generator) => {
|
|
5527
5636
|
return new Promise((resolve, reject) => {
|
|
5528
5637
|
var fulfilled = (value) => {
|
|
@@ -5546,9 +5655,9 @@ var NgwMap = (function (exports) {
|
|
|
5546
5655
|
class NgwKit {
|
|
5547
5656
|
constructor(options) {
|
|
5548
5657
|
this.options = options;
|
|
5549
|
-
__publicField$
|
|
5550
|
-
__publicField$
|
|
5551
|
-
__publicField$
|
|
5658
|
+
__publicField$b(this, "url");
|
|
5659
|
+
__publicField$b(this, "connector");
|
|
5660
|
+
__publicField$b(this, "webMap");
|
|
5552
5661
|
if (this.options.connector) {
|
|
5553
5662
|
this.url = this.options.connector.options.baseUrl || "";
|
|
5554
5663
|
this.connector = this.options.connector;
|
|
@@ -5609,37 +5718,37 @@ var NgwMap = (function (exports) {
|
|
|
5609
5718
|
}
|
|
5610
5719
|
}
|
|
5611
5720
|
|
|
5612
|
-
var __defProp$
|
|
5721
|
+
var __defProp$g = Object.defineProperty;
|
|
5613
5722
|
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
5614
5723
|
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
5615
5724
|
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
5616
|
-
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;
|
|
5617
5726
|
var __spreadValues$8 = (a, b) => {
|
|
5618
5727
|
for (var prop in b || (b = {}))
|
|
5619
5728
|
if (__hasOwnProp$9.call(b, prop))
|
|
5620
|
-
__defNormalProp$
|
|
5729
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
5621
5730
|
if (__getOwnPropSymbols$9)
|
|
5622
5731
|
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
5623
5732
|
if (__propIsEnum$9.call(b, prop))
|
|
5624
|
-
__defNormalProp$
|
|
5733
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
5625
5734
|
}
|
|
5626
5735
|
return a;
|
|
5627
5736
|
};
|
|
5628
|
-
var __publicField$
|
|
5737
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5629
5738
|
class IdentifyItem {
|
|
5630
5739
|
constructor(options) {
|
|
5631
|
-
__publicField$
|
|
5632
|
-
__publicField$
|
|
5633
|
-
__publicField$
|
|
5634
|
-
__publicField$
|
|
5635
|
-
__publicField$
|
|
5636
|
-
__publicField$
|
|
5637
|
-
__publicField$
|
|
5638
|
-
__publicField$
|
|
5639
|
-
__publicField$
|
|
5640
|
-
__publicField$
|
|
5641
|
-
__publicField$
|
|
5642
|
-
__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");
|
|
5643
5752
|
const f = options.feature;
|
|
5644
5753
|
this.id = f.id;
|
|
5645
5754
|
this.geom = f.geom;
|
|
@@ -5725,21 +5834,21 @@ var NgwMap = (function (exports) {
|
|
|
5725
5834
|
});
|
|
5726
5835
|
}
|
|
5727
5836
|
|
|
5728
|
-
var __defProp$
|
|
5837
|
+
var __defProp$f = Object.defineProperty;
|
|
5729
5838
|
var __defProps$4 = Object.defineProperties;
|
|
5730
5839
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
5731
5840
|
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
5732
5841
|
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
5733
5842
|
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
5734
|
-
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;
|
|
5735
5844
|
var __spreadValues$7 = (a, b) => {
|
|
5736
5845
|
for (var prop in b || (b = {}))
|
|
5737
5846
|
if (__hasOwnProp$8.call(b, prop))
|
|
5738
|
-
__defNormalProp$
|
|
5847
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
5739
5848
|
if (__getOwnPropSymbols$8)
|
|
5740
5849
|
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
5741
5850
|
if (__propIsEnum$8.call(b, prop))
|
|
5742
|
-
__defNormalProp$
|
|
5851
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
5743
5852
|
}
|
|
5744
5853
|
return a;
|
|
5745
5854
|
};
|
|
@@ -6583,19 +6692,19 @@ var NgwMap = (function (exports) {
|
|
|
6583
6692
|
typeof: evaluateArgs(([arg]) => typeOfValue(arg))
|
|
6584
6693
|
};
|
|
6585
6694
|
|
|
6586
|
-
var __defProp$
|
|
6695
|
+
var __defProp$e = Object.defineProperty;
|
|
6587
6696
|
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
6588
6697
|
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
6589
6698
|
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
6590
|
-
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;
|
|
6591
6700
|
var __spreadValues$6 = (a, b) => {
|
|
6592
6701
|
for (var prop in b || (b = {}))
|
|
6593
6702
|
if (__hasOwnProp$7.call(b, prop))
|
|
6594
|
-
__defNormalProp$
|
|
6703
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
6595
6704
|
if (__getOwnPropSymbols$7)
|
|
6596
6705
|
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
6597
6706
|
if (__propIsEnum$7.call(b, prop))
|
|
6598
|
-
__defNormalProp$
|
|
6707
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
6599
6708
|
}
|
|
6600
6709
|
return a;
|
|
6601
6710
|
};
|
|
@@ -6620,19 +6729,19 @@ var NgwMap = (function (exports) {
|
|
|
6620
6729
|
throw new Error(`Expression "${name}" is not supported.`);
|
|
6621
6730
|
}
|
|
6622
6731
|
|
|
6623
|
-
var __defProp$
|
|
6732
|
+
var __defProp$d = Object.defineProperty;
|
|
6624
6733
|
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
6625
6734
|
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
6626
6735
|
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
6627
|
-
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;
|
|
6628
6737
|
var __spreadValues$5 = (a, b) => {
|
|
6629
6738
|
for (var prop in b || (b = {}))
|
|
6630
6739
|
if (__hasOwnProp$6.call(b, prop))
|
|
6631
|
-
__defNormalProp$
|
|
6740
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
6632
6741
|
if (__getOwnPropSymbols$6)
|
|
6633
6742
|
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
6634
6743
|
if (__propIsEnum$6.call(b, prop))
|
|
6635
|
-
__defNormalProp$
|
|
6744
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
6636
6745
|
}
|
|
6637
6746
|
return a;
|
|
6638
6747
|
};
|
|
@@ -6671,19 +6780,19 @@ var NgwMap = (function (exports) {
|
|
|
6671
6780
|
return;
|
|
6672
6781
|
}
|
|
6673
6782
|
|
|
6674
|
-
var __defProp$
|
|
6783
|
+
var __defProp$c = Object.defineProperty;
|
|
6675
6784
|
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
6676
6785
|
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
6677
6786
|
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
6678
|
-
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;
|
|
6679
6788
|
var __spreadValues$4 = (a, b) => {
|
|
6680
6789
|
for (var prop in b || (b = {}))
|
|
6681
6790
|
if (__hasOwnProp$5.call(b, prop))
|
|
6682
|
-
__defNormalProp$
|
|
6791
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
6683
6792
|
if (__getOwnPropSymbols$5)
|
|
6684
6793
|
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
6685
6794
|
if (__propIsEnum$5.call(b, prop))
|
|
6686
|
-
__defNormalProp$
|
|
6795
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
6687
6796
|
}
|
|
6688
6797
|
return a;
|
|
6689
6798
|
};
|
|
@@ -6807,95 +6916,95 @@ var NgwMap = (function (exports) {
|
|
|
6807
6916
|
return newPaint;
|
|
6808
6917
|
}
|
|
6809
6918
|
|
|
6810
|
-
var __defProp$
|
|
6811
|
-
var __defNormalProp$
|
|
6812
|
-
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);
|
|
6813
6922
|
class KeyCodes {
|
|
6814
6923
|
constructor() {
|
|
6815
|
-
__publicField$
|
|
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$
|
|
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);
|
|
6869
6978
|
// "comma";
|
|
6870
|
-
__publicField$
|
|
6979
|
+
__publicField$9(this, "-", 189);
|
|
6871
6980
|
// "dash";
|
|
6872
|
-
__publicField$
|
|
6981
|
+
__publicField$9(this, ".", 190);
|
|
6873
6982
|
// "period";
|
|
6874
|
-
__publicField$
|
|
6983
|
+
__publicField$9(this, "/", 191);
|
|
6875
6984
|
// "forward slash";
|
|
6876
|
-
__publicField$
|
|
6985
|
+
__publicField$9(this, "`", 192);
|
|
6877
6986
|
// "grave accent";
|
|
6878
|
-
__publicField$
|
|
6987
|
+
__publicField$9(this, "[", 219);
|
|
6879
6988
|
// "open bracket";
|
|
6880
|
-
__publicField$
|
|
6989
|
+
__publicField$9(this, "\\", 220);
|
|
6881
6990
|
// "back slash";
|
|
6882
|
-
__publicField$
|
|
6991
|
+
__publicField$9(this, "]", 221);
|
|
6883
6992
|
// "close braket";
|
|
6884
|
-
__publicField$
|
|
6993
|
+
__publicField$9(this, "'", 222);
|
|
6885
6994
|
}
|
|
6886
6995
|
// "single quote"
|
|
6887
6996
|
}
|
|
6888
6997
|
|
|
6889
|
-
var __defProp$
|
|
6890
|
-
var __defNormalProp$
|
|
6891
|
-
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);
|
|
6892
7001
|
class Keys {
|
|
6893
7002
|
constructor() {
|
|
6894
|
-
__publicField$
|
|
6895
|
-
__publicField$
|
|
6896
|
-
__publicField$
|
|
6897
|
-
__publicField$
|
|
6898
|
-
__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");
|
|
6899
7008
|
this._windowOnFocus = this.windowOnFocus.bind(this);
|
|
6900
7009
|
this._keysPressed = this.keysPressed.bind(this);
|
|
6901
7010
|
this._keysReleased = this.keysReleased.bind(this);
|
|
@@ -6934,15 +7043,15 @@ var NgwMap = (function (exports) {
|
|
|
6934
7043
|
}
|
|
6935
7044
|
}
|
|
6936
7045
|
|
|
6937
|
-
var __defProp$
|
|
6938
|
-
var __defNormalProp$
|
|
6939
|
-
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);
|
|
6940
7049
|
class StateItem {
|
|
6941
7050
|
constructor(webMap, opt) {
|
|
6942
7051
|
this.webMap = webMap;
|
|
6943
|
-
__publicField$
|
|
6944
|
-
__publicField$
|
|
6945
|
-
__publicField$
|
|
7052
|
+
__publicField$7(this, "name");
|
|
7053
|
+
__publicField$7(this, "event");
|
|
7054
|
+
__publicField$7(this, "value");
|
|
6946
7055
|
if (opt) {
|
|
6947
7056
|
if (opt.value) {
|
|
6948
7057
|
this.setValue(opt.value);
|
|
@@ -6951,7 +7060,11 @@ var NgwMap = (function (exports) {
|
|
|
6951
7060
|
this.name = opt.name;
|
|
6952
7061
|
}
|
|
6953
7062
|
if (opt.event) {
|
|
6954
|
-
|
|
7063
|
+
if (typeof opt.event === "string") {
|
|
7064
|
+
this.event = [opt.event];
|
|
7065
|
+
} else {
|
|
7066
|
+
this.event = opt.event;
|
|
7067
|
+
}
|
|
6955
7068
|
}
|
|
6956
7069
|
}
|
|
6957
7070
|
}
|
|
@@ -6963,6 +7076,34 @@ var NgwMap = (function (exports) {
|
|
|
6963
7076
|
}
|
|
6964
7077
|
}
|
|
6965
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
|
+
|
|
6966
7107
|
var __defProp$7 = Object.defineProperty;
|
|
6967
7108
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6968
7109
|
var __publicField$5 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -6970,7 +7111,7 @@ var NgwMap = (function (exports) {
|
|
|
6970
7111
|
constructor() {
|
|
6971
7112
|
super(...arguments);
|
|
6972
7113
|
__publicField$5(this, "name", "center");
|
|
6973
|
-
__publicField$5(this, "event", "moveend");
|
|
7114
|
+
__publicField$5(this, "event", ["moveend"]);
|
|
6974
7115
|
}
|
|
6975
7116
|
getValue() {
|
|
6976
7117
|
return this.webMap.getCenter();
|
|
@@ -6978,9 +7119,13 @@ var NgwMap = (function (exports) {
|
|
|
6978
7119
|
setValue(val) {
|
|
6979
7120
|
this.webMap.setCenter(val);
|
|
6980
7121
|
}
|
|
6981
|
-
toString(
|
|
6982
|
-
const
|
|
6983
|
-
|
|
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 "";
|
|
6984
7129
|
}
|
|
6985
7130
|
parse(str) {
|
|
6986
7131
|
const lngLat = str.split("_").map(Number);
|
|
@@ -6995,7 +7140,7 @@ var NgwMap = (function (exports) {
|
|
|
6995
7140
|
constructor() {
|
|
6996
7141
|
super(...arguments);
|
|
6997
7142
|
__publicField$4(this, "name", "zoom");
|
|
6998
|
-
__publicField$4(this, "event", "zoomend");
|
|
7143
|
+
__publicField$4(this, "event", ["zoomend"]);
|
|
6999
7144
|
}
|
|
7000
7145
|
getValue() {
|
|
7001
7146
|
const zoom = this.webMap.getZoom();
|
|
@@ -7004,8 +7149,8 @@ var NgwMap = (function (exports) {
|
|
|
7004
7149
|
setValue(val) {
|
|
7005
7150
|
this.webMap.setZoom(val);
|
|
7006
7151
|
}
|
|
7007
|
-
toString(
|
|
7008
|
-
return String(
|
|
7152
|
+
toString() {
|
|
7153
|
+
return String(this.getValue());
|
|
7009
7154
|
}
|
|
7010
7155
|
parse(str) {
|
|
7011
7156
|
return Number(str);
|
|
@@ -7074,14 +7219,14 @@ var NgwMap = (function (exports) {
|
|
|
7074
7219
|
__publicField$3(this, "mapAdapter");
|
|
7075
7220
|
__publicField$3(this, "runtimeParams", []);
|
|
7076
7221
|
__publicField$3(this, "getPaintFunctions", _WebMapMain.getPaintFunctions);
|
|
7077
|
-
__publicField$3(this, "
|
|
7222
|
+
__publicField$3(this, "mapStateItems", [CenterState, ZoomState, BoundState]);
|
|
7078
7223
|
__publicField$3(this, "id", ID++);
|
|
7079
7224
|
/**
|
|
7080
7225
|
* From runtime params
|
|
7081
7226
|
*/
|
|
7227
|
+
__publicField$3(this, "mapState", []);
|
|
7082
7228
|
__publicField$3(this, "_initMapState", {});
|
|
7083
7229
|
__publicField$3(this, "_starterKits");
|
|
7084
|
-
__publicField$3(this, "_mapState", []);
|
|
7085
7230
|
__publicField$3(this, "_extent");
|
|
7086
7231
|
__publicField$3(this, "_eventsStatus", {});
|
|
7087
7232
|
__publicField$3(this, "_coordFromMapClickAbort");
|
|
@@ -7116,7 +7261,7 @@ var NgwMap = (function (exports) {
|
|
|
7116
7261
|
create() {
|
|
7117
7262
|
return __async$6(this, null, function* () {
|
|
7118
7263
|
if (!this.getEventStatus("create")) {
|
|
7119
|
-
yield this._setInitMapState(this.
|
|
7264
|
+
yield this._setInitMapState(this.mapStateItems);
|
|
7120
7265
|
yield this._setupMap();
|
|
7121
7266
|
this._emitStatusEvent("create", this);
|
|
7122
7267
|
}
|
|
@@ -7136,16 +7281,22 @@ var NgwMap = (function (exports) {
|
|
|
7136
7281
|
this.mapAdapter.destroy();
|
|
7137
7282
|
}
|
|
7138
7283
|
}
|
|
7139
|
-
|
|
7284
|
+
mapStateWithFunc(func) {
|
|
7140
7285
|
const state = {};
|
|
7141
|
-
this.
|
|
7142
|
-
state[x.name] = x
|
|
7286
|
+
this.mapState.forEach((x) => {
|
|
7287
|
+
state[x.name] = func(x);
|
|
7143
7288
|
});
|
|
7144
7289
|
return state;
|
|
7145
7290
|
}
|
|
7291
|
+
getStateAsString() {
|
|
7292
|
+
return this.mapStateWithFunc((x) => x.toString());
|
|
7293
|
+
}
|
|
7294
|
+
getState() {
|
|
7295
|
+
return this.mapStateWithFunc((x) => x.getValue());
|
|
7296
|
+
}
|
|
7146
7297
|
getRuntimeParams() {
|
|
7147
7298
|
const state = {};
|
|
7148
|
-
this.
|
|
7299
|
+
this.mapState.forEach((x) => {
|
|
7149
7300
|
for (const r of this.runtimeParams) {
|
|
7150
7301
|
const val = r.get(x.name);
|
|
7151
7302
|
if (val !== void 0) {
|
|
@@ -7487,7 +7638,7 @@ var NgwMap = (function (exports) {
|
|
|
7487
7638
|
_setInitMapState(states) {
|
|
7488
7639
|
for (const X of states) {
|
|
7489
7640
|
const state = new X(this);
|
|
7490
|
-
this.
|
|
7641
|
+
this.mapState.push(state);
|
|
7491
7642
|
for (const r of this.runtimeParams) {
|
|
7492
7643
|
const str = r.get(state.name);
|
|
7493
7644
|
if (str !== void 0) {
|
|
@@ -7523,13 +7674,15 @@ var NgwMap = (function (exports) {
|
|
|
7523
7674
|
events.forEach((x) => {
|
|
7524
7675
|
this._mapEvents[x] = (data) => {
|
|
7525
7676
|
if (this.runtimeParams.length) {
|
|
7526
|
-
const
|
|
7527
|
-
|
|
7528
|
-
|
|
7677
|
+
const mapStatusEvents = this.mapState.filter(
|
|
7678
|
+
(y) => y.event.includes(x)
|
|
7679
|
+
);
|
|
7680
|
+
mapStatusEvents.forEach((mapStatusEvent) => {
|
|
7681
|
+
const value = mapStatusEvent.toString();
|
|
7529
7682
|
this.runtimeParams.forEach((r) => {
|
|
7530
7683
|
r.set(mapStatusEvent.name, value);
|
|
7531
7684
|
});
|
|
7532
|
-
}
|
|
7685
|
+
});
|
|
7533
7686
|
}
|
|
7534
7687
|
if (this._eventsStatus) {
|
|
7535
7688
|
this.emitter.emit(x, data);
|
|
@@ -8105,11 +8258,11 @@ var NgwMap = (function (exports) {
|
|
|
8105
8258
|
}
|
|
8106
8259
|
return Promise.resolve();
|
|
8107
8260
|
}
|
|
8108
|
-
updateLayer(layerDef) {
|
|
8261
|
+
updateLayer(layerDef, options) {
|
|
8109
8262
|
const layer = this.getLayer(layerDef);
|
|
8110
8263
|
if (layer) {
|
|
8111
8264
|
if (layer.updateLayer) {
|
|
8112
|
-
return Promise.resolve(layer.updateLayer());
|
|
8265
|
+
return Promise.resolve(layer.updateLayer(options));
|
|
8113
8266
|
} else if (this.isLayerVisible(layer)) {
|
|
8114
8267
|
return this.hideLayer(layer, { silent: true }).then(() => {
|
|
8115
8268
|
return this.showLayer(layer, { silent: true });
|