Closed moiatto closed 1 year ago
We use the the onMilestoneEvent in the Kurviger App, there is an arrival milestone, milestones are triggered for Banner Instructions (IIRC).
OK, do you mean milestone.getIdentifier()
?
There is a list of identifier values?
How you want to implement this is your decision, IIRC you have a custom converter from OSMDroid, so this depends on what you add there.
Ok. Thanks
We use the the onMilestoneEvent in the Kurviger App, there is an arrival milestone, milestones are triggered for Banner Instructions (IIRC).
I tried a lot but without success.
Can you tell me what's wrong?
// Custom Milestone for DESTINATION
navigation.addMilestone(new RouteMilestone.Builder()
.setIdentifier(200)
.setTrigger(Trigger.all(
Trigger.eq(TriggerProperty.LAST_LEG, TriggerProperty.TRUE),
Trigger.eq(TriggerProperty.LAST_STEP, TriggerProperty.TRUE)
))
.build());
// Custom Milestone for WAYPOINT
navigation.addMilestone(new StepMilestone.Builder()
.setIdentifier(100)
.setTrigger(Trigger.eq(TriggerProperty.LAST_STEP, TriggerProperty.TRUE))
.build());
I also tried new BannerInstructionMilestone.Builder()
but it always triggers
In
onMilestoneEvent
I can check when a waypoint is passed withremainingWaypoints()
.How can I check the Destination point? even just to stop navigation.