| Package | com.esri.baserver.tasks.reports |
| Class | public class LocatorReportParameters |
| Inheritance | LocatorReportParameters AnalysisAndReportParameters StandardReportParameters BATaskParameters Object |
The analysis can be restricted to an analysis extent if the analysisExtent
parameter is specified. Optional singleStoreID parameter restricts the analysis
to a single store.
The businessesSearchMethod parameter specifies the algorithm for selecting
the business points nearest to every store location:
| Value | Description |
|---|---|
BusinessesSearchMethod.FIND_CLOSEST
| Selects not more closest business points than the given number specified with the
closestBusinessesCount parameter. |
BusinessesSearchMethod.WITHIN_RANGE
| Selects all business points that fall within a predefined distance specified with the
nearestDistance and nearestDistanceUnits parameters. For example,
you can select all business points that are within five miles of each store location. |
The calculationMethod parameter specifies a method for distance calculation
from within drive time, drive distance, or straight-line distance variants.
The locator report can be generated in the portrait or landscape mode specified with the
reportOrientation parameter. In the portrait mode, the number of attributes of
business points shown in columns is limited to 4. In the landscape mode, up to 6 attributes
of business points can be shown. The attribute fields of the business layer to be exported
to the report and their alias names to be shown in captions of columns are specified with
the fieldNames and fieldAliases parameter, respectively.
Output options for this task include rendering an output image (outputTypes.getMapImage), creating
a feature class for subsequent analysis (outputTypes.getFeatureClass), and/or
creating a report (outputTypes.getReport).
If no output options are specified, the required output options are specified as follows.
If the renderingParameters parameter is specified, the image output is requested.
If the standardReportOptions parameter is specified, the report is requested.
If the outputAnalysisItem parameter is specified, the output analysis feature class
will be stored in the repository. If renderingParameters,
standardReportOptions, and outputAnalysisItem parameters are missing,
the feature class output is requested.
See also
| Property | Defined By | ||
|---|---|---|---|
![]() | activeDatasetID : String
Active dataset ID. | BATaskParameters | |
| analysisExtent : Geometry
Spatial/geographic extent to restrict analysis by. | LocatorReportParameters | ||
| businessesSearchMethod : BusinessesSearchMethod
Method to search for the closest competitors. | LocatorReportParameters | ||
| businessPoints : PointLayer
Point layer with competitors' business points (requred). | LocatorReportParameters | ||
| calculationMethod : DistanceCalcType
Distance calculation method. | LocatorReportParameters | ||
| closestBusinessesCount : int
Closest businesses count threshold. | LocatorReportParameters | ||
| distanceUnits : String
Units to report distances in. | LocatorReportParameters | ||
| fieldAliases : Array
Aliases of fields to be shown in the report—up to 4 fields for a portrait report
and up to 6 fields for a landscape report (required). | LocatorReportParameters | ||
| fieldNames : Array
Fields of the BusinessPoints layer to be exported to the report—up to 4 fields
for a portrait report and up to 6 fields for a landscape report (required). | LocatorReportParameters | ||
| nearestDistance : Number
Nearest distance threshold. | LocatorReportParameters | ||
| nearestDistanceUnits : String
Units the nearestDistance property value is measured in. | LocatorReportParameters | ||
![]() | outputAnalysisItem : FolderItem
Configuration options for storing the output feature class in the repository. | AnalysisAndReportParameters | |
![]() | outputReportItem : FolderItem
Configuration options for storing the output report in the repository. | AnalysisAndReportParameters | |
![]() | outputSpatialReference : SpatialReference
The spatial reference to return the output feature set in. | AnalysisAndReportParameters | |
![]() | outputTypes : OutputTypes
Task output types. | BATaskParameters | |
![]() | renderingParameters : RenderingParameters
Configuration options for rendering output to map image. | AnalysisAndReportParameters | |
| reportOrientation : ReportOrientation
Orientation of the report. | LocatorReportParameters | ||
![]() | resultType : BAResultType [read-only]
Type of the result returned by the task associated with these parameters. | BATaskParameters | |
![]() | returnGeometry : Boolean
An option specifying the presence of the shape attribute in the returned record set. | AnalysisAndReportParameters | |
| singleStoreID : String
ID of a single store in the stores layer to generate report for. | LocatorReportParameters | ||
![]() | 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). | LocatorReportParameters | ||
| storeNameField : String
The attribute field name in the input stores layer which is associated with store/business names. | LocatorReportParameters | ||
| stores : PointLayer
A point layer containing point features such as businesses, hospitals, schools, etc.,
which represent the locations of your businesses (required). | LocatorReportParameters | ||
![]() | taskName : String [read-only]
Name of a Community Analyst Task associated with these parameters. | BATaskParameters | |
| Method | Defined By | ||
|---|---|---|---|
LocatorReportParameters(outputTypes:OutputTypes = null)
Creates a new instance of the LocatorReportParameters class. | LocatorReportParameters | ||
| analysisExtent | property |
analysisExtent:GeometrySpatial/geographic extent to restrict analysis by. This parameter expects a value of the Extent or Polygon type.
public function get analysisExtent():Geometry public function set analysisExtent(value:Geometry):voidSee also
| businessesSearchMethod | property |
businessesSearchMethod:BusinessesSearchMethodMethod to search for the closest competitors.
The default value is BusinessesSearchMethod.FIND_CLOSEST.
public function get businessesSearchMethod():BusinessesSearchMethod public function set businessesSearchMethod(value:BusinessesSearchMethod):void| businessPoints | property |
businessPoints:PointLayerPoint layer with competitors' business points (requred).
public function get businessPoints():PointLayer public function set businessPoints(value:PointLayer):void| calculationMethod | property |
calculationMethod:DistanceCalcTypeDistance calculation method.
The default value is DistanceCalcType.STRAIGHT_LINE.
public function get calculationMethod():DistanceCalcType public function set calculationMethod(value:DistanceCalcType):void| closestBusinessesCount | property |
closestBusinessesCount:int
Closest businesses count threshold.
This value is used if the businessesSearchMethod property value is
BusinessesSearchMethod.FIND_CLOSEST. Negative value means showing all
businesses in the output report.
The default value is -1.
public function get closestBusinessesCount():int public function set closestBusinessesCount(value:int):void| distanceUnits | property |
distanceUnits:StringUnits to report distances in. For drive time calculation method, this property is ignored and the distances in minutes are displayed in the report. This should be a string constant from the com.esri.ags.Units class.
The default value is Units.MILES.
public function get distanceUnits():String public function set distanceUnits(value:String):void| fieldAliases | property |
fieldAliases:ArrayAliases of fields to be shown in the report—up to 4 fields for a portrait report and up to 6 fields for a landscape report (required).
public function get fieldAliases():Array public function set fieldAliases(value:Array):void| fieldNames | property |
fieldNames:ArrayFields of the BusinessPoints layer to be exported to the report—up to 4 fields for a portrait report and up to 6 fields for a landscape report (required).
public function get fieldNames():Array public function set fieldNames(value:Array):void| nearestDistance | property |
nearestDistance:Number
Nearest distance threshold.
This threshold is required if the businessesSearchMethod property value is
BusinessesSearchMethod.WITHIN_RANGE.
The default value is NaN.
public function get nearestDistance():Number public function set nearestDistance(value:Number):void| nearestDistanceUnits | property |
nearestDistanceUnits:String
Units the nearestDistance property value is measured in.
This value is used if the businessesSearchMethod property value is
BusinessesSearchMethod.WITHIN_RANGE.
This should be a string constant from the com.esri.ags.Units class.
The default value is Units.MILES.
public function get nearestDistanceUnits():String public function set nearestDistanceUnits(value:String):void| reportOrientation | property |
reportOrientation:ReportOrientationOrientation of the report. If this property value is null, the orientation is selected depending on the number of fields to be shown in the report—portrait orientation if the number of fields does not exceed 4 and landscape orientation otherwise.
The default value is null.
public function get reportOrientation():ReportOrientation public function set reportOrientation(value:ReportOrientation):void| singleStoreID | property |
singleStoreID:String
ID of a single store in the stores layer to generate report for.
public function get singleStoreID():String public function set singleStoreID(value:String):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).
The default value is "STORE_ID".
public function get storeIDField():String public function set storeIDField(value:String):void| storeNameField | property |
storeNameField:String
The attribute field name in the input stores layer which is associated with store/business names.
The default value is "NAME".
public function get storeNameField():String public function set storeNameField(value:String):void| stores | property |
stores:PointLayerA point layer containing point features such as businesses, hospitals, schools, etc., which represent the locations of your businesses (required).
public function get stores():PointLayer public function set stores(value:PointLayer):void| LocatorReportParameters | () | Constructor |
public function LocatorReportParameters(outputTypes:OutputTypes = null)Creates a new instance of the LocatorReportParameters class.
ParametersoutputTypes:OutputTypes (default = null) — Task output types.
|
var parameters : LocatorReportParameters = new LocatorReportParameters();
// The PointLayer type could take either data as type
// com.esri.ags.tasks.FeatureSet, com.esri.baserver.FolderItem,
// or an array of com.esri.bacore.PointRecord items, e.g.
//var points:Array = [new PointRecord("store_1", "Store 1", "1", 34.052074, -117.207841)];
// Set stores as an array of PointRecord items.
parameters.stores = new PointLayer(points);
// Set businessPoints with a valid data type.
parameters.businessPoints = new PointLayer(businessPoints);
// Set fields of the businessPoints layer to be exported to the report.
parameters.fieldNames = ["NAME", "DESCR"];
// Set aliases of fields to be shown in the report.
parameters.fieldAliases = ["Name", "Description"];
// Set report parameters.
parameters.standardReportOptions = new ReportOptions("PDF");
locatorReportTask.execute(parameters, new Responder(resultHandler, faultHandler));