@nextgis/ngw-map 1.8.1 → 1.8.2

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.8.1; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 1.8.2; author: NextGIS */
2
2
  import { EventEmitter } from 'events';
3
3
  import CancelablePromise from '@nextgis/cancelable-promise';
4
4
  import { deepmerge, deprecatedWarn, defined, isObject } from '@nextgis/utils';
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-map; version: 1.8.1; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 1.8.2; author: NextGIS */
2
2
  var NgwMap = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -2905,16 +2905,19 @@ var NgwMap = (function (exports) {
2905
2905
  return Promise.resolve();
2906
2906
  };
2907
2907
  WebMapLayers.prototype.updateLayer = function (layerDef) {
2908
+ var _this = this;
2908
2909
  var layer = this.getLayer(layerDef);
2909
2910
  if (layer) {
2910
2911
  if (layer.updateLayer) {
2911
- layer.updateLayer();
2912
+ return Promise.resolve(layer.updateLayer());
2912
2913
  }
2913
2914
  else if (this.isLayerVisible(layer)) {
2914
- this.hideLayer(layer, { silent: true });
2915
- this.showLayer(layer, { silent: true });
2915
+ return this.hideLayer(layer, { silent: true }).then(function () {
2916
+ return _this.showLayer(layer, { silent: true });
2917
+ });
2916
2918
  }
2917
2919
  }
2920
+ return Promise.resolve();
2918
2921
  };
2919
2922
  /**
2920
2923
  * Set transparency for a given layer by number from 0 to 1