HERE iOS SDK Developer's Guide

NMAPositionIndicator

Class Summary

class NMAPositionIndicator

Derived from: NSObject

Used to provide a visual indication of the user's current position.

Include: NMAKit.framework/headers/NMAPositionIndicator.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAPositionIndicator

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, writable, assign] UIColor *  accuracyIndicatorColor

The color of the accuracy indicator circle

[readable, writable, assign] BOOL  accuracyIndicatorVisible

Indicates whether the NMAPositionIndicator accuracy indicator (the surrounding circle) is visible

[readable, writable, assign] NMAMapObject displayObject

The NMAMapObject displayed at the current position

[readable, writable, assign] float  hue

The color of the position indicator specified as an HSB hue

[readable, writable, assign] float  orientationOffset

The rotation offset in degrees used to orient custom display models.

[readable, writable, assign] BOOL  tracksCourse

Indicates whether the position indicator is automatically reoriented to track the course of the current position.

[readable, writable, assign] NMAPositionIndicatorType   type

The type of positioning used to place the NMAPositionIndicator.

[readable, writable, assign] BOOL  visible

Indicates whether the NMAPositionIndicator is visible

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(void) setDisplayObject:( NMAMapObject *_Nullable) displayObject toLayer:( NMAMapLayerType ) layer

Sets the The NMAMapObject to be displayed and rendered in the specified layer. The default render layer is NMAMapLayerTypeForeground.

Class Details

Used to provide a visual indication of the user's current position.

Each instance of NMAMapView automatically has a NMAPositionIndicator created for it. The position indicator is hidden by default; it can be displayed by change its visible property to YES.

By default, the position indicator displays an NMAMapMarker showing a green circle, but the displayed object can be set to a custom NMAMapObject through the displayObject property. The default render layer of the position indicator is NMAMapLayerTypeForeground.

The accuracy of the current position is indicated by a circle surrounding the indicator object. The visibility of the accuracy indicator is controlled via the accuracyIndicatorVisible property, and its color may be changed by setting the accuracyIndicatorColor.

Note:

The NMAPositionIndicator requires NMAPositioningManager position updates to function correctly, and will automatically start the positioning service when required.

Public Property Details

[readable, writable, assign] UIColor * accuracyIndicatorColor

The color of the accuracy indicator circle.

[readable, writable, assign] BOOL accuracyIndicatorVisible

Indicates whether the NMAPositionIndicator accuracy indicator (the surrounding circle) is visible.

Note:

The getter is isAccuracyIndicatorVisible.

[readable, writable, assign] NMAMapObjectdisplayObject

The NMAMapObject displayed at the current position.

Note:

Supported object types are NMAMapMarker, NMAMapLocalModel, and NMAMapCircle; other object types will be ignored.

Note:

Set to nil to restore the default display object.

[readable, writable, assign] float hue

The color of the position indicator specified as an HSB hue.

Note:

Only affects the default display object.

[readable, writable, assign] float orientationOffset

The rotation offset in degrees used to orient custom display models.

If a custom NMAMapLocalModel is set as the displayObject of the position indicator, it is implicitly assumed that the model is defined "facing" north. If this is not the case, the model's offset from north should be specified here to ensure that it will be oriented the right way. The offset is measured clockwise from north; for example, if the model is facing east, the offset should be set to 90.

Note:

This value should be left at zero when using the default display object.

[readable, writable, assign] BOOL tracksCourse

Indicates whether the position indicator is automatically reoriented to track the course of the current position.

If course tracking is enabled, the (yaw) rotation of the model will be automatically modified. To avoid interference, it should not be manually adjusted. If the model orientation needs to be adjusted to face it the right way, use the orientationOffset property.

Note:

The default value is YES.

Note:

Only applies to display objects of type NMAMapLocalModel (including the default display object).

See also:

orientationOffset

[readable, writable, assign] NMAPositionIndicatorType  type

The type of positioning used to place the NMAPositionIndicator.

The position indicator can be configured to use any of the positioning properties of NMAPositioningManager: rawPosition, mapMatchedPosition, or currentPosition.

Note:

The default value is NMAPositionIndicatorTypeCurrent.

Note:

If NMAPositionIndicatorTypeMapMatched is selected and map matching is not enabled in the NMAPositioningManager, the indicator will not be shown.

[readable, writable, assign] BOOL visible

Indicates whether the NMAPositionIndicator is visible.

Note:

The getter is isVisible.

Note:

Setting visible to YES will start NMAPositioningManager positioning if it is not already active.

Instance Method Details

-(void) setDisplayObject:( NMAMapObject *_Nullable) displayObject toLayer:( NMAMapLayerType ) layer

Sets the The NMAMapObject to be displayed and rendered in the specified layer. The default render layer is NMAMapLayerTypeForeground.

Note:

Supported object types are NMAMapMarker, NMAMapLocalModel, and NMAMapCircle; other object types will be ignored.

Note:

The layer of the accuracy indicator circle will also be changed to the specified layer.

Note:

Set to nil to restore the default display object.