 |
Getting Started |
|
|
GetWptLocation Method
Returns the latitude and longitude of the specified waypoint in the current route.
Syntax
Visual Basic
object.GetWptLocation [in] WptName, [out] WptLatitude, [out] WptLongitude
Visual C++
object.GetWptLocation([in] WptName, [out] *pWptLatitude, [out] *pWptLongitude)
| Part
| Description |
| object |
An object expression that evaluates to a GPS ToolKit object. |
| WptName |
A VARIANT containing the waypoint ID (name).
|
| WptLatitude |
A VARIANT (type VT_BSTR/BSTR/VB String) containing the latitude of the specified waypoint.
|
| WptLongitude |
A VARIANT (type VT_BSTR/BSTR/VB String) containing the longitude of the specified waypoint.
|
Example
Visual Basic
Dim wptLatitude, wptLongitude
'Get info for waypoint "MYWPT"
myGPSToolKit.GetWptLocation "MYWPT", wptLatitude, wptLongitude
Visual C++
_variant_t vtWptLat, vtWptLon;
CString wptLat, wptLon;
// Get info for waypoint "MYWPT"
_variant_t vtWptID("MYWPT");
m_myGPSToolKit.GetWptLocation(vtWptID, &vtWptLat, &vtWptLon);
wptLat = (LPCSTR)(_bstr_t)vtWptLat;
wptLon = (LPCSTR)(_bstr_t)vtWptLon;
Remarks
- If latitude or longitude are not available for the specified
waypoint, the associated variable will be empty (type VT_EMPTY).
- Latitude and longitude are returned in the format defined in the
LatLonFormat property. Degree, minute, and second labels are defined
in the DegLabel, MinLabel, and
SecLabel properties, respectively.
- This property is not updated until the entire route waypoint list is sent by
the GPS. Because waypoint location data is transmitted an the rate of one waypoint per data cycle
(usually about 1 second), this data can take some time to update.
Returns
Nothing
Errors
None
See Also
WptsInRoute property, DestWptID property, OriginWptID property, LatLonFormat property,
DegLabel property, MinLabel property, SecLabel property, NavUpdate event
|