/** * Sets a range of zoomlevels. * * @param minZoomLevel minimum zoomlevel * @param maxZoomLevel maximum zoomlevel */ public void setZoomLevelRange(int minZoomLevel, int maxZoomLevel) { setZoomOffset(minZoomLevel); int len = maxZoomLevel - minZoomLevel + 1; double[] resolutions = new double[len]; double curRes = getGroundResolutionInMeters(0, minZoomLevel); for (int i = 0; i < len; i++) { resolutions[i] = curRes; curRes = curRes / 2; } // resolution setting seems to work only via options XYZOptions options = new XYZOptions(); options.setResolutions(resolutions); this.addOptions(options); }