Skip to content

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:

PagePurpose
InitOptionsEvery field on the configuration object passed to init(), with defaults, CDN-vs-npm differences, and validation rules.
EventsThe 20 canonical events exposed by the API, payload shapes, firing semantics, and subscription patterns.
TypesRe-usable type aliases (MapEntity, LocationData, MultiLangString, etc.) and how to import them.
Feature FlagsAll 11 feature flags, defaults, presets, and runtime override patterns.
Error CodesEvery MAPSTED-1xxx code, recoverable flag, root cause, and resolution.
ChangelogRelease-by-release additions, deprecations, and migration notes.
CompatibilityBrowser, 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:

SectionCountLink
Functions60Functions index
Interfaces30Interfaces index
Type Aliases18Type Aliases index
Classes1Classes index
Enumerations3Enumerations index
Variables4Variables index

Browse the full generated reference →

Conventions

  • Lifecycle gate — All API calls except init(), destroy(), isReady(), subscribe(), on(), off(), and once() require the API to be in the READY state. Calling them earlier throws MAPSTED-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 MapstedError instances carrying a MAPSTED-1xxx code, a human-readable message, and a recoverable flag.