Add Property enum to ol.layer.Base

This commit is contained in:
Tim Schaub
2016-12-04 14:41:32 -07:00
parent 66dc2582ef
commit 57e3e7273e
2 changed files with 34 additions and 36 deletions
+3 -4
View File
@@ -5,7 +5,6 @@ goog.require('ol.events.EventType');
goog.require('ol');
goog.require('ol.Object');
goog.require('ol.layer.Base');
goog.require('ol.layer.LayerProperty');
goog.require('ol.obj');
goog.require('ol.render.Event');
goog.require('ol.source.State');
@@ -62,7 +61,7 @@ ol.layer.Layer = function(options) {
}
ol.events.listen(this,
ol.Object.getChangeEventType(ol.layer.LayerProperty.SOURCE),
ol.Object.getChangeEventType(ol.layer.Base.Property.SOURCE),
this.handleSourcePropertyChange_, this);
var source = options.source ? options.source : null;
@@ -112,7 +111,7 @@ ol.layer.Layer.prototype.getLayerStatesArray = function(opt_states) {
* @api stable
*/
ol.layer.Layer.prototype.getSource = function() {
var source = this.get(ol.layer.LayerProperty.SOURCE);
var source = this.get(ol.layer.Base.Property.SOURCE);
return /** @type {ol.source.Source} */ (source) || null;
};
@@ -198,5 +197,5 @@ ol.layer.Layer.prototype.setMap = function(map) {
* @api stable
*/
ol.layer.Layer.prototype.setSource = function(source) {
this.set(ol.layer.LayerProperty.SOURCE, source);
this.set(ol.layer.Base.Property.SOURCE, source);
};