<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic drawing callout text element in mapview with fix distance from polygon centroid ? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/drawing-callout-text-element-in-mapview-with-fix/m-p/130996#M3423</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What I'm trying to achieve is placing a call out text with anchor point is the polygon centroid.&amp;nbsp; I got that done.&amp;nbsp; 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.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pArea = pFeature.Shape&lt;/P&gt;&lt;P&gt;pPointAnchor = pArea.Centroid&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pPointText = ??????&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim pCallout As ICallout&lt;/P&gt;&lt;P&gt;pCallout = New BalloonCallout&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pCallout.AnchorPoint = pPointAnchor&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim pElement As IElement&lt;/P&gt;&lt;P&gt;pElement = pTextElement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim pTextSymbol As IFormattedTextSymbol&lt;/P&gt;&lt;P&gt;pTextSymbol = New TextSymbol&lt;/P&gt;&lt;P&gt;pTextSymbol.Background = pCallout&lt;/P&gt;&lt;P&gt;pTextSymbol.Color = pColor&lt;/P&gt;&lt;P&gt;pTextSymbol.Font = pFontDisp&lt;/P&gt;&lt;P&gt;pTextElement.Symbol = pTextSymbol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pElement.Geometry = pPointText&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pGraphicsContainer.AddElement(pElement, 0)&lt;/P&gt;&lt;P&gt;pGraphicsContainer.AddElement(pointElement, 0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jan 2015 20:58:06 GMT</pubDate>
    <dc:creator>helenchu</dc:creator>
    <dc:date>2015-01-13T20:58:06Z</dc:date>
    <item>
      <title>drawing callout text element in mapview with fix distance from polygon centroid ?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/drawing-callout-text-element-in-mapview-with-fix/m-p/130996#M3423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What I'm trying to achieve is placing a call out text with anchor point is the polygon centroid.&amp;nbsp; I got that done.&amp;nbsp; 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.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pArea = pFeature.Shape&lt;/P&gt;&lt;P&gt;pPointAnchor = pArea.Centroid&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pPointText = ??????&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim pCallout As ICallout&lt;/P&gt;&lt;P&gt;pCallout = New BalloonCallout&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pCallout.AnchorPoint = pPointAnchor&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim pElement As IElement&lt;/P&gt;&lt;P&gt;pElement = pTextElement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim pTextSymbol As IFormattedTextSymbol&lt;/P&gt;&lt;P&gt;pTextSymbol = New TextSymbol&lt;/P&gt;&lt;P&gt;pTextSymbol.Background = pCallout&lt;/P&gt;&lt;P&gt;pTextSymbol.Color = pColor&lt;/P&gt;&lt;P&gt;pTextSymbol.Font = pFontDisp&lt;/P&gt;&lt;P&gt;pTextElement.Symbol = pTextSymbol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pElement.Geometry = pPointText&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pGraphicsContainer.AddElement(pElement, 0)&lt;/P&gt;&lt;P&gt;pGraphicsContainer.AddElement(pointElement, 0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 20:58:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/drawing-callout-text-element-in-mapview-with-fix/m-p/130996#M3423</guid>
      <dc:creator>helenchu</dc:creator>
      <dc:date>2015-01-13T20:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: drawing callout text element in mapview with fix distance from polygon centroid ?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/drawing-callout-text-element-in-mapview-with-fix/m-p/130997#M3424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can reach this using &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//002m000003w4000000" rel="nofollow noopener noreferrer" target="_blank"&gt;ITransform2D.Move Method&lt;/A&gt;&amp;nbsp; it will move your element dx units horizontally and dy units vertically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code should be like the following before you add your element to graphics container&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #303030;"&gt;Dim transform2d As ITransform2D = CType(pElement, ITransform2D)&lt;/SPAN&gt;
&lt;SPAN style="color: #303030;"&gt;'move your element by dX and dY in map units&lt;/SPAN&gt;
&lt;SPAN style="color: #303030;"&gt;transform2d.Move(dX, dY)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:21:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/drawing-callout-text-element-in-mapview-with-fix/m-p/130997#M3424</guid>
      <dc:creator>AhmedEl-Sisi</dc:creator>
      <dc:date>2021-12-11T07:21:28Z</dc:date>
    </item>
  </channel>
</rss>

