Mappedin JS & React SDK v6.0.0-rc.1

Mappedin JS & React SDK v6.0.0-rc.1

September 9, 2025

This is the second release candidate for Mappedin JS v6 and the first release candidate for React SDK. Going forward, the versions of these SDKs will be synchronized. This version introduces significant breaking changes for both SDKs.

:warning: Breaking Changes

  • Renamed MapView.Images to MapView.Image3D and the Image class to Image3DView.
// ❌ Before
import { Image } from "@mappedin/mappedin-js";
const img: Image = mapView.Images.add(...);

// ✅ After
import { Image3DView } from "@mappedin/mappedin-js";
const img: Image3DView = mapView.Image3D.add(...);
  • MapData.Query.nearest() now returns a Promise and contains a number of new parameters and options.
// ❌ Before
const nearest = mapData.Query.nearest(
  point, // Origin point.
  {
    limit: 'same-floor', // Limit to same floor. Options: 'same-floor' | 'same-elevation'
    radius: 10, // Radius of search in meters.
    types: ['space', ...] // Array of types to query for.
  }
);

// ✅ After
const nearest = await mapData.Query.nearest(
  point, // Origin point.
  mapData.getByType('space'), // Array of elements to query for
  {
    limit: 'same-floor', // Search limit. Options: 'same-floor' | 'same-elevation'
    lineOfSight: 'auto', // Whether to ignore walls and other obstructions. Options: 'auto' | true | false
    mode: 'travel-distance', // The mode to use for the search. Options: 'travel-distance' | 'absolute-distance'
    maxDistance: 10, // Maximum distance to search in meters.
  }
);
  • The state returned from MapView.getState() now has all properties set to readonly.
// ❌ Before
const state = mapView.getState(space);
state.opacity = 0.5; // No error

// ✅ After
const state = mapView.getState(space);
state.opacity = 0.5; // Error
  • [React SDK] The onLoad callback has been removed. Instead, pass a ref to the component to access the instance.
// ❌ Before
<MapView onLoad={(mapView) => {}} />

<Label onLoad={(label) => {}} />

<Marker onLoad={(marker) => {}} />

<Model onLoad={(model) => {}} />

<Path onLoad={(path) => {}} />

<Shape onLoad={(shape) => {}} />

<Navigation onLoad={() => {}} />

// ✅ After
const mapViewRef = useRef();
<MapView ref={mapViewRef} />

const labelRef = useRef();
<Label ref={labelRef} />

const markerRef = useRef();
<Marker ref={markerRef} />

const modelRef = useRef();
<Model ref={modelRef} />

const pathRef = useRef();
<Path ref={pathRef} />

const shapeRef = useRef();
<Shape ref={shapeRef} />

<Navigation  /> // onLoad removed, no navigation instance to return
  • [React SDK] The useEvent() hook has been renamed to useMapViewEvent().
// ❌ Before
useEvent('click', event => {
  console.log(event);
});

// ✅ After
useMapViewEvent('click', event => {
  console.log(event);
});
  • [React SDK] @mappedin/mappedin-js is no longer re-exported from the React SDK. It is now listed as a peer dependency.
// ❌ Before
import Mappedin, { Label } from "@mappedin/react-sdk"
const [labels, setLabels] = useState<Mappedin.Label[]>([]);

return labels.map(label => (
  <Label key={label.id} target={label.target} text={label.text} />
));

// ✅ After
import { Label } from "@mappedin/react-sdk"
import { Label as LabelJS } from "@mappedin/mappedin-js"
const [labels, setLabels] = useState<LabelJS[]>([]);

return labels.map(label => (
  <Label key={label.id} target={label.target} text={label.text} />
));

Features

  • Added support for beveled edges on geometry.
  • Added coverImage, defaultFloor, and operationHours as properties of EnterpriseLocation.
  • Added verticalOffset as a state property for Path.
  • Added MapView.getVersion() to return the version of the SDK.
  • [React SDK] Added useMapDataEvent() hook.
  • [React SDK] Added <MapDataProvider> component.

Fixes

  • Fixed cases where interactions may become misaligned after the page is scrolled.
  • Fixed cases where building footprints were not being hidden.
  • Fixed MapView.getDirections() performance regression on v6.0.0-rc.0.
  • Fixed an issue where Labels were not showing on some browsers under strict CSP rules.
  • Fixed hydrateMapData() failing while offline.
  • Fixed hand-drawn navigation being smoothed.
  • Fixed an issue where excluding a one-to-many connection from directions would exclude all associated connections.
  • Fixed a performance regression when calling MapView.updateState() on geometry.
  • [React SDK] Fixed cleanup of MapView component and limited re-renders when props change.
  • [React SDK] Fixed cases where types showed mismatch errors despite being correct.