java.lang.Object | ||
↳ | com.carto.datasources.TileDataSource | |
↳ | com.carto.datasources.AssetTileDataSource |
A tile data source where each map tile is a seperate image file bundled with the application.
The requests are generated using a template scheme, where tags in the basePath string are replaced with actual values.
The following tags are supported: zoom, x, y, xflipped, yflipped, quadkey.
For example, if basePath = "t{zoom}_{x}_{y}.png" and the requested tile has zoom == 2,
x == 1 and y == 3, then the tile will be loaded from the following path: "t2_1_2.png".
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AssetTileDataSource(int minZoom, int maxZoom, String basePath)
Constructs an AssetTileDataSource object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized void | delete() | ||||||||||
TileData |
loadTile(MapTile tile)
Loads the specified tile.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructs an AssetTileDataSource object.
minZoom | The minimum zoom level supported by this data source. |
---|---|
maxZoom | The maximum zoom level supported by this data source. |
basePath | The base path containing tags (for example, "t{zoom}_{x}_{y}.png"). |
Loads the specified tile.
Note: the tile coordinate system used here is vertically flipped relative to layer tile coordinate system.
tile | The tile to load. |
---|