Click or drag to resize

Route Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A Route consists of a series of RouteStops. The Route can generate point to point directions and optimize multi-stop routes.
Inheritance Hierarchy

Namespace:  Telogis.GeoBase.Routing
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
[SerializableAttribute]
public class Route : IRoute, IMapRenderer, 
	IMapMouseHandler, IDisposable

The Route type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleRoute
Create a new, empty, Route without any RouteStops.
Public methodCode exampleRoute(RouteStop, RouteStop)
Create a new route with given start and end points.
Top
Properties
  NameDescription
Public propertyBondedLinks
Sets the bonded links. Routes calculated with this property set will not deviate from the provided list of links.
Public propertyCalculated
Check if this route needs to be calculated.
Public propertyCurrentTime
Get or set the current time, as a DateTime. The time is in UTC.
Public propertyCustomRoutingAccessKeys Obsolete.
Gets or sets the custom routing access keys for this route. For internal use only.
Public propertyEnd
The end location of this route.
Public propertyMapMouseEventsHandler
Gets the events object for the list - Always null.
Public propertyPersistNetwork
Gets or sets a flag that signals whether to keep the routing network in memory after the route has been calculated. This uses more memory but speeds recalculation of the route when using multiple routing strategies.
Public propertyRequiredRendermodes
Gets the RenderMode required by this Route.
Public propertyRouteProgress
Gets or sets the RouteProgress delegate used to calculate the progress made as the user travels along the route.
Public propertyStart
Get or set the starting location of route.
Public propertyStopCount
Return the number of RouteStops on the route.
Public propertyStrategy
Sets the RoutingStrategy used to optimize stops and calculate directions. Default is RoutingStrategyFastest.
Public propertyVehicleSpec
The specifications of the vehicle to drive the route.
Top
Methods
  NameDescription
Public methodAddStop(RouteStop)
Adds a RouteStop at the most logical place in the list. Multiple stops at the same location are ignored.
Public methodAddStop(RouteStop, Int32)
Adds a RouteStop at the specified location in the list.
Public methodAddStopAtEnd
Adds a RouteStop at the end of the list of stops.
Public methodAddStops
Adds all the supplied RouteStop objects to the route at the most logical places in the list.
Public methodCalculate
Calculates the route, from Start to End through intervening RouteStops.
Public methodCalculate(CancellationToken)
Calculates the route, from Start to End allowing cancellation using a CancellationToken.
Public methodCalculate(UnitSystem)
Calculates the route, from Start to End through intervening RouteStops.
Public methodCalculate(UnitSystem, CancellationToken)
Calculates the route, from Start to End allowing cancellation using a CancellationToken.
Public methodCalculate(UnitSystem, IAsyncDirectionsHandler)
Calculates the route, from Start to End through intervening RouteStops.
Public methodCalculate(UnitSystem, IAsyncDirectionsHandler, CancellationToken)
Calculates the route, from Start to End allowing cancellation using a CancellationToken.
Public methodCalculateCostMatrix
Calculates a matrix of costs to travel from and to each stop in the route.
Public methodCalculateCostMatrix(CancellationToken)
a matrix of costs to travel from and to each stop in the route allowing cancellation using a CancellationToken. Requests the cancellation of a CalculateCostMatrix method calculation using a CancellationToken.
Public methodClear
Clear all RouteStops and Breaks, including Start and End.
Public methodClearStops
Clear all RouteStops and Breaks with specific locations on the route - but not the start and end stops.
Public methodCreateConstraint
Generate a new constraint for this route.
Public methodDeleteStop
Removes the given RouteStop from the route. Note that if an OptimizeStops() operation has been performed on the Route, the original RouteStops may have been replaced.
Public methodStatic memberDeserialize
Deserialize a Route after it has previously been serialized using the Serialize method.
Public methodDispose
Dispose of this route object.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodForceRecalculate
Force the route to be recalculated. This should be called if anything the route is unaware of changes.
Public methodFromXml
Clear any existing RouteStops from our route and load a new set of RouteStops from XML (passed to this method as a XmlNode.
Public methodCode exampleGetConstraints(LatLon)
Return a list of ConstraintLinks for the given link location.
Public methodCode exampleGetConstraints(LatLon, Boolean)
Return a list of ConstraintLinks for the given link location.
Public methodGetDirections
Calculate the route and return a representative Directions object. The UnitSystem for the directions is taken from Units.
Public methodGetDirections(CancellationToken)
Public methodGetDirections(String)
Calculate the route and return a representative Directions object using the given culture.
Public methodGetDirections(UnitSystem)
Calculate the route and return a representative Directions object using the specified UnitSystem.
Public methodGetDirections(String, CancellationToken)
Requests the cancellation of a GetDirections(String) method calculation using a CancellationToken.
Public methodGetDirections(UnitSystem, String)
Calculate the route and return a representative Directions object using the specified UnitSystem and culture.
Public methodGetDirections(UnitSystem, CancellationToken)
Requests the cancellation of a GetDirections(UnitSystem) method calculation using a CancellationToken.
Public methodGetDirections(UnitSystem, String, CancellationToken)
Requests the cancellation of a GetDirections(UnitSystem, String) method calculation using a CancellationToken.
Public methodCode exampleGetDirections(UnitSystem, String, IAsyncDirectionsHandler)
Calculate the route and return a representative Directions object using the specified UnitSystem and culture.
Public methodGetDirections(UnitSystem, String, IAsyncDirectionsHandler, CancellationToken)
Gets the Directions for the route using the specified units. Directions events are sent to 'handler' as directions are built. Calculation of the directions can be cancelled using the CancellationToken parameter.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetPath
Gets the Directions for the route without any textual instructions.
Public methodGetPath(CancellationToken)
Gets the Directions for the route without any textual instructions.
Public methodGetQuickDirections
Calculate the route and return a Directions object, without generating natural language directions or checking for route legality.
Public methodGetQuickDirections(CancellationToken)
Public methodCode exampleGetRouteHighlight
Get the likely route that was taken between the points in a given route history, without generating natural language directions or checking for route legality.
Public methodGetRouteHighlight(CancellationToken)
Public methodCode exampleGetRouteHighlight(String)
Reads point data from a file, and gets the likely route that was taken between the points in the route, without generating natural language directions or checking for route legality.
Public methodGetRouteHighlight(String, CancellationToken)
Requests the cancellation of a GetRouteHighlight(String) method calculation using a CancellationToken.
Public methodGetStop
Gets the RouteStop at index.
Public methodGetTimeAndDistance(DistanceUnit, Double, TimeSpan)
Calculate the time and distance for this route.
Public methodGetTimeAndDistance(DistanceUnit, Double, TimeSpan, CancellationToken)
Public methodGetTimeAndDistance(DistanceUnit, Double, TimeSpan, LinkCost)
Calculate the time and distance for this route.
Public methodGetTimeAndDistance(DistanceUnit, Double, TimeSpan, LinkCost, CancellationToken)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodCode exampleGetVehicleSpeedLimit(StreetLink, SpeedUnit) Obsolete.
Gets the speed limit on a link for a vehicle whose specifications are in the VehicleSpec of this Route. Only supported in local mode.
Public methodCode exampleGetVehicleSpeedLimit(LatLon, UInt64, SpeedUnit)
Gets the speed limit on a link for a vehicle whose specifications are in the VehicleSpec of this Route. Only supported in local mode.
Public methodHitTest
Check if there is a hit on any of the RouteStops in this route.
Public methodLoadRouteHighlightFromCsv
Loads a route from a csv given the filename (and path) of that csv. The csv requires these Headers: Lat, Lon, Speed, Heading, TimeSincePreviousStop
Public methodOptimizeStops
Reorders the RouteStop for an optimal route, according to the current Strategy.
Public methodOptimizeStops(DateTime)
Reorder the route stops for an optimal route, according to the current Strategy.
Public methodRender
Renders the route on the given IMap.
Public methodSerialize
Serialize the Route to the supplied stream. The serialized Route can be deserialized using the Deserialize method.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodToXmlString
Convert this route to XML. The XML is added to the passed in XmlNode.
Top
Fields
  NameDescription
Public fieldStatic memberMemoryLimit
The memory limit for a directions calculation for all routes, in megabytes. Defaults to 0, which indicates no memory limit.
Top
Remarks
See Also