NSDK_Navigation
@interface NSDK_Navigation : NSObject
This class contains all the static functions for accessing the Navigation SDK
-
Initialize the NavigationSDK.
The first call to the Navigation SDK to create an instance of NavigationSDK. In addition to setting up the Navigation SDK internally there are a number of checks done. The library itself is analyzed and the system. If there is less than 12MB of virtual memory left then
NSDK_ErrorCode.NSDK_ERROR_NoMem
is returned. If this gets called a second time on an already initalized instance thenNSDK_ErrorCode.NSDK_ERROR_AlreadyInitialized
is returned and the call has no effect.Declaration
Objective-C
+ (BOOL)initializeWithMapPath:(NSString *)mapPath mapName:(NSString *)mapName addrPath:(NSString *)addrPath appPath:(NSString *)appPath error:(NSError **)error;
Swift
class func initialize(withMapPath mapPath: String!, mapName: String!, addrPath: String!, appPath: String!, error: NSErrorPointer) -> Bool
Parameters
mapPath
The physical path to the map files (e.g.
/maps/
) Don’t forget the trailing path separator.mapName
The name of the map used (e.g.
dac
orita_130_eur
). Don’t specify a file name with file extension here! May be empty.addrPath
Directory which contains the POI data (.dat and .opm) and the addr.uni (if available). This parameter may be NULL. Even if no path is specified the bmp/ subdirectory within the application’s directory will be searched for bitmaps (.opm).
appPath
Directory which contains POI images and fonts.
error
contains error information, if an error occured In case the error code is neither
NSDK_ErrorCode.NSDK_ERROR_Ok
norNSDK_ErrorCode.NSDK_ERROR_AlreadyInitialized
the initialization has failed. E.g.NSDK_ErrorCode.NSDK_ERROR_NoMap
is being returned when there was no map to be opened, but nevertheless the SDK itself is initialized now.Return Value
‘NO’ if an error occured.
-
Release the NavigationSDK instance.
This function deletes the instance of NavigationSDK. All resources created by the NavigationSDK are released.
Declaration
Objective-C
+ (BOOL)finali:(NSError **)error;
Swift
class func finali(_ error: NSErrorPointer) -> Bool
Parameters
error
contains error information, if an error occured.
Return Value
‘NO’ if an error occured.
-
Add an additional path to search for map data.
Declaration
Objective-C
+ (BOOL)addMapPath:(NSString *)mapPath error:(NSError **)error;
Swift
class func addMapPath(_ mapPath: String!, error: NSErrorPointer) -> Bool
Parameters
mapPath
New search path for map data to be added.
error
contains error information, if an error occured.
Return Value
‘NO’ if an error occured.
-
Remove an additional path to search for map data.
Declaration
Objective-C
+ (BOOL)removeMapPath:(NSString *)mapPath error:(NSError **)error;
Swift
class func removeMapPath(_ mapPath: String!, error: NSErrorPointer) -> Bool
Parameters
mapPath
Search path for map data to be removed.
error
contains error information, if an error occured.
Return Value
‘NO’ if an error occured.
-
Add an additional path to search for POI data.
Declaration
Objective-C
+ (BOOL)addPOIPath:(NSString *)path error:(NSError **)error;
Swift
class func addPOIPath(_ path: String!, error: NSErrorPointer) -> Bool
Parameters
path
New search path for POI data to be added. If nil then all paths are removed.
error
contains error information, if an error occured.
Return Value
‘NO’ if an error occured.
-
Remove an additional path to search for map data.
Declaration
Objective-C
+ (BOOL)removePOIPath:(NSString *)path error:(NSError **)error;
Swift
class func removePOIPath(_ path: String!, error: NSErrorPointer) -> Bool
Parameters
path
Search path for map data to be removed.
error
contains error information, if an error occured.
Return Value
‘NO’ if an error occured.
-
Searches for a town.
Searches for a town depending on the name. This is a shortcut for calling searchTown with the mergeTowns parameter set to YES.
Declaration
Objective-C
+ (NSDK_SearchResults *)searchTown:(NSDK_SearchRequest *)searchRequest count:(int)maxResultCount error:(NSError **)error;
Swift
class func searchTown(_ searchRequest: NSDK_SearchRequest!, count maxResultCount: Int32, error: NSErrorPointer) -> NSDK_SearchResults!
Parameters
searchRequest
SearchRequest that contains the information to search for.
maxResultCount
maximum number of returned results.
error
contains error information, if an error occured.
Return Value
The search result or nil if an error occured.
-
Searches for a town.
Searches for a town depending on the name.
Declaration
Objective-C
+ (NSDK_SearchResults *)searchTown:(NSDK_SearchRequest *)searchRequest count:(int)maxResultCount mergeTowns:(BOOL)oneEntryPerTown error:(NSError **)error;
Swift
class func searchTown(_ searchRequest: NSDK_SearchRequest!, count maxResultCount: Int32, mergeTowns oneEntryPerTown: Bool, error: NSErrorPointer) -> NSDK_SearchResults!
Parameters
searchRequest
SearchRequest that contains the information to search for.
maxResultCount
maximum number of returned results.
oneEntryPerTown
if set to ‘YES’, only one entry per town is retrieved.
error
contains error information, if an error occured.
Return Value
The search result or nil if an error occured.
-
Searches for a street.
Searches for a street depending on the name. A former SearchResult specifying a town must be available.
Declaration
Objective-C
+ (NSDK_SearchResults *)searchStreet:(NSDK_SearchRequest *)searchRequest count:(int)maxResultCount townSearchResult:(NSDK_SearchResult *)townSearchResult error:(NSError **)error;
Swift
class func searchStreet(_ searchRequest: NSDK_SearchRequest!, count maxResultCount: Int32, townSearchResult: NSDK_SearchResult!, error: NSErrorPointer) -> NSDK_SearchResults!
Parameters
searchRequest
SearchRequest that contains the information to search for. Valid parameters for the SearchKind in the searchRequest Parameter are: NSDK_SK_STREETBYNAME for a standard street search NSDK_SK_STREETBYNAME_SORTED for sorting the result by the distance to the town given in the townDescription.
By specifying SearchRequest.request="*" one may search for all streets within a town.
maxResultCount
Number of the maximum returned results.
townSearchResult
Existing SearchResult with town to search in. Whether to do a partial name match.
error
contains error information, if an error occured.
Return Value
The search result or nil if an error occured.
-
Search for a house number
Searches for a house number. A former SearchResult specifying a street must be available.
Declaration
Objective-C
+ (NSDK_SearchResults *)searchHouseNr:(NSDK_SearchRequest *)searchRequest count:(int)maxResultCount townSearchResult:(NSDK_SearchResult *)townSearchResult streetSearchResult:(NSDK_SearchResult *)streetSearchResult error:(NSError **)error;
Swift
class func searchHouseNr(_ searchRequest: NSDK_SearchRequest!, count maxResultCount: Int32, townSearchResult: NSDK_SearchResult!, streetSearchResult: NSDK_SearchResult!, error: NSErrorPointer) -> NSDK_SearchResults!
Parameters
searchRequest
SearchRequest that contains the information to search for. Valid parameter for the SearchKind in the searchRequest parameter is: NSDK_SK_HNR
maxResultCount
Number of the maximum returned results.
So far only single house numbers may be searched. If the result however contains a range as indicated by the name (string) the result is an explicit extrapolation of existing data. E.g. the search for the house number "11" may have the result string "3-11" to indicate that the closest match (numerically!) within the data was house number "3", there is no dataset for "11".
townSearchResult
Existing SearchResult with town to search in.
streetSearchResult
Existing SearchResult with street to search in.
error
contains error information, if an error occured.
Return Value
The search result or nil if an error occured.
-
Searches for a town depending on the postcode. The UK and the Netherlands have special postcode systems which are more complex. Searching one of these special postcodes is done by setting the search kind to SDK_SK_NL6POSTCODE or SDK_SK_UK7POSTCODE. This will trigger a search in special indexes. These two search kinds are only valid if the corresponding map is available and active. If not, an error will be returned. If searching in a UK or NL map with the standard search kind, the search will not take place in the special indexes and may be more inaccurate.
Declaration
Objective-C
+ (NSDK_SearchResults *)searchPostcode:(NSDK_SearchRequest *)searchRequest count:(int)maxResultCount mergeTowns:(BOOL)oneEntryPerTown majorOnly:(BOOL)majorOnly distinctHouseNumber:(int)distinctHouseNumber isAmbiguous:(BOOL *)isAmbiguous error:(NSError **)error;
Swift
class func searchPostcode(_ searchRequest: NSDK_SearchRequest!, count maxResultCount: Int32, mergeTowns oneEntryPerTown: Bool, majorOnly: Bool, distinctHouseNumber: Int32, isAmbiguous: UnsafeMutablePointer<ObjCBool>!, error: NSErrorPointer) -> NSDK_SearchResults!
Parameters
searchRequest
SearchRequest that contains the information to search for. Valid parameters for searchRequest.SearchKind are: NSDK_SK_TOWNBYPOSTCODE for standard postcode search in all countries, NSDK_SK_NL6POSTCODE for 6 digit postcode search in NL and NSDK_SK_UK7POSTCODE for 7 digit postcode search in the UK
maxResultCount
Number of the maximum returned results.
majorOnly
Only major cities are considered. Only used in standard postcode search (SearchKind == NSDK_SK_TOWNBYPOSTCODE)
oneEntryPerTown
Only one entry per town is found. Only used in standard postcode search (SearchKind == NSDK_SK_TOWNBYPOSTCODE)
distinctHouseNumber
House number to get an exacter match of the results, if set to -1, all results for the given postcode will be returned. Only used for NL6 postcodes(SearchKind == NSDK_SK_NL6POSTCODE), standard postcode searches will ignore the number.
isAmbiguous
Is set to YES, if result is ambiguous, Only used for NL6 postcodes (SearchKind == SDK_SK_NL6POSTCODE)
error
contains error information, if an error occured.
Return Value
The search result or nil if an error occured.
-
Search for all intersections of the given street
Search for all streets which intersects the street from the given street result.
Declaration
Objective-C
+ (NSDK_SearchResults *)searchCrossing:(NSDK_SearchRequest *)searchRequest count:(int)maxResultCount streetSearchResult:(NSDK_SearchResult *)streetSearchResult error:(NSError **)error;
Swift
class func searchCrossing(_ searchRequest: NSDK_SearchRequest!, count maxResultCount: Int32, streetSearchResult: NSDK_SearchResult!, error: NSErrorPointer) -> NSDK_SearchResults!
Parameters
searchRequest
SearchRequest that contains the information to search for. Valid parameters for searchRequest.SearchKind are: SDK_SK_CROSSING
maxResultCount
Number of the maximum returned results.
streetSearchResult
Existing SearchResult with town and street to search in.
error
contains error information, if an error occured.
Return Value
The search result or nil if an error occured.
-
Undocumented
Declaration
Objective-C
+ (BOOL) NS_SWIFT_NOTHROW destroySearchResult:(int) searchResultHandle error:(NSError**) error;
Swift
class func destroySearchResult(_ searchResultHandle: Int32, error: NSErrorPointer) -> Bool
-
Undocumented
Declaration
Objective-C
+ (BOOL) NS_SWIFT_NOTHROW destroyPOISearchResult:(int) searchResultHandle error:(NSError**) error;
Swift
class func destroyPOISearchResult(_ searchResultHandle: Int32, error: NSErrorPointer) -> Bool
-
Searches for one or more entries in the POI database.
Declaration
Objective-C
+ (NSDK_POISearchResults *)searchPOI:(NSDK_POISearchRequest *)searchRequest layerId:(int)layerId count:(int)maxResultCount error:(NSError **)error;
Swift
class func searchPOI(_ searchRequest: NSDK_POISearchRequest!, layerId: Int32, count maxResultCount: Int32, error: NSErrorPointer) -> NSDK_POISearchResults!
Parameters
searchRequest
that contains the information to search for.
layerId
unique (during runtime) identifier to a POI layer (see
getPOILayerCount
for more details). If -1 is specified then all layers are being used.maxResultCount
Number of the maximum returned results.
error
contains error information, if an error occured.
Return Value
The search result or nil if an error occured.
-
Determine the total number of available POI layers.
POI layers are found in the same path specified by the
addrPath
parameter ofinitializeWithMapPath:
call.To each POI layer an ID between 0 and
getPOILayerCount:
-1 gets assigned. UsegetPOILayerName:
andgetPOIItemCount:
to retrieve more information about the POI layer.Declaration
Objective-C
+ (int)getPOILayerCount;
Swift
class func getPOILayerCount() -> Int32
Return Value
Number of available POI layers (>=0)
-
Calculate a route/tour. A tour is defined to be a route with one or multiple stations. A tour can contain
regular
stations and SVP stations. Regular stations are stations which are defined solely by a geo-coordinate. SVP stations are defined by a set of coordinates with directions (and other attributes) which describe a way to get to a destination.Calculating a tour to one or to multiple stations is done by the following steps:
Create a tour object of type
NSDK_Tour
.Add as many stations as wanted to the tour object.
Call this function to calculate the tour.
You can also use this function to calculate standard A-B routes by setting only 2 stations in the NSDK_Tour object. In this case, there is also the possibility to calculate alternative routes (up to 3) by calling
[NSDK_RouteOptions setRouteCalculationType:]
with the valueNSDK_ROUTE_ALTERNATIVE
. If no alternatives should be calculated, set the parameter toNSDK_ROUTE_CLASSIC
.When an error in the calculation of a tour section occurs, the returned error code will be set and the tour section which caused the error will be returned.
Declaration
Objective-C
+ (int)calculateTour:(NSDK_Tour *)tour observer:(id<NSDK_Observer>)observer error:(NSError **)error;
Swift
class func calculate(_ tour: NSDK_Tour!, observer: NSDK_Observer!, error: NSErrorPointer) -> Int32
Parameters
tour
the tour which should be calculated
observer
optional progress callback
error
contains error information, if an error occured. Common error codes are:
NSDK_ErrorCode.NSDK_Error_NoMap
indicates that one the required maps is missing, this may indicate a missing major road map for cross-border routing.NSDK_ErrorCode.NSDK_Error_OutOfResources
indicates that the route can not be calculated with the given routing options. * - returns: the tour section in case of an error occured -
Set the routing options
Declaration
Objective-C
+ (void)setRoutingOptions:(NSDK_RouteOptions *)routeOptions error:(NSError **)error;
Swift
class func setRoutingOptions(_ routeOptions: NSDK_RouteOptions!, error: NSErrorPointer)
Parameters
routeOptions
Object with the new routing options to set. If set to
nil
the default routing options are restored. One may usegetRoutingOptions:
before calling this method to retrieve the default values.error
contains error information, if an error occured.
-
Retrieve the routing options.
Declaration
Objective-C
+ (NSDK_RouteOptions *)getRoutingOptions:(NSError **)error;
Swift
class func getRoutingOptions(_ error: NSErrorPointer) -> NSDK_RouteOptions!
Parameters
error
contains error information, if an error occured.
Return Value
the routing options or nil if an error occured
-
Retrieve the lorry options
Declaration
Objective-C
+ (NSDK_LorryOptions *)getLorryOptions:(NSError **)error;
Swift
class func getLorryOptions(_ error: NSErrorPointer) -> NSDK_LorryOptions!
Parameters
error
contains error information, if an error occured.
Return Value
the lorry options
-
Set the Lorry options.
Declaration
Objective-C
+ (void)setLorryOptions:(NSDK_LorryOptions *)lorryOptions error:(NSError **)error;
Swift
class func setLorryOptions(_ lorryOptions: NSDK_LorryOptions!, error: NSErrorPointer)
Parameters
lorryOptions
object to be filled with the new settings. If set to
nil the default settings are restored. One may use
getLorryOptions: before calling this method to retrieve the default valueserror
contains error information, if an error occured.
-
Retrieve guidance information for a position on the current routing.
Guidance information is necessary to interpret actual routing data. Note that this call may change the currently open map within the Navigation SDK!
Due to the nature of
navigation
this call may take a while to return. Especially in the case of cross-border routing and if a reroute calculation has to be performed internally. So be prepared for this, e.g. by using the callback parameter. Don’t forget that the SDK is not re-entrant, during this call there is no map rendering, etc. available!Declaration
Objective-C
+ (NSDK_NavigationInformation *)getGuidanceInformation:(NSDK_GPSData *)gpsData error:(NSError **)error;
Swift
class func getGuidanceInformation(_ gpsData: NSDK_GPSData!, error: NSErrorPointer) -> NSDK_NavigationInformation!
Parameters
gpsData
object with actual GPS information. This argument must not be nil.
error
contains error information, if an error occured.
Return Value
object that contains all relevant information of the actual routing. Either the GPSPosition or the GPSPositionMerc member is filled. Returns nil if an error occured
-
This function builds and returns a string that can be used for navigation announcements. The navigation information given will be interpreted, decoded and a corresponding sentence will be built. The function only returns a non empty string if the current maneuver situation should be spoken, multiple identical outputs will be avoided. If the returned string is not empty, the announcement is valid and should be spoken or outputted by a player.
The grammar and the localization of the strings is not done in the function itself. Instead
getText:
method is called from the given parameterNSDK_StringRetriever
to retrieve the correct grammar and sentence portions from outside the SDK.getText:
will be called with the ID for the needed string when building the announcement text. This has the great advantage that no localization is needed inside the SDK, the grammar and sentences will all be declared in a separate place and the callee will return the correct portions of the sentence by the callback. The string IDs used for the sentences and the grammar can be found inNSDK_ManeuverTextID
. We have mappings for several languages, both for TTS and sound output.Declaration
Objective-C
+ (NSString *)getManeuverText:(NSDK_NavigationInformation *)info stringRetriever:(id<NSDK_StringRetriever>)retriever error:(NSError **)error;
Swift
class func getManeuverText(_ info: NSDK_NavigationInformation!, stringRetriever retriever: NSDK_StringRetriever!, error: NSErrorPointer) -> String!
Parameters
info
current navigation information.
retriever
object must implement the
getText:
method of theNSDK_StringRetriever
protocolerror
contains error information, if an error occured.
Return Value
the current announcement string or a string with length 0, if there is no ManeuverText currently
-
Set the maneuver generator settings.
Declaration
Objective-C
+ (BOOL)setManeuverGeneratorSettings: (NSDK_ManeuverGeneratorSettings *)maneuverSettings error:(NSError **)error;
Swift
class func setManeuverGeneratorSettings(_ maneuverSettings: NSDK_ManeuverGeneratorSettings!, error: NSErrorPointer) -> Bool
Parameters
maneuverSettings
the ManeuverGeneratorSettings
error
contains error information, if an error occured.
-
Get the maneuver generator settings.
Declaration
Objective-C
+ (NSDK_ManeuverGeneratorSettings *)getManeuverGeneratorSettings: (NSError **)error;
Swift
class func getManeuverGeneratorSettings(_ error: NSErrorPointer) -> NSDK_ManeuverGeneratorSettings!
Parameters
error
contains error information, if an error occured.
Return Value
the current NSDK_ManeuverGeneratorSettings
-
Query the localized string for a distance value
Declaration
Objective-C
+ (NSString *)getLocalizedDistanceString:(long)distanceInMeters quantify:(BOOL)quantify allowNow:(BOOL)allowNow now:(NSString *)nowString error:(NSError **)error;
Swift
class func getLocalizedDistanceString(_ distanceInMeters: Int, quantify: Bool, allowNow: Bool, now nowString: String!, error: NSErrorPointer) -> String!
Parameters
distanceInMeters
The distance in meters to convert to a well human readable string for the currently set metric
quantify
Flag whether the distance should be quantified to a reasonable value for the current set metric
allowNow
If ‘YES’, replace the distance in case of a
now
maneuver with the string given in nowStringnowString
The string to be returned if allowNow is set to ‘YES’ and we have a
now
maneuvererror
contains error information, if an error occured.
Return Value
The localized and quantified distance string or ‘nil’ in case of error
-
Query the localized string for a distance value
Declaration
Objective-C
+ (NSString *)getLocalizedDistanceString:(long)distanceInMeters quantify:(BOOL)quantify error:(NSError **)error;
Swift
class func getLocalizedDistanceString(_ distanceInMeters: Int, quantify: Bool, error: NSErrorPointer) -> String!
Parameters
distanceInMeters
The distance in meters to convert to a well human readable string for the currently set metric
quantify
Flag whether the distance should be quantified to a reasonable value for the current set metric
error
contains error information, if an error occured.
Return Value
The localized and quantified distance string or ‘nil’ in case of error
-
Start an asynchronous search for traffic information
This call triggers an asynchronous call to a traffic REST service, hosted by PTV. An API Key has to be provided
The search will be around the current route or around the given position, dependend if there is a current route or not. Because the search will be started in a separate thread, the function call returns immediately.
An observer is used to get information if the search succeeded or not. The caller has to subclass the NSDK_Observer class and must override the
onFinished:
method of it to get informed when the search has finished.The traffic incidents can be retrieved by calling
getTrafficSearchResults
Declaration
Objective-C
+ (BOOL)searchTrafficInformationWithPosition:(NSDK_Position *)position observer:(id<NSDK_Observer>)observer error:(NSError **)error;
Swift
class func searchTrafficInformation(with position: NSDK_Position!, observer: NSDK_Observer!, error: NSErrorPointer) -> Bool
Parameters
position
The geodecimal position from where to search from (if a route is available, the search will be done around the route and this parameter is ignored).
observer
The
onFinished:
method of the observer will be called when the search has finished (must be implemented by the caller).error
contains error information, if an error occured.
-
get traffic information result which has been retrieved before through the
searchTrafficInformationWithPosition:
callDeclaration
Objective-C
+ (NSArray<NSDK_TrafficSearchResult *> *)getTrafficSearchResults: (NSError **)error;
Swift
class func getTrafficSearchResults(_ error: NSErrorPointer) -> [NSDK_TrafficSearchResult]!
Parameters
error
contains error information, if an error occured.
Return Value
array of NSDK_TrafficSearchResult or ‘nil’ in case of error
-
Convenience function that calls
getRouteInformationWithRouteIndex:alternative:error:
with routeIndex ‘0’ and alternative ‘0’Declaration
Objective-C
+ (NSDK_RouteInformation *)getRouteInformation:(NSError **)error;
Swift
class func getRouteInformation(_ error: NSErrorPointer) -> NSDK_RouteInformation!
-
Convenience function that calls
getRouteInformationWithRouteIndex:alternative:error:
with routeIndex ‘0’ and the given alternativeDeclaration
Objective-C
+ (NSDK_RouteInformation *)getRouteInformationWithAlternative:(int)alternative error:(NSError **)error;
Swift
class func getRouteInformation(withAlternative alternative: Int32, error: NSErrorPointer) -> NSDK_RouteInformation!
-
Return general information, like length, duration and toll, about one route of several alternative routes. The first routes’ number is 0, the next alternatives number is 1 and so on. The total number of route alternatives can be retrieved via
getAlternativeRouteCount:
.Declaration
Objective-C
+ (NSDK_RouteInformation *)getRouteInformationWithRouteIndex:(int)routeIndex alternative:(int)alternative error:(NSError **)error;
Swift
class func getRouteInformation(withRouteIndex routeIndex: Int32, alternative: Int32, error: NSErrorPointer) -> NSDK_RouteInformation!
Parameters
routeIndex
the index of the route about which to return the route information for a multi station tour. This value is ignored if no multi station tour is calculated. In the case of a multi station tour ‘-1’ will return the accumulated route information over all routes. ‘0’ returns the route information of the current route. ‘1’ returns the route information of the first inactive route, ‘2’ returns the route information of the second inactive route, and so on.
alternative
the index of the route alternative. If alternative route calculation is not activated or the routeIndex parameter is not set to the current route (routeIndex == 0) this parameter will be ignored.
Return Value
the route information for the route / tour
-
Get information about the traffic delay on the route (for the whole route or from the current position to the end of the route).
Declaration
Objective-C
+ (int)getTrafficDelayOnRouteWithCompleteRoute:(BOOL)completeRoute alternativeRouteId:(int)alternativeRouteIndex error:(NSError **)error;
Swift
class func getTrafficDelayOnRoute(withCompleteRoute completeRoute: Bool, alternativeRouteId alternativeRouteIndex: Int32, error: NSErrorPointer) -> Int32
Parameters
completeRoute
If set to YES, the delay on the whole route will be returned, otherwise, the delay from the current position on (in this case, a navigation must have been started to get the delay, if not, 0 will be returned).
alternativeRouteIndex
The index of the corresponding alternative route. Set to 0 if you dont use alternative routes.
error
contains error information, if an error occured.
Return Value
The current delay on route in seconds or 0, if no route is given.
-
Get the number of alternative routes including the default or original route.
Declaration
Objective-C
+ (int)getAlternativeRouteCount:(NSError **)error;
Swift
class func getAlternativeRouteCount(_ error: NSErrorPointer) -> Int32
Parameters
error
contains error information, if an error occured.
Return Value
The number of alternative routes.
-
Get the current active route alternative.
Declaration
Objective-C
+ (int)getAlternativeRouteActive:(NSError **)error;
Swift
class func getAlternativeRouteActive(_ error: NSErrorPointer) -> Int32
Parameters
error
contains error information, if an error occured.
Return Value
The index of the current alternative route.
-
Set the given route as the active route (use
getAlternativeRouteCount:
to get the number of alternative routes available.) The active route will be highlighted in the map view, while the other alternative routes will get greyed out.Declaration
Objective-C
+ (void)setAlternativeRouteActive:(int)alternative error:(NSError **)error;
Swift
class func setAlternativeRouteActive(_ alternative: Int32, error: NSErrorPointer)
Parameters
alternative
The index of the alternative route to highlight.
-
Returns the number of maps which are currently under control of NavigationSDK.
Declaration
Objective-C
+ (int)getMapCount;
Swift
class func getMapCount() -> Int32
Return Value
The number of available maps.
-
Undocumented
Declaration
Objective-C
+ (NSDK_MapInformationResults*) getAvailableMaps;
Swift
class func getAvailableMaps() -> NSDK_MapInformationResults!
-
Returns detailed information about a map.
Hint: A couple of fields inside the returned NSDK_MapInformation object is not filled, if the map is currently closed.
Declaration
Objective-C
+ (NSDK_MapInformation *)getMapInformation:(int)idx error:(NSError **)error;
Swift
class func getMapInformation(_ idx: Int32, error: NSErrorPointer) -> NSDK_MapInformation!
Parameters
idx
Parameter to identify the map. (valid range from 0 to
[NSDK_Navigation getMapCount:]
- 1). A value of-1
returns information about the current maperror
contains error information, if an error occured.
Return Value
The Map Information or ‘nil’ in case of an error.
-
Switches to another map.
Attention: Calling this during a navigation takes place may cause the Navigation SDK to crash
Declaration
Objective-C
+ (BOOL)changeMap:(int)idx error:(NSError **)error;
Swift
class func changeMap(_ idx: Int32, error: NSErrorPointer) -> Bool
Parameters
idx
Parameter to identify the map. (valid range from 0 to
[NSDK_Navigation getMapCount:]
- 1).error
contains error information, if an error occured.
-
Create an image that shall be rendered in the current map
Declaration
Objective-C
+ (int)addImage:(NSString *)bitmapName center:(NSDK_Position *)center error:(NSError **)error;
Swift
class func addImage(_ bitmapName: String!, center: NSDK_Position!, error: NSErrorPointer) -> Int32
Parameters
bitmapName
Path to a bitmap. The bitmap has be included in the bundle of the iOS app.
center
The coordinates of the center (Mercator)
error
contains error information, if an error occured.
Return Value
A unique image id, or -1 in case of error.
-
Position image
Declaration
Objective-C
+ (void)positionImage:(int)imageId center:(NSDK_Position *)center error:(NSError **)error;
Swift
class func positionImage(_ imageId: Int32, center: NSDK_Position!, error: NSErrorPointer)
Parameters
imageId
valid image id, which has been returned by ‘addImage:’ call
center
The coordinates of the center (Mercator).
error
contains error information, if an error occured.
-
Delete image.
Declaration
Objective-C
+ (void)deleteImage:(int)imageId error:(NSError **)error;
Swift
class func deleteImage(_ imageId: Int32, error: NSErrorPointer)
Parameters
imageId
Valid image id.
error
contains error information, if an error occured.
-
Delete all images
Declaration
Objective-C
+ (void)deleteImages:(NSError **)error;
Swift
class func deleteImages(_ error: NSErrorPointer)
Parameters
error
contains error information, if an error occured.
-
Converts the heading from the following format: North = 0 and clockwise orientation.
into the SDK format: East = 0 and counter clockwise orientation.
Declaration
Objective-C
+ (short)convertGeoHeading:(int)heading;
Swift
class func convertGeoHeading(_ heading: Int32) -> Int16
Parameters
heading
the heading in input format
Return Value
the heading in SDK format
-
Create a GPS simulation file for the most recent calculated route.
Declaration
Objective-C
+ (void)createGPSSimulationWithPath:(NSString *)path error:(NSError **)error;
Swift
class func createGPSSimulation(withPath path: String!, error: NSErrorPointer)
Parameters
path
Path of file to be created. The file must be writable. For further information have a look at the tutorial documentation.
error
contains error information, if an error occured.
-
Undocumented
Declaration
Objective-C
+ (void) NS_SWIFT_NOTHROW simulateTrafficWithPath:(NSString*) path error:(NSError**) error;
Swift
class func simulateTraffic(withPath path: String!, error: NSErrorPointer)
-
Set the auto zoom scales for the given speeds for tracking and navigation mode. The auto zoom uses in non maneuver situations the current velocity and the velocity of the current road segment to determine the scale value. There are five speed values at which the scale changes. Each speed value has a correspondent scale value in 2d and 3d.
Declaration
Objective-C
+ (void)setAutoZoomSpeedScales:(BOOL)trackingMode marginalSpeeds:(NSArray<NSNumber *> *)marginalSpeeds scaleFactor2d:(NSArray<NSNumber *> *)scaleFactor2d scaleFactor3d:(NSArray<NSNumber *> *)scaleFactor3d error:(NSError **)error;
Swift
class func setAutoZoomSpeedScales(_ trackingMode: Bool, marginalSpeeds: [NSNumber]!, scaleFactor2d: [NSNumber]!, scaleFactor3d: [NSNumber]!, error: NSErrorPointer)
Parameters
trackingMode
If set to ‘YES’, set the tracking speeds and scales, else the navigation speeds and scales will be set
marginalSpeeds
The speeds at which the scale should change
scaleFactor2d
The scales for the MarginalSpeeds in 2d
scaleFactor3d
The scales for the MarginalSpeeds in 3d
error
contains error information, if an error occured.
-
Set the auto zoom scale margins in 2d and 3d. This function sets the minimum and the maximum zoom level the auto zoom can get when zooming is caused by a maneuver. There are two minimum levels for 2d and two minimum levels for 3d. The minZoomSlow2d/minZoomSlow3d will be the lowest scale the auto zoom can reach in a maneuver zoom in 2d/3d if the velocity is lower than 72 km/h. If the velocity is equal or higher than 72 km/h, the values of minZoomFast2d/minZoomFast3d will be used as minimum. The maxZoom2d/maxZoom3d values are the upper limit of the auto zoom in maneuver mode.
Declaration
Objective-C
+ (void)setAutoZoomScaleMargins:(int)minZoomSlow2d minZoomFast2d:(int)minZoomFast2d maxZoom2d:(int)maxZoom2d minZoomSlow3d:(int)minZoomSlow3d minZoomFast3d:(int)minZoomFast3d maxZoom3d:(int)maxZoom3d error:(NSError **)error;
Swift
class func setAutoZoomScaleMargins(_ minZoomSlow2d: Int32, minZoomFast2d: Int32, maxZoom2d: Int32, minZoomSlow3d: Int32, minZoomFast3d: Int32, maxZoom3d: Int32, error: NSErrorPointer)
Parameters
minZoomSlow2d
Minimum zoom level for velocities < 72 km/h in maneuver zoom (2d)
minZoomFast2d
Minimum zoom level for velocities >= 72 km/h in maneuver zoom (2d)
maxZoom2d
Maximum zoom level in maneuver zoom (2d)
minZoomSlow3d
Minimum zoom level for velocities < 72 km/h in maneuver zoom (3d)
minZoomFast3d
Minimum zoom level for velocities >= 72 km/h in maneuver zoom (3d)
maxZoom3d
Maximum zoom level in maneuver zoom (3d)
error
contains error information, if an error occured.
-
Set the auto zoom linear approximation stepping values To avoid jumping in or out while zooming, the auto zoom will add or substract at each call to SDK_DoAutoZoom() a stepping value to the current scale until the calculated scale will be reached. The default steppings are 1 for stepping out and 30 for stepping in (for 4 times calling the function per second).
Declaration
Objective-C
+ (void)setAutoZoomSteppingValues:(float)stepOut stepIn:(float)stepIn error:(NSError **)error;
Swift
class func setAutoZoomSteppingValues(_ stepOut: Float, stepIn: Float, error: NSErrorPointer)
Parameters
stepOut
Incremental scale value for stepping out, default is 1
stepIn
Incremental scale value for stepping in, default is 30
error
contains error information, if an error occured.
-
Retrieve a simplified arrow representation for the given maneuver situation
Declaration
Objective-C
+ (NSDK_ManeuverArrow)getManeuverArrow:(NSDK_ManeuverDescription *)description crossing:(NSDK_CrossingView *)crossing error:(NSError **)error;
Swift
class func getManeuverArrow(_ description: NSDK_ManeuverDescription!, crossing: NSDK_CrossingView!, error: NSErrorPointer) -> NSDK_ManeuverArrow
Parameters
description
the description of the Maneuver
crossing
information about the next crossing
Return Value
the corresponding arrow enum
-
Start tracking mode
The tracking mode should be used if there is no need for navigation any longer. Any internal data about navigation will be cleared. Calls to NSDK_UIMapView#setCenterWithPosition to adjust the map position result in setting the most suitable map, so there’s always the best map available!. Since switching maps may not be always the intent of the user this mode can be switched off. There is no need to stop this mode prior to calculating a new route and starting navigation afterwards.
Declaration
Objective-C
+ (void)trackingMode:(BOOL)enable error:(NSError **)error;
Swift
class func trackingMode(_ enable: Bool, error: NSErrorPointer)
Parameters
enable
If set to YES activate the map tracking mode, otherwise deactivate
-
Undocumented
Declaration
Objective-C
+ (int) NS_SWIFT_NOTHROW transformCountryCodeToPtvCode:(NSDK_CountryCodeFormat) sourceFormat countryCode:(NSString*) cc error:(NSError**) error;
Swift
class func transformCountryCode(toPtvCode sourceFormat: NSDK_CountryCodeFormat, countryCode cc: String!, error: NSErrorPointer) -> Int32
-
Undocumented
Declaration
Objective-C
+ (NSString*) NS_SWIFT_NOTHROW transformPtvCodeToCountryCode:(NSDK_CountryCodeFormat) destinationFormat ptvCode:(int) ptvCode error:(NSError**) error;
Swift
class func transformPtvCode(toCountryCode destinationFormat: NSDK_CountryCodeFormat, ptvCode: Int32, error: NSErrorPointer) -> String!
-
Undocumented
Declaration
Objective-C
+ (void) NS_SWIFT_NOTHROW loadVehicleProfile:(NSString*) filePath error:(NSError**) error;
Swift
class func loadVehicleProfile(_ filePath: String!, error: NSErrorPointer)
-
Undocumented
Declaration
Objective-C
+ (NSString*) NS_SWIFT_NOTHROW getProfileName:(NSString*) filePath countryCode:(NSString*) cc error:(NSError**) error;
Swift
class func getProfileName(_ filePath: String!, countryCode cc: String!, error: NSErrorPointer) -> String!
-
Undocumented
Declaration
Objective-C
+ (void) NS_SWIFT_NOTHROW setTrafficSearchWebConfiguration:(NSString*) url token:(NSString*) token error:(NSError**) error;
Swift
class func setTrafficSearchWebConfiguration(_ url: String!, token: String!, error: NSErrorPointer)