Have you tried setting numZoomLevels?<div><br></div><div>Steve<br><br><div class="gmail_quote">On Wed, Apr 18, 2012 at 3:48 PM, Ramiro Cosentino <span dir="ltr">&lt;<a href="mailto:ramaugust@gmail.com">ramaugust@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br></div>