@nextgis/ngw-leaflet 1.15.0 → 1.15.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/lib/ngw-leaflet.esm-browser.js +15 -4
- 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 +1 -1
- package/lib/ngw-leaflet.global.js +15 -4
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 1.15.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 1.15.1; author: NextGIS */
|
|
2
2
|
/******************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -18717,6 +18717,9 @@ var NgwConnector = /** @class */ (function () {
|
|
|
18717
18717
|
if (this.options.route) {
|
|
18718
18718
|
this.routeStr = this.options.route;
|
|
18719
18719
|
}
|
|
18720
|
+
if (this.options.requestTransform) {
|
|
18721
|
+
this.requestTransform = this.options.requestTransform;
|
|
18722
|
+
}
|
|
18720
18723
|
this.resources = new ResourcesControl(this);
|
|
18721
18724
|
addConnector(this);
|
|
18722
18725
|
}
|
|
@@ -18724,6 +18727,9 @@ var NgwConnector = /** @class */ (function () {
|
|
|
18724
18727
|
NgwConnector.create = function (options) {
|
|
18725
18728
|
return new this(options);
|
|
18726
18729
|
};
|
|
18730
|
+
NgwConnector.prototype.setRequestTransform = function (requestTransform) {
|
|
18731
|
+
this.requestTransform = requestTransform;
|
|
18732
|
+
};
|
|
18727
18733
|
/**
|
|
18728
18734
|
* Fast way to specify the connection address to NextGIS Web.
|
|
18729
18735
|
* The current connection will be severed.
|
|
@@ -18983,9 +18989,8 @@ var NgwConnector = /** @class */ (function () {
|
|
|
18983
18989
|
if (params) {
|
|
18984
18990
|
url = template(url, params);
|
|
18985
18991
|
}
|
|
18986
|
-
|
|
18987
|
-
|
|
18988
|
-
return this._loadData(encodeURI(url), options);
|
|
18992
|
+
url = encodeURI(fixUrlStr(url));
|
|
18993
|
+
return this._loadData(url, options);
|
|
18989
18994
|
}
|
|
18990
18995
|
else {
|
|
18991
18996
|
throw new Error('Empty `url` not allowed');
|
|
@@ -19078,6 +19083,11 @@ var NgwConnector = /** @class */ (function () {
|
|
|
19078
19083
|
// options.withCredentials = true;
|
|
19079
19084
|
options.headers = __assign(__assign({}, _this.getAuthorizationHeaders()), options.headers);
|
|
19080
19085
|
}
|
|
19086
|
+
if (_this.requestTransform) {
|
|
19087
|
+
var _a = _this.requestTransform(url, options), transUrl = _a[0], transOptions = _a[1];
|
|
19088
|
+
url = transUrl;
|
|
19089
|
+
options = transOptions;
|
|
19090
|
+
}
|
|
19081
19091
|
loadData(url, resolve, options, reject, onCancel);
|
|
19082
19092
|
})
|
|
19083
19093
|
.then(function (resp) {
|
|
@@ -19102,6 +19112,7 @@ var NgwConnector = /** @class */ (function () {
|
|
|
19102
19112
|
typeof options.signal.addEventListener === 'function') {
|
|
19103
19113
|
options.signal.addEventListener('abort', function () {
|
|
19104
19114
|
request.cancel();
|
|
19115
|
+
_this._cleanActiveRequests(request);
|
|
19105
19116
|
});
|
|
19106
19117
|
}
|
|
19107
19118
|
this.activeRequests.push(request);
|