@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
  var domain;
3
3
 
4
4
  // This constructor is used to store event handlers. Instantiating this is
@@ -18190,7 +18190,7 @@ let Cache = _Cache;
18190
18190
 
18191
18191
  var pkg = {
18192
18192
  name: "@nextgis/ngw-connector",
18193
- version: "3.0.0-alpha.18",
18193
+ version: "3.0.0-alpha.20",
18194
18194
  _priority: 12,
18195
18195
  description: "A lightweight HTTP client optimized for use with NextGIS Web API",
18196
18196
  main: "index.js",
@@ -20175,10 +20175,6 @@ function createOnFirstShowNgwAdapter(_0) {
20175
20175
  });
20176
20176
  }
20177
20177
 
20178
- const config = {
20179
- defaultRequestLimit: 7e3
20180
- };
20181
-
20182
20178
  var __defProp$y = Object.defineProperty;
20183
20179
  var __defProps$g = Object.defineProperties;
20184
20180
  var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
@@ -20314,13 +20310,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
20314
20310
  }))
20315
20311
  );
20316
20312
  } else {
20317
- getQueries(
20318
- __spreadProps$g(__spreadValues$o({}, opt), {
20319
- filters: f
20320
- }),
20321
- _queries,
20322
- [..._parentAllParams]
20323
- );
20313
+ getQueries(__spreadProps$g(__spreadValues$o({}, opt), { filters: f }), _queries, [..._parentAllParams]);
20324
20314
  }
20325
20315
  }
20326
20316
  } else if (logic === "all") {
@@ -20335,13 +20325,10 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
20335
20325
  }
20336
20326
  if (propertiesFilterList.length) {
20337
20327
  for (const x of propertiesFilterList) {
20338
- getQueries(
20339
- __spreadProps$g(__spreadValues$o({}, opt), {
20340
- filters: x
20341
- }),
20342
- _queries,
20343
- [..._parentAllParams, ...filters2]
20344
- );
20328
+ getQueries(__spreadProps$g(__spreadValues$o({}, opt), { filters: x }), _queries, [
20329
+ ..._parentAllParams,
20330
+ ...filters2
20331
+ ]);
20345
20332
  }
20346
20333
  } else {
20347
20334
  _queries.push(
@@ -20375,10 +20362,8 @@ function fetchNgwLayerItemsRequest(options) {
20375
20362
  intersects,
20376
20363
  resourceId
20377
20364
  } = options;
20378
- if (limit && limit !== Number.POSITIVE_INFINITY) {
20365
+ if (typeof limit === "number" && limit !== Number.POSITIVE_INFINITY) {
20379
20366
  params.limit = limit;
20380
- } else {
20381
- params.limit = config.defaultRequestLimit;
20382
20367
  }
20383
20368
  if (offset) {
20384
20369
  params.offset = offset;
@@ -21703,13 +21688,11 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21703
21688
  }
21704
21689
  if (adapter) {
21705
21690
  return this.webMap.addLayer(adapter, options).then((newLayer) => {
21706
- this.webMap.emitter.on("layer:toggle", (e) => {
21707
- if (e.id === newLayer.id) {
21708
- const enabled = this.properties.get("visibility");
21709
- const mapVisible = this.webMap.isLayerVisible(newLayer);
21710
- if (enabled !== mapVisible) {
21711
- this.properties.set("visibility", mapVisible);
21712
- }
21691
+ this.webMap.emitter.on(`layer-${newLayer.id}:toggle`, (e) => {
21692
+ const enabled = this.properties.get("visibility");
21693
+ const mapVisible = this.webMap.isLayerVisible(newLayer);
21694
+ if (enabled !== mapVisible) {
21695
+ this.properties.set("visibility", mapVisible);
21713
21696
  }
21714
21697
  });
21715
21698
  setNewLayer(newLayer);