danielrouleau

AddVertex on Draw object uses mouse location instead of geometry passed in

Discussion created by danielrouleau on Aug 5, 2013
Latest reply on Aug 8, 2013 by danielrouleau
Hello there, I seem to be running into what was described in this thread in the 10.1.1 WPF Runtime and was wondering if anyone else had found any workarounds, since the bug seems to still be present.

Briefly described, I have enabled a Draw object using PolyLine draw mode. I click with the mouse on a location of the map to initiate drawing. I then use a keyboard key to pull up an input form (much like Ctrl-A to choose Direction in ArcMap while creating a polyline) and type in the angle and length of the segment I would like to draw. Upon hitting enter, the dialog is dismissed and I call AddVertex on the draw object with the MapPoint I have calculated. I do this several times, and call CompleteDraw. What I then see is that the geometry for the polyline is not the series of MapPoints I have specified via AddVertex, but instead the locations that the mouse cursor was over while the dialog had focus, is instead used for the geometry of the polyline.

I attached an annotated screenshot of the resulting data to show what was expected based on the MapPoints entered, and the resulting geometry of the polyline that was created.

Any advice? I tried moving the cursor with code to the same location as that which I was calling AddVertex on, but it didn't appear to affect the geometry used to create the line.

Attachments

Outcomes