Export getLayers and setLayers methods of ol.layer.Group

This is nicer than having to use .get("layers") and .set("layers", x).
This commit is contained in:
Petr Sloup
2014-08-14 13:48:33 +02:00
parent 1d5c746974
commit d7027a6a64

View File

@@ -148,6 +148,7 @@ ol.layer.Group.prototype.handleLayersRemove_ = function(collectionEvent) {
* @return {ol.Collection.<ol.layer.Base>|undefined} Collection of
* {@link ol.layer.Layer layers} that are part of this group.
* @observable
* @api
*/
ol.layer.Group.prototype.getLayers = function() {
return /** @type {ol.Collection.<ol.layer.Base>|undefined} */ (this.get(
@@ -163,6 +164,7 @@ goog.exportProperty(
* @param {ol.Collection.<ol.layer.Base>|undefined} layers Collection of
* {@link ol.layer.Layer layers} that are part of this group.
* @observable
* @api
*/
ol.layer.Group.prototype.setLayers = function(layers) {
this.set(ol.layer.GroupProperty.LAYERS, layers);