Updated: August 27, 2012 FRAMES | NO FRAMES |
Creates a store or customer layer from records containing latitude (y) and longitude (x) information. This is often the first step in a Business Analyst analysis workflow.
Availability: Business Analyst Server.
TaskResultOutput CustomerStoreSetupByCoordinates ( CustomerStoreSetupByCoordinatesParameters Parameters, RenderingParameters RenderingParameters, TaskOutputType[] OutputTypes, esriFolderItem OutputAnalysisItem );
Parameter | Description |
---|---|
Parameters | Configuration options for customer/store setup. Type CustomerStoreSetupByCoordinatesParameters. |
RenderingParameters | Configuration options for rendering output when GetMapImage option is specified in the OutputTypes parameter. Type RenderingParameters. |
OutputTypes | Array of task output options. Options for this method include rendering output image (GetMapImage) and creating a feature layer for subsequent analysis (GetFeatureClass). Type TaskOutputType[]. |
OutputAnalysisItem | (Optional
parameter � can be null). Configuration options for storing the output feature layer in the repository. This will enable viewing and working with the output result in subsequent tasks. Type esriFolderItem. |
Variable of type TaskResultOutput
Use the Customer Store Setup to define and generate a new store/customer layer, an object that includes information about your stores, branches, offices, or customers. Once you define a store/customer layer, you can use it later in a map, analysis, or report.
When you need to identify a new location for a store, office or customer, you may have the exact map coordinates to the store/customer. If so, you can setup a new customer/store layer using this method.
The example below sets up a store feature layer using a list of coordinates. This is often executed as a preliminary step in an analysis workflow.
C# |
// Instantiate the BAServerHelper class to access analysis methods BAServerHelper baServerHelper = new BAServerHelper(); baServerHelper.ActiveDatasetID = "USA_ESRI"; // Optional parameter baServerHelper.IsFullErrorMessage = true; // Default is false // Create a PointRecord array of 3 store locations. PointRecord[] storePoints = new PointRecord[3]; storePoints[0] = new PointRecord(); storePoints[0].Name = "MIA"; storePoints[0].Description = "Miami International"; storePoints[0].StoreID = "1"; storePoints[0].Latitude = 25.794648; storePoints[0].Longitude = -80.276010; storePoints[0].StoreAddress = "Address 1"; storePoints[1] = new PointRecord(); storePoints[1].Name = "ORD"; storePoints[1].Description = "Chicago O'Hare"; storePoints[1].StoreID = "2"; storePoints[1].Latitude = 41.977918; storePoints[1].Longitude = -87.903700; storePoints[1].StoreAddress = "Address 2"; storePoints[2] = new PointRecord(); storePoints[2].Name = "LGA"; storePoints[2].Description = "New York La Guardia"; storePoints[2].StoreID = "3"; storePoints[2].Latitude = 40.774328; storePoints[2].Longitude = -73.872073; storePoints[2].StoreAddress = "Address 3"; CustomerStoreSetupByCoordinatesParameters parameters = new CustomerStoreSetupByCoordinatesParameters(); // Set specific analysis parameters parameters.GeocodeCustomers = false; parameters.NameField = "Name"; parameters.Points = storePoints; parameters.StoreIDField = "STORE_ID"; // Set other parameters RenderingParameters imageOptions = null; TaskOutputType[] outputOptions = new TaskOutputType[] { TaskOutputType.GetFeatureClass }; // In general, a non-null esriFolderItem is specified to save a newly-created // item to the server-side repository or to reference an existing item in it. esriFolderItem outputLayer = new esriFolderItem(); outputLayer.folderType = esriFolderType.esriFolderStoreLayers; outputLayer.itemName = "storeLayer_CustomerStoreSetupByCoordinates"; outputLayer.workspaceName = "Default Workspace"; outputLayer.projectName = "Default Project"; TaskResultOutput result = baServerHelper.CustomerStoreSetupByCoordinates(parameters, imageOptions, outputOptions, outputLayer); |