About GPS ToolKit.NET Mobile
Introduction
Purchasing GPS ToolKit.NET
Redistributing GPS ToolKit.NET
License Agreement
Support
Getting Started
Getting Started
Setting up the GPS
Basic Concepts
GPS ToolKit Sample Projects
About GPS ToolKit Errors
Reference
GPSToolKit Class
Properties
BaudRate
ExtendedFixData
IsGPSConnected
IsPortOpen
LastPositionUpdateTime
NavigationData
PortName
Protocol
Position
Satellites
Speed
TrueCourse
Methods
AddRoute
AddTrack
AddWaypoint
AutoDetectGPS
Close
GetAvailableSystemPorts
GetGPSInfo
GetRoutes
GetSystemPorts
GetTracks
GetWaypoints
Open
ShutOffGPS
WriteRawBinaryToGPS
WriteRawToGPS
Events
GPSConnected
GPSDisconnected
NavigationUpdate
PositionUpdate
RawDataReceived
SatelliteUpdate
Supporting Classes
Altitude
Angle
Distance
ExtendedFixData
Properties
DGPSRefStationID
EstimatedHorizontalError
EstimatedPositionError
EstimatedVerticalError
FixMode
GeoidHeightAboveWGS84
HDOP
MagneticVariation
NumSatellitesInView
PDOP
TimeSinceLastDGPSUpdate
VDOP
GPSInfo
Latitude
Methods
ToDecimalDegreesString
ToDegreesMinutesString
ToDegreesMinutesSecondsString
Longitude
Methods
ToDecimalDegreesString
ToDegreesMinutesString
ToDegreesMinutesSecondsString
NavData
Properties
ActiveRoute
ArrivedAtDest
CrossTrackError
DestWptName
DestWptPosition
IsValid
MagBearingFromOriginToDest
OriginWptName
TrueBearingFromOriginToDest
TrueBearingToDestWpt
VelocityTowardDestWpt
Position
Methods
BearingFrom
BearingTo
DistanceTo
Route
Properties
Name
Waypoints
Satellite
Speed
Track
Properties
Color
DisplayTrack
Name
TrackPoints
TrackPoint
Waypoint
Collections
RouteCollection
SatelliteCollection
TrackCollection
TrackPointCollection
WaypointCollection

GetRoutes Method

Gets all routes from the GPS

Syntax

[Visual Basic]
object.GetRoutes()

[C#]
object.GetRoutes()

[C++]
object->GetRoutes()

Parameters

object

An object expression that evaluates to a GPSToolKit object.

Return Value

A RouteCollection object containing all the routes in the GPS

Remarks

  • This method returns every route stored in the GPS. To get a particular route, use this method and then iterate through the returned RouteCollection.htm object to find the route of interest.
  • This method is only supported when using the Garmin protocol.
  • It is not possible to delete a route programmatically; deleting a route can only be done from the GPS unit.
  • If there are many routes in the GPS, this method may take some time to execute.

Errors

If using the NMEA 0183 protocol, this method will return a NotSupportedException exception.

Example

[Visual Basic]
' Get all routes in the GPS
Dim GPSRoutes As RouteCollection
GPSRoutes = myGPSToolKit.GetRoutes()


[C#]
// Get all routes in the GPS
RouteCollection GPSRoutes = myGPSToolKit.GetRoutes();


[C++]
// Get all routes in the GPS
RouteCollection *GPSRoutes = myGPSToolKit->GetRoutes();

See Also

GPSToolKit.AddRoute method | RouteCollection class | Route class