How to retrieve the coordinates of a polygon graphics?
private void GetCoordonnatesPolygonGraphics(Graphic graphic)
{
// Here ????
}
private void AddPolygonGraphics()
{
string coordinateString1 = "130,5.59 118.42,3.92 117.3,23.3 143.2,22.9 130,5.59";
GraphicsLayer graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
PointCollectionConverter pointConverter = new PointCollectionConverter();
ESRI.ArcGIS.Client.Geometry.PointCollection pointCollection1 =
pointConverter.ConvertFromString(coordinateString1) as ESRI.ArcGIS.Client.Geometry.PointCollection;
ESRI.ArcGIS.Client.Geometry.Polygon polygon1 = new ESRI.ArcGIS.Client.Geometry.Polygon();
polygon1.Rings.Add(pointCollection1);
Graphic graphic = new Graphic()
{
Geometry = mercator.FromGeographic(polygon1),
Symbol = LayoutRoot.Resources["DefaultFillSymbol"] as Symbol
};
graphicsLayer.Graphics.Add(graphic);
}
Thank'sFabiano