Click or drag to resize

MultiThreadMatrixGetDistance Method

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Get the distance (in meters) between two points.

Namespace:  Telogis.GeoBase.Routing
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public double GetDistance(
	LatLon from,
	LatLon to
)

Parameters

from
Type: Telogis.GeoBaseLatLon
The LatLon of the first point.
to
Type: Telogis.GeoBaseLatLon
The LatLon of the second point.

Return Value

Type: Double
The distance in meters between the two specified LatLons.
Examples
C#
//Create stops
RouteStop stop_A = new RouteStop(33.83818, -117.90488);
RouteStop stop_B = new RouteStop(33.82960, -117.90041);

//Create new MultiThreadMatrix
//    * RouteStop array
//    * strategy -> RoutingStrategyFastest
MultiThreadMatrix myMTM = new MultiThreadMatrix(new RouteStop[] {stop_A, stop_B }, new RoutingStrategyFastest());

//Get distance
string sDist = ((myMTM.GetDistance(stop_A.Location, stop_B.Location)) / 1000).ToString("0.###");

//Output to console
Console.WriteLine("Distance between stop_A and stop_B = " + sDist + Environment.NewLine);
See Also