Show
Ignore:
Timestamp:
09/05/08 02:30:42 (4 months ago)
Author:
arneke
Message:

Hooking zoomStart and zoomStop up to grid object instead of layer. More robust at looking for geowebcache.xml

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/geowebcache/src/main/java/org/geowebcache/layer/Grid.java

    r386 r388  
    2121import org.geowebcache.GeoWebCacheException; 
    2222import org.geowebcache.util.wms.BBOX; 
     23import org.mortbay.log.Log; 
    2324 
    2425/** 
     
    3738    private volatile transient GridCalculator gridCalculator; 
    3839     
    39     private volatile int zoomStart = 0; 
     40    private int zoomStart = 0; 
    4041     
    41     private volatile int zoomStop = 30; 
     42    private int zoomStop = 30; 
    4243     
    4344    public Grid(SRS srs, BBOX bounds, BBOX gridBounds, double[] resolutions) { 
     
    122123    } 
    123124     
     125    /**  
     126     * Use double locking to get the calculator to avoid performance hit. 
     127     *  
     128     * @return 
     129     * @throws GeoWebCacheException 
     130     */ 
    124131    public GridCalculator getGridCalculator() throws GeoWebCacheException { 
    125132        GridCalculator ret = gridCalculator; 
     
    136143 
    137144    private GridCalculator initGridCalculator() throws GeoWebCacheException { 
     145        if(zoomStart < 0 || zoomStop < zoomStart || zoomStop == 0) { 
     146            Log.debug("Missing values, setting zoomStart,zoomStop to 0,30"); 
     147            zoomStart = 0; 
     148            zoomStop = 30; 
     149        } 
    138150        return new GridCalculator(this); 
    139151    }