public RasterLayerInfo asLayerInfo ( TileMap tileMap ) { RasterLayerInfo layerInfo = new RasterLayerInfo ( ) ; layerInfo . setCrs ( tileMap . getSrs ( ) ) ; layerInfo . setDataSourceName ( tileMap . getTitle ( ) ) ; layerInfo . setLayerType ( LayerType . RASTER ) ; layerInfo . setMaxExtent ( asBbox ( tileMap . getBoundingBox ( ) ) ) ; layerInfo . setTileHeight ( tileMap . getTileFormat ( ) . getHeight ( ) ) ; layerInfo . setTileWidth ( tileMap . getTileFormat ( ) . getWidth ( ) ) ; List < ScaleInfo > zoomLevels = new ArrayList < ScaleInfo > ( tileMap . getTileSets ( ) . getTileSets ( ) . size ( ) ) ; for ( TileSet tileSet : tileMap . getTileSets ( ) . getTileSets ( ) ) { zoomLevels . add ( asScaleInfo ( tileSet ) ) ; } layerInfo . setZoomLevels ( zoomLevels ) ; return layerInfo ; }
Transform a TMS layer description object into a raster layer info object .