Layer that automatically renders current user position (arrow and accuracy circle) on the map. Provides visibility and anchoring controls. Referenced from LocationView. More...
#include <com/navigine/idl/objc/NCUserLocationLayer.h>
Inherits NSObject.
Instance Methods | |
| (void) | - setVisible: |
| Shows or hides user location layer. | |
| (BOOL) | - isVisible |
| Returns true if user location layer is visible. | |
| (void) | - setAnchor: |
| Sets anchor point for user indicator in screen pixels. | |
| (void) | - resetAnchor |
| Resets anchor to default (center). | |
| (BOOL) | - anchorEnabled |
| Returns true if custom anchor is enabled. | |
| (void) | - setHeadingModeActive: |
| Enables or disables heading-up mode while the user location layer is anchored. | |
| (BOOL) | - headingModeActive |
| Returns true if heading-up mode is enabled. Same as followMode == HEADING. | |
| (void) | - setFollowMode: |
| Sets how the camera follows the user. NONE stops following and keeps a previously set anchor point. POSITION, HEADING and COURSE follow even without setAnchor (screen center). setAnchor() from NONE switches to POSITION. resetAnchor switches to NONE. setHeadingModeActive(true) switches to HEADING. | |
| (NCUserLocationFollowMode) | - followMode |
| Returns the current follow mode. | |
| (void) | - setArrowBitmap: |
| Replaces the heading arrow bitmap. Null restores the built-in heading fan. | |
| (void) | - setAccuracyColor: |
| Sets the accuracy-circle fill. Default is a translucent blue. | |
Properties | |
| BOOL | valid |
Layer that automatically renders current user position (arrow and accuracy circle) on the map. Provides visibility and anchoring controls. Referenced from LocationView.
Definition at line 22 of file NCUserLocationLayer.h.
| - (BOOL) anchorEnabled |
Returns true if custom anchor is enabled.
Swift code snippet:
Objective C code snippet:
| - (NCUserLocationFollowMode) followMode |
Returns the current follow mode.
Swift code snippet:
Objective C code snippet:
| - (BOOL) headingModeActive |
Returns true if heading-up mode is enabled. Same as followMode == HEADING.
Swift code snippet:
Objective C code snippet:
| - (BOOL) isVisible |
Returns true if user location layer is visible.
Swift code snippet:
Objective C code snippet:
| - (void) resetAnchor |
Resets anchor to default (center).
Swift code snippet:
Objective C code snippet:
| - (void) setAccuracyColor: | (nonnull UIColor *) | color |
Sets the accuracy-circle fill. Default is a translucent blue.
Swift code snippet:
Objective C code snippet:
| - (void) setAnchor: | (CGPoint) | anchor |
Sets anchor point for user indicator in screen pixels.
Swift code snippet:
Objective C code snippet:
| - (void) setArrowBitmap: | (nullable UIImage *) | bitmap |
Replaces the heading arrow bitmap. Null restores the built-in heading fan.
Swift code snippet:
Objective C code snippet:
| - (void) setFollowMode: | (NCUserLocationFollowMode) | mode |
Sets how the camera follows the user. NONE stops following and keeps a previously set anchor point. POSITION, HEADING and COURSE follow even without setAnchor (screen center). setAnchor() from NONE switches to POSITION. resetAnchor switches to NONE. setHeadingModeActive(true) switches to HEADING.
Swift code snippet:
Objective C code snippet:
| - (void) setHeadingModeActive: | (BOOL) | active |
Enables or disables heading-up mode while the user location layer is anchored.
When enabled and a location heading is available, the map camera rotates to keep the user's heading pointed toward the top of the screen. Without an anchor the location icon keeps rotating independently.
Swift code snippet:
Objective C code snippet:
| - (void) setVisible: | (BOOL) | visible |
Shows or hides user location layer.
Swift code snippet:
Objective C code snippet:
|
readnonatomicassign |
Tells if this object is valid or not. Any method called on an invalid object will throw an exception. The object becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now.
Definition at line 204 of file NCUserLocationLayer.h.