# Class: GroupEvent

This documentation is for OpenLayers v10.9.0. The latest is v.

## ol/layer/Group.GroupEvent

A layer group triggers 'addlayer' and 'removelayer' events when layers are added to or removed from the group or one of its child groups. When a layer group is added to or removed from another layer group, a single event will be triggered (instead of one per layer in the group added or removed).

### Extends

- BaseEvent

### Members

#### layer{BaseLayer}

  The added or removed layer.

#### target{Object}

  The event target.

#### type{string}

  The event type.

### Methods

#### preventDefault() inherited

events/Event.js, line 50

  Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events will be fired.

#### stopPropagation() inherited

events/Event.js, line 58

  Stop event propagation.

### Events

#### addlayer

layer/Group.js, line 20

  Triggered when a layer is added

#### change inherited

events/EventType.js, line 10

  Generic change event. Triggered when the revision counter is increased.

#### error inherited

events/EventType.js, line 17

  Generic error event. Triggered when an error occurs.

#### removelayer

layer/Group.js, line 26

  Triggered when a layer is removed