<div>Dear OL community,</div><div><br></div><div>I was searching for quite a while and couldn&#39;t find a way to limit the zoom levels for my maps.</div><div><br></div><div>What I&#39;m doing it an offline maps mobile app which should load cached tiles.</div>
<div>It works fine as long as I don&#39;t specify resolutions for the Map creation options.</div><div><br></div><div>Right now it looks like this:</div><div><br></div><div><div>new OpenLayers.Layer.OSM(&quot;OpenStreetMap&quot;, &quot;/public/tiles/${z}/${x}/${y}.png&quot;, {</div>
<div>                                            transitionEffect: &#39;resize&#39;,</div><div>                                            isBaseLayer:true,</div><div>                                            displayInLayerSwitcher:false,</div>
<div>                                            zoomOffset:10,</div><div>                                            resolutions: [76.43702827453613, 38.218514137268066,              </div><div>                                                               19.1092570678711, 9.55462853393555,</div>
<div>                                                               4.77731426696777,2.38865713348389,</div><div>                                                               1.19432856674194]</div></div><div><br></div><div>
It seems like adding resolutions, changes the requested tiles and it doesn&#39;t match any of those I have already downloaded ( using <a href="http://downloadosmtiles.pl">downloadosmtiles.pl</a> ).</div><div><br></div><div>
Some of the posts and info I&#39;ve followed to get where I am are these:</div><div><br></div><div><br></div><div><a href="http://trac.osgeo.org/openlayers/wiki/SettingZoomLevels">http://trac.osgeo.org/openlayers/wiki/SettingZoomLevels</a></div>
<div><br></div><a href="http://osgeo-org.1560.n6.nabble.com/Can-t-restrict-Openlayers-Layer-OSM-to-use-specific-zoom-levels-td3926546.html">http://osgeo-org.1560.n6.nabble.com/Can-t-restrict-Openlayers-Layer-OSM-to-use-specific-zoom-levels-td3926546.html</a><div>
<br></div><div><a href="http://forum.openstreetmap.org/viewtopic.php?id=6444">http://forum.openstreetmap.org/viewtopic.php?id=6444</a></div><div><br></div><div>My question is: how should I restrict the zoom levels ( I need, say 11, 12, 13 and 14) ?</div>
<div><br></div><div>Am I doing it the right way and is it just that I have to download the tiles in some other way?</div><div><br></div><div>Thanks in advance for your help!</div><div>Rama.</div>