GMaps.prototype.createPanorama = function(streetview_options) {
  if (!streetview_options.hasOwnProperty('lat') || !streetview_options.hasOwnProperty('lng')) {
    streetview_options.lat = this.getCenter().lat();
    streetview_options.lng = this.getCenter().lng();
  }

  this.panorama = GMaps.createPanorama(streetview_options);

  this.map.setStreetView(this.panorama);

  return this.panorama;
};

GMaps.createPanorama = function(options) {
  var el = getElementById(options.el, options.context);

  var panoramaService = new google.maps.StreetViewService();
  var checkaround = options.checkaround || 50;
  var panorama = null;

  options.position = new google.maps.LatLng(options.lat, options.lng);

  delete options.el;
  delete options.context;
  delete options.lat;
  delete options.lng;
  delete options.checkaround;

  var streetview_events = ['closeclick', 'links_changed', 'pano_changed', 'position_changed', 'pov_changed', 'resize', 'visible_changed'],
      streetview_options = extend_object({visible : true}, options);

  for (var i = 0; i < streetview_events.length; i++) {
    delete streetview_options[streetview_events[i]];
  }

  //get only a streetview if this one is available
  panoramaService.getPanoramaByLocation(options.position, checkaround ,function(data, status){
    if (status == google.maps.StreetViewStatus.OK) {

      streetview_options.position = data.location.latLng;

      panorama = new google.maps.StreetViewPanorama(el, streetview_options);

      for (var i = 0; i < streetview_events.length; i++) {
        (function(object, name) {
          if (options[name]) {
            google.maps.event.addListener(object, name, function(){
              options[name].apply(this);
            });
          }
        })(panorama, streetview_events[i]);
      }
      panorama.setVisible(true);
      return panorama;
    // no result
    } else {
      return false;
    }
  });
};
@@ -499,140 +499,8 @@
 );%0A%0A
-  var panoramaService = new google.maps.StreetViewService();%0A  var checkaround = options.checkaround %7C%7C 50;%0A  var panorama = null;%0A%0A
   op
@@ -661,38 +661,8 @@
 lng;
-%0A  delete options.checkaround;
 %0A%0A  
@@ -987,270 +987,11 @@
 %0A%0A  
-//get only a streetview if this one is available%0A  panoramaService.getPanoramaByLocation(options.position, checkaround ,function(data, status)%7B%0A    if (status == google.maps.StreetViewStatus.OK) %7B%0A%0A      streetview_options.position = data.location.latLng;%0A%0A     
+var
  pan
@@ -1059,20 +1059,16 @@
 ions);%0A%0A
-    
   for (v
@@ -1118,20 +1118,16 @@
 ) %7B%0A    
- 
-   
 (functio
@@ -1150,20 +1150,16 @@
 %7B%0A      
-   
- 
 if (opti
@@ -1171,20 +1171,16 @@
 ame%5D) %7B%0A
-    
         
@@ -1245,20 +1245,16 @@
         
-    
 options%5B
@@ -1284,28 +1284,20 @@
     
-   
- 
 %7D);%0A
-    
       %7D%0A
     
@@ -1292,20 +1292,16 @@
       %7D%0A
-    
     %7D)(p
@@ -1338,130 +1338,29 @@
 ;%0A  
-    %7D%0A      panorama.setVisible(true);%0A      return panorama;%0A    // no result%0A    %7D else %7B%0A      return false;%0A    %7D%0A  %7D);%0A%7D;
+%7D%0A%0A  return panorama;%0A%7D;%0A

Revert "Added getPanoramaByLocation and a check around option"