public class ReprojectionTile extends Tile
Modifier and Type | Field and Description |
---|---|
protected TileAnchor |
anchor |
protected boolean |
maxZoomReached |
private double |
nativeScale |
error, ERROR_IMAGE, error_message, image, key, loaded, loading, LOADING_IMAGE, metadata, source, xtile, ytile, zoom
Constructor and Description |
---|
ReprojectionTile(TileSource source,
int xtile,
int ytile,
int zoom)
Constructs a new
ReprojectionTile . |
Modifier and Type | Method and Description |
---|---|
TileAnchor |
getAnchor()
Get the position of the tile inside the image.
|
private static java.awt.Dimension |
getDimension(ProjectionBounds bounds,
double scale) |
double |
getNativeScale()
Get the scale that was used for reprojecting the tile.
|
void |
invalidate()
Invalidate tile - mark it as not loaded.
|
protected java.lang.Integer |
limitScale(double lenOrig,
double lenNow)
Make sure, the image is not scaled up too much.
|
boolean |
needsUpdate(double currentScale)
Check if it is necessary to refresh the cache to match the current mapview
scale and get optimized image quality.
|
private static ProjectionBounds |
pbMarginAndAlign(ProjectionBounds box,
double scale,
double margin) |
private void |
reset() |
void |
setImage(java.awt.image.BufferedImage image) |
private EastNorth |
tileToEastNorth(int x,
int y,
int z) |
protected void |
transform(java.awt.image.BufferedImage imageIn)
Transforms the given image.
|
equals, finishLoading, getErrorMessage, getImage, getKey, getMetadata, getSource, getStatus, getTileKey, getTileSource, getTileXY, getUrl, getValue, getXtile, getYtile, getZoom, hasError, hashCode, initLoading, isLoaded, isLoading, loadImage, loadingCanceled, loadPlaceholderFromCache, paint, paint, putValue, setError, setError, setLoaded, toString
protected TileAnchor anchor
private double nativeScale
protected boolean maxZoomReached
public ReprojectionTile(TileSource source, int xtile, int ytile, int zoom)
ReprojectionTile
.source
- sourec tilextile
- X coordinateytile
- Y coordinatezoom
- zoom levelpublic TileAnchor getAnchor()
Tile.getImage()
public double getNativeScale()
public boolean needsUpdate(double currentScale)
currentScale
- the current mapview scalepublic void invalidate()
private void reset()
private EastNorth tileToEastNorth(int x, int y, int z)
protected void transform(java.awt.image.BufferedImage imageIn)
imageIn
- tile image to reprojectprivate static ProjectionBounds pbMarginAndAlign(ProjectionBounds box, double scale, double margin)
private static java.awt.Dimension getDimension(ProjectionBounds bounds, double scale)
protected java.lang.Integer limitScale(double lenOrig, double lenNow)
lenOrig
- tile size of original imagelenNow
- (averaged) tile size of warped image