Make map handle background color changes

This commit is contained in:
Éric Lemoine
2013-01-24 22:12:10 +01:00
parent 2a28b7c699
commit 4a64837ba1
4 changed files with 11 additions and 26 deletions
+11
View File
@@ -287,6 +287,9 @@ ol.Map = function(mapOptions) {
this.handleViewChanged_, false, this);
goog.events.listen(this, ol.Object.getChangedEventType(ol.MapProperty.SIZE),
this.handleSizeChanged_, false, this);
goog.events.listen(
this, ol.Object.getChangedEventType(ol.MapProperty.BACKGROUND_COLOR),
this.handleBackgroundColorChanged_, false, this),
this.setValues(mapOptionsInternal.values);
// this gives the map an initial size
@@ -561,6 +564,14 @@ ol.Map.prototype.handlePostRender = function() {
};
/**
* @private
*/
ol.Map.prototype.handleBackgroundColorChanged_ = function() {
this.render();
};
/**
* @protected
*/