<?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: Trouble with GetCenter() in ArcGIS Explorer Desktop Questions</title>
    <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/trouble-with-getcenter/m-p/557638#M3347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Shelly-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...this worked wonderfully! I was calling the GetCenter() method incorrectly...thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Josh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Aug 2010 10:53:29 GMT</pubDate>
    <dc:creator>JoshuaPersson</dc:creator>
    <dc:date>2010-08-06T10:53:29Z</dc:date>
    <item>
      <title>Trouble with GetCenter()</title>
      <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/trouble-with-getcenter/m-p/557636#M3345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...could anyone give any insight on how to use GetCenter() in VB to return the center of a polygon? I have created a Dock Window where the user can select a row in DataGridView and the selected polygon highlights with a new graphic. I would like to add a pop-up for the selected polygon, but I need the center point to tag the popup to which I am not having any luck in doing...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your help&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Josh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 19:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-explorer-desktop-questions/trouble-with-getcenter/m-p/557636#M3345</guid>
      <dc:creator>JoshuaPersson</dc:creator>
      <dc:date>2010-08-05T19:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with GetCenter()</title>
      <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/trouble-with-getcenter/m-p/557637#M3346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;how to use GetCenter() in VB to return the center of a polygon? [...] I need the center point to tag the popup to which I am not having any luck in doing...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi - it's pretty straightforward to do this - some code is below which you can try out in a Button - after the user tracks a Polygon on the map, a temporary Graphic will be added, with a Popup that has a Target which is the center of the Polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim pgon As ESRI.ArcGISExplorer.Geometry.Polygon = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.TrackPolygon()
Dim pt = pgon.GetCenter()

Dim disp As ESRI.ArcGISExplorer.Mapping.MapDisplay = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay
disp.Graphics.Add(New Graphic(pgon, Symbol.Fill.Solid.Blue, "Note"))

Dim tempPopup As Popup = New Popup(disp, Nothing, String.Format("Popup at {0},{1}", pt.X, pt.Y), "Note With Target", pt)
tempPopup.Activate()&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; You dont describe what kind of trouble you're having with GetCenter, but if the code above works for you, I'd suggest looking at the Polygon geometry that you're getting back from your DockWindow - check its a valid geometry, check IsEmpty. What do you actually get back from GetCenter - is it null, or a valid Point?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:04:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-explorer-desktop-questions/trouble-with-getcenter/m-p/557637#M3346</guid>
      <dc:creator>ShellyGill2</dc:creator>
      <dc:date>2021-12-12T00:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with GetCenter()</title>
      <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/trouble-with-getcenter/m-p/557638#M3347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Shelly-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...this worked wonderfully! I was calling the GetCenter() method incorrectly...thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Josh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Aug 2010 10:53:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-explorer-desktop-questions/trouble-with-getcenter/m-p/557638#M3347</guid>
      <dc:creator>JoshuaPersson</dc:creator>
      <dc:date>2010-08-06T10:53:29Z</dc:date>
    </item>
  </channel>
</rss>

