The module's configuration type.
The type of data passed to show(). Use never for
modules that have no show method.
The module's configuration type.
The type of data passed to show(). Use never for
modules that have no show method.
Remove all handlers for the given event type at once.
Prefer the unsubscribe function returned by on when you need to remove a
single handler. Use off for bulk teardown — e.g. when unmounting a component that
registered multiple handlers.
The event type whose handlers should all be cleared.
Subscribe to config-change events.
The handler is called with the module's full current configuration immediately after
any mutation — whether through applyConfig, a module-specific setter, or resetConfig.
'config-change'
Receives the module's config (or undefined when config is cleared).
An unsubscribe function. Call it to remove only this handler without affecting other registered handlers for the same event type.
Subscribe to shown-features events.
The handler is called immediately after a module's show() method (or equivalent)
has updated the map with new data. Only available on modules that have a show method.
'shown-features'
Receives the data that was passed to show().
An unsubscribe function. Call it to remove only this handler without affecting other registered handlers for the same event type.
Lifecycle event module for map modules.
Provides a unified API for subscribing to module-level events that are not tied to user interaction with map features. Two event types are supported:
config-change: emitted whenever the module's configuration is updated (viaapplyConfig,resetConfig, or any module-specific setter that mutates config).shown-features: emitted by modules that have ashowmethod, immediately after features are displayed on the map.Each
on()call returns an unsubscribe function so individual handlers can be removed without clearing the entire listener list.Example