A MarkerSymbol that uses a TrueType character to display point features.
Object Model
Syntax
Example
The following example renders a cities layer with a TrueType symbol using a TrueTypeMarkerSymbol.
Visual Basic | Copy Code |
---|
' Create a new TrueTypeMarker symbol and set its properties
Dim trueTypeMarker As New TrueTypeMarkerSymbol()
Dim fontInfo As New FontInfo("ESRI Conservation", 16, Drawing.Color.MidnightBlue, FontStyle.Regular)
trueTypeMarker.Font = fontInfo
trueTypeMarker.Character = "U"c ' in VB, use c to specify Char type
trueTypeMarker.AllowLabelOverlap = True
trueTypeMarker.Angle = 10
trueTypeMarker.Antialiasing = True
trueTypeMarker.GlowColor = Drawing.Color.Ivory
trueTypeMarker.ShadowColor = Drawing.Color.Gray
trueTypeMarker.Transparency = 30
' Retrieve an existing point layer's renderer
Dim layer As FeatureLayer = mapView.Layers.FindByName("Cities")
Dim grpRend As GroupRenderer = layer.Renderer
' Create a new simple renderer to contain the symbol, and replace the existing feature renderer
Dim simpleRend As New SimpleRenderer(trueTypeMarker)
grpRend.Renderers.RemoveAt(0)
grpRend.Renderers.Add(simpleRend) |
C# | Copy Code |
---|
// Create a new TrueTypeMarker symbol and set its properties
TrueTypeMarkerSymbol trueTypeMarker = new TrueTypeMarkerSymbol();
FontInfo fontInfo = new FontInfo("ESRI Conservation", 16, Drawing.Color.MidnightBlue, FontStyle.Regular);
trueTypeMarker.Font = fontInfo;
trueTypeMarker.Character = "U";
trueTypeMarker.AllowLabelOverlap = true;
trueTypeMarker.Angle = 10;
trueTypeMarker.Antialiasing = true;
trueTypeMarker.GlowColor = Drawing.Color.Ivory;
trueTypeMarker.ShadowColor = Drawing.Color.Gray;
trueTypeMarker.Transparency = 30;
// Retrieve an existing point layer's renderer
FeatureLayer layer = mapView.Layers.FindByName("Cities");
GroupRenderer grpRend = layer.Renderer;
// Create a new simple renderer to contain the symbol, and replace the existing feature renderer
SimpleRenderer simpleRend = new SimpleRenderer(trueTypeMarker);
grpRend.Renderers.RemoveAt(0);
grpRend.Renderers.Add(simpleRend); |
Remarks
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also