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-
Point Feature
Line Features
Polygon Features
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:
Simple marker symbols are returned
as is.
Any other types such as picture marker symbol, character marker symbol, multi layer symbol etc. are returned as picture marker symbols with a URI pointing to an image file.
Line Symbols:
Simple line symbols are returned as it is without any down gradation. The following ones are supported:
All other symbols, such as cartographic line symbol, marker line symbol, multilayer line symbol etc., are returned as simple solid line symbol. In case of multi layer symbol, a simple line symbol with the properties from the first symbol’s layer of layer’s geometry type is returned.
Polygon Symbols:
Simple fill symbols are always returned as solid fills. Other types of simple fill symbols such as crossed, horizontal etc. are returned as solid fill symbol type. The outline symbol may be downgraded following above mentioned rules.
A picture fill symbol is returned as picture fill symbol with a URI pointing to an image file. The server applies transparent, background & foreground colors, if any specified, to the output image.
All other fill symbols including multi-layer symbols are returned as simple fill symbols with the properties from the first symbol’s layer of layer’s geometry type is returned.
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.