@nextgis/ngw-map 4.0.0-alpha.8 → 4.0.0-rc.1
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/README.md +29 -8
- package/lib/index.d.ts +6 -2
- package/lib/ngw-map.cjs.js +1 -17
- package/lib/ngw-map.cjs.js.map +1 -1
- package/lib/ngw-map.cjs.prod.js.map +1 -1
- package/lib/ngw-map.esm-browser.js +15 -21
- 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 -17
- package/lib/ngw-map.esm-bundler.js.map +1 -1
- package/lib/ngw-map.esm-bundler.prod.js.map +1 -1
- package/lib/ngw-map.global.js +15 -21
- 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 +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 4.0.0-
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 4.0.0-rc.1; 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"/>',
|
|
@@ -1077,7 +1077,7 @@ function unwrapListeners(arr) {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
1079
|
var pkg = {
|
|
1080
|
-
version: "4.0.0-
|
|
1080
|
+
version: "4.0.0-rc.1"};
|
|
1081
1081
|
|
|
1082
1082
|
class AbortError extends Error {
|
|
1083
1083
|
constructor(message = "AbortError") {
|
|
@@ -5545,7 +5545,7 @@ function createBasemapLayerAdapter(_0) {
|
|
|
5545
5545
|
if (qms) {
|
|
5546
5546
|
const qms_ = JSON.parse(qms);
|
|
5547
5547
|
const adapter = Promise.resolve(
|
|
5548
|
-
|
|
5548
|
+
createQmsAdapter(webMap, {
|
|
5549
5549
|
qms: qms_,
|
|
5550
5550
|
baselayer: true
|
|
5551
5551
|
})
|
|
@@ -5909,6 +5909,9 @@ function createGeoJsonAdapter(props) {
|
|
|
5909
5909
|
abort();
|
|
5910
5910
|
if (this.filter && _fullDataLoad) {
|
|
5911
5911
|
this.filter((e) => {
|
|
5912
|
+
if (!filters) {
|
|
5913
|
+
return true;
|
|
5914
|
+
}
|
|
5912
5915
|
const props_ = e.feature && e.feature.properties && prepareNgwFieldsToPropertiesFilter(__spreadValues$e({}, e.feature.properties));
|
|
5913
5916
|
if (props_) {
|
|
5914
5917
|
return propertiesFilter(props_, filters);
|
|
@@ -5919,7 +5922,7 @@ function createGeoJsonAdapter(props) {
|
|
|
5919
5922
|
if (this.clearLayer) {
|
|
5920
5923
|
this.clearLayer();
|
|
5921
5924
|
}
|
|
5922
|
-
const data = yield getData(filters, __spreadProps$9(__spreadValues$e({}, opt), {
|
|
5925
|
+
const data = yield getData(filters != null ? filters : void 0, __spreadProps$9(__spreadValues$e({}, opt), {
|
|
5923
5926
|
srs: this.options.srs
|
|
5924
5927
|
}));
|
|
5925
5928
|
this.setData(data);
|
|
@@ -6152,7 +6155,11 @@ function createRasterAdapter(_0) {
|
|
|
6152
6155
|
return __async$c(this, null, function* () {
|
|
6153
6156
|
var _a;
|
|
6154
6157
|
const opt = this.options;
|
|
6155
|
-
const
|
|
6158
|
+
const filterName = `filter[${this.resourceId}]`;
|
|
6159
|
+
const params = __spreadValues$d(__spreadValues$d({}, opt.params || {}), createLayerFilterParam(this.resourceId, filters != null ? filters : void 0));
|
|
6160
|
+
if (!filters) {
|
|
6161
|
+
delete params[filterName];
|
|
6162
|
+
}
|
|
6156
6163
|
opt.params = params;
|
|
6157
6164
|
(_a = this.updateLayer) == null ? void 0 : _a.call(this, { params });
|
|
6158
6165
|
});
|
|
@@ -9408,6 +9415,9 @@ class WebMapLayers extends WebMapMain {
|
|
|
9408
9415
|
return adapter.propertiesFilter(filters, options);
|
|
9409
9416
|
} else if (adapter.filter) {
|
|
9410
9417
|
this.filterLayer(adapter, (e) => {
|
|
9418
|
+
if (!filters) {
|
|
9419
|
+
return true;
|
|
9420
|
+
}
|
|
9411
9421
|
if (e.feature && e.feature.properties) {
|
|
9412
9422
|
return propertiesFilter(e.feature.properties, filters);
|
|
9413
9423
|
}
|
|
@@ -10268,22 +10278,6 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
10268
10278
|
return __superGet(_NgwMap.prototype, this, "addControl").call(this, controlDef, position, options);
|
|
10269
10279
|
});
|
|
10270
10280
|
}
|
|
10271
|
-
/**
|
|
10272
|
-
* Add any (style, vector, webmap) NGW layer by resource definition.
|
|
10273
|
-
* @param options - set layer identification parameters and render method.
|
|
10274
|
-
*
|
|
10275
|
-
* @example
|
|
10276
|
-
* ```javascript
|
|
10277
|
-
* // Add raster layer resourceId is the style of 4004 layer
|
|
10278
|
-
* ngwMap.addNgwLayer({ resource: 4005 });
|
|
10279
|
-
* // Add vector data from layer GEOJSON source
|
|
10280
|
-
* ngwMap.addNgwLayer({
|
|
10281
|
-
* resource: 4038,
|
|
10282
|
-
* adapter: 'GEOJSON',
|
|
10283
|
-
* adapterOptions: { paint: { color: 'red' } }
|
|
10284
|
-
* });
|
|
10285
|
-
* ```
|
|
10286
|
-
*/
|
|
10287
10281
|
addNgwLayer(options) {
|
|
10288
10282
|
return __async$1(this, null, function* () {
|
|
10289
10283
|
yield this.onMapLoad();
|