@nextgis/ngw-leaflet 3.0.0-alpha.19 → 3.0.0-alpha.20

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/ngw-leaflet; version: 3.0.0-alpha.18; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.20; author: NextGIS */
2
2
  import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';
3
3
  import { NgwMap } from '@nextgis/ngw-map';
4
4
  import { Icon } from 'leaflet';
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.18; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.20; author: NextGIS */
2
2
  var NgwLeaflet = (function () {
3
3
  'use strict';
4
4
 
@@ -18193,7 +18193,7 @@ var NgwLeaflet = (function () {
18193
18193
 
18194
18194
  var pkg = {
18195
18195
  name: "@nextgis/ngw-connector",
18196
- version: "3.0.0-alpha.18",
18196
+ version: "3.0.0-alpha.20",
18197
18197
  _priority: 12,
18198
18198
  description: "A lightweight HTTP client optimized for use with NextGIS Web API",
18199
18199
  main: "index.js",
@@ -20178,10 +20178,6 @@ var NgwLeaflet = (function () {
20178
20178
  });
20179
20179
  }
20180
20180
 
20181
- const config = {
20182
- defaultRequestLimit: 7e3
20183
- };
20184
-
20185
20181
  var __defProp$y = Object.defineProperty;
20186
20182
  var __defProps$g = Object.defineProperties;
20187
20183
  var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
@@ -20317,13 +20313,7 @@ var NgwLeaflet = (function () {
20317
20313
  }))
20318
20314
  );
20319
20315
  } else {
20320
- getQueries(
20321
- __spreadProps$g(__spreadValues$o({}, opt), {
20322
- filters: f
20323
- }),
20324
- _queries,
20325
- [..._parentAllParams]
20326
- );
20316
+ getQueries(__spreadProps$g(__spreadValues$o({}, opt), { filters: f }), _queries, [..._parentAllParams]);
20327
20317
  }
20328
20318
  }
20329
20319
  } else if (logic === "all") {
@@ -20338,13 +20328,10 @@ var NgwLeaflet = (function () {
20338
20328
  }
20339
20329
  if (propertiesFilterList.length) {
20340
20330
  for (const x of propertiesFilterList) {
20341
- getQueries(
20342
- __spreadProps$g(__spreadValues$o({}, opt), {
20343
- filters: x
20344
- }),
20345
- _queries,
20346
- [..._parentAllParams, ...filters2]
20347
- );
20331
+ getQueries(__spreadProps$g(__spreadValues$o({}, opt), { filters: x }), _queries, [
20332
+ ..._parentAllParams,
20333
+ ...filters2
20334
+ ]);
20348
20335
  }
20349
20336
  } else {
20350
20337
  _queries.push(
@@ -20378,10 +20365,8 @@ var NgwLeaflet = (function () {
20378
20365
  intersects,
20379
20366
  resourceId
20380
20367
  } = options;
20381
- if (limit && limit !== Number.POSITIVE_INFINITY) {
20368
+ if (typeof limit === "number" && limit !== Number.POSITIVE_INFINITY) {
20382
20369
  params.limit = limit;
20383
- } else {
20384
- params.limit = config.defaultRequestLimit;
20385
20370
  }
20386
20371
  if (offset) {
20387
20372
  params.offset = offset;
@@ -21706,13 +21691,11 @@ var NgwLeaflet = (function () {
21706
21691
  }
21707
21692
  if (adapter) {
21708
21693
  return this.webMap.addLayer(adapter, options).then((newLayer) => {
21709
- this.webMap.emitter.on("layer:toggle", (e) => {
21710
- if (e.id === newLayer.id) {
21711
- const enabled = this.properties.get("visibility");
21712
- const mapVisible = this.webMap.isLayerVisible(newLayer);
21713
- if (enabled !== mapVisible) {
21714
- this.properties.set("visibility", mapVisible);
21715
- }
21694
+ this.webMap.emitter.on(`layer-${newLayer.id}:toggle`, (e) => {
21695
+ const enabled = this.properties.get("visibility");
21696
+ const mapVisible = this.webMap.isLayerVisible(newLayer);
21697
+ if (enabled !== mapVisible) {
21698
+ this.properties.set("visibility", mapVisible);
21716
21699
  }
21717
21700
  });
21718
21701
  setNewLayer(newLayer);