polyline.closestPointLength(point)
Return the length of the polyline up to the point that lies closest to point.
point
If the polyline contains no points, null is returned.
null