You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to configure HereMaps for use with out NMAMapView object.
I have implemented few helper methods for that
`
@objc(initializeNMAContext)
class func initializeNMAContext() {
guard !NMAApplicationContext.isInitialized() && MotionPermissionViewController.isDetermind else { return }
let context = "NMAContext-Info".readPlist()
if let appId = context?["appId"] as? String,
let appCode = context?["appCode"] as? String,
let licenseKey = context?["licenseKey"] as? String {
NMAApplicationContext.setAppId(appId, appCode: appCode, licenseKey: licenseKey)
}
DispatchQueue.main.async {
NMANavigationManager.sharedInstance().mapTrackingEnabled = true
NMANavigationManager.sharedInstance().mapTrackingAutoZoomEnabled = true
NMANavigationManager.sharedInstance().backgroundNavigationEnabled = true
NMANavigationManager.sharedInstance().backgroundMapTrackingMaximumRefreshRate = 0.2
NMANavigationManager.sharedInstance().mapTrackingOrientation = .dynamic
NMANavigationManager.sharedInstance().isSpeedWarningEnabled = true
if let dataSource = NMAHEREPositionSource() {
NMAPositioningManager.sharedInstance().dataSource = dataSource
dataSource.setBackgroundUpdatesEnabled(true)
}
}
}
@objc(isPositioning)
class func isPositioning() -> Bool {
return NMAApplicationContext.isInitialized() && NMAPositioningManager.sharedInstance().isActive
}
@objc(startPositioning)
class func startPositioning() {
guard NMAApplicationContext.isInitialized() else { return }
if !NMAPositioningManager.sharedInstance().isActive {
BackgroundTask.run(queue: .main) { task in
_ = NMAPositioningManager.sharedInstance().startPositioning()
}
}
}
@objc(stopPositioning)
class func stopPositioning() {
guard NMAApplicationContext.isInitialized() else { return }
NMAPositioningManager.sharedInstance().stopPositioning()
}
`
And I do listen to NMAPositioningManagerDidUpdatePosition notification
However, currentRoadElement is always null in there.
Can you help me with it?
What is the correct use case for background execution with out maps.
No maps I mean:
There is no NMAMapView object
Nothing is displayed on the screen.
(We are talking about realtime use-case)
The text was updated successfully, but these errors were encountered:
Hi,
I am trying to configure HereMaps for use with out NMAMapView object.
I have implemented few helper methods for that
`
`
And I do listen to
NMAPositioningManagerDidUpdatePosition
notificationHowever, currentRoadElement is always null in there.
Can you help me with it?
What is the correct use case for background execution with out maps.
No maps I mean:
There is no NMAMapView object
Nothing is displayed on the screen.
(We are talking about realtime use-case)
The text was updated successfully, but these errors were encountered: