· 1 min read
Mappedin iOS SDK v3 to v4 Migration Guide
On November 22, 2021 we released the Mappedin iOS SDK v4. This short migration guide explains the steps needed to migrate from version 3.
- Mappedin iOS SDK is available from CocoaPods
- API reference can be found at https://developer.mappedin.com/docs/ios/latest
// before:mapView?.labelAllLocations(options: MPIOptions.LegacyLabelAllLocations(appearance: MPIOptions.LegacyLabelAppearance(color: "red")))// aftermapView?.labelAllLocations(options: MPIOptions.FlatLabelAllLocations(appearance: 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.