# GMSPanoramaView

    @interface GMSPanoramaView : UIView

A panorama is used to display Street View imagery. It should be constructed via
`[[GMSPanoramaView alloc] initWithFrame:]`, and configured post-initialization.

All properties and methods should be accessed on the main thread, similar to all `UIKit` objects.
The `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Protocols/GMSPanoramaViewDelegate.html` methods will also be called back only on the main thread.

The backgroundColor of this view is shown while no panorama is visible, such as while it is
loading or if the panorama is later set to nil. The alpha color of backgroundColor is not
supported.
- `


  ### [panorama](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(py)panorama)


  ` The panorama to display; setting it will transition to a new panorama. This is animated, except
  for the initial panorama.

  Can be set to nil to clear the view.

  #### Declaration

  Swift

      var panorama: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanorama.html? { get set }

  Objective-C

      @property (nonatomic, nullable) https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanorama.html *panorama;

- `


  ### [delegate](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(py)delegate)


  ` `GMSPanoramaView` delegate.

  #### Declaration

  Swift

      @IBOutlet weak var delegate: (any https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Protocols/GMSPanoramaViewDelegate.html)? { get set }

  Objective-C

      @property (nonatomic, weak, nullable) id<https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Protocols/GMSPanoramaViewDelegate.html> delegate;

- `


  ### [-setAllGesturesEnabled:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(im)setAllGesturesEnabled:)


  ` Sets the preference for whether all gestures should be enabled (default) or disabled.

  This does not limit programmatic movement of the camera or control of the panorama.

  #### Declaration

  Swift

      func setAllGesturesEnabled(_ enabled: Bool)

  Objective-C

      - (void)setAllGesturesEnabled:(BOOL)enabled;

- `


  ### [orientationGestures](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(py)orientationGestures)


  ` Controls whether orientation gestures are enabled (default) or disabled. If enabled, users may
  use gestures to change the orientation of the camera.

  This does not limit programmatic movement of the camera.

  #### Declaration

  Swift

      var orientationGestures: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL orientationGestures;

- `


  ### [zoomGestures](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(py)zoomGestures)


  ` Controls whether zoom gestures are enabled (default) or disabled. If enabled, users may pinch to
  zoom the camera.

  This does not limit programmatic movement of the camera.

  #### Declaration

  Swift

      var zoomGestures: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL zoomGestures;

- `


  ### [navigationGestures](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(py)navigationGestures)


  ` Controls whether navigation gestures are enabled (default) or disabled. If enabled, users may use
  a single tap on navigation links or double tap the view to change panoramas.

  This does not limit programmatic control of the panorama.

  #### Declaration

  Swift

      var navigationGestures: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL navigationGestures;

- `


  ### [navigationLinksHidden](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(py)navigationLinksHidden)


  ` Controls whether the tappable navigation links are hidden or visible (default). Hidden navigation
  links cannot be tapped.

  #### Declaration

  Swift

      var navigationLinksHidden: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL navigationLinksHidden;

- `


  ### [streetNamesHidden](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(py)streetNamesHidden)


  ` Controls whether the street name overlays are hidden or visible (default).

  #### Declaration

  Swift

      var streetNamesHidden: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL streetNamesHidden;

- `


  ### [camera](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(py)camera)


  ` Controls the panorama's camera. Setting a new camera here jumps to the new camera value, with no
  animation.

  #### Declaration

  Swift

      var camera: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaCamera.html { get set }

  Objective-C

      @property (nonatomic) https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaCamera.html *_Nonnull camera;

- `


  ### [layer](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(py)layer)


  ` Accessor for the custom `CALayer` type used for the layer.

  #### Declaration

  Swift

      var layer: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaLayer.html { get }

  Objective-C

      @property (nonatomic, retain, readonly) https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaLayer.html *_Nonnull layer;

- `


  ### [-animateToCamera:animationDuration:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(im)animateToCamera:animationDuration:)


  ` Animates the camera of this `GMSPanoramaView` to `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView.html#/c:objc(cs)GMSPanoramaView(py)camera`, over `duration`
  - (specified in seconds).

  #### Declaration

  Swift

      func animate(to camera: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaCamera.html, animationDuration duration: TimeInterval)

  Objective-C

      - (void)animateToCamera:(nonnull https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaCamera.html *)camera
            animationDuration:(NSTimeInterval)duration;

- `


  ### [-updateCamera:animationDuration:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(im)updateCamera:animationDuration:)


  ` Modifies the camera according to `cameraUpdate`, over `duration` (specified in seconds).

  #### Declaration

  Swift

      func updateCamera(_ cameraUpdate: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaCameraUpdate.html, animationDuration duration: TimeInterval)

  Objective-C

      - (void)updateCamera:(nonnull https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaCameraUpdate.html *)cameraUpdate
          animationDuration:(NSTimeInterval)duration;

- `


  ### [-moveNearCoordinate:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(im)moveNearCoordinate:)


  ` Requests a panorama near `coordinate`.

  Upon successful completion `-panoramaView:didMoveToPanorama:` and
  `-panoramaView:didMoveToPanorama:nearCoordinate:` will be sent to `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Protocols/GMSPanoramaViewDelegate.html`.

  On error `-panoramaView:error:onMoveNearCoordinate:` will be sent.

  Repeated calls to `-moveNearCoordinate:` result in the previous pending (incomplete) transitions
  being cancelled -- only the most recent of `-moveNearCoordinate:` and `-moveToPanoramaId:` will
  proceed and generate events.

  #### Declaration

  Swift

      func moveNearCoordinate(_ coordinate: CLLocationCoordinate2D)

  Objective-C

      - (void)moveNearCoordinate:(CLLocationCoordinate2D)coordinate;

- `


  ### [-moveNearCoordinate:radius:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(im)moveNearCoordinate:radius:)


  ` Similar to `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView.html#/c:objc(cs)GMSPanoramaView(im)moveNearCoordinate:` but allows specifying a search radius (meters) around
  `coordinate`.

  #### Declaration

  Swift

      func moveNearCoordinate(_ coordinate: CLLocationCoordinate2D, radius: UInt)

  Objective-C

      - (void)moveNearCoordinate:(CLLocationCoordinate2D)coordinate
                          radius:(NSUInteger)radius;

- `


  ### [-moveNearCoordinate:source:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(im)moveNearCoordinate:source:)


  ` Similar to `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView.html#/c:objc(cs)GMSPanoramaView(im)moveNearCoordinate:` but allows specifying a source near `coordinate`.

  This API is experimental and may not always filter by source.

  #### Declaration

  Swift

      func moveNearCoordinate(_ coordinate: CLLocationCoordinate2D, source: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Enums/GMSPanoramaSource.html)

  Objective-C

      - (void)moveNearCoordinate:(CLLocationCoordinate2D)coordinate
                          source:(https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Enums/GMSPanoramaSource.html)source;

- `


  ### [-moveNearCoordinate:radius:source:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(im)moveNearCoordinate:radius:source:)


  ` Similar to `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView.html#/c:objc(cs)GMSPanoramaView(im)moveNearCoordinate:` but allows specifying a search radius (meters) around
  `coordinate` and a source.

  This API is experimental and may not always filter by source.

  #### Declaration

  Swift

      func moveNearCoordinate(_ coordinate: CLLocationCoordinate2D, radius: UInt, source: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Enums/GMSPanoramaSource.html)

  Objective-C

      - (void)moveNearCoordinate:(CLLocationCoordinate2D)coordinate
                          radius:(NSUInteger)radius
                          source:(https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Enums/GMSPanoramaSource.html)source;

- `


  ### [-moveToPanoramaID:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(im)moveToPanoramaID:)


  ` Requests a panorama with `panoramaID`.

  Upon successful completion `-panoramaView:didMoveToPanorama:` will be sent to
  `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Protocols/GMSPanoramaViewDelegate.html`.

  On error `-panoramaView:error:onMoveToPanoramaID:` will be sent.

  Repeated calls to `-moveToPanoramaID:` result in the previous pending (incomplete) transitions
  being cancelled -- only the most recent of `-moveNearCoordinate:- and`-moveToPanoramaId:\` will
  proceed and generate events.

  Only panoramaIDs obtained from the Google Maps SDK for iOS are supported.

  #### Declaration

  Swift

      func move(toPanoramaID panoramaID: String)

  Objective-C

      - (void)moveToPanoramaID:(nonnull NSString *)panoramaID;

- `


  ### [-pointForOrientation:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(im)pointForOrientation:)


  ` For the current view, returns the screen point the `orientation` points through. This value may
  be outside the view for forward facing orientations which are far enough away from straight
  ahead.

  The result will contain NaNs for camera orientations which point away from the view, where the
  implied screen point would have had a negative distance from the camera in the direction of
  orientation.

  #### Declaration

  Swift

      func point(for orientation: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Structs/GMSOrientation.html) -> CGPoint

  Objective-C

      - (CGPoint)pointForOrientation:(https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Structs/GMSOrientation.html)orientation;

- `


  ### [-orientationForPoint:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(im)orientationForPoint:)


  ` Given a point for this view, returns the current camera orientation pointing through that screen
  location. At the center of this view, the returned `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Structs/GMSOrientation.html` will be approximately equal
  to that of the current `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaCamera.html`.

  #### Declaration

  Swift

      func orientation(for point: CGPoint) -> https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Structs/GMSOrientation.html

  Objective-C

      - (https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Structs/GMSOrientation.html)orientationForPoint:(CGPoint)point;

- `


  ### [+panoramaWithFrame:nearCoordinate:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(cm)panoramaWithFrame:nearCoordinate:)


  ` Convenience constructor for `GMSPanoramaView`, which searches for and displays a `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanorama.html`
  near `coordinate`. This performs a similar action to that of `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView.html#/c:objc(cs)GMSPanoramaView(im)moveNearCoordinate:`, and will
  call the same delegate methods.

  #### Declaration

  Swift

      class func panorama(withFrame frame: CGRect, nearCoordinate coordinate: CLLocationCoordinate2D) -> Self

  Objective-C

      + (nonnull instancetype)panoramaWithFrame:(CGRect)frame
                                 nearCoordinate:(CLLocationCoordinate2D)coordinate;

- `


  ### [+panoramaWithFrame:nearCoordinate:radius:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(cm)panoramaWithFrame:nearCoordinate:radius:)


  ` Similar to panoramaWithFrame:nearCoordinate: but allows specifying a search radius (meters)
  around `coordinate`.

  #### Declaration

  Swift

      class func panorama(withFrame frame: CGRect, nearCoordinate coordinate: CLLocationCoordinate2D, radius: UInt) -> Self

  Objective-C

      + (nonnull instancetype)panoramaWithFrame:(CGRect)frame
                                 nearCoordinate:(CLLocationCoordinate2D)coordinate
                                         radius:(NSUInteger)radius;

- `


  ### [+panoramaWithFrame:nearCoordinate:source:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(cm)panoramaWithFrame:nearCoordinate:source:)


  ` Convenience constructor for `GMSPanoramaView`, which searches for and displays a `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanorama.html`
  near `coordinate`. This performs a similar action to that of `-moveNearCoordinate:source`, and
  will call the same delegate methods.

  This API is experimental and may not always filter by source.

  #### Declaration

  Swift

      class func panorama(withFrame frame: CGRect, nearCoordinate coordinate: CLLocationCoordinate2D, source: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Enums/GMSPanoramaSource.html) -> Self

  Objective-C

      + (nonnull instancetype)panoramaWithFrame:(CGRect)frame
                                 nearCoordinate:(CLLocationCoordinate2D)coordinate
                                         source:(https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Enums/GMSPanoramaSource.html)source;

- `


  ### [+panoramaWithFrame:nearCoordinate:radius:source:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanoramaView#/c:objc(cs)GMSPanoramaView(cm)panoramaWithFrame:nearCoordinate:radius:source:)


  ` Convenience constructor for `GMSPanoramaView`, which searches for and displays a `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPanorama.html`
  near `coordinate`. This performs a similar action to that of `-moveNearCoordinate:radius:source`,
  and will call the same delegate methods.

  This API is experimental and may not always filter by source.

  #### Declaration

  Swift

      class func panorama(withFrame frame: CGRect, nearCoordinate coordinate: CLLocationCoordinate2D, radius: UInt, source: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Enums/GMSPanoramaSource.html) -> Self

  Objective-C

      + (nonnull instancetype)panoramaWithFrame:(CGRect)frame
                                 nearCoordinate:(CLLocationCoordinate2D)coordinate
                                         radius:(NSUInteger)radius
                                         source:(https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Enums/GMSPanoramaSource.html)source;