centerOnRoutePart method

void centerOnRoutePart(
  1. Route route,
  2. int startDist,
  3. int endDist, {
  4. RectType<int>? screenRect,
  5. GemAnimation? animation,
})

Center on the given route part.

The zoom level is automatically selected so that the entire route is visible on the map.

Parameters

  • IN route Route to be shown.
  • IN startDist Specifies the start distance from route begin.
  • IN endDist Specifies the end distance from route begin.
  • IN screenRect Screen rectangle where area should be centered. The coordinates are relative to view parent screen.
  • IN animation Specifies the animation to be used by the operation.

Throws

  • An exception if it fails.

Implementation

void centerOnRoutePart(
  final Route route,
  final int startDist,
  final int endDist, {
  final RectType<int>? screenRect,
  final GemAnimation? animation,
}) {
  objectMethod(
    _pointerId,
    'MapView',
    'centerOnRoutePart',
    args: <String, dynamic>{
      'route': route.pointerId,
      'startDist': startDist,
      'endDist': endDist,
      if (screenRect != null) 'viewRc': screenRect,
      if (animation != null) 'animation': animation,
    },
  );
}