Class OSMTileFactory


public class OSMTileFactory extends WebMercatorTileFactory
The tile factory implementation for the OpenStreetMap family
Since:
12
Author:
Tobias Sauerwein, Ugo Taddei
  • Constructor Details

    • OSMTileFactory

      public OSMTileFactory()
  • Method Details

    • create

      public Tile create(TileIdentifier identifier, TileService service)
      Description copied from class: TileFactory
      Creates a new tile for the given position using a service.
      Specified by:
      create in class TileFactory
      Returns:
    • findTileAtCoordinate

      public Tile findTileAtCoordinate(double lon, double lat, ZoomLevel zoomLevel, TileService service)
      Description copied from class: TileFactory
      Finds the tile for a service at the given position and zoom level.
      Specified by:
      findTileAtCoordinate in class TileFactory
      Parameters:
      lon - the longitude
      lat - the latitude
      zoomLevel - the zoom level
      service - the service
      Returns:
      a tile
    • moveInRange

      public static double moveInRange(double value, double min, double max)
      This method ensures that value is between min and max. If value < min, min is returned. If value > max, max is returned. Otherwise value.
    • findRightNeighbour

      public Tile findRightNeighbour(Tile tile, TileService service)
      Description copied from class: TileFactory
      Finds the tile for a service at the given position and zoom level, which is immediately to the right of the passed tile.
      Specified by:
      findRightNeighbour in class TileFactory
      Parameters:
      tile - the reference tile
    • findLowerNeighbour

      public Tile findLowerNeighbour(Tile tile, TileService service)
      Description copied from class: TileFactory
      Finds the tile for a service at the given position and zoom level, which is immediately below the the passed tile.
      Specified by:
      findLowerNeighbour in class TileFactory
      Parameters:
      tile - the reference tile