· 1 min read
Mappedin Android SDK v3 to v4 Migration Guide
On November 22, 2021 we released the Mappedin Android SDK v4. This short migration guide explains the steps needed to migrate from version 3.
- Mappedin Android SDK is available from https://mvnrepository.com/artifact/com.mappedin.sdk/mappedin
- API reference can be found at https://developer.mappedin.com/docs/android/latest/mappedin/
// before:mapView.labelAllLocations(MPIOptions.LegacyLabelAllLocations(color = "red"))// after:mapView.labelAllLocations(MPIOptions.FlatLabelAllLocations(MPIOptions.FlatLabelAppearance(color = "red")))
// before:mapView.labelAllLocations(MPIOptions.LabelAllLocations(appearance = MPIOptions.LabelAppearance.lightOnDark))// after:mapView.labelAllLocations(MPIOptions.FloatingLabelAllLocations(appearance = MPIOptions.FloatingLabelAppearance.lightOnDark))
Additionally, Floating Label marker default size has been reduced slightly.
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.