public class TMSTileSource extends AbstractTMSTileSource
| Modifier and Type | Field and Description |
|---|---|
protected int |
maxZoom |
protected int |
minZoom |
protected OsmMercator |
osmMercator |
baseUrl, id, modTileFeatures, name, tileSizeattributionImage, attributionImageURL, attributionLinkURL, attributionText, termsOfUseText, termsOfUseURL| Constructor and Description |
|---|
TMSTileSource(TileSourceInfo info)
Constructs a new
TMSTileSource. |
| Modifier and Type | Method and Description |
|---|---|
TileRange |
getCoveringTileRange(Tile tile,
int newZoom)
Returns a range of tiles, that cover a given tile, which is
usually at a different zoom level.
|
double |
getDistance(double lat1,
double lon1,
double lat2,
double lon2)
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 |
getServerCRS()
Get coordinate reference system for this tile source.
|
boolean |
isInside(Tile inner,
Tile outer)
Check if one tile is inside another tile.
|
TileXY |
latLonToTileXY(double lat,
double lon,
int zoom)
Transforms longitude and latitude to tile indices.
|
java.awt.Point |
latLonToXY(double lat,
double lon,
int zoom)
Transforms longitude and latitude to pixel space (as if all tiles at specified zoom level where joined).
|
TileXY |
projectedToTileXY(IProjected p,
int zoom)
Convert projected coordinates to tile indices.
|
ICoordinate |
tileXYToLatLon(int x,
int y,
int zoom)
Transforms tile indices to longitude and latitude.
|
IProjected |
tileXYtoProjected(int x,
int y,
int zoom)
Convert tile indices (x/y/zoom) into projected coordinates of the tile origin.
|
ICoordinate |
xyToLatLon(int x,
int y,
int zoom)
Transforms a point in pixel space to longitude/latitude (WGS84).
|
getBaseUrl, getDefaultTileSize, getExtension, getId, getMetadata, getName, getTileId, getTilePath, getTileSize, getTileUrl, getTileXMax, getTileXMin, getTileYMax, getTileYMin, isModTileFeatures, isNoTileAtZoom, latLonToTileXY, latLonToXY, tileXYToLatLon, tileXYToLatLon, toString, xyToLatLongetAttributionImage, getAttributionImageURL, getAttributionLinkURL, getAttributionText, getTermsOfUseText, getTermsOfUseURL, requiresAttribution, setAttributionImage, setAttributionImageURL, setAttributionLinkURL, setAttributionText, setTermsOfUseText, setTermsOfUseURLprotected int maxZoom
protected int minZoom
protected OsmMercator osmMercator
public TMSTileSource(TileSourceInfo info)
TMSTileSource.info - tile source informationpublic int getMinZoom()
TileSourcegetMinZoom in interface TileSourcegetMinZoom in class AbstractTMSTileSourcepublic int getMaxZoom()
TileSourceTileSource.getMaxZoom()].getMaxZoom in interface TileSourcegetMaxZoom in class AbstractTMSTileSourceJMapViewer.MAX_ZOOMpublic double getDistance(double lat1, double lon1, double lat2, double lon2)
TileSourcelat1 - latitude of first pointlon1 - longitude of first pointlat2 - latitude of second pointlon2 - longitude of second pointpublic java.awt.Point latLonToXY(double lat, double lon, int zoom)
TileSourcelat - latitudelon - longitudezoom - zoom levelpublic ICoordinate xyToLatLon(int x, int y, int zoom)
TileSourcex - X coordinatey - Y coordinatezoom - zoom levelpublic TileXY latLonToTileXY(double lat, double lon, int zoom)
TileSourcelat - latitudelon - longitudezoom - zoom levelpublic ICoordinate tileXYToLatLon(int x, int y, int zoom)
TileSourcex - x tile indexy - y tile indexzoom - zoom levelpublic IProjected tileXYtoProjected(int x, int y, int zoom)
TileSourcex - x tile indexy - z tile indexzoom - zoom levelpublic TileXY projectedToTileXY(IProjected p, int zoom)
TileSourcep - projected coordinateszoom - zoom levelpublic boolean isInside(Tile inner, Tile outer)
TileSourceinner - the tile that is suspected to be inside the other tileouter - the tile that might contain the first tilepublic TileRange getCoveringTileRange(Tile tile, int newZoom)
TileSourcetile - the tile to covernewZoom - zoom level of the covering tilesnewZoompublic java.lang.String getServerCRS()
TileSource