Bing Tiles with a Subset of Resolutions Example

http://openlayers.org/dev/examples/bing-tiles-restrictedzoom.html

HTML

<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css">
<link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css">
<script src="http://fbug.googlecode.com/svn/lite/branches/flexBox/content/firebug-lite-dev.js"></script>
<script src="http://openlayers.org/dev/OpenLayers.js"></script>
    <h1 id="title">Bing Tiles with a Subset of Resolutions Example</h1>

    <div id="tags">
        bing tiles restrictedMinZoom numZoomLevels
    </div>

    <div id="shortdesc">Use Bing with direct tile access</div>

    <div id="map" class="smallmap" style="height: 350px;"></div>

    <div id="docs">
        <p>
            This example shows how to use the <code>maxResolution</code> and 
            <code>numZoomLevels</code> layer properties to restrict
            the number of zoom levels displayed on the Bing layer.
        </p><p>
            See <a target="_blank" href="bing-tiles-restrictedzoom.js">bing-tiles-restrictedzoom.js</a>
            for the source code.
        </p>
    </div>

  <br />
  <p><a href="http://openlayers.org/dev/examples/bing-tiles-restrictedzoom.html">Original
  OpenLayers Example</a>.</p>

CSS

.olControlAttribution {
        left: 2px;
        right: inherit;
        bottom: 3px;
        line-height: 11px; 
    }

JavaScript

var map = null;
var extent = new OpenLayers.Bounds(8, 44.5, 19, 50);


var options = {
    restrictedExtent: extent
};
map = new OpenLayers.Map('map', options);

var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0?", {
    layers: 'basic'
});

map.addLayers([wms]);
map.zoomToExtent(extent);