Ravi Ravi - 2 months ago 36
Objective-C Question

check availability of google street view using google map sdk for ios

I am using

Google Maps SDK
for
iOS v 2.0.1.
Using
GMSPanoramaView class,
i am able to show street view for points where street view is available, but at the coordinates where street view isn't available, nothing gets shown on pano view and progress indicator keeps spinning.

Is there any way to check availability of
google
street view near a particular coordinate using
Google Maps SDK
for
iOS
in
objective c
?

Answer

To check if a Streetview panorama exists for a certain location or not ? you have to use the GMSPanoramaViewDelegate

- (void) panoramaView:      (GMSPanoramaView *)     view
didMoveToPanorama:      (GMSPanorama *_Nullable)    panorama {
   //If the panorama.panoramaID NSString is null, then the panorama could not be loaded.
}

you can also Called when moveNearCoordinate: produces an error.

- (void) panoramaView:      (GMSPanoramaView *)     view
error:      (NSError *)     error
onMoveNearCoordinate:       (CLLocationCoordinate2D)    coordinate {
}

Hope this help you...