stopFollowingPosition method

void stopFollowingPosition({
  1. bool restoreCameraMode = false,
})

Deactivates follow position mode, stopping position tracking.

Stops the camera from automatically tracking and following the device's real or simulated position. After calling this method, the map view remains stationary at its current position until manually moved or a new centering operation is initiated.

Set restoreCameraMode to true to additionally reset the camera to its default zoom level and view angle used in follow position mode, providing a consistent viewing state.

Parameters

  • restoreCameraMode: If true, resets zoom level and view angle to follow position defaults. If false, maintains current camera settings. Defaults to false

See also:

Implementation

void stopFollowingPosition({bool restoreCameraMode = false}) {
  objectMethod(
    _pointerId,
    'MapView',
    'stopFollowingPosition',
    args: restoreCameraMode,
  );
}