Skip to content

Accessibility mode

The map supports an accessibility mode that biases wayfinding toward accessible routes (elevators over stairs/escalators, step-free paths). This is relevant for public-venue and enterprise deployments with accessibility obligations.

Toggle accessibility mode

setAccessibilityMode(enabled) turns accessible routing on or off. It is async — await it (or handle the Promise).

ts
import { setAccessibilityMode } from '@mapsted/maps-js-api';

// Prefer accessible routes (elevators, step-free paths)
await setAccessibilityMode(true);

// Back to default routing
await setAccessibilityMode(false);

When enabled, subsequently calculated routes prefer accessible connections between floors and avoid stairs/escalators where an accessible alternative exists.

React to changes

The accessibilityChange event fires when the mode changes — useful for keeping your own UI toggle in sync if the map's UI also exposes the control.

ts
import { on } from '@mapsted/maps-js-api';

on('accessibilityChange', ({ enabled }) => {
  console.log('accessibility mode is now', enabled);
});

Wire a visible, labelled toggle in your host UI and reflect the accessibilityChange state so keyboard and screen-reader users can control it.