code: public void setSize(int newWidth, int newHeight) {
  		saveState();
  		Bbox bbox = getBounds();
  		if (width != newWidth || height != newHeight) {
  			this.width = newWidth;
  			this.height = newHeight;
  			if (viewState.getScale() < getMinimumScale()) {
  				// The new scale is too low, re-apply old values:
  				double scale = getBestScale(bbox);
  				doSetScale(snapToResolution(scale, ZoomOption.LEVEL_FIT));
  			}
  			// Use the same center point for the new bounds
  			doSetOrigin(bbox.getCenterPoint());
  			fireEvent(true, null);
  		}
  	}
docs: Set the size of the map in pixels.
  
  @param newWidth
  The map's width.
  @param newHeight
  The map's height.