@nextgis/ngw-map 4.0.1 → 4.0.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/ngw-map.cjs.js +1 -1
- package/lib/ngw-map.esm-browser.js +11 -5
- 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 +11 -5
- 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.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 4.0.2; 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';
|
package/lib/ngw-map.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 4.0.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 4.0.2; author: NextGIS */
|
|
2
2
|
var NgwMap = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -352,8 +352,14 @@ var NgwMap = (function (exports) {
|
|
|
352
352
|
return url.replace(/([^:]\/)\/+/g, "$1");
|
|
353
353
|
}
|
|
354
354
|
function updateUrlParams(urlStr, params) {
|
|
355
|
-
const
|
|
356
|
-
const
|
|
355
|
+
const hashIndex = urlStr.indexOf("#");
|
|
356
|
+
const hash = hashIndex === -1 ? "" : urlStr.slice(hashIndex);
|
|
357
|
+
const url = hashIndex === -1 ? urlStr : urlStr.slice(0, hashIndex);
|
|
358
|
+
const queryIndex = url.indexOf("?");
|
|
359
|
+
const baseUrl = queryIndex === -1 ? url : url.slice(0, queryIndex);
|
|
360
|
+
const searchParams = new URLSearchParams(
|
|
361
|
+
queryIndex === -1 ? "" : url.slice(queryIndex + 1)
|
|
362
|
+
);
|
|
357
363
|
Object.entries(params).forEach(([key, value]) => {
|
|
358
364
|
if (value === void 0) {
|
|
359
365
|
searchParams.delete(key);
|
|
@@ -363,7 +369,7 @@ var NgwMap = (function (exports) {
|
|
|
363
369
|
});
|
|
364
370
|
searchParams.set("timestamp", String((/* @__PURE__ */ new Date()).getTime()));
|
|
365
371
|
const newSearch = [...searchParams.entries()].map(([key, value]) => `${key}=${value}`).join("&");
|
|
366
|
-
return `${
|
|
372
|
+
return `${baseUrl}?${newSearch}${hash}`;
|
|
367
373
|
}
|
|
368
374
|
|
|
369
375
|
const templateRe = /\{ *([\w_-]+) *\}/g;
|
|
@@ -1080,7 +1086,7 @@ var NgwMap = (function (exports) {
|
|
|
1080
1086
|
}
|
|
1081
1087
|
|
|
1082
1088
|
var pkg = {
|
|
1083
|
-
version: "4.0.
|
|
1089
|
+
version: "4.0.2"};
|
|
1084
1090
|
|
|
1085
1091
|
class AbortError extends Error {
|
|
1086
1092
|
constructor(message = "AbortError") {
|