code: function(options) {
              this.location = options.location;
              this.placement = options.placement === undefined ?
                  $.Placement.TOP_LEFT : options.placement;
              this.onDraw = options.onDraw;
              this.checkResize = options.checkResize === undefined ?
                  true : options.checkResize;
  
              // When this.width is not null, the overlay get scaled horizontally
              this.width = options.width === undefined ? null : options.width;
  
              // When this.height is not null, the overlay get scaled vertically
              this.height = options.height === undefined ? null : options.height;
  
              this.rotationMode = options.rotationMode || $.OverlayRotationMode.EXACT;
  
              // Having a rect as location is a syntactic sugar
              if (this.location instanceof $.Rect) {
                  this.width = this.location.width;
                  this.height = this.location.height;
                  this.location = this.location.getTopLeft();
                  this.placement = $.Placement.TOP_LEFT;
              }
  
              // Deprecated properties kept for backward compatibility.
              this.scales = this.width !== null && this.height !== null;
              this.bounds = new $.Rect(
                  this.location.x, this.location.y, this.width, this.height);
              this.position = this.location;
          }
docs: private