FleetEngineDeliveryVehicleLocationProvider class
google.maps.journeySharing
. FleetEngineDeliveryVehicleLocationProvider
class
Delivery Vehicle Location Provider.
This class extends PollingLocationProvider
.
Access by calling const {FleetEngineDeliveryVehicleLocationProvider} = await google.maps.importLibrary("journeySharing")
.See Libraries in the Maps JavaScript API
.
Constructor
FleetEngineDeliveryVehicleLocationProvider(options)
-
options
:FleetEngineDeliveryVehicleLocationProviderOptions
Options to pass to the location provider.
Properties |
|
---|---|
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:
isPolling
, pollingIntervalMillis
|
Methods |
|
---|---|
Inherited:
addListener
|
Events
function(event)
-
event
:ErrorEvent
function(event)
ispollingchange
FleetEngineDeliveryVehicleLocationProviderOptions interface
google.maps.journeySharing
. FleetEngineDeliveryVehicleLocationProviderOptions
interface
Options for delivery vehicle location provider.
Properties
AuthTokenFetcher
string
activePolylineCustomization
optional
(function( DeliveryVehiclePolylineCustomizationFunctionParams
): void)| PolylineOptions
optional
Use this field to specify custom styling (such as polyline color) and interactivity (such as click handling).
- If a
PolylineOptions
object is specified, the changes specified in it are applied to the polyline after the polyline has been created, overwriting its default options if they exist. - If a function is specified, it is invoked once when the polyline is created. (On this invocation, the
isNew
parameter in the function parameters object is set totrue
.) Additionally, this function is invoked when the polyline's coordinates change, or when the location provider receives data from Fleet Engine, regardless of whether the data corresponding to this polyline have changed.
SeeDeliveryVehiclePolylineCustomizationFunctionParams
for a list of supplied parameters and their uses.
deliveryVehicleId
optional
string optional
FleetEngineDeliveryVehicleLocationProvider.deliveryVehicleId
to set the ID and begin tracking. deliveryVehicleMarkerCustomization
optional
(function( DeliveryVehicleMarkerCustomizationFunctionParams
): void)| MarkerOptions
optional
Use this field to specify custom styling (such as marker icon) and interactivity (such as click handling).
- If a
MarkerOptions
object is specified, the changes specified in it are applied to the marker after the marker has been created, overwriting its default options if they exist. - If a function is specified, it is invoked once when the marker is created, before it is added to the map view. (On this invocation, the
isNew
parameter in the function parameters object is set totrue
.) Additionally, this function is invoked when the location provider receives data from Fleet Engine, regardless of whether the data corresponding to this marker have changed.
SeeDeliveryVehicleMarkerCustomizationFunctionParams
for a list of supplied parameters and their uses.
plannedStopMarkerCustomization
optional
(function( PlannedStopMarkerCustomizationFunctionParams
): void)| MarkerOptions
optional
Use this field to specify custom styling (such as marker icon) and interactivity (such as click handling).
- If a
MarkerOptions
object is specified, the changes specified in it are applied to the marker after the marker has been created, overwriting its default options if they exist. - If a function is specified, it is invoked once when the marker is created, before it is added to the map view. (On this invocation, the
isNew
parameter in the function parameters object is set totrue
.) Additionally, this function is invoked when the location provider receives data from Fleet Engine, regardless of whether the data corresponding to this marker have changed.
SeePlannedStopMarkerCustomizationFunctionParams
for a list of supplied parameters and their uses.
pollingIntervalMillis
optional
number optional
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.
remainingPolylineCustomization
optional
(function( DeliveryVehiclePolylineCustomizationFunctionParams
): void)| PolylineOptions
optional
Use this field to specify custom styling (such as polyline color) and interactivity (such as click handling).
- If a
PolylineOptions
object is specified, the changes specified in it are applied to the polyline after the polyline has been created, overwriting its default options if they exist. - If a function is specified, it is invoked once when the polyline is created. (On this invocation, the
isNew
parameter in the function parameters object is set totrue
.) Additionally, this function is invoked when the polyline's coordinates change, or when the location provider receives data from Fleet Engine, regardless of whether the data corresponding to this polyline have changed.
SeeDeliveryVehiclePolylineCustomizationFunctionParams
for a list of supplied parameters and their uses.
shouldShowOutcomeLocations
optional
boolean optional
shouldShowTasks
optional
boolean optional
staleLocationThresholdMillis
optional
number optional
takenPolylineCustomization
optional
(function( DeliveryVehiclePolylineCustomizationFunctionParams
): void)| PolylineOptions
optional
Use this field to specify custom styling (such as polyline color) and interactivity (such as click handling).
- If a
PolylineOptions
object is specified, the changes specified in it are applied to the polyline after the polyline has been created, overwriting its default options if they exist. - If a function is specified, it is invoked once when the polyline is created. (On this invocation, the
isNew
parameter in the function parameters object is set totrue
.) Additionally, this function is invoked when the polyline's coordinates change, or when the location provider receives data from Fleet Engine, regardless of whether the data corresponding to this polyline have changed.
SeeDeliveryVehiclePolylineCustomizationFunctionParams
for a list of supplied parameters and their uses.
taskFilterOptions
optional
FleetEngineTaskFilterOptions
optional
taskMarkerCustomization
optional
(function( TaskMarkerCustomizationFunctionParams
): void)| MarkerOptions
optional
Use this field to specify custom styling (such as marker icon) and interactivity (such as click handling).
- If a
MarkerOptions
object is specified, the changes specified in it are applied to the marker after the marker has been created, overwriting its default options if they exist. - If a function is specified, it is invoked once when the marker is created, before it is added to the map view. (On this invocation, the
isNew
parameter in the function parameters object is set totrue
.) Additionally, this function is invoked when the location provider receives data from Fleet Engine, regardless of whether the data corresponding to this marker have changed.
SeeTaskMarkerCustomizationFunctionParams
for a list of supplied parameters and their uses.
taskOutcomeMarkerCustomization
optional
function( TaskMarkerCustomizationFunctionParams
): void optional
Use this field to specify custom styling (such as marker icon) and interactivity (such as click handling).
- If a
MarkerOptions
object is specified, the changes specified in it are applied to the marker after the marker has been created, overwriting its default options if they exist. - If a function is specified, it is invoked once when the marker is created, before it is added to the map view. (On this invocation, the
isNew
parameter in the function parameters object is set totrue
.) Additionally, this function is invoked when the location provider receives data from Fleet Engine, regardless of whether the data corresponding to this marker have changed.
SeeTaskMarkerCustomizationFunctionParams
for a list of supplied parameters and their uses.
FleetEngineTaskFilterOptions interface
google.maps.journeySharing
. FleetEngineTaskFilterOptions
interface
Filtering options for tasks in the Delivery Vehicle Location Provider.
Properties |
|
---|---|
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
The event object passed to the event handler when the FleetEngineDeliveryVehicleLocationProvider.update
event is triggered.
Properties |
|
---|---|
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
|
The list of tasks served by this delivery vehicle. Unmodifiable.
|
FleetEngineDeliveryFleetLocationProvider class
google.maps.journeySharing
. FleetEngineDeliveryFleetLocationProvider
class
Delivery Fleet Location Provider.
This class extends PollingLocationProvider
.
Access by calling const {FleetEngineDeliveryFleetLocationProvider} = await google.maps.importLibrary("journeySharing")
.See Libraries in the Maps JavaScript API
.
Constructor
FleetEngineDeliveryFleetLocationProvider(options)
-
options
:FleetEngineDeliveryFleetLocationProviderOptions
Options to pass to the location provider.
Properties |
|
---|---|
deliveryVehicleFilter
|
Type:
string optional
The filter applied when fetching the delivery vehicles.
|
locationRestriction
|
Type:
LatLngBounds
| LatLngBoundsLiteral
optional
The bounds within which to track delivery vehicles. If no bounds are set, no delivery vehicles will be tracked. To track all delivery vehicles regardless of location, set bounds equivalent to the entire earth.
|
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:
isPolling
, pollingIntervalMillis
|
Methods |
|
---|---|
Inherited:
addListener
|
Events
function(event)
ispollingchange
FleetEngineDeliveryFleetLocationProviderOptions interface
google.maps.journeySharing
. FleetEngineDeliveryFleetLocationProviderOptions
interface
Options for delivery fleet location provider.
Properties
AuthTokenFetcher
string
deliveryVehicleFilter
optional
string optional
See ListDeliveryVehiclesRequest.filter for supported formats.
Note that valid filters for attributes must have the "attributes" prefix. For example,
attributes.x = "y"
or attributes."x y" = "z"
. deliveryVehicleMarkerCustomization
optional
function( DeliveryVehicleMarkerCustomizationFunctionParams
): void optional
Use this field to specify custom styling (such as marker icon) and interactivity (such as click handling).
- If a
MarkerOptions
object is specified, the changes specified in it are applied to the marker after the marker has been created, overwriting its default options if they exist. - If a function is specified, it is invoked once when the marker is created, before it is added to the map view. (On this invocation, the
isNew
parameter in the function parameters object is set totrue
.) Additionally, this function is invoked when the location provider receives data from Fleet Engine, regardless of whether the data corresponding to this marker have changed.
SeeDeliveryVehicleMarkerCustomizationFunctionParams
for a list of supplied parameters and their uses.
locationRestriction
optional
LatLngBounds
| LatLngBoundsLiteral
optional
FleetEngineDeliveryFleetLocationProvider.locationRestriction
to set the bounds and begin tracking. To track all delivery vehicles regardless of location, set bounds equivalent to the entire earth. staleLocationThresholdMillis
optional
number optional
FleetEngineDeliveryFleetLocationProviderUpdateEvent interface
google.maps.journeySharing
. FleetEngineDeliveryFleetLocationProviderUpdateEvent
interface
The event object passed to the event handler when the FleetEngineDeliveryFleetLocationProvider.update
event is triggered.
Properties |
|
---|---|
deliveryVehicles
optional
|
Type:
Array
< DeliveryVehicle
> optional
The list of delivery vehicles returned by the query. Unmodifiable.
|