I have seen the examples presented here of how to draw a line but the examples only show how to do it with the mouse, by clicking.
What I want to do is draw
I've never done it myself before, but I know OpenSteetMap does it. For example:
http://www.openstreetmap.org/?way=23649627
No idea how difficult it would be to work through their code.