@nextgis/ngw-map 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-map; version: 3.0.0-alpha.18; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 3.0.0-alpha.20; author: NextGIS */
2
2
  import { getIcon } from '@nextgis/icons';
3
3
  import NgwConnector from '@nextgis/ngw-connector';
4
4
  import { NgwKit, fetchNgwLayerItem, fetchNgwLayerItems, fetchNgwLayerFeature, fetchNgwLayerFeatureCollection, fetchIdentifyItem, fetchIdentifyGeoJson, createNgwLayerAdapter, fetchNgwExtent, sendIdentifyRequest, getCompanyLogo, getIdentifyItems, createIdentifyItem } from '@nextgis/ngw-kit';
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-map; version: 3.0.0-alpha.18; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 3.0.0-alpha.20; author: NextGIS */
2
2
  var NgwMap = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -1068,7 +1068,7 @@ var NgwMap = (function (exports) {
1068
1068
 
1069
1069
  var pkg = {
1070
1070
  name: "@nextgis/ngw-connector",
1071
- version: "3.0.0-alpha.18",
1071
+ version: "3.0.0-alpha.20",
1072
1072
  _priority: 12,
1073
1073
  description: "A lightweight HTTP client optimized for use with NextGIS Web API",
1074
1074
  main: "index.js",
@@ -3147,10 +3147,6 @@ var NgwMap = (function (exports) {
3147
3147
  return logic === "any" ? filters_.some(filterFunction) : filters_.every(filterFunction);
3148
3148
  }
3149
3149
 
3150
- const config = {
3151
- defaultRequestLimit: 7e3
3152
- };
3153
-
3154
3150
  var __defProp$A = Object.defineProperty;
3155
3151
  var __defProps$f = Object.defineProperties;
3156
3152
  var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
@@ -3286,13 +3282,7 @@ var NgwMap = (function (exports) {
3286
3282
  }))
3287
3283
  );
3288
3284
  } else {
3289
- getQueries(
3290
- __spreadProps$f(__spreadValues$q({}, opt), {
3291
- filters: f
3292
- }),
3293
- _queries,
3294
- [..._parentAllParams]
3295
- );
3285
+ getQueries(__spreadProps$f(__spreadValues$q({}, opt), { filters: f }), _queries, [..._parentAllParams]);
3296
3286
  }
3297
3287
  }
3298
3288
  } else if (logic === "all") {
@@ -3307,13 +3297,10 @@ var NgwMap = (function (exports) {
3307
3297
  }
3308
3298
  if (propertiesFilterList.length) {
3309
3299
  for (const x of propertiesFilterList) {
3310
- getQueries(
3311
- __spreadProps$f(__spreadValues$q({}, opt), {
3312
- filters: x
3313
- }),
3314
- _queries,
3315
- [..._parentAllParams, ...filters2]
3316
- );
3300
+ getQueries(__spreadProps$f(__spreadValues$q({}, opt), { filters: x }), _queries, [
3301
+ ..._parentAllParams,
3302
+ ...filters2
3303
+ ]);
3317
3304
  }
3318
3305
  } else {
3319
3306
  _queries.push(
@@ -3347,10 +3334,8 @@ var NgwMap = (function (exports) {
3347
3334
  intersects,
3348
3335
  resourceId
3349
3336
  } = options;
3350
- if (limit && limit !== Number.POSITIVE_INFINITY) {
3337
+ if (typeof limit === "number" && limit !== Number.POSITIVE_INFINITY) {
3351
3338
  params.limit = limit;
3352
- } else {
3353
- params.limit = config.defaultRequestLimit;
3354
3339
  }
3355
3340
  if (offset) {
3356
3341
  params.offset = offset;
@@ -4675,13 +4660,11 @@ var NgwMap = (function (exports) {
4675
4660
  }
4676
4661
  if (adapter) {
4677
4662
  return this.webMap.addLayer(adapter, options).then((newLayer) => {
4678
- this.webMap.emitter.on("layer:toggle", (e) => {
4679
- if (e.id === newLayer.id) {
4680
- const enabled = this.properties.get("visibility");
4681
- const mapVisible = this.webMap.isLayerVisible(newLayer);
4682
- if (enabled !== mapVisible) {
4683
- this.properties.set("visibility", mapVisible);
4684
- }
4663
+ this.webMap.emitter.on(`layer-${newLayer.id}:toggle`, (e) => {
4664
+ const enabled = this.properties.get("visibility");
4665
+ const mapVisible = this.webMap.isLayerVisible(newLayer);
4666
+ if (enabled !== mapVisible) {
4667
+ this.properties.set("visibility", mapVisible);
4685
4668
  }
4686
4669
  });
4687
4670
  setNewLayer(newLayer);