FleetEngineShipmentLocationProvider class
google.maps.journeySharing.FleetEngineShipmentLocationProvider
class
Shipment location provider.
This class extends
PollingLocationProvider
.
Access by callingconst {FleetEngineShipmentLocationProvider} = await google.maps.importLibrary( "journeySharing" )
.SeeLibraries in the Maps JavaScript API.
Constructor | |
---|---|
FleetEngineShipmentLocationProvider |
FleetEngineShipmentLocationProvider(options) Parameters:
Creates a new location provider for Fleet Engine shipment tracking. |
Properties | |
---|---|
trackingId |
Type:
string The 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:
void Explicitly 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:
AuthTokenFetcher Provides JSON Web Tokens for authenticating the client to Fleet Engine. |
projectId |
Type:
string The consumer's project ID from Google Cloud Console. |
deliveryVehicleMarkerCustomizationoptional |
Type:
(function(ShipmentMarkerCustomizationFunctionParams): void)|MarkerOptionsoptional Customization applied to the delivery vehicle marker. Use this field to specify custom styling (such as marker icon) and interactivity (such as click handling).
|
destinationMarkerCustomizationoptional |
Type:
(function(ShipmentMarkerCustomizationFunctionParams): void)|MarkerOptionsoptional Customization applied to the destination marker. Use this field to specify custom styling (such as marker icon) and interactivity (such as click handling).
|
pollingIntervalMillisoptional |
Type:
numberoptional 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, 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. |
trackingIdoptional |
Type:
stringoptional The 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.trackingId to set the tracking ID and begin tracking. |
FleetEngineShipmentLocationProviderUpdateEvent interface
google.maps.journeySharing.FleetEngineShipmentLocationProviderUpdateEvent
interface
The event object passed to the event handler when theFleetEngineShipmentLocationProvider.update
event is triggered.
Properties | |
---|---|
taskTrackingInfooptional |
Type:
TaskTrackingInfooptional The task tracking info structure returned by the update. Unmodifiable. |