@nextgis/ngw-leaflet 3.0.0-alpha.13 → 3.0.0-alpha.15
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 +45 -32
- 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 +45 -32
- 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 +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.14; author: NextGIS */
|
|
2
2
|
import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';
|
|
3
3
|
import { NgwMap } from '@nextgis/ngw-map';
|
|
4
4
|
import { Icon } from 'leaflet';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.14; author: NextGIS */
|
|
2
2
|
var NgwLeaflet = (function () {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -18193,7 +18193,7 @@ var NgwLeaflet = (function () {
|
|
|
18193
18193
|
|
|
18194
18194
|
var pkg = {
|
|
18195
18195
|
name: "@nextgis/ngw-connector",
|
|
18196
|
-
version: "3.0.0-alpha.
|
|
18196
|
+
version: "3.0.0-alpha.14",
|
|
18197
18197
|
_priority: 12,
|
|
18198
18198
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
18199
18199
|
main: "index.js",
|
|
@@ -18589,7 +18589,7 @@ var NgwLeaflet = (function () {
|
|
|
18589
18589
|
}
|
|
18590
18590
|
function request(path, options, cacheEngine) {
|
|
18591
18591
|
return __async$t(this, null, function* () {
|
|
18592
|
-
var _b;
|
|
18592
|
+
var _b, _c;
|
|
18593
18593
|
const defaults = {
|
|
18594
18594
|
method: "GET",
|
|
18595
18595
|
credentials: "same-origin",
|
|
@@ -18614,6 +18614,7 @@ var NgwLeaflet = (function () {
|
|
|
18614
18614
|
"query",
|
|
18615
18615
|
"json"
|
|
18616
18616
|
]);
|
|
18617
|
+
opt.method = (_b = opt.method) == null ? void 0 : _b.toUpperCase();
|
|
18617
18618
|
if (withCredentials) {
|
|
18618
18619
|
opt.credentials = "include";
|
|
18619
18620
|
}
|
|
@@ -18671,15 +18672,21 @@ var NgwLeaflet = (function () {
|
|
|
18671
18672
|
}
|
|
18672
18673
|
return body;
|
|
18673
18674
|
});
|
|
18674
|
-
if (cacheEngine
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18675
|
+
if (cacheEngine) {
|
|
18676
|
+
if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
|
|
18677
|
+
if (cache !== false) {
|
|
18678
|
+
const props = cacheProps ? cacheProps : __spreadValues$t({}, objectRemoveEmpty({
|
|
18679
|
+
withCredentials,
|
|
18680
|
+
responseType
|
|
18681
|
+
}));
|
|
18682
|
+
return cacheEngine.add(cacheName || url, makeRequest, {
|
|
18683
|
+
props,
|
|
18684
|
+
expirationTime: cache ? void 0 : 500
|
|
18685
|
+
});
|
|
18686
|
+
}
|
|
18687
|
+
} else {
|
|
18688
|
+
cacheEngine.clean();
|
|
18689
|
+
}
|
|
18683
18690
|
}
|
|
18684
18691
|
return makeRequest();
|
|
18685
18692
|
});
|
|
@@ -22900,15 +22907,19 @@ var NgwLeaflet = (function () {
|
|
|
22900
22907
|
}
|
|
22901
22908
|
showLayer() {
|
|
22902
22909
|
this._layerVisibility = true;
|
|
22903
|
-
if (this.
|
|
22904
|
-
if (
|
|
22910
|
+
if (!this._blocked) {
|
|
22911
|
+
if (super.showLayer) {
|
|
22912
|
+
super.showLayer(this.layer);
|
|
22913
|
+
} else if (this.layer) {
|
|
22905
22914
|
webMap.mapAdapter.showLayer(this.layer);
|
|
22906
22915
|
}
|
|
22907
22916
|
}
|
|
22908
22917
|
}
|
|
22909
22918
|
hideLayer() {
|
|
22910
22919
|
this._layerVisibility = false;
|
|
22911
|
-
if (
|
|
22920
|
+
if (super.hideLayer) {
|
|
22921
|
+
super.hideLayer(this.layer);
|
|
22922
|
+
} else if (this.layer) {
|
|
22912
22923
|
webMap.mapAdapter.hideLayer(this.layer);
|
|
22913
22924
|
}
|
|
22914
22925
|
}
|
|
@@ -23455,24 +23466,26 @@ var NgwLeaflet = (function () {
|
|
|
23455
23466
|
img.style.maxHeight = "100px";
|
|
23456
23467
|
img.style.maxWidth = "100px";
|
|
23457
23468
|
img.src = "";
|
|
23458
|
-
|
|
23459
|
-
|
|
23460
|
-
|
|
23461
|
-
if (logo) {
|
|
23462
|
-
const [mimeType, base64Data] = logo;
|
|
23463
|
-
const byteCharacters = atob(base64Data);
|
|
23464
|
-
const byteNumbers = new Array(byteCharacters.length);
|
|
23465
|
-
for (let i = 0; i < byteCharacters.length; i++) {
|
|
23466
|
-
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
23467
|
-
}
|
|
23468
|
-
const byteArray = new Uint8Array(byteNumbers);
|
|
23469
|
-
const blob = new Blob([byteArray], { type: mimeType });
|
|
23470
|
-
const urlCreator = window.URL || window.webkitURL;
|
|
23471
|
-
const imageUrl = urlCreator.createObjectURL(blob);
|
|
23472
|
-
img.src = imageUrl;
|
|
23469
|
+
const resp = yield connector.route("pyramid.csettings").get({
|
|
23470
|
+
query: {
|
|
23471
|
+
pyramid: ["header_logo"]
|
|
23473
23472
|
}
|
|
23474
|
-
}
|
|
23475
|
-
|
|
23473
|
+
});
|
|
23474
|
+
const logo = (_b = resp.pyramid) == null ? void 0 : _b.header_logo;
|
|
23475
|
+
if (logo) {
|
|
23476
|
+
const [mimeType, base64Data] = logo;
|
|
23477
|
+
const byteCharacters = atob(base64Data);
|
|
23478
|
+
const byteNumbers = new Array(byteCharacters.length);
|
|
23479
|
+
for (let i = 0; i < byteCharacters.length; i++) {
|
|
23480
|
+
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
23481
|
+
}
|
|
23482
|
+
const byteArray = new Uint8Array(byteNumbers);
|
|
23483
|
+
const blob = new Blob([byteArray], { type: mimeType });
|
|
23484
|
+
const urlCreator = window.URL || window.webkitURL;
|
|
23485
|
+
const imageUrl = urlCreator.createObjectURL(blob);
|
|
23486
|
+
img.src = imageUrl;
|
|
23487
|
+
} else {
|
|
23488
|
+
return;
|
|
23476
23489
|
}
|
|
23477
23490
|
if (settings.company_logo.link !== null && settings.company_logo.link.trim() !== "") {
|
|
23478
23491
|
anchor.href = settings.company_logo.link;
|