Merge pull request #5274 from samuellapointe/logofix
Allow using elements in logo attribution options
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user