public void postConstruct ( GeoService geoService , DtoConverterService converterService ) throws GeomajasException { if ( null == layerInfo ) { layerInfo = new RasterLayerInfo ( ) ; } layerInfo . setCrs ( TiledRasterLayerService . MERCATOR ) ; crs = geoService . getCrs2 ( TiledRasterLayerService . MERCATOR ) ; layerInfo . setTileWidth ( tileSize ) ; layerInfo . setTileHeight ( tileSize ) ; Bbox bbox = new Bbox ( - TiledRasterLayerService . HALF_EQUATOR_IN_METERS , - TiledRasterLayerService . HALF_EQUATOR_IN_METERS , TiledRasterLayerService . EQUATOR_IN_METERS , TiledRasterLayerService . EQUATOR_IN_METERS ) ; layerInfo . setMaxExtent ( bbox ) ; maxBounds = converterService . toInternal ( bbox ) ; resolutions = new double [ maxZoomLevel + 1 ] ; double powerOfTwo = 1 ; for ( int zoomLevel = 0 ; zoomLevel <= maxZoomLevel ; zoomLevel ++ ) { double resolution = ( TiledRasterLayerService . EQUATOR_IN_METERS ) / ( tileSize * powerOfTwo ) ; resolutions [ zoomLevel ] = resolution ; powerOfTwo *= 2 ; } }
Finish initialization of state object .