public class TMSTileSource extends AbstractTMSTileSource
Modifier and Type | Field and Description |
---|---|
protected int |
maxZoom |
protected int |
minZoom |
protected OsmMercator |
osmMercator |
baseUrl, id, modTileFeatures, name, tileSize
attributionImage, 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, xyToLatLon
getAttributionImage, getAttributionImageURL, getAttributionLinkURL, getAttributionText, getTermsOfUseText, getTermsOfUseURL, requiresAttribution, setAttributionImage, setAttributionImageURL, setAttributionLinkURL, setAttributionText, setTermsOfUseText, setTermsOfUseURL
protected int maxZoom
protected int minZoom
protected OsmMercator osmMercator
public TMSTileSource(TileSourceInfo info)
TMSTileSource
.info
- tile source informationpublic int getMinZoom()
TileSource
getMinZoom
in interface TileSource
getMinZoom
in class AbstractTMSTileSource
public int getMaxZoom()
TileSource
TileSource.getMaxZoom()
].getMaxZoom
in interface TileSource
getMaxZoom
in class AbstractTMSTileSource
JMapViewer.MAX_ZOOM
public double getDistance(double lat1, double lon1, double lat2, double lon2)
TileSource
lat1
- 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)
TileSource
lat
- latitudelon
- longitudezoom
- zoom levelpublic ICoordinate xyToLatLon(int x, int y, int zoom)
TileSource
x
- X coordinatey
- Y coordinatezoom
- zoom levelpublic TileXY latLonToTileXY(double lat, double lon, int zoom)
TileSource
lat
- latitudelon
- longitudezoom
- zoom levelpublic ICoordinate tileXYToLatLon(int x, int y, int zoom)
TileSource
x
- x tile indexy
- y tile indexzoom
- zoom levelpublic IProjected tileXYtoProjected(int x, int y, int zoom)
TileSource
x
- x tile indexy
- z tile indexzoom
- zoom levelpublic TileXY projectedToTileXY(IProjected p, int zoom)
TileSource
p
- projected coordinateszoom
- zoom levelpublic boolean isInside(Tile inner, Tile outer)
TileSource
inner
- 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)
TileSource
tile
- the tile to covernewZoom
- zoom level of the covering tilesnewZoom
public java.lang.String getServerCRS()
TileSource