centerOnArea method

void centerOnArea(
  1. RectangleGeographicArea area, {
  2. int zoomLevel = -1,
  3. Point<int>? screenPosition,
  4. GemAnimation? animation,
})

Center the view on the given WGS area

Parameters

  • IN area Geographic area
  • IN zoomLevel Zoom level. When -1 is used, the zoom level is automatically selected so that the entire area is visible on the map.
  • IN screenPosition Screen position where the coordinates should project (default uses the specified cursor coordinates). The coordinates are relative to the parent view screen.
  • IN animation Specifies the animation to be used by the operation.

Throws

  • An exception if it fails.

Implementation

void centerOnArea(
  final RectangleGeographicArea area, {
  final int zoomLevel = -1,
  final Point<int>? screenPosition,
  final GemAnimation? animation,
}) {
  objectMethod(
    _pointerId,
    'MapView',
    'centerOnArea',
    args: <String, Object?>{
      'area': area,
      'zoomLevel': zoomLevel,
      if (screenPosition != null) 'xy': XyType<int>.fromPoint(screenPosition),
      if (animation != null) 'animation': animation,
    },
  );
}