Created
August 26, 2017 12:07
-
-
Save patrickyin/c0a87b1816dad46a6a3514d655a545a8 to your computer and use it in GitHub Desktop.
getGridBLOBData
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private byte[] getGridBLOBData(TilePosition tilePosition) { | |
String[] columns = { "grid" }; | |
String[] args = { Integer.toString(tilePosition.getZoom()), Integer.toString(tilePosition.getX()), Integer.toString(tilePosition.getY()) }; | |
Cursor cursor = this.db.query("grids", columns, "zoom_level=? AND tile_column=? AND tile_row=?", args, null, null, null); | |
if (cursor == null || cursor.getCount() == 0) | |
return null; | |
cursor.moveToFirst(); | |
byte[] data = cursor.getBlob(0); | |
cursor.close(); | |
return data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment