C# SDK
CApplicationAPI Class Reference

Basic class providing set of functions to command Drive. More...

Public Member Functions

delegate void ApplicationHandler (int nEventID, IntPtr strData)
 The function processes any events which occur when Drive is running. Possible events are enumerated in ApplicationEvents enum. More...
 

Static Public Member Functions

static int InitApi (string strPath, ApplicationHandler Handler)
 The function initializes ApplicationAPI and must be called at the very first place. More...
 
static int InitApi (string strPath, ApplicationHandler Handler, int nLeft, int nTop, int nWidth, int nHeight, bool bRunInForeground)
 The function initializes ApplicationAPI and must be called at the very first place. More...
 
static int InitApi (string strPath, ApplicationHandler Handler, int nLeft, int nTop, int nWidth, int nHeight, bool bRunInForeground, bool bNoCaption)
 The function initializes ApplicationAPI and must be called at the very first place. More...
 
static int InitApi (string strPath, ApplicationHandler Handler, int nLeft, int nTop, int nWidth, int nHeight, bool bRunInForeground, bool bNoCaption, IntPtr hParentWnd)
 The function initializes ApplicationAPI and must be called at the very first place. More...
 
static int InitApi (string strPath, ApplicationHandler Handler, int nLeft, int nTop, int nWidth, int nHeight)
 The function initializes ApplicationAPI and must be called at the very first place. More...
 
static int IsApplicationRunning (out SError Error, Int32 MaxTime)
 The function verifies whether Drive is running. More...
 
static int IsApplicationRunning (Int32 MaxTime)
 The function verifies whether Drive is running. More...
 
static int GetActualGpsPosition (out SError Error, out SGpsPosition GpsPosition, bool SatellitesInfo, Int32 MaxTime)
 The function returns informations about actual GPS position. More...
 
static int GetActualGpsPosition (out SError Error, out string strGpsPositionInfo, bool SatellitesInfo, Int32 MaxTime)
 
static int GetApplicationOptions (out SError Error, out string strApplicationOptions, Int32 MaxTime)
 
static int SetApplicationOptions (out SError Error, string strApplicationOptions, Int32 MaxTime)
 
static int ChangeApplicationOptions (out SError Error, ref SChangeOption ChangeOption, Int32 MaxTime)
 The function changes basic Drive settings. More...
 
static int AddStopOffPointsToFavorites (out SError Error, ref SPoi StopOffPoint, Int32 MaxTime)
 The function adds user defined POI to Favorites category. More...
 
static int GetFavoritesList (out SError Error, out SPoi[] FavoriteArr, bool bSearchAddress, Int32 MaxTime)
 The function returns list of POIs in Favorites category. More...
 
static int RemoveFavoriteFromList (out SError Error, SPoi Favorite, Int32 MaxTime)
 The function removes POI from list of Favorites. More...
 
static int SetDefaultValues (out SError Error, Int32 MaxTime)
 The function sets default Drive settings. More...
 
static int ChangeAppRectangle (out SError Error, int nLeft, int nTop, int nWidth, int nHeight, Int32 MaxTime)
 This function change position and size of Drive application. More...
 
static int AddStopOffPointToHistory (out SError Error, SHistoryRecord StopOffPoint, Int32 MaxTime)
 The function adds new item to History list. More...
 
static int GetHistoryList (out SError Error, out SHistoryRecord[] HistoryArr, bool bSearchAddress, Int32 MaxTime)
 The function returns the list of items in History. More...
 
static int AddPoi (out SError Error, ref SPoi Poi, Int32 MaxTime)
 The function adds user POI to custom category. More...
 
static int AddPoiCategory (out SError Error, string strCategory, string strBitmapPath, string strIsoCode, Int32 MaxTime)
 The function adds custom POI category. More...
 
static int DeletePoiCategory (out SError Error, string strCategory, string strIso, Int32 MaxTime)
 The function deletes custom POI category. More...
 
static int DeletePoi (out SError Error, SPoi Poi, Int32 MaxTime)
 The function deletes custom POI from custom category. More...
 
static int MakeUserPoiVisible (out SError Error, Int32 dwCategory, string strCategory, bool bShow, Int32 MaxTime)
 The function shows or hides POI category in POI category list. More...
 
static int GetPoiList (out SError Error, out SPoi[] PoiArr, string strCategory, bool bSearchAddress, Int32 MaxTime)
 The function returns list of POIs from selected category. More...
 
static int GetPoiOnRoute (out SError Error, int nGroup, int nCategory, int minDriveTime, int maxDriveTime, out SPoiOnRoute[] PoiArr, Int32 MaxTime)
 The function returns list of POIs from selected category. More...
 
static int GetLocationInfo (out SError Error, LONGPOSITION Location, out string strAddress, Int32 MaxTime)
 The function returns address corresponding to given location. More...
 
static int GetLocationInfo (out SError Error, LONGPOSITION Location, out string strAddress, out SRoadInfo RoadInfo, Int32 MaxTime)
 This overloaded function returns address and road information corresponding to given location. More...
 
static int GetUniqueDeviceId (out SError Error, out string strDeviceID, Int32 MaxTime)
 The function returns device ID. More...
 
static int GetMapVersion (out SError Error, string strIso, out string strMapVersion, Int32 MaxTime)
 The function gets the map version of a given country's ISO code. More...
 
static int GetApplicationVersion (out SError Error, out string strDriveVersion, out string strBuildNumber, Int32 MaxTime)
 This function gets the Drive's version and build number. More...
 
static int GetSdkVersion (out SError Error, out string strSdkVersion, out string strBuildNumber, Int32 MaxTime)
 This function gets the SDK's version and build number. More...
 
static int GetRouteStatus (out SError Error, out string strRouteStatus, Int32 MaxTime)
 Returns informations about computed route in JSON format. More...
 
static int GetRouteInfo (out SError Error, out SRouteInfo RouteInfo, Int32 MaxTime)
 The function returns informations about computed route. More...
 
static int GetRouteInfo (out SError Error, out SRouteInfo RouteInfo, bool bExtended, Int32 MaxTime)
 The function returns informations about computed route. More...
 
static int SwitchMap (out SError Error, string strLoadPath, Int32 MaxTime)
 The function loads map from a folder. More...
 
static int LocationFromAddress (out SError Error, out LONGPOSITION Location, string strAddress, bool bPostal, bool bValueMatch, Int32 MaxTime)
 The function returns location corresponding to taken address. More...
 
static int LocationFromAddress (out SError Error, out LONGPOSITION Location, string strAddress, bool bPostal, Int32 MaxTime)
 The function returns location corresponding to taken address. More...
 
static int LocationFromAddressEx (out SError Error, string strAddress, bool bPostal, bool bFuzzySearch, out SWayPoint[] PositionArr, Int32 MaxTime)
 The function returns location corresponding to taken address. More...
 
static int LocationFromAddressEx (out SError Error, string strAddress, bool bPostal, out SWayPoint[] PositionArr, Int32 MaxTime)
 The function returns location corresponding to taken address. More...
 
static int ShowCoordinatesOnMap (out SError Error, LONGPOSITION Location, int Zoom, bool bShowApplication, Int32 MaxTime)
 The function shows taken location on BrowseMap. More...
 
static bool SearchLocation (out SError Error, string text, ref OnSearchListener onSearchListener, Int32 maxTime)
 
static int ShowRectangleOnMap (out SError Error, LONGRECT rect, bool bShowApplication, Int32 MaxTime)
 The function shows specific piece of map on the BrowseMap according to your selected coordinates of top left and bottom right corner. More...
 
static int StartNavigation (out SError Error, ref SWayPoint Location, Int32 Flags, bool bShowApplication, bool bSearchAddress, Int32 MaxTime)
 The function starts navigate to taken location. More...
 
static int StartNavigation (out SError Error, ref SWayPoint Location, Int32 Flags, bool bClosedAsDelivery, bool bShowApplication, bool bSearchAddress, Int32 MaxTime)
 The function starts navigate to taken location. More...
 
static int StartNavigation (out SError Error, ref SWayPoint Location, Int32 Flags, bool bClosedAsDelivery, bool bShowApplication, bool bSearchAddress, SRouteComputeSettings RouteCompSettings, Int32 MaxTime)
 The function starts navigate to taken location. More...
 
static int NavigateToAddress (out SError Error, string Address, bool bPostal, Int32 Flags, bool bShowApplication, Int32 MaxTime)
 The function computes route from actual GPS position to taken target and starts navigate to taken address. More...
 
static int NavigateToAddress (out SError Error, string Address, bool bPostal, Int32 Flags, bool bClosedAsDelivery, bool bShowApplication, Int32 MaxTime)
 The function computes route from actual GPS position to taken target and starts navigate to taken address. More...
 
static int StopNavigation (out SError Error, Int32 MaxTime)
 The function stops navigation, cancels the route and returns Drive application to main screen. More...
 
static int EndApplication (out SError Error, Int32 MaxTime)
 The function ends Drive application. More...
 
static int ShowMessage (out SError Error, string strMessage, int nButtons, bool bWaitForFeedback, bool bShowApplication, ref int nUserFeedback, Int32 MaxTime)
 The function shows a dialog with a specified message. More...
 
static int AddItinerary (out SError Error, SStopOffPoint[] PointArr, string strItineraryName, Int32 MaxTime)
 The function creates itinerary and fills it with items from PointArr. More...
 
static int AddItinerary (out SError Error, string strItineraryJson, string strItineraryName, Int32 MaxTime)
 The function creates itinerary from JSON string. More...
 
static int ShowDialog (out SError Error, int nDialogID, Int32 MaxTime)
 
static int OnMenuCommand (out SError Error, int nID, int nSubID, bool bShowApplication, Int32 MaxTime)
 The function provides direct access to menu items. More...
 
static int BringApplicationToForeground (out SError Error, Int32 MaxTime)
 The function brings Drive window to foreground. More...
 
static int BringApplicationToBackground (out SError Error, Int32 MaxTime)
 The function brings Drive window to background. The application is hidden and stops doing any graphic operations which results in less processor load. However, it continues to read GPS port. More...
 
static int IsApplicationInForeground (out SError Error, out bool bApplicationInForeground, Int32 MaxTime)
 This function returns, if the application is active in foreground or idle in background. More...
 
static int AddBitmapToMap (out SError Error, string strBitmapPath, int lX, int lY, out int nBitmapID, int MaxTime)
 The function shows picture on BrowseMap. More...
 
static int RemoveBitmap (out SError Error, int nBitmapID, int MaxTime)
 The function removes picture from BrowseMap. More...
 
static int RemoveAllBitmaps (out SError Error, int MaxTime)
 The function removes all pictures from BrowseMap. More...
 
static int ShowBitmap (out SError Error, int nBitmapID, bool bShow, int MaxTime)
 The function shows or hides picture on BrowseMap. More...
 
static int MoveBitmap (out SError Error, int nBitmapID, int lX, int lY, int MaxTime)
 The function moves picture on BrowseMap. More...
 
static int FlashMessage (out SError Error, string strMessage, bool bShowApplication, Int32 MaxTime)
 The function shows flash message. More...
 
static int CloseDialogs (out SError Error, Int32 MaxTime)
 Close dialogs in Drive application More...
 
static int SetRoute (out SError Error, string strItineraryName, Int32 Flags, bool bShowApplication, Int32 MaxTime)
 The function computes route based on taken itinerary. If Drive has valid GPS signal it starts navigation. More...
 
static int SetRoute (out SError Error, string strItineraryName, Int32 Flags, bool bClosedAsDelivery, bool bShowApplication, Int32 MaxTime)
 The function computes route based on taken itinerary. If Drive has valid GPS signal it starts navigation. More...
 
static int SetRoute (out SError Error, string strItineraryName, Int32 Flags, bool bClosedAsDelivery, bool bShowApplication, out int[] WrongWaypoints, Int32 MaxTime)
 The function computes route based on taken itinerary. If Drive has valid GPS signal it starts navigation. More...
 
static int AddEntryToItinerary (out SError Error, string strItineraryName, ref SStopOffPoint StopOffPoint, int nIndex, Int32 MaxTime)
 The function adds new waypoint to taken itinerary. More...
 
static int DeleteEntryInItinerary (out SError Error, string strItineraryName, int nIndex, Int32 MaxTime)
 The function deletes waypoint from itinerary at taken position. More...
 
static int FindNearbyPoi (out SError Error, out SPoi Poi, Int32 CategoryNumber, string strCategoryName, int lX, int lY, Int32 MaxTime)
 The function finds the nearest POI around given position. The POI may be from the original map POIs or it may be a custom POI. More...
 
static int FindNearbyPoi (out SError Error, out SPoi[] Pois, ref Int32 ListSize, Int32 CategoryNumber, string strCategoryName, int lX, int lY, Int32 MaxTime)
 The function finds the defined number of nearest POIs around given position. The POIs may be from the original map POIs or they may be some custom POIs. More...
 
static int GetPoiCategoryList (out SError Error, out SPoiCategory[] PoiCategoriesList, Int32 MaxTime)
 The function returns the list of POI categories More...
 
static int SetPoiWarning (out SError Error, SPoiCategory PoiCategory, Int32 MaxTime)
 The function set the POI warning based on the attributes of the SPoiCategory instance. More...
 
static int HighlightPoi (out SError Error, string PoiCategory, string PoiName, string Sound, LONGPOSITION PoiLocation, Int32 MaxTime)
 Highlight the POI More...
 
static int UpdatePois (out SError Error, string Text, int Format, out string Result, Int32 dwMaxTime)
 
static int DeleteItinerary (out SError Error, string strItineraryName, Int32 MaxTime)
 The function deletes taken itinerary. More...
 
static int GetItineraryList (out SError Error, string strItineraryName, out SStopOffPoint[] PointsArr, Int32 MaxTime)
 The function returns list of waypoints in itinerary. More...
 
static int OptimizeItinerary (out SError Error, string strItineraryName, Int32 MaxTime)
 The function optimizes taken itinerary. More...
 
static int OptimizeRoute (out SError Error, Int32 MaxTime)
 The function optimizes current route. More...
 
static int ShowHierarchyDialog (out SError Error, string Iso, string City, string Street, bool bPostal, out SWayPoint Position, Int32 MaxTime)
 The function shows hierarchy dialog and returns location of taken address. More...
 
static int GetAddressList (out SError Error, string strAddress, bool bPostal, int nMaxCount, out SWayPoint[] List, Int32 MaxTime)
 The function returns list of founded items from NameHierarchy. More...
 
static int GetCoordinatesFromOffset (out SError Error, string IsoCode, Int32 RoadOffset, out LONGPOSITION Position, Int32 MaxTime)
 Get coordinates of road given by map iso code and offset More...
 
static int CloseApi ()
 The function uninitializes ApplicationAPI. No other API funcitons will be executed after this command.
The function should be called at the end of SDK application. You can call function EndApplication before this one, if you wish to close navigation too. More...
 
static int GpsSwitchOn (out SError Error, string strPort, Int32 BaudRate, bool bSwitchOn, Int32 MaxTime)
 The function turns Drive GPS module ON and OFF. More...
 
static int GetCurrentSpeedLimit (out SError Error, out int nSpeedLimit, Int32 dwMaxTime)
 The function returns the speed limit of the current road. More...
 
static int GetNextInstruction (out SError Error, out SRouteInstruction Instruction, Int32 MaxTime)
 This function returns the next turn instruction while navigating. More...
 
static int LoadComputedRoute (out SError Error, string RoutePath, string JsonParams, Int32 MaxTime)
 
static int LoadComputedRoute (out SError Error, string RoutePath, Int32 MaxTime)
 This function loads a pre-computed route from a file and starts navigation following that route. More...
 
static int LoadComputedRoute (out SError Error, string RoutePath, out string ApproximationInfo, Int32 MaxTime)
 This function loads a pre-computed route from a file and starts navigation following that route. More...
 
static int LoadComputedRoute (out SError Error, string RoutePath, UInt32 StartWaypointID, Int32 MaxTime)
 This function loads a pre-computed route from a file and starts navigation following that route. More...
 
static int SaveComputedRoute (out SError Error, string RoutePath, Int32 MaxTime)
 This funciton saves the current route in navigation to a file. More...
 
static int GetRoute (out SError Error, Int32 nFormat, Int32 nDetail, out string strRoute, Int32 MaxTime)
 
static int CalculateRoute (out SError Error, string strWaypoints, out string strResult, Int32 MaxTime)
 
static int GoOnline (out SError Error, bool bOnline, Int32 MaxTime)
 Defines if the navigation has to connect to or disconnect from online services. The online services include functions More...
 
static int OnlineServicesLogin (out SError Error, string UserName, string Password, Int32 MaxTime)
 Enters login credentials for online services, such as life traffic. If not credentials are given, the application logs in anonymously. More...
 
static int AddTMCEvent (out SError Error, ref STmcEvent TmcEvent, Int32 MaxTime)
 Adds a custom TMC event. This event is independent on the events received online. More...
 
static int RemoveTMCEvent (out SError Error, UInt16 nTmcEventId, Int32 MaxTime)
 Removes a custom TMC event. Each custom event has an ID given to it by the navigation during creation. However, TMC events should be defined so that they expire with their validity time. More...
 
static int ClearTMCTable (out SError Error, Int32 MaxTime)
 Erases all the custom TMC events defined with AddTMCEvent function. More...
 
static int OnlineServicesSettings (out SError Error, ref SOnlineServicesSettings Settings, Int32 MaxTime)
 Sets/gets online services settings More...
 
static int PlaySoundTTS (out SError Error, string Text, Int32 MaxTime)
 Uses the TTS engine, if installed, to speak the given text message. More...
 
static int LoadGFFile (out SError Error, string Path, Int32 MaxTime)
 The function loads GF file then draws GF data on map. See specification of GF files here GF Files specification More...
 
static int UnloadGFFile (out SError Error, string Path, Int32 MaxTime)
 The function unloads GF file and erases all the lines drawn before. See specification of GF files here GF Files specification More...
 
static int LoadExternalFile (out SError Error, string Path, Int32 FileType, Int32 MaxTime)
 The function loads external file GF or TMC data More...
 
static int UnloadExternalFile (out SError Error, string Path, Int32 FileType, Int32 MaxTime)
 The function unloads external file GF or TMC data More...
 
static int ReloadExternalFiles (out SError Error, Int32 MaxTime)
 The function reloads all external files stored in geofiles folder More...
 
static int LoadOFGRoute (out SError Error, string FileName, Int32 StartFromIndex, Int32 Flags, Int32 MaxTime)
 
static int GetOFGRouteStatus (out SError Error, out string Status, Int32 dwMaxTime)
 
static int SaveOFGRoute (out SError Error, string FileName, Int32 FromIndex, LONGPOSITION FromPoint, Int32 ToIndex, LONGPOSITION ToPoint, Int32 MaxTime)
 
static int SkipNextWaypoint (out SError Error, Int32 MaxTime)
 This function skips the waypoint, which is next when the function is called More...
 
static int GetMobileData (out SError Error, out string strMobileData, Int32 MaxTime)
 
static int SetMobileData (out SError Error, string strMobileData, Int32 MaxTime)
 
static int ResetMobileData (out SError Error, Int32 MaxTime)
 
static int GetMapCorrectionEvents (out SError Error, out string strTableData, Int32 MaxTime)
 
static int AddMapCorrectionEvents (out SError Error, string strTableData, Int32 MaxTime)
 
static int ClearMapCorrectionEvents (out SError Error, Int32 MaxTime)
 
static int LoadGeoFile (out SError Error, string GeoFileName, string GeoJson, Int32 MaxTime)
 
static int UnloadGeoFile (out SError Error, string GeoFileName, Int32 MaxTime)
 
static int UnloadGeoFile (out SError Error, Int32 MaxTime)
 
static void WorldDegreeToMeters (ref LONGPOSITION DegreeCoord)
 This function is only for backward compatibility More...
 
static void MetersToWorldDegree (ref LONGPOSITION MetersCoord)
 This function is only for backward compatibility More...
 

Detailed Description

Basic class providing set of functions to command Drive.