Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an openlayers based web app, map object is initalized like this:

p4326 = new OpenLayers.Projection('EPSG:4326');
p3857 = new OpenLayers.Projection('EPSG:3857');

//initialize map object, bind it to map_canvas div
map = new OpenLayers.Map('map_canvas', 
    //allOverlays: true,
    projection: p3857,
    displayProjection: p4326,
    maxExtent: new OpenLayers.Bounds(-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892), 
    projection: p3857});

I have a prerendered map from levels 8-16, however, in order to view zoom level 16 of the map, i have to initialize its layer like this:

var osm = new OpenLayers.Layer.XYZ("OSM Mapnik", "http://localhost/osm_tiles/osm/${z}/${x}/${y}.png", { isBaseLayer: true, sphericalMercator: true, numZoomLevels: 17});

Notice, that i set the zoom level 17 (or i cant zoom and view level 16 of the map). Can someone tell me why?

share|improve this question
Does your backend support it? The rendering server needs to be setup accordingly! – Styp Oct 1 '12 at 19:29
Rendering was ok. I ll check what are the values of map object with firebug – U2ros Oct 1 '12 at 19:56
need to count up from 0 so 17 will equal zoom level 16. (it is part of the api not because your tiles are starting from level 8). – Mapperz Oct 1 '12 at 21:01
@mapperz: thanks, i forgot i should consider the argument as index – U2ros Oct 2 '12 at 6:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.