Skip to main content

CameraFit

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

Raises:

Properties

  • bounds - The bounds which the camera should contain once it is fitted.
  • coordinates - The coordinates which the camera should contain once it is fitted.
  • force_integer_zoom_level - Whether the zoom level of the resulting fit should be rounded to the nearest integer level.
  • max_zoom - The inclusive upper zoom limit used for the resulting fit.
  • min_zoom
  • padding - Adds a constant/pixel-based padding to the normal fit.

Properties

boundsclass-attributeinstance-attribute

bounds: Optional[MapLatitudeLongitudeBounds] = 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.

coordinatesclass-attributeinstance-attribute

coordinates: Optional[list[MapLatitudeLongitude]] = 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_levelclass-attributeinstance-attribute

force_integer_zoom_level: bool = False

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

max_zoomclass-attributeinstance-attribute

max_zoom: Optional[Number] = 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_zoomclass-attributeinstance-attribute

min_zoom: Number = 0.0

paddingclass-attributeinstance-attribute

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

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