addMilestone

fun addMilestone(milestone: Milestone)

Navigation Milestones provide a powerful way to give your user instructions at custom defined locations along their route. Default milestones are automatically added unless MapLibreNavigationOptions.defaultMilestonesEnabled is set to false but they can also be individually removed using the .removeMilestone API. Once a custom milestone is built, it will need to be passed into the navigation SDK through this method.

Milestones can only be added once and must be removed and added back if any changes are desired.

Since

0.4.0

Parameters

milestone

a custom built milestone