@nextgis/ngw-map 3.0.0-alpha.14 → 3.0.0-alpha.15

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.
@@ -5876,15 +5876,19 @@ var NgwMap = (function (exports) {
5876
5876
  }
5877
5877
  showLayer() {
5878
5878
  this._layerVisibility = true;
5879
- if (this.layer) {
5880
- if (!this._blocked) {
5879
+ if (!this._blocked) {
5880
+ if (super.showLayer) {
5881
+ super.showLayer(this.layer);
5882
+ } else if (this.layer) {
5881
5883
  webMap.mapAdapter.showLayer(this.layer);
5882
5884
  }
5883
5885
  }
5884
5886
  }
5885
5887
  hideLayer() {
5886
5888
  this._layerVisibility = false;
5887
- if (this.layer) {
5889
+ if (super.hideLayer) {
5890
+ super.hideLayer(this.layer);
5891
+ } else if (this.layer) {
5888
5892
  webMap.mapAdapter.hideLayer(this.layer);
5889
5893
  }
5890
5894
  }
@@ -6431,24 +6435,26 @@ var NgwMap = (function (exports) {
6431
6435
  img.style.maxHeight = "100px";
6432
6436
  img.style.maxWidth = "100px";
6433
6437
  img.src = "";
6434
- try {
6435
- const resp = yield connector.route("pyramid.csettings").get();
6436
- const logo = (_b = resp.pyramid) == null ? void 0 : _b.header_logo;
6437
- if (logo) {
6438
- const [mimeType, base64Data] = logo;
6439
- const byteCharacters = atob(base64Data);
6440
- const byteNumbers = new Array(byteCharacters.length);
6441
- for (let i = 0; i < byteCharacters.length; i++) {
6442
- byteNumbers[i] = byteCharacters.charCodeAt(i);
6443
- }
6444
- const byteArray = new Uint8Array(byteNumbers);
6445
- const blob = new Blob([byteArray], { type: mimeType });
6446
- const urlCreator = window.URL || window.webkitURL;
6447
- const imageUrl = urlCreator.createObjectURL(blob);
6448
- img.src = imageUrl;
6438
+ const resp = yield connector.route("pyramid.csettings").get({
6439
+ query: {
6440
+ pyramid: ["header_logo"]
6449
6441
  }
6450
- } catch (er) {
6451
- console.warn(er);
6442
+ });
6443
+ const logo = (_b = resp.pyramid) == null ? void 0 : _b.header_logo;
6444
+ if (logo) {
6445
+ const [mimeType, base64Data] = logo;
6446
+ const byteCharacters = atob(base64Data);
6447
+ const byteNumbers = new Array(byteCharacters.length);
6448
+ for (let i = 0; i < byteCharacters.length; i++) {
6449
+ byteNumbers[i] = byteCharacters.charCodeAt(i);
6450
+ }
6451
+ const byteArray = new Uint8Array(byteNumbers);
6452
+ const blob = new Blob([byteArray], { type: mimeType });
6453
+ const urlCreator = window.URL || window.webkitURL;
6454
+ const imageUrl = urlCreator.createObjectURL(blob);
6455
+ img.src = imageUrl;
6456
+ } else {
6457
+ return;
6452
6458
  }
6453
6459
  if (settings.company_logo.link !== null && settings.company_logo.link.trim() !== "") {
6454
6460
  anchor.href = settings.company_logo.link;