Click the map two or more times to create polylines. Distance from mouse to each line is calculated in pixels

Thanks to joe_ <joe_@mailbag.com> for his adjustments to the math:
1. Work with finite segments rather than infinite lines
2. Special case of vertical lines.
Clear