@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
  import { EventEmitter } from 'events';
3
3
  import { Control, DomEvent, GeoJSON, DivIcon, Marker, CircleMarker, FeatureGroup, ImageOverlay as ImageOverlay$1, Layer, Util, CRS, GridLayer, DomUtil, TileLayer as TileLayer$1, Map, latLngBounds, latLng } from 'leaflet';
4
4
  import { defined, debounce as debounce$1, updateUrlParams } from '@nextgis/utils';
@@ -875,13 +875,15 @@ class GeoJsonAdapter extends BaseAdapter {
875
875
  const unselectOnClose = (_b = (_a = this.options.popupOptions) == null ? void 0 : _a.unselectOnClose) != null ? _b : true;
876
876
  if (unselectOnClose) {
877
877
  const p = layer.getPopup();
878
- p && p.once(
879
- "remove",
880
- () => {
881
- close();
882
- },
883
- this
884
- );
878
+ if (p) {
879
+ p.once(
880
+ "remove",
881
+ () => {
882
+ close();
883
+ },
884
+ this
885
+ );
886
+ }
885
887
  }
886
888
  this._openedPopup.push([popup, _closeHandlers, def]);
887
889
  popup.openPopup(latLng);
@@ -1385,7 +1387,7 @@ class ImageAdapter extends BaseAdapter {
1385
1387
  const url = options && options.url;
1386
1388
  if (url) {
1387
1389
  const updateWmsParamsFromOpt = options.updateWmsParams;
1388
- this.layer = new ImageLayer(url, __spreadProps$3(__spreadValues$4(__spreadValues$4(__spreadValues$4({
1390
+ this.layer = new ImageLayer(url, __spreadValues$4(__spreadValues$4(__spreadValues$4({
1389
1391
  pane: this.pane,
1390
1392
  headers: options.headers,
1391
1393
  setViewDelay: options.setViewDelay
@@ -1393,9 +1395,7 @@ class ImageAdapter extends BaseAdapter {
1393
1395
  transparent: true
1394
1396
  }, options), {
1395
1397
  opacity: (_a = options.opacity) != null ? _a : void 0
1396
- })), options.params), options.nativeOptions), {
1397
- maxZoom: 12
1398
- }));
1398
+ })), options.params), options.nativeOptions));
1399
1399
  if (updateWmsParamsFromOpt) {
1400
1400
  const updateWmsParams = this.layer.updateWmsParams;
1401
1401
  this.layer.updateWmsParams = function(map) {
@@ -1877,7 +1877,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
1877
1877
  }
1878
1878
  }
1879
1879
  removeLayer(layer) {
1880
- layer && layer.remove && layer.remove();
1880
+ if (layer && layer.remove) layer.remove();
1881
1881
  }
1882
1882
  showLayer(layer) {
1883
1883
  if (this.map) {