getIsFollowingPosition method

bool getIsFollowingPosition(
  1. bool alsoFlyToPosition
)

Checks if the camera is following the current position with optional animation consideration.

Determines whether the map is in follow position mode, with configurable handling of animation phases. Unlike isFollowingPosition which excludes animation phases, this method allows control over whether the "flying to position" animation is considered as part of follow position mode.

Set alsoFlyToPosition to true to include animation phases, or false to only return true when actively tracking without animation.

Parameters

  • alsoFlyToPosition: If true, considers the map in follow position mode even during animation to position. If false, only returns true when actively tracking without ongoing animation

Returns

  • true if the map is currently following the current position (based on alsoFlyToPosition setting), false otherwise

See also:

Implementation

bool getIsFollowingPosition(bool alsoFlyToPosition) {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'MapView',
    'isFollowingPosition',
    args: alsoFlyToPosition,
  );

  return resultString['result'];
}