startLocationUpdating method

Future<void> startLocationUpdating({
  1. bool enableStopFollow = false,
  2. bool disableUserMarkerRotation = false,
  3. Anchor anchor = Anchor.center,
  4. bool useDirectionMarker = false,
})

startLocationUpdating

Starts receiving the user’s current location.

use this method to start only receiving the user location without controlling the map which you can do that manually

Implementation

Future<void> startLocationUpdating({
  bool enableStopFollow = false,
  bool disableUserMarkerRotation = false,
  Anchor anchor = Anchor.center,
  bool useDirectionMarker = false,
}) async {
  if (kIsWeb || defaultTargetPlatform == TargetPlatform.iOS) {
    await osmBaseController.startLocationUpdating();
    return;
  }
  final hasPermission = await _requestLocationPermission();
  if (!hasPermission) {
    return;
  }

  await osmBaseController.startLocationUpdating();
}