Navigation SDK Documentation

Functions
Traffic search functions

Functions

SDK_ERROR SDK_API SDK_SetTrafficSearchWebConfiguration (SDK_TrafficSearchWebConfiguration *pWebConfig)
 
SDK_ERROR SDK_API SDK_SearchTrafficInformation (SDK_TrafficSearchRequest *pSearchRequest, SDK_TrafficProgressCBFuncT pCallBackFunc)
 
SDK_ERROR SDK_API SDK_GetTrafficSearchResult (SDK_TrafficSearchResult **pResult, SDK_UINT4 *pCount, SDK_INT1 routeIdx, SDK_INT4 alternativeIdx)
 
SDK_ERROR SDK_API SDK_GetTrafficSearchResultStatistics (SDK_INT4 *pNew, SDK_INT4 *pModified, SDK_INT4 *pDeleted, SDK_DOUBLE *pVolume)
 
SDK_ERROR SDK_API SDK_GetTrafficDelayOnRoute (SDK_INT4 *pDelay, SDK_BOOL *pBlockingAhead, SDK_BOOL bComplete, SDK_INT1 routeIdx, SDK_INT4 alternativeIdx)
 
SDK_ERROR SDK_API SDK_RefreshTrafficTracesAndIcons (SDK_BOOL showOnlyIconsOnRoute)
 
SDK_ERROR SDK_API SDK_RemoveTrafficTraces ()
 
SDK_ERROR SDK_API SDK_ResetTrafficSimulation ()
 

Detailed Description

Functions for accessing and searching traffic information.

Function Documentation

SDK_ERROR SDK_API SDK_SetTrafficSearchWebConfiguration ( SDK_TrafficSearchWebConfiguration pWebConfig)

Set the web configuration for traffic information searches, for details see SDK_TrafficSearchWebConfiguration. Before the first call to SDK_SearchTrafficInformation, set the configuration to access the traffic web service.

Parameters
[in]pWebConfigthe web configuration
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_SearchTrafficInformation ( SDK_TrafficSearchRequest pSearchRequest,
SDK_TrafficProgressCBFuncT  pCallBackFunc 
)

Search for traffic information.

Start an asynchronous search for traffic information with a previously set web configuration. Because the search will be started in a separate thread, the function call returns immediately. The callback function is used to get information if the search succeeded or not. It will be called when the search has completed successfully or when were was an error while searching. To show traffic traces and icons on the map, call SDK_RefreshTrafficTracesAndIcons. The parameter "error" of the callback function holds the information if the search was successful or not: 0 if the request succeeded, not 0 when were was an error.

The traffic incidents can be retrieved by calling SDK_GetTrafficSearchResult.

Parameters
[in]pSearchRequestthe search request
[in]pCallBackFunccallback function which will be called when the search has completed (mandatory)
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetTrafficSearchResult ( SDK_TrafficSearchResult **  pResult,
SDK_UINT4 pCount,
SDK_INT1  routeIdx,
SDK_INT4  alternativeIdx 
)

Get the whole result of the last traffic search.

The pointer is only valid until the next call to this function, so be careful to not persist this pointer over several calls to this function or it will get corrupted. Don't delete the returning pointer, it will be freed automatically after a new search

Parameters
[in,out]pResultthe returned result.
[in,out]pCountthe number of result items.
[in]routeIdxthe index of the route about which to return the traffic result information for a multi station tour. '0' returns the search result of the current route. '1' returns the search result of the first inactive route, '2' returns the search result of the second inactive route, and so on. For Standard A-B routings, use '0'.
[in]alternativeIdxThe index of the corresponding alternative route. Set to 0 if you don't use alternative routes.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetTrafficSearchResultStatistics ( SDK_INT4 pNew,
SDK_INT4 pModified,
SDK_INT4 pDeleted,
SDK_DOUBLE pVolume 
)

Get statistics about the items for the last traffic search result.

Parameters
[in,out]pNewThe number of new items since the last search.
[in,out]pModifiedThe number of modified items since the last search.
[in,out]pDeletedThe number of deleted items since the last search.
[in,out]pVolumeThe data volume in [byte] transferred during the last call to SDK_SearchTrafficInformation. The volume will only have a valid value if the flag doGetVolumeStatistics in SDK_TrafficSearchWebConfiguration is set to SDK_TRUE. Not supported on every platform.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_GetTrafficDelayOnRoute ( SDK_INT4 pDelay,
SDK_BOOL pBlockingAhead,
SDK_BOOL  bComplete,
SDK_INT1  routeIdx,
SDK_INT4  alternativeIdx 
)

Get the traffic delay on the current route from the current position on.

If no route is given, the delay will be set to 0.

Parameters
[in,out]pDelayWill be set to the current delay on the route or to 0, if no route is given.
[in,out]pBlockingAheadWill be set to SDK_TRUE, if a blocking jam is ahead on the route.
[in]bCompleteIf set to true, the delay on the whole route will be returned, otherwise, the delay from the current position (in this case, a navigation must have been started to get the delay, if not, 0 will be returned).
[in]routeIdxthe index of the tour route about which to return the traffic result information for a multi station tour. '0' returns the traffic delay of the current route. '1' returns the traffic delay of the first inactive route, '2' returns the traffic delay of the second inactive route, and so on. For Standard A-B routings, use '0'.
[in]alternativeIdxThe index of the corresponding alternative route. Set to 0 if you don't use alternative routes.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_RefreshTrafficTracesAndIcons ( SDK_BOOL  showOnlyIconsOnRoute)

Refresh the traffic icons and traces the next time the map is rendered.

Calling this function will update the traces and icons on the map. Be sure to call this after the callback of SDK_SearchTrafficInformation() has succeeded and not while the search is running! Attention: the map will not be updated immediately, but the next time it is rendered!

Parameters
showOnlyIconsOnRouteWhen set and a route was calculated, only icons on the route will be shown.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_RemoveTrafficTraces ( )

Remove manually the traffic traces from the last traffic search.

Traces will be removed and rerendered automatically when SDK_SearchTrafficInformation() was executed successfully. This interface is for clearing the traces manually, for instance, if the traffic search will not be needed anymore.

Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_ResetTrafficSimulation ( )

Resets the current traffic simulation, scans for new traffic log files and initializes a new simulation.

Returns
Error code (Errorcodes)

© PTV Group 2019 Generated on Thu Mar 28 2019 02:27:02 for NavigationSDK by doxygen 1.8.8