Order of vertex of polygons is shifted when using DisplayCaptureGeometry activity
Hi,
The tool I am working on is a tool that must allow user to create a polygon and then display their coordinates in a form so that they can edit it. When I started playing with the coordinates I noticed things where working differently than I expected. The order of vertices in the newly created geometry did not match the order of the vertices when I digitized the geometry. The DisplayCaptureGeometryForm activity shuffle the vertices and the vertices of the geometry it returns are not ordered the way you typed them.
Basically the point on which I terminate the geometry by double clicking now becomes the first point of the polygon. When you think about it with the user's perspective, this is confusing. When the coordinates get displayed to the user, what the user thinks is point 3 is now point 1 and he might try to type a new coordinates to make that point more accurate. That won't make much sense to him so 2 questions.
- Is that a bug or a feature?
- What workaround do I have not to confuse my users?
Fabien
For who want the details, this the methodology I used to confirm the DisplayCaptureGeometryForm activity is messing up the order of vertices.
Just after the DisplayCaptureGeometryForm activity is done, I use an alert to display the geometry as json. Then I take the coordinates of that geometry, and display them in ArcMap.
I realize that the order of the polygon vertices is not the order of the coordinates I typed. (wkid is 26910.)
The sequence of coordinates I draw:
5449908.7376321247,492634.65231956018
5449922.9612770965, 491603.43805908051
5450790.6036203969,491560.767124164
(I double-click at the last coordinate instead of one click to finish the geometry)
What I get when I display the geometry as json:
5450790.6036203969,491560.767124164
5449908.7376321247, 492634.65231956018
5449922.9612770965,491603.43805908051
Fabien
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
0 Kommentare