Skip to content

Commit

Permalink
Deprecate camera(for:padding:bearing:pitch:) (#2033)
Browse files Browse the repository at this point in the history
* Deprecate camera(for:padding:bearing:pitch:)

* Fix doc
  • Loading branch information
aleksproger authored Feb 14, 2024
1 parent eece002 commit 65493ff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Sources/MapboxMaps/Foundation/MapboxMap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ public final class MapboxMap: StyleManager {
///
/// - Parameters:
/// - coordinateBounds: The coordinate bounds that will be displayed within the viewport.
/// - padding: The amount of padding to add to the given bounds when calculating the camera, in points. This is differnt from camera padding.
/// - padding: The amount of padding in screen points to add to the given `coordinates`.
/// This padding is not applied to the map but to the coordinates provided.
/// If you want to apply padding to the map use `camera` parameter on ``camera(for:camera:coordinatesPadding:maxZoom:offset:)``
/// - bearing: The new bearing to be used by the camera, in degrees (0°, 360°) clockwise from true north.
/// - pitch: The new pitch to be used by the camera, in degrees (0°, 85°) with 0° being a top-down view.
/// - maxZoom: The maximum zoom level to allow when the camera would transition to the specified bounds.
Expand Down Expand Up @@ -504,10 +506,13 @@ public final class MapboxMap: StyleManager {
///
/// - Parameters:
/// - coordinates: Array of coordinates that should fit within the new viewport.
/// - padding: The amount of padding to add to the given bounds when calculating the camera, in points. This is differnt from camera padding.
/// - padding: The amount of padding in screen points to add to the given `coordinates`.
/// This padding is not applied to the map but to the coordinates provided.
/// If you want to apply padding to the map use `camera` parameter on ``camera(for:camera:coordinatesPadding:maxZoom:offset:)``
/// - bearing: The new bearing to be used by the camera, in degrees (0°, 360°) clockwise from true north.
/// - pitch: The new pitch to be used by the camera, in degrees (0°, 85°) with 0° being a top-down view.
/// - Returns: A `CameraOptions` that fits the provided constraints
@available(*, deprecated, message: "Use ``camera(for:camera:coordinatesPadding:maxZoom:offset:)`` instead.")
public func camera(for coordinates: [CLLocationCoordinate2D],
padding: UIEdgeInsets?,
bearing: Double?,
Expand Down

0 comments on commit 65493ff

Please sign in to comment.