Commit e8713a1f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

info window with information when google consent for some data overlay is missing

parent 3fde5e76
...@@ -324,4 +324,12 @@ LeftPanel.prototype.destroy = function () { ...@@ -324,4 +324,12 @@ LeftPanel.prototype.destroy = function () {
return Promise.all(promises); return Promise.all(promises);
}; };
LeftPanel.prototype.setGoogleLicenseConsentRequired = function (value) {
this._googleLicenseConsentRequired = value;
};
LeftPanel.prototype.isGoogleLicenseConsentRequired = function () {
return this._googleLicenseConsentRequired;
};
module.exports = LeftPanel; module.exports = LeftPanel;
...@@ -350,9 +350,13 @@ OverlayPanel.prototype.refresh = function () { ...@@ -350,9 +350,13 @@ OverlayPanel.prototype.refresh = function () {
body = document.createElement("tbody"); body = document.createElement("tbody");
table.appendChild(body); table.appendChild(body);
self.setGoogleLicenseConsentRequired(false);
for (i = 0; i < customOverlays.length; i++) { for (i = 0; i < customOverlays.length; i++) {
overlay = customOverlays[i]; overlay = customOverlays[i];
body.appendChild(self.createOverlayRow(overlay, selectedOverlay[overlay.getId()], !overlay.isGoogleLicenseConsent())); body.appendChild(self.createOverlayRow(overlay, selectedOverlay[overlay.getId()], !overlay.isGoogleLicenseConsent()));
if (!overlay.isGoogleLicenseConsent()) {
self.setGoogleLicenseConsentRequired(true);
}
} }
} }
...@@ -509,4 +513,9 @@ OverlayPanel.prototype.openAddOverlayDialog = function () { ...@@ -509,4 +513,9 @@ OverlayPanel.prototype.openAddOverlayDialog = function () {
OverlayPanel.prototype.init = function () { OverlayPanel.prototype.init = function () {
return this.refresh(); return this.refresh();
}; };
OverlayPanel.prototype.setGoogleLicenseConsentRequired = function (value) {
this.getParent().setGoogleLicenseConsentRequired(value);
};
module.exports = OverlayPanel; module.exports = OverlayPanel;
...@@ -553,6 +553,9 @@ function create(params) { ...@@ -553,6 +553,9 @@ function create(params) {
return customMap.openSubmap(submapId); return customMap.openSubmap(submapId);
} }
}).then(function () { }).then(function () {
if (leftPanel.isGoogleLicenseConsentRequired()) {
GuiConnector.alert("Some data overlays doesn't have consent to the terms of the <a href='https://cloud.google.com/maps-platform/terms/'>license of Google Maps Platform</a>. To be able to visualize them you must edit data overlay. ")
}
var result = createResult(customMap); var result = createResult(customMap);
if (params.isDebug()) { if (params.isDebug()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment