@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
|
@@ -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
|
import { EventEmitter } from 'events';
|
|
3
3
|
import CancelablePromise from '@nextgis/cancelable-promise';
|
|
4
4
|
import { getIcon } from '@nextgis/icons';
|
package/lib/ngw-map.global.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 NgwMap = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -1258,7 +1258,7 @@ var NgwMap = (function (exports) {
|
|
|
1258
1258
|
|
|
1259
1259
|
var pkg = {
|
|
1260
1260
|
name: "@nextgis/ngw-connector",
|
|
1261
|
-
version: "2.5.
|
|
1261
|
+
version: "2.5.5",
|
|
1262
1262
|
_priority: 12,
|
|
1263
1263
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
1264
1264
|
main: "index.js",
|
|
@@ -1524,7 +1524,8 @@ var NgwMap = (function (exports) {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
return this.connector.get("resource.search", requestOptions, __spreadValues$t({
|
|
1526
1526
|
serialization: "full"
|
|
1527
|
-
}, query)).then((
|
|
1527
|
+
}, query)).then((response) => {
|
|
1528
|
+
const resources = Array.isArray(response) ? response : response.items;
|
|
1528
1529
|
if (resources) {
|
|
1529
1530
|
for (const x of resources) {
|
|
1530
1531
|
this.cache.add("resource.item", CancelablePromise.resolve(x), {
|
|
@@ -3788,9 +3789,9 @@ var NgwMap = (function (exports) {
|
|
|
3788
3789
|
item
|
|
3789
3790
|
}) {
|
|
3790
3791
|
if (item.basemap_layer) {
|
|
3791
|
-
const
|
|
3792
|
-
const url =
|
|
3793
|
-
if (qms) {
|
|
3792
|
+
const basemap = item.basemap_layer;
|
|
3793
|
+
const { qms, url } = basemap;
|
|
3794
|
+
if (qms && typeof qms === "string") {
|
|
3794
3795
|
const qms_ = JSON.parse(qms);
|
|
3795
3796
|
const adapter = Promise.resolve(
|
|
3796
3797
|
QmsKit.utils.createQmsAdapter(webMap, void 0, {
|
|
@@ -3803,9 +3804,18 @@ var NgwMap = (function (exports) {
|
|
|
3803
3804
|
const TileAdapter = webMap.mapAdapter.layerAdapters.TILE;
|
|
3804
3805
|
if (TileAdapter) {
|
|
3805
3806
|
class BasemapTileAdapter extends TileAdapter {
|
|
3807
|
+
constructor(map, options) {
|
|
3808
|
+
super(map, __spreadProps$b(__spreadValues$i({}, options), { baselayer: true, order: 0 }));
|
|
3809
|
+
}
|
|
3806
3810
|
addLayer(opt) {
|
|
3807
3811
|
return __async$h(this, null, function* () {
|
|
3808
|
-
|
|
3812
|
+
var _a, _b, _c;
|
|
3813
|
+
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$b(__spreadValues$i({}, opt), {
|
|
3814
|
+
url,
|
|
3815
|
+
minZoom: (_a = basemap.z_min) != null ? _a : opt.minZoom,
|
|
3816
|
+
maxZoom: (_b = basemap.z_max) != null ? _b : opt.maxZoom,
|
|
3817
|
+
attribution: (_c = basemap.copyright_text) != null ? _c : opt.attribution
|
|
3818
|
+
}));
|
|
3809
3819
|
});
|
|
3810
3820
|
}
|
|
3811
3821
|
}
|