@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.
- package/lib/ngw-map.cjs.js +1 -1
- package/lib/ngw-map.esm-browser.js +13 -30
- package/lib/ngw-map.esm-browser.js.map +1 -1
- package/lib/ngw-map.esm-browser.prod.js +1 -1
- package/lib/ngw-map.esm-browser.prod.js.map +1 -1
- package/lib/ngw-map.esm-bundler.js +1 -1
- package/lib/ngw-map.global.js +13 -30
- package/lib/ngw-map.global.js.map +1 -1
- package/lib/ngw-map.global.prod.js +1 -1
- package/lib/ngw-map.global.prod.js.map +1 -1
- package/package.json +4 -4
package/lib/ngw-map.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 3.0.0-alpha.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 3.0.0-alpha.20; author: NextGIS */
|
|
2
2
|
const svgPath = {
|
|
3
3
|
brill: '<path d="m6 0-5 6 5 6 5-6z"/>',
|
|
4
4
|
circle: '<circle cx="6" cy="6" r="6"/>',
|
|
@@ -1065,7 +1065,7 @@ function unwrapListeners(arr) {
|
|
|
1065
1065
|
|
|
1066
1066
|
var pkg = {
|
|
1067
1067
|
name: "@nextgis/ngw-connector",
|
|
1068
|
-
version: "3.0.0-alpha.
|
|
1068
|
+
version: "3.0.0-alpha.20",
|
|
1069
1069
|
_priority: 12,
|
|
1070
1070
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
1071
1071
|
main: "index.js",
|
|
@@ -3144,10 +3144,6 @@ function propertiesFilter(properties, filters) {
|
|
|
3144
3144
|
return logic === "any" ? filters_.some(filterFunction) : filters_.every(filterFunction);
|
|
3145
3145
|
}
|
|
3146
3146
|
|
|
3147
|
-
const config = {
|
|
3148
|
-
defaultRequestLimit: 7e3
|
|
3149
|
-
};
|
|
3150
|
-
|
|
3151
3147
|
var __defProp$A = Object.defineProperty;
|
|
3152
3148
|
var __defProps$f = Object.defineProperties;
|
|
3153
3149
|
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
@@ -3283,13 +3279,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
3283
3279
|
}))
|
|
3284
3280
|
);
|
|
3285
3281
|
} else {
|
|
3286
|
-
getQueries(
|
|
3287
|
-
__spreadProps$f(__spreadValues$q({}, opt), {
|
|
3288
|
-
filters: f
|
|
3289
|
-
}),
|
|
3290
|
-
_queries,
|
|
3291
|
-
[..._parentAllParams]
|
|
3292
|
-
);
|
|
3282
|
+
getQueries(__spreadProps$f(__spreadValues$q({}, opt), { filters: f }), _queries, [..._parentAllParams]);
|
|
3293
3283
|
}
|
|
3294
3284
|
}
|
|
3295
3285
|
} else if (logic === "all") {
|
|
@@ -3304,13 +3294,10 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
3304
3294
|
}
|
|
3305
3295
|
if (propertiesFilterList.length) {
|
|
3306
3296
|
for (const x of propertiesFilterList) {
|
|
3307
|
-
getQueries(
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
_queries,
|
|
3312
|
-
[..._parentAllParams, ...filters2]
|
|
3313
|
-
);
|
|
3297
|
+
getQueries(__spreadProps$f(__spreadValues$q({}, opt), { filters: x }), _queries, [
|
|
3298
|
+
..._parentAllParams,
|
|
3299
|
+
...filters2
|
|
3300
|
+
]);
|
|
3314
3301
|
}
|
|
3315
3302
|
} else {
|
|
3316
3303
|
_queries.push(
|
|
@@ -3344,10 +3331,8 @@ function fetchNgwLayerItemsRequest(options) {
|
|
|
3344
3331
|
intersects,
|
|
3345
3332
|
resourceId
|
|
3346
3333
|
} = options;
|
|
3347
|
-
if (limit && limit !== Number.POSITIVE_INFINITY) {
|
|
3334
|
+
if (typeof limit === "number" && limit !== Number.POSITIVE_INFINITY) {
|
|
3348
3335
|
params.limit = limit;
|
|
3349
|
-
} else {
|
|
3350
|
-
params.limit = config.defaultRequestLimit;
|
|
3351
3336
|
}
|
|
3352
3337
|
if (offset) {
|
|
3353
3338
|
params.offset = offset;
|
|
@@ -4672,13 +4657,11 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
|
|
|
4672
4657
|
}
|
|
4673
4658
|
if (adapter) {
|
|
4674
4659
|
return this.webMap.addLayer(adapter, options).then((newLayer) => {
|
|
4675
|
-
this.webMap.emitter.on(
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
this.properties.set("visibility", mapVisible);
|
|
4681
|
-
}
|
|
4660
|
+
this.webMap.emitter.on(`layer-${newLayer.id}:toggle`, (e) => {
|
|
4661
|
+
const enabled = this.properties.get("visibility");
|
|
4662
|
+
const mapVisible = this.webMap.isLayerVisible(newLayer);
|
|
4663
|
+
if (enabled !== mapVisible) {
|
|
4664
|
+
this.properties.set("visibility", mapVisible);
|
|
4682
4665
|
}
|
|
4683
4666
|
});
|
|
4684
4667
|
setNewLayer(newLayer);
|