Click or drag to resize

WaypointRouteCalculatorRecalculateRoute Method

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Does the work of recalculating the route.

Namespace:  Telogis.GeoBase.Navigation
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public bool RecalculateRoute(
	RouteStop start,
	RouteStop dest,
	RoutingStrategy strategy,
	RouteProgress routeProgress
)

Parameters

start
Type: Telogis.GeoBaseRouteStop
The starting point of this route, e.g. current GPS Position.
dest
Type: Telogis.GeoBaseRouteStop
Not used.
strategy
Type: Telogis.GeoBase.RoutingRoutingStrategy
Not used.
routeProgress
Type: Telogis.GeoBase.RoutingRouteProgress
Not used.

Return Value

Type: Boolean

Return Value

Type: Boolean
True if the route has been recalculated.

Implements

IRouteCalculatorRecalculateRoute(RouteStop, RouteStop, RoutingStrategy, RouteProgress)
Remarks

The parameters dest, strategy and RouteProgress are taken from the original route provided to the constructor.

When RecalculateRoute is called then the route has to go to the nearest point on the leg between the first unvisited waypoint and its previous waypoint.

For example:

Start - W1 - W2 - W3 - End

If W1 has not been visited then calculate the route from the original Start to W1. Find the geographically nearest point on that route to the current location and call it P. Calculate a route CurPos - P - W1 - W2 - W3 - End (to do so, set P as a temporary waypoint, but don't consider it when working out which waypoints have been visited or not - i.e. P is discarded as soon as the new route is calculated).

If W3 has not been visited then calculate the route W2 - W3. Find the geographically nearest point on that route to the current location and call it P. Calculate a route CurPos - P - W3 - End.

See Also