We love events! They allow us to decouple many application components in a structured way.
In the UI, application-level events all happen asynchronously using the event bus. You can add handler functions to the bus for specific event types, and you can fire events.
Many events have a layer parameter object, which looks like this:
{id, name, source, type}
Where id
is the layer id, name
is the scientific name, source
is the layer source, and type
is the layer type.
Event type | Description | Params |
layer-toggle | Fired when a map layer visibility is turned on or off. | showing (boolean) | layer |
layer-zoom-extent | Fired when a map layer should be zoomed to its full extent. | layer |