FRAMES | NO FRAMES
OpenFeatureLayer Method

Returns a repository feature layer item as a serialized Esri Feature RecordSet.

Availability: Business Analyst Server.

TaskResultOutput OpenFeatureLayer (
    OpenFeatureLayerParameters  Parameters,
    esriFolderItem              Item 
); 

Parameter Description
Parameters Configuration options for repository item to open. Type OpenFeatureLayerParameters. Available with Business Analyst Server 10.0 SP1.
Item Folder item containing a feature layer. Type esriFolderItem. This parameter is deprecated.

Returns

Variable of type TaskResultOutput containing the repository feature layer as the RecordSet property.

Usage Tips

Examples

The example below retrieves an existing feature layer item from the Business Analyst Server Repository. In order to demonstrate this method, a trade area feature layer is created and saved to the repository. The OpenFeatureLayer method is then used to retrieve the layer item. The overloaded version of the BAServerHelper.OpenFeatureLayer method compatible with Business Analyst Server 10.0 SOAP API is used in the example.

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
 
PointRecord[] storePoints = new PointRecord[1];
 
storePoints[0] = new PointRecord();
storePoints[0].Name = "store_study_site";
storePoints[0].Description = "Store Study Site";
storePoints[0].StoreID = "1";
storePoints[0].Latitude = 34.057596;
storePoints[0].Longitude = -117.195683;
 
// Create a store feature layer based on an array of point records.
PointLayer storeLayer = new PointLayer();
storeLayer.Points = storePoints;
 
SimpleRingsParameters simpleRingsParameters = new SimpleRingsParameters();
 
// Set specific analysis parameters
simpleRingsParameters.DistanceUnits = esriUnits.esriMiles;
simpleRingsParameters.Radii = new double[] { 1, 2, 3 }; ;
simpleRingsParameters.SingleStoreID = "1";
simpleRingsParameters.Stores = storeLayer;
 
// StoreIDField is useless for stores specified with array of PointRecord
//simpleRingsParameters.StoreIDField = "STORE_ID";
 
// Set other parameters
RenderingParameters imageOptions = null;
TaskOutputType[] outputOptions = new TaskOutputType[] { TaskOutputType.GetFeatureClass };
esriFolderItem outputReport = null;
 
// 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.esriFolderTradeAreas;
outputLayer.itemName = "simpleRings_OpenFeatureLayer";
outputLayer.projectName = "Default Project";
outputLayer.workspaceName = "Default Workspace";
 
baServerHelper.SimpleRings(simpleRingsParameters, imageOptions, outputOptions, outputLayer, outputReport);
 
// Retrieve the feature layer residing in the repository
TaskResultOutput result = baServerHelper.OpenFeatureLayer(outputLayer);

See Also