This worker sets the publisher's estimated arrival time based on the current time + the expected route duration.
This work is posted by the publisher when the destination is set (setDestination in android's publisher). We kind of have that method in Swift, but it's a bit spread out, so it may be worth a refactor.
The setDestination method on the publisher:
Takes two arguments: the destination and the publisher properties.
Otherwise, remove the current destination of the publisher and set it to the destination provided to the method. Mapbox is then instructed to set a route to that destination and, on success DestinationSet work is posted.
This method is called by the following workers:
ChangeRoutingProfile
SetActiveTrackable
When looking into this, we should also investigate how to “set a route” on mapbox, as this is something we’re doing in Android but don’t appear to be doing in iOS. We’re adding some extra buffer to our estimations to account for this.
Implement the following worker from android:
This worker sets the publisher's estimated arrival time based on the current time + the expected route duration.
This work is posted by the publisher when the destination is set (
setDestination
in android's publisher). We kind of have that method in Swift, but it's a bit spread out, so it may be worth a refactor.The setDestination method on the publisher:
DestinationSet
work is posted.This method is called by the following workers:
When looking into this, we should also investigate how to “set a route” on mapbox, as this is something we’re doing in Android but don’t appear to be doing in iOS. We’re adding some extra buffer to our estimations to account for this.