don't include duplicate attributions (#613)

This commit is contained in:
Michael Nutt 2022-09-24 16:36:39 -04:00 committed by GitHub
parent edd36dd251
commit 7cfcc413c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -792,10 +792,12 @@ module.exports = {
if (!attributionOverride &&
source.attribution && source.attribution.length > 0) {
if (tileJSON.attribution.length > 0) {
tileJSON.attribution += '; ';
if (!tileJSON.attribution.includes(source.attribution)) {
if (tileJSON.attribution.length > 0) {
tileJSON.attribution += ' | ';
}
tileJSON.attribution += source.attribution;
}
tileJSON.attribution += source.attribution;
}
resolve();
});