@nextgis/ngw-leaflet 4.0.0-rc.0 → 4.0.0-rc.2
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/index.d.ts +1 -0
- package/lib/ngw-leaflet.esm-browser.js +20 -23
- package/lib/ngw-leaflet.esm-browser.js.map +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.js +2 -1
- package/lib/ngw-leaflet.esm-bundler.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.prod.js +1 -1
- package/lib/ngw-leaflet.esm-bundler.prod.js.map +1 -1
- package/lib/ngw-leaflet.global.js +20 -23
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +1 -1
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +5 -5
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 4.0.0-rc.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 4.0.0-rc.2; author: NextGIS */
|
|
2
2
|
function getElement(el) {
|
|
3
3
|
if (typeof el === "string") {
|
|
4
4
|
let el_ = document.getElementById(el);
|
|
@@ -73,8 +73,8 @@ function styleInject(css, ref) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
var css_248z$
|
|
77
|
-
styleInject(css_248z$
|
|
76
|
+
var css_248z$4 = ".webmap-ctrl-bottom-left,.webmap-ctrl-bottom-right,.webmap-ctrl-left,.webmap-ctrl-right,.webmap-ctrl-top-left,.webmap-ctrl-top-right{position:absolute;pointer-events:none;z-index:9999}.webmap-ctrl-left,.webmap-ctrl-right{height:100%}.webmap-ctrl-left{padding-right:0}.webmap-ctrl-right{padding-left:0}.webmap-ctrl-top-left{top:0;left:0}.webmap-ctrl-top-right{top:0;right:0}.webmap-ctrl-bottom-left{bottom:0;left:0}.webmap-ctrl-bottom-right{right:0;bottom:0}.webmap-ctrl,.webmap-ctrl-wrapper{clear:both;pointer-events:auto;transform:translate(0)}.webmap-ctrl-top-left>.webmap-ctrl,.webmap-ctrl-top-left>.webmap-ctrl-wrapper{float:left}.webmap-ctrl-top-right>.webmap-ctrl,.webmap-ctrl-top-right>.webmap-ctrl-wrapper{float:right}.webmap-ctrl-bottom-left>.webmap-ctrl,.webmap-ctrl-bottom-left>.webmap-ctrl-wrapper{float:left}.webmap-ctrl-bottom-right>.webmap-ctrl,.webmap-ctrl-bottom-right>.webmap-ctrl-wrapper{float:right}.webmap-ctrl-top-left>.webmap-ctrl-margin{margin:10px 0 0 10px}.webmap-ctrl-top-right>.webmap-ctrl-margin{margin:10px 10px 0 0}.webmap-ctrl-bottom-left>.webmap-ctrl-margin{margin:0 0 10px 10px}.webmap-ctrl-bottom-right>.webmap-ctrl-margin{margin:0 10px 10px 0}.webmap-ctrl-group{border-radius:4px;background:#fff}.webmap-ctrl .webmap-ctrl-wrapper{clear:none;float:none;margin:0}.webmap-ctrl .webmap-ctrl-wrapper>.webmap-ctrl,.webmap-ctrl>.webmap-ctrl{clear:none;float:none;margin:0!important}.webmap-ctrl-horizontal,.webmap-ctrl-vertical{display:flex}.webmap-ctrl-vertical{flex-direction:column;align-items:var(--webmap-ctrl-align,flex-start)}.webmap-ctrl-horizontal{flex-direction:row;align-items:var(--webmap-ctrl-align,stretch)}.webmap-ctrl:not(.webmap-ctrl-group).webmap-ctrl-horizontal,.webmap-ctrl:not(.webmap-ctrl-group).webmap-ctrl-vertical{gap:var(--webmap-ctrl-gap,0)}.webmap-ctrl-gapless:not(.webmap-ctrl-group){border:2px solid rgba(0,0,0,.1);border-radius:4px;box-sizing:border-box;background:#fff;overflow:hidden}.webmap-ctrl-gapless:not(.webmap-ctrl-group):not(:empty){box-shadow:none}.webmap-ctrl-gapless>.webmap-ctrl-group,.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.webmap-ctrl-group{border-radius:0;border:0!important;box-shadow:none!important}.webmap-ctrl-gapless>.leaflet-bar,.webmap-ctrl-gapless>.maplibregl-ctrl-group,.webmap-ctrl-gapless>.ol-control,.webmap-ctrl-gapless>.webmap-ctrl,.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.leaflet-bar,.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.maplibregl-ctrl-group,.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.ol-control,.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.webmap-ctrl{border:0!important;box-shadow:none!important}.webmap-ctrl-gapless.webmap-ctrl-horizontal>.webmap-ctrl-group:first-child,.webmap-ctrl-gapless.webmap-ctrl-horizontal>.webmap-ctrl-wrapper:first-child>.webmap-ctrl-group{border-radius:4px 0 0 4px}.webmap-ctrl-gapless.webmap-ctrl-horizontal>.webmap-ctrl-group:last-child,.webmap-ctrl-gapless.webmap-ctrl-horizontal>.webmap-ctrl-wrapper:last-child>.webmap-ctrl-group{border-radius:0 4px 4px 0}.webmap-ctrl-gapless.webmap-ctrl-vertical>.webmap-ctrl-group:first-child,.webmap-ctrl-gapless.webmap-ctrl-vertical>.webmap-ctrl-wrapper:first-child>.webmap-ctrl-group{border-radius:4px 4px 0 0}.webmap-ctrl-gapless.webmap-ctrl-vertical>.webmap-ctrl-group:last-child,.webmap-ctrl-gapless.webmap-ctrl-vertical>.webmap-ctrl-wrapper:last-child>.webmap-ctrl-group{border-radius:0 0 4px 4px}.webmap-ctrl-gapless>.webmap-ctrl-group:only-child,.webmap-ctrl-gapless>.webmap-ctrl-wrapper:only-child>.webmap-ctrl-group{border-radius:4px}.webmap-ctrl-horizontal>.webmap-ctrl-wrapper,.webmap-ctrl-vertical>.webmap-ctrl-wrapper{display:flex}.webmap-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.webmap-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}.webmap-ctrl-gapless:not(.webmap-ctrl-group){border-color:ButtonText}}.webmap-ctrl-gapless>.webmap-ctrl-group:not(:empty),.webmap-ctrl-gapless>.webmap-ctrl-wrapper>.webmap-ctrl-group:not(:empty){border:0!important;box-shadow:none!important}.webmap-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.webmap-ctrl-button{line-height:inherit!important;font-weight:400!important}.webmap-ctrl-group button+button{border-top:1px solid #ddd}.webmap-ctrl-group.webmap-ctrl-horizontal>button+button{border-top:0;border-left:1px solid #ddd}.webmap-ctrl-gapless .webmap-ctrl-group button+button,.webmap-ctrl-group.webmap-ctrl-gapless button+button{border-top:0!important;border-left:0!important}.webmap-ctrl-gapless .webmap-ctrl-group button{border:0!important;border-radius:0!important;box-shadow:none!important}.webmap-ctrl button .webmap-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media (-ms-high-contrast:active){.webmap-ctrl-icon{background-color:transparent}.webmap-ctrl-group button+button{border-top:1px solid ButtonText}}.webmap-ctrl button::-moz-focus-inner{border:0;padding:0}.webmap-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.webmap-ctrl button:disabled{cursor:not-allowed}.webmap-ctrl button:disabled .webmap-ctrl-icon{opacity:.25}.webmap-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}.webmap-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.webmap-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.webmap-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.webmap-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.webmap-ctrl-group button:focus:only-child{border-radius:inherit}.webmap-ctrl button.webmap-ctrl-zoom-out .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E\")}.webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E\")}@media (-ms-high-contrast:active){.webmap-ctrl button.webmap-ctrl-zoom-out .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E\")}.webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E\")}}@media (-ms-high-contrast:black-on-white){.webmap-ctrl button.webmap-ctrl-zoom-out .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E\")}.webmap-ctrl button.webmap-ctrl-zoom-in .webmap-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E\")}}";
|
|
77
|
+
styleInject(css_248z$4);
|
|
78
78
|
|
|
79
79
|
var __defProp$19 = Object.defineProperty;
|
|
80
80
|
var __defNormalProp$19 = (obj, key, value) => key in obj ? __defProp$19(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -14777,6 +14777,9 @@ function createToggleControl$1(options, map) {
|
|
|
14777
14777
|
return control;
|
|
14778
14778
|
}
|
|
14779
14779
|
|
|
14780
|
+
var css_248z$3 = ".leaflet-bar.webmap-ctrl-group:not(:empty){box-shadow:0 0 2px rgba(0,0,0,.1)}";
|
|
14781
|
+
styleInject(css_248z$3);
|
|
14782
|
+
|
|
14780
14783
|
var __defProp$17 = Object.defineProperty;
|
|
14781
14784
|
var __defProps$s = Object.defineProperties;
|
|
14782
14785
|
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
@@ -19291,6 +19294,9 @@ class WebMapLayers extends WebMapMain {
|
|
|
19291
19294
|
return adapter.propertiesFilter(filters, options);
|
|
19292
19295
|
} else if (adapter.filter) {
|
|
19293
19296
|
this.filterLayer(adapter, (e) => {
|
|
19297
|
+
if (!filters) {
|
|
19298
|
+
return true;
|
|
19299
|
+
}
|
|
19294
19300
|
if (e.feature && e.feature.properties) {
|
|
19295
19301
|
return propertiesFilter(e.feature.properties, filters);
|
|
19296
19302
|
}
|
|
@@ -21257,7 +21263,7 @@ __publicField$s(_Cache, "instance", {});
|
|
|
21257
21263
|
let Cache = _Cache;
|
|
21258
21264
|
|
|
21259
21265
|
var pkg = {
|
|
21260
|
-
version: "4.0.0-rc.
|
|
21266
|
+
version: "4.0.0-rc.2"};
|
|
21261
21267
|
|
|
21262
21268
|
class AbortError extends Error {
|
|
21263
21269
|
constructor(message = "AbortError") {
|
|
@@ -25634,7 +25640,7 @@ function createBasemapLayerAdapter(_0) {
|
|
|
25634
25640
|
if (qms) {
|
|
25635
25641
|
const qms_ = JSON.parse(qms);
|
|
25636
25642
|
const adapter = Promise.resolve(
|
|
25637
|
-
|
|
25643
|
+
createQmsAdapter(webMap, {
|
|
25638
25644
|
qms: qms_,
|
|
25639
25645
|
baselayer: true
|
|
25640
25646
|
})
|
|
@@ -25998,6 +26004,9 @@ function createGeoJsonAdapter(props) {
|
|
|
25998
26004
|
abort();
|
|
25999
26005
|
if (this.filter && _fullDataLoad) {
|
|
26000
26006
|
this.filter((e) => {
|
|
26007
|
+
if (!filters) {
|
|
26008
|
+
return true;
|
|
26009
|
+
}
|
|
26001
26010
|
const props_ = e.feature && e.feature.properties && prepareNgwFieldsToPropertiesFilter(__spreadValues$9({}, e.feature.properties));
|
|
26002
26011
|
if (props_) {
|
|
26003
26012
|
return propertiesFilter(props_, filters);
|
|
@@ -26008,7 +26017,7 @@ function createGeoJsonAdapter(props) {
|
|
|
26008
26017
|
if (this.clearLayer) {
|
|
26009
26018
|
this.clearLayer();
|
|
26010
26019
|
}
|
|
26011
|
-
const data = yield getData(filters, __spreadProps$7(__spreadValues$9({}, opt), {
|
|
26020
|
+
const data = yield getData(filters != null ? filters : void 0, __spreadProps$7(__spreadValues$9({}, opt), {
|
|
26012
26021
|
srs: this.options.srs
|
|
26013
26022
|
}));
|
|
26014
26023
|
this.setData(data);
|
|
@@ -26241,7 +26250,11 @@ function createRasterAdapter(_0) {
|
|
|
26241
26250
|
return __async$7(this, null, function* () {
|
|
26242
26251
|
var _a;
|
|
26243
26252
|
const opt = this.options;
|
|
26244
|
-
const
|
|
26253
|
+
const filterName = `filter[${this.resourceId}]`;
|
|
26254
|
+
const params = __spreadValues$8(__spreadValues$8({}, opt.params || {}), createLayerFilterParam(this.resourceId, filters != null ? filters : void 0));
|
|
26255
|
+
if (!filters) {
|
|
26256
|
+
delete params[filterName];
|
|
26257
|
+
}
|
|
26245
26258
|
opt.params = params;
|
|
26246
26259
|
(_a = this.updateLayer) == null ? void 0 : _a.call(this, { params });
|
|
26247
26260
|
});
|
|
@@ -27139,22 +27152,6 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
27139
27152
|
return __superGet(_NgwMap.prototype, this, "addControl").call(this, controlDef, position, options);
|
|
27140
27153
|
});
|
|
27141
27154
|
}
|
|
27142
|
-
/**
|
|
27143
|
-
* Add any (style, vector, webmap) NGW layer by resource definition.
|
|
27144
|
-
* @param options - set layer identification parameters and render method.
|
|
27145
|
-
*
|
|
27146
|
-
* @example
|
|
27147
|
-
* ```javascript
|
|
27148
|
-
* // Add raster layer resourceId is the style of 4004 layer
|
|
27149
|
-
* ngwMap.addNgwLayer({ resource: 4005 });
|
|
27150
|
-
* // Add vector data from layer GEOJSON source
|
|
27151
|
-
* ngwMap.addNgwLayer({
|
|
27152
|
-
* resource: 4038,
|
|
27153
|
-
* adapter: 'GEOJSON',
|
|
27154
|
-
* adapterOptions: { paint: { color: 'red' } }
|
|
27155
|
-
* });
|
|
27156
|
-
* ```
|
|
27157
|
-
*/
|
|
27158
27155
|
addNgwLayer(options) {
|
|
27159
27156
|
return __async$1(this, null, function* () {
|
|
27160
27157
|
yield this.onMapLoad();
|