AnsweredAssumed Answered

drawing callout text element in mapview with fix distance from polygon centroid ?

Question asked by helenchu on Jan 13, 2015
Latest reply on Jan 18, 2015 by Ahmed.ElSisiesrinea-esridist


What I'm trying to achieve is placing a call out text with anchor point is the polygon centroid.  I got that done.  However for the callout part, I don't know how to make it appear about 1/2 an inch away from the point (polygon's centroid) on the screen. 

Any help is greatly appreciated.


pArea = pFeature.Shape

pPointAnchor = pArea.Centroid

pPointText = ??????


Dim pCallout As ICallout

pCallout = New BalloonCallout

pCallout.AnchorPoint = pPointAnchor


Dim pElement As IElement

pElement = pTextElement


Dim pTextSymbol As IFormattedTextSymbol

pTextSymbol = New TextSymbol

pTextSymbol.Background = pCallout

pTextSymbol.Color = pColor

pTextSymbol.Font = pFontDisp

pTextElement.Symbol = pTextSymbol


pElement.Geometry = pPointText


pGraphicsContainer.AddElement(pElement, 0)

pGraphicsContainer.AddElement(pointElement, 0)