Navmii SDK  2.2.0
Write yourself a navigation system in iOS
Instance Methods | Class Methods | Properties | List of all members
NMSdk Class Reference

Inherits <NSObject>.

Instance Methods

(void) - startWithSettings:
 
(void) - destroy
 
(void) - pause
 
(void) - resume
 
(void) - pauseGraphics
 
(void) - resumeGraphics
 
(void) - clearMapCacheOnDisk
 
(void) - clearLogs
 
(void) - addSdkStateChangeListener:
 
(void) - removeSdkStateChangeListener:
 

Class Methods

(NSString *) + version
 

Properties

NMMapViewactiveMapView
 
NMSdkState state
 
NMSearchServicesearchService
 
NMMapServicemapService
 
NMPoiCategoryHelperpoiCategoryHelper
 
NMNavigationServicenavigationService
 
NMRoutingServiceroutingService
 
NMTrafficServicetrafficService
 
NMRouteVisualizerrouteVisualizer
 
NMRouteNavigatorrouteNavigator
 
NSString * apiKey
 

Detailed Description

NMSdk class provides abbility to start, pause, resume and destroy the SDK. Also this class provides access to main parts of the SDK: mapService, routingService, searchService, navigationService, trafficService, routeVisualizer and routeNavigator.

Method Documentation

◆ addSdkStateChangeListener:()

- (void) addSdkStateChangeListener: (addSdkStateChangeListener(listener:))  NS_SWIFT_NAME

Adds listener to the list of SDK state change listeners.

◆ clearLogs()

- (void) clearLogs

Clears all logging files stored on disk.

Warning
Can be called before the SDK initialization or after SDK destroy.

◆ clearMapCacheOnDisk()

- (void) clearMapCacheOnDisk

Clears map cache data. @discussion Use this method to remove all the data cached on disk when using online maps.

Warning
Can be called before the SDK initialization or after SDK destroy.

◆ destroy()

- (void) destroy

Destroys the SDK. @discussion Use this method to stop and deinitialize the SDK. Use onSdkDestroyed method of NMSdkStateChangeListener to know when the SDK has been destroyed.

◆ pause()

- (void) pause

Pauses the SDK. Switches off the map rendering and pauses processing. @discussion Use onSdkPaused method of NMSdkStateChangeListener to know when the SDK has been paused.

◆ pauseGraphics()

- (void) pauseGraphics

Switches off the map rendering.

Note
If you're going to use this method, possibly you need to configure the SDK so that it doesn't pause graphics itself when the application enters the background. This configuration is available via the pauseGraphicsWhenEnteringBackground property of NMConfigurationSettings.

◆ removeSdkStateChangeListener:()

- (void) removeSdkStateChangeListener: (removeSdkStateChangeListener(listener:))  NS_SWIFT_NAME

Removes listener from the list of SDK state change listeners.

◆ resume()

- (void) resume

Resumes the SDK. Switches on the map rendering and resumes processing. @discussion Use onSdkResumed method of NMSdkStateChangeListener to know when the SDK has been resumed.

◆ resumeGraphics()

- (void) resumeGraphics

Switches on the map rendering if it is paused.

Note
If you're going to use this method, possibly you need to configure the SDK so that it doesn't resume graphics itself when the application enters the foreground. This configuration is available via the pauseGraphicsWhenEnteringBackground property of NMConfigurationSettings.

◆ startWithSettings:()

- (void) startWithSettings: (nullable NMConfigurationSettings *)  settings

Starts the SDK. @discussion Use this method to initialize the SDK. The process of initialization is asynchronous. If you have attached a listener to NMSdk (via addSdkStateChangeListener: method) use onSdkStarted and onSdkIsFailedToStart: methods of NMSdkStateChangeListener to know when initialization has been finished.

Parameters
settingsConfiguration settings.

◆ version()

+ (NSString *) version

Property Documentation

◆ activeMapView

- (NMMapView*) activeMapView
readwritenonatomicweak

An NMMapView which is currently used to render the map.

@discussion The SDK doesn't retain the view, so you should carefully manage this property to prevent the SDK rendering into the deallocated view.

◆ apiKey

- (NSString*) apiKey
readnonatomiccopy

API key from application plist.

◆ mapService

- (NMMapService*) mapService
readnonatomicstrong

Instance of the map service. nil if the SDK isn't started.

◆ navigationService

- (NMNavigationService*) navigationService
readnonatomicstrong

Instance of the navigation service. nil if the SDK isn't started.

◆ poiCategoryHelper

- (NMPoiCategoryHelper*) poiCategoryHelper
readnonatomicstrong

Instance of the POI category helper. nil if the SDK isn't started.

◆ routeNavigator

- (NMRouteNavigator*) routeNavigator
readnonatomicstrong

Instance of the route navigator. nil if SDK isn't started.

◆ routeVisualizer

- (NMRouteVisualizer*) routeVisualizer
readnonatomicstrong

Instance of the route visualizer. nil if SDK isn't started.

◆ routingService

- (NMRoutingService*) routingService
readnonatomicstrong

Instance of the routing service. nil if SDK isn't started.

◆ searchService

- (NMSearchService*) searchService
readnonatomicstrong

Instance of the search service. nil if the SDK isn't started.

◆ state

- (NMSdkState) state
readnonatomicassign

Current state of the SDK.

◆ trafficService

- (NMTrafficService*) trafficService
readnonatomicstrong

Instance of the traffic service. nil if SDK isn't started.