Package com.massifmaps.datasources
Class AssetTileDataSource
java.lang.Object
com.massifmaps.datasources.TileDataSource
com.massifmaps.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".
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".
-
Constructor Summary
ConstructorsConstructorDescriptionAssetTileDataSource(int minZoom, int maxZoom, String basePath) Constructs an AssetTileDataSource object. -
Method Summary
Methods inherited from class com.massifmaps.datasources.TileDataSource
buildTagValues, containsMetaDataKey, getContainerMetaData, getDataExtent, getMaxOverzoomLevel, getMaxZoom, getMaxZoomWithOverzoom, getMetaData, getMetaDataElement, getMinZoom, getProjection, isMaxOverzoomLevelSet, notifyTilesChanged, setMaxOverzoomLevel, setMetaData, setMetaDataElement
-
Constructor Details
-
AssetTileDataSource
Constructs an AssetTileDataSource object.- Parameters:
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").
-
-
Method Details
-
loadTile
Description copied from class:TileDataSourceLoads the specified tile.
Note: the tile coordinate system used here is vertically flipped relative to layer tile coordinate system.- Overrides:
loadTilein classTileDataSource- Parameters:
tile- The tile to load.- Returns:
- The tile data. If the tile is not available, null may be returned.
-
buildAssetPath
-