@nextgis/leaflet-map-adapter 3.0.0-alpha.12 → 3.0.0-alpha.17

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/leaflet-map-adapter; version: 3.0.0-alpha.5; author: NextGIS */
1
+ /** Bundle of @nextgis/leaflet-map-adapter; version: 3.0.0-alpha.13; author: NextGIS */
2
2
  var LeafletMapAdapter = (function () {
3
3
  'use strict';
4
4
 
@@ -14634,10 +14634,6 @@ var LeafletMapAdapter = (function () {
14634
14634
  );
14635
14635
  }
14636
14636
 
14637
- function defined(val) {
14638
- return val !== void 0 && val !== null;
14639
- }
14640
-
14641
14637
  function debounce(cb, wait = 10) {
14642
14638
  let timeoutId;
14643
14639
  function wrapper(...args) {
@@ -14656,6 +14652,10 @@ var LeafletMapAdapter = (function () {
14656
14652
  return wrapper;
14657
14653
  }
14658
14654
 
14655
+ function defined(val) {
14656
+ return val !== void 0 && val !== null;
14657
+ }
14658
+
14659
14659
  function updateUrlParams(urlStr, params) {
14660
14660
  const url = new URL(urlStr);
14661
14661
  const searchParams = new URLSearchParams(url.search);
@@ -15462,13 +15462,15 @@ var LeafletMapAdapter = (function () {
15462
15462
  const unselectOnClose = (_b = (_a = this.options.popupOptions) == null ? void 0 : _a.unselectOnClose) != null ? _b : true;
15463
15463
  if (unselectOnClose) {
15464
15464
  const p = layer.getPopup();
15465
- p && p.once(
15466
- "remove",
15467
- () => {
15468
- close();
15469
- },
15470
- this
15471
- );
15465
+ if (p) {
15466
+ p.once(
15467
+ "remove",
15468
+ () => {
15469
+ close();
15470
+ },
15471
+ this
15472
+ );
15473
+ }
15472
15474
  }
15473
15475
  this._openedPopup.push([popup, _closeHandlers, def]);
15474
15476
  popup.openPopup(latLng);
@@ -16059,7 +16061,7 @@ var LeafletMapAdapter = (function () {
16059
16061
  const url = options && options.url;
16060
16062
  if (url) {
16061
16063
  const updateWmsParamsFromOpt = options.updateWmsParams;
16062
- this.layer = new ImageLayer(url, __spreadProps$3(__spreadValues$4(__spreadValues$4(__spreadValues$4({
16064
+ this.layer = new ImageLayer(url, __spreadValues$4(__spreadValues$4(__spreadValues$4({
16063
16065
  pane: this.pane,
16064
16066
  headers: options.headers,
16065
16067
  setViewDelay: options.setViewDelay
@@ -16067,9 +16069,7 @@ var LeafletMapAdapter = (function () {
16067
16069
  transparent: true
16068
16070
  }, options), {
16069
16071
  opacity: (_a = options.opacity) != null ? _a : void 0
16070
- })), options.params), options.nativeOptions), {
16071
- maxZoom: 12
16072
- }));
16072
+ })), options.params), options.nativeOptions));
16073
16073
  if (updateWmsParamsFromOpt) {
16074
16074
  const updateWmsParams = this.layer.updateWmsParams;
16075
16075
  this.layer.updateWmsParams = function(map) {
@@ -16533,7 +16533,7 @@ var LeafletMapAdapter = (function () {
16533
16533
  }
16534
16534
  }
16535
16535
  removeLayer(layer) {
16536
- layer && layer.remove && layer.remove();
16536
+ if (layer && layer.remove) layer.remove();
16537
16537
  }
16538
16538
  showLayer(layer) {
16539
16539
  if (this.map) {