This document is archived and information here might be outdated. Recommended version. |
Get Layer Drawing Description
[Visual Basic .NET] Public Function GetDefaultLayerDrawingDescriptions ( _ ByVal MapName As String, _ ByVal pLayerIDs As ILongArray, _ ByVal outputOptions As IServerSymbolOutputOptions _ ) As ILayerDrawingDescriptions
[C#] public ILayerDrawingDescriptions GetDefaultLayerDrawingDescriptions ( string MapName, ILongArray pLayerIDs, IServerSymbolOutputOptions outputOptions );
[C++]
HRESULT GetDefaultLayerDrawingDescriptions(
BSTR MapName,
ILongArray* pLayerIDs,
IServerSymbolOutputOptions* outputOptions
);
[C++]
Parameters MapName [in]
MapName is a parameter of type BSTR pLayerIDs [in]
pLayerIDs is a parameter of type ILongArray* outputOptions [in]
outputOptions is a parameter of type IServerSymbolOutputOptions*
An array of ILayerDrawingDescription 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. If any ID is passed in that is neither of a FeatureLayer nor of an existing layer, no drawing description will be returned for that ID.
You may want to use IMapLayerInfo::HasLayerDrawingDescription to check whether MapServer will return ILayerDrawingDescription for a layer.
outputOptions parameter can be Null, in that case MapServer returns images in PNG format. In absence of virtual directory images are returned as PNG mime.
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 MapServer only returns the followings:
Types of renderer:
Types of symbol:
point features
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.
Here is how a layer’s symbols get downgraded:
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 )
* please note the numeric values for these |
FormatDate([Date_Time] , FormatString)
|
UCase([FieldName]) | UCASE([FieldName]) | |
LCase([FieldName]) | LCASE([FieldName]) | |
Round([FieldName], n) | ROUND([FieldName], n) | |
JScript expressions | are not supported for 10.0 |
LabelPlacement
In ArcMap label positions are constrained by 2 different options. They are listed below. The list also shows what are they converted to by MapServer.
When more than one options are checked in ArcMap, MapServer gives priority in the order they are listed above unless “Start Point Priorities” are blocked for that position.
Here are few examples:
Example#1: check 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, MapServer returns esriServerLinePlacementAboveBefore.
Example#2: check 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", MapServer returns esriServerLinePlacementCenterStart .