public class RemoteTileInfoNew extends TileInfoNew
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<java.lang.String> |
baseURLs |
java.io.File |
cacheDir
The cache directory for data tiles.
|
CoordSystem |
coordSys
Optional coordinate system describing the tile set.
|
protected java.util.ArrayList<java.lang.String> |
headerNames |
okhttp3.Headers |
headers
Optional headers to add to the Request.
|
protected java.util.ArrayList<java.lang.String> |
headerVals |
Mbr |
validBounds
If set, we'll test the tiles against this bounding box before trying to fetch them.
|
CoordSystem |
validCoordSys
If set, the bounding box is in this coordinate system.
|
maxZoom, minZoom, uniqueID
Constructor and Description |
---|
RemoteTileInfoNew(java.lang.String inBaseURL,
int inMinZoom,
int inMaxZoom)
Initialize with enough information to fetch remote tiles.
|
Modifier and Type | Method and Description |
---|---|
void |
addBaseURL(java.lang.String baseURL)
Some sources offer the same content from multiple URLs for speed.
|
void |
addHeader(java.lang.String name,
java.lang.String val)
Add a header key/value to the HTTP request before it goes out.
|
void |
addValidBounds(Mbr inBbox,
CoordSystem inCoordSys)
Add a bounding box that defined validity for any tile before it's fetched.
|
java.lang.String |
buildCacheName(int x,
int y,
int level,
boolean flipY)
Build a cache name for the cache file
|
okhttp3.Request |
buildRequest(java.net.URL url,
java.lang.Object OkHTTP_TAG)
Build an okHTTP request
|
java.net.URL |
buildURL(int x,
int y,
int level,
boolean flipY)
Construct a URL for a given tile.
|
java.lang.Object |
fetchInfoForTile(TileID tileID,
boolean flipY)
Build the URL and other info for a single tile fetch.
|
protected java.util.ArrayList<java.lang.String> baseURLs
public java.io.File cacheDir
public okhttp3.Headers headers
public CoordSystem coordSys
public Mbr validBounds
public CoordSystem validCoordSys
protected java.util.ArrayList<java.lang.String> headerNames
protected java.util.ArrayList<java.lang.String> headerVals
public RemoteTileInfoNew(java.lang.String inBaseURL, int inMinZoom, int inMaxZoom)
inBaseURL
- The base URL for fetching TMS tiles. This is a replacement URL with {x}, {y}, and {z} in the string.inMinZoom
- The minimum zoom level to fetch. This really should be 0.inMaxZoom
- The maximum zoom level to fetch.public void addBaseURL(java.lang.String baseURL)
public void addValidBounds(Mbr inBbox, CoordSystem inCoordSys)
public java.net.URL buildURL(int x, int y, int level, boolean flipY)
public void addHeader(java.lang.String name, java.lang.String val)
public okhttp3.Request buildRequest(java.net.URL url, java.lang.Object OkHTTP_TAG)
public java.lang.String buildCacheName(int x, int y, int level, boolean flipY)
public java.lang.Object fetchInfoForTile(TileID tileID, boolean flipY)
fetchInfoForTile
in class TileInfoNew