OpenLayers.Geometry.pointOnSegment

OpenLayers.Geometry.pointOnSegment = function(point,
segment)

Note that the OpenLayers.Geometry.segmentsIntersect doesn’t work with points

Parameters

point{Object} An object with x and y properties representing the point coordinates.
segment{Object} An object with x1, y1, x2, and y2 properties representing endpoint coordinates.

Returns

{Boolean} Returns true if the point is on the segment.

Close