1.4.1. ATTENTION 1.4.2. LICENSE AGREEMENT 1.4.3. MANUFACTURER’S WARRANTY AND LIMITATION OF LIABILITY 1.5. Technical Support 2. Providing your own Points of Interest to TomTom Navigator 2.1. Installing a POI database 2.2. How to make POI databases 2.3. Converting to Navigator format 2.4.
Page 3
5.2.29. Sub GetRouteInfo( ) 5.2.30. Sub GetRouteCoordinates( aFileName As String) 5.2.31. Sub UseGFFile( aFilename As String) 5.2.32. Sub EnableGFRecord( aRecordID As Long, aState As Boolean) 6. Communicating with TomTom Navigator from C++ 6.1. Introduction 6.2. Supported API calls 6.2.1. INT GetSdkVersionInfoV01( TNavVersionInfoV01& aVersionInfo) 6.2.2.
Page 4
6.2.11. INT SetFavoriteV01( INT aIndex, TFavouriteRecV01 & aFavorite) 6.2.12. INT GetFavoriteV01( INT aIndex, TFavouriteRecV01& aFavorite) 6.2.13. INT NavigateToFavorite( INT aIndex) 6.2.14. INT ShowCoordinateOnMap( long aLongitude, long aLatitude) 6.2.15. INT ShowRectangleOnMap( long aLongitudeW, long aLatitudeS, long aLongitudeE, long aLatitudeN) 6.2.16. INT SendDirectCommand( EDirectCommands aCommand) 6.2.17.
Page 5
7.2.2. Supported Record Types 8. Deployment 9. External GPS Drivers 9.1. About External GPS Drivers 9.2. Providing GPS information 9.2.1. Configuring TomTom Navigator 9.2.2. Providing your own feed 9.2.3. DWORD AttachToTomTomGPSEngine( ) 9.2.4. VOID DetachFromTomTomGPSEngine( DWORD aHandle) 9.2.5. BOOL CopyDataToTomTomGPSEngine( DWORD aHandle, DWORD...
This manual explains how to install and use the software developer’s kit (SDK) of TomTom Navigator. The SDK offers access to functions to add your own points of interest, and to send commands to TomTom Navigator through a dynamic link library in C++ or an ActiveX control in Visual Basic.
ActiveX component to it. To do this, select "Components..." from the "Project" menu and, in the "Controls" tab, check the box "TomTom Navigator SDK 2.X." If that box is not present you will need to click on the "Browse..." button and search for TTNControl.ocx on your hard disk.
TomTom’s liability for actual damages, regardless of the form of action, shall be limited to the greater of $ 5.000 or the money paid to TomTom or its dealer for the license of the software that caused the damages. The limitation will not apply to claims of personal injury or damages to tangible personal property caused by TomTom’s willful intent or gross negligence.
TomTom Navigator map, make sure that: The file(s) are stored in the same directory on your PocketPC where the map data are located. TomTom Navigator (re)opened the map after the OV2 file was put there (if necessary, restart TomTom Navigator). In the POI tab of your TomTom Navigator preferences, make sure "Display POI"...
TomTom Navigator application (using the TomTom Navigator menu option "Exit"). Finally, in the POI tab of your TomTom Navigator Preferences, make sure "Hilton Hotels" has a checkmark − otherwise the hotels will not be displayed on your screen. Even if you do not display them on your screen, you can now "navigate to"...
53:30:0 , 4 , "Truckers Restaurant La Bamba" 2.4. OV2 File Structure TomTom Navigator POI files are stored in so−called OV2−format, and as a rule have the filename−extension "ov2". This document provides some information about the content of such files.
Page 12
2. Providing your own Points of Interest to TomTom Navigator 4 bytes L: length of this record in bytes (including the T and L fields) L−5 bytes bytes to ignore (content undefined) SKIPPER RECORD: 1 byte T: type (always 1)
Itinerary location is departure point (Should only be set for the first item in the itinerary file) Example: \My Documents\TomTom Navigator Settings\Itinerary.itn Here’s an example of an itinerary file representing a small itinerary in France: 80417|4821030|Unnamed road, Gué (Le) (Vendeuvre−Du−Poitou)|4| 98140|4799585|Unnamed road, Boursay|1| 107833|4804246|Unnamed road, Droué|1|...
Page 14
3. Itinerary files IsItineraryLocationInMap SetItineraryDefaultDepartureV01 SetItineraryDefaultDepartureV02 GetItineraryDefaultDepartureV01 GetItineraryDefaultDepartureV02 SaveItinerary LoadItinerary ClearItinerary AbortItineraryLeg GetItineraryState GetNrOfItineraryLocations Refer to the C++ API documentation for more information on these functions.
An external application that wants to extend the location−sensitive menu has to provide a capabilities file with extension .CAP and place it in the \TomTom\ directory of the Pocket PC. Every external command can have an associated icon to be displayed in the location−sensitive menu. It is recommended that several bitmaps of different sizes be provided for each icon.
Page 16
Where «Provider» and «AppName» are defined in the setup .INF file. If the title of the main window of the external application is "Acme Guide", for example, its .INF file should contain the lines: Provider = "Acme" And: AppName = "Guide" Example: \TomTom\Acme.cap Version|100| AppName|Acme Guide.exe| AppPath|\Program Files\Acme Guide\|...
Find places nearby|Points d’intérêt voisins|¬ Punti di interesse nelle vicinanze|Nahe gelegene betriebe|¬ Puntos de interés cercanos|Find places nearby| COMMAND|POI|Details|\TomTom\AcmeCmd002.tmt|Toon gedetailleerde info|¬ Show details|Détails|Dettagli|Details|Detalles|Show details| Please note that each command has to be exactly one line of text, although here they have been reproduced in several lines for readability.
Page 18
POI type codes 9993 through 9999. External applications can, therefore, provide Navigator with up to seven additional POI types. The data for the POI of these types has to be packaged in a file placed in the \TomTom\ directory of the Pocket PC. The format of this external POI file is the following: Index...
When the user selects an external command from the location−sensitive menu, Navigator creates a request and sends a notification to the external application. The request is a text file (in the \TomTom\ directory) containing a single line with one of the following possible formats, according to the command type: REQUEST|«cmd name»|2|«longitude»|«latitude»|...
The TTNControl.ocx ActiveX control allows Visual Basic developers to create applications that can send commands to and request information from TomTom Navigator. To do this you simply have to place an instance of the TTNControl.ocx ActiveX control in the forms of your Visual Basic application. The control should be made invisible, since it has no interest for the user interface: all the work is carried out programmatically through OLE automation commands sent to it.
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.
5. Communicating with TomTom Navigator from Visual Basic NavigateToAmsterdam_Exit: Exit Sub NavigateToAmsterdam_Error: MsgBox "Navigation to Amsterdam failed" Resume NavigateToAmsterdam_Exit End Sub See Also: NavigateToFavorite, ShowCoordinateOnMap 5.2.9. Sub ClearFavorite( aFavorite As Long) Command Parameters: • aFavorite As Long: index of favorite (base zero) Supported Since: TTN 1.42...
5. Communicating with TomTom Navigator from Visual Basic See Also: ClearFavorite, GetFavoriteName, GetFavoriteLongitude, GetFavoriteLatitude, SetFavorite, NavigateToFavorite 5.2.13. Function GetFavoriteLongitude( aFavorite As Long) As Long Command Parameters: • aFavorite As Long: index of favorite (base zero) Returns: longitude of favorite Supported Since: TTN 1.42 Returns the longitude of a favorite location.
• aCommand As Long: code of the command to execute Supported Since: TTN 1.42 Performs one of various commands to change a setting or instruct TomTom Navigator to perform a certain task. The command codes are: • 1 − SoundOn: Turn spoken voice instructions on (works only when in navigation view) •...
5. Communicating with TomTom Navigator from Visual Basic • 23 − AutoZoomOn: turn on automatic zooming • 24 − AutoZoomOff: turn off automatic zooming Example: The following example invocation call demonstrates how to switch the map display to night colors:...
Page 26
5. Communicating with TomTom Navigator from Visual Basic Supported Since: TTN 1.42 Enables or disables displaying a specific POI type. The POI type identifier can be one of the following: • Government Office − 7367 • Mountain Peak − 9364 •...
• Nightlife − 9379 • Amusement Park − 9902 • Library − 9913 Versions 2.0 and later of TomTom Navigator also support the following POI types: • Car Repair Facility − 7310 • Pharmacy − 7326 • Scenic/Panoramic View − 7337 •...
5. Communicating with TomTom Navigator from Visual Basic 5.2.22. Sub DeleteClosestPoi( aFilename As String, aLongitude As Long, aLatitude As Long) Command Parameters: • aFilename As String: name of the POI category. • aLongitude As Long: longitude specified in WGS84 format (in millionths of degree).
The house number is always ignored in versions of TomTom Navigator prior to 2.0. If no location is found with city and street names exactly matching the arguments, then a city and a street will be chosen with names as similar as possible to the given ones.
5. Communicating with TomTom Navigator from Visual Basic End Sub 5.2.27. Sub GeocodeEx( aCity As String, aStreet As String, aHouseNr As String, aPostcode As String) Command Parameters: • aCity As String: city name. • aStreet As String: street name. • aHouseNr As String: house number.
5. Communicating with TomTom Navigator from Visual Basic Property RouteEnclosingLongitudeE As Long: − Property RouteEnclosingLatitudeN As Long: − Property RouteLength As Long: length of the route in meters Property RouteDuration As Long: duration of the route in seconds Property RouteDistanceToDestination As Long: distance from current position to destination in meters...
6.2. Supported API calls When communicating with TomTom Navigator, the library will first start an instance of the application if there isn’t one already running. Thus it should never be necessary to start TomTom Navigator from an external application explicitly.
• TNavVersionInfoV01& aVersionInfo: version struct to fill Returns: 0 if successful, non−zero value otherwise. Supported Since: TTN 1.42 Return the version number information of TomTom Navigator (version string and build number). 6.2.3. INT BringNavigatorToForeground( ) Returns: 0 if successful, non−zero value otherwise.
Navigate 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. INT error = CTomTomNavigatorCom::NavigateToCoordinate(4860000, 52380000, _T("Amsterdam"));...
6. Communicating with TomTom Navigator from C++ Returns: 0 if successful, non−zero value otherwise. Supported Since: TTN 1.42 Clear a favorite. See Also: SetFavoriteV01, GetFavoriteV01, NavigateToFavorite 6.2.11. INT SetFavoriteV01( INT aIndex, TFavouriteRecV01 & aFavorite) Command Parameters: • INT aIndex: index of favorite (base zero) •...
Returns: 0 if successful, non−zero value otherwise. Supported Since: TTN 1.42 Various commands to change a setting or instruct TomTom Navigator to perform a certain task. Example: The following example invocation call demonstrates how to switch the map display to night colors: INT error = CTomTomNavigatorCom::SendDirectCommand(KCommandNightColors);...
6. Communicating with TomTom Navigator from C++ EGpsStatus status; TTTnLocationV01 loc; INT error = CTomTomNavigatorCom::GetCurrentPositionV01(status, loc); if (error) ::AfxMessageBox(TEXT("Failed to get the current location")); else if (status >= 0 && loc.iSpeedKMh > 120) ::AfxMessageBox(TEXT("You are driving too fast!")); 6.2.18. INT MakePoiVisible( EPoiTypeCode aPoiID, INT aVisibility) Command Parameters: •...
6. Communicating with TomTom Navigator from C++ 6.2.20. INT DeleteClosestPoi( LPCTSTR aFilename, long aLongitude, long aLatitude) Command Parameters: • LPCTSTR aFilename: name of the POI category • long aLongitude: longitude specified in WGS84 format (in millionths of degree) • long aLatitude: latitude specified in WGS84 format (in millionths of degree) Returns: 0 if successful, non−zero value otherwise.
6. Communicating with TomTom Navigator from C++ The point of interest to be moved is the closest one to the given old co−ordinates among the points of interest that are within a distance of 100 meters from there. See Also: AddPoi, DeleteClosestPoi, DeleteAllPoi, MakeUserPoiVisible 6.2.24.
6. Communicating with TomTom Navigator from C++ 6.2.28. INT AddItineraryLocationV02( int aIndex, LPCTSTR aName, long aLongitude, long aLatitude, int aFlags) Command Parameters: • int aIndex: index in the itinarary • LPCTSTR aName: Name of this location in the itinerary • long aLongitude: longitude specified in WGS84 format (in millionths of degree) •...
6. Communicating with TomTom Navigator from C++ 6.2.32. INT GetItineraryLocationV02( int aIndex, TCHAR aName[128], long aLongitude, long aLatitude, int aFlags) Command Parameters: • int aIndex: index in the itinarary • TCHAR aName[128]: name of this location in the itinerary • long aLongitude: longitude specified in WGS84 format (in millionths of degree) •...
6. Communicating with TomTom Navigator from C++ 6.2.37. INT SetItineraryDefaultDepartureV01( TItineraryLocRecV01 & aLoc) Command Parameters: • TItineraryLocRecV01 & aLoc: record specifying itinerary location Returns: 0 if successful, non−zero value otherwise. Supported Since: TTN 3.0 Set the default departure point for the itinerary.
6. Communicating with TomTom Navigator from C++ Returns: 0 if successful, non−zero value otherwise. Supported Since: TTN 3.0 Save the itinerary to a file. 6.2.42. INT LoadItinerary( LPCTSTR aFileName) Command Parameters: • LPCTSTR aFileName: file the itinerary is loaded from Returns: 0 if successful, non−zero value otherwise.
The house number is always ignored in versions of TomTom Navigator prior to 2.0. If no location is found with city and street names exactly matching the arguments, then a city and a street will be chosen with names as similar as possible to the given ones. This will be indicated in the status field of the geocode information argument.
6. Communicating with TomTom Navigator from C++ ::AfxMessageBox(TEXT("Failed to navigate to address")); else ::AfxMessageBox(TEXT("Address not found")); 6.2.51. INT GeocodeExV01( LPCTSTR aCity, LPCTSTR aStreet, LPCTSTR aHouseNr, LPCTSTR aPostcode, TGeocodeInfoV01& aGeocodeInfo) Command Parameters: • LPCTSTR aCity: city name • LPCTSTR aStreet: street name •...
6. Communicating with TomTom Navigator from C++ Supported Since: TTN 3.0 Store the coordinates of a list of points from the current route in the specified file. 6.2.55. INT UseGFFile( LPCTSTR aFilename) Command Parameters: • LPCTSTR aFilename: full name of the GF file Returns: 0 if successful, non−zero value otherwise.
• KCommandShowFavorites − show "Favorites" on the map • KCommandHideFavorites − hide "Favorites" on the map Versions 1.51 and later of TomTom Navigator support also the following direct commands: • KCommandUnitsKm − set distance units to kilometers • KCommandUnitsM − set distance units to miles •...
6. Communicating with TomTom Navigator from C++ • KGeocodeStreetAmbiguous − the given street name was ambiguous, tried to make smart selection • KGeocodeHouseNrIgnored − the house number was ignored, either because there was no house number data available or because the given house number was not found 6.3.7.
6. Communicating with TomTom Navigator from C++ • long iDestination.iLatitude − • long iEnclosingLongitudeW − rectangle enclosing the route (co−ordinates in millionths of degree, WGS84 format) • long iEnclosingLatitudeS − • long iEnclosingLongitudeE − • long iEnclosingLatitudeN − • long iLength − length of the route in meters •...
Page 51
6. Communicating with TomTom Navigator from C++ • KPropertyMainMenuCmd5 • KPropertyMore1MenuCmd1 − command icons to display in the second menu • KPropertyMore1MenuCmd2 • KPropertyMore1MenuCmd3 • KPropertyMore1MenuCmd4 • KPropertyMore1MenuCmd5 • KPropertyMore2MenuCmd1 − command icons to display in the third menu • KPropertyMore2MenuCmd2 •...
Page 52
6. Communicating with TomTom Navigator from C++ • KQuickCmdFind − Find menu • KQuickCmdGPSStatus − GPS status • KQuickCmdMemorizePosition − Memorize this position • KQuickCmdNavigateTo − Navigate to • KQuickCmdOriginal − Reset to original route • KQuickCmdProperties − properties menu •...
(e.g. representing dynamic situations such as traffic conditions). TomTom Navigator will load and maintain such a file as soon as you pass it the path name of the file, using the routine UseGFFile. When this routine returns, TomTom Navigator will have discarded any previous files, and will have loaded the new file into memory.
7. Graphic Information Files INcluding the 8−byte header 4 bytes Record ID (for future unique manipulation of this record) 7.2.2. Supported Record Types TIMESTAMP (type 5): Specifies an "end−of−validity" for all the records that follow it (i.e. until the next timestamp record) 8 BYTES HEADER...
Page 55
7. Graphic Information Files • 10 − width of local road 2 • 11 − width of local road 1 • 12 − width of other road 4 • 13 − width of other road 3 • 14 − width of other road 2 •...
Page 56
WPARAM and LPARAM fields of the message structure, respectively. NOTE: TomTom Navigator will never show more than 3 warning icons. No matter how many icons match the specified criteria, only the first three will be displayed and activated. Please note that each string...
8. Deployment To deploy a VB or C++ application that makes use of the TomTom Navigator SDK, the appropriate CAB file from the directory sdk\TTNCom\install\sdk\pocketpc\dll needs to be installed on the device. A CAB file for ARM, MIPS and SH3 devices is provided (note that all Pocket PC 2002 devices use the ARM processor).
TCP/IP connection. The mechanism described here also allows multi−plexed GPS/GSM/Telemetry data delivered over a built−in COM port to be demulti−plexed by you − the GPS feed can then be passed on to TomTom Navigator. Many blackboxes apply this mechanism.
AttachToTomTomGPSEngine(). • DWORD aNumberOfBytes: the number of bytes that you intend to feed to the TomTom Navigator GPS support application. • LPBYTE aBuffer: a pointer to a buffer of at least aNumberOfBytes bytes containing the data to be fed.
Need help?
Do you have a question about the Navigator SDK and is the answer not in the manual?
Questions and answers