GMSPanoramaService requestPanoramaNearCoordinate 无结果
GMSPanoramaService requestPanoramaNearCoordinate no result
正在尝试请求 Google 全景图以获得指定半径的坐标。
有没有办法获得坐标的最大支持半径?
只是不确定我可以在 requestPanoramaNearCoordinate 中放入什么半径,
因为即使我输入 10000(米)它也不会 return 任何全景图(空白灰色屏幕),实际上在 50 米以内有全景图。
请求PanoramaNearCoordinate:
[panoSvc requestPanoramaNearCoordinate:self.coordinate radius:1000 callback:^(GMSPanorama *panorama, NSError *error) {
if (error) {
NSLog(@"StreetView is not available at latlong = %f,%f", self.coordinate.latitude, self.coordinate.longitude);
return;
}
else{
GMSMarker *marker = [GMSMarker markerWithPosition:self.coordinate];
marker.panoramaView = panoView_;
[panoView_ moveNearCoordinate:self.coordinate];
}
}];
所以panoramaView应该移动到panorama.coordinate,而不是移动到目标坐标所在的位置(即self.coordinate和标记所在的位置),
请参阅下面评论后的代码。
[panoSvc requestPanoramaNearCoordinate:self.coordinate radius:1000 callback:^(GMSPanorama *panorama, NSError *error) {
if (error) {
NSLog(@"StreetView is not available at latlong = %f,%f", self.coordinate.latitude, self.coordinate.longitude);
return;
}
else{
GMSMarker *marker = [GMSMarker markerWithPosition:self.coordinate];
marker.panoramaView = panoView_;
//------------------
//so I should move panoramaView to panorama coordinate, not to where the destination coordinate is (which is self.coordinate and where the marker is)
//------------------
[panoView_ moveNearCoordinate:panorama.coordinate];
}
}];
正在尝试请求 Google 全景图以获得指定半径的坐标。 有没有办法获得坐标的最大支持半径? 只是不确定我可以在 requestPanoramaNearCoordinate 中放入什么半径, 因为即使我输入 10000(米)它也不会 return 任何全景图(空白灰色屏幕),实际上在 50 米以内有全景图。
请求PanoramaNearCoordinate:
[panoSvc requestPanoramaNearCoordinate:self.coordinate radius:1000 callback:^(GMSPanorama *panorama, NSError *error) {
if (error) {
NSLog(@"StreetView is not available at latlong = %f,%f", self.coordinate.latitude, self.coordinate.longitude);
return;
}
else{
GMSMarker *marker = [GMSMarker markerWithPosition:self.coordinate];
marker.panoramaView = panoView_;
[panoView_ moveNearCoordinate:self.coordinate];
}
}];
所以panoramaView应该移动到panorama.coordinate,而不是移动到目标坐标所在的位置(即self.coordinate和标记所在的位置), 请参阅下面评论后的代码。
[panoSvc requestPanoramaNearCoordinate:self.coordinate radius:1000 callback:^(GMSPanorama *panorama, NSError *error) {
if (error) {
NSLog(@"StreetView is not available at latlong = %f,%f", self.coordinate.latitude, self.coordinate.longitude);
return;
}
else{
GMSMarker *marker = [GMSMarker markerWithPosition:self.coordinate];
marker.panoramaView = panoView_;
//------------------
//so I should move panoramaView to panorama coordinate, not to where the destination coordinate is (which is self.coordinate and where the marker is)
//------------------
[panoView_ moveNearCoordinate:panorama.coordinate];
}
}];