Skip to content

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

GroupFunctionNotes
Lifecycleinitialize(options)Synchronous void return. Use the current init() instead — returns Promise<MapInstance>.
Lifecycleset(options)Public alias for the internal setOptions(). Use the current init() instead.
DatasetEntityData(data)Unchanged in 4.0.1.
DatasetEntityDataById(id, data)Unchanged in 4.0.1.
DatasetEntityDefaults(defaults)Unchanged in 4.0.1.
DatasetCoordsData(data)Unchanged in 4.0.1.
SelectionselectEntity(entityId, options?)Unchanged in 4.0.1.
FeaturessetFeatureFlags(config)Unchanged in 4.0.1.
NavigationchangeFloorById(floorId)Renamed navigateToFloorById in 4.0.1.
NavigationchangeFloorByName(floorName)Renamed navigateToFloorByName in 4.0.1.
NavigationgetFloors()Unchanged in 4.0.1.
RoutingcreateBoostSelect(...)Unchanged in 4.0.1.
RoutingcreateBoostRouting(...)Unchanged in 4.0.1.
RoutingapplyBoost(boost)Unchanged in 4.0.1.
RoutingsetDefaultCustomRoutingConfig(cfg)Renamed setDefaultRoutingConfig in 4.0.1.
RoutingcalculateDistance(request)Unchanged in 4.0.1.
OverlayssetMapOverlayMarkers(markers)Unchanged in 4.0.1.
OverlayscenterOnMapoverlay(id)Renamed centerOnMapOverlay (casing fix) in 4.0.1.
IdlesetIdleTime(ms)Unchanged in 4.0.1.
ViewportsetMapView(view)Renamed setViewport in 4.0.1.
LocalechangeLanguage(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)