public byte [ ] drawTileBytes ( int x , int y , int zoom ) { Bitmap bitmap = drawTile ( x , y , zoom ) ; byte [ ] tileData = null ; // Convert the bitmap to bytes if ( bitmap != null ) { try { tileData = BitmapConverter . toBytes ( bitmap , compressFormat ) ; } catch ( IOException e ) { Log . e ( FeatureTiles . class . getSimpleName ( ) , "Failed to create tile. x: " + x + ", y: " + y + ", zoom: " + zoom , e ) ; } finally { bitmap . recycle ( ) ; } } return tileData ; }
Draw the tile and get the bytes from the x y and zoom level