@nextgis/leaflet-map-adapter 3.0.0-alpha.20 → 3.0.0-alpha.21

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,6 +1,6 @@
1
- /** Bundle of @nextgis/leaflet-map-adapter; version: 3.0.0-alpha.20; author: NextGIS */
1
+ /** Bundle of @nextgis/leaflet-map-adapter; version: 3.0.0-alpha.21; author: NextGIS */
2
2
  import { EventEmitter } from 'events';
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';
3
+ import { Control, DomEvent, GeoJSON, DivIcon, Marker, CircleMarker, FeatureGroup, ImageOverlay as ImageOverlay$1, Layer, Util, GridLayer, DomUtil, TileLayer as TileLayer$1, Map, latLngBounds, latLng } from 'leaflet';
4
4
  import { defined, debounce as debounce$1, isObject, updateUrlParams } from '@nextgis/utils';
5
5
  import { isPaintCallback, isPaint } from '@nextgis/paint';
6
6
  import Queue from '@nextgis/queue';
@@ -1166,13 +1166,7 @@ class ImageLayer extends Layer {
1166
1166
  constructor(url, options) {
1167
1167
  super(options);
1168
1168
  __publicField$2(this, "defaultWmsParams", {
1169
- service: "WMS",
1170
- request: "GetMap",
1171
- version: "1.1.1",
1172
- layers: "",
1173
- styles: "",
1174
- format: "image/jpeg",
1175
- transparent: false
1169
+ request: "GetMap"
1176
1170
  });
1177
1171
  __publicField$2(this, "options", {
1178
1172
  crs: null,
@@ -1337,9 +1331,7 @@ class ImageLayer extends Layer {
1337
1331
  size.x = Math.ceil(size.x * factor);
1338
1332
  size.y = Math.ceil(size.y * factor);
1339
1333
  }
1340
- const wmsVersion = parseFloat(this.wmsParams.version);
1341
1334
  const crs = this.options.crs || map.options.crs;
1342
- const projectionKey = wmsVersion >= 1.3 ? "crs" : "srs";
1343
1335
  if (crs) {
1344
1336
  const nw = crs.project(bounds.getNorthWest());
1345
1337
  const se = crs.project(bounds.getSouthEast());
@@ -1347,8 +1339,7 @@ class ImageLayer extends Layer {
1347
1339
  width: size.x,
1348
1340
  height: size.y
1349
1341
  };
1350
- params[projectionKey] = crs.code;
1351
- params.bbox = (wmsVersion >= 1.3 && crs === CRS.EPSG4326 ? [se.y, nw.x, nw.y, se.x] : [nw.x, se.y, se.x, nw.y]).join(",");
1342
+ params.bbox = [nw.x, se.y, se.x, nw.y];
1352
1343
  Util.extend(this.wmsParams, params);
1353
1344
  }
1354
1345
  }