title: Input address and display Google Street View location
body: <p>I'm trying to allow people to 'by-pass' the traditional Google Maps, and upon input of the address, to immediately display the Street View Location. (I don't want any interaction with the maps pegman or markers etc - just enter address &amp; display street view).</p>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Below is code I've been try to hack at to make these results. But I'm new to it and a bit confused. </p>
  
  <pre><code>var map;
    var berkeley = new google.maps.LatLng(-29.859515,30.998577);
    var sv = new google.maps.StreetViewService();
  
    var panorama;
  
    function initialize() {
  
      panorama = new google.maps.StreetViewPanorama(document.getElementById('pano'));
  
      // Set up the map
      var mapOptions = {
        center: berkeley,
        zoom: 16,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        streetViewControl: false
      };
      map = new google.maps.Map(document.getElementById('map-canvas'),
          mapOptions);
  
  
  
  
  
  
           var input = document.getElementById('searchTextField');
      var autocomplete = new google.maps.places.Autocomplete(input);
  
      autocomplete.bindTo('bounds', map);
  
      var infowindow = new google.maps.InfoWindow();
      var marker = new google.maps.Marker({
        map: map
      });
  
  
  
      google.maps.event.addListener(autocomplete, 'place_changed', function() {
  
        infowindow.close();
        marker.setVisible(false);
        input.className = '';
        var place = autocomplete.getPlace();
        if (!place.geometry) {
          // Inform the user that the place was not found and return.
          input.className = 'notfound';
          return;
        }
  
        // If the place has a geometry, then present it on a map.
        if (place.geometry.viewport) {
          map.fitBounds(place.geometry.viewport);
        } else {
          map.setCenter(place.geometry.location);
          map.setZoom(17);  // Why 17? Because it looks good.
        }
  
  
  
  
      //edit the doing var &lt;!-- Edit this for auto marking to affect street view --&gt; 
  
        var markerPanoID = data.location.pano;
          // Set the Pano to use the passed panoID
          panorama.setPano(markerPanoID);
          panorama.setPov({
            heading: 270,
            pitch: 0
          });
          panorama.setVisible(true);
  
  
  
  
        var address = '';
        if (place.address_components) {
          address = [
            (place.address_components[0] &amp;&amp; place.address_components[0].short_name || ''),
            (place.address_components[1] &amp;&amp; place.address_components[1].short_name || ''),
            (place.address_components[2] &amp;&amp; place.address_components[2].short_name || '')
          ].join(' ');
        }
  
        infowindow.setContent('&lt;div&gt;&lt;strong&gt;' + place.name + '&lt;/strong&gt;&lt;br&gt;' + address);
        infowindow.open(map, marker);
      });
  
  
  
      // getPanoramaByLocation will return the nearest pano when the
      // given radius is 50 meters or less.
      google.maps.event.addListener(map, 'click', function(event) {
          sv.getPanoramaByLocation(event.latLng, 50, processSVData);
      });
  
    }
  
    function processSVData(data, status) {
      if (status == google.maps.StreetViewStatus.OK) {
        var marker = new google.maps.Marker({
          position: data.location.latLng,
          map: map,
          title: data.location.description
        });
  
        panorama.setPano(data.location.pano);
        panorama.setPov({
          heading: 270,
          pitch: 0
        });
        panorama.setVisible(true);
  
  
  
  
  
        google.maps.event.addListener(marker, 'click', function() {
  
          var markerPanoID = data.location.pano;
          // Set the Pano to use the passed panoID
          panorama.setPano(markerPanoID);
          panorama.setPov({
            heading: 270,
            pitch: 0
          });
          panorama.setVisible(true);
        });
        } else {
        alert('Street View data not found for this location.');
      }
    }
  
  
  
    google.maps.event.addDomListener(window, 'load', initialize);
  </code></pre>