Page Summary
-
GMSPanoramaCameracontrols the viewing direction (orientation, zoom, field of view) within aGMSPanoramaView, but not the panorama itself. -
It offers various constructors for initialization with different combinations of orientation, heading, pitch, zoom, and field of view.
-
The
FOVproperty, clamped to 1-160 degrees, sets the field of view at zoom 1, impacting the visual effect (zoom in or fisheye). -
The
zoomproperty, clamped to 1-5, adjusts the visible region, with higher values zooming in on the central area. -
The
orientationproperty combines heading and pitch, determining the camera's direction.
GMSPanoramaCamera
@interface
GMSPanoramaCamera
:
NSObject
GMSPanoramaCamera
is used to control the viewing direction of a GMSPanoramaView
. It does not
contain information about which particular panorama should be displayed.
-
Designated initializer. Configures this
GMSPanoramaCamerawithorientation,zoomandFOV. These values will be clamped to acceptable ranges.Declaration
Swift
init ( orientation : GMSOrientation , zoom : Float , fov FOV : Double )Objective-C
- ( nonnull id ) initWithOrientation :( GMSOrientation ) orientation zoom :( float ) zoom FOV :( double ) FOV ; -
Convenience constructor specifying heading and pitch as part of
orientation, pluszoomand default field of view (90 degrees).Declaration
Swift
convenience init ( orientation : GMSOrientation , zoom : Float )Objective-C
+ ( nonnull instancetype ) cameraWithOrientation :( GMSOrientation ) orientation zoom :( float ) zoom ; -
Convenience constructor specifying
heading,pitch,zoomwith default field of view (90 degrees).Declaration
Swift
convenience init ( heading : CLLocationDirection , pitch : Double , zoom : Float )Objective-C
+ ( nonnull instancetype ) cameraWithHeading :( CLLocationDirection ) heading pitch :( double ) pitch zoom :( float ) zoom ; -
Convenience constructor for
GMSPanoramaCamera, specifying all camera properties with heading and pitch as part oforientation.Declaration
Objective-C
+ ( nonnull instancetype ) cameraWithOrientation :( GMSOrientation ) orientation zoom :( float ) zoom FOV :( double ) FOV ; -
Convenience constructor for
GMSPanoramaCamera, specifying all camera properties.Declaration
Swift
convenience init ( heading : CLLocationDirection , pitch : Double , zoom : Float , fov FOV : Double )Objective-C
+ ( nonnull instancetype ) cameraWithHeading :( CLLocationDirection ) heading pitch :( double ) pitch zoom :( float ) zoom FOV :( double ) FOV ; -
The field of view (FOV) encompassed by the larger dimension (width or height) of the view in degrees at zoom 1. This is clamped to the range [1, 160] degrees, and has a default value of 90.
Lower FOV values produce a zooming in effect; larger FOV values produce an fisheye effect.
Note: This is not the displayed FOV if zoom is anything other than 1. User zoom gestures control the zoom property, not this property.
Declaration
Swift
var fov : Double { get }Objective-C
@property ( nonatomic , readonly ) double FOV ; -
Adjusts the visible region of the screen. A zoom of N will show the same area as the central width/N height/N area of what is shown at zoom 1.
Zoom is clamped to the implementation defined range [1, 5].
Declaration
Swift
var zoom : Float { get }Objective-C
@property ( nonatomic , readonly ) float zoom ; -
The camera orientation, which groups together heading and pitch.
Declaration
Swift
var orientation : GMSOrientation { get }Objective-C
@property ( nonatomic , readonly ) GMSOrientation orientation ;

