startTrackPositions method

GemError startTrackPositions({
  1. required int updatePositionMs,
  2. required MarkerCollectionRenderSettings settings,
  3. DataSource? dataSource,
})

Start improved position tracking and render a marker polyline for tracked positions.

This method enables an enhanced visualization that draws a polyline between relevant map link points for positions provided by a sense data source. The visualization is updated at the requested frequency and uses the supplied rendering settings.

Parameters

  • updatePositionMs: Update interval in milliseconds for the tracked positions. High frequency values may reduce rendering performance on low-end devices.
  • settings: Marker collection rendering settings used to draw the tracked positions on the map view.
  • dataSource: Optional DataSource whose positions will be tracked. If null, the PositionService's default data source is used when available.

Returns

Also see:

Implementation

GemError startTrackPositions({
  required int updatePositionMs,
  required MarkerCollectionRenderSettings settings,
  DataSource? dataSource,
}) {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'MapViewExtensions',
    'startTrackPositions',
    args: <String, Object>{
      'updatePositionMs': updatePositionMs,
      'settings': settings,
      if (dataSource != null) 'dataSource': dataSource.pointerId,
    },
    dependencyId: _mapControllerId,
  );

  return GemErrorExtension.fromCode(resultString['result']);
}