OpenLayers has a
OpenLayers.Control.Measure class to implement a measure tool.
There is a measure and measure-partial event, both which are passed a variable containing the total distance. Is it possible to get the last segment length?
CLARIFY: When I say last segment length... you see how you can draw 2 or 3 lines in one go and it will give you the total distance drawn across all lines? That's great. What I'm after is the length of the last line the user drew only.