MTFitBoundsOptions
public struct MTFitBoundsOptions : Sendable, Codable
Options that configure how the map fits to a set of bounds.
-
Padding to apply on each side of the viewport when fitting the bounds.
Declaration
Swift
public var padding: MTFitBoundsPadding? -
The maximum zoom level that the fit operation can produce.
Declaration
Swift
public var maxZoom: Double? -
Enables linear interpolation instead of the default easing.
Declaration
Swift
public var linear: Bool? -
Final bearing for the camera after the fit completes.
Declaration
Swift
public var bearing: Double? -
Final pitch for the camera after the fit completes.
Declaration
Swift
public var pitch: Double? -
Additional animation configuration.
Declaration
Swift
public var animationOptions: MTAnimationOptions? -
Creates a new set of fit bounds options.
Declaration
Swift
public init( padding: MTFitBoundsPadding? = nil, maxZoom: Double? = nil, linear: Bool? = nil, bearing: Double? = nil, pitch: Double? = nil, animationOptions: MTAnimationOptions? = nil )Parameters
paddingPadding to apply around the fitted bounds.
maxZoomUpper zoom limit for the resulting camera.
linearBoolean indicating whether to animate linearly.
bearingTarget bearing after the fit completes.
pitchTarget pitch after the fit completes.
animationOptionsExtra animation parameters.
-
Declaration
Swift
public init(from decoder: any Decoder) throws -
Declaration
Swift
public func encode(to encoder: Encoder) throws