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
- See the API reference for more details
Flat labels
// before:mapView?.labelAllLocations( options: MPIOptions.LegacyLabelAllLocations( appearance: MPIOptions.LegacyLabelAppearance(color: "red")))
// after:mapView?.labelAllLocations( options: MPIOptions.FlatLabelAllLocations( appearance: MPIOptions.FlatLabelAppearance(color: "red")))
Floating labels
// 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.
Path width
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.