Map Service QueryDefaultLayerDrawingDescriptions method

Queries and returns LayerDrawingDescription objects for a map's feature layers based on the input layer ids.

 

QueryDefaultLayerDrawingDescriptions(string MapName, int[] LayerIDs)

 

Parameter

Description

MapName

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

LayerIDs

An array of Layer IDs for which the return objects will be returned.

 

Return Value

 

Array of LayerDrawingDescription objects (LayerDrawingDescription[]) for layers whose 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 the returned array. If any ID is passed in that is neither of a feature layer nor of an existing layer, no LayerDrawingDescription will be returned for that ID.

 

Remarks

 

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

 

A LayerDrawingDescription object contains information on the symbology and label 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 only returns the following:

 

Types of renderers-

(Data exclusion from renderer is currently not 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 get downgraded to one of supported one. Please see the rules below.

 

Symbol and Label Degradation

 

Point symbols:

 

 

Line Symbols:

 

 

Polygon Symbols:

 

 

Labels:

 

LabelingDescription contains LabelClassDescription objects for those label classes that are checked to be used for labeling in the source layer.

Advanced label expression (e.g. VBScript or Jscript code) is not returned.

The SimpleTextSymbol’s background color property is ignored by the server. In case of highway shield, only the properties of text placed inside the shield will be returned and shield (background of the text symbol) itself will be ignored.

 

 

LabelPlacement:

 

Point label’s position could be one of 8 positions around a point. When a weight is set for each position in ArcMap, ArcGIS Server returns the position with value 1. For example, when the label position is set to "Prefer Top Right, all allowed", the server will return "esriServerPointLabelPlacementAboveRight".

 

Polygon labels are always converted to horizontal label.