public interface TileSource extends Attributed
Modifier and Type | Interface and Description |
---|---|
static class |
TileSource.TileUpdate
Specifies the different mechanisms for detecting updated tiles
respectively only download newer tiles than those stored locally.
|
Modifier and Type | Method and Description |
---|---|
double |
getDistance(double la1,
double lo1,
double la2,
double lo2)
Gets the distance using Spherical law of cosines.
|
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.
|
int |
getTileSize()
Specifies how large each tile is.
|
java.lang.String |
getTileType()
Specifies the tile image type.
|
TileSource.TileUpdate |
getTileUpdate() |
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 aLat,
int aZoomlevel)
Transforms latitude to pixelspace.
|
double |
lonToTileX(double lon,
int zoom)
Transforms longitude to X tile coordinate.
|
int |
LonToX(double aLongitude,
int aZoomlevel)
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.
|
double |
XToLon(int aX,
int aZoomlevel)
Transforms pixel coordinate X to longitude
|
double |
YToLat(int aY,
int aZoomlevel)
Transforms pixel coordinate Y to latitude.
|
getAttributionImage, getAttributionImageURL, getAttributionLinkURL, getAttributionText, getTermsOfUseText, getTermsOfUseURL, requiresAttribution
int getMaxZoom()
getMaxZoom()
].JMapViewer.MAX_ZOOM
int getMinZoom()
TileSource.TileUpdate getTileUpdate()
TileSource.TileUpdate
java.lang.String getName()
java.lang.String getTileUrl(int zoom, int tilex, int tiley) throws java.io.IOException
zoom
- tilex
- tiley
- java.io.IOException
java.lang.String getTileType()
"png"
.int getTileSize()
double getDistance(double la1, double lo1, double la2, double lo2)
int LonToX(double aLongitude, int aZoomlevel)
int LatToY(double aLat, int aZoomlevel)
double XToLon(int aX, int aZoomlevel)
double YToLat(int aY, int aZoomlevel)
double lonToTileX(double lon, int zoom)
double latToTileY(double lat, int zoom)
double tileXToLon(int x, int zoom)
double tileYToLat(int y, int zoom)