java.lang.Object | ||
↳ | com.carto.datasources.TileDataSource | |
↳ | com.carto.datasources.MBTilesTileDataSource |
A tile data source that loads tiles from a local Sqlite database.
The database must contain table "tiles" with the following fields:
"zoom_level" (tile zoom level), "tile_column" (tile x coordinate),
"tile_row" (tile y coordinate), "tile_data" (compressed tile image).
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MBTilesTileDataSource(String path)
Constructs a MBTilesTileDataSource object.
| |||||||||||
MBTilesTileDataSource(int minZoom, int maxZoom, String path)
Constructs a MBTilesTileDataSource object.
| |||||||||||
MBTilesTileDataSource(int minZoom, int maxZoom, String path, MBTilesScheme scheme)
Constructs a MBTilesTileDataSource object with specified tile scheme.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized void | delete() | ||||||||||
MapBounds |
getDataExtent()
Returns the extent of the tiles in this data source.
| ||||||||||
StringMap |
getMetaData()
Get data source metadata information.
| ||||||||||
TileData |
loadTile(MapTile mapTile)
Loads the specified tile.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructs a MBTilesTileDataSource object. TMS tile scheme is used,
Min and max zoom levels are automatically detected.
path | The path to the local Sqlite database file. |
---|
Exception | If the the file could not be opened. |
---|---|
IOException |
Constructs a MBTilesTileDataSource object. TMS tile scheme is used.
minZoom | The minimum zoom level supported by this data source. |
---|---|
maxZoom | The maximum zoom level supported by this data source. |
path | The path to the local Sqlite database file. |
Exception | If the the file could not be opened. |
---|---|
IOException |
Constructs a MBTilesTileDataSource object with specified tile scheme.
minZoom | The minimum zoom level supported by this data source. |
---|---|
maxZoom | The maximum zoom level supported by this data source. |
path | The path to the local Sqlite database file. |
scheme | Tile scheme to use. |
Exception | If the the file could not be opened. |
---|---|
IOException |
Returns the extent of the tiles in this data source.
The bounds are in coordinate system of the projection of the data source.
Get data source metadata information.
Possible parameters can be found in MBTiles specification.
Loads the specified tile.
Note: the tile coordinate system used here is vertically flipped relative to layer tile coordinate system.
mapTile | The tile to load. |
---|