Class TileServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.deltava.servlet.GenericServlet
org.deltava.servlet.TileServlet
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
- Direct Known Subclasses:
CustomTileServlet
,TrackTileServlet
,WeatherTileServlet
A servlet to display Quad-tree tiles.
- Since:
- 5.0
- Version:
- 11.5
- Author:
- Luke
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
A class to store Tile Addresses including type name and date.Nested classes/interfaces inherited from class org.deltava.servlet.GenericServlet
GenericServlet.ForbiddenException, GenericServlet.NotFoundException, GenericServlet.ServletSecurityContext
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TileServlet.TileAddress5D
getTileAddress
(String uri, boolean getDate) Parses a URI to get the five-dimensional tile address.void
init()
Initializes the servlet and loads an empty tile buffer.protected static void
writeTile
(HttpServletResponse rsp, byte[] data) Helper method to dump the tile data to the output stream.Methods inherited from class org.deltava.servlet.GenericServlet
getURL
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
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 classGenericServlet
-
getTileAddress
Parses a URI to get the five-dimensional tile address.- Parameters:
uri
- the URIgetDate
- TRUE if a data should be fetched, otherwise use current Date- Returns:
- a TileAddress5D
-
writeTile
Helper method to dump the tile data to the output stream.- Parameters:
rsp
- the HttpServletResponsedata
- the tile image data
-