Appearance
v3 Legacy API Reference
Archived summary. For the full auto-generated v3 TypeDoc tree (14 interfaces + 3 enums + 21 functions), see /reference/typedoc/ — ported byte-for-byte from the original
mapi.mapsted.com/v3.0.0/docs/.
This page is a hand-written summary of the v3 public surface for quick lookup.
Loading
v3 shipped two ways. mapi.mapsted.com keeps serving v3.0.0 directly, so these <script> tags continue to work with no changes required:
CDN (IIFE global mapsted):
html
<script src="https://mapi.mapsted.com/v3.0.0/maps.js?id=603"></script>
<script>
mapsted.maps.initialize({ element: document.getElementById('map') });
</script>npm — the current @mapsted/maps-js-api package preserves the v3 surface (including initialize), so v3 code continues to work when imported from it:
ts
import * as maps from '@mapsted/maps-js-api';
maps.initialize({ element: document.getElementById('map'), mapsDomain: 'https://maps.mapsted.com' });21 public functions
| Group | Function | Notes |
|---|---|---|
| Lifecycle | initialize(options) | Synchronous void return. Use the current init() instead — returns Promise<MapInstance>. |
| Lifecycle | set(options) | Public alias for the internal setOptions(). Use the current init() instead. |
| Data | setEntityData(data) | Unchanged in 4.0.1. |
| Data | setEntityDataById(id, data) | Unchanged in 4.0.1. |
| Data | setEntityDefaults(defaults) | Unchanged in 4.0.1. |
| Data | setCoordsData(data) | Unchanged in 4.0.1. |
| Selection | selectEntity(entityId, options?) | Unchanged in 4.0.1. |
| Features | setFeatureFlags(config) | Unchanged in 4.0.1. |
| Navigation | changeFloorById(floorId) | Renamed navigateToFloorById in 4.0.1. |
| Navigation | changeFloorByName(floorName) | Renamed navigateToFloorByName in 4.0.1. |
| Navigation | getFloors() | Unchanged in 4.0.1. |
| Routing | createBoostSelect(...) | Unchanged in 4.0.1. |
| Routing | createBoostRouting(...) | Unchanged in 4.0.1. |
| Routing | applyBoost(boost) | Unchanged in 4.0.1. |
| Routing | setDefaultCustomRoutingConfig(cfg) | Renamed setDefaultRoutingConfig in 4.0.1. |
| Routing | calculateDistance(request) | Unchanged in 4.0.1. |
| Overlays | setMapOverlayMarkers(markers) | Unchanged in 4.0.1. |
| Overlays | centerOnMapoverlay(id) | Renamed centerOnMapOverlay (casing fix) in 4.0.1. |
| Idle | setIdleTime(ms) | Unchanged in 4.0.1. |
| Viewport | setMapView(view) | Renamed setViewport in 4.0.1. |
| Locale | changeLanguage(code) | Renamed setLanguage in 4.0.1. |
Events
v3 used DOM-style event listeners:
ts
mapsted.maps.addEventListener('select', (event) => {
console.log(event.detail);
});
mapsted.maps.removeEventListener('select', handler);4.0.1 introduces typed on/off/once with discriminated overloads. v3 names still work in 4.0.1 via the shim.
Constants (v3 public exports)
PARENT_ACTION(enum) — still public in 4.0.1.CHILD_ACTION(enum) — still public in 4.0.1.PRIVATE_CHILD_ACTION(enum) — removed from public exports in 4.0.1 (CHL-27 security review).FEATURE_FLAG_SETS(constant) — still public in 4.0.1.
Interfaces
See /reference/typedoc/ for the full TypeDoc tree. All 14 v3 interfaces carry forward into 4.0.1 unchanged:
CalculationRequest, CalculationResult, CoordinateData, DefaultCustomRoutingConfig, EntityData, FeatureFlagSet, FloorBoost, HighlightStyle, initializeOptions, Location, MapOverlayData, RoutingBoost, SelectEntityBoost, SetOptions.
4.0.1 adds 13 more: FloorInfo, InitOptions, KnownEventPayload, MapInstance, MapState, NavigationData, OriginValidationResult, PostMessagePayloadShape, PromotionData, ProtocolErrorPayload, SanitisationResult, SecurityConfig, SelectOptions.
Enums
All 3 v3 enums carry into 4.0.1 unchanged: ActionTypes, Loader, RouteOptions.
See also: v3 overview | v3 changelog | Full v3 TypeDoc | Current API (4.0.1)