@nextgis/ngw-map 4.0.0-rc.2 → 4.0.1

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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-map; version: 4.0.0-rc.2; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 4.0.1; author: NextGIS */
2
2
  import { getIcon } from '@nextgis/icons';
3
3
  import NgwConnector from '@nextgis/ngw-connector';
4
4
  import { NgwKit, fetchNgwLayerItem, fetchNgwLayerItems, fetchNgwLayerFeature, fetchNgwLayerFeatureCollection, fetchIdentifyItem, fetchIdentifyGeoJson, createNgwLayerAdapter, fetchNgwExtent, sendIdentifyRequest, getCompanyLogo, getIdentifyItems, createIdentifyItem } from '@nextgis/ngw-kit';
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-map; version: 4.0.0-rc.2; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 4.0.1; author: NextGIS */
2
2
  var NgwMap = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -1080,7 +1080,7 @@ var NgwMap = (function (exports) {
1080
1080
  }
1081
1081
 
1082
1082
  var pkg = {
1083
- version: "4.0.0-rc.2"};
1083
+ version: "4.0.1"};
1084
1084
 
1085
1085
  class AbortError extends Error {
1086
1086
  constructor(message = "AbortError") {
@@ -4882,7 +4882,7 @@ var NgwMap = (function (exports) {
4882
4882
  return webmap.bookmark_resource.id;
4883
4883
  }
4884
4884
  }
4885
- fetchBookmarks(options) {
4885
+ fetchBookmarks(options = {}) {
4886
4886
  const bookmarkResId = this.getBookmarksResourceId();
4887
4887
  const connector = this.options.connector;
4888
4888
  if (bookmarkResId) {
@@ -5543,9 +5543,9 @@ var NgwMap = (function (exports) {
5543
5543
  item
5544
5544
  }) {
5545
5545
  if (item.basemap_layer) {
5546
- const qms = item.basemap_layer.qms;
5547
- const url = item.basemap_layer.url;
5548
- if (qms) {
5546
+ const basemap = item.basemap_layer;
5547
+ const { qms, url } = basemap;
5548
+ if (qms && typeof qms === "string") {
5549
5549
  const qms_ = JSON.parse(qms);
5550
5550
  const adapter = Promise.resolve(
5551
5551
  createQmsAdapter(webMap, {
@@ -5558,10 +5558,19 @@ var NgwMap = (function (exports) {
5558
5558
  const TileAdapter = webMap.mapAdapter.layerAdapters.TILE;
5559
5559
  if (TileAdapter) {
5560
5560
  class BasemapTileAdapter extends TileAdapter {
5561
+ constructor(map, options) {
5562
+ super(map, __spreadProps$a(__spreadValues$f({}, options), { baselayer: true, order: 0 }));
5563
+ }
5561
5564
  addLayer(opt) {
5562
5565
  return __async$g(this, null, function* () {
5566
+ var _a, _b, _c;
5563
5567
  if (url) {
5564
- return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$a(__spreadValues$f({}, opt), { url }));
5568
+ return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$a(__spreadValues$f({}, opt), {
5569
+ url,
5570
+ minZoom: (_a = basemap.z_min) != null ? _a : opt.minZoom,
5571
+ maxZoom: (_b = basemap.z_max) != null ? _b : opt.maxZoom,
5572
+ attribution: (_c = basemap.copyright_text) != null ? _c : opt.attribution
5573
+ }));
5565
5574
  }
5566
5575
  });
5567
5576
  }