diff --git a/changelog/upgrade-notes.md b/changelog/upgrade-notes.md index 750115fce4..cf244eef3c 100644 --- a/changelog/upgrade-notes.md +++ b/changelog/upgrade-notes.md @@ -11,6 +11,7 @@ A number of internal types have been renamed. This will not affect those who us * rename `ol.style.IconAnchorUnits` to `ol.style.Icon.AnchorUnits` * rename `ol.style.IconOrigin` to `ol.style.Icon.Origin` * rename `ol.format.IGCZ` to `ol.format.IGC.Z` + * rename `ol.layer.GroupProperty` to `ol.layer.Group.Property` ### v3.18.0 diff --git a/src/ol/layer/group.js b/src/ol/layer/group.js index 260ebc2a8b..cd1f892aa8 100644 --- a/src/ol/layer/group.js +++ b/src/ol/layer/group.js @@ -13,14 +13,6 @@ goog.require('ol.obj'); goog.require('ol.source.State'); -/** - * @enum {string} - */ -ol.layer.GroupProperty = { - LAYERS: 'layers' -}; - - /** * @classdesc * A {@link ol.Collection} of layers that are handled together. @@ -56,7 +48,7 @@ ol.layer.Group = function(opt_options) { this.listenerKeys_ = {}; ol.events.listen(this, - ol.Object.getChangeEventType(ol.layer.GroupProperty.LAYERS), + ol.Object.getChangeEventType(ol.layer.Group.Property.LAYERS), this.handleLayersChanged_, this); if (layers) { @@ -166,7 +158,7 @@ ol.layer.Group.prototype.handleLayersRemove_ = function(collectionEvent) { */ ol.layer.Group.prototype.getLayers = function() { return /** @type {!ol.Collection.} */ (this.get( - ol.layer.GroupProperty.LAYERS)); + ol.layer.Group.Property.LAYERS)); }; @@ -179,7 +171,7 @@ ol.layer.Group.prototype.getLayers = function() { * @api stable */ ol.layer.Group.prototype.setLayers = function(layers) { - this.set(ol.layer.GroupProperty.LAYERS, layers); + this.set(ol.layer.Group.Property.LAYERS, layers); }; @@ -237,3 +229,10 @@ ol.layer.Group.prototype.getLayerStatesArray = function(opt_states) { ol.layer.Group.prototype.getSourceState = function() { return ol.source.State.READY; }; + +/** + * @enum {string} + */ +ol.layer.Group.Property = { + LAYERS: 'layers' +};