| Package | com.esri.baserver.tasks.reports |
| Class | public class AverageDriveTimeReportParameters |
| Inheritance | AverageDriveTimeReportParameters StandardReportParameters StandardReportParameters BATaskParameters Object |
As a default this task uses the geographic center of the trade areas for the average drive time calculation.
You can alternately choose the actual store center points if specify the stores parameter.
In this case, the areaLinkField parameter should specify an attribute field in the input
boundaries layer containing IDs of associated stores and the optional storeIDField parameter
can specify an attribute field in the input stores layer containing unique ID of store.
Output options for this task include creating a report (outputTypes.getReport). You need not specify the output options for this task because the getReport output type is set by default.
See also
| Property | Defined By | ||
|---|---|---|---|
![]() | activeDatasetID : String
Active dataset ID. | BATaskParameters | |
| areaDescField : String
Name of area description field in the boundaries layer (required). | AverageDriveTimeReportParameters | ||
| areaLinkField : String
The attribute field name in the input boundaries layer which is used to link
trade areas with stores. | AverageDriveTimeReportParameters | ||
| boundaries : Boundaries
The polygon layer whose features represent trade areas (required). | AverageDriveTimeReportParameters | ||
| distanceUnits : DriveTimeUnits
The time or distance units which are used to calculate the average drive time or distance in. | AverageDriveTimeReportParameters | ||
![]() | outputReportItem : FolderItem
Configuration options for storing the output report in the repository. | StandardReportParameters | |
![]() | outputTypes : OutputTypes
Task output types. | BATaskParameters | |
![]() | resultType : BAResultType [read-only]
Type of the result returned by the task associated with these parameters. | BATaskParameters | |
![]() | standardReportOptions : ReportOptions
Standard report options. | StandardReportParameters | |
| storeIDField : String
The attribute field name in the input stores layer which is associated with
unique store/business IDs (typically store numbers for retail establishments
with multiple locations). | AverageDriveTimeReportParameters | ||
| stores : PointLayer
A point layer containing point features such as businesses, hospitals, schools, etc. | AverageDriveTimeReportParameters | ||
![]() | taskName : String [read-only]
Name of a Business Analyst task associated with these parameters. | BATaskParameters | |
| Method | Defined By | ||
|---|---|---|---|
Creates a new instance of the AverageDriveTimeReportParameters class. | AverageDriveTimeReportParameters | ||
| areaDescField | property |
areaDescField:String
Name of area description field in the boundaries layer (required).
public function get areaDescField():String public function set areaDescField(value:String):void| areaLinkField | property |
areaLinkField:String
The attribute field name in the input boundaries layer which is used to link
trade areas with stores.
This parameter is required is the input stores layer is specified.
public function get areaLinkField():String public function set areaLinkField(value:String):void| boundaries | property |
boundaries:BoundariesThe polygon layer whose features represent trade areas (required).
public function get boundaries():Boundaries public function set boundaries(value:Boundaries):void| distanceUnits | property |
distanceUnits:DriveTimeUnitsThe time or distance units which are used to calculate the average drive time or distance in.
The default value is DriveTimeUnits.MILES.
public function get distanceUnits():DriveTimeUnits public function set distanceUnits(value:DriveTimeUnits):void| storeIDField | property |
storeIDField:String
The attribute field name in the input stores layer which is associated with
unique store/business IDs (typically store numbers for retail establishments
with multiple locations).
If the stores layer is specified with an array of PointRecord items,
this parameter is ignored.
The default value is "STORE_ID".
public function get storeIDField():String public function set storeIDField(value:String):void| stores | property |
stores:PointLayer
A point layer containing point features such as businesses, hospitals, schools, etc.
In situations where the input stores parameter does not contain a field named "STORE_ID"
(case insensitive), specification of the storeIDField parameter is required so the
analyses can be properly executed.
public function get stores():PointLayer public function set stores(value:PointLayer):void| AverageDriveTimeReportParameters | () | Constructor |
public function AverageDriveTimeReportParameters()Creates a new instance of the AverageDriveTimeReportParameters class.
var parameters : AverageDriveTimeReportParameters = new AverageDriveTimeReportParameters();
// The Boundaries type could take either data as type
// com.esri.ags.tasks.FeatureSet, com.esri.baserver.FolderItem, or com.esri.bacore.StandardLayer.
// Set boundaries with a valid data type.
// It is recommended that the average drive time report be run using customer derived trade areas.
parameters.boundaries = boundaries;
// Set an attribute field name which describes every trade area in the boundaries layer.
parameters.areaDescField = "AREA_DESC";
// DriveTimeUnits.MILES is the default value for distanceUnits.
//parameters.distanceUnits = DriveTimeUnits.MILES;
// The origins for average drive time calculations are either geographic centers of trade areas
// or actual store points. In the last case, you should also specify the stores and areaLinkField
// parameters and can specify the optional storeIDField parameter.
//parameters.stores = stores;
//parameters.areaLinkField = "STORE_ID";
// Set report parameters.
parameters.standardReportOptions = new ReportOptions("PDF");
averageDriveTimeReportTask.execute(parameters, new Responder(resultHandler, faultHandler));