public byte [ ] drawTileBytes ( int x , int y , int zoom ) { BufferedImage image = drawTile ( x , y , zoom ) ; byte [ ] tileData = null ; // Convert the image to bytes if ( image != null ) { try { tileData = ImageUtils . writeImageToBytes ( image , compressFormat ) ; } catch ( IOException e ) { LOGGER . log ( Level . SEVERE , "Failed to create tile. x: " + x + ", y: " + y + ", zoom: " + zoom , e ) ; } } return tileData ; }
Draw the tile and get the bytes from the x y and zoom level