Page Summary
-
GMSPanoramaServiceallows you to request panorama metadata without needing an activeGMSPanoramaView. -
It provides methods to asynchronously retrieve information about panoramas near a given coordinate, optionally specifying a search radius and panorama source.
-
You can also request panorama information using a specific panorama ID obtained from the Google Maps SDK for iOS.
-
The service uses a callback mechanism to deliver the results of these asynchronous requests.
GMSPanoramaService
@interface
GMSPanoramaService
:
NSObject
GMSPanoramaService
can be used to request panorama metadata even when a GMSPanoramaView
is
not active.
Get an instance like this: [[GMSPanoramaService alloc] init]
.
-
Retrieves information about a panorama near the given
coordinate.This is an asynchronous request,
callbackwill be called with the result.Declaration
Swift
func requestPanoramaNearCoordinate ( _ coordinate : CLLocationCoordinate2D , callback : @escaping GMSPanoramaCallback )Objective-C
- ( void ) requestPanoramaNearCoordinate :( CLLocationCoordinate2D ) coordinate callback :( nonnull GMSPanoramaCallback ) callback ; -
Similar to
-requestPanoramaNearCoordinate:callback:but allows specifying a search radius (meters) aroundcoordinate.Declaration
Swift
func requestPanoramaNearCoordinate ( _ coordinate : CLLocationCoordinate2D , radius : UInt , callback : @escaping GMSPanoramaCallback )Objective-C
- ( void ) requestPanoramaNearCoordinate :( CLLocationCoordinate2D ) coordinate radius :( NSUInteger ) radius callback :( nonnull GMSPanoramaCallback ) callback ; -
Similar to
-requestPanoramaNearCoordinate:callback:but allows specifying the panorama source type near the givencoordinate.This API is experimental and may not always filter by source.
Declaration
Swift
func requestPanoramaNearCoordinate ( _ coordinate : CLLocationCoordinate2D , source : GMSPanoramaSource , callback : @escaping GMSPanoramaCallback )Objective-C
- ( void ) requestPanoramaNearCoordinate :( CLLocationCoordinate2D ) coordinate source :( GMSPanoramaSource ) source callback :( nonnull GMSPanoramaCallback ) callback ; -
Similar to
-requestPanoramaNearCoordinate:callback:but allows specifying a search radius (meters) and the panorama source type near the givencoordinate.This API is experimental and may not always filter by source.
Declaration
Swift
func requestPanoramaNearCoordinate ( _ coordinate : CLLocationCoordinate2D , radius : UInt , source : GMSPanoramaSource , callback : @escaping GMSPanoramaCallback )Objective-C
- ( void ) requestPanoramaNearCoordinate :( CLLocationCoordinate2D ) coordinate radius :( NSUInteger ) radius source :( GMSPanoramaSource ) source callback :( nonnull GMSPanoramaCallback ) callback ; -
Retrieves information about a panorama with the given
panoramaID.callbackwill be called with the result. Only panoramaIDs obtained from the Google Maps SDK for iOS are supported.Declaration
Swift
func requestPanorama ( withID panoramaID : String , callback : @escaping GMSPanoramaCallback )Objective-C
- ( void ) requestPanoramaWithID :( nonnull NSString * ) panoramaID callback :( nonnull GMSPanoramaCallback ) callback ;

