@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
|
import 'leaflet/dist/leaflet.css';
|
|
3
3
|
import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';
|
|
4
4
|
import { NgwMap } from '@nextgis/ngw-map';
|
|
@@ -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
|
var NgwLeaflet = (function () {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -17060,13 +17060,7 @@ var NgwLeaflet = (function () {
|
|
|
17060
17060
|
constructor(url, options) {
|
|
17061
17061
|
super(options);
|
|
17062
17062
|
__publicField$C(this, "defaultWmsParams", {
|
|
17063
|
-
|
|
17064
|
-
request: "GetMap",
|
|
17065
|
-
version: "1.1.1",
|
|
17066
|
-
layers: "",
|
|
17067
|
-
styles: "",
|
|
17068
|
-
format: "image/jpeg",
|
|
17069
|
-
transparent: false
|
|
17063
|
+
request: "GetMap"
|
|
17070
17064
|
});
|
|
17071
17065
|
__publicField$C(this, "options", {
|
|
17072
17066
|
crs: null,
|
|
@@ -17223,9 +17217,7 @@ var NgwLeaflet = (function () {
|
|
|
17223
17217
|
size.x = Math.ceil(size.x * factor);
|
|
17224
17218
|
size.y = Math.ceil(size.y * factor);
|
|
17225
17219
|
}
|
|
17226
|
-
const wmsVersion = parseFloat(this.wmsParams.version);
|
|
17227
17220
|
const crs = this.options.crs || map.options.crs;
|
|
17228
|
-
const projectionKey = wmsVersion >= 1.3 ? "crs" : "srs";
|
|
17229
17221
|
if (crs) {
|
|
17230
17222
|
const nw = crs.project(bounds.getNorthWest());
|
|
17231
17223
|
const se = crs.project(bounds.getSouthEast());
|
|
@@ -17233,8 +17225,7 @@ var NgwLeaflet = (function () {
|
|
|
17233
17225
|
width: size.x,
|
|
17234
17226
|
height: size.y
|
|
17235
17227
|
};
|
|
17236
|
-
params
|
|
17237
|
-
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(",");
|
|
17228
|
+
params.bbox = [nw.x, se.y, se.x, nw.y];
|
|
17238
17229
|
leafletSrcExports.Util.extend(this.wmsParams, params);
|
|
17239
17230
|
}
|
|
17240
17231
|
}
|
|
@@ -22348,7 +22339,6 @@ var NgwLeaflet = (function () {
|
|
|
22348
22339
|
__publicField$b(this, "emitter", new EventEmitter());
|
|
22349
22340
|
__publicField$b(this, "_extent");
|
|
22350
22341
|
__publicField$b(this, "response");
|
|
22351
|
-
__publicField$b(this, "_webmapLayersIds");
|
|
22352
22342
|
__publicField$b(this, "_webmapBaselayersIds", []);
|
|
22353
22343
|
__publicField$b(this, "_lastActiveBaselayer");
|
|
22354
22344
|
const r = options.resourceId;
|
|
@@ -22393,7 +22383,6 @@ var NgwLeaflet = (function () {
|
|
|
22393
22383
|
}
|
|
22394
22384
|
delete this.layer;
|
|
22395
22385
|
delete this.response;
|
|
22396
|
-
delete this._webmapLayersIds;
|
|
22397
22386
|
}
|
|
22398
22387
|
showLayer() {
|
|
22399
22388
|
return __async$8(this, null, function* () {
|
|
@@ -22484,26 +22473,19 @@ var NgwLeaflet = (function () {
|
|
|
22484
22473
|
getIdentificationIds() {
|
|
22485
22474
|
return __async$8(this, null, function* () {
|
|
22486
22475
|
const visibleLayers = [];
|
|
22487
|
-
let
|
|
22488
|
-
|
|
22489
|
-
|
|
22490
|
-
|
|
22491
|
-
|
|
22492
|
-
|
|
22493
|
-
|
|
22494
|
-
|
|
22495
|
-
|
|
22496
|
-
|
|
22497
|
-
const parentId = item.parentId;
|
|
22498
|
-
if (parentId !== void 0 && item.item_type === "layer" && item.layer_identifiable) {
|
|
22499
|
-
const visible = x.properties.property("visibility");
|
|
22500
|
-
const isVisible = visible.get() && !visible.isBlocked();
|
|
22501
|
-
if (isVisible) {
|
|
22502
|
-
visibleLayers.push(parentId);
|
|
22503
|
-
}
|
|
22476
|
+
let deps = this.getDependLayers();
|
|
22477
|
+
deps = deps.sort((a, b) => b.id - a.id);
|
|
22478
|
+
deps.forEach((x) => {
|
|
22479
|
+
const item = x.item;
|
|
22480
|
+
const parentId = item.style_parent_id;
|
|
22481
|
+
if (parentId !== void 0 && item.item_type === "layer" && item.layer_identifiable) {
|
|
22482
|
+
const visible = x.properties.property("visibility");
|
|
22483
|
+
const isVisible = visible.get() && !visible.isBlocked();
|
|
22484
|
+
if (isVisible) {
|
|
22485
|
+
visibleLayers.push(parentId);
|
|
22504
22486
|
}
|
|
22505
|
-
}
|
|
22506
|
-
}
|
|
22487
|
+
}
|
|
22488
|
+
});
|
|
22507
22489
|
return visibleLayers;
|
|
22508
22490
|
});
|
|
22509
22491
|
}
|
|
@@ -22632,31 +22614,6 @@ var NgwLeaflet = (function () {
|
|
|
22632
22614
|
}
|
|
22633
22615
|
return item;
|
|
22634
22616
|
}
|
|
22635
|
-
_getWebMapIds() {
|
|
22636
|
-
return __async$8(this, null, function* () {
|
|
22637
|
-
const webMapItem = this.layer;
|
|
22638
|
-
if (webMapItem && webMapItem.item.item_type === "root") {
|
|
22639
|
-
const layers = webMapItem.tree.getDescendants();
|
|
22640
|
-
const promises = [];
|
|
22641
|
-
for (const x of layers) {
|
|
22642
|
-
const item = x.item;
|
|
22643
|
-
if (item.item_type === "layer") {
|
|
22644
|
-
const id = item.layer_style_id;
|
|
22645
|
-
const promise = this.options.connector.getResource(id).then((y) => {
|
|
22646
|
-
if (y) {
|
|
22647
|
-
const parentId = Number(y.resource.parent.id);
|
|
22648
|
-
item.parentId = parentId;
|
|
22649
|
-
return parentId;
|
|
22650
|
-
}
|
|
22651
|
-
});
|
|
22652
|
-
promises.push(promise);
|
|
22653
|
-
}
|
|
22654
|
-
}
|
|
22655
|
-
const ids = yield Promise.all(promises);
|
|
22656
|
-
return ids.filter((x) => x !== void 0);
|
|
22657
|
-
}
|
|
22658
|
-
});
|
|
22659
|
-
}
|
|
22660
22617
|
}
|
|
22661
22618
|
|
|
22662
22619
|
var __defProp$e = Object.defineProperty;
|
|
@@ -25534,7 +25491,7 @@ var NgwLeaflet = (function () {
|
|
|
25534
25491
|
if (mem.layer.getDependLayers) {
|
|
25535
25492
|
const dependLayers = mem.layer.getDependLayers();
|
|
25536
25493
|
const dependFit = dependLayers.find((x) => {
|
|
25537
|
-
return x.item && x.item.
|
|
25494
|
+
return x.item && x.item.style_parent_id === id;
|
|
25538
25495
|
});
|
|
25539
25496
|
if (dependFit) {
|
|
25540
25497
|
return dependFit.layer;
|