@nextgis/ngw-leaflet 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ngw-leaflet.esm-browser.js +16 -59
- 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 +16 -59
- 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 +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 2.5.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 2.5.4; author: NextGIS */
|
|
2
2
|
function styleInject(css, ref) {
|
|
3
3
|
if ( ref === void 0 ) ref = {};
|
|
4
4
|
var insertAt = ref.insertAt;
|
|
@@ -17057,13 +17057,7 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
17057
17057
|
constructor(url, options) {
|
|
17058
17058
|
super(options);
|
|
17059
17059
|
__publicField$C(this, "defaultWmsParams", {
|
|
17060
|
-
|
|
17061
|
-
request: "GetMap",
|
|
17062
|
-
version: "1.1.1",
|
|
17063
|
-
layers: "",
|
|
17064
|
-
styles: "",
|
|
17065
|
-
format: "image/jpeg",
|
|
17066
|
-
transparent: false
|
|
17060
|
+
request: "GetMap"
|
|
17067
17061
|
});
|
|
17068
17062
|
__publicField$C(this, "options", {
|
|
17069
17063
|
crs: null,
|
|
@@ -17220,9 +17214,7 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
17220
17214
|
size.x = Math.ceil(size.x * factor);
|
|
17221
17215
|
size.y = Math.ceil(size.y * factor);
|
|
17222
17216
|
}
|
|
17223
|
-
const wmsVersion = parseFloat(this.wmsParams.version);
|
|
17224
17217
|
const crs = this.options.crs || map.options.crs;
|
|
17225
|
-
const projectionKey = wmsVersion >= 1.3 ? "crs" : "srs";
|
|
17226
17218
|
if (crs) {
|
|
17227
17219
|
const nw = crs.project(bounds.getNorthWest());
|
|
17228
17220
|
const se = crs.project(bounds.getSouthEast());
|
|
@@ -17230,8 +17222,7 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
17230
17222
|
width: size.x,
|
|
17231
17223
|
height: size.y
|
|
17232
17224
|
};
|
|
17233
|
-
params
|
|
17234
|
-
params.bbox = (wmsVersion >= 1.3 && crs === leafletSrcExports.CRS.EPSG4326 ? [se.y, nw.x, nw.y, se.x] : [nw.x, se.y, se.x, nw.y]).join(",");
|
|
17225
|
+
params.bbox = [nw.x, se.y, se.x, nw.y];
|
|
17235
17226
|
leafletSrcExports.Util.extend(this.wmsParams, params);
|
|
17236
17227
|
}
|
|
17237
17228
|
}
|
|
@@ -22345,7 +22336,6 @@ class NgwWebmapLayerAdapter {
|
|
|
22345
22336
|
__publicField$b(this, "emitter", new EventEmitter());
|
|
22346
22337
|
__publicField$b(this, "_extent");
|
|
22347
22338
|
__publicField$b(this, "response");
|
|
22348
|
-
__publicField$b(this, "_webmapLayersIds");
|
|
22349
22339
|
__publicField$b(this, "_webmapBaselayersIds", []);
|
|
22350
22340
|
__publicField$b(this, "_lastActiveBaselayer");
|
|
22351
22341
|
const r = options.resourceId;
|
|
@@ -22390,7 +22380,6 @@ class NgwWebmapLayerAdapter {
|
|
|
22390
22380
|
}
|
|
22391
22381
|
delete this.layer;
|
|
22392
22382
|
delete this.response;
|
|
22393
|
-
delete this._webmapLayersIds;
|
|
22394
22383
|
}
|
|
22395
22384
|
showLayer() {
|
|
22396
22385
|
return __async$8(this, null, function* () {
|
|
@@ -22481,26 +22470,19 @@ class NgwWebmapLayerAdapter {
|
|
|
22481
22470
|
getIdentificationIds() {
|
|
22482
22471
|
return __async$8(this, null, function* () {
|
|
22483
22472
|
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
|
-
}
|
|
22473
|
+
let deps = this.getDependLayers();
|
|
22474
|
+
deps = deps.sort((a, b) => b.id - a.id);
|
|
22475
|
+
deps.forEach((x) => {
|
|
22476
|
+
const item = x.item;
|
|
22477
|
+
const parentId = item.style_parent_id;
|
|
22478
|
+
if (parentId !== void 0 && item.item_type === "layer" && item.layer_identifiable) {
|
|
22479
|
+
const visible = x.properties.property("visibility");
|
|
22480
|
+
const isVisible = visible.get() && !visible.isBlocked();
|
|
22481
|
+
if (isVisible) {
|
|
22482
|
+
visibleLayers.push(parentId);
|
|
22501
22483
|
}
|
|
22502
|
-
}
|
|
22503
|
-
}
|
|
22484
|
+
}
|
|
22485
|
+
});
|
|
22504
22486
|
return visibleLayers;
|
|
22505
22487
|
});
|
|
22506
22488
|
}
|
|
@@ -22629,31 +22611,6 @@ class NgwWebmapLayerAdapter {
|
|
|
22629
22611
|
}
|
|
22630
22612
|
return item;
|
|
22631
22613
|
}
|
|
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
22614
|
}
|
|
22658
22615
|
|
|
22659
22616
|
var __defProp$e = Object.defineProperty;
|
|
@@ -25531,7 +25488,7 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
25531
25488
|
if (mem.layer.getDependLayers) {
|
|
25532
25489
|
const dependLayers = mem.layer.getDependLayers();
|
|
25533
25490
|
const dependFit = dependLayers.find((x) => {
|
|
25534
|
-
return x.item && x.item.
|
|
25491
|
+
return x.item && x.item.style_parent_id === id;
|
|
25535
25492
|
});
|
|
25536
25493
|
if (dependFit) {
|
|
25537
25494
|
return dependFit.layer;
|