Loading...
Searching...
No Matches
UserLocationLayer Class Referenceabstract

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.
 

Detailed Description

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 20 of file user_location_layer.dart.

Member Function Documentation

◆ anchorEnabled()

bool UserLocationLayer.anchorEnabled ( )

Returns true if custom anchor is enabled.

Dart code snippet:

bool anchorEnabled = _userLocationLayer!.anchorEnabled();
print("Anchor enabled: $anchorEnabled");

◆ isVisible()

bool UserLocationLayer.isVisible ( )

Returns true if user location layer is visible.

Dart code snippet:

bool visible = _userLocationLayer!.isVisible();
print("User location layer is visible: $visible");

◆ resetAnchor()

void UserLocationLayer.resetAnchor ( )

Resets anchor to default (center).

Dart code snippet:

_userLocationLayer!.resetAnchor();
print("Anchor reset to default");

◆ setAnchor()

void UserLocationLayer.setAnchor ( math.Point< double > anchor)

Sets anchor point for user indicator in screen pixels.

Dart code snippet:

ScreenPoint anchor = ScreenPoint(100.0, 200.0);
_userLocationLayer!.setAnchor(anchor);
print("Set user location anchor to: (${anchor.x}, ${anchor.y})");

◆ setVisible()

void UserLocationLayer.setVisible ( bool visible)

Shows or hides user location layer.

Dart code snippet:

_userLocationLayer!.setVisible(true);
print("User location layer set visible");

The documentation for this class was generated from the following file: