code: function () {
          var zoom = this.map.getZoom();
          var extent = this.map.getMaxExtent();
          zoom = zoom - Math.log(this.maxResolution / (this.lzd/512))/Math.log(2);
          return zoom;
      }
docs: Method: getZoom
  Convert map zoom to WW zoom.