ReadonlyidUnique module identifier within the GeoLeaf instance.
The registry enforces uniqueness — registering two modules with the same
id throws a GeoLeafError. Use lowercase kebab-case.
ReadonlydependenciesIDs of modules that must be fully initialised before this module's
init() is called.
The registry resolves a topological order from these declarations. An empty array means this module has no dependencies.
Use as const in implementing classes for best type inference:
readonly dependencies = ['poi', 'ui'] as const;
Optional ReadonlyuiOptional UI slot declaration.
Declare this when the module contributes UI to the mobile toolbar pill
or the desktop filter panel. The registry collects all slots via
getUISlots() and passes them to the UI orchestrator.
Initialises the module.
Called by the registry after all declared dependencies are ready. Guaranteed postconditions at call time:
adapter.isReady() returns trueconfig.isLoaded() returns truedependencies have completed their init()Returning void (synchronous) is allowed for modules that do not
perform async work. The registry handles both with Promise.resolve().
Engine-agnostic map adapter (MapLibre).
Read-only configuration access.
Tears down the module and releases all resources.
Must remove every event listener, DOM node, and layer reference created
during init(). After destroy(), the module must be safe to garbage
collect.
Called by the registry in reverse dependency order (dependants are destroyed before their dependencies).
Lifecycle contract for a GeoLeaf module that participates in boot.
Modules are registered with
IModuleRegistry.register()and initialised in dependency order byIModuleRegistry.init(). Each module must implementinit()anddestroy(), and declare itsdependenciesso the registry can resolve the correct initialisation order.Dependency declaration rules:
idstring.GeoLeafErrorwith the full dependency cycle path in the message.⚠ Classes implement THIS interface, never the ICoreModule union — TypeScript's
implementsclause rejects union types.Example