@@ -573,7 +573,7 @@ public final class MapboxMap: StyleManager {
573573 pitch: Double ? ,
574574 maxZoom: Double ? ,
575575 offset: CGPoint ? ) -> CameraOptions {
576- return CameraOptions (
576+ return CameraOptions . Marshaller . toSwift (
577577 __map. cameraForCoordinateBounds (
578578 for: coordinateBounds,
579579 padding: padding? . toMBXEdgeInsetsValue ( ) ,
@@ -630,7 +630,7 @@ public final class MapboxMap: StyleManager {
630630 padding: UIEdgeInsets ? ,
631631 bearing: Double ? ,
632632 pitch: Double ? ) -> CameraOptions {
633- return CameraOptions (
633+ return CameraOptions . Marshaller . toSwift (
634634 __map. cameraForCoordinates (
635635 for: coordinates. map { Coordinate2D ( value: $0) } ,
636636 padding: padding? . toMBXEdgeInsetsValue ( ) ,
@@ -662,10 +662,10 @@ public final class MapboxMap: StyleManager {
662662 public func camera( for coordinates: [ CLLocationCoordinate2D ] ,
663663 camera: CameraOptions ,
664664 rect: CGRect ) -> CameraOptions {
665- return CameraOptions (
665+ return CameraOptions . Marshaller . toSwift (
666666 __map. cameraForCoordinates (
667667 for: coordinates. map { Coordinate2D ( value: $0) } ,
668- camera: CoreCameraOptions ( camera) ,
668+ camera: CameraOptions . Marshaller . toObjc ( camera) ,
669669 box: CoreScreenBox ( rect) ) )
670670 }
671671
@@ -687,7 +687,7 @@ public final class MapboxMap: StyleManager {
687687 offset: CGPoint ? ) throws -> CameraOptions {
688688 let expected = __map. cameraForCoordinates (
689689 for: coordinates. map { Coordinate2D ( value: $0) } ,
690- camera: CoreCameraOptions ( camera) ,
690+ camera: CameraOptions . Marshaller . toObjc ( camera) ,
691691 coordinatesPadding: coordinatesPadding? . toMBXEdgeInsetsValue ( ) ,
692692 maxZoom: maxZoom as? NSNumber ,
693693 offset: offset? . screenCoordinate
@@ -699,7 +699,7 @@ public final class MapboxMap: StyleManager {
699699 guard let options = expected. value else {
700700 throw MapError ( coreError: " Failed to unwrap CameraOptions " )
701701 }
702- return CameraOptions ( options)
702+ return CameraOptions . Marshaller . toSwift ( options)
703703 }
704704
705705 /// Calculates a `CameraOptions` to fit a geometry
@@ -744,7 +744,7 @@ public final class MapboxMap: StyleManager {
744744 padding: UIEdgeInsets ,
745745 bearing: CGFloat ? ,
746746 pitch: CGFloat ? ) -> CameraOptions {
747- return CameraOptions (
747+ return CameraOptions . Marshaller . toSwift (
748748 __map. cameraForGeometry (
749749 for: MapboxCommon . Geometry ( geometry) ,
750750 padding: padding. toMBXEdgeInsetsValue ( ) ,
@@ -762,7 +762,7 @@ public final class MapboxMap: StyleManager {
762762 /// - Returns: `CoordinateBounds` for the given `CameraOptions`
763763 public func coordinateBounds( for camera: CameraOptions ) -> CoordinateBounds {
764764 return __map. coordinateBoundsForCamera (
765- forCamera: CoreCameraOptions ( camera) )
765+ forCamera: CameraOptions . Marshaller . toObjc ( camera) )
766766 }
767767
768768 /// Returns the unwrapped coordinate bounds to a given ``CameraOptions-swift.struct``.
@@ -774,7 +774,7 @@ public final class MapboxMap: StyleManager {
774774 /// - Parameter camera: The camera for which the coordinate bounds will be returned.
775775 /// - Returns: `CoordinateBounds` for the given ``CameraOptions-swift.struct``.
776776 public func coordinateBoundsUnwrapped( for camera: CameraOptions ) -> CoordinateBounds {
777- return __map. coordinateBoundsForCameraUnwrapped ( forCamera: CoreCameraOptions ( camera) )
777+ return __map. coordinateBoundsForCameraUnwrapped ( forCamera: CameraOptions . Marshaller . toObjc ( camera) )
778778 }
779779
780780 /// Returns the coordinate bounds and zoom for a given `CameraOptions`.
@@ -784,7 +784,7 @@ public final class MapboxMap: StyleManager {
784784 /// - Parameter camera: The camera for which the `CoordinateBoundsZoom` will be returned.
785785 /// - Returns: `CoordinateBoundsZoom` for the given `CameraOptions`
786786 public func coordinateBoundsZoom( for camera: CameraOptions ) -> CoordinateBoundsZoom {
787- return __map. coordinateBoundsZoomForCamera ( forCamera: CoreCameraOptions ( camera) )
787+ return __map. coordinateBoundsZoomForCamera ( forCamera: CameraOptions . Marshaller . toObjc ( camera) )
788788 }
789789
790790 /// Returns the unwrapped coordinate bounds and zoom for a given `CameraOptions`.
@@ -797,7 +797,7 @@ public final class MapboxMap: StyleManager {
797797 /// be returned.
798798 /// - Returns: `CoordinateBoundsZoom` for the given `CameraOptions`
799799 public func coordinateBoundsZoomUnwrapped( for camera: CameraOptions ) -> CoordinateBoundsZoom {
800- return __map. coordinateBoundsZoomForCameraUnwrapped ( forCamera: CoreCameraOptions ( camera) )
800+ return __map. coordinateBoundsZoomForCameraUnwrapped ( forCamera: CameraOptions . Marshaller . toObjc ( camera) )
801801 }
802802
803803 // MARK: - Screen coordinate conversion
@@ -897,12 +897,12 @@ public final class MapboxMap: StyleManager {
897897 ///
898898 /// - Parameter cameraOptions: New camera options
899899 public func setCamera( to cameraOptions: CameraOptions ) {
900- __map. setCameraFor ( CoreCameraOptions ( cameraOptions) )
900+ __map. setCameraFor ( CameraOptions . Marshaller . toObjc ( cameraOptions) as CoreCameraOptions )
901901 }
902902
903903 /// Returns the current camera state
904904 public var cameraState : CameraState {
905- return CameraState ( __map. getCameraState ( ) )
905+ CameraState . Marshaller . toSwift ( __map. getCameraState ( ) )
906906 }
907907
908908 /// The map's current anchor, calculated after applying padding (if it exists)
@@ -960,7 +960,7 @@ public final class MapboxMap: StyleManager {
960960 /// The camera options object showing end point.
961961 public func dragCameraOptions( from: CGPoint , to: CGPoint ) -> CameraOptions {
962962 let options = __map. cameraForDrag ( forStart: from. screenCoordinate, end: to. screenCoordinate)
963- return CameraOptions ( options)
963+ return CameraOptions . Marshaller . toSwift ( options)
964964 }
965965
966966 /// :nodoc:
0 commit comments