do not display attributions if empty string

This commit is contained in:
mike-000
2022-08-20 12:24:09 +01:00
committed by GitHub
parent ba60c3ba4a
commit c857ca440c

View File

@@ -188,7 +188,7 @@ class TileJSON extends TileImage {
this.tileUrlFunction = createFromTemplates(tileJSON['tiles'], tileGrid);
if (tileJSON['attribution'] !== undefined && !this.getAttributions()) {
if (tileJSON['attribution'] && !this.getAttributions()) {
const attributionExtent = extent !== undefined ? extent : gridExtent;
this.setAttributions(function (frameState) {
if (intersects(attributionExtent, frameState.extent)) {