public abstract class AbstractTMSTileSource extends AbstractTileSource
TileSource.TileUpdate
Modifier and Type | Field and Description |
---|---|
protected String |
baseUrl |
protected String |
id |
protected String |
name |
attributionImage, attributionImageURL, attributionLinkURL, attributionText, termsOfUseText, termsOfUseURL
Constructor and Description |
---|
AbstractTMSTileSource(String name,
String base_url,
String id) |
Modifier and Type | Method and Description |
---|---|
String |
getBaseUrl() |
double |
getDistance(double lat1,
double lon1,
double lat2,
double lon2)
Gets the distance using Spherical law of cosines.
|
String |
getExtension() |
String |
getId()
A unique id for this tile source.
|
int |
getMaxZoom()
Specifies the maximum zoom value.
|
int |
getMinZoom()
Specifies the minimum zoom value.
|
String |
getName()
A tile layer name as displayed to the user.
|
String |
getTilePath(int zoom,
int tilex,
int tiley) |
int |
getTileSize()
Specifies how large each tile is.
|
String |
getTileType()
Specifies the tile image type.
|
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.
|
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(String name, String base_url, String id)
public String getName()
TileSource
public String getId()
TileSource
public int getMaxZoom()
TileSource
TileSource.getMaxZoom()
].JMapViewer.MAX_ZOOM
public int getMinZoom()
TileSource
public String getExtension()
public String getTilePath(int zoom, int tilex, int tiley) throws IOException
IOException
- when subclass cannot return the tile URLpublic String getBaseUrl()
public String getTileUrl(int zoom, int tilex, int tiley) throws IOException
TileSource
IOException
public 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