@nextgis/ngw-map 3.0.1 → 4.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +3 -3
- package/lib/ngw-map.cjs.js +6 -3
- package/lib/ngw-map.cjs.js.map +1 -1
- package/lib/ngw-map.cjs.prod.js +1 -1
- package/lib/ngw-map.cjs.prod.js.map +1 -1
- package/lib/ngw-map.esm-browser.js +921 -709
- 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 +6 -3
- package/lib/ngw-map.esm-bundler.js.map +1 -1
- package/lib/ngw-map.esm-bundler.prod.js +1 -1
- package/lib/ngw-map.esm-bundler.prod.js.map +1 -1
- package/lib/ngw-map.global.js +921 -709
- 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 +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version:
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 4.0.0-alpha.0; author: NextGIS */
|
|
2
2
|
const svgPath = {
|
|
3
3
|
brill: '<path d="m6 0-5 6 5 6 5-6z"/>',
|
|
4
4
|
circle: '<circle cx="6" cy="6" r="6"/>',
|
|
@@ -351,6 +351,20 @@ function isArray(val) {
|
|
|
351
351
|
function fixUrlStr(url) {
|
|
352
352
|
return url.replace(/([^:]\/)\/+/g, "$1");
|
|
353
353
|
}
|
|
354
|
+
function updateUrlParams(urlStr, params) {
|
|
355
|
+
const url = new URL(urlStr);
|
|
356
|
+
const searchParams = new URLSearchParams(url.search);
|
|
357
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
358
|
+
if (value === void 0) {
|
|
359
|
+
searchParams.delete(key);
|
|
360
|
+
} else {
|
|
361
|
+
searchParams.set(key, value);
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
searchParams.set("timestamp", String((/* @__PURE__ */ new Date()).getTime()));
|
|
365
|
+
const newSearch = [...searchParams.entries()].map(([key, value]) => `${key}=${value}`).join("&");
|
|
366
|
+
return `${url.origin}${url.pathname}?${newSearch}`;
|
|
367
|
+
}
|
|
354
368
|
|
|
355
369
|
const templateRe = /\{ *([\w_-]+) *\}/g;
|
|
356
370
|
function template(str, data) {
|
|
@@ -365,19 +379,19 @@ function template(str, data) {
|
|
|
365
379
|
});
|
|
366
380
|
}
|
|
367
381
|
|
|
368
|
-
var __defProp$
|
|
369
|
-
var __getOwnPropSymbols$
|
|
370
|
-
var __hasOwnProp$
|
|
371
|
-
var __propIsEnum$
|
|
372
|
-
var __defNormalProp$
|
|
373
|
-
var __spreadValues$
|
|
382
|
+
var __defProp$S = Object.defineProperty;
|
|
383
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
384
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
385
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
386
|
+
var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
387
|
+
var __spreadValues$z = (a, b) => {
|
|
374
388
|
for (var prop in b || (b = {}))
|
|
375
|
-
if (__hasOwnProp$
|
|
376
|
-
__defNormalProp$
|
|
377
|
-
if (__getOwnPropSymbols$
|
|
378
|
-
for (var prop of __getOwnPropSymbols$
|
|
379
|
-
if (__propIsEnum$
|
|
380
|
-
__defNormalProp$
|
|
389
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
390
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
391
|
+
if (__getOwnPropSymbols$A)
|
|
392
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
393
|
+
if (__propIsEnum$A.call(b, prop))
|
|
394
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
381
395
|
}
|
|
382
396
|
return a;
|
|
383
397
|
};
|
|
@@ -440,7 +454,7 @@ function apiRequest(opt) {
|
|
|
440
454
|
}
|
|
441
455
|
}
|
|
442
456
|
if (url) {
|
|
443
|
-
return connector.makeQuery(url, params, __spreadValues$
|
|
457
|
+
return connector.makeQuery(url, params, __spreadValues$z({
|
|
444
458
|
cacheName: name
|
|
445
459
|
}, requestOptions));
|
|
446
460
|
} else {
|
|
@@ -452,9 +466,9 @@ function apiRequest(opt) {
|
|
|
452
466
|
});
|
|
453
467
|
}
|
|
454
468
|
|
|
455
|
-
var __defProp$
|
|
456
|
-
var __defNormalProp$
|
|
457
|
-
var __publicField$A = (obj, key, value) => __defNormalProp$
|
|
469
|
+
var __defProp$R = Object.defineProperty;
|
|
470
|
+
var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
471
|
+
var __publicField$A = (obj, key, value) => __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
458
472
|
const _Cache = class _Cache {
|
|
459
473
|
constructor(options = {}) {
|
|
460
474
|
__publicField$A(this, "cache", []);
|
|
@@ -621,7 +635,9 @@ EventEmitter.init = function() {
|
|
|
621
635
|
this.domain = null;
|
|
622
636
|
if (EventEmitter.usingDomains) {
|
|
623
637
|
// if there is an active domain, then attach to it.
|
|
624
|
-
if (domain.active)
|
|
638
|
+
if (domain.active && !(this instanceof domain.Domain)) {
|
|
639
|
+
this.domain = domain.active;
|
|
640
|
+
}
|
|
625
641
|
}
|
|
626
642
|
|
|
627
643
|
if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
|
|
@@ -1064,63 +1080,7 @@ function unwrapListeners(arr) {
|
|
|
1064
1080
|
}
|
|
1065
1081
|
|
|
1066
1082
|
var pkg = {
|
|
1067
|
-
|
|
1068
|
-
version: "3.0.1",
|
|
1069
|
-
_priority: 12,
|
|
1070
|
-
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
1071
|
-
main: "index.js",
|
|
1072
|
-
module: "lib/ngw-connector.esm-bundler.js",
|
|
1073
|
-
unpkg: "lib/ngw-connector.global.prod.js",
|
|
1074
|
-
jsdelivr: "lib/ngw-connector.global.prod.js",
|
|
1075
|
-
types: "lib/index.d.ts",
|
|
1076
|
-
dependencies: {
|
|
1077
|
-
"@nextgis/cache": "3.0.0",
|
|
1078
|
-
"@nextgis/cancelable-promise": "3.0.0",
|
|
1079
|
-
"@nextgis/utils": "3.0.0",
|
|
1080
|
-
"@types/events": "^3.0.0",
|
|
1081
|
-
events: "*",
|
|
1082
|
-
"form-data": "^4.0.0"
|
|
1083
|
-
},
|
|
1084
|
-
devDependencies: {
|
|
1085
|
-
"@nextgis/build-tools": "3.0.0"
|
|
1086
|
-
},
|
|
1087
|
-
scripts: {
|
|
1088
|
-
clean: "rimraf ./lib",
|
|
1089
|
-
dev: "node ../build-tools/lib/build.js",
|
|
1090
|
-
prod: "npm run dev -- --release",
|
|
1091
|
-
lint: "eslint ./src/**/*.ts --fix --c ../../.eslintrc",
|
|
1092
|
-
watch: "npm run dev -- --watch",
|
|
1093
|
-
"gen:types": "node ./scripts/generator"
|
|
1094
|
-
},
|
|
1095
|
-
buildOptions: {
|
|
1096
|
-
name: "NgwConnector",
|
|
1097
|
-
formats: [
|
|
1098
|
-
"esm-bundler",
|
|
1099
|
-
"esm-browser",
|
|
1100
|
-
"cjs",
|
|
1101
|
-
"global"
|
|
1102
|
-
]
|
|
1103
|
-
},
|
|
1104
|
-
keywords: [
|
|
1105
|
-
"NextGIS",
|
|
1106
|
-
"MAP"
|
|
1107
|
-
],
|
|
1108
|
-
author: "NextGIS",
|
|
1109
|
-
files: [
|
|
1110
|
-
"index.js",
|
|
1111
|
-
"lib"
|
|
1112
|
-
],
|
|
1113
|
-
license: "MIT",
|
|
1114
|
-
homepage: "https://github.com/nextgis/nextgis_frontend/tree/master/packages/ngw-connector#readme",
|
|
1115
|
-
repository: {
|
|
1116
|
-
type: "git",
|
|
1117
|
-
url: "git://github.com/nextgis/nextgis_frontend.git"
|
|
1118
|
-
},
|
|
1119
|
-
engines: {
|
|
1120
|
-
node: ">=18.20.4"
|
|
1121
|
-
},
|
|
1122
|
-
gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
|
|
1123
|
-
};
|
|
1083
|
+
version: "3.0.1"};
|
|
1124
1084
|
|
|
1125
1085
|
class AbortError extends Error {
|
|
1126
1086
|
constructor(message = "AbortError") {
|
|
@@ -1129,9 +1089,9 @@ class AbortError extends Error {
|
|
|
1129
1089
|
}
|
|
1130
1090
|
}
|
|
1131
1091
|
|
|
1132
|
-
var __defProp$
|
|
1133
|
-
var __defNormalProp$
|
|
1134
|
-
var __publicField$z = (obj, key, value) => __defNormalProp$
|
|
1092
|
+
var __defProp$Q = Object.defineProperty;
|
|
1093
|
+
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1094
|
+
var __publicField$z = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1135
1095
|
class NgwError extends Error {
|
|
1136
1096
|
constructor(er) {
|
|
1137
1097
|
super();
|
|
@@ -1148,9 +1108,9 @@ class NgwError extends Error {
|
|
|
1148
1108
|
}
|
|
1149
1109
|
}
|
|
1150
1110
|
|
|
1151
|
-
var __defProp$
|
|
1152
|
-
var __defNormalProp$
|
|
1153
|
-
var __publicField$y = (obj, key, value) => __defNormalProp$
|
|
1111
|
+
var __defProp$P = Object.defineProperty;
|
|
1112
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1113
|
+
var __publicField$y = (obj, key, value) => __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1154
1114
|
class InsufficientPermissionsError extends NgwError {
|
|
1155
1115
|
constructor(obj) {
|
|
1156
1116
|
super(obj);
|
|
@@ -1160,9 +1120,9 @@ class InsufficientPermissionsError extends NgwError {
|
|
|
1160
1120
|
}
|
|
1161
1121
|
}
|
|
1162
1122
|
|
|
1163
|
-
var __defProp$
|
|
1164
|
-
var __defNormalProp$
|
|
1165
|
-
var __publicField$x = (obj, key, value) => __defNormalProp$
|
|
1123
|
+
var __defProp$O = Object.defineProperty;
|
|
1124
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1125
|
+
var __publicField$x = (obj, key, value) => __defNormalProp$O(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1166
1126
|
let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
|
|
1167
1127
|
constructor(obj) {
|
|
1168
1128
|
super(obj);
|
|
@@ -1205,9 +1165,9 @@ function isError(error) {
|
|
|
1205
1165
|
return false;
|
|
1206
1166
|
}
|
|
1207
1167
|
|
|
1208
|
-
var __defProp$
|
|
1209
|
-
var __defNormalProp$
|
|
1210
|
-
var __publicField$w = (obj, key, value) => __defNormalProp$
|
|
1168
|
+
var __defProp$N = Object.defineProperty;
|
|
1169
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1170
|
+
var __publicField$w = (obj, key, value) => __defNormalProp$N(obj, key + "" , value);
|
|
1211
1171
|
class NetworkError extends Error {
|
|
1212
1172
|
constructor(url) {
|
|
1213
1173
|
super();
|
|
@@ -1218,9 +1178,9 @@ class NetworkError extends Error {
|
|
|
1218
1178
|
}
|
|
1219
1179
|
}
|
|
1220
1180
|
|
|
1221
|
-
var __defProp$
|
|
1222
|
-
var __defNormalProp$
|
|
1223
|
-
var __publicField$v = (obj, key, value) => __defNormalProp$
|
|
1181
|
+
var __defProp$M = Object.defineProperty;
|
|
1182
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1183
|
+
var __publicField$v = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1224
1184
|
class ResourceNotFoundError extends NgwError {
|
|
1225
1185
|
constructor(obj) {
|
|
1226
1186
|
super(obj);
|
|
@@ -1242,9 +1202,9 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
1242
1202
|
isError: isError
|
|
1243
1203
|
});
|
|
1244
1204
|
|
|
1245
|
-
var __defProp$
|
|
1246
|
-
var __defNormalProp$
|
|
1247
|
-
var __publicField$u = (obj, key, value) => __defNormalProp$
|
|
1205
|
+
var __defProp$L = Object.defineProperty;
|
|
1206
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1207
|
+
var __publicField$u = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1248
1208
|
class BaseAPIError extends Error {
|
|
1249
1209
|
constructor(message) {
|
|
1250
1210
|
super(message || "Something went wrong.");
|
|
@@ -1306,30 +1266,30 @@ class LunkwillRequestFailed extends LunkwillError {
|
|
|
1306
1266
|
}
|
|
1307
1267
|
}
|
|
1308
1268
|
|
|
1309
|
-
var __defProp$
|
|
1310
|
-
var __getOwnPropSymbols$
|
|
1311
|
-
var __hasOwnProp$
|
|
1312
|
-
var __propIsEnum$
|
|
1313
|
-
var __defNormalProp$
|
|
1314
|
-
var __spreadValues$
|
|
1269
|
+
var __defProp$K = Object.defineProperty;
|
|
1270
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
1271
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
1272
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
1273
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1274
|
+
var __spreadValues$y = (a, b) => {
|
|
1315
1275
|
for (var prop in b || (b = {}))
|
|
1316
|
-
if (__hasOwnProp$
|
|
1317
|
-
__defNormalProp$
|
|
1318
|
-
if (__getOwnPropSymbols$
|
|
1319
|
-
for (var prop of __getOwnPropSymbols$
|
|
1320
|
-
if (__propIsEnum$
|
|
1321
|
-
__defNormalProp$
|
|
1276
|
+
if (__hasOwnProp$z.call(b, prop))
|
|
1277
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
1278
|
+
if (__getOwnPropSymbols$z)
|
|
1279
|
+
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
1280
|
+
if (__propIsEnum$z.call(b, prop))
|
|
1281
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
1322
1282
|
}
|
|
1323
1283
|
return a;
|
|
1324
1284
|
};
|
|
1325
|
-
var __objRest$
|
|
1285
|
+
var __objRest$7 = (source, exclude) => {
|
|
1326
1286
|
var target = {};
|
|
1327
1287
|
for (var prop in source)
|
|
1328
|
-
if (__hasOwnProp$
|
|
1288
|
+
if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1329
1289
|
target[prop] = source[prop];
|
|
1330
|
-
if (source != null && __getOwnPropSymbols$
|
|
1331
|
-
for (var prop of __getOwnPropSymbols$
|
|
1332
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1290
|
+
if (source != null && __getOwnPropSymbols$z)
|
|
1291
|
+
for (var prop of __getOwnPropSymbols$z(source)) {
|
|
1292
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
|
|
1333
1293
|
target[prop] = source[prop];
|
|
1334
1294
|
}
|
|
1335
1295
|
return target;
|
|
@@ -1467,7 +1427,7 @@ function request(path, options, cacheEngine) {
|
|
|
1467
1427
|
credentials: "same-origin",
|
|
1468
1428
|
headers: {}
|
|
1469
1429
|
};
|
|
1470
|
-
const _a = __spreadValues$
|
|
1430
|
+
const _a = __spreadValues$y(__spreadValues$y({}, defaults), options), {
|
|
1471
1431
|
withCredentials,
|
|
1472
1432
|
responseType,
|
|
1473
1433
|
cacheProps,
|
|
@@ -1476,7 +1436,7 @@ function request(path, options, cacheEngine) {
|
|
|
1476
1436
|
cache,
|
|
1477
1437
|
query,
|
|
1478
1438
|
json
|
|
1479
|
-
} = _a, opt = __objRest$
|
|
1439
|
+
} = _a, opt = __objRest$7(_a, [
|
|
1480
1440
|
"withCredentials",
|
|
1481
1441
|
"responseType",
|
|
1482
1442
|
"cacheProps",
|
|
@@ -1547,7 +1507,7 @@ function request(path, options, cacheEngine) {
|
|
|
1547
1507
|
if (cacheEngine) {
|
|
1548
1508
|
if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
|
|
1549
1509
|
if (cache !== false) {
|
|
1550
|
-
const props = cacheProps ? cacheProps : __spreadValues$
|
|
1510
|
+
const props = cacheProps ? cacheProps : __spreadValues$y({}, objectRemoveEmpty({
|
|
1551
1511
|
withCredentials,
|
|
1552
1512
|
responseType
|
|
1553
1513
|
}));
|
|
@@ -1567,33 +1527,33 @@ function request(path, options, cacheEngine) {
|
|
|
1567
1527
|
});
|
|
1568
1528
|
}
|
|
1569
1529
|
|
|
1570
|
-
var __defProp$
|
|
1571
|
-
var __defProps$
|
|
1572
|
-
var __getOwnPropDescs$
|
|
1573
|
-
var __getOwnPropSymbols$
|
|
1574
|
-
var __hasOwnProp$
|
|
1575
|
-
var __propIsEnum$
|
|
1576
|
-
var __defNormalProp$
|
|
1577
|
-
var __spreadValues$
|
|
1530
|
+
var __defProp$J = Object.defineProperty;
|
|
1531
|
+
var __defProps$k = Object.defineProperties;
|
|
1532
|
+
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
1533
|
+
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
1534
|
+
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
1535
|
+
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
1536
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1537
|
+
var __spreadValues$x = (a, b) => {
|
|
1578
1538
|
for (var prop in b || (b = {}))
|
|
1579
|
-
if (__hasOwnProp$
|
|
1580
|
-
__defNormalProp$
|
|
1581
|
-
if (__getOwnPropSymbols$
|
|
1582
|
-
for (var prop of __getOwnPropSymbols$
|
|
1583
|
-
if (__propIsEnum$
|
|
1584
|
-
__defNormalProp$
|
|
1539
|
+
if (__hasOwnProp$y.call(b, prop))
|
|
1540
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
1541
|
+
if (__getOwnPropSymbols$y)
|
|
1542
|
+
for (var prop of __getOwnPropSymbols$y(b)) {
|
|
1543
|
+
if (__propIsEnum$y.call(b, prop))
|
|
1544
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
1585
1545
|
}
|
|
1586
1546
|
return a;
|
|
1587
1547
|
};
|
|
1588
|
-
var __spreadProps$
|
|
1589
|
-
var __objRest$
|
|
1548
|
+
var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
|
|
1549
|
+
var __objRest$6 = (source, exclude) => {
|
|
1590
1550
|
var target = {};
|
|
1591
1551
|
for (var prop in source)
|
|
1592
|
-
if (__hasOwnProp$
|
|
1552
|
+
if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1593
1553
|
target[prop] = source[prop];
|
|
1594
|
-
if (source != null && __getOwnPropSymbols$
|
|
1595
|
-
for (var prop of __getOwnPropSymbols$
|
|
1596
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1554
|
+
if (source != null && __getOwnPropSymbols$y)
|
|
1555
|
+
for (var prop of __getOwnPropSymbols$y(source)) {
|
|
1556
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
|
|
1597
1557
|
target[prop] = source[prop];
|
|
1598
1558
|
}
|
|
1599
1559
|
return target;
|
|
@@ -1665,7 +1625,7 @@ function route(name, connector, ...rest) {
|
|
|
1665
1625
|
for (const method of methods) {
|
|
1666
1626
|
const methodResp = (requestOptions) => {
|
|
1667
1627
|
var _b;
|
|
1668
|
-
const _a = requestOptions || {}, { headers: optHeaders } = _a, restOpt = __objRest$
|
|
1628
|
+
const _a = requestOptions || {}, { headers: optHeaders } = _a, restOpt = __objRest$6(_a, ["headers"]);
|
|
1669
1629
|
if ((_b = requestOptions == null ? void 0 : requestOptions.signal) == null ? void 0 : _b.aborted) {
|
|
1670
1630
|
throw new AbortError();
|
|
1671
1631
|
}
|
|
@@ -1677,10 +1637,10 @@ function route(name, connector, ...rest) {
|
|
|
1677
1637
|
routeData,
|
|
1678
1638
|
...rest
|
|
1679
1639
|
);
|
|
1680
|
-
const headers = objectRemoveEmpty(__spreadValues$
|
|
1640
|
+
const headers = objectRemoveEmpty(__spreadValues$x(__spreadValues$x({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
|
|
1681
1641
|
return request(
|
|
1682
1642
|
template,
|
|
1683
|
-
__spreadProps$
|
|
1643
|
+
__spreadProps$k(__spreadValues$x({
|
|
1684
1644
|
headers
|
|
1685
1645
|
}, restOpt), {
|
|
1686
1646
|
method
|
|
@@ -1804,38 +1764,38 @@ function removeConnector(connector) {
|
|
|
1804
1764
|
}
|
|
1805
1765
|
}
|
|
1806
1766
|
|
|
1807
|
-
var __defProp$
|
|
1808
|
-
var __defProps$
|
|
1809
|
-
var __getOwnPropDescs$
|
|
1810
|
-
var __getOwnPropSymbols$
|
|
1811
|
-
var __hasOwnProp$
|
|
1812
|
-
var __propIsEnum$
|
|
1813
|
-
var __defNormalProp$
|
|
1814
|
-
var __spreadValues$
|
|
1767
|
+
var __defProp$I = Object.defineProperty;
|
|
1768
|
+
var __defProps$j = Object.defineProperties;
|
|
1769
|
+
var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
|
|
1770
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
1771
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
1772
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
1773
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1774
|
+
var __spreadValues$w = (a, b) => {
|
|
1815
1775
|
for (var prop in b || (b = {}))
|
|
1816
|
-
if (__hasOwnProp$
|
|
1817
|
-
__defNormalProp$
|
|
1818
|
-
if (__getOwnPropSymbols$
|
|
1819
|
-
for (var prop of __getOwnPropSymbols$
|
|
1820
|
-
if (__propIsEnum$
|
|
1821
|
-
__defNormalProp$
|
|
1776
|
+
if (__hasOwnProp$x.call(b, prop))
|
|
1777
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
1778
|
+
if (__getOwnPropSymbols$x)
|
|
1779
|
+
for (var prop of __getOwnPropSymbols$x(b)) {
|
|
1780
|
+
if (__propIsEnum$x.call(b, prop))
|
|
1781
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
1822
1782
|
}
|
|
1823
1783
|
return a;
|
|
1824
1784
|
};
|
|
1825
|
-
var __spreadProps$
|
|
1826
|
-
var __objRest$
|
|
1785
|
+
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
|
|
1786
|
+
var __objRest$5 = (source, exclude) => {
|
|
1827
1787
|
var target = {};
|
|
1828
1788
|
for (var prop in source)
|
|
1829
|
-
if (__hasOwnProp$
|
|
1789
|
+
if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1830
1790
|
target[prop] = source[prop];
|
|
1831
|
-
if (source != null && __getOwnPropSymbols$
|
|
1832
|
-
for (var prop of __getOwnPropSymbols$
|
|
1833
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1791
|
+
if (source != null && __getOwnPropSymbols$x)
|
|
1792
|
+
for (var prop of __getOwnPropSymbols$x(source)) {
|
|
1793
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
|
|
1834
1794
|
target[prop] = source[prop];
|
|
1835
1795
|
}
|
|
1836
1796
|
return target;
|
|
1837
1797
|
};
|
|
1838
|
-
var __publicField$t = (obj, key, value) => __defNormalProp$
|
|
1798
|
+
var __publicField$t = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1839
1799
|
var __async$t = (__this, __arguments, generator) => {
|
|
1840
1800
|
return new Promise((resolve, reject) => {
|
|
1841
1801
|
var fulfilled = (value) => {
|
|
@@ -1971,7 +1931,7 @@ class NgwConnector {
|
|
|
1971
1931
|
if (credentials) {
|
|
1972
1932
|
this.options.auth = credentials;
|
|
1973
1933
|
}
|
|
1974
|
-
const options_ = __spreadValues$
|
|
1934
|
+
const options_ = __spreadValues$w({
|
|
1975
1935
|
headers: this.getAuthorizationHeaders(credentials),
|
|
1976
1936
|
cache: true
|
|
1977
1937
|
}, options);
|
|
@@ -2012,7 +1972,7 @@ class NgwConnector {
|
|
|
2012
1972
|
this.activeRequests = {};
|
|
2013
1973
|
}
|
|
2014
1974
|
getActiveApiRequests() {
|
|
2015
|
-
return __spreadValues$
|
|
1975
|
+
return __spreadValues$w({}, this.activeRequests);
|
|
2016
1976
|
}
|
|
2017
1977
|
route(name, ...rest) {
|
|
2018
1978
|
return route(name, this, ...rest);
|
|
@@ -2031,11 +1991,11 @@ class NgwConnector {
|
|
|
2031
1991
|
throw new Error("Empty `url` not allowed");
|
|
2032
1992
|
}
|
|
2033
1993
|
if (params) {
|
|
2034
|
-
const _a = params, restParams = __objRest$
|
|
1994
|
+
const _a = params, { paramList } = _a, restParams = __objRest$5(_a, ["paramList"]);
|
|
2035
1995
|
url = template(url, restParams);
|
|
2036
1996
|
}
|
|
2037
1997
|
url = encodeURI(fixUrlStr(url));
|
|
2038
|
-
options = __spreadValues$
|
|
1998
|
+
options = __spreadValues$w({ withCredentials: this.withCredentials }, options);
|
|
2039
1999
|
const {
|
|
2040
2000
|
cache,
|
|
2041
2001
|
signal: externalSignal,
|
|
@@ -2067,7 +2027,7 @@ class NgwConnector {
|
|
|
2067
2027
|
}
|
|
2068
2028
|
});
|
|
2069
2029
|
if (method === "GET" && cache !== false) {
|
|
2070
|
-
const cacheOptions = cacheProps ? cacheProps : __spreadProps$
|
|
2030
|
+
const cacheOptions = cacheProps ? cacheProps : __spreadProps$j(__spreadValues$w({}, objectRemoveEmpty({
|
|
2071
2031
|
headers,
|
|
2072
2032
|
withCredentials,
|
|
2073
2033
|
responseType,
|
|
@@ -2090,7 +2050,7 @@ class NgwConnector {
|
|
|
2090
2050
|
var _a;
|
|
2091
2051
|
if (this.user) {
|
|
2092
2052
|
options = options || {};
|
|
2093
|
-
options.headers = __spreadValues$
|
|
2053
|
+
options.headers = __spreadValues$w(__spreadValues$w({}, this.getAuthorizationHeaders()), options.headers);
|
|
2094
2054
|
}
|
|
2095
2055
|
if (this.requestTransform) {
|
|
2096
2056
|
const [transUrl, transOptions] = this.requestTransform(url, options);
|
|
@@ -2179,26 +2139,26 @@ function resourceToQuery(resource, prefix = "") {
|
|
|
2179
2139
|
return query;
|
|
2180
2140
|
}
|
|
2181
2141
|
|
|
2182
|
-
var __defProp$
|
|
2183
|
-
var __defProps$
|
|
2184
|
-
var __getOwnPropDescs$
|
|
2185
|
-
var __getOwnPropSymbols$
|
|
2186
|
-
var __hasOwnProp$
|
|
2187
|
-
var __propIsEnum$
|
|
2188
|
-
var __defNormalProp$
|
|
2189
|
-
var __spreadValues$
|
|
2142
|
+
var __defProp$H = Object.defineProperty;
|
|
2143
|
+
var __defProps$i = Object.defineProperties;
|
|
2144
|
+
var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
|
|
2145
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
2146
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
2147
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
2148
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2149
|
+
var __spreadValues$v = (a, b) => {
|
|
2190
2150
|
for (var prop in b || (b = {}))
|
|
2191
|
-
if (__hasOwnProp$
|
|
2192
|
-
__defNormalProp$
|
|
2193
|
-
if (__getOwnPropSymbols$
|
|
2194
|
-
for (var prop of __getOwnPropSymbols$
|
|
2195
|
-
if (__propIsEnum$
|
|
2196
|
-
__defNormalProp$
|
|
2151
|
+
if (__hasOwnProp$w.call(b, prop))
|
|
2152
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
2153
|
+
if (__getOwnPropSymbols$w)
|
|
2154
|
+
for (var prop of __getOwnPropSymbols$w(b)) {
|
|
2155
|
+
if (__propIsEnum$w.call(b, prop))
|
|
2156
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
2197
2157
|
}
|
|
2198
2158
|
return a;
|
|
2199
2159
|
};
|
|
2200
|
-
var __spreadProps$
|
|
2201
|
-
var __publicField$s = (obj, key, value) => __defNormalProp$
|
|
2160
|
+
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
2161
|
+
var __publicField$s = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2202
2162
|
var __async$s = (__this, __arguments, generator) => {
|
|
2203
2163
|
return new Promise((resolve, reject) => {
|
|
2204
2164
|
var fulfilled = (value) => {
|
|
@@ -2240,7 +2200,7 @@ class ResourcesControl {
|
|
|
2240
2200
|
* Fetching resource would be cached to speed up next call
|
|
2241
2201
|
*/
|
|
2242
2202
|
getOne(resource, requestOptions) {
|
|
2243
|
-
const opt = __spreadValues$
|
|
2203
|
+
const opt = __spreadValues$v({}, requestOptions);
|
|
2244
2204
|
if (typeof resource === "string") ; else if (typeof resource === "number") ; else if (isObject(resource)) {
|
|
2245
2205
|
if (resource.id !== void 0) {
|
|
2246
2206
|
resource.id;
|
|
@@ -2317,8 +2277,8 @@ class ResourcesControl {
|
|
|
2317
2277
|
} else {
|
|
2318
2278
|
Object.assign(query, resourceToQuery(resource));
|
|
2319
2279
|
}
|
|
2320
|
-
return this.connector.route("resource.search").get(__spreadProps$
|
|
2321
|
-
query: __spreadValues$
|
|
2280
|
+
return this.connector.route("resource.search").get(__spreadProps$i(__spreadValues$v({}, requestOptions), {
|
|
2281
|
+
query: __spreadValues$v({
|
|
2322
2282
|
serialization: "full"
|
|
2323
2283
|
}, query)
|
|
2324
2284
|
})).then((resources) => {
|
|
@@ -2380,7 +2340,7 @@ class ResourcesControl {
|
|
|
2380
2340
|
} else {
|
|
2381
2341
|
parent = parentDef;
|
|
2382
2342
|
}
|
|
2383
|
-
const items = yield this.connector.route("resource.collection").get(__spreadProps$
|
|
2343
|
+
const items = yield this.connector.route("resource.collection").get(__spreadProps$i(__spreadValues$v({}, requestOptions), {
|
|
2384
2344
|
query: {
|
|
2385
2345
|
parent
|
|
2386
2346
|
}
|
|
@@ -2461,9 +2421,9 @@ class ResourcesControl {
|
|
|
2461
2421
|
}
|
|
2462
2422
|
}
|
|
2463
2423
|
|
|
2464
|
-
var __defProp$
|
|
2465
|
-
var __defNormalProp$
|
|
2466
|
-
var __publicField$r = (obj, key, value) => __defNormalProp$
|
|
2424
|
+
var __defProp$G = Object.defineProperty;
|
|
2425
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2426
|
+
var __publicField$r = (obj, key, value) => __defNormalProp$G(obj, key + "" , value);
|
|
2467
2427
|
class NgwConnectorExtended extends NgwConnector {
|
|
2468
2428
|
constructor(options) {
|
|
2469
2429
|
super(options);
|
|
@@ -2677,25 +2637,25 @@ class NgwConnectorExtended extends NgwConnector {
|
|
|
2677
2637
|
}
|
|
2678
2638
|
}
|
|
2679
2639
|
|
|
2680
|
-
var __defProp$
|
|
2681
|
-
var __defProps$
|
|
2682
|
-
var __getOwnPropDescs$
|
|
2683
|
-
var __getOwnPropSymbols$
|
|
2684
|
-
var __hasOwnProp$
|
|
2685
|
-
var __propIsEnum$
|
|
2686
|
-
var __defNormalProp$
|
|
2687
|
-
var __spreadValues$
|
|
2640
|
+
var __defProp$F = Object.defineProperty;
|
|
2641
|
+
var __defProps$h = Object.defineProperties;
|
|
2642
|
+
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
2643
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
2644
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
2645
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
2646
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2647
|
+
var __spreadValues$u = (a, b) => {
|
|
2688
2648
|
for (var prop in b || (b = {}))
|
|
2689
|
-
if (__hasOwnProp$
|
|
2690
|
-
__defNormalProp$
|
|
2691
|
-
if (__getOwnPropSymbols$
|
|
2692
|
-
for (var prop of __getOwnPropSymbols$
|
|
2693
|
-
if (__propIsEnum$
|
|
2694
|
-
__defNormalProp$
|
|
2649
|
+
if (__hasOwnProp$v.call(b, prop))
|
|
2650
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
2651
|
+
if (__getOwnPropSymbols$v)
|
|
2652
|
+
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
2653
|
+
if (__propIsEnum$v.call(b, prop))
|
|
2654
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
2695
2655
|
}
|
|
2696
2656
|
return a;
|
|
2697
2657
|
};
|
|
2698
|
-
var __spreadProps$
|
|
2658
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
2699
2659
|
function getNgwWebmapExtent(webmap) {
|
|
2700
2660
|
const bottom = webmap["extent_bottom"];
|
|
2701
2661
|
const left = webmap["extent_left"];
|
|
@@ -2762,14 +2722,14 @@ function fetchNgwResourceExtent(item, connector, options) {
|
|
|
2762
2722
|
if (resource.cls && resource.parent && resource.cls.indexOf("style") !== -1) {
|
|
2763
2723
|
return connector.getResource(resource.parent.id, options).then((res) => {
|
|
2764
2724
|
if (res) {
|
|
2765
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
2725
|
+
return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$u({}, options), {
|
|
2766
2726
|
resourceId: res.resource.id,
|
|
2767
2727
|
connector
|
|
2768
2728
|
}));
|
|
2769
2729
|
}
|
|
2770
2730
|
});
|
|
2771
2731
|
} else {
|
|
2772
|
-
return fetchNgwLayerExtent(__spreadProps$
|
|
2732
|
+
return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$u({}, options), {
|
|
2773
2733
|
resourceId: resource.id,
|
|
2774
2734
|
connector
|
|
2775
2735
|
}));
|
|
@@ -2777,9 +2737,9 @@ function fetchNgwResourceExtent(item, connector, options) {
|
|
|
2777
2737
|
}
|
|
2778
2738
|
}
|
|
2779
2739
|
|
|
2780
|
-
var __defProp$
|
|
2781
|
-
var __defNormalProp$
|
|
2782
|
-
var __publicField$q = (obj, key, value) => __defNormalProp$
|
|
2740
|
+
var __defProp$E = Object.defineProperty;
|
|
2741
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2742
|
+
var __publicField$q = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2783
2743
|
var __async$r = (__this, __arguments, generator) => {
|
|
2784
2744
|
return new Promise((resolve, reject) => {
|
|
2785
2745
|
var fulfilled = (value) => {
|
|
@@ -2875,23 +2835,23 @@ function resourceIdFromLayerOptions(options, connector) {
|
|
|
2875
2835
|
});
|
|
2876
2836
|
}
|
|
2877
2837
|
|
|
2878
|
-
var __defProp$
|
|
2879
|
-
var __getOwnPropSymbols$
|
|
2880
|
-
var __hasOwnProp$
|
|
2881
|
-
var __propIsEnum$
|
|
2882
|
-
var __defNormalProp$
|
|
2883
|
-
var __spreadValues$
|
|
2838
|
+
var __defProp$D = Object.defineProperty;
|
|
2839
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
2840
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
2841
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
2842
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2843
|
+
var __spreadValues$t = (a, b) => {
|
|
2884
2844
|
for (var prop in b || (b = {}))
|
|
2885
|
-
if (__hasOwnProp$
|
|
2886
|
-
__defNormalProp$
|
|
2887
|
-
if (__getOwnPropSymbols$
|
|
2888
|
-
for (var prop of __getOwnPropSymbols$
|
|
2889
|
-
if (__propIsEnum$
|
|
2890
|
-
__defNormalProp$
|
|
2845
|
+
if (__hasOwnProp$u.call(b, prop))
|
|
2846
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
2847
|
+
if (__getOwnPropSymbols$u)
|
|
2848
|
+
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
2849
|
+
if (__propIsEnum$u.call(b, prop))
|
|
2850
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
2891
2851
|
}
|
|
2892
2852
|
return a;
|
|
2893
2853
|
};
|
|
2894
|
-
var __publicField$p = (obj, key, value) => __defNormalProp$
|
|
2854
|
+
var __publicField$p = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2895
2855
|
var __async$p = (__this, __arguments, generator) => {
|
|
2896
2856
|
return new Promise((resolve, reject) => {
|
|
2897
2857
|
var fulfilled = (value) => {
|
|
@@ -2966,7 +2926,7 @@ function createOnFirstShowAdapter(_0) {
|
|
|
2966
2926
|
this._creatingInProgress = true;
|
|
2967
2927
|
const Adapter = yield createAdapter(this);
|
|
2968
2928
|
if (Adapter) {
|
|
2969
|
-
const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$
|
|
2929
|
+
const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$t({}, adapterOptions));
|
|
2970
2930
|
const realLayer = yield adapter.addLayer({
|
|
2971
2931
|
order: this.options.order,
|
|
2972
2932
|
headers: this.options.headers,
|
|
@@ -3050,19 +3010,19 @@ function createOnFirstShowNgwAdapter(_0) {
|
|
|
3050
3010
|
});
|
|
3051
3011
|
}
|
|
3052
3012
|
|
|
3053
|
-
var __defProp$
|
|
3054
|
-
var __getOwnPropSymbols$
|
|
3055
|
-
var __hasOwnProp$
|
|
3056
|
-
var __propIsEnum$
|
|
3057
|
-
var __defNormalProp$
|
|
3058
|
-
var __spreadValues$
|
|
3013
|
+
var __defProp$C = Object.defineProperty;
|
|
3014
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
3015
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
3016
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
3017
|
+
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3018
|
+
var __spreadValues$s = (a, b) => {
|
|
3059
3019
|
for (var prop in b || (b = {}))
|
|
3060
|
-
if (__hasOwnProp$
|
|
3061
|
-
__defNormalProp$
|
|
3062
|
-
if (__getOwnPropSymbols$
|
|
3063
|
-
for (var prop of __getOwnPropSymbols$
|
|
3064
|
-
if (__propIsEnum$
|
|
3065
|
-
__defNormalProp$
|
|
3020
|
+
if (__hasOwnProp$t.call(b, prop))
|
|
3021
|
+
__defNormalProp$C(a, prop, b[prop]);
|
|
3022
|
+
if (__getOwnPropSymbols$t)
|
|
3023
|
+
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
3024
|
+
if (__propIsEnum$t.call(b, prop))
|
|
3025
|
+
__defNormalProp$C(a, prop, b[prop]);
|
|
3066
3026
|
}
|
|
3067
3027
|
return a;
|
|
3068
3028
|
};
|
|
@@ -3101,7 +3061,7 @@ const operationsAliases = {
|
|
|
3101
3061
|
return like(a, b, true);
|
|
3102
3062
|
}
|
|
3103
3063
|
};
|
|
3104
|
-
function isPropertyFilter(filter) {
|
|
3064
|
+
function isPropertyFilter$1(filter) {
|
|
3105
3065
|
const pf = filter;
|
|
3106
3066
|
if (pf.length === 3 && typeof pf[0] === "string" && typeof pf[1] === "string") {
|
|
3107
3067
|
return true;
|
|
@@ -3109,7 +3069,7 @@ function isPropertyFilter(filter) {
|
|
|
3109
3069
|
return false;
|
|
3110
3070
|
}
|
|
3111
3071
|
function featureFilter(feature, filters) {
|
|
3112
|
-
const properties = __spreadValues$
|
|
3072
|
+
const properties = __spreadValues$s({}, feature.properties);
|
|
3113
3073
|
if (properties) {
|
|
3114
3074
|
properties.$id = feature.id;
|
|
3115
3075
|
return propertiesFilter(properties, filters);
|
|
@@ -3119,7 +3079,7 @@ function featureFilter(feature, filters) {
|
|
|
3119
3079
|
function propertiesFilter(properties, filters) {
|
|
3120
3080
|
const logic = typeof filters[0] === "string" ? filters[0] : "all";
|
|
3121
3081
|
const filterFunction = (p) => {
|
|
3122
|
-
if (isPropertyFilter(p)) {
|
|
3082
|
+
if (isPropertyFilter$1(p)) {
|
|
3123
3083
|
const [field, operation, value] = p;
|
|
3124
3084
|
const operationExec = operationsAliases[operation];
|
|
3125
3085
|
if (operationExec) {
|
|
@@ -3144,25 +3104,25 @@ function propertiesFilter(properties, filters) {
|
|
|
3144
3104
|
return logic === "any" ? filters_.some(filterFunction) : filters_.every(filterFunction);
|
|
3145
3105
|
}
|
|
3146
3106
|
|
|
3147
|
-
var __defProp$
|
|
3148
|
-
var __defProps$
|
|
3149
|
-
var __getOwnPropDescs$
|
|
3150
|
-
var __getOwnPropSymbols$
|
|
3151
|
-
var __hasOwnProp$
|
|
3152
|
-
var __propIsEnum$
|
|
3153
|
-
var __defNormalProp$
|
|
3154
|
-
var __spreadValues$
|
|
3107
|
+
var __defProp$B = Object.defineProperty;
|
|
3108
|
+
var __defProps$g = Object.defineProperties;
|
|
3109
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
3110
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
3111
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
3112
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
3113
|
+
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3114
|
+
var __spreadValues$r = (a, b) => {
|
|
3155
3115
|
for (var prop in b || (b = {}))
|
|
3156
|
-
if (__hasOwnProp$
|
|
3157
|
-
__defNormalProp$
|
|
3158
|
-
if (__getOwnPropSymbols$
|
|
3159
|
-
for (var prop of __getOwnPropSymbols$
|
|
3160
|
-
if (__propIsEnum$
|
|
3161
|
-
__defNormalProp$
|
|
3116
|
+
if (__hasOwnProp$s.call(b, prop))
|
|
3117
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
3118
|
+
if (__getOwnPropSymbols$s)
|
|
3119
|
+
for (var prop of __getOwnPropSymbols$s(b)) {
|
|
3120
|
+
if (__propIsEnum$s.call(b, prop))
|
|
3121
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
3162
3122
|
}
|
|
3163
3123
|
return a;
|
|
3164
3124
|
};
|
|
3165
|
-
var __spreadProps$
|
|
3125
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
3166
3126
|
var __async$n = (__this, __arguments, generator) => {
|
|
3167
3127
|
return new Promise((resolve, reject) => {
|
|
3168
3128
|
var fulfilled = (value) => {
|
|
@@ -3272,21 +3232,21 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
3272
3232
|
const filters_ = filters.filter((x) => Array.isArray(x));
|
|
3273
3233
|
if (logic === "any") {
|
|
3274
3234
|
for (const f of filters_) {
|
|
3275
|
-
if (isPropertyFilter(f)) {
|
|
3235
|
+
if (isPropertyFilter$1(f)) {
|
|
3276
3236
|
_queries.push(
|
|
3277
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
3237
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$r({}, opt), {
|
|
3278
3238
|
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
3279
3239
|
}))
|
|
3280
3240
|
);
|
|
3281
3241
|
} else {
|
|
3282
|
-
getQueries(__spreadProps$
|
|
3242
|
+
getQueries(__spreadProps$g(__spreadValues$r({}, opt), { filters: f }), _queries, [..._parentAllParams]);
|
|
3283
3243
|
}
|
|
3284
3244
|
}
|
|
3285
3245
|
} else if (logic === "all") {
|
|
3286
3246
|
const filters2 = [];
|
|
3287
3247
|
const propertiesFilterList = [];
|
|
3288
3248
|
for (const f of filters_) {
|
|
3289
|
-
if (isPropertyFilter(f)) {
|
|
3249
|
+
if (isPropertyFilter$1(f)) {
|
|
3290
3250
|
filters2.push(createParam(f));
|
|
3291
3251
|
} else {
|
|
3292
3252
|
propertiesFilterList.push(f);
|
|
@@ -3294,14 +3254,14 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
3294
3254
|
}
|
|
3295
3255
|
if (propertiesFilterList.length) {
|
|
3296
3256
|
for (const x of propertiesFilterList) {
|
|
3297
|
-
getQueries(__spreadProps$
|
|
3257
|
+
getQueries(__spreadProps$g(__spreadValues$r({}, opt), { filters: x }), _queries, [
|
|
3298
3258
|
..._parentAllParams,
|
|
3299
3259
|
...filters2
|
|
3300
3260
|
]);
|
|
3301
3261
|
}
|
|
3302
3262
|
} else {
|
|
3303
3263
|
_queries.push(
|
|
3304
|
-
fetchNgwLayerItemsRequest(__spreadProps$
|
|
3264
|
+
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$r({}, opt), {
|
|
3305
3265
|
paramList: [..._parentAllParams, ...paramList, ...filters2]
|
|
3306
3266
|
}))
|
|
3307
3267
|
);
|
|
@@ -3317,7 +3277,7 @@ function createWktFromCoordArray(coord) {
|
|
|
3317
3277
|
return `POLYGON((${polygon.join(", ")}))`;
|
|
3318
3278
|
}
|
|
3319
3279
|
function fetchNgwLayerItemsRequest(options) {
|
|
3320
|
-
const params = __spreadValues$
|
|
3280
|
+
const params = __spreadValues$r({}, FEATURE_REQUEST_PARAMS);
|
|
3321
3281
|
const {
|
|
3322
3282
|
limit,
|
|
3323
3283
|
query,
|
|
@@ -3353,7 +3313,7 @@ function fetchNgwLayerItemsRequest(options) {
|
|
|
3353
3313
|
if (paramList) {
|
|
3354
3314
|
Object.assign(params, paramListToQuery(paramList));
|
|
3355
3315
|
}
|
|
3356
|
-
return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$
|
|
3316
|
+
return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$r(__spreadValues$r({}, params), query), cache, signal });
|
|
3357
3317
|
}
|
|
3358
3318
|
|
|
3359
3319
|
function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
@@ -3382,25 +3342,25 @@ function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
|
3382
3342
|
return fields;
|
|
3383
3343
|
}
|
|
3384
3344
|
|
|
3385
|
-
var __defProp$
|
|
3386
|
-
var __defProps$
|
|
3387
|
-
var __getOwnPropDescs$
|
|
3388
|
-
var __getOwnPropSymbols$
|
|
3389
|
-
var __hasOwnProp$
|
|
3390
|
-
var __propIsEnum$
|
|
3391
|
-
var __defNormalProp$
|
|
3392
|
-
var __spreadValues$
|
|
3345
|
+
var __defProp$A = Object.defineProperty;
|
|
3346
|
+
var __defProps$f = Object.defineProperties;
|
|
3347
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
3348
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
3349
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
3350
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
3351
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3352
|
+
var __spreadValues$q = (a, b) => {
|
|
3393
3353
|
for (var prop in b || (b = {}))
|
|
3394
|
-
if (__hasOwnProp$
|
|
3395
|
-
__defNormalProp$
|
|
3396
|
-
if (__getOwnPropSymbols$
|
|
3397
|
-
for (var prop of __getOwnPropSymbols$
|
|
3398
|
-
if (__propIsEnum$
|
|
3399
|
-
__defNormalProp$
|
|
3354
|
+
if (__hasOwnProp$r.call(b, prop))
|
|
3355
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
3356
|
+
if (__getOwnPropSymbols$r)
|
|
3357
|
+
for (var prop of __getOwnPropSymbols$r(b)) {
|
|
3358
|
+
if (__propIsEnum$r.call(b, prop))
|
|
3359
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
3400
3360
|
}
|
|
3401
3361
|
return a;
|
|
3402
3362
|
};
|
|
3403
|
-
var __spreadProps$
|
|
3363
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
3404
3364
|
var __async$m = (__this, __arguments, generator) => {
|
|
3405
3365
|
return new Promise((resolve, reject) => {
|
|
3406
3366
|
var fulfilled = (value) => {
|
|
@@ -3426,13 +3386,13 @@ function fetchNgwLayerItems(options) {
|
|
|
3426
3386
|
var _a;
|
|
3427
3387
|
const filters = options.filters;
|
|
3428
3388
|
if (filters) {
|
|
3429
|
-
let data = yield createFeatureFieldFilterQueries(__spreadProps$
|
|
3389
|
+
let data = yield createFeatureFieldFilterQueries(__spreadProps$f(__spreadValues$q({}, options), {
|
|
3430
3390
|
filters
|
|
3431
3391
|
}));
|
|
3432
3392
|
const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
|
|
3433
3393
|
if (clientFilterValidate) {
|
|
3434
3394
|
data = data.filter((y) => {
|
|
3435
|
-
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$
|
|
3395
|
+
const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$f(__spreadValues$q({}, y.fields), {
|
|
3436
3396
|
id: y.id
|
|
3437
3397
|
}));
|
|
3438
3398
|
const result = propertiesFilter(fields, filters);
|
|
@@ -3550,25 +3510,25 @@ function ngwApiToAdapterOptions({
|
|
|
3550
3510
|
}
|
|
3551
3511
|
}
|
|
3552
3512
|
|
|
3553
|
-
var __defProp$
|
|
3554
|
-
var __defProps$
|
|
3555
|
-
var __getOwnPropDescs$
|
|
3556
|
-
var __getOwnPropSymbols$
|
|
3557
|
-
var __hasOwnProp$
|
|
3558
|
-
var __propIsEnum$
|
|
3559
|
-
var __defNormalProp$
|
|
3560
|
-
var __spreadValues$
|
|
3513
|
+
var __defProp$z = Object.defineProperty;
|
|
3514
|
+
var __defProps$e = Object.defineProperties;
|
|
3515
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
3516
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
3517
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
3518
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
3519
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3520
|
+
var __spreadValues$p = (a, b) => {
|
|
3561
3521
|
for (var prop in b || (b = {}))
|
|
3562
|
-
if (__hasOwnProp$
|
|
3563
|
-
__defNormalProp$
|
|
3564
|
-
if (__getOwnPropSymbols$
|
|
3565
|
-
for (var prop of __getOwnPropSymbols$
|
|
3566
|
-
if (__propIsEnum$
|
|
3567
|
-
__defNormalProp$
|
|
3522
|
+
if (__hasOwnProp$q.call(b, prop))
|
|
3523
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
3524
|
+
if (__getOwnPropSymbols$q)
|
|
3525
|
+
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
3526
|
+
if (__propIsEnum$q.call(b, prop))
|
|
3527
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
3568
3528
|
}
|
|
3569
3529
|
return a;
|
|
3570
3530
|
};
|
|
3571
|
-
var __spreadProps$
|
|
3531
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
3572
3532
|
var __async$l = (__this, __arguments, generator) => {
|
|
3573
3533
|
return new Promise((resolve, reject) => {
|
|
3574
3534
|
var fulfilled = (value) => {
|
|
@@ -3591,48 +3551,48 @@ var __async$l = (__this, __arguments, generator) => {
|
|
|
3591
3551
|
};
|
|
3592
3552
|
function fetchNgwLayerItem(options) {
|
|
3593
3553
|
return __async$l(this, null, function* () {
|
|
3594
|
-
const params = __spreadValues$
|
|
3554
|
+
const params = __spreadValues$p({}, FEATURE_REQUEST_PARAMS);
|
|
3595
3555
|
updateItemRequestParam(params, options);
|
|
3596
3556
|
const resp = yield options.connector.route("feature_layer.feature.item", {
|
|
3597
3557
|
id: Number(options.resourceId),
|
|
3598
3558
|
fid: options.featureId
|
|
3599
|
-
}).get(__spreadProps$
|
|
3559
|
+
}).get(__spreadProps$e(__spreadValues$p({}, options), { query: params }));
|
|
3600
3560
|
const toGeojson = () => __async$l(null, null, function* () {
|
|
3601
3561
|
if (resp.geom) {
|
|
3602
3562
|
return createGeoJsonFeature(resp);
|
|
3603
3563
|
} else {
|
|
3604
|
-
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$
|
|
3564
|
+
const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$p({}, options), {
|
|
3605
3565
|
geom: true,
|
|
3606
3566
|
fields: null,
|
|
3607
3567
|
extensions: null
|
|
3608
3568
|
}));
|
|
3609
3569
|
const geom = onlyGeomItem.geom;
|
|
3610
|
-
return createGeoJsonFeature(__spreadProps$
|
|
3570
|
+
return createGeoJsonFeature(__spreadProps$e(__spreadValues$p({}, resp), { geom }));
|
|
3611
3571
|
}
|
|
3612
3572
|
});
|
|
3613
|
-
return __spreadProps$
|
|
3573
|
+
return __spreadProps$e(__spreadValues$p({}, resp), {
|
|
3614
3574
|
toGeojson
|
|
3615
3575
|
});
|
|
3616
3576
|
});
|
|
3617
3577
|
}
|
|
3618
3578
|
|
|
3619
|
-
var __defProp$
|
|
3620
|
-
var __getOwnPropSymbols$
|
|
3621
|
-
var __hasOwnProp$
|
|
3622
|
-
var __propIsEnum$
|
|
3623
|
-
var __defNormalProp$
|
|
3624
|
-
var __spreadValues$
|
|
3579
|
+
var __defProp$y = Object.defineProperty;
|
|
3580
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
3581
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
3582
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
3583
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3584
|
+
var __spreadValues$o = (a, b) => {
|
|
3625
3585
|
for (var prop in b || (b = {}))
|
|
3626
|
-
if (__hasOwnProp$
|
|
3627
|
-
__defNormalProp$
|
|
3628
|
-
if (__getOwnPropSymbols$
|
|
3629
|
-
for (var prop of __getOwnPropSymbols$
|
|
3630
|
-
if (__propIsEnum$
|
|
3631
|
-
__defNormalProp$
|
|
3586
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
3587
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
3588
|
+
if (__getOwnPropSymbols$p)
|
|
3589
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
3590
|
+
if (__propIsEnum$p.call(b, prop))
|
|
3591
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
3632
3592
|
}
|
|
3633
3593
|
return a;
|
|
3634
3594
|
};
|
|
3635
|
-
var __publicField$o = (obj, key, value) => __defNormalProp$
|
|
3595
|
+
var __publicField$o = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3636
3596
|
class BookmarkItem {
|
|
3637
3597
|
constructor(options) {
|
|
3638
3598
|
this.options = options;
|
|
@@ -3669,7 +3629,7 @@ class BookmarkItem {
|
|
|
3669
3629
|
if (this.item.geom) {
|
|
3670
3630
|
return Promise.resolve(createGeoJsonFeature(this.item));
|
|
3671
3631
|
} else {
|
|
3672
|
-
return fetchNgwLayerItem(__spreadValues$
|
|
3632
|
+
return fetchNgwLayerItem(__spreadValues$o({
|
|
3673
3633
|
resourceId: this.resourceId,
|
|
3674
3634
|
featureId: this.item.id,
|
|
3675
3635
|
connector: this.options.connector,
|
|
@@ -3687,9 +3647,9 @@ class BookmarkItem {
|
|
|
3687
3647
|
|
|
3688
3648
|
const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
|
|
3689
3649
|
|
|
3690
|
-
var __defProp$
|
|
3691
|
-
var __defNormalProp$
|
|
3692
|
-
var __publicField$n = (obj, key, value) => __defNormalProp$
|
|
3650
|
+
var __defProp$x = Object.defineProperty;
|
|
3651
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3652
|
+
var __publicField$n = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3693
3653
|
class BaseProperty {
|
|
3694
3654
|
constructor(name, item, options) {
|
|
3695
3655
|
__publicField$n(this, "options");
|
|
@@ -3802,26 +3762,26 @@ class BaseProperty {
|
|
|
3802
3762
|
}
|
|
3803
3763
|
}
|
|
3804
3764
|
|
|
3805
|
-
var __defProp$
|
|
3806
|
-
var __getOwnPropSymbols$
|
|
3807
|
-
var __hasOwnProp$
|
|
3808
|
-
var __propIsEnum$
|
|
3809
|
-
var __defNormalProp$
|
|
3810
|
-
var __spreadValues$
|
|
3765
|
+
var __defProp$w = Object.defineProperty;
|
|
3766
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
3767
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
3768
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
3769
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3770
|
+
var __spreadValues$n = (a, b) => {
|
|
3811
3771
|
for (var prop in b || (b = {}))
|
|
3812
|
-
if (__hasOwnProp$
|
|
3813
|
-
__defNormalProp$
|
|
3814
|
-
if (__getOwnPropSymbols$
|
|
3815
|
-
for (var prop of __getOwnPropSymbols$
|
|
3816
|
-
if (__propIsEnum$
|
|
3817
|
-
__defNormalProp$
|
|
3772
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
3773
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
3774
|
+
if (__getOwnPropSymbols$o)
|
|
3775
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
3776
|
+
if (__propIsEnum$o.call(b, prop))
|
|
3777
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
3818
3778
|
}
|
|
3819
3779
|
return a;
|
|
3820
3780
|
};
|
|
3821
|
-
var __publicField$m = (obj, key, value) => __defNormalProp$
|
|
3781
|
+
var __publicField$m = (obj, key, value) => __defNormalProp$w(obj, key + "" , value);
|
|
3822
3782
|
const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
3823
3783
|
constructor(name, item, options) {
|
|
3824
|
-
super(name, item, __spreadValues$
|
|
3784
|
+
super(name, item, __spreadValues$n(__spreadValues$n({}, _CheckProperty.options), options));
|
|
3825
3785
|
this.set(this.get());
|
|
3826
3786
|
}
|
|
3827
3787
|
update(value, options) {
|
|
@@ -3902,13 +3862,13 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
|
3902
3862
|
_blockChild(item, options) {
|
|
3903
3863
|
const prop = item.properties && item.properties.property(this.name);
|
|
3904
3864
|
if (prop && prop.block) {
|
|
3905
|
-
prop.block(__spreadValues$
|
|
3865
|
+
prop.block(__spreadValues$n({ silent: true }, options || {}));
|
|
3906
3866
|
}
|
|
3907
3867
|
}
|
|
3908
3868
|
_unBlockChild(item, options) {
|
|
3909
3869
|
const prop = item.properties && item.properties.property(this.name);
|
|
3910
3870
|
if (prop && prop.unBlock) {
|
|
3911
|
-
prop.unBlock(__spreadValues$
|
|
3871
|
+
prop.unBlock(__spreadValues$n({ silent: true }, options || {}));
|
|
3912
3872
|
}
|
|
3913
3873
|
}
|
|
3914
3874
|
_propagation(value, options) {
|
|
@@ -3918,7 +3878,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
|
|
|
3918
3878
|
const child = children[fry];
|
|
3919
3879
|
const property = child.properties && child.properties.property(this.name);
|
|
3920
3880
|
if (property) {
|
|
3921
|
-
property.set(value, __spreadValues$
|
|
3881
|
+
property.set(value, __spreadValues$n(__spreadValues$n({}, options), {
|
|
3922
3882
|
propagation: true,
|
|
3923
3883
|
bubble: false
|
|
3924
3884
|
}));
|
|
@@ -3936,23 +3896,23 @@ __publicField$m(_CheckProperty, "options", {
|
|
|
3936
3896
|
});
|
|
3937
3897
|
let CheckProperty = _CheckProperty;
|
|
3938
3898
|
|
|
3939
|
-
var __defProp$
|
|
3940
|
-
var __getOwnPropSymbols$
|
|
3941
|
-
var __hasOwnProp$
|
|
3942
|
-
var __propIsEnum$
|
|
3943
|
-
var __defNormalProp$
|
|
3944
|
-
var __spreadValues$
|
|
3899
|
+
var __defProp$v = Object.defineProperty;
|
|
3900
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
3901
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
3902
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
3903
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3904
|
+
var __spreadValues$m = (a, b) => {
|
|
3945
3905
|
for (var prop in b || (b = {}))
|
|
3946
|
-
if (__hasOwnProp$
|
|
3947
|
-
__defNormalProp$
|
|
3948
|
-
if (__getOwnPropSymbols$
|
|
3949
|
-
for (var prop of __getOwnPropSymbols$
|
|
3950
|
-
if (__propIsEnum$
|
|
3951
|
-
__defNormalProp$
|
|
3906
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
3907
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
3908
|
+
if (__getOwnPropSymbols$n)
|
|
3909
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
3910
|
+
if (__propIsEnum$n.call(b, prop))
|
|
3911
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
3952
3912
|
}
|
|
3953
3913
|
return a;
|
|
3954
3914
|
};
|
|
3955
|
-
var __publicField$l = (obj, key, value) => __defNormalProp$
|
|
3915
|
+
var __publicField$l = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
3956
3916
|
const BOOLEAN_TYPE = "boolean";
|
|
3957
3917
|
const STRING_TYPE = "string";
|
|
3958
3918
|
const _ItemProperties = class _ItemProperties {
|
|
@@ -4000,7 +3960,7 @@ const _ItemProperties = class _ItemProperties {
|
|
|
4000
3960
|
_setPropertyHandler(propOpt) {
|
|
4001
3961
|
const Handler = this._getHandler(propOpt);
|
|
4002
3962
|
if (Handler && propOpt.name) {
|
|
4003
|
-
const options = __spreadValues$
|
|
3963
|
+
const options = __spreadValues$m({}, propOpt);
|
|
4004
3964
|
this._properties[propOpt.name] = new Handler(
|
|
4005
3965
|
propOpt.name,
|
|
4006
3966
|
this.item,
|
|
@@ -4130,9 +4090,9 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
|
|
|
4130
4090
|
return true;
|
|
4131
4091
|
}
|
|
4132
4092
|
|
|
4133
|
-
var __defProp$
|
|
4134
|
-
var __defNormalProp$
|
|
4135
|
-
var __publicField$k = (obj, key, value) => __defNormalProp$
|
|
4093
|
+
var __defProp$u = Object.defineProperty;
|
|
4094
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4095
|
+
var __publicField$k = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4136
4096
|
class TreeHelper {
|
|
4137
4097
|
constructor(item) {
|
|
4138
4098
|
__publicField$k(this, "item");
|
|
@@ -4200,23 +4160,23 @@ class TreeHelper {
|
|
|
4200
4160
|
}
|
|
4201
4161
|
}
|
|
4202
4162
|
|
|
4203
|
-
var __defProp$
|
|
4204
|
-
var __getOwnPropSymbols$
|
|
4205
|
-
var __hasOwnProp$
|
|
4206
|
-
var __propIsEnum$
|
|
4207
|
-
var __defNormalProp$
|
|
4208
|
-
var __spreadValues$
|
|
4163
|
+
var __defProp$t = Object.defineProperty;
|
|
4164
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
4165
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
4166
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
4167
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4168
|
+
var __spreadValues$l = (a, b) => {
|
|
4209
4169
|
for (var prop in b || (b = {}))
|
|
4210
|
-
if (__hasOwnProp$
|
|
4211
|
-
__defNormalProp$
|
|
4212
|
-
if (__getOwnPropSymbols$
|
|
4213
|
-
for (var prop of __getOwnPropSymbols$
|
|
4214
|
-
if (__propIsEnum$
|
|
4215
|
-
__defNormalProp$
|
|
4170
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
4171
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
4172
|
+
if (__getOwnPropSymbols$m)
|
|
4173
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
4174
|
+
if (__propIsEnum$m.call(b, prop))
|
|
4175
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
4216
4176
|
}
|
|
4217
4177
|
return a;
|
|
4218
4178
|
};
|
|
4219
|
-
var __publicField$j = (obj, key, value) => __defNormalProp$
|
|
4179
|
+
var __publicField$j = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4220
4180
|
let ID$1 = 0;
|
|
4221
4181
|
class Item {
|
|
4222
4182
|
constructor(options) {
|
|
@@ -4225,7 +4185,7 @@ class Item {
|
|
|
4225
4185
|
__publicField$j(this, "tree");
|
|
4226
4186
|
__publicField$j(this, "id", ID$1);
|
|
4227
4187
|
ID$1 += 1;
|
|
4228
|
-
this.options = __spreadValues$
|
|
4188
|
+
this.options = __spreadValues$l({}, options);
|
|
4229
4189
|
this.tree = new TreeHelper(this);
|
|
4230
4190
|
}
|
|
4231
4191
|
initProperties() {
|
|
@@ -4281,26 +4241,26 @@ function createLayerSymbolParam(resourceId, intervals) {
|
|
|
4281
4241
|
return { [`symbols[${resourceId}]`]: intervals.join(",") || void 0 };
|
|
4282
4242
|
}
|
|
4283
4243
|
|
|
4284
|
-
var __defProp$
|
|
4285
|
-
var __defProps$
|
|
4286
|
-
var __getOwnPropDescs$
|
|
4287
|
-
var __getOwnPropSymbols$
|
|
4288
|
-
var __hasOwnProp$
|
|
4289
|
-
var __propIsEnum$
|
|
4290
|
-
var __defNormalProp$
|
|
4291
|
-
var __spreadValues$
|
|
4244
|
+
var __defProp$s = Object.defineProperty;
|
|
4245
|
+
var __defProps$d = Object.defineProperties;
|
|
4246
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
4247
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
4248
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
4249
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
4250
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4251
|
+
var __spreadValues$k = (a, b) => {
|
|
4292
4252
|
for (var prop in b || (b = {}))
|
|
4293
|
-
if (__hasOwnProp$
|
|
4294
|
-
__defNormalProp$
|
|
4295
|
-
if (__getOwnPropSymbols$
|
|
4296
|
-
for (var prop of __getOwnPropSymbols$
|
|
4297
|
-
if (__propIsEnum$
|
|
4298
|
-
__defNormalProp$
|
|
4253
|
+
if (__hasOwnProp$l.call(b, prop))
|
|
4254
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
4255
|
+
if (__getOwnPropSymbols$l)
|
|
4256
|
+
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
4257
|
+
if (__propIsEnum$l.call(b, prop))
|
|
4258
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
4299
4259
|
}
|
|
4300
4260
|
return a;
|
|
4301
4261
|
};
|
|
4302
|
-
var __spreadProps$
|
|
4303
|
-
var __publicField$i = (obj, key, value) => __defNormalProp$
|
|
4262
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
4263
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4304
4264
|
var __async$k = (__this, __arguments, generator) => {
|
|
4305
4265
|
return new Promise((resolve, reject) => {
|
|
4306
4266
|
var fulfilled = (value) => {
|
|
@@ -4365,14 +4325,14 @@ class Legend {
|
|
|
4365
4325
|
if (this.connector) {
|
|
4366
4326
|
const ngwLegend = yield this.connector.route("render.legend_symbols", {
|
|
4367
4327
|
id: this.resourceId
|
|
4368
|
-
}).get(__spreadValues$
|
|
4328
|
+
}).get(__spreadValues$k({}, options));
|
|
4369
4329
|
this.legend = ngwLegend;
|
|
4370
4330
|
return this.createLegend(ngwLegend);
|
|
4371
4331
|
}
|
|
4372
4332
|
});
|
|
4373
4333
|
}
|
|
4374
4334
|
createLegend(items) {
|
|
4375
|
-
return items.map((params) => __spreadProps$
|
|
4335
|
+
return items.map((params) => __spreadProps$d(__spreadValues$k({}, params), {
|
|
4376
4336
|
/** @deprecated use display_name instead */
|
|
4377
4337
|
name: params.display_name,
|
|
4378
4338
|
/** @deprecated use icon instead */
|
|
@@ -4402,7 +4362,7 @@ class Legend {
|
|
|
4402
4362
|
}
|
|
4403
4363
|
if (this.layer.updateLayer) {
|
|
4404
4364
|
this.layer.updateLayer({
|
|
4405
|
-
params: __spreadValues$
|
|
4365
|
+
params: __spreadValues$k({}, createLayerSymbolParam(this.resourceId, intervals))
|
|
4406
4366
|
});
|
|
4407
4367
|
}
|
|
4408
4368
|
if (intervals.length) {
|
|
@@ -4439,26 +4399,26 @@ class Legend {
|
|
|
4439
4399
|
}
|
|
4440
4400
|
}
|
|
4441
4401
|
|
|
4442
|
-
var __defProp$
|
|
4443
|
-
var __defProps$
|
|
4444
|
-
var __getOwnPropDescs$
|
|
4445
|
-
var __getOwnPropSymbols$
|
|
4446
|
-
var __hasOwnProp$
|
|
4447
|
-
var __propIsEnum$
|
|
4448
|
-
var __defNormalProp$
|
|
4449
|
-
var __spreadValues$
|
|
4402
|
+
var __defProp$r = Object.defineProperty;
|
|
4403
|
+
var __defProps$c = Object.defineProperties;
|
|
4404
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
4405
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
4406
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
4407
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
4408
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4409
|
+
var __spreadValues$j = (a, b) => {
|
|
4450
4410
|
for (var prop in b || (b = {}))
|
|
4451
|
-
if (__hasOwnProp$
|
|
4452
|
-
__defNormalProp$
|
|
4453
|
-
if (__getOwnPropSymbols$
|
|
4454
|
-
for (var prop of __getOwnPropSymbols$
|
|
4455
|
-
if (__propIsEnum$
|
|
4456
|
-
__defNormalProp$
|
|
4411
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
4412
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
4413
|
+
if (__getOwnPropSymbols$k)
|
|
4414
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
4415
|
+
if (__propIsEnum$k.call(b, prop))
|
|
4416
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
4457
4417
|
}
|
|
4458
4418
|
return a;
|
|
4459
4419
|
};
|
|
4460
|
-
var __spreadProps$
|
|
4461
|
-
var __publicField$h = (obj, key, value) => __defNormalProp$
|
|
4420
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
4421
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4462
4422
|
var __async$j = (__this, __arguments, generator) => {
|
|
4463
4423
|
return new Promise((resolve, reject) => {
|
|
4464
4424
|
var fulfilled = (value) => {
|
|
@@ -4488,7 +4448,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
4488
4448
|
parent,
|
|
4489
4449
|
noInit
|
|
4490
4450
|
}) {
|
|
4491
|
-
super(__spreadValues$
|
|
4451
|
+
super(__spreadValues$j(__spreadValues$j({}, _NgwWebmapItem.options), options));
|
|
4492
4452
|
__publicField$h(this, "item");
|
|
4493
4453
|
__publicField$h(this, "webMap");
|
|
4494
4454
|
__publicField$h(this, "connector");
|
|
@@ -4584,7 +4544,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
4584
4544
|
getItemOptions(item) {
|
|
4585
4545
|
const transparency = item.item_type === "layer" && item.layer_transparency;
|
|
4586
4546
|
const opacity = typeof transparency === "number" ? (100 - transparency) / 100 : void 0;
|
|
4587
|
-
const options = __spreadProps$
|
|
4547
|
+
const options = __spreadProps$c(__spreadValues$j({
|
|
4588
4548
|
visibility: false,
|
|
4589
4549
|
name: item.display_name
|
|
4590
4550
|
}, this.options), {
|
|
@@ -4604,7 +4564,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
4604
4564
|
}
|
|
4605
4565
|
if (item.item_type === "layer") {
|
|
4606
4566
|
const { maxZoom, minZoom } = this._getZoomRange(item);
|
|
4607
|
-
Object.assign(options, __spreadProps$
|
|
4567
|
+
Object.assign(options, __spreadProps$c(__spreadValues$j({
|
|
4608
4568
|
updateWmsParams: item.updateWmsParams
|
|
4609
4569
|
}, options), {
|
|
4610
4570
|
url: item.url,
|
|
@@ -4748,26 +4708,26 @@ __publicField$h(_NgwWebmapItem, "options", {
|
|
|
4748
4708
|
});
|
|
4749
4709
|
let NgwWebmapItem = _NgwWebmapItem;
|
|
4750
4710
|
|
|
4751
|
-
var __defProp$
|
|
4752
|
-
var __defProps$
|
|
4753
|
-
var __getOwnPropDescs$
|
|
4754
|
-
var __getOwnPropSymbols$
|
|
4755
|
-
var __hasOwnProp$
|
|
4756
|
-
var __propIsEnum$
|
|
4757
|
-
var __defNormalProp$
|
|
4758
|
-
var __spreadValues$
|
|
4759
|
-
for (var prop in b || (b = {}))
|
|
4760
|
-
if (__hasOwnProp$
|
|
4761
|
-
__defNormalProp$
|
|
4762
|
-
if (__getOwnPropSymbols$
|
|
4763
|
-
for (var prop of __getOwnPropSymbols$
|
|
4764
|
-
if (__propIsEnum$
|
|
4765
|
-
__defNormalProp$
|
|
4711
|
+
var __defProp$q = Object.defineProperty;
|
|
4712
|
+
var __defProps$b = Object.defineProperties;
|
|
4713
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
4714
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
4715
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
4716
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
4717
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4718
|
+
var __spreadValues$i = (a, b) => {
|
|
4719
|
+
for (var prop in b || (b = {}))
|
|
4720
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
4721
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
4722
|
+
if (__getOwnPropSymbols$j)
|
|
4723
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
4724
|
+
if (__propIsEnum$j.call(b, prop))
|
|
4725
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
4766
4726
|
}
|
|
4767
4727
|
return a;
|
|
4768
4728
|
};
|
|
4769
|
-
var __spreadProps$
|
|
4770
|
-
var __publicField$g = (obj, key, value) => __defNormalProp$
|
|
4729
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
4730
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4771
4731
|
var __async$i = (__this, __arguments, generator) => {
|
|
4772
4732
|
return new Promise((resolve, reject) => {
|
|
4773
4733
|
var fulfilled = (value) => {
|
|
@@ -4820,7 +4780,7 @@ class NgwWebmapLayerAdapter {
|
|
|
4820
4780
|
addLayer(options) {
|
|
4821
4781
|
return __async$i(this, null, function* () {
|
|
4822
4782
|
var _a;
|
|
4823
|
-
this.options = __spreadValues$
|
|
4783
|
+
this.options = __spreadValues$i(__spreadValues$i({}, this.options), options);
|
|
4824
4784
|
this.layer = yield this._getWebMapLayerItem();
|
|
4825
4785
|
const extentConstrained = (_a = this.webmapResource) == null ? void 0 : _a.constraining_extent;
|
|
4826
4786
|
if (this.options.useExtentConstrained && this._extent && extentConstrained) {
|
|
@@ -4899,7 +4859,7 @@ class NgwWebmapLayerAdapter {
|
|
|
4899
4859
|
(x) => x.label_field
|
|
4900
4860
|
);
|
|
4901
4861
|
const keyname = labelField && labelField.keyname;
|
|
4902
|
-
return fetchNgwLayerItems(__spreadValues$
|
|
4862
|
+
return fetchNgwLayerItems(__spreadValues$i({
|
|
4903
4863
|
connector,
|
|
4904
4864
|
resourceId: bookmarkResId,
|
|
4905
4865
|
geom: false,
|
|
@@ -4968,7 +4928,7 @@ class NgwWebmapLayerAdapter {
|
|
|
4968
4928
|
const connector = this.options.connector;
|
|
4969
4929
|
const headers = (connector == null ? void 0 : connector.options.auth) ? connector.getAuthorizationHeaders() : void 0;
|
|
4970
4930
|
const withCredentials = connector.withCredentials;
|
|
4971
|
-
const options = __spreadProps$
|
|
4931
|
+
const options = __spreadProps$b(__spreadValues$i({}, this.options), {
|
|
4972
4932
|
withCredentials,
|
|
4973
4933
|
headers,
|
|
4974
4934
|
drawOrderEnabled: (_a = webmap.draw_order_enabled) != null ? _a : false
|
|
@@ -5074,7 +5034,7 @@ class NgwWebmapLayerAdapter {
|
|
|
5074
5034
|
webMap,
|
|
5075
5035
|
baseUrl: this.options.connector.options.baseUrl || ""
|
|
5076
5036
|
});
|
|
5077
|
-
item = __spreadValues$
|
|
5037
|
+
item = __spreadValues$i(__spreadValues$i({}, layerItem), layerAdapterOptions);
|
|
5078
5038
|
}
|
|
5079
5039
|
}
|
|
5080
5040
|
if (typeof ((_a = this.options.nativeOptions) == null ? void 0 : _a.beforeItemCreated) === "function") {
|
|
@@ -5084,40 +5044,40 @@ class NgwWebmapLayerAdapter {
|
|
|
5084
5044
|
}
|
|
5085
5045
|
}
|
|
5086
5046
|
|
|
5087
|
-
var __defProp$
|
|
5088
|
-
var __defProps$
|
|
5089
|
-
var __getOwnPropDescs$
|
|
5090
|
-
var __getOwnPropSymbols$
|
|
5091
|
-
var __hasOwnProp$
|
|
5092
|
-
var __propIsEnum$
|
|
5093
|
-
var __defNormalProp$
|
|
5094
|
-
var __spreadValues$
|
|
5047
|
+
var __defProp$p = Object.defineProperty;
|
|
5048
|
+
var __defProps$a = Object.defineProperties;
|
|
5049
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
5050
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
5051
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
5052
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
5053
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5054
|
+
var __spreadValues$h = (a, b) => {
|
|
5095
5055
|
for (var prop in b || (b = {}))
|
|
5096
|
-
if (__hasOwnProp$
|
|
5097
|
-
__defNormalProp$
|
|
5098
|
-
if (__getOwnPropSymbols$
|
|
5099
|
-
for (var prop of __getOwnPropSymbols$
|
|
5100
|
-
if (__propIsEnum$
|
|
5101
|
-
__defNormalProp$
|
|
5056
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
5057
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
5058
|
+
if (__getOwnPropSymbols$i)
|
|
5059
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
5060
|
+
if (__propIsEnum$i.call(b, prop))
|
|
5061
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
5102
5062
|
}
|
|
5103
5063
|
return a;
|
|
5104
5064
|
};
|
|
5105
|
-
var __spreadProps$
|
|
5106
|
-
var __objRest$
|
|
5065
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
5066
|
+
var __objRest$4 = (source, exclude) => {
|
|
5107
5067
|
var target = {};
|
|
5108
5068
|
for (var prop in source)
|
|
5109
|
-
if (__hasOwnProp$
|
|
5069
|
+
if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
5110
5070
|
target[prop] = source[prop];
|
|
5111
|
-
if (source != null && __getOwnPropSymbols$
|
|
5112
|
-
for (var prop of __getOwnPropSymbols$
|
|
5113
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
5071
|
+
if (source != null && __getOwnPropSymbols$i)
|
|
5072
|
+
for (var prop of __getOwnPropSymbols$i(source)) {
|
|
5073
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
|
|
5114
5074
|
target[prop] = source[prop];
|
|
5115
5075
|
}
|
|
5116
5076
|
return target;
|
|
5117
5077
|
};
|
|
5118
5078
|
function updateImageParams(params, resourceId) {
|
|
5119
|
-
const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$
|
|
5120
|
-
return __spreadProps$
|
|
5079
|
+
const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$4(_a, ["bbox", "width", "height", "nd"]);
|
|
5080
|
+
return __spreadProps$a(__spreadValues$h({}, rest), {
|
|
5121
5081
|
resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
|
|
5122
5082
|
extent: bbox,
|
|
5123
5083
|
size: width + "," + height,
|
|
@@ -5152,7 +5112,7 @@ function createNgwLayerAdapter(options, webMap, connector) {
|
|
|
5152
5112
|
function extendNgwWebmapLayerAdapter(opt) {
|
|
5153
5113
|
class A extends NgwWebmapLayerAdapter {
|
|
5154
5114
|
constructor(map, options) {
|
|
5155
|
-
options = __spreadValues$
|
|
5115
|
+
options = __spreadValues$h(__spreadValues$h({}, opt), options);
|
|
5156
5116
|
super(map, options);
|
|
5157
5117
|
}
|
|
5158
5118
|
}
|
|
@@ -5231,35 +5191,35 @@ function updateQmsOptions(qms) {
|
|
|
5231
5191
|
};
|
|
5232
5192
|
}
|
|
5233
5193
|
|
|
5234
|
-
var __defProp$
|
|
5235
|
-
var __getOwnPropSymbols$
|
|
5236
|
-
var __hasOwnProp$
|
|
5237
|
-
var __propIsEnum$
|
|
5238
|
-
var __defNormalProp$
|
|
5239
|
-
var __spreadValues$
|
|
5194
|
+
var __defProp$o = Object.defineProperty;
|
|
5195
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
5196
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
5197
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
5198
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5199
|
+
var __spreadValues$g = (a, b) => {
|
|
5240
5200
|
for (var prop in b || (b = {}))
|
|
5241
|
-
if (__hasOwnProp$
|
|
5242
|
-
__defNormalProp$
|
|
5243
|
-
if (__getOwnPropSymbols$
|
|
5244
|
-
for (var prop of __getOwnPropSymbols$
|
|
5245
|
-
if (__propIsEnum$
|
|
5246
|
-
__defNormalProp$
|
|
5201
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
5202
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
5203
|
+
if (__getOwnPropSymbols$h)
|
|
5204
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
5205
|
+
if (__propIsEnum$h.call(b, prop))
|
|
5206
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
5247
5207
|
}
|
|
5248
5208
|
return a;
|
|
5249
5209
|
};
|
|
5250
|
-
var __objRest$
|
|
5210
|
+
var __objRest$3 = (source, exclude) => {
|
|
5251
5211
|
var target = {};
|
|
5252
5212
|
for (var prop in source)
|
|
5253
|
-
if (__hasOwnProp$
|
|
5213
|
+
if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
5254
5214
|
target[prop] = source[prop];
|
|
5255
|
-
if (source != null && __getOwnPropSymbols$
|
|
5256
|
-
for (var prop of __getOwnPropSymbols$
|
|
5257
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
5215
|
+
if (source != null && __getOwnPropSymbols$h)
|
|
5216
|
+
for (var prop of __getOwnPropSymbols$h(source)) {
|
|
5217
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
|
|
5258
5218
|
target[prop] = source[prop];
|
|
5259
5219
|
}
|
|
5260
5220
|
return target;
|
|
5261
5221
|
};
|
|
5262
|
-
var __publicField$f = (obj, key, value) => __defNormalProp$
|
|
5222
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5263
5223
|
var __async$h = (__this, __arguments, generator) => {
|
|
5264
5224
|
return new Promise((resolve, reject) => {
|
|
5265
5225
|
var fulfilled = (value) => {
|
|
@@ -5280,11 +5240,11 @@ var __async$h = (__this, __arguments, generator) => {
|
|
|
5280
5240
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
5281
5241
|
});
|
|
5282
5242
|
};
|
|
5283
|
-
const URL = "https://qms.nextgis.com";
|
|
5284
|
-
function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
5243
|
+
const URL$1 = "https://qms.nextgis.com";
|
|
5244
|
+
function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
|
|
5285
5245
|
let webMap;
|
|
5286
5246
|
if ("webMap" in webMapOrOptions) {
|
|
5287
|
-
const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$
|
|
5247
|
+
const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$3(_a, ["webMap", "url"]);
|
|
5288
5248
|
webMap = webMap_;
|
|
5289
5249
|
if (url_) {
|
|
5290
5250
|
url = url_;
|
|
@@ -5296,7 +5256,7 @@ function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
|
5296
5256
|
webMap = webMapOrOptions;
|
|
5297
5257
|
}
|
|
5298
5258
|
if (!url) {
|
|
5299
|
-
url = URL;
|
|
5259
|
+
url = URL$1;
|
|
5300
5260
|
}
|
|
5301
5261
|
class QmsAdapter {
|
|
5302
5262
|
constructor(map, options) {
|
|
@@ -5304,7 +5264,7 @@ function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
|
5304
5264
|
__publicField$f(this, "options");
|
|
5305
5265
|
__publicField$f(this, "map");
|
|
5306
5266
|
this.map = map;
|
|
5307
|
-
const opt = __spreadValues$
|
|
5267
|
+
const opt = __spreadValues$g(__spreadValues$g({}, createOpt), options);
|
|
5308
5268
|
this.options = opt;
|
|
5309
5269
|
this.options.baselayer = true;
|
|
5310
5270
|
if (opt.qms) {
|
|
@@ -5332,7 +5292,7 @@ function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
|
5332
5292
|
"hideLayer"
|
|
5333
5293
|
]);
|
|
5334
5294
|
if (type === "TILE") {
|
|
5335
|
-
options = __spreadValues$
|
|
5295
|
+
options = __spreadValues$g(__spreadValues$g({
|
|
5336
5296
|
order: 0,
|
|
5337
5297
|
maxZoom: webMap.options.maxZoom,
|
|
5338
5298
|
minZoom: webMap.options.minZoom
|
|
@@ -5356,30 +5316,30 @@ function createQmsAdapter(webMapOrOptions, url = URL, createOpt = {}) {
|
|
|
5356
5316
|
return QmsAdapter;
|
|
5357
5317
|
}
|
|
5358
5318
|
|
|
5359
|
-
var __defProp$
|
|
5360
|
-
var __getOwnPropSymbols$
|
|
5361
|
-
var __hasOwnProp$
|
|
5362
|
-
var __propIsEnum$
|
|
5363
|
-
var __defNormalProp$
|
|
5364
|
-
var __spreadValues$
|
|
5319
|
+
var __defProp$n = Object.defineProperty;
|
|
5320
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
5321
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
5322
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
5323
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5324
|
+
var __spreadValues$f = (a, b) => {
|
|
5365
5325
|
for (var prop in b || (b = {}))
|
|
5366
|
-
if (__hasOwnProp$
|
|
5367
|
-
__defNormalProp$
|
|
5368
|
-
if (__getOwnPropSymbols$
|
|
5369
|
-
for (var prop of __getOwnPropSymbols$
|
|
5370
|
-
if (__propIsEnum$
|
|
5371
|
-
__defNormalProp$
|
|
5326
|
+
if (__hasOwnProp$g.call(b, prop))
|
|
5327
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
5328
|
+
if (__getOwnPropSymbols$g)
|
|
5329
|
+
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
5330
|
+
if (__propIsEnum$g.call(b, prop))
|
|
5331
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
5372
5332
|
}
|
|
5373
5333
|
return a;
|
|
5374
5334
|
};
|
|
5375
|
-
var __publicField$e = (obj, key, value) => __defNormalProp$
|
|
5335
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$n(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5376
5336
|
class QmsKit {
|
|
5377
5337
|
constructor(options) {
|
|
5378
5338
|
__publicField$e(this, "options", {
|
|
5379
5339
|
url: "https://qms.nextgis.com"
|
|
5380
5340
|
});
|
|
5381
5341
|
__publicField$e(this, "url");
|
|
5382
|
-
this.options = __spreadValues$
|
|
5342
|
+
this.options = __spreadValues$f(__spreadValues$f({}, this.options), options);
|
|
5383
5343
|
this.url = this.options.url;
|
|
5384
5344
|
}
|
|
5385
5345
|
getLayerAdapters() {
|
|
@@ -5398,27 +5358,27 @@ __publicField$e(QmsKit, "utils", {
|
|
|
5398
5358
|
createQmsAdapter
|
|
5399
5359
|
});
|
|
5400
5360
|
|
|
5401
|
-
var __defProp$
|
|
5402
|
-
var __defProps$
|
|
5403
|
-
var __getOwnPropDescs$
|
|
5404
|
-
var __getOwnPropSymbols$
|
|
5361
|
+
var __defProp$m = Object.defineProperty;
|
|
5362
|
+
var __defProps$9 = Object.defineProperties;
|
|
5363
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
5364
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
5405
5365
|
var __getProtoOf$2 = Object.getPrototypeOf;
|
|
5406
|
-
var __hasOwnProp$
|
|
5407
|
-
var __propIsEnum$
|
|
5366
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
5367
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
5408
5368
|
var __reflectGet$2 = Reflect.get;
|
|
5409
|
-
var __defNormalProp$
|
|
5410
|
-
var __spreadValues$
|
|
5369
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5370
|
+
var __spreadValues$e = (a, b) => {
|
|
5411
5371
|
for (var prop in b || (b = {}))
|
|
5412
|
-
if (__hasOwnProp$
|
|
5413
|
-
__defNormalProp$
|
|
5414
|
-
if (__getOwnPropSymbols$
|
|
5415
|
-
for (var prop of __getOwnPropSymbols$
|
|
5416
|
-
if (__propIsEnum$
|
|
5417
|
-
__defNormalProp$
|
|
5372
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
5373
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
5374
|
+
if (__getOwnPropSymbols$f)
|
|
5375
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
5376
|
+
if (__propIsEnum$f.call(b, prop))
|
|
5377
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
5418
5378
|
}
|
|
5419
5379
|
return a;
|
|
5420
5380
|
};
|
|
5421
|
-
var __spreadProps$
|
|
5381
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
5422
5382
|
var __superGet$2 = (cls, obj, key) => __reflectGet$2(__getProtoOf$2(cls), key, obj);
|
|
5423
5383
|
var __async$g = (__this, __arguments, generator) => {
|
|
5424
5384
|
return new Promise((resolve, reject) => {
|
|
@@ -5464,7 +5424,7 @@ function createBasemapLayerAdapter(_0) {
|
|
|
5464
5424
|
addLayer(opt) {
|
|
5465
5425
|
return __async$g(this, null, function* () {
|
|
5466
5426
|
if (url) {
|
|
5467
|
-
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$
|
|
5427
|
+
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$9(__spreadValues$e({}, opt), { url }));
|
|
5468
5428
|
}
|
|
5469
5429
|
});
|
|
5470
5430
|
}
|
|
@@ -5573,28 +5533,28 @@ function getLayerFilterOptions(options) {
|
|
|
5573
5533
|
return filterOptions;
|
|
5574
5534
|
}
|
|
5575
5535
|
|
|
5576
|
-
var __defProp$
|
|
5577
|
-
var __defProps$
|
|
5578
|
-
var __getOwnPropDescs$
|
|
5579
|
-
var __getOwnPropSymbols$
|
|
5536
|
+
var __defProp$l = Object.defineProperty;
|
|
5537
|
+
var __defProps$8 = Object.defineProperties;
|
|
5538
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
5539
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
5580
5540
|
var __getProtoOf$1 = Object.getPrototypeOf;
|
|
5581
|
-
var __hasOwnProp$
|
|
5582
|
-
var __propIsEnum$
|
|
5541
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
5542
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
5583
5543
|
var __reflectGet$1 = Reflect.get;
|
|
5584
|
-
var __defNormalProp$
|
|
5585
|
-
var __spreadValues$
|
|
5544
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5545
|
+
var __spreadValues$d = (a, b) => {
|
|
5586
5546
|
for (var prop in b || (b = {}))
|
|
5587
|
-
if (__hasOwnProp$
|
|
5588
|
-
__defNormalProp$
|
|
5589
|
-
if (__getOwnPropSymbols$
|
|
5590
|
-
for (var prop of __getOwnPropSymbols$
|
|
5591
|
-
if (__propIsEnum$
|
|
5592
|
-
__defNormalProp$
|
|
5547
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
5548
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
5549
|
+
if (__getOwnPropSymbols$e)
|
|
5550
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
5551
|
+
if (__propIsEnum$e.call(b, prop))
|
|
5552
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
5593
5553
|
}
|
|
5594
5554
|
return a;
|
|
5595
5555
|
};
|
|
5596
|
-
var __spreadProps$
|
|
5597
|
-
var __publicField$d = (obj, key, value) => __defNormalProp$
|
|
5556
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
5557
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$l(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5598
5558
|
var __superGet$1 = (cls, obj, key) => __reflectGet$1(__getProtoOf$1(cls), key, obj);
|
|
5599
5559
|
var __async$e = (__this, __arguments, generator) => {
|
|
5600
5560
|
return new Promise((resolve, reject) => {
|
|
@@ -5650,7 +5610,7 @@ function createGeoJsonAdapter(props) {
|
|
|
5650
5610
|
filterOpt = filterOpt || {};
|
|
5651
5611
|
filterOpt.signal = internalSignal;
|
|
5652
5612
|
_lastFilterArgs = { filters, options: filterOpt };
|
|
5653
|
-
return fetchNgwLayerFeatureCollection(__spreadValues$
|
|
5613
|
+
return fetchNgwLayerFeatureCollection(__spreadValues$d({
|
|
5654
5614
|
resourceId,
|
|
5655
5615
|
filters,
|
|
5656
5616
|
connector,
|
|
@@ -5685,9 +5645,9 @@ function createGeoJsonAdapter(props) {
|
|
|
5685
5645
|
}
|
|
5686
5646
|
if (options.adapterOptions) {
|
|
5687
5647
|
if (addLayerOptionsPriority) {
|
|
5688
|
-
opt = __spreadValues$
|
|
5648
|
+
opt = __spreadValues$d(__spreadValues$d({}, options.adapterOptions), opt);
|
|
5689
5649
|
} else {
|
|
5690
|
-
opt = __spreadValues$
|
|
5650
|
+
opt = __spreadValues$d(__spreadValues$d({}, opt), options.adapterOptions);
|
|
5691
5651
|
}
|
|
5692
5652
|
}
|
|
5693
5653
|
if (opt.data && Object.keys(opt.data).length === 0) {
|
|
@@ -5772,7 +5732,7 @@ function createGeoJsonAdapter(props) {
|
|
|
5772
5732
|
try {
|
|
5773
5733
|
this.emitter.emit("preupdate", filterArgs);
|
|
5774
5734
|
webMap._emitLayerEvent("layer:preupdate", options.id || "", filterArgs);
|
|
5775
|
-
const data = yield getData(filterArgs.filters, __spreadProps$
|
|
5735
|
+
const data = yield getData(filterArgs.filters, __spreadProps$8(__spreadValues$d({}, filterArgs.options), {
|
|
5776
5736
|
srs: this.options.srs
|
|
5777
5737
|
}));
|
|
5778
5738
|
let newData = data;
|
|
@@ -5815,7 +5775,7 @@ function createGeoJsonAdapter(props) {
|
|
|
5815
5775
|
abort();
|
|
5816
5776
|
if (this.filter && _fullDataLoad) {
|
|
5817
5777
|
this.filter((e) => {
|
|
5818
|
-
const props_ = e.feature && e.feature.properties && prepareNgwFieldsToPropertiesFilter(__spreadValues$
|
|
5778
|
+
const props_ = e.feature && e.feature.properties && prepareNgwFieldsToPropertiesFilter(__spreadValues$d({}, e.feature.properties));
|
|
5819
5779
|
if (props_) {
|
|
5820
5780
|
return propertiesFilter(props_, filters);
|
|
5821
5781
|
}
|
|
@@ -5825,7 +5785,7 @@ function createGeoJsonAdapter(props) {
|
|
|
5825
5785
|
if (this.clearLayer) {
|
|
5826
5786
|
this.clearLayer();
|
|
5827
5787
|
}
|
|
5828
|
-
const data = yield getData(filters, __spreadProps$
|
|
5788
|
+
const data = yield getData(filters, __spreadProps$8(__spreadValues$d({}, opt), {
|
|
5829
5789
|
srs: this.options.srs
|
|
5830
5790
|
}));
|
|
5831
5791
|
this.setData(data);
|
|
@@ -5925,26 +5885,166 @@ function createWebMapAdapter(_0) {
|
|
|
5925
5885
|
});
|
|
5926
5886
|
}
|
|
5927
5887
|
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5888
|
+
function isPropertyFilter(value) {
|
|
5889
|
+
return Array.isArray(value) && value.length === 3 && typeof value[0] === "string" && typeof value[1] === "string";
|
|
5890
|
+
}
|
|
5891
|
+
function isPropertiesFilterGroup(value) {
|
|
5892
|
+
return Array.isArray(value) && !isPropertyFilter(value);
|
|
5893
|
+
}
|
|
5894
|
+
function toGetExpr(field) {
|
|
5895
|
+
return ["get", field];
|
|
5896
|
+
}
|
|
5897
|
+
function toConditionExpr(filter) {
|
|
5898
|
+
const [fieldRaw, op, value] = filter;
|
|
5899
|
+
const field = String(fieldRaw);
|
|
5900
|
+
const getExpr = toGetExpr(field);
|
|
5901
|
+
switch (op) {
|
|
5902
|
+
case "eq":
|
|
5903
|
+
if (value === null) {
|
|
5904
|
+
return ["is_null", getExpr];
|
|
5905
|
+
}
|
|
5906
|
+
return ["==", getExpr, value];
|
|
5907
|
+
case "ne":
|
|
5908
|
+
if (value === null) {
|
|
5909
|
+
return ["!is_null", getExpr];
|
|
5910
|
+
}
|
|
5911
|
+
return ["!=", getExpr, value];
|
|
5912
|
+
case "gt":
|
|
5913
|
+
if (typeof value !== "number" && typeof value !== "string") {
|
|
5914
|
+
throw new Error(
|
|
5915
|
+
`Operator "gt" requires number or string for "${field}"`
|
|
5916
|
+
);
|
|
5917
|
+
}
|
|
5918
|
+
return [">", getExpr, value];
|
|
5919
|
+
case "lt":
|
|
5920
|
+
if (typeof value !== "number" && typeof value !== "string") {
|
|
5921
|
+
throw new Error(
|
|
5922
|
+
`Operator "lt" requires number or string for "${field}"`
|
|
5923
|
+
);
|
|
5924
|
+
}
|
|
5925
|
+
return ["<", getExpr, value];
|
|
5926
|
+
case "ge":
|
|
5927
|
+
if (typeof value !== "number" && typeof value !== "string") {
|
|
5928
|
+
throw new Error(
|
|
5929
|
+
`Operator "ge" requires number or string for "${field}"`
|
|
5930
|
+
);
|
|
5931
|
+
}
|
|
5932
|
+
return [">=", getExpr, value];
|
|
5933
|
+
case "le":
|
|
5934
|
+
if (typeof value !== "number" && typeof value !== "string") {
|
|
5935
|
+
throw new Error(
|
|
5936
|
+
`Operator "le" requires number or string for "${field}"`
|
|
5937
|
+
);
|
|
5938
|
+
}
|
|
5939
|
+
return ["<=", getExpr, value];
|
|
5940
|
+
case "in":
|
|
5941
|
+
if (!Array.isArray(value) || !value.every((x) => typeof x === "string" || typeof x === "number")) {
|
|
5942
|
+
throw new Error(
|
|
5943
|
+
`Operator "in" requires (string | number)[] for "${field}"`
|
|
5944
|
+
);
|
|
5945
|
+
}
|
|
5946
|
+
if (!value.length) {
|
|
5947
|
+
throw new Error(
|
|
5948
|
+
`Operator "in" requires non-empty array for "${field}"`
|
|
5949
|
+
);
|
|
5950
|
+
}
|
|
5951
|
+
return ["in", getExpr, ...value];
|
|
5952
|
+
case "notin":
|
|
5953
|
+
if (!Array.isArray(value) || !value.every((x) => typeof x === "string" || typeof x === "number")) {
|
|
5954
|
+
throw new Error(
|
|
5955
|
+
`Operator "notin" requires (string | number)[] for "${field}"`
|
|
5956
|
+
);
|
|
5957
|
+
}
|
|
5958
|
+
if (!value.length) {
|
|
5959
|
+
throw new Error(
|
|
5960
|
+
`Operator "notin" requires non-empty array for "${field}"`
|
|
5961
|
+
);
|
|
5962
|
+
}
|
|
5963
|
+
return ["!in", getExpr, ...value];
|
|
5964
|
+
case "like":
|
|
5965
|
+
case "ilike":
|
|
5966
|
+
throw new Error(
|
|
5967
|
+
`Operator "${op}" is not supported by server FilterExpression`
|
|
5968
|
+
);
|
|
5969
|
+
default: {
|
|
5970
|
+
const exhaustive = op;
|
|
5971
|
+
throw new Error(`Unsupported operator: ${exhaustive}`);
|
|
5972
|
+
}
|
|
5973
|
+
}
|
|
5974
|
+
}
|
|
5975
|
+
function toGroupExpr(filters) {
|
|
5976
|
+
let logicalOp = "all";
|
|
5977
|
+
const children = [];
|
|
5978
|
+
for (const item of filters) {
|
|
5979
|
+
if (item === "all" || item === "any") {
|
|
5980
|
+
logicalOp = item;
|
|
5981
|
+
continue;
|
|
5982
|
+
}
|
|
5983
|
+
if (isPropertyFilter(item)) {
|
|
5984
|
+
children.push(toConditionExpr(item));
|
|
5985
|
+
continue;
|
|
5986
|
+
}
|
|
5987
|
+
if (isPropertiesFilterGroup(item)) {
|
|
5988
|
+
children.push(toGroupExpr(item));
|
|
5989
|
+
continue;
|
|
5990
|
+
}
|
|
5991
|
+
throw new Error("Invalid PropertiesFilter node");
|
|
5992
|
+
}
|
|
5993
|
+
return [logicalOp, ...children];
|
|
5994
|
+
}
|
|
5995
|
+
function propertiesFilterToExpression(filters) {
|
|
5996
|
+
if (!(filters == null ? void 0 : filters.length)) {
|
|
5997
|
+
return [];
|
|
5998
|
+
}
|
|
5999
|
+
return toGroupExpr(filters);
|
|
6000
|
+
}
|
|
6001
|
+
function propertiesFilterToExpressionString(filters) {
|
|
6002
|
+
if (!(filters == null ? void 0 : filters.length)) {
|
|
6003
|
+
return void 0;
|
|
6004
|
+
}
|
|
6005
|
+
return JSON.stringify(
|
|
6006
|
+
propertiesFilterToExpression(filters)
|
|
6007
|
+
);
|
|
6008
|
+
}
|
|
6009
|
+
|
|
6010
|
+
function createLayerFilterParam(resourceId, filter) {
|
|
6011
|
+
return {
|
|
6012
|
+
[`filter[${resourceId}]`]: propertiesFilterToExpressionString(filter)
|
|
6013
|
+
};
|
|
6014
|
+
}
|
|
6015
|
+
|
|
6016
|
+
var __defProp$k = Object.defineProperty;
|
|
6017
|
+
var __defProps$7 = Object.defineProperties;
|
|
6018
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
6019
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
6020
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
6021
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
6022
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6023
|
+
var __spreadValues$c = (a, b) => {
|
|
5936
6024
|
for (var prop in b || (b = {}))
|
|
5937
|
-
if (__hasOwnProp$
|
|
5938
|
-
__defNormalProp$
|
|
5939
|
-
if (__getOwnPropSymbols$
|
|
5940
|
-
for (var prop of __getOwnPropSymbols$
|
|
5941
|
-
if (__propIsEnum$
|
|
5942
|
-
__defNormalProp$
|
|
6025
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
6026
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
6027
|
+
if (__getOwnPropSymbols$d)
|
|
6028
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
6029
|
+
if (__propIsEnum$d.call(b, prop))
|
|
6030
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
5943
6031
|
}
|
|
5944
6032
|
return a;
|
|
5945
6033
|
};
|
|
5946
|
-
var __spreadProps$
|
|
5947
|
-
var
|
|
6034
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
6035
|
+
var __objRest$2 = (source, exclude) => {
|
|
6036
|
+
var target = {};
|
|
6037
|
+
for (var prop in source)
|
|
6038
|
+
if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
6039
|
+
target[prop] = source[prop];
|
|
6040
|
+
if (source != null && __getOwnPropSymbols$d)
|
|
6041
|
+
for (var prop of __getOwnPropSymbols$d(source)) {
|
|
6042
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
|
|
6043
|
+
target[prop] = source[prop];
|
|
6044
|
+
}
|
|
6045
|
+
return target;
|
|
6046
|
+
};
|
|
6047
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$k(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5948
6048
|
var __async$c = (__this, __arguments, generator) => {
|
|
5949
6049
|
return new Promise((resolve, reject) => {
|
|
5950
6050
|
var fulfilled = (value) => {
|
|
@@ -6008,19 +6108,38 @@ function createRasterAdapter(_0) {
|
|
|
6008
6108
|
baseUrl: connector.options.baseUrl || ""
|
|
6009
6109
|
});
|
|
6010
6110
|
if (opt) {
|
|
6011
|
-
const
|
|
6012
|
-
|
|
6111
|
+
const _a = layerOptions.adapterOptions || {}, { propertiesFilter } = _a, restAdapterOptions = __objRest$2(_a, ["propertiesFilter"]);
|
|
6112
|
+
const filterParams = createLayerFilterParam(
|
|
6113
|
+
resourceId,
|
|
6114
|
+
propertiesFilter
|
|
6115
|
+
);
|
|
6116
|
+
const layerAdapterOptions = __spreadProps$7(__spreadValues$c(__spreadValues$c({}, opt), restAdapterOptions), {
|
|
6117
|
+
params: __spreadValues$c({
|
|
6118
|
+
resource: resourceId
|
|
6119
|
+
}, filterParams),
|
|
6120
|
+
url: adapter === "TILE" && opt.url ? updateUrlParams(opt.url, __spreadValues$c({
|
|
6121
|
+
resource: String(resourceId)
|
|
6122
|
+
}, filterParams)) : opt.url,
|
|
6013
6123
|
layers: opt.layers || String(resourceId),
|
|
6014
6124
|
resourceId
|
|
6015
6125
|
});
|
|
6016
6126
|
if (layerOptions.adapterOptions && defined(layerOptions.adapterOptions.setViewDelay)) {
|
|
6017
6127
|
layerAdapterOptions.setViewDelay = layerOptions.adapterOptions.setViewDelay;
|
|
6018
6128
|
}
|
|
6019
|
-
this.options = __spreadValues$
|
|
6129
|
+
this.options = __spreadValues$c(__spreadValues$c({}, this.options), layerAdapterOptions);
|
|
6020
6130
|
}
|
|
6021
6131
|
}
|
|
6022
6132
|
addLayer(addOptions) {
|
|
6023
|
-
return super.addLayer(__spreadValues$
|
|
6133
|
+
return super.addLayer(__spreadValues$c(__spreadValues$c({}, this.options), addOptions));
|
|
6134
|
+
}
|
|
6135
|
+
propertiesFilter(filters) {
|
|
6136
|
+
return __async$c(this, null, function* () {
|
|
6137
|
+
var _a;
|
|
6138
|
+
const opt = this.options;
|
|
6139
|
+
const params = __spreadValues$c(__spreadValues$c({}, opt.params || {}), createLayerFilterParam(this.resourceId, filters));
|
|
6140
|
+
opt.params = params;
|
|
6141
|
+
(_a = this.updateLayer) == null ? void 0 : _a.call(this, { params });
|
|
6142
|
+
});
|
|
6024
6143
|
}
|
|
6025
6144
|
getIdentificationIds() {
|
|
6026
6145
|
return __async$c(this, null, function* () {
|
|
@@ -6042,7 +6161,7 @@ function createRasterAdapter(_0) {
|
|
|
6042
6161
|
return __async$c(this, null, function* () {
|
|
6043
6162
|
const id = this.options.id;
|
|
6044
6163
|
if (id !== void 0) {
|
|
6045
|
-
const ngwLegend = yield connector.route("render.legend_symbols", { id: resourceId }).get(__spreadValues$
|
|
6164
|
+
const ngwLegend = yield connector.route("render.legend_symbols", { id: resourceId }).get(__spreadValues$c({
|
|
6046
6165
|
cache: true
|
|
6047
6166
|
}, options));
|
|
6048
6167
|
const legend = new Legend({
|
|
@@ -6064,25 +6183,25 @@ function createRasterAdapter(_0) {
|
|
|
6064
6183
|
});
|
|
6065
6184
|
}
|
|
6066
6185
|
|
|
6067
|
-
var __defProp$
|
|
6068
|
-
var __defProps$
|
|
6069
|
-
var __getOwnPropDescs$
|
|
6070
|
-
var __getOwnPropSymbols$
|
|
6071
|
-
var __hasOwnProp$
|
|
6072
|
-
var __propIsEnum$
|
|
6073
|
-
var __defNormalProp$
|
|
6074
|
-
var __spreadValues$
|
|
6186
|
+
var __defProp$j = Object.defineProperty;
|
|
6187
|
+
var __defProps$6 = Object.defineProperties;
|
|
6188
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
6189
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
6190
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
6191
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
6192
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6193
|
+
var __spreadValues$b = (a, b) => {
|
|
6075
6194
|
for (var prop in b || (b = {}))
|
|
6076
|
-
if (__hasOwnProp$
|
|
6077
|
-
__defNormalProp$
|
|
6078
|
-
if (__getOwnPropSymbols$
|
|
6079
|
-
for (var prop of __getOwnPropSymbols$
|
|
6080
|
-
if (__propIsEnum$
|
|
6081
|
-
__defNormalProp$
|
|
6195
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
6196
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
6197
|
+
if (__getOwnPropSymbols$c)
|
|
6198
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
6199
|
+
if (__propIsEnum$c.call(b, prop))
|
|
6200
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
6082
6201
|
}
|
|
6083
6202
|
return a;
|
|
6084
6203
|
};
|
|
6085
|
-
var __spreadProps$
|
|
6204
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
6086
6205
|
var __async$b = (__this, __arguments, generator) => {
|
|
6087
6206
|
return new Promise((resolve, reject) => {
|
|
6088
6207
|
var fulfilled = (value) => {
|
|
@@ -6130,7 +6249,7 @@ function createAdapterFromFirstStyle(_0) {
|
|
|
6130
6249
|
const firstStyle = childrenStyles && childrenStyles[0];
|
|
6131
6250
|
if (firstStyle) {
|
|
6132
6251
|
return createAsyncAdapter(
|
|
6133
|
-
__spreadProps$
|
|
6252
|
+
__spreadProps$6(__spreadValues$b({}, layerOptions), { resource: firstStyle.resource.id }),
|
|
6134
6253
|
webMap,
|
|
6135
6254
|
connector
|
|
6136
6255
|
);
|
|
@@ -6153,7 +6272,7 @@ function createAsyncAdapter(options, webMap, connector) {
|
|
|
6153
6272
|
}
|
|
6154
6273
|
if (item) {
|
|
6155
6274
|
const cls = item.resource.cls;
|
|
6156
|
-
const layerOptions = __spreadProps$
|
|
6275
|
+
const layerOptions = __spreadProps$6(__spreadValues$b({}, options), {
|
|
6157
6276
|
resource: resourceId
|
|
6158
6277
|
});
|
|
6159
6278
|
const adapterOptions = {
|
|
@@ -6190,10 +6309,10 @@ function createAsyncAdapter(options, webMap, connector) {
|
|
|
6190
6309
|
item.resource.parent.id
|
|
6191
6310
|
);
|
|
6192
6311
|
if (parentItem) {
|
|
6193
|
-
const parentOptions = __spreadProps$
|
|
6312
|
+
const parentOptions = __spreadProps$6(__spreadValues$b({}, options), {
|
|
6194
6313
|
resource: item.resource.parent.id
|
|
6195
6314
|
});
|
|
6196
|
-
adapter = createGeoJsonAdapter(__spreadProps$
|
|
6315
|
+
adapter = createGeoJsonAdapter(__spreadProps$6(__spreadValues$b({}, adapterOptions), {
|
|
6197
6316
|
item: parentItem,
|
|
6198
6317
|
layerOptions: parentOptions
|
|
6199
6318
|
}));
|
|
@@ -6237,23 +6356,23 @@ function createAsyncAdapter(options, webMap, connector) {
|
|
|
6237
6356
|
});
|
|
6238
6357
|
}
|
|
6239
6358
|
|
|
6240
|
-
var __defProp$
|
|
6241
|
-
var __getOwnPropSymbols$
|
|
6242
|
-
var __hasOwnProp$
|
|
6243
|
-
var __propIsEnum$
|
|
6244
|
-
var __defNormalProp$
|
|
6245
|
-
var __spreadValues$
|
|
6359
|
+
var __defProp$i = Object.defineProperty;
|
|
6360
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
6361
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
6362
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
6363
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6364
|
+
var __spreadValues$a = (a, b) => {
|
|
6246
6365
|
for (var prop in b || (b = {}))
|
|
6247
|
-
if (__hasOwnProp$
|
|
6248
|
-
__defNormalProp$
|
|
6249
|
-
if (__getOwnPropSymbols$
|
|
6250
|
-
for (var prop of __getOwnPropSymbols$
|
|
6251
|
-
if (__propIsEnum$
|
|
6252
|
-
__defNormalProp$
|
|
6366
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
6367
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
6368
|
+
if (__getOwnPropSymbols$b)
|
|
6369
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
6370
|
+
if (__propIsEnum$b.call(b, prop))
|
|
6371
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
6253
6372
|
}
|
|
6254
6373
|
return a;
|
|
6255
6374
|
};
|
|
6256
|
-
var __publicField$b = (obj, key, value) => __defNormalProp$
|
|
6375
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6257
6376
|
var __async$a = (__this, __arguments, generator) => {
|
|
6258
6377
|
return new Promise((resolve, reject) => {
|
|
6259
6378
|
var fulfilled = (value) => {
|
|
@@ -6309,7 +6428,7 @@ class NgwKit {
|
|
|
6309
6428
|
connector: this.connector,
|
|
6310
6429
|
webMap
|
|
6311
6430
|
};
|
|
6312
|
-
const layer = yield webMap.addLayer(NgwWebmapLayerAdapter, __spreadValues$
|
|
6431
|
+
const layer = yield webMap.addLayer(NgwWebmapLayerAdapter, __spreadValues$a({
|
|
6313
6432
|
visibility: true,
|
|
6314
6433
|
fit: true,
|
|
6315
6434
|
pixelRadius: this.options.pixelRadius
|
|
@@ -6340,23 +6459,23 @@ class NgwKit {
|
|
|
6340
6459
|
}
|
|
6341
6460
|
}
|
|
6342
6461
|
|
|
6343
|
-
var __defProp$
|
|
6344
|
-
var __getOwnPropSymbols$
|
|
6345
|
-
var __hasOwnProp$
|
|
6346
|
-
var __propIsEnum$
|
|
6347
|
-
var __defNormalProp$
|
|
6348
|
-
var __spreadValues$
|
|
6462
|
+
var __defProp$h = Object.defineProperty;
|
|
6463
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
6464
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
6465
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
6466
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6467
|
+
var __spreadValues$9 = (a, b) => {
|
|
6349
6468
|
for (var prop in b || (b = {}))
|
|
6350
|
-
if (__hasOwnProp$
|
|
6351
|
-
__defNormalProp$
|
|
6352
|
-
if (__getOwnPropSymbols$
|
|
6353
|
-
for (var prop of __getOwnPropSymbols$
|
|
6354
|
-
if (__propIsEnum$
|
|
6355
|
-
__defNormalProp$
|
|
6469
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
6470
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
6471
|
+
if (__getOwnPropSymbols$a)
|
|
6472
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
6473
|
+
if (__propIsEnum$a.call(b, prop))
|
|
6474
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
6356
6475
|
}
|
|
6357
6476
|
return a;
|
|
6358
6477
|
};
|
|
6359
|
-
var __publicField$a = (obj, key, value) => __defNormalProp$
|
|
6478
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6360
6479
|
var __async$9 = (__this, __arguments, generator) => {
|
|
6361
6480
|
return new Promise((resolve, reject) => {
|
|
6362
6481
|
var fulfilled = (value) => {
|
|
@@ -6404,7 +6523,7 @@ class IdentifyItem {
|
|
|
6404
6523
|
if (this._item) {
|
|
6405
6524
|
return Promise.resolve(this._item);
|
|
6406
6525
|
}
|
|
6407
|
-
return fetchNgwLayerItem(__spreadValues$
|
|
6526
|
+
return fetchNgwLayerItem(__spreadValues$9({
|
|
6408
6527
|
connector: this.connector,
|
|
6409
6528
|
featureId: this.id,
|
|
6410
6529
|
resourceId: this.layerId,
|
|
@@ -6443,7 +6562,7 @@ class IdentifyItem {
|
|
|
6443
6562
|
if (this._extent) {
|
|
6444
6563
|
return Promise.resolve(this._extent);
|
|
6445
6564
|
}
|
|
6446
|
-
return fetchNgwLayerItemExtent(__spreadValues$
|
|
6565
|
+
return fetchNgwLayerItemExtent(__spreadValues$9({
|
|
6447
6566
|
connector: this.connector,
|
|
6448
6567
|
featureId: this.id,
|
|
6449
6568
|
resourceId: this.layerId
|
|
@@ -6517,7 +6636,8 @@ function getCompanyLogo(connector, options) {
|
|
|
6517
6636
|
component: "pyramid"
|
|
6518
6637
|
}
|
|
6519
6638
|
});
|
|
6520
|
-
|
|
6639
|
+
const company_logo = settings && "company_logo" in settings ? settings.company_logo : void 0;
|
|
6640
|
+
if (company_logo && company_logo.enabled) {
|
|
6521
6641
|
const anchor = document.createElement("a");
|
|
6522
6642
|
anchor.style.position = "absolute";
|
|
6523
6643
|
anchor.style.bottom = "0";
|
|
@@ -6552,10 +6672,10 @@ function getCompanyLogo(connector, options) {
|
|
|
6552
6672
|
} else {
|
|
6553
6673
|
return;
|
|
6554
6674
|
}
|
|
6555
|
-
if (
|
|
6556
|
-
anchor.href =
|
|
6675
|
+
if (company_logo.link !== null && company_logo.link.trim() !== "") {
|
|
6676
|
+
anchor.href = company_logo.link;
|
|
6557
6677
|
anchor.target = "_blank";
|
|
6558
|
-
if (
|
|
6678
|
+
if (company_logo.link.search(/:\/\/nextgis/) !== -1) {
|
|
6559
6679
|
img.alt = "Get your own Web GIS at nextgis.com";
|
|
6560
6680
|
}
|
|
6561
6681
|
}
|
|
@@ -6565,25 +6685,25 @@ function getCompanyLogo(connector, options) {
|
|
|
6565
6685
|
});
|
|
6566
6686
|
}
|
|
6567
6687
|
|
|
6568
|
-
var __defProp$
|
|
6569
|
-
var __defProps$
|
|
6570
|
-
var __getOwnPropDescs$
|
|
6571
|
-
var __getOwnPropSymbols$
|
|
6572
|
-
var __hasOwnProp$
|
|
6573
|
-
var __propIsEnum$
|
|
6574
|
-
var __defNormalProp$
|
|
6575
|
-
var __spreadValues$
|
|
6688
|
+
var __defProp$g = Object.defineProperty;
|
|
6689
|
+
var __defProps$5 = Object.defineProperties;
|
|
6690
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
6691
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
6692
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
6693
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
6694
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6695
|
+
var __spreadValues$8 = (a, b) => {
|
|
6576
6696
|
for (var prop in b || (b = {}))
|
|
6577
|
-
if (__hasOwnProp$
|
|
6578
|
-
__defNormalProp$
|
|
6579
|
-
if (__getOwnPropSymbols$
|
|
6580
|
-
for (var prop of __getOwnPropSymbols$
|
|
6581
|
-
if (__propIsEnum$
|
|
6582
|
-
__defNormalProp$
|
|
6697
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
6698
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
6699
|
+
if (__getOwnPropSymbols$9)
|
|
6700
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
6701
|
+
if (__propIsEnum$9.call(b, prop))
|
|
6702
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
6583
6703
|
}
|
|
6584
6704
|
return a;
|
|
6585
6705
|
};
|
|
6586
|
-
var __spreadProps$
|
|
6706
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
6587
6707
|
function getIdentifyItems(identify, multiple = false) {
|
|
6588
6708
|
const resources = [];
|
|
6589
6709
|
const paramsList = [];
|
|
@@ -6646,7 +6766,7 @@ function fetchIdentifyGeoJson(options) {
|
|
|
6646
6766
|
if (withGeom && withGeom.geom) {
|
|
6647
6767
|
const geom = withGeom.geom;
|
|
6648
6768
|
return Promise.resolve(
|
|
6649
|
-
createGeoJsonFeature(__spreadProps$
|
|
6769
|
+
createGeoJsonFeature(__spreadProps$5(__spreadValues$8({}, withGeom), {
|
|
6650
6770
|
geom
|
|
6651
6771
|
}))
|
|
6652
6772
|
);
|
|
@@ -6656,7 +6776,7 @@ function fetchIdentifyGeoJson(options) {
|
|
|
6656
6776
|
}
|
|
6657
6777
|
const params = getIdentifyItems(identify);
|
|
6658
6778
|
if (params && params.length) {
|
|
6659
|
-
return fetchNgwLayerFeature(__spreadValues$
|
|
6779
|
+
return fetchNgwLayerFeature(__spreadValues$8(__spreadProps$5(__spreadValues$8({}, requestOptions), { connector }), params[0]));
|
|
6660
6780
|
}
|
|
6661
6781
|
return Promise.resolve(void 0);
|
|
6662
6782
|
}
|
|
@@ -6664,7 +6784,7 @@ function fetchIdentifyItem(options) {
|
|
|
6664
6784
|
const { connector, identify } = options;
|
|
6665
6785
|
const params = getIdentifyItems(identify);
|
|
6666
6786
|
if (params && params.length) {
|
|
6667
|
-
return fetchNgwLayerItem(__spreadValues$
|
|
6787
|
+
return fetchNgwLayerItem(__spreadValues$8(__spreadValues$8({
|
|
6668
6788
|
connector
|
|
6669
6789
|
}, options.requestOptions), params[0]));
|
|
6670
6790
|
}
|
|
@@ -6714,7 +6834,7 @@ function sendIdentifyRequest(ev, options) {
|
|
|
6714
6834
|
const [lng, lat] = ev.lngLat;
|
|
6715
6835
|
const { geom, radius } = options;
|
|
6716
6836
|
const geom_ = geom != null ? geom : getCirclePolygonCoordinates(lng, lat, radius);
|
|
6717
|
-
return featureLayerIdentify(__spreadProps$
|
|
6837
|
+
return featureLayerIdentify(__spreadProps$5(__spreadValues$8({}, options), { geom: geom_ }));
|
|
6718
6838
|
}
|
|
6719
6839
|
function createIdentifyItem(opt) {
|
|
6720
6840
|
return new IdentifyItem(opt);
|
|
@@ -6730,6 +6850,7 @@ function setWebMap(id, webMap) {
|
|
|
6730
6850
|
|
|
6731
6851
|
function createToggleControl(createButtonControl, options) {
|
|
6732
6852
|
const link = document.createElement("div");
|
|
6853
|
+
const statusListeners = /* @__PURE__ */ new Set();
|
|
6733
6854
|
let status = false;
|
|
6734
6855
|
if (options.getStatus) {
|
|
6735
6856
|
status = options.getStatus();
|
|
@@ -6789,6 +6910,9 @@ function createToggleControl(createButtonControl, options) {
|
|
|
6789
6910
|
_setClass(options.addClass, true);
|
|
6790
6911
|
}
|
|
6791
6912
|
setClass();
|
|
6913
|
+
function notifyStatusChange(control) {
|
|
6914
|
+
statusListeners.forEach((listener) => listener(status, control));
|
|
6915
|
+
}
|
|
6792
6916
|
const changeStatus = (status_) => {
|
|
6793
6917
|
if (status_ !== void 0) {
|
|
6794
6918
|
status = status_;
|
|
@@ -6797,13 +6921,36 @@ function createToggleControl(createButtonControl, options) {
|
|
|
6797
6921
|
setTitle();
|
|
6798
6922
|
setClass();
|
|
6799
6923
|
};
|
|
6924
|
+
const getStatus = () => status;
|
|
6800
6925
|
const onClick = (status_) => {
|
|
6926
|
+
if (status_ === void 0 && status && buttonControl.disableOnSecondClick) {
|
|
6927
|
+
return;
|
|
6928
|
+
}
|
|
6929
|
+
const previousStatus = status;
|
|
6801
6930
|
status = status_ !== void 0 ? status_ : !status;
|
|
6802
6931
|
if (options.onClick) {
|
|
6803
|
-
|
|
6804
|
-
|
|
6932
|
+
let afterClick;
|
|
6933
|
+
try {
|
|
6934
|
+
afterClick = options.onClick(status);
|
|
6935
|
+
} catch (er) {
|
|
6936
|
+
status = previousStatus;
|
|
6937
|
+
changeStatus();
|
|
6938
|
+
throw er;
|
|
6939
|
+
}
|
|
6940
|
+
Promise.resolve(afterClick).then(() => {
|
|
6941
|
+
changeStatus();
|
|
6942
|
+
if (previousStatus !== status) {
|
|
6943
|
+
notifyStatusChange(buttonControl);
|
|
6944
|
+
}
|
|
6945
|
+
}).catch(() => {
|
|
6946
|
+
status = previousStatus;
|
|
6947
|
+
changeStatus();
|
|
6948
|
+
});
|
|
6805
6949
|
} else {
|
|
6806
6950
|
changeStatus();
|
|
6951
|
+
if (previousStatus !== status) {
|
|
6952
|
+
notifyStatusChange(buttonControl);
|
|
6953
|
+
}
|
|
6807
6954
|
}
|
|
6808
6955
|
};
|
|
6809
6956
|
const buttonControl = createButtonControl({
|
|
@@ -6812,6 +6959,15 @@ function createToggleControl(createButtonControl, options) {
|
|
|
6812
6959
|
});
|
|
6813
6960
|
buttonControl.onClick = onClick;
|
|
6814
6961
|
buttonControl.changeStatus = changeStatus;
|
|
6962
|
+
buttonControl.getStatus = getStatus;
|
|
6963
|
+
buttonControl.switch = options.switch;
|
|
6964
|
+
if (options.disableOnSecondClick !== void 0) {
|
|
6965
|
+
buttonControl.disableOnSecondClick = options.disableOnSecondClick;
|
|
6966
|
+
}
|
|
6967
|
+
buttonControl.onStatusChange = (listener) => {
|
|
6968
|
+
statusListeners.add(listener);
|
|
6969
|
+
return () => statusListeners.delete(listener);
|
|
6970
|
+
};
|
|
6815
6971
|
return buttonControl;
|
|
6816
6972
|
}
|
|
6817
6973
|
|
|
@@ -7436,19 +7592,19 @@ const typeExpressions = {
|
|
|
7436
7592
|
typeof: evaluateArgs(([arg]) => typeOfValue(arg))
|
|
7437
7593
|
};
|
|
7438
7594
|
|
|
7439
|
-
var __defProp$
|
|
7440
|
-
var __getOwnPropSymbols$
|
|
7441
|
-
var __hasOwnProp$
|
|
7442
|
-
var __propIsEnum$
|
|
7443
|
-
var __defNormalProp$
|
|
7444
|
-
var __spreadValues$
|
|
7595
|
+
var __defProp$f = Object.defineProperty;
|
|
7596
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
7597
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
7598
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
7599
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7600
|
+
var __spreadValues$7 = (a, b) => {
|
|
7445
7601
|
for (var prop in b || (b = {}))
|
|
7446
|
-
if (__hasOwnProp$
|
|
7447
|
-
__defNormalProp$
|
|
7448
|
-
if (__getOwnPropSymbols$
|
|
7449
|
-
for (var prop of __getOwnPropSymbols$
|
|
7450
|
-
if (__propIsEnum$
|
|
7451
|
-
__defNormalProp$
|
|
7602
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
7603
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
7604
|
+
if (__getOwnPropSymbols$8)
|
|
7605
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
7606
|
+
if (__propIsEnum$8.call(b, prop))
|
|
7607
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
7452
7608
|
}
|
|
7453
7609
|
return a;
|
|
7454
7610
|
};
|
|
@@ -7460,7 +7616,7 @@ function isExpression(value) {
|
|
|
7460
7616
|
}
|
|
7461
7617
|
return false;
|
|
7462
7618
|
}
|
|
7463
|
-
const expressions = __spreadValues$
|
|
7619
|
+
const expressions = __spreadValues$7(__spreadValues$7(__spreadValues$7(__spreadValues$7(__spreadValues$7(__spreadValues$7({}, mathExpressions), typeExpressions), stringExpressions), lookupExpressions), decisionExpressions), interpolationExpressions);
|
|
7464
7620
|
function evaluate(expression, data = {}) {
|
|
7465
7621
|
const [name, ...args] = expression;
|
|
7466
7622
|
const expressionFun = expressions[name];
|
|
@@ -7473,19 +7629,19 @@ function evaluate(expression, data = {}) {
|
|
|
7473
7629
|
throw new Error(`Expression "${name}" is not supported.`);
|
|
7474
7630
|
}
|
|
7475
7631
|
|
|
7476
|
-
var __defProp$
|
|
7477
|
-
var __getOwnPropSymbols$
|
|
7478
|
-
var __hasOwnProp$
|
|
7479
|
-
var __propIsEnum$
|
|
7480
|
-
var __defNormalProp$
|
|
7481
|
-
var __spreadValues$
|
|
7632
|
+
var __defProp$e = Object.defineProperty;
|
|
7633
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
7634
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
7635
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
7636
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7637
|
+
var __spreadValues$6 = (a, b) => {
|
|
7482
7638
|
for (var prop in b || (b = {}))
|
|
7483
|
-
if (__hasOwnProp$
|
|
7484
|
-
__defNormalProp$
|
|
7485
|
-
if (__getOwnPropSymbols$
|
|
7486
|
-
for (var prop of __getOwnPropSymbols$
|
|
7487
|
-
if (__propIsEnum$
|
|
7488
|
-
__defNormalProp$
|
|
7639
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
7640
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
7641
|
+
if (__getOwnPropSymbols$7)
|
|
7642
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
7643
|
+
if (__propIsEnum$7.call(b, prop))
|
|
7644
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
7489
7645
|
}
|
|
7490
7646
|
return a;
|
|
7491
7647
|
};
|
|
@@ -7518,7 +7674,7 @@ function createExpressionCallback(paint) {
|
|
|
7518
7674
|
for (const p in expressions) {
|
|
7519
7675
|
fromCb[p] = expressions[p](feature);
|
|
7520
7676
|
}
|
|
7521
|
-
return __spreadValues$
|
|
7677
|
+
return __spreadValues$6(__spreadValues$6({}, paint), fromCb);
|
|
7522
7678
|
};
|
|
7523
7679
|
}
|
|
7524
7680
|
return;
|
|
@@ -7543,19 +7699,19 @@ function isPaintCallback(paint) {
|
|
|
7543
7699
|
return false;
|
|
7544
7700
|
}
|
|
7545
7701
|
|
|
7546
|
-
var __defProp$
|
|
7547
|
-
var __getOwnPropSymbols$
|
|
7548
|
-
var __hasOwnProp$
|
|
7549
|
-
var __propIsEnum$
|
|
7550
|
-
var __defNormalProp$
|
|
7551
|
-
var __spreadValues$
|
|
7702
|
+
var __defProp$d = Object.defineProperty;
|
|
7703
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
7704
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
7705
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
7706
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7707
|
+
var __spreadValues$5 = (a, b) => {
|
|
7552
7708
|
for (var prop in b || (b = {}))
|
|
7553
|
-
if (__hasOwnProp$
|
|
7554
|
-
__defNormalProp$
|
|
7555
|
-
if (__getOwnPropSymbols$
|
|
7556
|
-
for (var prop of __getOwnPropSymbols$
|
|
7557
|
-
if (__propIsEnum$
|
|
7558
|
-
__defNormalProp$
|
|
7709
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
7710
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
7711
|
+
if (__getOwnPropSymbols$6)
|
|
7712
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
7713
|
+
if (__propIsEnum$6.call(b, prop))
|
|
7714
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
7559
7715
|
}
|
|
7560
7716
|
return a;
|
|
7561
7717
|
};
|
|
@@ -7584,7 +7740,7 @@ function createPropertiesPaint(propertiesPaint) {
|
|
|
7584
7740
|
return (feature) => {
|
|
7585
7741
|
const paint = paintsFilters.find((x) => featureFilter(feature, x[0]));
|
|
7586
7742
|
if (paint) {
|
|
7587
|
-
return __spreadValues$
|
|
7743
|
+
return __spreadValues$5(__spreadValues$5({}, mask), paint[1]);
|
|
7588
7744
|
}
|
|
7589
7745
|
return mask;
|
|
7590
7746
|
};
|
|
@@ -7608,8 +7764,8 @@ function expressionCallback({
|
|
|
7608
7764
|
}
|
|
7609
7765
|
function finalizePaint({ paint, defaultPaint }) {
|
|
7610
7766
|
var _a;
|
|
7611
|
-
let newPaint = __spreadValues$
|
|
7612
|
-
newPaint = __spreadValues$
|
|
7767
|
+
let newPaint = __spreadValues$5({}, defaultPaint);
|
|
7768
|
+
newPaint = __spreadValues$5(__spreadValues$5({}, newPaint), paint);
|
|
7613
7769
|
newPaint.fill = (_a = newPaint.fill) != null ? _a : true;
|
|
7614
7770
|
newPaint.stroke = newPaint.stroke !== void 0 ? newPaint.stroke : !newPaint.fill || !!(newPaint.strokeColor || newPaint.strokeOpacity);
|
|
7615
7771
|
return newPaint;
|
|
@@ -7622,7 +7778,7 @@ function preparePaint({
|
|
|
7622
7778
|
if (!paint) {
|
|
7623
7779
|
throw new Error("paint is empty");
|
|
7624
7780
|
}
|
|
7625
|
-
let newPaint = __spreadValues$
|
|
7781
|
+
let newPaint = __spreadValues$5({}, defaultPaint);
|
|
7626
7782
|
if (isPaintCallback(paint)) {
|
|
7627
7783
|
const getPaintFunction = (feature) => {
|
|
7628
7784
|
const getPaint = preparePaint({
|
|
@@ -7738,9 +7894,9 @@ function updateGeoJsonAdapterOptions(opt) {
|
|
|
7738
7894
|
return opt;
|
|
7739
7895
|
}
|
|
7740
7896
|
|
|
7741
|
-
var __defProp$
|
|
7742
|
-
var __defNormalProp$
|
|
7743
|
-
var __publicField$9 = (obj, key, value) => __defNormalProp$
|
|
7897
|
+
var __defProp$c = Object.defineProperty;
|
|
7898
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7899
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7744
7900
|
class KeyCodes {
|
|
7745
7901
|
constructor() {
|
|
7746
7902
|
__publicField$9(this, "backspace", 8);
|
|
@@ -7817,9 +7973,9 @@ class KeyCodes {
|
|
|
7817
7973
|
// "single quote"
|
|
7818
7974
|
}
|
|
7819
7975
|
|
|
7820
|
-
var __defProp$
|
|
7821
|
-
var __defNormalProp$
|
|
7822
|
-
var __publicField$8 = (obj, key, value) => __defNormalProp$
|
|
7976
|
+
var __defProp$b = Object.defineProperty;
|
|
7977
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7978
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7823
7979
|
class Keys {
|
|
7824
7980
|
constructor() {
|
|
7825
7981
|
__publicField$8(this, "keyCodeAlias", new KeyCodes());
|
|
@@ -7865,9 +8021,9 @@ class Keys {
|
|
|
7865
8021
|
}
|
|
7866
8022
|
}
|
|
7867
8023
|
|
|
7868
|
-
var __defProp$
|
|
7869
|
-
var __defNormalProp$
|
|
7870
|
-
var __publicField$7 = (obj, key, value) => __defNormalProp$
|
|
8024
|
+
var __defProp$a = Object.defineProperty;
|
|
8025
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8026
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7871
8027
|
class StateItem {
|
|
7872
8028
|
constructor(webMap, opt) {
|
|
7873
8029
|
this.webMap = webMap;
|
|
@@ -7898,9 +8054,9 @@ class StateItem {
|
|
|
7898
8054
|
}
|
|
7899
8055
|
}
|
|
7900
8056
|
|
|
7901
|
-
var __defProp$
|
|
7902
|
-
var __defNormalProp$
|
|
7903
|
-
var __publicField$6 = (obj, key, value) => __defNormalProp$
|
|
8057
|
+
var __defProp$9 = Object.defineProperty;
|
|
8058
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8059
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7904
8060
|
class BoundState extends StateItem {
|
|
7905
8061
|
constructor() {
|
|
7906
8062
|
super(...arguments);
|
|
@@ -7926,9 +8082,9 @@ class BoundState extends StateItem {
|
|
|
7926
8082
|
}
|
|
7927
8083
|
}
|
|
7928
8084
|
|
|
7929
|
-
var __defProp$
|
|
7930
|
-
var __defNormalProp$
|
|
7931
|
-
var __publicField$5 = (obj, key, value) => __defNormalProp$
|
|
8085
|
+
var __defProp$8 = Object.defineProperty;
|
|
8086
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8087
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7932
8088
|
class CenterState extends StateItem {
|
|
7933
8089
|
constructor() {
|
|
7934
8090
|
super(...arguments);
|
|
@@ -7955,9 +8111,9 @@ class CenterState extends StateItem {
|
|
|
7955
8111
|
}
|
|
7956
8112
|
}
|
|
7957
8113
|
|
|
7958
|
-
var __defProp$
|
|
7959
|
-
var __defNormalProp$
|
|
7960
|
-
var __publicField$4 = (obj, key, value) => __defNormalProp$
|
|
8114
|
+
var __defProp$7 = Object.defineProperty;
|
|
8115
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8116
|
+
var __publicField$4 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7961
8117
|
class ZoomState extends StateItem {
|
|
7962
8118
|
constructor() {
|
|
7963
8119
|
super(...arguments);
|
|
@@ -7985,9 +8141,9 @@ function clearObject(obj) {
|
|
|
7985
8141
|
}
|
|
7986
8142
|
}
|
|
7987
8143
|
|
|
7988
|
-
var __defProp$
|
|
7989
|
-
var __defNormalProp$
|
|
7990
|
-
var __publicField$3 = (obj, key, value) => __defNormalProp$
|
|
8144
|
+
var __defProp$6 = Object.defineProperty;
|
|
8145
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8146
|
+
var __publicField$3 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7991
8147
|
var __async$6 = (__this, __arguments, generator) => {
|
|
7992
8148
|
return new Promise((resolve, reject) => {
|
|
7993
8149
|
var fulfilled = (value) => {
|
|
@@ -8534,26 +8690,26 @@ __publicField$3(_WebMapMain, "keys", new Keys());
|
|
|
8534
8690
|
__publicField$3(_WebMapMain, "getPaintFunctions");
|
|
8535
8691
|
let WebMapMain = _WebMapMain;
|
|
8536
8692
|
|
|
8537
|
-
var __defProp$
|
|
8538
|
-
var __defProps$
|
|
8539
|
-
var __getOwnPropDescs$
|
|
8540
|
-
var __getOwnPropSymbols$
|
|
8541
|
-
var __hasOwnProp$
|
|
8542
|
-
var __propIsEnum$
|
|
8543
|
-
var __defNormalProp$
|
|
8544
|
-
var __spreadValues$
|
|
8693
|
+
var __defProp$5 = Object.defineProperty;
|
|
8694
|
+
var __defProps$4 = Object.defineProperties;
|
|
8695
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
8696
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
8697
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
8698
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
8699
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8700
|
+
var __spreadValues$4 = (a, b) => {
|
|
8545
8701
|
for (var prop in b || (b = {}))
|
|
8546
|
-
if (__hasOwnProp$
|
|
8547
|
-
__defNormalProp$
|
|
8548
|
-
if (__getOwnPropSymbols$
|
|
8549
|
-
for (var prop of __getOwnPropSymbols$
|
|
8550
|
-
if (__propIsEnum$
|
|
8551
|
-
__defNormalProp$
|
|
8702
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
8703
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
8704
|
+
if (__getOwnPropSymbols$5)
|
|
8705
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
8706
|
+
if (__propIsEnum$5.call(b, prop))
|
|
8707
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
8552
8708
|
}
|
|
8553
8709
|
return a;
|
|
8554
8710
|
};
|
|
8555
|
-
var __spreadProps$
|
|
8556
|
-
var __publicField$2 = (obj, key, value) => __defNormalProp$
|
|
8711
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
8712
|
+
var __publicField$2 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8557
8713
|
var __async$5 = (__this, __arguments, generator) => {
|
|
8558
8714
|
return new Promise((resolve, reject) => {
|
|
8559
8715
|
var fulfilled = (value) => {
|
|
@@ -8688,7 +8844,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
8688
8844
|
return __async$5(this, null, function* () {
|
|
8689
8845
|
const layer = yield this.addLayer(
|
|
8690
8846
|
adapter,
|
|
8691
|
-
__spreadProps$
|
|
8847
|
+
__spreadProps$4(__spreadValues$4({}, options), {
|
|
8692
8848
|
baselayer: true
|
|
8693
8849
|
}),
|
|
8694
8850
|
void 0
|
|
@@ -8725,7 +8881,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
8725
8881
|
}
|
|
8726
8882
|
const geoJsonOptions = options;
|
|
8727
8883
|
this._updateGeoJsonOptions(geoJsonOptions);
|
|
8728
|
-
options = __spreadValues$
|
|
8884
|
+
options = __spreadValues$4({
|
|
8729
8885
|
id: String(id),
|
|
8730
8886
|
order: _order
|
|
8731
8887
|
}, options);
|
|
@@ -8750,7 +8906,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
8750
8906
|
}
|
|
8751
8907
|
if (adapterEngine !== void 0) {
|
|
8752
8908
|
const _adapter = new adapterEngine(this.mapAdapter.map, options);
|
|
8753
|
-
_adapter.options = __spreadValues$
|
|
8909
|
+
_adapter.options = __spreadValues$4(__spreadValues$4({}, options), _adapter.options);
|
|
8754
8910
|
if (_adapter.options.baselayer) {
|
|
8755
8911
|
options.baselayer = true;
|
|
8756
8912
|
options.order = 0;
|
|
@@ -8937,7 +9093,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
8937
9093
|
}
|
|
8938
9094
|
/** Shortcut for {@link WebMapLayers.addLayer} to create TileLayer adapter */
|
|
8939
9095
|
addTileLayer(url, options = {}) {
|
|
8940
|
-
return this.addLayer("TILE", __spreadProps$
|
|
9096
|
+
return this.addLayer("TILE", __spreadProps$4(__spreadValues$4({}, options), { url }));
|
|
8941
9097
|
}
|
|
8942
9098
|
addImageLayer(urlOrOptions, options) {
|
|
8943
9099
|
let url;
|
|
@@ -8947,7 +9103,7 @@ class WebMapLayers extends WebMapMain {
|
|
|
8947
9103
|
url = urlOrOptions.url;
|
|
8948
9104
|
options = urlOrOptions;
|
|
8949
9105
|
}
|
|
8950
|
-
return this.addLayer("IMAGE", __spreadProps$
|
|
9106
|
+
return this.addLayer("IMAGE", __spreadProps$4(__spreadValues$4({}, options), { url }));
|
|
8951
9107
|
}
|
|
8952
9108
|
/**
|
|
8953
9109
|
* Show added layer on the map by it definition.
|
|
@@ -9410,9 +9566,24 @@ class WebMapLayers extends WebMapMain {
|
|
|
9410
9566
|
}
|
|
9411
9567
|
}
|
|
9412
9568
|
|
|
9413
|
-
var __defProp$
|
|
9414
|
-
var
|
|
9415
|
-
var
|
|
9569
|
+
var __defProp$4 = Object.defineProperty;
|
|
9570
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
9571
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
9572
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
9573
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9574
|
+
var __objRest$1 = (source, exclude) => {
|
|
9575
|
+
var target = {};
|
|
9576
|
+
for (var prop in source)
|
|
9577
|
+
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
9578
|
+
target[prop] = source[prop];
|
|
9579
|
+
if (source != null && __getOwnPropSymbols$4)
|
|
9580
|
+
for (var prop of __getOwnPropSymbols$4(source)) {
|
|
9581
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
|
|
9582
|
+
target[prop] = source[prop];
|
|
9583
|
+
}
|
|
9584
|
+
return target;
|
|
9585
|
+
};
|
|
9586
|
+
var __publicField$1 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9416
9587
|
var __async$4 = (__this, __arguments, generator) => {
|
|
9417
9588
|
return new Promise((resolve, reject) => {
|
|
9418
9589
|
var fulfilled = (value) => {
|
|
@@ -9440,21 +9611,24 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
9440
9611
|
"top-right": [],
|
|
9441
9612
|
"bottom-right": [],
|
|
9442
9613
|
"top-left": [],
|
|
9443
|
-
"bottom-left": []
|
|
9614
|
+
"bottom-left": [],
|
|
9615
|
+
inside: []
|
|
9444
9616
|
});
|
|
9445
9617
|
__publicField$1(this, "_isControlLoading", {
|
|
9446
9618
|
"top-right": false,
|
|
9447
9619
|
"bottom-right": false,
|
|
9448
9620
|
"top-left": false,
|
|
9449
|
-
"bottom-left": false
|
|
9621
|
+
"bottom-left": false,
|
|
9622
|
+
inside: false
|
|
9450
9623
|
});
|
|
9451
9624
|
}
|
|
9452
9625
|
addControl(controlDef, position, options) {
|
|
9453
9626
|
return __async$4(this, null, function* () {
|
|
9454
9627
|
let control;
|
|
9628
|
+
const { addOptions, createOptions } = this._splitControlOptions(options);
|
|
9455
9629
|
position = position != null ? position : "top-left";
|
|
9456
9630
|
if (typeof controlDef === "string") {
|
|
9457
|
-
control = this.getControl(controlDef,
|
|
9631
|
+
control = this.getControl(controlDef, createOptions);
|
|
9458
9632
|
} else {
|
|
9459
9633
|
control = controlDef;
|
|
9460
9634
|
}
|
|
@@ -9462,10 +9636,10 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
9462
9636
|
return new Promise((resolve) => {
|
|
9463
9637
|
const promise = () => __async$4(this, null, function* () {
|
|
9464
9638
|
const _control = yield control;
|
|
9465
|
-
const c = this.mapAdapter.addControl(_control, position);
|
|
9639
|
+
const c = this.mapAdapter.addControl(_control, position, addOptions);
|
|
9466
9640
|
resolve(c);
|
|
9467
9641
|
});
|
|
9468
|
-
this._setControlQueue(position, promise);
|
|
9642
|
+
this._setControlQueue(this._getControlQueueKey(position), promise);
|
|
9469
9643
|
});
|
|
9470
9644
|
}
|
|
9471
9645
|
});
|
|
@@ -9567,6 +9741,9 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
9567
9741
|
return this.mapAdapter.getControlContainer();
|
|
9568
9742
|
}
|
|
9569
9743
|
}
|
|
9744
|
+
_getControlQueueKey(position) {
|
|
9745
|
+
return typeof position === "string" ? position : "inside";
|
|
9746
|
+
}
|
|
9570
9747
|
_setControlQueue(position, cb) {
|
|
9571
9748
|
this._loadControlQueue[position].push(cb);
|
|
9572
9749
|
if (!this._isControlLoading[position]) {
|
|
@@ -9586,6 +9763,20 @@ const _WebMapControls = class _WebMapControls extends WebMapLayers {
|
|
|
9586
9763
|
}
|
|
9587
9764
|
});
|
|
9588
9765
|
}
|
|
9766
|
+
_splitControlOptions(options) {
|
|
9767
|
+
if (!options) {
|
|
9768
|
+
return {};
|
|
9769
|
+
}
|
|
9770
|
+
const _a = options, { id, order } = _a, createOptions = __objRest$1(_a, ["id", "order"]);
|
|
9771
|
+
const addOptions = this._getAddControlOptions(id, order);
|
|
9772
|
+
return {
|
|
9773
|
+
addOptions,
|
|
9774
|
+
createOptions
|
|
9775
|
+
};
|
|
9776
|
+
}
|
|
9777
|
+
_getAddControlOptions(id, order) {
|
|
9778
|
+
return id !== void 0 || order !== void 0 ? { id, order } : void 0;
|
|
9779
|
+
}
|
|
9589
9780
|
};
|
|
9590
9781
|
__publicField$1(_WebMapControls, "controls", {
|
|
9591
9782
|
CONTROL: (webMap, options) => {
|
|
@@ -9600,10 +9791,26 @@ __publicField$1(_WebMapControls, "controls", {
|
|
|
9600
9791
|
});
|
|
9601
9792
|
let WebMapControls = _WebMapControls;
|
|
9602
9793
|
|
|
9794
|
+
var __defProp$3 = Object.defineProperty;
|
|
9795
|
+
var __defProps$3 = Object.defineProperties;
|
|
9796
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
9603
9797
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
9604
9798
|
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
9605
9799
|
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
9606
9800
|
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
9801
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9802
|
+
var __spreadValues$3 = (a, b) => {
|
|
9803
|
+
for (var prop in b || (b = {}))
|
|
9804
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
9805
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
9806
|
+
if (__getOwnPropSymbols$3)
|
|
9807
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
9808
|
+
if (__propIsEnum$3.call(b, prop))
|
|
9809
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
9810
|
+
}
|
|
9811
|
+
return a;
|
|
9812
|
+
};
|
|
9813
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
9607
9814
|
var __objRest = (source, exclude) => {
|
|
9608
9815
|
var target = {};
|
|
9609
9816
|
for (var prop in source)
|
|
@@ -9731,8 +9938,11 @@ class WebMap extends WebMapControls {
|
|
|
9731
9938
|
}
|
|
9732
9939
|
}
|
|
9733
9940
|
}
|
|
9734
|
-
const _a = controlOptions, { position } = _a, options = __objRest(_a, ["position"]);
|
|
9735
|
-
this.addControl(controlAdapterName, position || "top-left", options)
|
|
9941
|
+
const _a = controlOptions, { id, order, position } = _a, options = __objRest(_a, ["id", "order", "position"]);
|
|
9942
|
+
this.addControl(controlAdapterName, position || "top-left", __spreadProps$3(__spreadValues$3({}, options), {
|
|
9943
|
+
id,
|
|
9944
|
+
order
|
|
9945
|
+
}));
|
|
9736
9946
|
});
|
|
9737
9947
|
}
|
|
9738
9948
|
this._emitStatusEvent("controls:create");
|
|
@@ -9983,7 +10193,7 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
9983
10193
|
addNgwLayer(options) {
|
|
9984
10194
|
return __async$1(this, null, function* () {
|
|
9985
10195
|
yield this.onMapLoad();
|
|
9986
|
-
const { keyname, resourceId } = options;
|
|
10196
|
+
const { keyname, resourceId, filters } = options;
|
|
9987
10197
|
if (keyname || resourceId !== void 0) {
|
|
9988
10198
|
deprecatedWarn(
|
|
9989
10199
|
"set `resource` options instead of `keyname` or `resourceId`"
|
|
@@ -9997,12 +10207,15 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
9997
10207
|
}
|
|
9998
10208
|
if (defined(this.options.baseUrl)) {
|
|
9999
10209
|
try {
|
|
10210
|
+
options.adapterOptions = options.adapterOptions || {};
|
|
10000
10211
|
if (defined(this.options.setViewDelay)) {
|
|
10001
|
-
options.adapterOptions = options.adapterOptions || {};
|
|
10002
10212
|
if (!defined(options.adapterOptions.setViewDelay)) {
|
|
10003
10213
|
options.adapterOptions.setViewDelay = this.options.setViewDelay;
|
|
10004
10214
|
}
|
|
10005
10215
|
}
|
|
10216
|
+
if (defined(filters)) {
|
|
10217
|
+
options.adapterOptions.propertiesFilter = filters;
|
|
10218
|
+
}
|
|
10006
10219
|
const adapter = createNgwLayerAdapter(options, this, this.connector);
|
|
10007
10220
|
const adapterOpts = __spreadValues(__spreadValues({
|
|
10008
10221
|
visibility: true
|
|
@@ -10094,7 +10307,6 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
10094
10307
|
const promise = fetchIdentifyGeoJson({
|
|
10095
10308
|
identify,
|
|
10096
10309
|
connector: this.connector,
|
|
10097
|
-
multiple,
|
|
10098
10310
|
requestOptions: { signal: abortController.signal }
|
|
10099
10311
|
});
|
|
10100
10312
|
if (promise && "then" in promise) {
|