Detailed instructions for use are in the User's Guide.
[. . . ] User's manual
NAVIGON Integration Kit 4. 0
as on October 2004
Impressum
NAVIGON GmbH Berliner Platz 11 D-97080 Würzburg Hotline (dtms-Service, 0, 12 /min): +49 180-5-NAVIGON (+49 180-5-6284466)
The information contained herein may be changed at any time without prior notification. This manual nor any parts thereof may not be reproduced for any purpose whatsoever without the express written consent of NAVIGON GmbH, nor transmitted in any form either electronically or mechanically, including photocopying and recording. Copyright 2004, NAVIGON GmbH All rights reserved.
User's manual NAVIGON Integration Kit 4. 0
Table of contents
1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1. 1 1. 2 1. 3 1. 4 On this manual. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Specification of services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [. . . ] a_level)
C++ syntax Type Parameters
Return values
The method returns one of the following values: Return value S_OK S_FALSE Signification Done Error
2. 6. 33 SetMaxResolutionNavigation() method
Description The SetMaxResolutionNavigation() method sets the maximum resolution of the map (in pixels per meter). INAVIGATION::SetMaxResolutionNavigation HRESULT SetMaxResolutionNavigation( [in] double a_maxres Parameters )
C++ syntax Type
The method takes the following parameter: Parameter a_level Signification Specifies the maximum resolution of the map (in pixels per meter).
Return values
The method returns one of the following values: Return value S_OK S_FALSE Signification Done Error
- 84 -
INAVIGATION
User's manual NAVIGON Integration Kit 4. 0
2. 6. 34 GetMaxResolutionNavigation() method
Description The GetMaxResolutionNavigation() method retrieves the maximum resolution of the map (in pixels per meter). IPOSITION::GetMaxResolutionNavigation HRESULT GetMaxResolutionNavigation( [in] double a_maxres ) Parameters The method takes the following parameter: Parameter a_level Signification Pointer to a DOUBLE variable which contains the maximum resolution of the map (in pixels per meter).
C++ syntax Type
Return values
The method returns one of the following values: Return value S_OK S_FALSE Signification Done Error
2. 6. 35 ChangeGeoToMapCoordNavigation() method
Description The ChangeGeoToMapCoordNavigation() method converts the given geographic coordinates of a point into window coordinates. INAVIGATION::ChangeGeoToMapCoordNavigation HRESULT ChangeGeoToMapCoordNavigation( [in] double [in] double [out] int * [out] int * Parameters a_lat, a_long, a_x, a_y )
C++ syntax Type
The method takes the following parameters: Parameter a_lat a_long a_x a_y Signification Specifies the latitude of the point in WGS-84 format. Specifies the longitude of the point in WGS-84 format. Pointer to an INT variable which contains the X-coordinate of the point in the map window. Pointer to an INT variable which contains the Y-coordinate of the point in the map window.
Programming interfaces
- 85 -
User's manual NAVIGON Integration Kit 4. 0
Return values
The method returns one of the following values: Return value S_OK S_FALSE Signification Done Error
2. 6. 36 ChangeMapToGeoCoordLocationMap() method
Description The ChangeMapToGeoCoordNavigation() method converts the given window coordinates of a point into geographic coordinates. INAVIGATION::ChangeMapToGeoCoordNavigation HRESULT ChangeMapToGeoCoordNavigation( [in] int [in] int a_x, a_y, a_lat, a_long )
C++ syntax Type
[out] double * [out] double * Parameters
The method takes the following parameters: Parameter a_x a_y a_lat a_long Signification Specifies the X-coordinate of the point in the map window. Specifies the Y-coordinate of the point in the map window. Pointer to a DOUBLE variable which contains the latitude of the point in WGS-84 format. Pointer to a DOUBLE variable which contains the longitude of the point in WGS-84 format.
Return values
The method returns one of the following values: Return value S_OK S_FALSE Signification Done Error
- 86 -
INAVIGATION
User's manual NAVIGON Integration Kit 4. 0
2. 6. 37 Examples
Route calculation and navigation m_NIK_Navigation->OpenNavigation( (long)hWnd, 0, 0, 300, 200 );
/* Specify the destination */ m_NIK_Navigation->SetDestCoordNavigation(dLat, dLong );
/* Start route calculation and navigation */ m_NIK_Navigation->StartNavigation();
/* Retrieve the status of route calculation */ m_NIK_Navigation->GetStatusNavigation( &nStatus );
/* Retrieve the distance and the estimated duration of the travel */ m_NIK_Navigation->GetRoutingResultNavigation ( &nMeter, &nSec );
m_NIK_Navigation->CloseNavigation(); Specify the destination /* Geographic point */ m_NIK_Navigation->SetDestCoordNavigation(dLatX, dLongY);
/* ID */ m_NIK_Navigation->SetDestIdNavigation( nAreaId );
/* Retrieve the destination */ m_NIK_Navigation->GetDestCoordNavigation( &dLatX, &dLongY ); /* or */ m_NIK_Navigation->GetDestIdNavigation( &nAreaId ); Display /* Display the whole route */ m_NIK_Navigation->ShowRouteNavigation();
/* Start and destination points of the route m_NIK_Navigation->ShowStartPointNavigation(); m_NIK_Navigation->ShowEndPointNavigation();
*/
Programming interfaces
- 87 -
User's manual NAVIGON Integration Kit 4. 0
Map
/* Scroll the map */ m_NIK_Navigation->ShowDownNavigation(); m_NIK_Navigation->ShowUpNavigation(); m_NIK_Navigation->ShowLeftNavigation(); m_NIK_Navigation->ShowRightNavigation();
/* Zoom */ m_NIK_Navigation->ZoomInNavigation(); m_NIK_Navigation->ZoomOutNavigation();
/* Orientate the map north up */ m_NIK_Navigation->SetRotationNavigation( FALSE ); m_NIK_Navigation->GetRotationNavigation( &bDir ); Voice instruction /* Repeat the last voice instruction */ m_NIK_Navigation->RepeatLastAdviceNavigation();
- 88 -
INAVIGATION
User's manual NAVIGON Integration Kit 4. 0
2. 7
Survey
IOPTIONS
The IOPTIONS interface is designed to set global parameters for route calculation (IROUTING and INAVIGATION), map representation (IROUTING, INAVIGATION, and IPOSITION).
Exposed functionality
Configuration of route calculation Configuration of map representation Notice: There are get and set methods for each of the configuration items.
Typical use
GetRoutingAlgorithmOptions ( &bDynamicRoute, &bQuickest, &bShortest ); /* Einstellungen für die Routenberechnung ändern */ SetRoutingAlgorithmOptions ( bDynamicRoute, bQuickest, bShortest ); GetRoutingAvoidTypeOptions ( &bHighWays, &bFerries, &bMaudStreets ); /* Einstellungen für Ausschluss von Verbindungswegen */ SetRoutingAvoidTypeOptions ( bHighWays, bFerries, bMaudStreets );
Methods
The IOPTIONS interface defines the following methods: SetRoutingAlgorithmOptions() method, see page 90 SetRoutingAlgorithmOptions2() method, see page 91 GetRoutingAlgorithmOptions() method, see page 91 GetRoutingAlgorithmOptions2() method, see page 92 SetRoutingAvoidTypeOptions() method, see page 93 GetRoutingAvoidTypeOptions() method, see page 94 SetStyleMapOptions() method, see page 95 GetStyleMapOptions() method, see page 95 SetKeyboardMapModeOptions() method, see page 96 GetKeyboardMapModeOptions() method, see page 96 GetBasicMapFolderOptions() method, see page 97 SetBasicMapFolderOptions() method, see page 97 GetMapsNumberOptions() method, see page 98 GetMapsPathsOptions() method, see page 98 SetCurrentMapOptions() method, see page 99 GetCurrentMapOptions() method, see page 99 GetRadioMutingOptions() method, see page 100 SetRadioMutingOptions() method, see page 100
Programming interfaces
- 89 -
User's manual NAVIGON Integration Kit 4. 0
GetLanguageCodeOptions() method, see page 101 SetLanguageCodeOptions() method, see page 101 GetDistUnitOptions() method, see page 102 SetDistUnitOptions() method, see page 102 SetLouderOptions() method, see page 103 SetQuieterOptions() method, see page 103 SetPoiMapFolderOptions() method, see page 104 OpenPoiMapsOptions() method, see page 104 OpenPoiMapsOptions() method, see page 104
2. 7. 1
SetRoutingAlgorithmOptions() method
Attention: Old method!The SetRoutingAlgorithmOptions2() method offers enhanced configuration possibilities and should therefore be used in current and future projects.
Description
The SetRoutingAlgorithmOptions() method specifies the kind of route to be calculated. Exactly one of the following parameters must be TRUE. IOPTIONS:: SetRoutingAlgorithmOptions HRESULT SetRoutingAlgorithmOptions( [in] BOOL [in] BOOL [in] BOOL bDynamicRoute, bQuickest, bShortest )
C++ syntax Type
Parameters
The method takes the following parameters: Parameter bDynamicRoute Signification Specifies a dynamic route to be calculated (TRUE) or not (FALSE). A dynamic route is a quick route, but TMC broadcasts are permanently being considered (if received). The route may automatically be recalculated due to broadcasted traffic obstructions on the route which originally was calculated. Specifies the quickest route to be calculated (TRUE) or not (FALSE). Specifies the shortest route to be calculated (TRUE) or not (FALSE).
bQuickest bShortest
Attention: Exactly one of these parameters must be TRUE.
- 90 -
IOPTIONS
User's manual NAVIGON Integration Kit 4. 0
Return values
The method returns one of the following values: Return value S_OK S_FALSE Signification Done Error
2. 7. 2
SetRoutingAlgorithmOptions2() method
The SetRoutingAlgorithmOptions2() method specifies the kind of route to be calculated. IOPTIONS:: SetRoutingAlgorithmOptions2 HRESULT SetRoutingAlgorithmOptions2 [in] int a_nRouteType ) (
Description
C++ syntax Type
Parameters
The method takes the following parameter: Parameter a_nRouteType Signification Specifies the kind of route to be calculated. Must be a member of the _RouteType enumeration (see page 171).
Return values
The method returns one of the following values: Return value S_OK S_FALSE Signification Done Error
2. 7. 3
GetRoutingAlgorithmOptions() method
Attention: Old method!Use this method to retrieve parameters that have been set by the SetRoutingAlgorithmOptions() method. The SetRoutingAlgorithmOptions2() method offers enhanced configuration possibilities and should therefore be used in current and future projects.
Description
The GetRoutingAlgorithmOptions() method retrieves the current route calculation parameters which have been set by calling SetRoutingAlgorithmOptions(). [. . . ] You may as well define how POI are to be represented on the map.
Features
You may use as many databases of POI as you want at the same time, each record of a POI contains: -Name, -Coordinates; -Category number
3. 3
Survey
Appendix C: Demo application
The demo application has been installed with the software when you have executed a "Developer's mode" installation (see "Installation", page 9). The demo application contains: C++ source code Most of the interfaces and methods are contained. This source code is a helpful support for software developers who want to implement the NIK functionality into their applications. Compiled version of the demo application.
Requirements
Running the demo application requires: Windows 2000/XP: Windows Mobile 2003: Microsoft Visual Studio 6. 0 Microsoft eMbedded Visual C++ 4. 0
- 174 -
Appendix B: User defined POI (optional)
User's manual NAVIGON Integration Kit 4. 0
4
Glossary
A COM port is a connector to a communications interface, usually the serial port. [. . . ]