title: Google StreetView iOS returns error code 0
body: <p>Why the Streetview <a href="https://developers.google.com/maps/documentation/ios-sdk/streetview" rel="noreferrer">GSMPanoramaView</a> returns for <strong>some</strong> (but very often) locations error code 0. That means the view is not loaded and I see the loader with gray background forever.</p>
  
  <p>Here is the output of NSError:</p>
  
  <blockquote>
    <p>Error Domain=com.google.maps.GMSPanoramaService Code=0 "The operation
    couldn’t be completed. (com.google.maps.GMSPanoramaService error 0.)"</p>
  </blockquote>
  
  <p>From </p>
  
  <pre><code>-(void)panoramaView:(GMSPanoramaView *)view error:(NSError *)error onMoveNearCoordinate:
  </code></pre>
  
  <p>Delegate method.</p>
  
  <p>It is important to say, that most of these not functional locations actually <strong>do have</strong> google streetview, because for example following api works for them.</p>
  
  <blockquote>
    <p><a href="http://maps.googleapis.com/maps/api/streetview?size=400x400&amp;location=LAT,LONG&amp;fov=90&amp;heading=180&amp;pitch=0&amp;sensor=false" rel="noreferrer">http://maps.googleapis.com/maps/api/streetview?size=400x400&amp;location=LAT,LONG&amp;fov=90&amp;heading=180&amp;pitch=0&amp;sensor=false</a></p>
  </blockquote>
  
  <p>BTW this is one of locations which doesnt work via iOS SDK:</p>
  
  <blockquote>
    <p><a href="http://maps.googleapis.com/maps/api/streetview?size=400x400&amp;location=47.798937,18.722434&amp;fov=90&amp;heading=180&amp;pitch=0&amp;sensor=false" rel="noreferrer">http://maps.googleapis.com/maps/api/streetview?size=400x400&amp;location=47.798937,18.722434&amp;fov=90&amp;heading=180&amp;pitch=0&amp;sensor=false</a></p>
  </blockquote>
  
  <p>As I say, it is not problem of some bad Google API key or something, because some locations works. But many of them (most/many of them) does not! (So it is useless)</p>
  
  <p>It does not even work if I try to call it for these problematic locations reapeatedly. I have same problem on two phones with different systems (iOS8,9). So it is not matter of phone etc.</p>
  
  <p>I install the panorama view from viewDidLoad method.</p>
  
  <p>I also tried to change this</p>
  
  <pre><code> [panoView moveNearCoordinate:loc];
  </code></pre>
  
  <p>to this</p>
  
  <pre><code> [panoView moveNearCoordinate:loc radius:30];
  </code></pre>
  
  <p>but it didnt help.</p>
  
  <p><strong>Edit</strong>: Now I see many of them doesnt work even via that web api, but still I think the streetview is in fact available around that place.</p>
  
  <p>Here is sample of not functional location.</p>
  
  <blockquote>
    <p><a href="http://maps.googleapis.com/maps/api/streetview?size=400x400&amp;location=49.9986,13.6388&amp;fov=90&amp;heading=180&amp;pitch=0&amp;sensor=false" rel="noreferrer">http://maps.googleapis.com/maps/api/streetview?size=400x400&amp;location=49.9986,13.6388&amp;fov=90&amp;heading=180&amp;pitch=0&amp;sensor=false</a></p>
  </blockquote>