title: How to know if street view panorama is indoors or outdoors
body: <p>Today more and more businesses use street view to show apartments from indoors.</p>
  
  <p>My program supplies ability to show street view according to selected business. But I don't want to show indoors. Only Outdoors. Because Indoors blocks me to move, only to turn 360 degrees.</p>
  
  <p><strong>Does anyone know how to fetch from street view API some value if I'm going to show indoors or outdoors?</strong> </p>
  
  <p>Thank you very much,</p>
  
  <p>This is my snippets of code so far that open street view according to selected address:</p>
  
  <pre><code>function load_map_and_street_view_from_address(address) {
  
  var geocoder = new google.maps.Geocoder();
  geocoder.geocode( {
      'address': address
  }, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
          var gps = results[0].geometry.location;
          create_map_and_streetview(gps.lat(), gps.lng(), 'map_canvas', 'pano');
      }
   });
  }
  
  
  function create_map_and_streetview(lat, lng, map_id, street_view_id) {
  var googlePos = new google.maps.LatLng(lat,lng);
  
  addLatLng = new google.maps.LatLng(lat,lng);
  var service = new google.maps.StreetViewService();
  service.getPanoramaByLocation(addLatLng, 50, showPanoData);
  
  }
  
  function showPanoData(panoData, status) {
  if (status != google.maps.StreetViewStatus.OK) {
      $('#pano').html('No StreetView Picture Available').attr('style', 'text-align:center;font-weight:bold').show();
      return;
  }
  $('#pano').show();
  var angle = computeAngle(addLatLng, panoData.location.latLng);
  
  var panoOptions = {
      position: addLatLng,
      addressControl: false,
      linksControl: false,
      panControl: false,
      zoomControlOptions: {
          style: google.maps.ZoomControlStyle.SMALL
      },
      pov: {
          heading: angle,
          pitch: 10,
          zoom: 1
      },
      enableCloseButton: true,
      visible:true
  };
  
  panorama.setOptions(panoOptions);
  
  }
  
  function computeAngle(endLatLng, startLatLng) {
  var DEGREE_PER_RADIAN = 57.2957795;
  var RADIAN_PER_DEGREE = 0.017453;
  
  var dlat = endLatLng.lat() - startLatLng.lat();
  var dlng = endLatLng.lng() - startLatLng.lng();
  
  var yaw = Math.atan2(dlng * Math.cos(endLatLng.lat() * RADIAN_PER_DEGREE), dlat)
  * DEGREE_PER_RADIAN;
  return wrapAngle(yaw);
  }
  
  function wrapAngle(angle) {
  if (angle &gt;= 360) {
      angle -= 360;
  } else if (angle &lt; 0) {
      angle += 360;
  }
  return angle;
  };
  </code></pre>
  
  <p>The main Idea was to get Panorama location and verify distance to closest places around 360 degrees. </p>