ESRI.ArcGIS.ADF.IMS
CalloutMarkerSymbol Class
Members  Example  See Also 
ESRI.ArcGIS.ADF.IMS.Display.Symbol Namespace : CalloutMarkerSymbol Class




A LabelSymbol object that can display text call-outs.

Object Model


Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class CalloutMarkerSymbol 
   Inherits LabelSymbol
Visual Basic (Usage)Copy Code
Dim instance As CalloutMarkerSymbol
C# 
[SerializableAttribute()]
public class CalloutMarkerSymbol : LabelSymbol 

Example

This example creates a new CalloutMarkerSymbol with a beige background and partial transparency, and with a longer than default leader from the point labeled. It substitutes the existing label renderer with a new one containing the new CalloutMarkerSymbol. This layer, like most labeled layers, uses a GroupRenderer since it has a symbol renderer in addition to a label renderer.
Visual BasicCopy Code
' Create a new CalloutMarkerSymbol and set its properties

Dim calloutMarker As New CalloutMarkerSymbol()

calloutMarker.Font = New FontInfo("Arial", 14, Drawing.Color.Navy, FontStyle.Regular)

calloutMarker.Antialiasing = True

calloutMarker.BackColor = Drawing.Color.Beige

calloutMarker.BoundaryColor = Drawing.Color.Beige

calloutMarker.LeaderLength = 20

calloutMarker.Transparency = 30



' Retrieve an existing layer

Dim layer As FeatureLayer = mapView.Layers.FindByName("Cities")



' Create new label renderer

Dim labelRend As New SimpleLabelRenderer("NAME")

labelRend.Symbol = calloutMarker



' Replace the existing label renderer with the new one

' -- Layer has a symbol renderer as well as a label renderer, in a GroupRenderer

Dim groupRend As GroupRenderer = layer.Renderer

groupRend.Renderers.RemoveAt(1) ' label renderer is second renderer

groupRend.Renderers.Add(labelRend)

C#Copy Code
// Create a new CalloutMarkerSymbol and set its properties 

CalloutMarkerSymbol calloutMarker = new CalloutMarkerSymbol(); 

calloutMarker.Font = new FontInfo("Arial", 14, Drawing.Color.Navy, FontStyle.Regular); 

calloutMarker.Antialiasing = true; 

calloutMarker.BackColor = Drawing.Color.Beige; 

calloutMarker.BoundaryColor = Drawing.Color.Beige; 

calloutMarker.LeaderLength = 20; 

calloutMarker.Transparency = 30; 

  

// Retrieve an existing layer 

FeatureLayer layer = mapView.Layers.FindByName("Cities"); 

  

// Create new label renderer 

SimpleLabelRenderer labelRend = new SimpleLabelRenderer("NAME"); 

labelRend.Symbol = calloutMarker; 

  

// Replace the existing label renderer with the new one 

//   -- Layer has a symbol renderer as well as a label renderer, in a GroupRenderer 

GroupRenderer groupRend = layer.Renderer; 

groupRend.Renderers.RemoveAt(1);     // label renderer is second renderer 

groupRend.Renderers.Add(labelRend); 

    

Remarks

This label symbol displays the text for point with callout boxes, which are boxes with a leader line pointing to the feature labeled.

CalloutMarkerSymbol works only with point layers.

CalloutMarkerSymbol is not valid for use in an acetate layer.

CalloutMarkerSymbol is not valid with ArcMap Server image services.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.ADF.IMS.Display.Symbol.Symbol
      ESRI.ArcGIS.ADF.IMS.Display.Symbol.LabelSymbol
         ESRI.ArcGIS.ADF.IMS.Display.Symbol.CalloutMarkerSymbol

See Also

© 2010 All Rights Reserved.