Fleet Tracking

FleetEngineDeliveryVehicleLocationProvider class

google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProvider class

Delivery Vehicle Location Provider.

This class extends LocationProvider.

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

FleetEngineDeliveryVehicleLocationProvider
FleetEngineDeliveryVehicleLocationProvider(options)
Parameters: 
Creates a new location provider for a Fleet Engine delivery vehicle.
deliveryVehicleId
Type:  string
ID for the vehicle that this location provider observes. Set this field to track a vehicle.
shouldShowOutcomeLocations
Type:  boolean optional
Optionally allow users to display the task's outcome location.
shouldShowTasks
Type:  boolean optional
Optionally allow users to display fetched tasks.
staleLocationThresholdMillis
Type:  number
This Field is read-only. Threshold for stale vehicle location. If the last updated location for the vehicle is older than this threshold, the vehicle will not be displayed.
taskFilterOptions
Returns the filter options to apply when fetching tasks.
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.

FleetEngineDeliveryVehicleLocationProviderOptions interface

google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProviderOptions interface

Options for delivery vehicle 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.
deliveryVehicleId optional
Type:  string optional
The delivery vehicle 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.

shouldShowOutcomeLocations optional
Type:  boolean optional
Boolean to show or hide outcome locations for the fetched tasks.
shouldShowTasks optional
Type:  boolean optional
Boolean to show or hide tasks. Setting this to false will prevent the ListTasks endpoint from being called to fetch the tasks. Only the upcoming vehicle stops will be displayed.
staleLocationThresholdMillis optional
Type:  number optional
Threshold for stale vehicle location. If the last updated location for the vehicle is older this threshold, the vehicle will not be displayed. Defaults to 24 hours in milliseconds. If the threshold is less than 0, or Infinity, the threshold will be ignored and the vehicle location will not be considered stale.
taskFilterOptions optional
Filter options to apply when fetching tasks. The options can include specific vehicle, time, and task status.

FleetEngineDeliveryVehicleFilterOptions interface

google.maps.journeySharing.FleetEngineDeliveryVehicleFilterOptions interface

Options for filtering for delivery vehicles

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

requiredAttributes optional
Type:  Object<string, string> optional
Custom attributes that the delivery vehicles must have. Values must be strings or an error will be generated.

FleetEngineTaskFilterOptions interface

google.maps.journeySharing.FleetEngineTaskFilterOptions interface

Filtering options for tasks in the Delivery Vehicle Location Provider.

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

completionTimeFrom optional
Type:  Date optional
Exclusive lower bound for the completion time of the task. Used to filter for tasks that were completed after the specified time.
completionTimeTo optional
Type:  Date optional
Exclusive upper bound for the completion time of the task. Used to filter for tasks that were completed before the specified time.
state optional
Type:  string optional
The state of the task. Valid values are OPEN or CLOSED.

FleetEngineDeliveryVehicleLocationProviderUpdateEvent interface

google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProviderUpdateEvent interface

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

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

completedVehicleJourneySegments optional
Type:  Array<VehicleJourneySegment> optional
The journey segments that have been completed by this vehicle. Unmodifiable.
deliveryVehicle optional
Type:  DeliveryVehicle optional
The delivery vehicle data structure returned by the update. Unmodifiable.
tasks optional
Type:  Array<Task> optional
The list of tasks served by this delivery vehicle. Unmodifiable.

FleetEngineDeliveryFleetLocationProvider class

google.maps.journeySharing.FleetEngineDeliveryFleetLocationProvider class

Delivery Fleet Location Provider.

This class extends LocationProvider.

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

FleetEngineDeliveryFleetLocationProvider
FleetEngineDeliveryFleetLocationProvider(options)
Parameters: 
Creates a new location provider for vehicles tracked by Fleet Engine.
deliveryVehicleFilterOptions
The filter options to apply when fetching the delivery vehicles.
locationRestriction
The bounds to which the delivery vehicle locations will be limited. Set this field to limit the vehicles shown to the specified bounds. If no bounds are set, all delivery vehicles will be shown.
pollingIntervalMillis
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.

staleLocationThresholdMillis
Type:  number
This Field is read-only. Threshold for stale vehicle location. If the last updated location for the vehicle is older than this threshold, the vehicle will not be displayed.
Inherited: addListener
update
function(event)
Event that is triggered when a Fleet Engine data update request has finished.

FleetEngineDeliveryFleetLocationProviderOptions interface

google.maps.journeySharing.FleetEngineDeliveryFleetLocationProviderOptions interface

Options for delivery fleet 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.
deliveryVehicleFilterOptions optional
Filter options to apply when fetching the delivery vehicles.
locationRestriction optional
A filter to limit the queries to be within the given latitude/longitude bounds. If no bounds are specified, all delivery vehicles will be displayed.
staleLocationThresholdMillis optional
Type:  number optional
Threshold for stale vehicle location. If the last updated location for the vehicle is older this threshold, the vehicle will not be displayed. Defaults to 24 hours in milliseconds. If the threshold is less than zero, or Infinity, the threshold will be ignored and the vehicle location will not be considered stale.

FleetEngineDeliveryFleetLocationProviderUpdateEvent interface

google.maps.journeySharing.FleetEngineDeliveryFleetLocationProviderUpdateEvent interface

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

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

deliveryVehicles optional
Type:  Array<DeliveryVehicle> optional
The list of delivery vehicles returned by the query. Unmodifiable.