polyline.pointAtLength(length)

Return a point on the polyline that lies length away from the beginning of the polyline.

If negative length is provided, the algorithm starts looking from the end of the polyline. If length is higher than the length of the polyline, the closest endpoint is returned instead. If the polyline contains no points, null is returned.