<div class="gmail_extra"><div class="gmail_quote">2012/4/21 Steve Nelson <span dir="ltr">&lt;<a href="mailto:snelson@webapper.com" target="_blank">snelson@webapper.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Have you tried setting numZoomLevels?<div><br></div><div>Steve<br></div></blockquote><div><br></div><div>Yes, but it doesn&#39;t seem to have any effect for OSM Layer.</div><div>Here&#39;s my code:</div><div><br></div><div>
    // create map</div><div>    map = new OpenLayers.Map({</div><div>        div: &quot;map&quot;,</div><div>        theme: null,</div><div>        projection: sm,</div><div>        numZoomLevels: 2,</div><div>        controls: [</div>
<div>            new OpenLayers.Control.Attribution(),</div><div>            new OpenLayers.Control.TouchNavigation({</div><div>                dragPanOptions: {</div><div>                    enableKinetic: true</div><div>
                }</div><div>            }),</div><div>            geolocate,</div><div>            selectControl</div><div>        ],</div><div>        layers: [</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>            }),</div><div>            vector,</div><div>            sprintersLayer</div><div>        ],</div><div>        center: new OpenLayers.LonLat(0, 0),</div>
<div>        zoom: 1</div><div>    });</div><div><br></div><div>I have tried setting the resolutions option, but it tries to fetch different tiles from those I have already cached for the various zoom levels I need.</div>
<div><br></div><div>Right now I have cached tiles for zoom levels 10, 12 and 14.</div><div><br></div><div>What I&#39;m doing is a mobile app with offline maps, so I need to deal with cached tiles, which works fine as long as I don&#39;t set the resolutions option.</div>
<div><br></div><div>What should be the way to go with this?</div><div><br></div><div>Any tips welcome!</div><div>Thanks a lot</div><div>Rama </div></div></div>