Mappedin JS, React & React Native SDK v6.22.0

Mappedin JS

Features

  • Added Navigation.markers to expose the navigation markers drawn for a route (departure and destination pins plus a marker at each connection), so they can be controlled with updateState the same way as other map objects. Each entry is a TNavigationMarker ({ marker, type }), where type is a TNavigationMarkerType of 'departure', 'destination', or 'connection'. This makes it possible to hide navigation markers that are not on the current floor.
for (const { marker } of mapView.Navigation.markers) {

const onCurrentFloor = marker.coordinate.floorId === mapView.currentFloor?.id;

mapView.updateState(marker, { enabled: onCurrentFloor });

}

  • Added interactive to the Path state, so it can now be read with getState() and toggled with updateState() in addition to being set when the Path is created. Previously it could only be set via Paths.add().
const path = mapView.Paths.add(coordinates, { interactive: true });

const { interactive } = mapView.getState(path); // true

mapView.updateState(path, { interactive: false });

Performance

  • Improved rendering performance during multi-floor navigation by no longer drawing floor geometry that is hidden beneath an opaque floor.

Fixes

  • Fixed a crash in Navigation.draw() and Navigation.drawSync() when drawing directions between two overlapping Spaces that share a navigation node. Drawing such a zero-length route is now a safe no-op with a warning instead of throwing.
  • Fixed an issue where the Promise returned by Camera.focusOn() and Camera.animateTo() would never resolve when the animation was cancelled, such as by a mouse-wheel zoom or a call to Camera.cancelAnimation().
  • Fixed an issue where the geometry-in-focus event would fire on every camera movement even when the set of focused geometry had not changed.
  • Fixed an issue where adding more than 100 Models that share the same GLB URL on a single floor would break tracking of the first 100, causing them to become untracked and removing others to clear the entire batch.
  • Fixed an issue where Space.center was inaccurate for maps loaded from MVFv3 data. Centers are now calculated by area centroid to match maps loaded from MVFv2 data.
  • Fixed an issue where Maker maps hydrated without credentials could be misclassified as enterprise maps, producing longer, unsmoothed directions.
  • Fixed an issue where PathSegment properties such as isConnectionSegment and distance were lost when a Path was serialized.

Mappedin SDK for React Native

  • Upgraded @mappedin/mappedin-js to v6.22.0.

Fixes

  • Fixed an issue where the SDK could fail to load on Hermes versions older than 0.74 by adding an atob polyfill.