Polygon Point Coordinates

1 posts, 0 answers
  1. ejb
    ejb avatar
    6 posts
    Member since:
    Dec 2006

    Posted 23 Dec 2011 Link to this post

    I'm drawing polyline objects, and when plotted I'm making them draggable. How can I get the coordinates for each point of the polyline after it's been dragged to a different location on the map?

    Update: Figured it out (doh!):

     MapPolygon thePolygon = item as MapPolygon;
                    if (thePolygon != null)
                    {
                        int pointCount = thePolygon.Points.Count - 1;
                        Debug.WriteLine("Number of Points: "+ pointCount);
                    }

                    Location[] locArray = thePolygon.Points.ToArray();

                    foreach(Location loc in locArray)
                    {
                        Debug.WriteLine("" + loc.Latitude.ToString());
                        Debug.WriteLine("" + loc.Longitude.ToString());
                    }
Back to Top