@nextgis/ngw-map 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-map.cjs.js +2 -2
- 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 +17 -51
- 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 +2 -2
- 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 +17 -51
- 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 +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 2.5.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 2.5.3; author: NextGIS */
|
|
2
2
|
var domain;
|
|
3
3
|
|
|
4
4
|
// This constructor is used to store event handlers. Instantiating this is
|
|
@@ -1255,7 +1255,7 @@ let Cache = _Cache;
|
|
|
1255
1255
|
|
|
1256
1256
|
var pkg = {
|
|
1257
1257
|
name: "@nextgis/ngw-connector",
|
|
1258
|
-
version: "2.5.
|
|
1258
|
+
version: "2.5.2",
|
|
1259
1259
|
_priority: 12,
|
|
1260
1260
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
1261
1261
|
main: "index.js",
|
|
@@ -2027,9 +2027,9 @@ class NgwConnector {
|
|
|
2027
2027
|
credentials = credentials || this.options.auth;
|
|
2028
2028
|
if (credentials) {
|
|
2029
2029
|
const { login, password } = credentials;
|
|
2030
|
-
const
|
|
2030
|
+
const encodedStr = [login, password].map(encodeURIComponent).join(":");
|
|
2031
2031
|
{
|
|
2032
|
-
return window.btoa(
|
|
2032
|
+
return window.btoa(encodedStr);
|
|
2033
2033
|
}
|
|
2034
2034
|
}
|
|
2035
2035
|
}
|
|
@@ -5318,7 +5318,6 @@ class NgwWebmapLayerAdapter {
|
|
|
5318
5318
|
__publicField$b(this, "emitter", new EventEmitter());
|
|
5319
5319
|
__publicField$b(this, "_extent");
|
|
5320
5320
|
__publicField$b(this, "response");
|
|
5321
|
-
__publicField$b(this, "_webmapLayersIds");
|
|
5322
5321
|
__publicField$b(this, "_webmapBaselayersIds", []);
|
|
5323
5322
|
__publicField$b(this, "_lastActiveBaselayer");
|
|
5324
5323
|
const r = options.resourceId;
|
|
@@ -5363,7 +5362,6 @@ class NgwWebmapLayerAdapter {
|
|
|
5363
5362
|
}
|
|
5364
5363
|
delete this.layer;
|
|
5365
5364
|
delete this.response;
|
|
5366
|
-
delete this._webmapLayersIds;
|
|
5367
5365
|
}
|
|
5368
5366
|
showLayer() {
|
|
5369
5367
|
return __async$9(this, null, function* () {
|
|
@@ -5454,26 +5452,19 @@ class NgwWebmapLayerAdapter {
|
|
|
5454
5452
|
getIdentificationIds() {
|
|
5455
5453
|
return __async$9(this, null, function* () {
|
|
5456
5454
|
const visibleLayers = [];
|
|
5457
|
-
let
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
const parentId = item.parentId;
|
|
5468
|
-
if (parentId !== void 0 && item.item_type === "layer" && item.layer_identifiable) {
|
|
5469
|
-
const visible = x.properties.property("visibility");
|
|
5470
|
-
const isVisible = visible.get() && !visible.isBlocked();
|
|
5471
|
-
if (isVisible) {
|
|
5472
|
-
visibleLayers.push(parentId);
|
|
5473
|
-
}
|
|
5455
|
+
let deps = this.getDependLayers();
|
|
5456
|
+
deps = deps.sort((a, b) => b.id - a.id);
|
|
5457
|
+
deps.forEach((x) => {
|
|
5458
|
+
const item = x.item;
|
|
5459
|
+
const parentId = item.style_parent_id;
|
|
5460
|
+
if (parentId !== void 0 && item.item_type === "layer" && item.layer_identifiable) {
|
|
5461
|
+
const visible = x.properties.property("visibility");
|
|
5462
|
+
const isVisible = visible.get() && !visible.isBlocked();
|
|
5463
|
+
if (isVisible) {
|
|
5464
|
+
visibleLayers.push(parentId);
|
|
5474
5465
|
}
|
|
5475
|
-
}
|
|
5476
|
-
}
|
|
5466
|
+
}
|
|
5467
|
+
});
|
|
5477
5468
|
return visibleLayers;
|
|
5478
5469
|
});
|
|
5479
5470
|
}
|
|
@@ -5602,31 +5593,6 @@ class NgwWebmapLayerAdapter {
|
|
|
5602
5593
|
}
|
|
5603
5594
|
return item;
|
|
5604
5595
|
}
|
|
5605
|
-
_getWebMapIds() {
|
|
5606
|
-
return __async$9(this, null, function* () {
|
|
5607
|
-
const webMapItem = this.layer;
|
|
5608
|
-
if (webMapItem && webMapItem.item.item_type === "root") {
|
|
5609
|
-
const layers = webMapItem.tree.getDescendants();
|
|
5610
|
-
const promises = [];
|
|
5611
|
-
for (const x of layers) {
|
|
5612
|
-
const item = x.item;
|
|
5613
|
-
if (item.item_type === "layer") {
|
|
5614
|
-
const id = item.layer_style_id;
|
|
5615
|
-
const promise = this.options.connector.getResource(id).then((y) => {
|
|
5616
|
-
if (y) {
|
|
5617
|
-
const parentId = Number(y.resource.parent.id);
|
|
5618
|
-
item.parentId = parentId;
|
|
5619
|
-
return parentId;
|
|
5620
|
-
}
|
|
5621
|
-
});
|
|
5622
|
-
promises.push(promise);
|
|
5623
|
-
}
|
|
5624
|
-
}
|
|
5625
|
-
const ids = yield Promise.all(promises);
|
|
5626
|
-
return ids.filter((x) => x !== void 0);
|
|
5627
|
-
}
|
|
5628
|
-
});
|
|
5629
|
-
}
|
|
5630
5596
|
}
|
|
5631
5597
|
|
|
5632
5598
|
var __defProp$g = Object.defineProperty;
|
|
@@ -9395,7 +9361,7 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
9395
9361
|
if (mem.layer.getDependLayers) {
|
|
9396
9362
|
const dependLayers = mem.layer.getDependLayers();
|
|
9397
9363
|
const dependFit = dependLayers.find((x) => {
|
|
9398
|
-
return x.item && x.item.
|
|
9364
|
+
return x.item && x.item.style_parent_id === id;
|
|
9399
9365
|
});
|
|
9400
9366
|
if (dependFit) {
|
|
9401
9367
|
return dependFit.layer;
|