@nextgis/ngw-leaflet 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.
@@ -22907,15 +22907,19 @@ var NgwLeaflet = (function () {
22907
22907
  }
22908
22908
  showLayer() {
22909
22909
  this._layerVisibility = true;
22910
- if (this.layer) {
22911
- if (!this._blocked) {
22910
+ if (!this._blocked) {
22911
+ if (super.showLayer) {
22912
+ super.showLayer(this.layer);
22913
+ } else if (this.layer) {
22912
22914
  webMap.mapAdapter.showLayer(this.layer);
22913
22915
  }
22914
22916
  }
22915
22917
  }
22916
22918
  hideLayer() {
22917
22919
  this._layerVisibility = false;
22918
- if (this.layer) {
22920
+ if (super.hideLayer) {
22921
+ super.hideLayer(this.layer);
22922
+ } else if (this.layer) {
22919
22923
  webMap.mapAdapter.hideLayer(this.layer);
22920
22924
  }
22921
22925
  }
@@ -23462,24 +23466,26 @@ var NgwLeaflet = (function () {
23462
23466
  img.style.maxHeight = "100px";
23463
23467
  img.style.maxWidth = "100px";
23464
23468
  img.src = "";
23465
- try {
23466
- const resp = yield connector.route("pyramid.csettings").get();
23467
- const logo = (_b = resp.pyramid) == null ? void 0 : _b.header_logo;
23468
- if (logo) {
23469
- const [mimeType, base64Data] = logo;
23470
- const byteCharacters = atob(base64Data);
23471
- const byteNumbers = new Array(byteCharacters.length);
23472
- for (let i = 0; i < byteCharacters.length; i++) {
23473
- byteNumbers[i] = byteCharacters.charCodeAt(i);
23474
- }
23475
- const byteArray = new Uint8Array(byteNumbers);
23476
- const blob = new Blob([byteArray], { type: mimeType });
23477
- const urlCreator = window.URL || window.webkitURL;
23478
- const imageUrl = urlCreator.createObjectURL(blob);
23479
- img.src = imageUrl;
23469
+ const resp = yield connector.route("pyramid.csettings").get({
23470
+ query: {
23471
+ pyramid: ["header_logo"]
23480
23472
  }
23481
- } catch (er) {
23482
- console.warn(er);
23473
+ });
23474
+ const logo = (_b = resp.pyramid) == null ? void 0 : _b.header_logo;
23475
+ if (logo) {
23476
+ const [mimeType, base64Data] = logo;
23477
+ const byteCharacters = atob(base64Data);
23478
+ const byteNumbers = new Array(byteCharacters.length);
23479
+ for (let i = 0; i < byteCharacters.length; i++) {
23480
+ byteNumbers[i] = byteCharacters.charCodeAt(i);
23481
+ }
23482
+ const byteArray = new Uint8Array(byteNumbers);
23483
+ const blob = new Blob([byteArray], { type: mimeType });
23484
+ const urlCreator = window.URL || window.webkitURL;
23485
+ const imageUrl = urlCreator.createObjectURL(blob);
23486
+ img.src = imageUrl;
23487
+ } else {
23488
+ return;
23483
23489
  }
23484
23490
  if (settings.company_logo.link !== null && settings.company_logo.link.trim() !== "") {
23485
23491
  anchor.href = settings.company_logo.link;