addMilestoneEventListener

This adds a new milestone event listener which is invoked when a milestone gets triggered. If more then one milestone gets triggered on a location update, each milestone event listener will be invoked for each of those milestones. This is important to consider if you are using voice instructions since this would cause multiple instructions to be said at once. Ideally the milestones setup should avoid triggering too close to each other.

It is not possible to add the same listener implementation more then once and a warning will be printed in the log if attempted.

Since

0.4.0

Parameters

milestoneEventListener

an implementation of MilestoneEventListener which hasn't already been added

See also