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,
	Polygon shape,
	bool closeShape,
	bool flatEarth
)

Parameters

point
Type: Reimers.Core.Maps..::..ICoordinates
The given location.
shape
Type: Reimers.Google.Map..::..Polygon
The Polygon to measure to.
closeShape
Type: System..::..Boolean
Indicates whether a line should be closed.
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