street view data access

Directly access street view data.

var cafe = new google.maps.LatLng(37.869085,-122.254775);

function initialize() {

  var panoramaOptions = {
    position: cafe,
    pov: {
      heading: 270,
      pitch: 0
    },
    visible: true
  };
  var panorama = new google.maps.StreetViewPanorama(document.getElementById(\'pano\'), panoramaOptions);

  google.maps.event.addListener(panorama, \'pano_changed\', function() {
      var panoCell = document.getElementById(\'pano_cell\');
      panoCell.innerHTML = panorama.getPano();
  });

  google.maps.event.addListener(panorama, \'links_changed\', function() {
      var linksTable = document.getElementById(\'links_table\');
      while(linksTable.hasChildNodes()) {
        linksTable.removeChild(linksTable.lastChild);
      };
      var links =  panorama.getLinks();
      for (var i in links) {
        var row = document.createElement(\'tr\');
        linksTable.appendChild(row);
        var labelCell = document.createElement(\'td\');
        labelCell.innerHTML = \'Link: \' + i + \'\';
        var valueCell = document.createElement(\'td\');
        valueCell.innerHTML = links[i].description;
        linksTable.appendChild(labelCell);
        linksTable.appendChild(valueCell);
      }
  });

  google.maps.event.addListener(panorama, \'position_changed\', function() {
      var positionCell = document.getElementById(\'position_cell\');
      positionCell.firstChild.nodeValue = panorama.getPosition() + \'\';
  });

  google.maps.event.addListener(panorama, \'pov_changed\', function() {
      var headingCell = document.getElementById(\'heading_cell\');
      var pitchCell = document.getElementById(\'pitch_cell\');
      headingCell.firstChild.nodeValue = panorama.getPov().heading + \'\';
      pitchCell.firstChild.nodeValue = panorama.getPov().pitch + \'\';
  });
}

google.maps.event.addDomListener(window, \'load\', initialize);