public class MBTilesRasterDataSource extends com.nutiteq.rasterdatasources.AbstractRasterDataSource implements UTFGridDataSource
zoom_level (zoom level of the tile), tile_column, tile_row, tile_data (compressed tile bitmap)
| Constructor and Description |
|---|
MBTilesRasterDataSource(com.nutiteq.projections.Projection projection,
int minZoom,
int maxZoom,
String path,
boolean tmsY,
android.content.Context ctx)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close database file.
|
MBTilesDbHelper |
getDatabase()
Get database helper instance.
|
com.nutiteq.components.TileBitmap |
loadTile(com.nutiteq.components.MapTile tile) |
UtfGridHelper.MBTileUTFGrid |
loadUTFGrid(com.nutiteq.components.MapTile tile)
Load UTF grid data for given tile.
|
void |
reopen(String path,
boolean tmsY,
android.content.Context ctx)
Reopen database file
|
public MBTilesRasterDataSource(com.nutiteq.projections.Projection projection,
int minZoom,
int maxZoom,
String path,
boolean tmsY,
android.content.Context ctx)
throws IOException
projection - projection for the data source (practically always EPSG3857)minZoom - minimum zoom supported by the data source.maxZoom - maximum zoom supported by the data source.path - path to the local Sqlite database file. SQLiteException will
be thrown if the database does not exist
or can not be opened in read-only mode.tmsY - flag describing if tiles are vertically flipped or notctx - Android application context.IOException - exception if file not existspublic void reopen(String path, boolean tmsY, android.content.Context ctx) throws IOException
path - path to the local Sqlite database file. SQLiteException will
be thrown if the database does not exist
or can not be opened in read-only mode.tmsY - flag describing if tiles are vertically flipped or notctx - Android application context.IOException - exception if file not existspublic void close()
public MBTilesDbHelper getDatabase()
public com.nutiteq.components.TileBitmap loadTile(com.nutiteq.components.MapTile tile)
loadTile in interface com.nutiteq.rasterdatasources.RasterDataSourcepublic UtfGridHelper.MBTileUTFGrid loadUTFGrid(com.nutiteq.components.MapTile tile)
UTFGridDataSourceloadUTFGrid in interface UTFGridDataSourcetile - input tileCopyright © 2014. All rights reserved.