public abstract class AbstractTMSTileSource extends AbstractTileSource
TileSource.TileUpdate
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
baseUrl |
protected java.lang.String |
name |
attributionImage, attributionImageURL, attributionLinkURL, attributionText, termsOfUseText, termsOfUseURL
Constructor and Description |
---|
AbstractTMSTileSource(java.lang.String name,
java.lang.String base_url) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBaseUrl() |
double |
getDistance(double lat1,
double lon1,
double lat2,
double lon2)
Gets the distance using Spherical law of cosines.
|
java.lang.String |
getExtension() |
int |
getMaxZoom()
Specifies the maximum zoom value.
|
int |
getMinZoom()
Specifies the minimum zoom value.
|
java.lang.String |
getName()
A tile layer name has to be unique and has to consist only of characters
valid for filenames.
|
java.lang.String |
getTilePath(int zoom,
int tilex,
int tiley) |
int |
getTileSize()
Specifies how large each tile is.
|
java.lang.String |
getTileType()
Specifies the tile image type.
|
java.lang.String |
getTileUrl(int zoom,
int tilex,
int tiley)
Constructs the tile url.
|
double |
latToTileY(double lat,
int zoom)
Transforms latitude to Y tile coordinate.
|
int |
LatToY(double lat,
int zoom)
Transforms latitude to pixelspace.
|
double |
lonToTileX(double lon,
int zoom)
Transforms longitude to X tile coordinate.
|
int |
LonToX(double lon,
int zoom)
Transform longitude to pixelspace.
|
double |
tileXToLon(int x,
int zoom)
Transforms tile X coordinate to longitude.
|
double |
tileYToLat(int y,
int zoom)
Transforms tile Y coordinate to latitude.
|
java.lang.String |
toString() |
double |
XToLon(int x,
int zoom)
Transforms pixel coordinate X to longitude
|
double |
YToLat(int y,
int zoom)
Transforms pixel coordinate Y to latitude.
|
getAttributionImage, getAttributionImageURL, getAttributionLinkURL, getAttributionText, getTermsOfUseText, getTermsOfUseURL, requiresAttribution, setAttributionImage, setAttributionImageURL, setAttributionLinkURL, setAttributionText, setTermsOfUseText, setTermsOfUseURL
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTileUpdate
public AbstractTMSTileSource(java.lang.String name, java.lang.String base_url)
public java.lang.String getName()
TileSource
public int getMaxZoom()
TileSource
TileSource.getMaxZoom()
].JMapViewer.MAX_ZOOM
public int getMinZoom()
TileSource
public java.lang.String getExtension()
public java.lang.String getTilePath(int zoom, int tilex, int tiley) throws java.io.IOException
java.io.IOException
- when subclass cannot return the tile URLpublic java.lang.String getBaseUrl()
public java.lang.String getTileUrl(int zoom, int tilex, int tiley) throws java.io.IOException
TileSource
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getTileType()
TileSource
"png"
.public int getTileSize()
TileSource
public double getDistance(double lat1, double lon1, double lat2, double lon2)
TileSource
public int LonToX(double lon, int zoom)
TileSource
public int LatToY(double lat, int zoom)
TileSource
public double XToLon(int x, int zoom)
TileSource
public double YToLat(int y, int zoom)
TileSource
public double latToTileY(double lat, int zoom)
TileSource
public double lonToTileX(double lon, int zoom)
TileSource
public double tileYToLat(int y, int zoom)
TileSource
public double tileXToLon(int x, int zoom)
TileSource