Sub Tryclosecurrentopeneddialogs( ); Sub Switchmap( String As Afilename); Sub Getlocationinfo( Alongitude As Long, Alatitude As Long); Sub Navigatetocoordinate( Alongitude As Long, Alatitude As Long, Aname As String) - TomTom Navigator SDK Installation And Use Manual

Version 3.0 build 193
Table of Contents

Advertisement

5. Communicating with TomTom Navigator from Visual Basic
Switches TomTom Navigator to the navigation view. Useful because various API calls only work in the
navigation view.

5.2.5. Sub TryCloseCurrentOpenedDialogs( )

Supported Since: TTN 1.42
Tries to close any opened dialogs on top. Useful for API calls like navigating to a location, which won't
work when a dialog is on screen. Some dialogs cannot be closed, so this operation might fail.

5.2.6. Sub SwitchMap( String As aFileName)

Command Parameters:
• String As aFileName: map to switch to
Supported Since: TTN 3.0
Switch to the map specified by the full name and path of the .PNA file.

5.2.7. Sub GetLocationInfo( aLongitude As Long, aLatitude As Long)

Command Parameters:
• aLongitude As Long: Longitude specified in WGS84 format (in millionths of degree)
• aLatitude As Long: latitude specified in WGS84 format (in millionths of degree)
Returns: 0 if successful, non−zero value otherwise.
Supported Since: TTN 2.25
Get information about the location closest to the given point. In other words, perform reverse
geocoding, or 'geodecoding'. The street address will be available in the following read only properties:
Property LocationType As Long: Type of the given location
Property LocationStreet As String: Street name of the given location
Property LocationHouseNr1 As Long: First house number close to the given location
Property LocationHouseNr2 As Long: Second house number close to the given location
5.2.8. Sub NavigateToCoordinate( aLongitude As Long, aLatitude As
Long, aName As String)
Command Parameters:
• aLongitude As Long: longitude specified in WGS84 format (in millionths of degree)
• aLatitude As Long: latitude specified in WGS84 format (in millionths of degree)
• aName As String: name of the location
Supported Since: TTN 1.42
Navigates to a location specified in WGS84 format (longitude and latitude in millionths of degree).
Example:
The following example call instructs TomTom Navigator to plan a route to a point somewhere in
Amsterdam, the Netherlands.
Sub NavigateToAmsterdam
On Error GoTo NavigateToAmsterdam_Error
Call TTNav.SwitchToNavigatorView
Call TTNav.NavigateToCoordinate(4860000, 52380000, "Amsterdam")
Call TTNav.BringNavigatorToForeground
16

Advertisement

Table of Contents
loading

Table of Contents