Class TileServlet

All Implemented Interfaces:
Serializable, Servlet, ServletConfig
Direct Known Subclasses:
CustomTileServlet, TrackTileServlet, WeatherTileServlet

abstract class TileServlet extends GenericServlet
A servlet to display Quad-tree tiles.
Since:
5.0
Version:
11.5
Author:
Luke
  • Field Details

    • EMPTY

      protected byte[] EMPTY
  • Constructor Details

    • TileServlet

      TileServlet()
  • Method Details

    • init

      public void init()
      Initializes the servlet and loads an empty tile buffer.
      Overrides:
      init in class GenericServlet
    • getTileAddress

      protected TileServlet.TileAddress5D getTileAddress(String uri, boolean getDate)
      Parses a URI to get the five-dimensional tile address.
      Parameters:
      uri - the URI
      getDate - TRUE if a data should be fetched, otherwise use current Date
      Returns:
      a TileAddress5D
    • writeTile

      protected static void writeTile(HttpServletResponse rsp, byte[] data)
      Helper method to dump the tile data to the output stream.
      Parameters:
      rsp - the HttpServletResponse
      data - the tile image data