@nextgis/ngw-leaflet 4.0.0 → 4.0.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 +1 -1
- package/lib/ngw-leaflet.esm-browser.js +16 -7
- 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 +16 -7
- 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 +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# NgwLeaflet
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|
|
|
5
5
|
Ready-to-use [Leaflet](https://leafletjs.com)-based map for NextGIS Web.
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 4.0.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 4.0.1; author: NextGIS */
|
|
2
2
|
function getElement(el) {
|
|
3
3
|
if (typeof el === "string") {
|
|
4
4
|
let el_ = document.getElementById(el);
|
|
@@ -21272,7 +21272,7 @@ __publicField$s(_Cache, "instance", {});
|
|
|
21272
21272
|
let Cache = _Cache;
|
|
21273
21273
|
|
|
21274
21274
|
var pkg = {
|
|
21275
|
-
version: "4.0.
|
|
21275
|
+
version: "4.0.1"};
|
|
21276
21276
|
|
|
21277
21277
|
class AbortError extends Error {
|
|
21278
21278
|
constructor(message = "AbortError") {
|
|
@@ -24980,7 +24980,7 @@ class NgwWebmapLayerAdapter {
|
|
|
24980
24980
|
return webmap.bookmark_resource.id;
|
|
24981
24981
|
}
|
|
24982
24982
|
}
|
|
24983
|
-
fetchBookmarks(options) {
|
|
24983
|
+
fetchBookmarks(options = {}) {
|
|
24984
24984
|
const bookmarkResId = this.getBookmarksResourceId();
|
|
24985
24985
|
const connector = this.options.connector;
|
|
24986
24986
|
if (bookmarkResId) {
|
|
@@ -25644,9 +25644,9 @@ function createBasemapLayerAdapter(_0) {
|
|
|
25644
25644
|
item
|
|
25645
25645
|
}) {
|
|
25646
25646
|
if (item.basemap_layer) {
|
|
25647
|
-
const
|
|
25648
|
-
const url =
|
|
25649
|
-
if (qms) {
|
|
25647
|
+
const basemap = item.basemap_layer;
|
|
25648
|
+
const { qms, url } = basemap;
|
|
25649
|
+
if (qms && typeof qms === "string") {
|
|
25650
25650
|
const qms_ = JSON.parse(qms);
|
|
25651
25651
|
const adapter = Promise.resolve(
|
|
25652
25652
|
createQmsAdapter(webMap, {
|
|
@@ -25659,10 +25659,19 @@ function createBasemapLayerAdapter(_0) {
|
|
|
25659
25659
|
const TileAdapter = webMap.mapAdapter.layerAdapters.TILE;
|
|
25660
25660
|
if (TileAdapter) {
|
|
25661
25661
|
class BasemapTileAdapter extends TileAdapter {
|
|
25662
|
+
constructor(map, options) {
|
|
25663
|
+
super(map, __spreadProps$8(__spreadValues$a({}, options), { baselayer: true, order: 0 }));
|
|
25664
|
+
}
|
|
25662
25665
|
addLayer(opt) {
|
|
25663
25666
|
return __async$b(this, null, function* () {
|
|
25667
|
+
var _a, _b, _c;
|
|
25664
25668
|
if (url) {
|
|
25665
|
-
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$8(__spreadValues$a({}, opt), {
|
|
25669
|
+
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$8(__spreadValues$a({}, opt), {
|
|
25670
|
+
url,
|
|
25671
|
+
minZoom: (_a = basemap.z_min) != null ? _a : opt.minZoom,
|
|
25672
|
+
maxZoom: (_b = basemap.z_max) != null ? _b : opt.maxZoom,
|
|
25673
|
+
attribution: (_c = basemap.copyright_text) != null ? _c : opt.attribution
|
|
25674
|
+
}));
|
|
25666
25675
|
}
|
|
25667
25676
|
});
|
|
25668
25677
|
}
|