Skip to content

LastMileDeliveryParameters

ESM: import LastMileDeliveryParameters from "@arcgis/core/rest/support/LastMileDeliveryParameters.js";
CDN: const LastMileDeliveryParameters = await $arcgis.import("@arcgis/core/rest/support/LastMileDeliveryParameters.js");
Class: @arcgis/core/rest/support/LastMileDeliveryParameters
Inheritance: LastMileDeliveryParametersAccessor
Since: ArcGIS Maps SDK for JavaScript 4.34

LastMileDeliveryParameters provides the input parameters for a lastMileDelivery request.

See also

Constructors

LastMileDeliveryParameters

Constructor
new LastMileDeliveryParameters(properties)
Parameter
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
Show inherited properties Hide inherited properties
Name Type Summary Class

Use this property to specify the region in which to perform the analysis.

LastMileDeliveryParameters

An authorization string used to access a resource or service.

LastMileDeliveryParameters

The name of the class.

Accessor

Stores the depots that are part of a given last mile delivery analysis layer.

LastMileDeliveryParameters

The language that will be used when generating travel directions.

LastMileDeliveryParameters

Specify the units that should be used to measure and report the total travel distance between each origin-destination pair.

LastMileDeliveryParameters

Use this property to specify the default earliest start date for routes.

LastMileDeliveryParameters

Use this parameter to specify the default earliest start time for routes.

LastMileDeliveryParameters

If true the solver will ignore any invalid orders and return a solution, given it didn't encounter any other errors.

LastMileDeliveryParameters

Specify one or more lines that prohibit travel anywhere the lines intersect the streets.

LastMileDeliveryParameters

Use this property to specify the maximum allowed total time for each route.

LastMileDeliveryParameters

Lists the specialties that can be required by orders and supported by routes.

LastMileDeliveryParameters

Specifies one or more locations that the routes of the last mile delivery analysis will visit.

LastMileDeliveryParameters

Specify one or more points that will act as temporary restrictions or represent additional time or distance that may be required to travel on the underlying streets.

LastMileDeliveryParameters

Specify polygons that either completely restrict travel or proportionately scale the time or distance required to travel on the streets intersected by the polygons

LastMileDeliveryParameters

If true, directions will be generated and configured based on the value of the directionsLanguage property.

LastMileDeliveryParameters

Specifies the type of features that are returned by getRoutes method.

LastMileDeliveryParameters

Lists the specialties that can be required by orders and supported by routes.

LastMileDeliveryParameters

Identifies one or more routes that describe vehicle and driver characteristics.

LastMileDeliveryParameters

Use this parameter to specify the gap in numerical values to leave in the Sequence attribute in the orders parameter between adjacent orders when the analysis is solved.

LastMileDeliveryParameters

Specifies the temporal units used by time-based properties like the ServiceTime and CostPerUnitTime graphic attributes in orders and routes respectively.

LastMileDeliveryParameters

Use this parameter to specify the time zone for the input date-time fields.

LastMileDeliveryParameters

A travel mode represents a means of transportation, such as driving or walking.

LastMileDeliveryParameters

Zones specify a work territory.

LastMileDeliveryParameters

Property Details

analysisRegion

Property
analysisRegion String |null |undefined

Use this property to specify the region in which to perform the analysis. If a value is not specified for this parameter, the service will automatically calculate the region name based on the location of the input points. Setting the name of the region is recommended to speed up the analysis.

Possible Values:"europe" |"japan" |"korea" |"middle-east-and-africa" |"north-america" |"south-america" |"south-asia" |"thailand"

apiKey

Property
apiKey String |null |undefined

An authorization string used to access a resource or service. API keys are generated and managed in the portal. An API key is tied explicitly to an ArcGIS account; it is also used to monitor service usage. Setting a fine-grained API key on a specific class overrides the global API key.

declaredClass

Inherited
Property
declaredClass Stringreadonly
Inherited from Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

depots

Property
depots FeatureSet |null |undefinedautocast

Stores the depots that are part of a given last mile delivery analysis layer. A depot is a location that a vehicle departs from at the beginning of its workday and returns to at the end of the workday. Depots are locations where the vehicles are loaded (for deliveries) or unloaded (for pickups). For the Last Mile Delivery solver, the routes must all start at the same depot location and must all end at the same depot location. However, the start and end depot locations can be different or can be modeled as virtual depot locations not explicitly specified in the problem.

directionsLanguage

Property
directionsLanguage String |null |undefined

The language that will be used when generating travel directions. This parameter applies only when the populateDirections parameter is set to true. The service supports generating directions in the following languages: ar, bg, bs, ca, cs, da, de, el, en, es, et, fi, fr, he, hr, hu, id, it, ja, ko, lt, lv, nb, nl, pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, th, tr, uk, vi, zh-CN, zh-HK and zh-TW.

distanceUnits

Property
distanceUnits String |null |undefined

Specify the units that should be used to measure and report the total travel distance between each origin-destination pair. Many parameters in a last mile delivery problem analysis have attributes for storing distance values, such as MaxTotalDistance for the routes parameter. To minimize data entry requirements, these attribute values don't include units. Instead, all distance-based attribute values must be entered in the same units, and this parameter is used to specify the units of those values

Possible Values:"feet" |"kilometers" |"meters" |"miles" |"nautical-miles" |"yards"

earliestRouteStartDate

Property
earliestRouteStartDate String |null |undefined

Use this property to specify the default earliest start date for routes. This date is in the form YYYY-MM-DD and is used for all routes for which the EarliestStartDate attribute in the routes parameter is null. When this property is not specified, the EarliestStartDate attribute for all graphics in routes must be set.

earliestRouteStartTime

Property
earliestRouteStartTime String |null |undefined

Use this parameter to specify the default earliest start time for routes. This time of day is used for all routes for which the EarliestStartTime attribute in the routes parameter is null. When this property is not specified, all rows in the routes parameter must specify a value in the EarliestStartTime attribute. The format to provide the start date is hh:mm:ss, for example, 14:30:30.

ignoreInvalidOrderLocations

Property
ignoreInvalidOrderLocations Boolean |null |undefined

If true the solver will ignore any invalid orders and return a solution, given it didn't encounter any other errors. To generate routes and deliver them to drivers immediately, you may be able to ignore invalid orders, solve, and distribute the routes to your drivers. Then, resolve any invalid orders from the last solve and include them in the fleet routing analysis for the next workday or work shift. If false the solve operation will fail when any invalid orders are encountered. An invalid order is an order that the fleet routing solver can't reach. An order may be unreachable for a variety of reasons, including when the order is located on a prohibited network element, isn't located on the network at all, or is located on a disconnected portion of the network.

lineBarriers

Property
lineBarriers FeatureSet |null |undefinedautocast

Specify one or more lines that prohibit travel anywhere the lines intersect the streets. For example, a parade or protest that blocks traffic across several street segments can be modeled with a line barrier. A line barrier can also quickly fence off several roads from being traversed, thereby channeling possible routes away from undesirable parts of the street network.

maximumRouteDuration

Property
maximumRouteDuration Number |null |undefined

Use this property to specify the maximum allowed total time for each route. The value can be any positive number. The value is used for all routes when the MaxTotalTime attribute in the routes parameter is null. When no value is specified for maximumRouteDuration, all rows in the routes parameter must specify a value in the MaxTotalTime attribute.

The value is interpreted in the units specified in the timeUnits property.

orderSpecialties

Property
orderSpecialties FeatureSet |null |undefinedautocast

Lists the specialties that can be required by orders and supported by routes. A route can service an order only if it supports all the specialties required for that order.

orders

Property
orders FeatureSet |null |undefinedautocast

Specifies one or more locations that the routes of the last mile delivery analysis will visit. For example, these are the final customer locations where routes deliver packages, or the initial customer location where they are picking up packages for shipment.

pointBarriers

Property
pointBarriers FeatureSet |null |undefinedautocast

Specify one or more points that will act as temporary restrictions or represent additional time or distance that may be required to travel on the underlying streets. For example, a point barrier can be used to represent a fallen tree along a street or a time delay spent at a railroad crossing.

polygonBarriers

Property
polygonBarriers FeatureSet |null |undefinedautocast

Specify polygons that either completely restrict travel or proportionately scale the time or distance required to travel on the streets intersected by the polygons

populateDirections

Property
populateDirections Boolean |null |undefined

If true, directions will be generated and configured based on the value of the directionsLanguage property. If false, directions will not be generated, and the service returns an empty value for the feature sets returned by getDirectionPoints and getDirectionLines output parameter

routeShape

Property
routeShape String |null |undefined

Specifies the type of features that are returned by getRoutes method.

Possible Values:"none" |"true-shape-with-measures" |"straight-line"

routeSpecialties

Property
routeSpecialties FeatureSet |null |undefinedautocast

Lists the specialties that can be required by orders and supported by routes. A route can service an order only if it supports all the specialties required for that order.

routes

Property
routes FeatureSet |null |undefinedautocast

Identifies one or more routes that describe vehicle and driver characteristics. A route can have start and end depot service times, a fixed or flexible starting time, time-based operating costs, distance-based operating costs, multiple capacities, various constraints on a driver's workday, and so on.

sequenceGap

Property
sequenceGap Number |null |undefined

Use this parameter to specify the gap in numerical values to leave in the Sequence attribute in the orders parameter between adjacent orders when the analysis is solved. The value acts as a multiplier for the actual sequence of orders on each route.

timeUnits

Property
timeUnits String |null |undefined

Specifies the temporal units used by time-based properties like the ServiceTime and CostPerUnitTime graphic attributes in orders and routes respectively.

Possible Values:"days" |"hours" |"minutes" |"seconds"

timeZoneUsage

Property
timeZoneUsage String |null |undefined

Use this parameter to specify the time zone for the input date-time fields.

Possible Values:"geo-local" |"utc"

travelMode

Property
travelMode TravelMode |null |undefinedautocast

A travel mode represents a means of transportation, such as driving or walking. Travel modes define the physical characteristics of a vehicle or pedestrian.

Use networkService.fetchServiceDescription to obtain a list of predefined travel modes and the default travel mode that is used if one is not specified in a routing reqest.

zones

Property
zones FeatureSet |null |undefinedautocast

Zones specify a work territory. It is a polygon feature set and is used to constrain servicing to only those orders that fall within or near an area.

Method Overview

Show inherited methods Hide inherited methods
Name Return Type Summary Class

Adds one or more handles which are to be tied to the lifecycle of the object.

Accessor
this

Creates a deep clone of this object.

LastMileDeliveryParameters

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product.

LastMileDeliveryParameters

Returns true if a named group of handles exist.

Accessor

Removes a group of handles owned by the object.

Accessor

Converts an instance of this class to its ArcGIS portal JSON representation.

LastMileDeliveryParameters

Method Details

addHandles

Inherited
Method
addHandles(handleOrHandles, groupKey)
Inherited from Accessor

Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.

// Manually manage handles
const handle = reactiveUtils.when(
  () => !view.updating,
  () => {
    wkidSelect.disabled = false;
  },
  { once: true }
);

this.addHandles(handle);

// Destroy the object
this.destroy();
Parameters
handleOrHandles WatchHandle|WatchHandle[]

Handles marked for removal once the object is destroyed.

groupKey *
optional

Key identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.

clone

Method
clone(){this}

Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.

Returns
Type Description
this A deep clone of the class instance that invoked this method.

fromJSON

Method
fromJSON(json){* |null |undefined}static

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameter
json Object

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
Type Description
* | null | undefined Returns a new instance of this class.

hasHandles

Inherited
Method
hasHandles(groupKey){Boolean}
Inherited from Accessor

Returns true if a named group of handles exist.

Parameter
groupKey *
optional

A group key.

Returns
Type Description
Boolean Returns true if a named group of handles exist.
Example
// Remove a named group of handles if they exist.
if (obj.hasHandles("watch-view-updates")) {
  obj.removeHandles("watch-view-updates");
}

removeHandles

Inherited
Method
removeHandles(groupKey)
Inherited from Accessor

Removes a group of handles owned by the object.

Parameter
groupKey *
optional

A group key or an array or collection of group keys to remove.

Example
obj.removeHandles(); // removes handles from default group

obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");

toJSON

Method
toJSON(){Object}

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
Type Description
Object The ArcGIS portal JSON representation of an instance of this class.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.