FleetEngineShipmentLocationProvider class
google.maps.journeySharing.FleetEngineShipmentLocationProvider
class
Shipment location provider.
This class extends
PollingLocationProvider.
Access by calling const {FleetEngineShipmentLocationProvider} = await google.maps.importLibrary("journeySharing"). 
See Libraries in the Maps JavaScript API.
| Constructor | |
|---|---|
| FleetEngineShipmentLocationProvider | FleetEngineShipmentLocationProvider(options)Parameters:   
 Creates a new location provider for Fleet Engine shipment tracking. | 
| Properties | |
|---|---|
| trackingId | Type:   stringThe tracking ID for the task that this location provider observes. Set this field to begin tracking. | 
| Inherited: isPolling,pollingIntervalMillis | |
| Methods | |
|---|---|
| refresh | refresh()Parameters:  None Return Value:   voidExplicitly refreshes the tracked location. | 
| Inherited: addListener | |
| Events | |
|---|---|
| error | function(event)Arguments:   
 Event that is triggered when the location provider encounters an error. | 
| update | function(event)Arguments:   Event that is triggered when a Fleet Engine data update request has finished. | 
| Inherited: ispollingchange | |
FleetEngineShipmentLocationProviderOptions interface
google.maps.journeySharing.FleetEngineShipmentLocationProviderOptions
interface
Options for shipment location provider.
| Properties | |
|---|---|
| authTokenFetcher | Type:   AuthTokenFetcherProvides JSON Web Tokens for authenticating the client to Fleet Engine. | 
| projectId | Type:   stringThe consumer's project ID from Google Cloud Console. | 
| activePolylineCustomization optional | Type:   (function(ShipmentPolylineCustomizationFunctionParams): void)|PolylineOptions optionalCustomization applied to the active polyline. An active polyline corresponds to a portion of the route the vehicle is currently traversing through.  Use this field to specify custom styling (such as polyline color) and interactivity (such as click handling). 
 | 
| deliveryVehicleMarkerCustomization optional | Type:   (function(ShipmentMarkerCustomizationFunctionParams): void)|MarkerOptions optionalCustomization applied to the delivery vehicle marker.  Use this field to specify custom styling (such as marker icon) and interactivity (such as click handling). 
 | 
| destinationMarkerCustomization optional | Type:   (function(ShipmentMarkerCustomizationFunctionParams): void)|MarkerOptions optionalCustomization applied to the destination marker.  Use this field to specify custom styling (such as marker icon) and interactivity (such as click handling). 
 | 
| pollingIntervalMillis optional | Type:   number optionalMinimum time between fetching location updates in milliseconds. If it takes longer than  pollingIntervalMillisto fetch a location update, the next location update is not started until the current one finishes.Setting this value to 0, Infinity, or a negative value disables automatic location updates. A new location update is fetched once if the tracking ID parameter (for example, the shipment tracking ID of the shipment location provider), or a filtering option (for example, viewport bounds or attribute filters for fleet location providers) changes. The default, and minimum, polling interval is 5000 milliseconds. If you set the polling interval to a lower positive value, 5000 is stored and used. | 
| remainingPolylineCustomization optional | Type:   (function(ShipmentPolylineCustomizationFunctionParams): void)|PolylineOptions optionalCustomization applied to the remaining polyline. A remaining polyline corresponds to a portion of the route the vehicle has not yet started traversing through.  Use this field to specify custom styling (such as polyline color) and interactivity (such as click handling). 
 | 
| takenPolylineCustomization optional | Type:   (function(ShipmentPolylineCustomizationFunctionParams): void)|PolylineOptions optionalCustomization applied to the taken polyline. A taken polyline corresponds to a portion of the route the vehicle has already traversed through.  Use this field to specify custom styling (such as polyline color) and interactivity (such as click handling). 
 | 
| trackingId optional | Type:   string optionalThe tracking ID of the task to track immediately after the location provider is instantiated. If not specified, the location provider does not start tracking any task; use  FleetEngineShipmentLocationProvider.trackingIdto set the tracking ID and begin tracking. | 
FleetEngineShipmentLocationProviderUpdateEvent interface
google.maps.journeySharing.FleetEngineShipmentLocationProviderUpdateEvent
interface
The event object passed to the event handler when the FleetEngineShipmentLocationProvider.update event is triggered.
| Properties | |
|---|---|
| taskTrackingInfo optional | Type:   TaskTrackingInfo optionalThe task tracking info structure returned by the update. Unmodifiable. |