Skip to content

Feature Flags Explained

Feature flags control which UI elements are visible on the map.

The 11 Flags

FlagControls
showTextEntity name labels
showImagesEntity images
qrCodeQR code link
categoriesCategory browser widget
buildingLogoBuilding logo in corner
languageSwitcherLanguage dropdown
themeSwitcherLight/dark theme toggle
headerBarSearch bar widget
defaultPopupBuilt-in entity popup
floorsFloor switcher
zoomZoom controls

Presets

FULL — All flags true. Best for public-facing maps.

MINIMAL — All flags false. Best for embedded widgets where you control the UI.

javascript
import { FEATURE_FLAG_SETS } from '@mapsted/maps-js-api';

await mapsted.maps.init({
  element: '#map',
  features: FEATURE_FLAG_SETS.FULL
});

Dynamic Changes

javascript
// Hide the search bar after init
await mapsted.maps.setFeatureFlags({ headerBar: false });

// Show only floors and zoom
await mapsted.maps.setFeatureFlags({
  ...FEATURE_FLAG_SETS.MINIMAL,
  floors: true,
  zoom: true,
});

See also: Feature Flags Reference | Feature Flags Tutorial