HERE iOS SDK Developer's Guide

NMARoutePositionSource

Class Summary

class NMARoutePositionSource

Derived from: NSObject, NMAPositionDataSource

A position data source which generates updates by simulating traversal of a route.

Include: NMAKit.framework/headers/NMARoutePositionSource.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMARoutePositionSource

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, writable, assign] float  accuracy

The accuracy used in generated position updates, in meters

[readable, writable, assign] float  movementSpeed

The simulated speed at which to traverse the route, in meters per second

[readable, writable, assign] BOOL  positionLost

Indicates whether the position source returns valid positions

[readable, writable, assign] NMARoute route

The route from which to generate position updates

[readable, writable, assign] BOOL  stationary

Indicates whether or not the simulated positions are moving along the route

[readable, writable, assign] NSTimeInterval  updateInterval

The time period between successive position updates, in seconds

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(nonnull) init

Initialize an NMARoutePositionSource instance

-(nonnull) initWithRoute:(nonnull NMARoute *) route

Initializes an NMARoutePositionSource with a given route

-(void) reset

Erases all progress along the route

Class Details

A position data source which generates updates by simulating traversal of a route.

Note:

This class uses UIApplication background tasks to allow it to generate position updates whilst the app is backgrounded. The amount of time it can run in the background is therefore decided by Apple and could only be a couple of minutes. To guarantee background position updates beyond this you will need use other means to keep your app running in the background.

Public Property Details

[readable, writable, assign] float accuracy

The accuracy used in generated position updates, in meters.

Note:

The default value is 5.0m.

[readable, writable, assign] float movementSpeed

The simulated speed at which to traverse the route, in meters per second.

Note:

The default value is 20m/s.

[readable, writable, assign] BOOL positionLost

Indicates whether the position source returns valid positions.

Setting positionLost to YES can be used to simulate position loss. Position updates will still be generated by the position source, but the currentPosition property will always return nil.

Note:

Progress along the route will continue regardless of the value of this property.

Note:

The default value is NO.

[readable, writable, assign] NMARouteroute

The route from which to generate position updates.

Note:

The route can't be changed while position generation is active.

[readable, writable, assign] BOOL stationary

Indicates whether or not the simulated positions are moving along the route.

If stationary is YES, the currentPosition will remain fixed at the last calculated position, or the beginning of the route if no progress has been made.

Note:

The default value is NO.

[readable, writable, assign] NSTimeInterval updateInterval

The time period between successive position updates, in seconds.

Note:

The default value is 1.0s.

Instance Method Details

-(nonnull) init

Initialize an NMARoutePositionSource instance.

-(nonnull) initWithRoute:(nonnull NMARoute *) route

Initializes an NMARoutePositionSource with a given route.

-(void) reset

Erases all progress along the route.

Note:

This method will not affect any properties, including the current route.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.