Skip to content

CameraFit

CameraFit #

Defines how the camera should fit the bounds or coordinates, depending on which one was provided.

RAISES DESCRIPTION
AssertionError

If both bounds and coordinates

bounds #

bounds: MapLatitudeLongitudeBounds | None = None

The bounds which the camera should contain once it is fitted.

Note

If this is not None, coordinates should be None, and vice versa.

coordinates #

coordinates: list[MapLatitudeLongitude] | None = None

The coordinates which the camera should contain once it is fitted.

Note

If this is not None, bounds should be None, and vice versa.

force_integer_zoom_level #

force_integer_zoom_level: bool = False

Whether the zoom level of the resulting fit should be rounded to the nearest integer level.

max_zoom #

max_zoom: Number | None = None

The inclusive upper zoom limit used for the resulting fit.

If the zoom level calculated for the fit exceeds the max_zoom value, max_zoom will be used instead.

min_zoom #

min_zoom: Number = 0.0

padding #

padding: PaddingValue = field(
    default_factory=lambda: zero()
)

Adds a constant/pixel-based padding to the normal fit.