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've grouped some vector layers (from SHP files) in GeoServer (they are EPSG:2039) and created cache for them (GeoWebCache lets you choose EPSG:4326 OR EPSG:900913) Once I've fired my App it didn't seem to read the cached tiles from the WMS (although they were created in the hard drive folder)

Could it be that because of the map projection the tiles are not being read ? (In the hard drive they are stored under EPSG_4326 folder)

This is how I init my map :

function init() {
        // if this is just a coverage or a group of them, disable a few items,
        // and default to jpeg format
        format = 'image/png';

        var bounds = new OpenLayers.Bounds(
            155000, 600000,
            246000, 745000
        var options = {                
            maxExtent: bounds,
            maxResolution: 566.40625,
            projection: "EPSG:2039",
            units: 'm'
        map = new OpenLayers.Map('map', options);

        // setup tiled layer
        tiled = new OpenLayers.Layer.WMS(
            "background", "http://localhost:8080/geoserver/MyWorkspace/wms",
                LAYERS: 'background',                    
                format: format,
                tiled: true,
                tilesOrigin: map.maxExtent.left + ',' + map.maxExtent.bottom
                buffer: 0,
                displayOutsideMaxExtent: true,
                isBaseLayer: true,
                yx: { 'EPSG:2039': false }


        // build up all controls
        map.addControl(new OpenLayers.Control.LayerSwitcher());
        map.addControl(new OpenLayers.Control.PanZoomBar());
        map.addControl(new OpenLayers.Control.Navigation());
        map.addControl(new OpenLayers.Control.Scale());
        map.addControl(new OpenLayers.Control.MousePosition());
        map.setCenter(new OpenLayers.LonLat(200300,745000),7);            
share|improve this question
up vote 2 down vote accepted

If you want to cache tiles in projections other than the two defaults (4326, 900913) then you need to define a custom gridset with the new projection so that tiles in that projection are created.

The process is a little bit involved but is explained at

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.