FRAMES | NO FRAMES
GetDefaultMapDescription Method

Gets the default map description.

Availability: Business Analyst Server.

MapDescription GetDefaultMapDescription (	
); 

Parameter Description
- -

Returns

Variable of type MapDescription.

Remarks

Using map description, you can specify a map in the RenderingParameters type to render an output feature layer on. Since Business Analyst Server 9.3.1 SP1, the map description is optional in this type and, if it is omitted, the default map description is used. So, you have no need in executing this method if you only want to render an output feature layer on the default map.

Examples

The example below demonstrates the use of this method by executing a StandardLevelsOfGeography workflow. The output result is an in-memory (stateless) trade area feature class as well as an image file.

NOTE: Output image will not be permanently saved to the repository. It will only persist for a short amount of time before being automatically deleted.

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
 
// You can specify below a domain of your local Business Analyst Server.
//baServerHelper.BAServerDomain = "esri.com";
 
// If a domain name is specified, a local server name in output URLs is replaced with the
// fully-addressable server name so people and machines outside the domain of your local
// Business Analyst Server instance can access these URLs.
 
StandardLevelsOfGeographyParameters geographyParameters = new StandardLevelsOfGeographyParameters();
 
// Set specific analysis parameters
geographyParameters.GeographyIDs = new string[] { "06075" }; // FIPS ID code for San Francisco County
geographyParameters.GeographyLevelID = "US.Counties";
 
// Set other parameters
// In addition to creating the trade area feature layer, create an image file of
// the output result by specifying the RenderingParameters
ImageDisplay imageDisplay = new ImageDisplay();
imageDisplay.ImageDPI = 96;
imageDisplay.ImageHeight = 480;
imageDisplay.ImageWidth = 600;
 
ImageType imageType = new ImageType();
imageType.ImageFormat = esriImageFormat.esriImageJPG;
imageType.ImageReturnType = esriImageReturnType.esriImageReturnURL;
 
ImageDescription imageDescription = new ImageDescription();
imageDescription.ImageDisplay = imageDisplay;
imageDescription.ImageType = imageType;
 
RenderingParameters imageOptions = new RenderingParameters();
imageOptions.ImageDescription = imageDescription;
imageOptions.MapDescription = baServerHelper.GetDefaultMapDescription(); // Get the default map here !!!
imageOptions.ZoomToLayer = true;
 
// Specify other parameters of the task
TaskOutputType[] outputOptions = new TaskOutputType[] { TaskOutputType.GetFeatureClass, TaskOutputType.GetMapImage };
esriFolderItem outputLayer = null;
esriFolderItem outputReport = null;
 
TaskResultOutput result =
    baServerHelper.StandardLevelsOfGeography(geographyParameters, imageOptions, outputOptions, outputLayer, outputReport);
 
string imageURL = result.MapImage.ImageURL;

See Also