@nextgis/leaflet-map-adapter 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/leaflet-map-adapter.esm-browser.js +10 -4
- package/lib/leaflet-map-adapter.esm-browser.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-browser.prod.js +1 -1
- package/lib/leaflet-map-adapter.esm-browser.prod.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.js +1 -1
- package/lib/leaflet-map-adapter.global.js +10 -4
- package/lib/leaflet-map-adapter.global.js.map +1 -1
- package/lib/leaflet-map-adapter.global.prod.js +1 -1
- package/lib/leaflet-map-adapter.global.prod.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/leaflet-map-adapter; version: 4.0.
|
|
1
|
+
/** Bundle of @nextgis/leaflet-map-adapter; version: 4.0.2; author: NextGIS */
|
|
2
2
|
function getElement(el) {
|
|
3
3
|
if (typeof el === "string") {
|
|
4
4
|
let el_ = document.getElementById(el);
|
|
@@ -15368,8 +15368,14 @@ function isObject(val) {
|
|
|
15368
15368
|
}
|
|
15369
15369
|
|
|
15370
15370
|
function updateUrlParams(urlStr, params) {
|
|
15371
|
-
const
|
|
15372
|
-
const
|
|
15371
|
+
const hashIndex = urlStr.indexOf("#");
|
|
15372
|
+
const hash = hashIndex === -1 ? "" : urlStr.slice(hashIndex);
|
|
15373
|
+
const url = hashIndex === -1 ? urlStr : urlStr.slice(0, hashIndex);
|
|
15374
|
+
const queryIndex = url.indexOf("?");
|
|
15375
|
+
const baseUrl = queryIndex === -1 ? url : url.slice(0, queryIndex);
|
|
15376
|
+
const searchParams = new URLSearchParams(
|
|
15377
|
+
queryIndex === -1 ? "" : url.slice(queryIndex + 1)
|
|
15378
|
+
);
|
|
15373
15379
|
Object.entries(params).forEach(([key, value]) => {
|
|
15374
15380
|
if (value === void 0) {
|
|
15375
15381
|
searchParams.delete(key);
|
|
@@ -15379,7 +15385,7 @@ function updateUrlParams(urlStr, params) {
|
|
|
15379
15385
|
});
|
|
15380
15386
|
searchParams.set("timestamp", String((/* @__PURE__ */ new Date()).getTime()));
|
|
15381
15387
|
const newSearch = [...searchParams.entries()].map(([key, value]) => `${key}=${value}`).join("&");
|
|
15382
|
-
return `${
|
|
15388
|
+
return `${baseUrl}?${newSearch}${hash}`;
|
|
15383
15389
|
}
|
|
15384
15390
|
|
|
15385
15391
|
function boundsToArray(bounds) {
|