public abstract class TileFactory extends Object
When creating/finding a tile, the factory must know the zoom level for which the tile is required. Also, a geographic position or, alternatively a reference tile, must be passed.
Constructor and Description |
---|
TileFactory() |
Modifier and Type | Method and Description |
---|---|
abstract Tile |
findLowerNeighbour(Tile tile,
TileService service)
Finds the tile for a service at the given position and zoom level, which is immediately below
the the passed tile.
|
abstract Tile |
findRightNeighbour(Tile tile,
TileService service)
Finds the tile for a service at the given position and zoom level, which is immediately to
the right of the passed tile.
|
abstract Tile |
findTileAtCoordinate(double lon,
double lat,
ZoomLevel zoomLevel,
TileService service)
Finds the tile for a service at the given position and zoom level.
|
abstract ZoomLevel |
getZoomLevel(int zoomLevel,
TileService service)
Gets the ZoomLevel (object) for a given zoom level integer.
|
static double |
normalizeDegreeValue(double value,
int maxValue)
Some clients, e.g. uDig, may produce numbers like -210° for the longitude, but we need a
number in the range -180 to 180, so instead of -210 we want 150.
|
public abstract Tile findTileAtCoordinate(double lon, double lat, ZoomLevel zoomLevel, TileService service)
lon
- the longitudelat
- the latitudezoomLevel
- the zoom levelservice
- the servicepublic abstract ZoomLevel getZoomLevel(int zoomLevel, TileService service)
zoomLevel
- the zoom levelservice
- the servicepublic abstract Tile findRightNeighbour(Tile tile, TileService service)
tile
- the reference tileservice
- public abstract Tile findLowerNeighbour(Tile tile, TileService service)
tile
- the reference tileservice
- public static double normalizeDegreeValue(double value, int maxValue)
value
- the number to normalize (e.g. -210)maxValue
- the maximum value (e.g. 180 -> the range is: -180..180)Copyright © 1996–2019 Geotools. All rights reserved.