setViewpointScale method

Future<bool> setViewpointScale(
  1. {required double scale}
)

Zooms the map view to the provided scale around its current center point.

Parameters:

  • scale — The scale to zoom to. For example, 50000 is a scale of 1:50,000.

Return Value: A Future.

Implementation

Future<bool> setViewpointScale({required double scale}) {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_MapView_setViewpointScaleAsync(
        _handle, scale, errorHandler);
  });
  return taskHandle.toFuture((element) => element.getValueAsBool()!);
}