知道为什么回调没有执行吗?panoServie
被初始化和一切。我把 NSLog 消息放在那里,没有任何反应。
- (CLLocationCoordinate2D) randomLatitudeLongitude
{
CountryBBVal auBB = [[GGData SharedInstance] boundingBoxForCountry:Australia];
//NSLog(@"BB: %f, %f, %f, %f", auBB.NELat, auBB.NELng, auBB.SWLat, auBB.SWLng);
double ranLongitude = [self randomDoubleBetween: auBB.NELng and: auBB.SWLng]; // Boundix Box
double ranLatitude = [self randomDoubleBetween: auBB.NELat and: auBB.SWLat];
CLLocationCoordinate2D ranLatLng = CLLocationCoordinate2DMake(ranLatitude, ranLongitude);
//NSLog(@"ranLatLng: [%f] [%f]", ranLatitude, ranLongitude);
__block GMSPanorama *panPhoto = nil;
[self.panoService requestPanoramaNearCoordinate:ranLatLng callback:^(GMSPanorama *panorama, NSError *error) {
NSLog(@"panorama: %@ error: %@", panorama, error);
panPhoto = panorama;
}];
if (!panPhoto) return [self randomLatitudeLongitude];
return ranLatLng;
}