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:
@@ -148,6 +148,7 @@ ol.layer.Group.prototype.handleLayersRemove_ = function(collectionEvent) {
|
|||||||
* @return {ol.Collection.<ol.layer.Base>|undefined} Collection of
|
* @return {ol.Collection.<ol.layer.Base>|undefined} Collection of
|
||||||
* {@link ol.layer.Layer layers} that are part of this group.
|
* {@link ol.layer.Layer layers} that are part of this group.
|
||||||
* @observable
|
* @observable
|
||||||
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.layer.Group.prototype.getLayers = function() {
|
ol.layer.Group.prototype.getLayers = function() {
|
||||||
return /** @type {ol.Collection.<ol.layer.Base>|undefined} */ (this.get(
|
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
|
* @param {ol.Collection.<ol.layer.Base>|undefined} layers Collection of
|
||||||
* {@link ol.layer.Layer layers} that are part of this group.
|
* {@link ol.layer.Layer layers} that are part of this group.
|
||||||
* @observable
|
* @observable
|
||||||
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.layer.Group.prototype.setLayers = function(layers) {
|
ol.layer.Group.prototype.setLayers = function(layers) {
|
||||||
this.set(ol.layer.GroupProperty.LAYERS, layers);
|
this.set(ol.layer.GroupProperty.LAYERS, layers);
|
||||||
|
|||||||
Reference in New Issue
Block a user