Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am setting up my own Map Tile Server according to this guide and it is working well now: http://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/

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", {
            controls:[
                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
add comment

2 Answers

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

Please study the following OpenLayers documentation: http://trac.osgeo.org/openlayers/wiki/SettingZoomLevels

share|improve this answer
add comment

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 = this.map.getResolution();
        var x = Math.round ((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));
        var y = Math.round ((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));
        var z = this.map.getZoom();
  new OpenLayers.Layer.TMS("Name", "http://example.com/", { 'type':'png', 'getURL':get_my_url });

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

http://trac.osgeo.org/openlayers/wiki/UsingCustomTiles

share|improve this answer
add comment

Your Answer

 
discard

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.