code: function (name, args) {
          // override the callback method to always send the polygon geometry
          if (this.callbacks[name]) {
              this.callbacks[name].apply(this.control,
                                         [this.feature.geometry.clone()]);
          }
          // since sketch features are added to the temporary layer
          // they must be cleared here if done or cancel
          if(!this.persist && (name == "done" || name == "cancel")) {
              this.clear();
          }
      }
docs: Method: callback
  Trigger the control's named callback with the given arguments
  
  Parameters:
  name - {String} The key for the callback that is one of the properties
  of the handler's callbacks object.
  args - {Array} An array of arguments with which to call the callback
  (defined by the control).