focusViewport property

Rectangle<int> get focusViewport

Get the map view focus viewport.

The focus viewport is the view screen part containing the maximum map details. The coordinates are relative to view parent screen.

The default value is the view whole viewport.

Returns

  • The focus viewport

Implementation

Rectangle<int> get focusViewport {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'MapViewPreferences',
    'getFocusViewport',
    dependencyId: _mapPointerId,
  );

  final Rectangle<int> rect = Rectangle<int>(
      resultString['result']['x'] ?? 0,
      resultString['result']['y'] ?? 0,
      resultString['result']['width'] ?? 0,
      resultString['result']['height'] ?? 0);

  return rect;
}
set focusViewport (Rectangle<int> view)

Set the map view focus viewport.

If view is an empty viewport the focus will be reset to whole view.

Parameters

  • IN view The focus viewport

Implementation

set focusViewport(final Rectangle<int> view) {
  objectMethod(
    _pointerId,
    'MapViewPreferences',
    'setFocusViewport',
    args: RectType<int>.fromRectangle(view),
    dependencyId: _mapPointerId,
  );
}