HERE iOS SDK Developer's Guide

NMAElectronicHorizon

Class Summary

class NMAElectronicHorizon

Derived from: NSObject

NMAElectronicHorizon is a class that predicts upcoming streets and provides information about them.

Include: NMAKit.framework/headers/NMAElectronicHorizon.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAElectronicHorizon

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, writable, weak] id< NMAElectronicHorizonDelegate delegate

Receives event callbacks containing information about the tree

[readable, strong] NMAEHMapAccessor mapAccessor

An instance of NMAEHMapAccessor class, which can be used to access the information about any link

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(nonnull instancetype) init

-(nullable NSError *) setLookAheadDistancesInCentimeters:(nonnull NSArray< NSNumber * > *) distances

Sets look ahead distances

-(nullable NSError *) setRoute:(nonnull NMARoute *) route

Sets route to follow

-(nullable NSError *) setTrailingDistanceInCentimeters:(NSInteger) distance

-(nullable NSError *) update

Updates electronic horizon with new position

Class Details

NMAElectronicHorizon is a class that predicts upcoming streets and provides information about them.

Electronic horizon builds tree of roads. Main trunk of tree is called 'main path' and it's most likely path which vehicle will follow. Main path can branch into sub paths which are less likely for vehicle to follow, sub paths can branch again and so on.

This features requires additional map data to function correctly - see NMAMapDataGroupADAS and NMAMapDataGroupLinkGDBIdPVId

Public Property Details

[readable, writable, weak] id< NMAElectronicHorizonDelegatedelegate

Receives event callbacks containing information about the tree.

See also:

NMAElectronicHorizonDelegate

[readable, strong] NMAEHMapAccessormapAccessor

An instance of NMAEHMapAccessor class, which can be used to access the information about any link.

Instance Method Details

-(nonnull instancetype) init

Initialize a NMAElectronicHorizon instance

-(nullable NSError *) setLookAheadDistancesInCentimeters:(nonnull NSArray< NSNumber * > *) distances

Sets look ahead distances. First value means distance from current position to the end of main path, second value means distance between current position and end of each sub path (i.e. the farther sub path is branched from current position the less distance between main path and end of this sub path). Third value means distance from current position to the end of sub sub path and so on. Furthermore count of values specifies highest level of branching. For example if you need only main path - specify only one value.

Note:

The default look ahead distances are 800'000 centimeters(8 kilometers).

Parameters:

  • distances

    An array of distances in centimeters from which the number of subpaths should be determined.

Returns:

error if the operation was not successful, otherwise nil.

-(nullable NSError *) setRoute:(nonnull NMARoute *) route

Sets route to follow. Electronic horizon will take route into account to build path tree.

Note:

Only the routes with transport mode NMATransportModeCar or NMATransportModeTruck are supported.

Parameters:

  • route

    Route to follow.

Returns:

error if the operation was not successful, otherwise nil.

-(nullable NSError *) setTrailingDistanceInCentimeters:(NSInteger) distance

Sets distance to remove links afterwards

Note:

The default trailing distance is 10'000 centimeters(100 meters).

Parameters:

  • distance

    The distance in centimeters.

Returns:

error if the operation was not successful, otherwise nil.

-(nullable NSError *) update

Updates electronic horizon with new position. After calling update function the path tree of electronic horizon might be changed.

Returns:

error if the operation was not successful, otherwise nil.