@nextgis/ngw-leaflet 2.5.1 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ngw-leaflet.esm-browser.js +17 -51
- package/lib/ngw-leaflet.esm-browser.js.map +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.js +1 -1
- package/lib/ngw-leaflet.global.js +17 -51
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +1 -1
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 2.5.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 2.5.3; author: NextGIS */
|
|
2
2
|
function styleInject(css, ref) {
|
|
3
3
|
if ( ref === void 0 ) ref = {};
|
|
4
4
|
var insertAt = ref.insertAt;
|
|
@@ -18376,7 +18376,7 @@ let Cache = _Cache;
|
|
|
18376
18376
|
|
|
18377
18377
|
var pkg = {
|
|
18378
18378
|
name: "@nextgis/ngw-connector",
|
|
18379
|
-
version: "2.5.
|
|
18379
|
+
version: "2.5.2",
|
|
18380
18380
|
_priority: 12,
|
|
18381
18381
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
18382
18382
|
main: "index.js",
|
|
@@ -19148,9 +19148,9 @@ class NgwConnector {
|
|
|
19148
19148
|
credentials = credentials || this.options.auth;
|
|
19149
19149
|
if (credentials) {
|
|
19150
19150
|
const { login, password } = credentials;
|
|
19151
|
-
const
|
|
19151
|
+
const encodedStr = [login, password].map(encodeURIComponent).join(":");
|
|
19152
19152
|
{
|
|
19153
|
-
return window.btoa(
|
|
19153
|
+
return window.btoa(encodedStr);
|
|
19154
19154
|
}
|
|
19155
19155
|
}
|
|
19156
19156
|
}
|
|
@@ -22345,7 +22345,6 @@ class NgwWebmapLayerAdapter {
|
|
|
22345
22345
|
__publicField$b(this, "emitter", new EventEmitter());
|
|
22346
22346
|
__publicField$b(this, "_extent");
|
|
22347
22347
|
__publicField$b(this, "response");
|
|
22348
|
-
__publicField$b(this, "_webmapLayersIds");
|
|
22349
22348
|
__publicField$b(this, "_webmapBaselayersIds", []);
|
|
22350
22349
|
__publicField$b(this, "_lastActiveBaselayer");
|
|
22351
22350
|
const r = options.resourceId;
|
|
@@ -22390,7 +22389,6 @@ class NgwWebmapLayerAdapter {
|
|
|
22390
22389
|
}
|
|
22391
22390
|
delete this.layer;
|
|
22392
22391
|
delete this.response;
|
|
22393
|
-
delete this._webmapLayersIds;
|
|
22394
22392
|
}
|
|
22395
22393
|
showLayer() {
|
|
22396
22394
|
return __async$8(this, null, function* () {
|
|
@@ -22481,26 +22479,19 @@ class NgwWebmapLayerAdapter {
|
|
|
22481
22479
|
getIdentificationIds() {
|
|
22482
22480
|
return __async$8(this, null, function* () {
|
|
22483
22481
|
const visibleLayers = [];
|
|
22484
|
-
let
|
|
22485
|
-
|
|
22486
|
-
|
|
22487
|
-
|
|
22488
|
-
|
|
22489
|
-
|
|
22490
|
-
|
|
22491
|
-
|
|
22492
|
-
|
|
22493
|
-
|
|
22494
|
-
const parentId = item.parentId;
|
|
22495
|
-
if (parentId !== void 0 && item.item_type === "layer" && item.layer_identifiable) {
|
|
22496
|
-
const visible = x.properties.property("visibility");
|
|
22497
|
-
const isVisible = visible.get() && !visible.isBlocked();
|
|
22498
|
-
if (isVisible) {
|
|
22499
|
-
visibleLayers.push(parentId);
|
|
22500
|
-
}
|
|
22482
|
+
let deps = this.getDependLayers();
|
|
22483
|
+
deps = deps.sort((a, b) => b.id - a.id);
|
|
22484
|
+
deps.forEach((x) => {
|
|
22485
|
+
const item = x.item;
|
|
22486
|
+
const parentId = item.style_parent_id;
|
|
22487
|
+
if (parentId !== void 0 && item.item_type === "layer" && item.layer_identifiable) {
|
|
22488
|
+
const visible = x.properties.property("visibility");
|
|
22489
|
+
const isVisible = visible.get() && !visible.isBlocked();
|
|
22490
|
+
if (isVisible) {
|
|
22491
|
+
visibleLayers.push(parentId);
|
|
22501
22492
|
}
|
|
22502
|
-
}
|
|
22503
|
-
}
|
|
22493
|
+
}
|
|
22494
|
+
});
|
|
22504
22495
|
return visibleLayers;
|
|
22505
22496
|
});
|
|
22506
22497
|
}
|
|
@@ -22629,31 +22620,6 @@ class NgwWebmapLayerAdapter {
|
|
|
22629
22620
|
}
|
|
22630
22621
|
return item;
|
|
22631
22622
|
}
|
|
22632
|
-
_getWebMapIds() {
|
|
22633
|
-
return __async$8(this, null, function* () {
|
|
22634
|
-
const webMapItem = this.layer;
|
|
22635
|
-
if (webMapItem && webMapItem.item.item_type === "root") {
|
|
22636
|
-
const layers = webMapItem.tree.getDescendants();
|
|
22637
|
-
const promises = [];
|
|
22638
|
-
for (const x of layers) {
|
|
22639
|
-
const item = x.item;
|
|
22640
|
-
if (item.item_type === "layer") {
|
|
22641
|
-
const id = item.layer_style_id;
|
|
22642
|
-
const promise = this.options.connector.getResource(id).then((y) => {
|
|
22643
|
-
if (y) {
|
|
22644
|
-
const parentId = Number(y.resource.parent.id);
|
|
22645
|
-
item.parentId = parentId;
|
|
22646
|
-
return parentId;
|
|
22647
|
-
}
|
|
22648
|
-
});
|
|
22649
|
-
promises.push(promise);
|
|
22650
|
-
}
|
|
22651
|
-
}
|
|
22652
|
-
const ids = yield Promise.all(promises);
|
|
22653
|
-
return ids.filter((x) => x !== void 0);
|
|
22654
|
-
}
|
|
22655
|
-
});
|
|
22656
|
-
}
|
|
22657
22623
|
}
|
|
22658
22624
|
|
|
22659
22625
|
var __defProp$e = Object.defineProperty;
|
|
@@ -25531,7 +25497,7 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
25531
25497
|
if (mem.layer.getDependLayers) {
|
|
25532
25498
|
const dependLayers = mem.layer.getDependLayers();
|
|
25533
25499
|
const dependFit = dependLayers.find((x) => {
|
|
25534
|
-
return x.item && x.item.
|
|
25500
|
+
return x.item && x.item.style_parent_id === id;
|
|
25535
25501
|
});
|
|
25536
25502
|
if (dependFit) {
|
|
25537
25503
|
return dependFit.layer;
|