@nextgis/ngw-leaflet 2.5.3 → 2.5.5
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 +19 -18
- 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 +19 -18
- 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.5; 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.5; 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
|
}
|
|
@@ -18379,7 +18370,7 @@ var NgwLeaflet = (function () {
|
|
|
18379
18370
|
|
|
18380
18371
|
var pkg = {
|
|
18381
18372
|
name: "@nextgis/ngw-connector",
|
|
18382
|
-
version: "2.5.
|
|
18373
|
+
version: "2.5.5",
|
|
18383
18374
|
_priority: 12,
|
|
18384
18375
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
18385
18376
|
main: "index.js",
|
|
@@ -18645,7 +18636,8 @@ var NgwLeaflet = (function () {
|
|
|
18645
18636
|
}
|
|
18646
18637
|
return this.connector.get("resource.search", requestOptions, __spreadValues$q({
|
|
18647
18638
|
serialization: "full"
|
|
18648
|
-
}, query)).then((
|
|
18639
|
+
}, query)).then((response) => {
|
|
18640
|
+
const resources = Array.isArray(response) ? response : response.items;
|
|
18649
18641
|
if (resources) {
|
|
18650
18642
|
for (const x of resources) {
|
|
18651
18643
|
this.cache.add("resource.item", CancelablePromise.resolve(x), {
|
|
@@ -20815,9 +20807,9 @@ var NgwLeaflet = (function () {
|
|
|
20815
20807
|
item
|
|
20816
20808
|
}) {
|
|
20817
20809
|
if (item.basemap_layer) {
|
|
20818
|
-
const
|
|
20819
|
-
const url =
|
|
20820
|
-
if (qms) {
|
|
20810
|
+
const basemap = item.basemap_layer;
|
|
20811
|
+
const { qms, url } = basemap;
|
|
20812
|
+
if (qms && typeof qms === "string") {
|
|
20821
20813
|
const qms_ = JSON.parse(qms);
|
|
20822
20814
|
const adapter = Promise.resolve(
|
|
20823
20815
|
QmsKit.utils.createQmsAdapter(webMap, void 0, {
|
|
@@ -20830,9 +20822,18 @@ var NgwLeaflet = (function () {
|
|
|
20830
20822
|
const TileAdapter = webMap.mapAdapter.layerAdapters.TILE;
|
|
20831
20823
|
if (TileAdapter) {
|
|
20832
20824
|
class BasemapTileAdapter extends TileAdapter {
|
|
20825
|
+
constructor(map, options) {
|
|
20826
|
+
super(map, __spreadProps$c(__spreadValues$g({}, options), { baselayer: true, order: 0 }));
|
|
20827
|
+
}
|
|
20833
20828
|
addLayer(opt) {
|
|
20834
20829
|
return __async$g(this, null, function* () {
|
|
20835
|
-
|
|
20830
|
+
var _a, _b, _c;
|
|
20831
|
+
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$c(__spreadValues$g({}, opt), {
|
|
20832
|
+
url,
|
|
20833
|
+
minZoom: (_a = basemap.z_min) != null ? _a : opt.minZoom,
|
|
20834
|
+
maxZoom: (_b = basemap.z_max) != null ? _b : opt.maxZoom,
|
|
20835
|
+
attribution: (_c = basemap.copyright_text) != null ? _c : opt.attribution
|
|
20836
|
+
}));
|
|
20836
20837
|
});
|
|
20837
20838
|
}
|
|
20838
20839
|
}
|