code: function () {
          this.ready = false;
          this.tilesAll = 0;
          this.tilesLoaded = 0;
          this.image = new Uint8Array(this.size.w * this.size.h * this.bytes);
  
          this.disconnectFromImages();
  
          this.events.triggerEvent("scanstart", { snapshot: this });
  
          var images = this.getGoogleImages(this.layer),
              j, k, len, len2, wrongImages, index;
          var overviews = this.layer.map.getControlsByClass("OpenLayers.Control.OverviewMap");
          for (j = 0, len = overviews.length; j < len; j++) {
              wrongImages = this.getGoogleImages(overviews[j].ovmap.baseLayer);
              for (k = 0, len2 = wrongImages.length; k < len2; k++) {
                  index = images.indexOf(wrongImages[k]);
                  if (index != -1) {
                      images.splice(index, 1);
                  }
              }
          }
          
          this.tilesAll = images.length;
  
          var view = this.layer.map.viewPortDiv.getBoundingClientRect();
          // create clones for google tile with anonymous crossorigin
          for (var i = 0; i < this.tilesAll; i++) {
              var tile = images[i];
              var bounds = tile.getBoundingClientRect();
              
              var img = new Image();
              this.cache.push(img);
  
              img.setAttribute("crossorigin", "anonymous");
              OpenLayers.Event.observe(img, "load",
                  OpenLayers.Function.bind(this.onImageLoad, this, img, bounds.left - view.left, bounds.top - view.top)
              );
              img.src = tile.src; // set same url
          }
          
          return true;
      }
docs: private