Class MergedMBVTTileDataSource

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

public class MergedMBVTTileDataSource extends TileDataSource
A tile data source that merges two MBVT/protobuf data sources into one.
It is assumed that the layer ids from the two sources are distinct.
  • Constructor Details

    • MergedMBVTTileDataSource

      public MergedMBVTTileDataSource(TileDataSource dataSource1, TileDataSource dataSource2)
      Constructs a new MergedMBVTTileDataSource tile data source object.
      Parameters:
      dataSource1 - First data source to be merged
      dataSource2 - Second data source to be merged
  • 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).
    • getTileMask

      public String getTileMask()
    • 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 tile)
      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:
      tile - The tile to load.
      Returns:
      The tile data. If the tile is not available, null may be returned.