-
- All Implemented Interfaces:
-
com.pointrlabs.core.management.PTRListener
,com.pointrlabs.core.map.models.events_listeners.PathUpdatesEventsListener
public class PathUpdatesEventHandler implements PathUpdatesEventsListener
-
-
Constructor Summary
Constructors Constructor Description PathUpdatesEventHandler(PTRMapWidgetFragment mapWidget)
-
Method Summary
Modifier and Type Method Description Unit
onPathSession(PathSession pathSession, Path calculatedPath)
This function is triggered every time there is a path update. Unit
onPathSession(PathSession pathSession, PathSessionState state)
This function is triggered every time there is a change on the Path Session state. Unit
onLiveDirectionUpdate(PathSession pathSession, LiveDirection liveDirection)
This callback is triggered every time the latest live direction is updated. -
-
Constructor Detail
-
PathUpdatesEventHandler
PathUpdatesEventHandler(PTRMapWidgetFragment mapWidget)
-
-
Method Detail
-
onPathSession
Unit onPathSession(PathSession pathSession, Path calculatedPath)
This function is triggered every time there is a path update. The default behavior is to set the com.pointrlabs.core.map.views.PTRMapFragment.currentPath.
- Parameters:
pathSession
- The path session that triggers the update.
-
onPathSession
Unit onPathSession(PathSession pathSession, PathSessionState state)
This function is triggered every time there is a change on the Path Session state. The default behavior is to alter PTRMapWidgetFragment components to be prepared for pathfinding and adjust tracking mode.
- Parameters:
pathSession
- The path session that triggered the event.state
- The new state.
-
onLiveDirectionUpdate
Unit onLiveDirectionUpdate(PathSession pathSession, LiveDirection liveDirection)
This callback is triggered every time the latest live direction is updated. We use it to modify the RouteHeaderView with the retrieved LiveDirection object which shows the user the next direction they need to take.
- Parameters:
pathSession
- The path session that triggered the event.liveDirection
- The live direction the user needs to take
-
-
-
-