setViewpointCenter method

Future<bool> setViewpointCenter(
  1. ArcGISPoint center,
  2. {double? scale}
)

Centers the map view at the provided center point and zooms to the given scale.

Parameters:

  • center — The location at which to center the map view.
  • scale — The scale at which the map is displayed.

Return Value: A Future.

Implementation

Future<bool> setViewpointCenter(ArcGISPoint center, {double? scale}) {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_MapView_setViewpointCenterCombined(
        _handle, center._handle, scale, errorHandler);
  });
  return taskHandle.toFuture((element) => element.getValueAsBool()!);
}