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 am setting up my own Map Tile Server according to this guide and it is working well now:

The map currently has 19 zoom levels and it is initialized in the OpenLayer object "map" as below code shows:

map = new OpenLayers.Map ("map", {
                new OpenLayers.Control.Navigation(),
                new OpenLayers.Control.PanZoomBar(),
                new OpenLayers.Control.Permalink(),
                new OpenLayers.Control.ScaleLine({geodesic: true}),
                new OpenLayers.Control.Permalink('permalink'),
                new OpenLayers.Control.MousePosition(),                    
                new OpenLayers.Control.Attribution()],
            maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
            maxResolution: 156543.0339,
            numZoomLevels: 19,
            units: 'm',
            projection: new OpenLayers.Projection("EPSG:900913"),
            displayProjection: new OpenLayers.Projection("EPSG:4326")
        } );

I am wondering if I want to zoom beyond the maximum zoom level 19, say zoom into level 23 or even better, have my own zoom level reconfigured, how to do that? This is because I want to display an indoor room map on my current map server. The indoor room map is small it needs zoom level higher than 19.

Please point me to some resources to achieve this task as well. Thank you.

share|improve this question

When your user goes to level 20 or 23

You can redirect the tiles server to your own

function get_my_url (bounds) {
        var res =;
        var x = Math.round ((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));
        var y = Math.round (( - / (res * this.tileSize.h));
        var z =;
  new OpenLayers.Layer.TMS("Name", "", { 'type':'png', 'getURL':get_my_url });

You need to detect when level 20 is requested (z value)

share|improve this answer

Yes, it is possible (although not that trivial at first sight).

Please study the following OpenLayers documentation:

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.