Trip and Order Progress

FleetEngineTripLocationProvider class

google.maps.journeySharing.FleetEngineTripLocationProvider class

Trip location provider.

This class extends LocationProvider.

Requires the &libraries=journeySharing URL parameter. See Libraries in the Maps JavaScript API.

FleetEngineTripLocationProvider
FleetEngineTripLocationProvider(options)
Parameters: 
Creates a new location provider for a Fleet Engine trip.
tripId
Type:  string
The ID for the trip that this location provider observes. Set this field to begin tracking.
refresh
refresh()
Parameters:  None
Return Value:  void
Explicitly refreshes the tracked location.
Inherited: addListener
error
function(event)
Arguments: 
Event that is triggered when the location provider encounters an error.
update
function(event)
Event that is triggered when a Fleet Engine data update request has finished.

FleetEngineTripLocationProviderOptions interface

google.maps.journeySharing.FleetEngineTripLocationProviderOptions interface

Options for trip location provider.

Requires the &libraries=journeySharing URL parameter. See Libraries in the Maps JavaScript API.

authTokenFetcher
Provides JSON Web Tokens for authenticating the client to Fleet Engine.
projectId
Type:  string
The consumer's project ID from Google Cloud Console.
tripId
Type:  string
The trip ID to track initially.
pollingIntervalMillis optional
Type:  number optional
Minimum time between fetching location updates in milliseconds. If it takes longer than pollingIntervalMillis to fetch a location update, the next location update is not started until the current one finishes.

Setting this value to 0 disables recurring location updates. A new location update is fetched if any of the parameters observed by the location provider changes.

The default polling interval is 5000 milliseconds, the minimum interval. If you set the polling interval to a lower non-zero value, 5000 is used.

FleetEngineTripLocationProviderUpdateEvent interface

google.maps.journeySharing.FleetEngineTripLocationProviderUpdateEvent interface

Event object returned by the trip location provider's update event.

Requires the &libraries=journeySharing URL parameter. See Libraries in the Maps JavaScript API.

trip optional
Type:  Trip optional
The trip structure returned by the update. Unmodifiable.