Mappedin Logo

Developer

· 1 min read

React Native SDK v4 Migration guide

profile picture for Jere Suikkila

Jere Suikkila

Developer Evangelist

On November 22, 2021 we released v4 of Mappedin React Native SDK. This migration guide explains what changes between v3 and new v4.

Camera

  • CameraControls such as tilt and rotation are now found under Camera
  • CameraControls.setRotation > CameraControls.set({ rotation: Math.PI })
  • CameraControls.setTilt > CameraControls.set({ tilt: 0 })
  • setSafeArea is now Camera.setSafeAreaInsets

BlueDot

  • BlueDotState removed, use the event callbacks instead

Path widths

When calculating path widths, we previously used scaled units. In v4 these are set in meters. The default nearRadius value in PathOptions has been changed from 20 to 1.8. Correspondingly the farRadius is now 2.3 * nearRadius by default. These values are approximately the same, however some variation may occur depending on the venue scale. oldNearRadiusInMetres = 20 * map.scale will give you the exact value to use with v4 to keep the path width identical.

The default for drawing a path was changed so that the path pulse fires only once and the animation takes longer. To keep the previous infinite pulse behavior you can set pulseIterations: Infinite.

Search Our Docs

Sign Up

© 2020 Copyright Mappedin, All Rights Reserved. View our Privacy Policy