2012/4/21 Steve Nelson <[email protected]>
> Have you tried setting numZoomLevels?
>
> Steve
>
Yes, but it doesn't seem to have any effect for OSM Layer.
Here's my code:
// create map
map = new OpenLayers.Map({
div: "map",
theme: null,
projection: sm,
numZoomLevels: 2,
controls: [
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.TouchNavigation({
dragPanOptions: {
enableKinetic: true
}
}),
geolocate,
selectControl
],
layers: [
new OpenLayers.Layer.OSM("OpenStreetMap",
"/public/tiles/${z}/${x}/${y}.png", {
transitionEffect: 'resize'
}),
vector,
sprintersLayer
],
center: new OpenLayers.LonLat(0, 0),
zoom: 1
});
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.
Right now I have cached tiles for zoom levels 10, 12 and 14.
What I'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't set the resolutions
option.
What should be the way to go with this?
Any tips welcome!
Thanks a lot
Rama
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users