org.openstreetmap.gui.jmapviewer
Class OsmTileLoader
java.lang.Object
org.openstreetmap.gui.jmapviewer.OsmTileLoader
- All Implemented Interfaces:
- TileLoader
- Direct Known Subclasses:
- JTileDownloaderTileLoader, OsmFileCacheTileLoader
public class OsmTileLoader
- extends java.lang.Object
- implements TileLoader
A TileLoader
implementation that loads tiles from OSM via HTTP.
- Author:
- Jan Peter Stotz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
log
private static final java.util.logging.Logger log
USER_AGENT
public static java.lang.String USER_AGENT
- Holds the used user agent used for HTTP requests. If this field is
null
, the default Java user agent is used.
ACCEPT
public static java.lang.String ACCEPT
listener
protected TileLoaderListener listener
OsmTileLoader
public OsmTileLoader(TileLoaderListener listener)
createTileLoaderJob
public java.lang.Runnable createTileLoaderJob(TileSource source,
int tilex,
int tiley,
int zoom)
- Description copied from interface:
TileLoader
- A typical
TileLoader.createTileLoaderJob(org.openstreetmap.gui.jmapviewer.interfaces.TileSource, int, int, int)
implementation
should create and return a new Runnable
instance that performs the
load action.
- Specified by:
createTileLoaderJob
in interface TileLoader
- Returns:
Runnable
implementation that performs the desired load
action.
loadTileFromOsm
protected java.net.HttpURLConnection loadTileFromOsm(Tile tile)
throws java.io.IOException
- Throws:
java.io.IOException
prepareHttpUrlConnection
protected void prepareHttpUrlConnection(java.net.HttpURLConnection urlConn)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object