Select to view content in your preferred language

Measure Segments

798
4
08-02-2011 07:24 AM
PhilipThompson
Emerging Contributor
Is it possible to report back segment lengths before calculating the entire length (or area)?

The DrawSurface_DrawComplete event gives the entire geometry.
DrawSurface_VertexAdded doesn't fire on the very first Map click.
DrawSurface_DrawBegin fires on the first Map click but doesn't give you that MapPoint.
0 Kudos
4 Replies
PhilipThompson
Emerging Contributor
This feels like a bug to me. DrawSurface_VertexAdded should fire after every Vertex is added.
0 Kudos
JenniferNery
Esri Regular Contributor
Thanks for your feedback. I have entered a work item for raising VertexAdded right after DrawBegin. We'll try to fix this bug in the future versions of the API.

If you need segment lengths, you can use MeasureAction http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#UtilityActions or write your own Measure tool using Draw.
0 Kudos
PhilipThompson
Emerging Contributor
Thanks Jennifer, knowing that VertexAdded not firing is recognized as a bug and will be fixed at a future release may be sufficient for my needs.

You mention "write your own Measure tool using Draw." I thought that's what I was doing - following the Utilities/Line Lengths sample but being hampered by the VertexAdded event not firing on the first map click. Did you mean something else?
0 Kudos
ChrisTallman
Deactivated User
Philip I'm in the same boat I thought I was writing my own measure tool but without a way to capture the first vertex I have not found a way to get a length of that first segment...  Any ideas on a work around before the next API release would be helpful!  The measure behavior isn't sufficient enough, if there was a way to capture the lengths from that utility it would be much more helpful.  Maybe that's something that could be worked on also!

Chris


Thanks Jennifer, knowing that VertexAdded not firing is recognized as a bug and will be fixed at a future release may be sufficient for my needs.

You mention "write your own Measure tool using Draw." I thought that's what I was doing - following the Utilities/Line Lengths sample but being hampered by the VertexAdded event not firing on the first map click. Did you mean something else?
0 Kudos