Package com.massifmaps.datasources
Class MultiTileDataSource
java.lang.Object
com.massifmaps.datasources.TileDataSource
com.massifmaps.datasources.MultiTileDataSource
A tile data source that handles multiple data sources.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a PackageManagerTileDataSource object.MultiTileDataSource(int maxOpenedPackages) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(TileDataSource datasource) Adds a new data source to the data source stack.voidadd(TileDataSource datasource, String tileMask) Adds a new data source to the data source stack.Returns the extent of the tiles in this data source.
The bounds are in coordinate system of the projection of the data source.intReturns the maximum zoom level supported by this data source.intReturns the minimum zoom level supported by this data source.Loads the specified tile.
Note: the tile coordinate system used here is vertically flipped relative to layer tile coordinate system.booleanremove(TileDataSource datasource) Removes a data source from the sources stack.Methods inherited from class com.massifmaps.datasources.TileDataSource
buildTagValues, containsMetaDataKey, getContainerMetaData, getMaxOverzoomLevel, getMaxZoomWithOverzoom, getMetaData, getMetaDataElement, getProjection, isMaxOverzoomLevelSet, notifyTilesChanged, setMaxOverzoomLevel, setMetaData, setMetaDataElement
-
Constructor Details
-
MultiTileDataSource
public MultiTileDataSource()Constructs a PackageManagerTileDataSource object. -
MultiTileDataSource
public MultiTileDataSource(int maxOpenedPackages)
-
-
Method Details
-
getMinZoom
public int getMinZoom()Description copied from class:TileDataSourceReturns the minimum zoom level supported by this data source.- Overrides:
getMinZoomin classTileDataSource- Returns:
- The minimum zoom level supported (inclusive).
-
getMaxZoom
public int getMaxZoom()Description copied from class:TileDataSourceReturns the maximum zoom level supported by this data source.- Overrides:
getMaxZoomin classTileDataSource- Returns:
- The maximum zoom level supported (exclusive).
-
getDataExtent
Description copied from class:TileDataSourceReturns the extent of the tiles in this data source.
The bounds are in coordinate system of the projection of the data source.- Overrides:
getDataExtentin classTileDataSource- Returns:
- The extent of the data source.
-
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:
mapTile- The tile to load.- Returns:
- The tile data. If the tile is not available, null may be returned.
-
add
Adds a new data source to the data source stack. The new data source will be the last (and topmost) data source.- Parameters:
datasource- The data source to be added.
-
add
Adds a new data source to the data source stack. The new data source will be the last (and topmost) data source.- Parameters:
datasource- The data source to be added.
-
remove
Removes a data source from the sources stack.- Parameters:
datasource- The data source to be removed.- Returns:
- True if the data source was removed. False otherwise ( data source was not found).
-