setCameraFocus method

GemError setCameraFocus(
  1. Point<double> pos
)

Set the camera focus position within the viewport during follow mode

Determines where the position tracker appears in the viewport. For example, use Point(0.5, 0.7) to place the tracker at the horizontal center and 70% down from the top, leaving more space to view the route ahead.

Changes take effect when GemMapController.startFollowingPosition is called.

Parameters

  • pos - The camera focus point with x and y coordinates between 0.0 (left/top) and 1.0 (right/bottom)

Returns

See also:

Implementation

GemError setCameraFocus(final Point<double> pos) {
  final OperationResult resultString = objectMethod(
    pointerId,
    'FollowPositionPreferences',
    'setCameraFocus',
    args: XyType<double>.fromPoint(pos),
    dependencyId: _mapPointerId,
  );

  return GemErrorExtension.fromCode(resultString['result']);
}