@nextgis/ngw-map 1.16.6 → 1.16.7

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: 1.16.6; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 1.16.7; author: NextGIS */
2
2
  var NgwMap = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -3004,11 +3004,27 @@ var NgwMap = (function (exports) {
3004
3004
  }
3005
3005
  }
3006
3006
  };
3007
- // requestGeomString(pixel: Pixel, pixelRadius: number) {
3008
- // if (this.mapAdapter.requestGeomString) {
3009
- // return this.mapAdapter.requestGeomString(pixel, pixelRadius);
3010
- // }
3011
- // }
3007
+ WebMapLayers.prototype.showLayerLabel = function (layerDef) {
3008
+ this.toggleLayerLabel(layerDef, true);
3009
+ };
3010
+ WebMapLayers.prototype.hideLayerLabel = function (layerDef) {
3011
+ this.toggleLayerLabel(layerDef, false);
3012
+ };
3013
+ WebMapLayers.prototype.toggleLayerLabel = function (layerDef, status) {
3014
+ var layer = this.getLayer(layerDef);
3015
+ if (layer) {
3016
+ if (status) {
3017
+ if (layer.showLabel) {
3018
+ layer.showLabel();
3019
+ }
3020
+ }
3021
+ else {
3022
+ if (layer.hideLabel) {
3023
+ layer.hideLabel();
3024
+ }
3025
+ }
3026
+ }
3027
+ };
3012
3028
  /**
3013
3029
  * Mark the layer as selected.
3014
3030
  * If the adapter is a vector layer and supports data selection,
@@ -3562,7 +3578,7 @@ var NgwMap = (function (exports) {
3562
3578
  /**
3563
3579
  *
3564
3580
  * @param control - Instance of WEB-GIS framework control.
3565
- * What is returned by the {@Link WebMapControls.createControl | create} method
3581
+ * What is returned by the {@link createControl | create} method
3566
3582
  */
3567
3583
  WebMapControls.prototype.removeControl = function (control) {
3568
3584
  var _this = this;
@@ -4695,7 +4711,7 @@ var NgwMap = (function (exports) {
4695
4711
  /**
4696
4712
  * Establishing a connection with NextGIS Web to fulfill all other requests.
4697
4713
  * @remarks
4698
- * This method need not be called manually as it is used when forming a request in {@link NgwConnector.apiRequest | apiRequest}.
4714
+ * This method need not be called manually as it is used when forming a request in {@link apiRequest | apiRequest}.
4699
4715
  * Can be used to check connection.
4700
4716
  * @example
4701
4717
  * ```javascript
@@ -4940,73 +4956,73 @@ var NgwMap = (function (exports) {
4940
4956
  // Resource Methods
4941
4957
  // -------------------------------------------------------------------------
4942
4958
  /**
4943
- * {@inheritDoc ResourcesControl.getOne}
4959
+ * {@link ResourcesControl.getOne}
4944
4960
  */
4945
4961
  NgwConnector.prototype.getResource = function (resource, requestOptions) {
4946
4962
  return this.resources.getOne(resource, requestOptions);
4947
4963
  };
4948
4964
  /**
4949
- * {@inheritDoc ResourcesControl.getOneOrFail}
4965
+ * {@link ResourcesControl.getOneOrFail}
4950
4966
  */
4951
4967
  NgwConnector.prototype.getResourceOrFail = function (resource, requestOptions) {
4952
4968
  return this.resources.getOneOrFail(resource, requestOptions);
4953
4969
  };
4954
4970
  /**
4955
- * @deprecated - use {@link NgwConnector.getResource}
4971
+ * @deprecated - use {@link getResource}
4956
4972
  */
4957
4973
  NgwConnector.prototype.getResourceBy = function (resource) {
4958
4974
  return this.resources.getOne(resource);
4959
4975
  };
4960
4976
  /**
4961
- * @deprecated - use {@link NgwConnector.getResource}
4977
+ * @deprecated - use {@link getResource}
4962
4978
  */
4963
4979
  NgwConnector.prototype.getResourceByKeyname = function (keyname) {
4964
4980
  return this.resources.getOne(keyname);
4965
4981
  };
4966
4982
  /**
4967
- * @deprecated - use {@link NgwConnector.getResource}
4983
+ * @deprecated - use {@link getResource}
4968
4984
  */
4969
4985
  NgwConnector.prototype.getResourceById = function (id) {
4970
4986
  return this.resources.getOne(id);
4971
4987
  };
4972
4988
  /**
4973
- * {@inheritDoc ResourcesControl.getId}
4989
+ * {@link ResourcesControl.getId}
4974
4990
  */
4975
4991
  NgwConnector.prototype.getResourceId = function (resource, requestOptions) {
4976
4992
  return this.resources.getId(resource, requestOptions);
4977
4993
  };
4978
4994
  /**
4979
- * {@inheritDoc ResourcesControl.getIdOrFail}
4995
+ * {@link ResourcesControl.getIdOrFail}
4980
4996
  */
4981
4997
  NgwConnector.prototype.getResourceIdOrFail = function (resource, requestOptions) {
4982
4998
  return this.resources.getIdOrFail(resource, requestOptions);
4983
4999
  };
4984
5000
  /**
4985
- * {@inheritDoc ResourcesControl.getMany}
5001
+ * {@link ResourcesControl.getMany}
4986
5002
  */
4987
5003
  NgwConnector.prototype.getResourcesBy = function (resource, requestOptions) {
4988
5004
  return this.resources.getMany(resource, requestOptions);
4989
5005
  };
4990
5006
  /**
4991
- * {@inheritDoc ResourcesControl.getParent}
5007
+ * {@link ResourcesControl.getParent}
4992
5008
  */
4993
5009
  NgwConnector.prototype.getResourceParent = function (resource, requestOptions) {
4994
5010
  return this.resources.getParent(resource, requestOptions);
4995
5011
  };
4996
5012
  /**
4997
- * {@inheritDoc ResourcesControl.getChildrenOf}
5013
+ * {@link ResourcesControl.getChildrenOf}
4998
5014
  */
4999
5015
  NgwConnector.prototype.getResourceChildren = function (resource, requestOptions) {
5000
5016
  return this.resources.getChildrenOf(resource, requestOptions);
5001
5017
  };
5002
5018
  /**
5003
- * {@inheritDoc ResourcesControl.update}
5019
+ * {@link ResourcesControl.update}
5004
5020
  */
5005
5021
  NgwConnector.prototype.updateResource = function (resource, data) {
5006
5022
  return this.resources.update(resource, data);
5007
5023
  };
5008
5024
  /**
5009
- * {@inheritDoc ResourcesControl.delete}
5025
+ * {@link ResourcesControl.delete}
5010
5026
  */
5011
5027
  NgwConnector.prototype.deleteResource = function (resource) {
5012
5028
  return this.resources.delete(resource);
@@ -5106,7 +5122,6 @@ var NgwMap = (function (exports) {
5106
5122
  * @packageDocumentation
5107
5123
  * @module ngw-connector
5108
5124
  */
5109
- // export { NgwConnector };
5110
5125
  var NgwConnector = NgwConnector$1;
5111
5126
 
5112
5127
  function getNgwWebmapExtent(webmap) {
@@ -7504,9 +7519,20 @@ var NgwMap = (function (exports) {
7504
7519
  }
7505
7520
 
7506
7521
  var URL = 'https://qms.nextgis.com';
7507
- function createQmsAdapter(webMap, url, createOpt) {
7522
+ function createQmsAdapter(webMapOrOptions, url, createOpt) {
7508
7523
  if (url === void 0) { url = URL; }
7509
7524
  if (createOpt === void 0) { createOpt = {}; }
7525
+ var webMap;
7526
+ if ('webMap' in webMapOrOptions) {
7527
+ var webMap_ = webMapOrOptions.webMap, url_ = webMapOrOptions.url, adapterOptions = __rest(webMapOrOptions, ["webMap", "url"]);
7528
+ webMap = webMap_;
7529
+ if (url_) {
7530
+ url = url_;
7531
+ }
7532
+ if (adapterOptions) {
7533
+ createOpt = adapterOptions;
7534
+ }
7535
+ }
7510
7536
  if (!url) {
7511
7537
  url = URL;
7512
7538
  }
@@ -7594,7 +7620,7 @@ var NgwMap = (function (exports) {
7594
7620
  ]);
7595
7621
  };
7596
7622
  QmsKit.prototype._createAdapter = function (webMap) {
7597
- return createQmsAdapter(webMap, this.url);
7623
+ return createQmsAdapter({ webMap: webMap, url: this.url });
7598
7624
  };
7599
7625
  QmsKit.utils = {
7600
7626
  createQmsAdapter: createQmsAdapter,
@@ -8670,7 +8696,7 @@ var NgwMap = (function (exports) {
8670
8696
  });
8671
8697
  });
8672
8698
  };
8673
- /** @deprecated use {@link NgwMap.fitLayer} instead */
8699
+ /** @deprecated use {@link fitLayer} instead */
8674
8700
  NgwMap.prototype.zoomToLayer = function (layerDef) {
8675
8701
  return __awaiter(this, void 0, void 0, function () {
8676
8702
  return __generator(this, function (_a) {
@@ -8722,30 +8748,30 @@ var NgwMap = (function (exports) {
8722
8748
  }
8723
8749
  };
8724
8750
  /**
8725
- * @deprecated use {@link NgwMap.fetchNgwLayerItem} instead
8751
+ * @deprecated use {@link fetchNgwLayerItem} instead
8726
8752
  */
8727
8753
  NgwMap.prototype.getNgwLayerItem = function (options) {
8728
8754
  return this.fetchNgwLayerItem(options);
8729
8755
  };
8730
8756
  /**
8731
- * @deprecated use {@link NgwMap.fetchNgwLayerItems} instead
8757
+ * @deprecated use {@link fetchNgwLayerItems} instead
8732
8758
  */
8733
8759
  NgwMap.prototype.getNgwLayerItems = function (options) {
8734
8760
  return this.fetchNgwLayerItems(options);
8735
8761
  };
8736
8762
  /**
8737
- * @deprecated use {@link NgwMap.fetchNgwLayerFeature} instead
8763
+ * @deprecated use {@link fetchNgwLayerFeature} instead
8738
8764
  */
8739
8765
  NgwMap.prototype.getNgwLayerFeature = function (options) {
8740
8766
  return this.fetchNgwLayerFeature(options);
8741
8767
  };
8742
8768
  /**
8743
- * @deprecated use {@link NgwMap.fetchNgwLayerFeatures} instead
8769
+ * @deprecated use {@link fetchNgwLayerFeatures} instead
8744
8770
  */
8745
8771
  NgwMap.prototype.getNgwLayerFeatures = function (options) {
8746
8772
  return this.fetchNgwLayerFeatures(options);
8747
8773
  };
8748
- /** @deprecated use {@link NgwMap.cancelPromises} instead */
8774
+ /** @deprecated use {@link cancelPromises} instead */
8749
8775
  NgwMap.prototype.cancelPromise = function () {
8750
8776
  var args = [];
8751
8777
  for (var _i = 0; _i < arguments.length; _i++) {