ESRI.ArcGIS.ADF.IMS
AngleField Property
See Also  Example
ESRI.ArcGIS.ADF.IMS.Display.Symbol Namespace > TrueTypeMarkerSymbol Class : AngleField Property




Gets or sets a lookup field for determining the angle.

Syntax

Visual Basic (Declaration) 
Public Property AngleField As String
Visual Basic (Usage)Copy Code
Dim instance As TrueTypeMarkerSymbol
Dim value As String
 
instance.AngleField = value
 
value = instance.AngleField
C# 
public string AngleField {get; set;}

Example

This example creates a new TrueTypeMarkerSymbol and uses an AngleField to specify the angle to which each feature record's symbol will be rotated.
Visual BasicCopy Code
Dim symbol As New TrueTypeMarkerSymbol()

symbol.FontInfo = New FontInfo("ESRI Weather", 16, Drawing.Color.MidnightBlue, FontStyle.Regular)

' "%" corresponds to a weather flag character in ESRI Weather font

symbol.Character = "%"c

symbol.AngleField = "Angle"

symbol.RotateMethod = RotateMethod.Geographic



Dim simpleRenderer As New SimpleRenderer()

simpleRenderer.Symbol = symbol



Dim layer As FeatureLayer = mapView.Layers.FindLayerByName("Weather Stations")

layer.Renderer = simpleRenderer

C#Copy Code
TrueTypeMarkerSymbol symbol = new TrueTypeMarkerSymbol(); 

symbol.FontInfo = new FontInfo("ESRI Weather", 16, Drawing.Color.MidnightBlue, FontStyle.Regular); 

// "%" corresponds to a weather flag character in ESRI Weather font 

symbol.Character = "%"c; 

symbol.AngleField = "Angle"; 

symbol.RotateMethod = RotateMethod.Geographic; 

symbol.UseCentroid = true; 

  

SimpleRenderer simpleRenderer = =new SimpleRenderer(); 

simpleRenderer.Symbol = symbol; 

  

FeatureLayer layer = mapView.Layers.FindLayerByName("Weather Stations"); 

layer.Renderer = simpleRenderer; 

    

Remarks

This property enables you to rotate labels for each feature, based on the value in an attribute field. The field may be in the layer itself, or in a joined table. The values within the field should be between 0 and 360, with zero meaning horizontal and values increasing in a clockwise manner. This property is not relevant for acetate layers.

The AngleField used with TrueTypeMarkerSymbol can be in the layer's attribute table or in a joined table. Performance is generally better if the field name is all upper case.

  • For shapefiles with no joined tables, the field can be referenced using the short format:

    AngleField="AREA"
  • For shapefiles with joined tables, the name of the joined table must be included along with the field: AngleField="JOINEDTABLE.AREA"
  • For ArcSDE layers without joined tables, the field can be referenced using the short format: AngleField="AREA". The fully qualified name can also be used: AngleField="ARCSDENAME.TABLE.AREA"
  • For ArcSDE layers with joined tables, joined fields must be referenced using the fully qualified format: AngleField="ARCSDENAME.TABLE.AREA"

If both Angle and AngleField are used, Angle takes precedence.

Known limit: When rotating a TrueTypeMarkerSymbol in an image service, the marker may not be centered directly on top of the point it represents. The displacement varies depending on the font and character used. Not all characters are affected even within the same font.

This property is ignored for ArcMap Server image services.

See Also

© 2010 All Rights Reserved.