This is a migrated thread and some comments may be shown as answers.

Polygon Point Coordinates

0 Answers 108 Views
Map
This is a migrated thread and some comments may be shown as answers.
ejb
Top achievements
Rank 2
ejb asked on 23 Dec 2011, 05:39 PM
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());
                }

No answers yet. Maybe you can help?

Tags
Map
Asked by
ejb
Top achievements
Rank 2
Share this question
or