Class MultiTileDataSource

java.lang.Object
com.massifmaps.datasources.TileDataSource
com.massifmaps.datasources.MultiTileDataSource

public class MultiTileDataSource extends TileDataSource
A tile data source that handles multiple data sources.
  • Constructor Details

    • MultiTileDataSource

      public MultiTileDataSource()
      Constructs a PackageManagerTileDataSource object.
    • MultiTileDataSource

      public MultiTileDataSource(int maxOpenedPackages)
  • Method Details

    • getMinZoom

      public int getMinZoom()
      Description copied from class: TileDataSource
      Returns the minimum zoom level supported by this data source.
      Overrides:
      getMinZoom in class TileDataSource
      Returns:
      The minimum zoom level supported (inclusive).
    • getMaxZoom

      public int getMaxZoom()
      Description copied from class: TileDataSource
      Returns the maximum zoom level supported by this data source.
      Overrides:
      getMaxZoom in class TileDataSource
      Returns:
      The maximum zoom level supported (exclusive).
    • getDataExtent

      public MapBounds getDataExtent()
      Description copied from class: TileDataSource
      Returns the extent of the tiles in this data source.
      The bounds are in coordinate system of the projection of the data source.
      Overrides:
      getDataExtent in class TileDataSource
      Returns:
      The extent of the data source.
    • loadTile

      public TileData loadTile(MapTile mapTile)
      Description copied from class: TileDataSource
      Loads the specified tile.
      Note: the tile coordinate system used here is vertically flipped relative to layer tile coordinate system.
      Overrides:
      loadTile in class TileDataSource
      Parameters:
      mapTile - The tile to load.
      Returns:
      The tile data. If the tile is not available, null may be returned.
    • add

      public void add(TileDataSource datasource)
      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

      public void add(TileDataSource datasource, String tileMask)
      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

      public boolean remove(TileDataSource datasource)
      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).