code: function() {
          return {
              center: this.map.getCenter(),
              resolution: this.map.getResolution(),
              projection: this.map.getProjectionObject(),
              units: this.map.getProjectionObject().getUnits() || 
                  this.map.units || this.map.baseLayer.units
          };
      }
docs: Method: getState
  Get the current state and return it.
  
  Returns:
  {Object} An object representing the current state.