Merge pull request #14023 from mike-000/empty-attribution

Do not display TileJSON attributions if empty string
This commit is contained in:
Andreas Hocevar
2022-08-20 14:08:31 +02:00
committed by GitHub

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)) {