I have a DrawFeature control that I want use to draw a line between two features (on a separate layer from the lines). I use a Snapping control to snap the cursor to the features.
Any ideas on how can the drawing be limited so that it only allows to end the line on a feature?
Illustration (O represents a feature):
O---O allowed O--- not allowed --- not allowed