FredJ reviewed my work here and said it solved the problem that he reopened

103 for (specifically, that baselayer changes always resulted in a null 
attribution string), and fixes spelling. This commit makes the attribution
control work and stuff. (Closes #103)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4237 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-09-12 13:40:28 +00:00
parent fecab1c963
commit 446759fd65
2 changed files with 17 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ OpenLayers.Control.Attribution =
* APIProperty: seperator
* {String} String used to seperate layers.
*/
seperator: ", ",
separator: ", ",
/**
* Constructor: OpenLayers.Control.Attribution
@@ -36,6 +36,7 @@ OpenLayers.Control.Attribution =
this.map.events.unregister("removelayer", this, this.updateAttribution);
this.map.events.unregister("addlayer", this, this.updateAttribution);
this.map.events.unregister("changelayer", this, this.updateAttribution);
this.map.events.unregister("changebaselayer", this, this.updateAttribution);
OpenLayers.Control.prototype.destroy.apply(this, arguments);
},
@@ -50,6 +51,7 @@ OpenLayers.Control.Attribution =
draw: function() {
OpenLayers.Control.prototype.draw.apply(this, arguments);
this.map.events.register('changebaselayer', this, this.updateAttribution);
this.map.events.register('changelayer', this, this.updateAttribution);
this.map.events.register('addlayer', this, this.updateAttribution);
this.map.events.register('removelayer', this, this.updateAttribution);
@@ -70,7 +72,7 @@ OpenLayers.Control.Attribution =
attributions.push( layer.attribution );
}
}
this.div.innerHTML = attributions.join(this.seperator);
this.div.innerHTML = attributions.join(this.separator);
},
/** @final @type String */