Mappedin Logo

Developer

· 1 min read

Mappedin iOS SDK v3 to v4 Migration Guide

profile picture for Jere Suikkila

Jere Suikkila

Developer Evangelist

On November 22, 2021 we released the Mappedin iOS SDK v4. This short migration guide explains the steps needed to migrate from version 3.

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.

Search Our Docs

Sign Up

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