MobileForms Toolkit Documentation

GeoRoute.GetRoute Method (GeoPoint, GeoPoint, GeoPoint[])

Initializes the synchronous route calculation request.

public GeoRouteResult GetRoute(
GeoPoint src,
GeoPoint dst,
params GeoPoint[] waypoints
);

Parameters

src
An GeoPoint object representing the source location.
dst
An GeoPoint object representing the target location.
waypoints
Optional array of GeoPoint objects representing the locations that must be visited before reaching the target.

Return Value

A GeoRouteResult objects representing the result of the route calculation.

Remarks

A call to this method blocks the calling thread until the route calculation request completes. It either returns a valid GeoRouteResult object or throws a ServiceRequestException describing an error that occurred during the request processing.

Calling this method from the main thread is not recommended. Mind that the request makes a HTTP connection to the location service provider and downloads the result from Internet. Consider using the asynchronous method GetRouteAsync to do this job on a background thread.

Exceptions

Exception TypeCondition
ServiceRequestExceptionGeoRoute request failed
NotSupportedExceptionA service provider specified by ServiceProvider property does not support this kind of service.

See Also

GeoRoute Class | Resco.Location.Services.GeoRoute Namespace | GeoRoute.GetRoute Overload List