<?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 Re: creating balloon callout on graphics layer in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111370#M7281</link>
    <description>&lt;P&gt;I tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;balloonCallout.LeaderOffset = 20;&lt;/P&gt;&lt;P&gt;but didn't see any changes.&amp;nbsp; Is that the correct offset property you talked about ?&amp;nbsp; Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/89015"&gt;@JeremyWiles&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Oct 2021 17:56:01 GMT</pubDate>
    <dc:creator>LeLuong</dc:creator>
    <dc:date>2021-10-26T17:56:01Z</dc:date>
    <item>
      <title>creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111309#M7277</link>
      <description>&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;Has anyone successfully created a balloon callout on graphics layer by codes ?&amp;nbsp; I asked this question before with previous version of arcgis Pro.&amp;nbsp; I was under the impression with version 2.8 I should be able to do it but no luck so far.&amp;nbsp; Below is my codes.&amp;nbsp; I got all other properties correct but NO callout arrow.&amp;nbsp; &amp;nbsp;Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Not a callout" style="width: 142px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/26215i060804E5C1B1CA98/image-size/large?v=v2&amp;amp;px=999" role="button" title="callout1.PNG" alt="Not a callout" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Not a callout&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt; _subjectTextSymbol = await CreateBalloonCalloutAsync(ColorFactory.Instance.RedRGB);
.
.
.
 subjectLabelGraphic.Text = "Subject";
                            subjectLabelGraphic.Symbol = _subjectTextSymbol.MakeSymbolReference();
                            //Add the graphic label
                            graphicsLayer.AddElement(subjectLabelGraphic);
.
.
.


private static Task&amp;lt;CIMTextSymbol&amp;gt; CreateBalloonCalloutAsync(CIMColor textColor)
        {
            return QueuedTask.Run&amp;lt;CIMTextSymbol&amp;gt;(() =&amp;gt;
            {
                //create a text symbol
                var textSymbol = SymbolFactory.Instance.ConstructTextSymbol(textColor, 11, "Corbel", "Regular");
                //A balloon callout
                var balloonCallout = new CIMBalloonCallout();
                //set the callout's style
                balloonCallout.BalloonStyle = BalloonCalloutStyle.RoundedRectangle;
                //Create a solid fill polygon symbol for the callout.
                var polySymbol = SymbolFactory.Instance.ConstructPolygonSymbol(ColorFactory.Instance.GreyRGB, SimpleFillStyle.Solid);
                //Set the callout's background to be the black polygon symbol
                balloonCallout.BackgroundSymbol = polySymbol;
                //margin inside the callout to place the text
                balloonCallout.Margin = new CIMTextMargin
                {
                    Left = 5,
                    Right = 5,
                    Bottom = 5,
                    Top = 5
                };
                //assign the callout to the text symbol's callout property
                textSymbol.Callout = balloonCallout;
                return textSymbol;
            });
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 16:06:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111309#M7277</guid>
      <dc:creator>LeLuong</dc:creator>
      <dc:date>2021-10-26T16:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111336#M7279</link>
      <description>&lt;P&gt;Do you have an offset?&amp;nbsp; It will not make the callout arrow unless there is an offset.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 16:55:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111336#M7279</guid>
      <dc:creator>JeremyWiles</dc:creator>
      <dc:date>2021-10-26T16:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111370#M7281</link>
      <description>&lt;P&gt;I tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;balloonCallout.LeaderOffset = 20;&lt;/P&gt;&lt;P&gt;but didn't see any changes.&amp;nbsp; Is that the correct offset property you talked about ?&amp;nbsp; Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/89015"&gt;@JeremyWiles&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 17:56:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111370#M7281</guid>
      <dc:creator>LeLuong</dc:creator>
      <dc:date>2021-10-26T17:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111379#M7282</link>
      <description>&lt;P&gt;In Pro, if you want it to show the leader line , you can do right-click -&amp;gt; show/hide leader line but I'm unable to&amp;nbsp; find that property in proSDK.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 18:10:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111379#M7282</guid>
      <dc:creator>LeLuong</dc:creator>
      <dc:date>2021-10-26T18:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111405#M7283</link>
      <description>&lt;P&gt;I believe it is LeaderOffset, and your LeaderTolerance should be a lower number than the leader offset.&amp;nbsp; Have you changed the LeaderTolerance proeprty?&lt;/P&gt;&lt;P&gt;Here is an example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;balloonCallout.Margin = New CIMTextMargin With {.Left = 2.5, .Right = 2.5, .Bottom = 2, .Top = 2}
balloonCallout.LeaderOffset = 10
balloonCallout.LeaderTolerance = 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 19:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111405#M7283</guid>
      <dc:creator>JeremyWiles</dc:creator>
      <dc:date>2021-10-26T19:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111420#M7284</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/89015"&gt;@JeremyWiles&lt;/a&gt;&amp;nbsp;.&amp;nbsp; I tried what you suggested.&amp;nbsp; No luck! &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Have you tried it ?&amp;nbsp; Did you get the balloon ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 19:42:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111420#M7284</guid>
      <dc:creator>LeLuong</dc:creator>
      <dc:date>2021-10-26T19:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111488#M7287</link>
      <description>&lt;P&gt;Looks like the leader is part of the &lt;U&gt;&lt;STRONG&gt;&lt;EM&gt;graphic&lt;/EM&gt; &lt;/STRONG&gt;&lt;/U&gt;not the symbol. I made a text graphic in the UI and added a leader to it then deconstructed the CIM xml.&lt;/P&gt;&lt;P&gt;Note that, w/ a map via graphics layer, the leader position is specified in map units (not page units/points). In my case, the base map is the World Topo in Web Mercator, meters. The leader offset (in the symbol) seems to be the minimum distance beyond which a leader is shown.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="callout.png" style="width: 300px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/26254i6106AFEAC91F1264/image-size/large?v=v2&amp;amp;px=999" role="button" title="callout.png" alt="callout.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var graphicsLayer = MapView.Active.Map.TargetGraphicsLayer;
      //This is your method
      var textSymbol = await CreateBalloonCalloutAsync(ColorFactory.Instance.WhiteRGB);
      var textGraphic = new CIMTextGraphic()
      {
        Text = "Callout Text",
        Placement = Anchor.CenterPoint,
        Symbol = textSymbol.MakeSymbolReference(),
        Shape = MapView.Active.Extent.Center,
        //Leaders is an array of CIMLeader - add a Leader point to show
        //the leader, remove Leaders to hide the leader.
        Leaders = new CIMLeader[] { new CIMLeaderPoint()
        {
          //for a graphics layer, the leader location is in map coords
          Point = MapPointBuilderEx.CreateMapPoint(MapView.Active.Extent.Center.X - 5000,
                                                      MapView.Active.Extent.Center.Y - 1500)
        }
        }
      };
      QueuedTask.Run(() =&amp;gt;
      {
        graphicsLayer.AddElement(textGraphic);
      });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 23:31:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111488#M7287</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2021-10-26T23:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111896#M7290</link>
      <description>&lt;P&gt;I had never considered that there was a CIMLeader / CIMLeaderPoint in the graphic.&lt;/P&gt;&lt;P&gt;In my case, I did not want a leader.&amp;nbsp; I wanted to be sure there was no leader.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I am curious, what does it look like if you added more than one CIMLeaderPoint to the array?&amp;nbsp; I don't think I have seen any label that looked like that in ArcGIS Pro or ArcMap before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just creating it on a layout, I can only see one place for a leader point.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeremyWiles_0-1635373058659.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/26365i6B0195EA2FDAFCFE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeremyWiles_0-1635373058659.png" alt="JeremyWiles_0-1635373058659.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then there is also the option to "Remove Leader."&amp;nbsp; There is never any option to add another vertex to an array of leader points.&amp;nbsp; I am very curious what that would look like.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeremyWiles_1-1635373058591.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/26366i8F4A5E3B9344C42D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeremyWiles_1-1635373058591.png" alt="JeremyWiles_1-1635373058591.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 22:18:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111896#M7290</guid>
      <dc:creator>JeremyWiles</dc:creator>
      <dc:date>2021-10-27T22:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111914#M7291</link>
      <description>&lt;P&gt;If you find something, I would love to see it.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 22:19:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1111914#M7291</guid>
      <dc:creator>JeremyWiles</dc:creator>
      <dc:date>2021-10-27T22:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1112134#M7295</link>
      <description>&lt;P&gt;to coin a phrase: just do it. this is possible through the api and, apparently, not the ui.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="callout2.png" style="width: 385px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/26414i7A90DF7631ADC646/image-size/large?v=v2&amp;amp;px=999" role="button" title="callout2.png" alt="callout2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var textGraphic = new CIMTextGraphic() {
  Text = "Callout Text",
  Placement = Anchor.CenterPoint,
  Symbol = textSymbol.MakeSymbolReference(),
  Shape = MapView.Active.Extent.Center,
  //Leaders is an array of CIMLeader - add a Leader point to show
  //the leader, remove Leaders to hide the leader.
  Leaders = new CIMLeader[] { 
    new CIMLeaderPoint(){
      Point = MapPointBuilderEx.CreateMapPoint(
          MapView.Active.Extent.Center.X - 5000,																						 
          MapView.Active.Extent.Center.Y - 1500)
    },
    new CIMLeaderPoint(){
      Point = MapPointBuilderEx.CreateMapPoint(
          MapView.Active.Extent.Center.X - 3500,																						 
          MapView.Active.Extent.Center.Y - 2500)
    },
    new CIMLeaderPoint(){
      Point = MapPointBuilderEx.CreateMapPoint(
          MapView.Active.Extent.Center.X - 500,																						 
          MapView.Active.Extent.Center.Y - 5000)
    }
  }
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 15:10:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1112134#M7295</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2021-10-28T15:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1112190#M7296</link>
      <description>&lt;P&gt;Yayyyy! I got it.&amp;nbsp; Thank yo very much &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145101"&gt;@CharlesMacleod&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 17:06:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1112190#M7296</guid>
      <dc:creator>LeLuong</dc:creator>
      <dc:date>2021-10-28T17:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1112201#M7298</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/89015"&gt;@JeremyWiles&lt;/a&gt;&amp;nbsp;In my case, it'll loop through many polygons in query and create a label for each of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;                    using (var foundCursor = parcelLayer.Search(accountQf))
                    {
                        while (foundCursor.MoveNext())
                        {
                            using (var row = foundCursor.Current)
                            {
                                //The parcel is found. Get the center point to label at.
                                var shape = row as Feature;
                                var poly = shape.GetShape() as Polygon;
                                var maxY = poly.Extent.YMax + 10;
                                var maxX = poly.Extent.XMax + 10;
                                MapPoint maxPoint = MapPointBuilder.CreateMapPoint(maxX, maxY);

                                var textSymbol = await CreateBalloonCalloutAsync(ColorFactory.Instance.BlueRGB);
                                var textGraphic = new CIMTextGraphic()
                                {
                                    Text = $"Comp {counter}",
                                    Placement = Anchor.CenterPoint,
                                    Symbol = textSymbol.MakeSymbolReference(),
                                    Shape = maxPoint,

                                    Leaders = new CIMLeader[] { new CIMLeaderPoint()
                                        {
                                          //for a graphics layer, the leader location is in map coords
                                          Point = MapPointBuilderEx.CreateMapPoint(poly.Extent.Center.X,
                                                                                      poly.Extent.Center.Y)
                                        }
                                        }
                                };

                                graphicsLayer.AddElement(textGraphic);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CompLabel2.PNG" style="width: 200px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/26426i2DE8A0A14A794FF2/image-size/small?v=v2&amp;amp;px=200" role="button" title="CompLabel2.PNG" alt="CompLabel2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 17:29:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1112201#M7298</guid>
      <dc:creator>LeLuong</dc:creator>
      <dc:date>2021-10-28T17:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: creating balloon callout on graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1112505#M7304</link>
      <description>&lt;P&gt;Thanks for the reply&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/67397"&gt;@LeLuong&lt;/a&gt;.&amp;nbsp; That is very interesting that it is possible through the SDK but on the UI.&amp;nbsp; Also that it allows that in the first place.&lt;/P&gt;&lt;P&gt;I can only hope that these types of features that are not available in the UI will be available in the SDK in the future.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 18:44:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-balloon-callout-on-graphics-layer/m-p/1112505#M7304</guid>
      <dc:creator>JeremyWiles</dc:creator>
      <dc:date>2021-10-29T18:44:31Z</dc:date>
    </item>
  </channel>
</rss>

