setCameraFocus method
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
- GemError.success - Camera focus updated successfully
- GemError.invalidInput - Invalid coordinates (must be between 0.0 and 1.0)
See also:
- cameraFocus - Current camera focus position
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']);
}