setZoomLevel method
Set the zoom level during follow position mode
Adjusts how close the camera is to the terrain. Higher values provide more detail. Use -1 to enable auto-zoom, where the SDK automatically adjusts zoom based on context.
Parameters
zoomLevel: The desired zoom level (0 to max zoom level), or -1 to enable auto-zoomduration: Animation duration in milliseconds. Use 0 for instant change. Default: 0
Returns
- The previous zoom level before this change
Implementation
int setZoomLevel(final int zoomLevel, {final int duration = 0}) {
final OperationResult resultString = objectMethod(
pointerId,
'FollowPositionPreferences',
'setZoomLevel',
args: <String, int>{'zoomLevel': zoomLevel, 'duration': duration},
dependencyId: _mapPointerId,
);
return resultString['result'];
}