Calculates the closest LatLng on a Polyline from a given location.

Namespace: Reimers.Google.Map.Accessories
Assembly: Reimers.Google.Map (in Reimers.Google.Map.dll) Version: 5.3.95.699 (5.3.95.699)

Syntax

C#
public static ICoordinates ClosestPointOnLine(
	ICoordinates point,
	Polyline line,
	bool flatEarth
)

Parameters

point
Type: Reimers.Core.Maps..::..ICoordinates
The given location.
line
Type: Reimers.Google.Map..::..Polyline
The Polyline to measure to.
flatEarth
Type: System..::..Boolean
A Boolean value indicating whether the calculation should be based on a flat earth.

Return Value

A LatLng.

Remarks

Flat Earth calculations give higher precision for calculations over shorter distances.

See Also