CloudMade/Leaflet — pull request #595 by cvisto (2012-03-22 18:16:14+00:00)
Title: fix L.Polyline.closestLayerPoint

closestLayerPoint doesn't work. Because after it calls L.LineUtil._sqClosestPointOnSegment it checks "_sqDist" property of returned point. But that function doesn't set that property.

I changed somу lines in order to use this method