Make map handle background color changes
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user