Map Service GetDefaultLayerDrawingDescriptions method

Returns information about layer renderers, symbols, and labels.

 

GetDefaultLayerDrawingDescriptions(String MapName, int[] LayerIDs, ServerSymbolOutputOptions OutputOptions)

 

Parameter

Description

MapName

 

The name of the map (data frame) that contains the layer associated with the LayerDescription parameter.

LayerIDs

Array of Layer IDs for which LayerDescriptions will be returned.

OutputOptions

Output image type.

 

Return Value
 

An array of LayerDrawingDescription for layers which IDs were passed in. The result contains drawing descriptions only for feature layers. Therefore the count of input LayerIDs may not match with the count of returned array of LayerDrawingDescription. If any ID is passed in that is neither of a FeatureLayer nor of an existing layer, no LayerDrawingDescription will be returned for that ID.

 

Remarks

 

You may want to use MapLayerInfo.HasLayerDrawingDescription to check whether a map service will return a LayerDrawingDescription for a layer.
 

The OutputOptions parameter can be null, in that case a map service returns images in PNG format. In absence of an output directory images are returned as PNG mime.
 

A LayerDrawingDescription object contains information on the symbology and labels specified by the author. FeatureRenderer describes how the layer is symbolized while LabelingDescription contains all label classes defined in the source map by the author.

Please note that ArcGIS Server map services only return the following:
 

Types of renderers:

Data exclusion from renderer is not currently supported
 

Types of symbols


If a layer’s renderer is not one of those supported one, nothing will be returned. Symbols that are not the supported are downgraded a supported one. Please see the rules below.

 

A layer's symbols are downgraded as follows:


Point symbols

Line symbols

Polygon symbols

Labels

 

 

Script Type

Supported Keywords

Converted Keywords

VBScript Concatenation

&

CONCAT

 

VBScript Newline

vbNewline, vbLf, VbCrLf, vbCr

NEWLINE

 

VBScript Literals

" "

" "

 

VBScript Functions

 

FormatDateTime( [FieldName] , NamedFormat )

• vbGeneralDate

• vbLongDate

• vbShortDate

• vbLongTime

• vbShortTime
 

Note the numeric values for these VB constants are returned as it is
 

FormatDate([Date_Time] , FormatString)

• “mm/dd/yy hh:mm:ss tt”

• “dddd, MMMM dd, yyyy”

• “mm/dd/yy”

• “hh:mm:ss tt”

• “h:mm”

 

UCase([FieldName])

UCASE([FieldName])

 

LCase([FieldName])

LCASE([FieldName])

 

Round([FieldName], n)

ROUND([FieldName], n)

 

JScript expressions

Not supported

 

 

 

  

Here are few examples:
 

Example #1: See the screen shot below where in ArcMap (a) “Above” is checked, (b) “Location along the line” is “At Start” and (c) “Before” in “Start Point Priorities” has higher priority, the map service returns esriServerLinePlacementAboveBefore.

 

Example #2: See the screen shot below where in ArcMap (a) both “On the line” and “Below” positions are checked, (b) “Location along the line” is “At Start” and (c) “At” and “After” in “Start Point Priorities” have same higher priority than “Before”, the map service returns esriServerLinePlacementCenterStart.

 

Polygon labels are always converted to horizontal labels.

 

Examples

C#

VB.NET

Java