@nextgis/ngw-map 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-map.cjs.js +1 -1
- package/lib/ngw-map.esm-browser.js +45 -32
- 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 +45 -32
- 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 +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 3.0.0-alpha.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 3.0.0-alpha.14; 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: 3.0.0-alpha.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 3.0.0-alpha.14; author: NextGIS */
|
|
2
2
|
var NgwMap = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -1068,7 +1068,7 @@ var NgwMap = (function (exports) {
|
|
|
1068
1068
|
|
|
1069
1069
|
var pkg = {
|
|
1070
1070
|
name: "@nextgis/ngw-connector",
|
|
1071
|
-
version: "3.0.0-alpha.
|
|
1071
|
+
version: "3.0.0-alpha.14",
|
|
1072
1072
|
_priority: 12,
|
|
1073
1073
|
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
1074
1074
|
main: "index.js",
|
|
@@ -1464,7 +1464,7 @@ var NgwMap = (function (exports) {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
function request(path, options, cacheEngine) {
|
|
1466
1466
|
return __async$u(this, null, function* () {
|
|
1467
|
-
var _b;
|
|
1467
|
+
var _b, _c;
|
|
1468
1468
|
const defaults = {
|
|
1469
1469
|
method: "GET",
|
|
1470
1470
|
credentials: "same-origin",
|
|
@@ -1489,6 +1489,7 @@ var NgwMap = (function (exports) {
|
|
|
1489
1489
|
"query",
|
|
1490
1490
|
"json"
|
|
1491
1491
|
]);
|
|
1492
|
+
opt.method = (_b = opt.method) == null ? void 0 : _b.toUpperCase();
|
|
1492
1493
|
if (withCredentials) {
|
|
1493
1494
|
opt.credentials = "include";
|
|
1494
1495
|
}
|
|
@@ -1546,15 +1547,21 @@ var NgwMap = (function (exports) {
|
|
|
1546
1547
|
}
|
|
1547
1548
|
return body;
|
|
1548
1549
|
});
|
|
1549
|
-
if (cacheEngine
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1550
|
+
if (cacheEngine) {
|
|
1551
|
+
if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
|
|
1552
|
+
if (cache !== false) {
|
|
1553
|
+
const props = cacheProps ? cacheProps : __spreadValues$w({}, objectRemoveEmpty({
|
|
1554
|
+
withCredentials,
|
|
1555
|
+
responseType
|
|
1556
|
+
}));
|
|
1557
|
+
return cacheEngine.add(cacheName || url, makeRequest, {
|
|
1558
|
+
props,
|
|
1559
|
+
expirationTime: cache ? void 0 : 500
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
} else {
|
|
1563
|
+
cacheEngine.clean();
|
|
1564
|
+
}
|
|
1558
1565
|
}
|
|
1559
1566
|
return makeRequest();
|
|
1560
1567
|
});
|
|
@@ -5869,15 +5876,19 @@ var NgwMap = (function (exports) {
|
|
|
5869
5876
|
}
|
|
5870
5877
|
showLayer() {
|
|
5871
5878
|
this._layerVisibility = true;
|
|
5872
|
-
if (this.
|
|
5873
|
-
if (
|
|
5879
|
+
if (!this._blocked) {
|
|
5880
|
+
if (super.showLayer) {
|
|
5881
|
+
super.showLayer(this.layer);
|
|
5882
|
+
} else if (this.layer) {
|
|
5874
5883
|
webMap.mapAdapter.showLayer(this.layer);
|
|
5875
5884
|
}
|
|
5876
5885
|
}
|
|
5877
5886
|
}
|
|
5878
5887
|
hideLayer() {
|
|
5879
5888
|
this._layerVisibility = false;
|
|
5880
|
-
if (
|
|
5889
|
+
if (super.hideLayer) {
|
|
5890
|
+
super.hideLayer(this.layer);
|
|
5891
|
+
} else if (this.layer) {
|
|
5881
5892
|
webMap.mapAdapter.hideLayer(this.layer);
|
|
5882
5893
|
}
|
|
5883
5894
|
}
|
|
@@ -6424,24 +6435,26 @@ var NgwMap = (function (exports) {
|
|
|
6424
6435
|
img.style.maxHeight = "100px";
|
|
6425
6436
|
img.style.maxWidth = "100px";
|
|
6426
6437
|
img.src = "";
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
if (logo) {
|
|
6431
|
-
const [mimeType, base64Data] = logo;
|
|
6432
|
-
const byteCharacters = atob(base64Data);
|
|
6433
|
-
const byteNumbers = new Array(byteCharacters.length);
|
|
6434
|
-
for (let i = 0; i < byteCharacters.length; i++) {
|
|
6435
|
-
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
6436
|
-
}
|
|
6437
|
-
const byteArray = new Uint8Array(byteNumbers);
|
|
6438
|
-
const blob = new Blob([byteArray], { type: mimeType });
|
|
6439
|
-
const urlCreator = window.URL || window.webkitURL;
|
|
6440
|
-
const imageUrl = urlCreator.createObjectURL(blob);
|
|
6441
|
-
img.src = imageUrl;
|
|
6438
|
+
const resp = yield connector.route("pyramid.csettings").get({
|
|
6439
|
+
query: {
|
|
6440
|
+
pyramid: ["header_logo"]
|
|
6442
6441
|
}
|
|
6443
|
-
}
|
|
6444
|
-
|
|
6442
|
+
});
|
|
6443
|
+
const logo = (_b = resp.pyramid) == null ? void 0 : _b.header_logo;
|
|
6444
|
+
if (logo) {
|
|
6445
|
+
const [mimeType, base64Data] = logo;
|
|
6446
|
+
const byteCharacters = atob(base64Data);
|
|
6447
|
+
const byteNumbers = new Array(byteCharacters.length);
|
|
6448
|
+
for (let i = 0; i < byteCharacters.length; i++) {
|
|
6449
|
+
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
6450
|
+
}
|
|
6451
|
+
const byteArray = new Uint8Array(byteNumbers);
|
|
6452
|
+
const blob = new Blob([byteArray], { type: mimeType });
|
|
6453
|
+
const urlCreator = window.URL || window.webkitURL;
|
|
6454
|
+
const imageUrl = urlCreator.createObjectURL(blob);
|
|
6455
|
+
img.src = imageUrl;
|
|
6456
|
+
} else {
|
|
6457
|
+
return;
|
|
6445
6458
|
}
|
|
6446
6459
|
if (settings.company_logo.link !== null && settings.company_logo.link.trim() !== "") {
|
|
6447
6460
|
anchor.href = settings.company_logo.link;
|