Trip Viewer
Contents
When you plan a trip, the Trip Management service includes in its response a url
field, with a link to a web page titled “Trip Viewer.” Trip Viewer displays a map and details for the planned trip. It updates as the trip progresses, tracking things including:
- The driver’s current location.
- Planned and actual arrival and departure times, as well as the stop duration, for each stop in the trip.
- ETA alerts when a vehicle is expected to miss an estimated arrival time window for a stop.
- Out-of-Corridor alerts when a driver deviates from the planned route beyond a predetermined mileage threshold. (1 mile is the default.)
The map can also display the current weather radar, real-time traffic, and points of interest (like food and fuel).
Each Trip Viewer page is available for 6 hours after requesting the URL. During that time, the page refreshes in your browser with real-time GPS pings from the driver’s location. If the trip is modified or its status changes, you need to refresh your browser to load the updated trip information.
If the page expires, you can reload it either by:
- Calling GET Trip Viewer URL. This simply returns a URL to view the trip.
- Calling Get Trip or Recalculate Trip. Those endpoints return updated links to the trip, among other trip details.
For post-trip analysis, you can also call Get Trip to view a completed or canceled trip at any time within a year after the trip was planned.
Example Trip Viewer URL
"url": "https://tripmanagement.alk.com/trip-viewer/token/ejvhhgguyf45m7tbdcgubmpsixfh5a3tycj3yci3ep/details/96301560?region=NA"
Trip Viewer
The main elements of a Trip Viewer page are described below.
The Map
The Trip Viewer map details the route, the driver’s location, and any alerts triggered by the driver.
Map Icons
Weather and Traffic
The map layers button turns on or off the display of the current weather radar, real-time traffic, and points of interest (like food and fuel).
Follow Driver
The Follow Driver button zooms the maps to the driver’s last reported location.
Event notifications
If any ETA or Out-of-Corridor alerts occur during the trip, pop-up messages will appear on the map. Out-of-Corridor alerts appear when the driver has left or rejoined the route corridor.
Timeline and Trip Details
Below the map, a timeline displays the progress of the trip, using the same icons as seen on the map. Each stop and waypoint on the trip are also described in detail and updated throughout the trip.
- The address of the work stop, rest stop, or waypoint.
- The status of the stop – open, arrived, completed, or canceled.
- The estimated or actual arrival time at the stop.
- The arrival time window in the planned trip, which is used to trigger ETA notifications.
- The estimated or actual departure time from the stop.
- The estimated or actual stop duration.
Current, Initial, and Latest Route Information
The Route Layers menu allows you to display one of three versions of the route (Current, Latest, and Initial) on the map. Toggling between these layers can help you better understand how a route has changed from the initial plan.
Current Route
The Current Route is the existing Trip Viewer route that updates in real time as a trip is modified, recalculated, or changed. The Current Route is always the latest route path from the origin to the destination.
Initial Route
The Initial Route is the route saved at the time a trip is transitioned from a Planned
state to InProgress
. It shows the starting route path free of any deviations that come about during execution. For example, if there was a closure or traffic issue at the start of a trip—the resulting route path is retained. This allows you at the end of a trip to see the difference between what was initially suggested versus what was executed.
Latest Route
The Latest Route is the route path from the driver’s current location to the end of the route. This is particularly helpful if the driver is out of route or stopping somewhere not in the plan as the suggested path of returning to the planned route will also be returned. The difference between Current Route and Latest Route is that the Current Route only considers stops and not the driver’s location.