setViewpointAnimated method

Future<bool> setViewpointAnimated(
  1. Viewpoint viewpoint,
  2. {double? duration}
)

Pan or zoom the GeoViewController using animation to the specified Viewpoint location. Animation takes place over the specified duration.

Parameters:

  • viewpoint — The viewpoint.
  • duration — The amount of time in seconds to move to the new viewpoint. If the duration is null, the default duration is used.

Return Value: A Future.

Implementation

Future<bool> setViewpointAnimated(Viewpoint viewpoint, {double? duration}) {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_GeoView_setViewpointAsyncCombined(
        _handle, viewpoint._handle, duration, errorHandler);
  });
  return taskHandle.toFuture((element) => element.getValueAsBool()!);
}