@nextgis/ngw-map 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-map.cjs.js +1 -1
- package/lib/ngw-map.esm-browser.js +17 -7
- 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 +1 -1
- package/lib/ngw-map.global.js +17 -7
- 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
package/lib/ngw-map.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 2.5.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 2.5.5; 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.5",
|
|
1259
1259
|
_priority: 12,
|
|
1260
1260
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
1261
1261
|
main: "index.js",
|
|
@@ -1521,7 +1521,8 @@ class ResourcesControl {
|
|
|
1521
1521
|
}
|
|
1522
1522
|
return this.connector.get("resource.search", requestOptions, __spreadValues$t({
|
|
1523
1523
|
serialization: "full"
|
|
1524
|
-
}, query)).then((
|
|
1524
|
+
}, query)).then((response) => {
|
|
1525
|
+
const resources = Array.isArray(response) ? response : response.items;
|
|
1525
1526
|
if (resources) {
|
|
1526
1527
|
for (const x of resources) {
|
|
1527
1528
|
this.cache.add("resource.item", CancelablePromise.resolve(x), {
|
|
@@ -3785,9 +3786,9 @@ function createBasemapLayerAdapter(_0) {
|
|
|
3785
3786
|
item
|
|
3786
3787
|
}) {
|
|
3787
3788
|
if (item.basemap_layer) {
|
|
3788
|
-
const
|
|
3789
|
-
const url =
|
|
3790
|
-
if (qms) {
|
|
3789
|
+
const basemap = item.basemap_layer;
|
|
3790
|
+
const { qms, url } = basemap;
|
|
3791
|
+
if (qms && typeof qms === "string") {
|
|
3791
3792
|
const qms_ = JSON.parse(qms);
|
|
3792
3793
|
const adapter = Promise.resolve(
|
|
3793
3794
|
QmsKit.utils.createQmsAdapter(webMap, void 0, {
|
|
@@ -3800,9 +3801,18 @@ function createBasemapLayerAdapter(_0) {
|
|
|
3800
3801
|
const TileAdapter = webMap.mapAdapter.layerAdapters.TILE;
|
|
3801
3802
|
if (TileAdapter) {
|
|
3802
3803
|
class BasemapTileAdapter extends TileAdapter {
|
|
3804
|
+
constructor(map, options) {
|
|
3805
|
+
super(map, __spreadProps$b(__spreadValues$i({}, options), { baselayer: true, order: 0 }));
|
|
3806
|
+
}
|
|
3803
3807
|
addLayer(opt) {
|
|
3804
3808
|
return __async$h(this, null, function* () {
|
|
3805
|
-
|
|
3809
|
+
var _a, _b, _c;
|
|
3810
|
+
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$b(__spreadValues$i({}, opt), {
|
|
3811
|
+
url,
|
|
3812
|
+
minZoom: (_a = basemap.z_min) != null ? _a : opt.minZoom,
|
|
3813
|
+
maxZoom: (_b = basemap.z_max) != null ? _b : opt.maxZoom,
|
|
3814
|
+
attribution: (_c = basemap.copyright_text) != null ? _c : opt.attribution
|
|
3815
|
+
}));
|
|
3806
3816
|
});
|
|
3807
3817
|
}
|
|
3808
3818
|
}
|