|
GPS ToolKit.NET
AddWaypoint Method
Adds a waypoint to the GPS
Syntax
[Visual Basic]
object.AddWaypoint(Waypoint)
[C#]
object.AddWaypoint(Waypoint)
[C++]
object->AddWaypoint(Waypoint)
Parameters
object
An object expression that evaluates to a GPSToolKit object.
Waypoint
A Waypoint object.
Return Value
None
Remarks
- This method adds a waypoint to the GPS. If a waypoint with the same name exists on the GPS, most GPS units will replace the existing waypoint with the new waypoint.
- This method is only supported when using the Garmin protocol.
- It is not possible to delete a waypoint programmatically; deleting a waypoint can only be done from the GPS unit.
- If GPS memory is full, the waypoint will not be added and this method will return without error.
Errors
If using the NMEA 0183 protocol, this method will return a NotSupportedException exception.
Example
[Visual Basic]
' Create a position for the waypoint
Dim pos As Position
pos = New Position(42.11, -75.40)
' Create the waypoint
Dim wpt As Waypoint
wpt = New Waypoint("My Waypoint", pos)
' Add the waypoint to the GPS
myGPSToolKit.AddWaypoint(wpt)
[C#]
// Create a position for the waypoint
Position pos = new Position(42.11, -75.40);
// Create the waypoint
Waypoint wpt = new Waypoint("My Waypoint", pos);
// Add the waypoint to the GPS
myGPSToolKit.AddWaypoint(wpt);
[C++]
// Create a position for the waypoint
Position *pos = new Position(42.11, -75.40);
// Create the waypoint
Waypoint *wpt = new Waypoint("My Waypoint", pos);
// Add the waypoint to the GPS
myGPSToolKit->AddWaypoint(wpt);
See Also
GPSToolKit.GetWaypoints method | GPSToolKit.AddRoute method |
GPSToolKit.AddTrack method | Waypoint class
|