Appearance
API Reference
Complete reference material for @mapsted/maps-js-web@26.7.1 (latest release).
The API surface is documented across two complementary layers — curated pages that explain semantics, defaults, and runtime behaviour, and the generated TypeScript reference that lists every export with exact signatures.
Curated reference
Hand-written pages covering the configuration shapes, event payloads, error semantics, and runtime behaviour that are not derivable from type signatures alone:
| Page | Purpose |
|---|---|
InitOptions | Every field on the configuration object passed to init(), with defaults, CDN-vs-npm differences, and validation rules. |
| Events | The 20 canonical events exposed by the API, payload shapes, firing semantics, and subscription patterns. |
| Types | Re-usable type aliases (MapEntity, LocationData, MultiLangString, etc.) and how to import them. |
| Feature Flags | All 11 feature flags, defaults, presets, and runtime override patterns. |
| Error Codes | Every MAPSTED-1xxx code, recoverable flag, root cause, and resolution. |
| Changelog | Release-by-release additions, deprecations, and migration notes. |
| Compatibility | Browser, framework, and platform support matrix. |
Generated TypeScript reference
The full set of exported symbols, derived directly from the source via TypeDoc — always in sync with the published dist/ types:
| Section | Count | Link |
|---|---|---|
| Functions | 60 | Functions index |
| Interfaces | 30 | Interfaces index |
| Type Aliases | 18 | Type Aliases index |
| Classes | 1 | Classes index |
| Enumerations | 3 | Enumerations index |
| Variables | 4 | Variables index |
Browse the full generated reference →
Conventions
- Lifecycle gate — All API calls except
init(),destroy(),isReady(),subscribe(),on(),off(), andonce()require the API to be in theREADYstate. Calling them earlier throwsMAPSTED-1090. - Return types — Most methods return a
Promise. Subscription helpers (subscribe,on,off,once) and factory helpers (createBoostSelect,createBoostRouting) are synchronous. - Errors — All thrown errors are structured
MapstedErrorinstances carrying aMAPSTED-1xxxcode, a human-readable message, and arecoverableflag.
Related
- Tutorials — step-by-step walkthroughs for common integration paths.
- Guide — how-to recipes and architectural explanations.
- Migrating from V2 or V3 — version-upgrade guides.