Appearance
Mapsted Maps JavaScript API v3 — Legacy Documentation
Archived. These pages are preserved for customers migrating off v3. The current supported release is
26.7.1. Start at the current release.
Status
| Aspect | State |
|---|---|
| v3 support | Deprecated. Final release 3.0.0 remains on CDN at mapi.mapsted.com/v3.0.0/maps.js — mapi.mapsted.com keeps serving it directly, so existing v3 integrations keep working with no action required. Security patches at Mapsted's discretion; sunset date to be announced. |
| Last v3 build | v3.0.0 on the maps.js CDN (/v3.0.0/maps.js?id=<propertyId>) |
| Current release | 26.7.1. Adds MapstedError, origin-validated postMessage, on/off/once typed events, async init() → MapInstance, setAccessibilityMode, getState/subscribe. |
| Deprecation window | v3 method aliases (initialize, changeFloorById, addEventListener, setMapView, centerOnMapoverlay casing, setDefaultCustomRoutingConfig, changeLanguage, removeEventListener) remain in the current runtime shim. Aliases log console.warn on first call and will be removed in a future major release. |
What this section contains
| Page | For |
|---|---|
| Migrating to 26.7.1 | Start here if you are upgrading a v3 integration to 26.7.1. Focused shorter doc — only covers the v3 → 26.7.1 deltas (10 renames + MapstedError + SecurityConfig + typed events). |
| v3 legacy API reference | Historical v3 public surface summary — 21 functions + 14 interfaces + 3 enums + 1 constant, extracted from the v3.0.0 TypeDoc bundle shipped alongside the CDN build. |
| v3 changelog | v3's release notes (v2 → v3 ground-up rewrite). |
| v3 TypeDoc — full API reference | Original auto-generated TypeDoc tree, ported byte-for-byte from mapi.mapsted.com/v3.0.0/docs/. Renders as the v3 TypeDoc site, not inside VitePress chrome. |
What v3 offered
v3 (3.x, release 3.0.0) was the ground-up TypeScript rewrite of v2. It published to npm as mapsted.maps and shipped four build formats (ESM + CJS + IIFE + .d.ts) via tsup. Key capabilities:
- Full TypeScript types +
.d.tsdeclarations for IntelliSense mapsted.mapsnpm package + CDN IIFE bundle- v2's 21-method public API preserved with identical names (
initialize,changeFloorById,addEventListener, etc.) - Migration shim (
v2 → v3aliases) — at v3 this shim was a no-op since names hadn't changed; it was the scaffolding the current release later used to preserve v3 names. - Added
PRIVATE_CHILD_ACTIONconstant (removed in26.7.1per CHL-27)
v3 did not have:
- Structured error codes /
MapstedErrorclass (added in26.7.1) - Origin-validated postMessage layer (added in
26.7.1— v3 usedpostMessage(..., '*')everywhere) - Typed event API with discriminated overloads (
on/off/onceadded in26.7.1; v3 used DOM-styleaddEventListener/removeEventListener) - State subscription API (
getState/subscribeadded in26.7.1) - Accessibility mode (
setAccessibilityModeadded in26.7.1)
Recommended next step
- If you are still on v3 and need to operate the deployment you have, read the v3 legacy API reference or the original TypeDoc tree. Your existing
<script>tags keep working —mapi.mapsted.comservesv3.0.0directly. - If you are upgrading to 26.7.1, read the migration guide, then go to Embed your first map for the
26.7.1starter. - If you are new to Mapsted Maps, ignore this
/v3/tree entirely — start at the current release.