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

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';
@@ -379,7 +379,7 @@ var __objRest$2 = (source, exclude) => {
379
379
  }
380
380
  return target;
381
381
  };
382
- var __publicField$5 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
382
+ var __publicField$5 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
383
383
  class GeoJsonPaint {
384
384
  constructor(layer) {
385
385
  __publicField$5(this, "layer");
@@ -1123,10 +1123,11 @@ function callAjax({
1123
1123
  }
1124
1124
 
1125
1125
  const imageQueue = new Queue({ concurrency: 6, delay: 200 });
1126
+ var imageQueue$1 = imageQueue;
1126
1127
 
1127
1128
  var __defProp$6 = Object.defineProperty;
1128
1129
  var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1129
- var __publicField$3 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
1130
+ var __publicField$3 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
1130
1131
  class ImageOverlay extends ImageOverlay$1 {
1131
1132
  constructor(imageUrl, bounds, options) {
1132
1133
  super(imageUrl, bounds, options);
@@ -1144,7 +1145,7 @@ class ImageOverlay extends ImageOverlay$1 {
1144
1145
  const img = this._image;
1145
1146
  const src = img.src;
1146
1147
  img.src = "";
1147
- imageQueue.add(() => {
1148
+ imageQueue$1.add(() => {
1148
1149
  const [promise, abortFunc] = callAjax({
1149
1150
  src,
1150
1151
  headers,
@@ -1166,13 +1167,7 @@ class ImageLayer extends Layer {
1166
1167
  constructor(url, options) {
1167
1168
  super(options);
1168
1169
  __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
1170
+ request: "GetMap"
1176
1171
  });
1177
1172
  __publicField$2(this, "options", {
1178
1173
  crs: null,
@@ -1337,9 +1332,7 @@ class ImageLayer extends Layer {
1337
1332
  size.x = Math.ceil(size.x * factor);
1338
1333
  size.y = Math.ceil(size.y * factor);
1339
1334
  }
1340
- const wmsVersion = parseFloat(this.wmsParams.version);
1341
1335
  const crs = this.options.crs || map.options.crs;
1342
- const projectionKey = wmsVersion >= 1.3 ? "crs" : "srs";
1343
1336
  if (crs) {
1344
1337
  const nw = crs.project(bounds.getNorthWest());
1345
1338
  const se = crs.project(bounds.getSouthEast());
@@ -1347,8 +1340,7 @@ class ImageLayer extends Layer {
1347
1340
  width: size.x,
1348
1341
  height: size.y
1349
1342
  };
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(",");
1343
+ params.bbox = [nw.x, se.y, se.x, nw.y];
1352
1344
  Util.extend(this.wmsParams, params);
1353
1345
  }
1354
1346
  }
@@ -1416,7 +1408,7 @@ class ImageAdapter extends BaseAdapter {
1416
1408
  }
1417
1409
  }
1418
1410
  }
1419
- __publicField$1(ImageAdapter, "queue", imageQueue);
1411
+ __publicField$1(ImageAdapter, "queue", imageQueue$1);
1420
1412
 
1421
1413
  function debounce(cb, wait = 10) {
1422
1414
  let timeoutId;