Layer that automatically renders current user position (arrow and accuracy circle) on the map. Provides visibility and anchoring controls. Referenced from LocationView. More...
Inherits Finalizable.
Public Member Functions | |
| void | setVisible (bool visible) |
| Shows or hides user location layer. | |
| bool | isVisible () |
| Returns true if user location layer is visible. | |
| void | setAnchor (math.Point< double > anchor) |
| 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 (bool active) |
| 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 (UserLocationFollowMode 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. | |
| UserLocationFollowMode | followMode () |
| Returns the current follow mode. | |
| void | setArrowBitmap (ImageProvider? bitmap) |
| Replaces the heading arrow bitmap. Null restores the built-in heading fan. | |
| void | setAccuracyColor (Color color) |
| Sets the accuracy-circle fill. Default is a translucent blue. | |
| bool | isValid () |
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 27 of file user_location_layer.dart.
| bool UserLocationLayer.anchorEnabled | ( | ) |
Returns true if custom anchor is enabled.
Dart code snippet:
| UserLocationFollowMode UserLocationLayer.followMode | ( | ) |
Returns the current follow mode.
Dart code snippet:
| bool UserLocationLayer.headingModeActive | ( | ) |
Returns true if heading-up mode is enabled. Same as followMode() == HEADING.
Dart code snippet:
| bool UserLocationLayer.isValid | ( | ) |
| bool UserLocationLayer.isVisible | ( | ) |
Returns true if user location layer is visible.
Dart code snippet:
| void UserLocationLayer.resetAnchor | ( | ) |
Resets anchor to default (center).
Dart code snippet:
| void UserLocationLayer.setAccuracyColor | ( | Color | color | ) |
Sets the accuracy-circle fill. Default is a translucent blue.
Dart code snippet:
| void UserLocationLayer.setAnchor | ( | math.Point< double > | anchor | ) |
Sets anchor point for user indicator in screen pixels.
Dart code snippet:
| void UserLocationLayer.setArrowBitmap | ( | ImageProvider? | bitmap | ) |
Replaces the heading arrow bitmap. Null restores the built-in heading fan.
Dart code snippet:
| void UserLocationLayer.setFollowMode | ( | UserLocationFollowMode | 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.
Dart code snippet:
| void UserLocationLayer.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.
Dart code snippet:
| void UserLocationLayer.setVisible | ( | bool | visible | ) |
Shows or hides user location layer.
Dart code snippet: