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...
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()
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.