Merge pull request #5274 from samuellapointe/logofix

Allow using elements in logo attribution options
This commit is contained in:
Andreas Hocevar
2016-05-09 13:46:11 +02:00
5 changed files with 50 additions and 7 deletions
+5 -1
View File
@@ -303,10 +303,14 @@ ol.control.Attribution.prototype.insertLogos_ = function(frameState) {
var image, logoElement, logoKey;
for (logoKey in logos) {
var logoValue = logos[logoKey];
if (logoValue instanceof HTMLElement) {
this.logoLi_.appendChild(logoValue);
logoElements[logoKey] = logoValue;
}
if (!(logoKey in logoElements)) {
image = new Image();
image.src = logoKey;
var logoValue = logos[logoKey];
if (logoValue === '') {
logoElement = image;
} else {