setViewpointGeometryCancelable method

CancelableOperation<bool> setViewpointGeometryCancelable(
  1. Geometry boundingGeometry,
  2. {double? paddingInDiPs}
)

Cancelable version of setViewpointGeometry. See that method for more information.

Implementation

CancelableOperation<bool> setViewpointGeometryCancelable(
    Geometry boundingGeometry,
    {double? paddingInDiPs}) {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_MapView_setViewpointGeometryCombined(
        _handle, boundingGeometry._handle, paddingInDiPs, errorHandler);
  });
  return taskHandle
      .toCancelableOperation((element) => element.getValueAsBool()!);
}