public class TileFactoryInfo extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
baseURL
The base url for loading tiles from.
|
| Constructor and Description |
|---|
TileFactoryInfo(int minimumZoomLevel,
int maximumZoomLevel,
int totalMapZoom,
int tileSize,
boolean xr2l,
boolean yt2b,
String baseURL,
String xparam,
String yparam,
String zparam)
Creates a new instance of TileFactoryInfo.
|
TileFactoryInfo(String name,
int minimumZoomLevel,
int maximumZoomLevel,
int totalMapZoom,
int tileSize,
boolean xr2l,
boolean yt2b,
String baseURL,
String xparam,
String yparam,
String zparam)
Creates a new instance of TileFactoryInfo.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseURL() |
int |
getDefaultZoomLevel() |
double |
getLongitudeDegreeWidthInPixels(int zoom) |
double |
getLongitudeRadianWidthInPixels(int zoom) |
Point2D |
getMapCenterInPixelsAtZoom(int zoom) |
int |
getMapWidthInTilesAtZoom(int zoom) |
int |
getMaximumZoomLevel() |
int |
getMinimumZoomLevel() |
String |
getName()
The name of this info.
|
int |
getTileSize(int zoom)
Get the tile size.
|
String |
getTileUrl(int x,
int y,
int zoom)
Returns the tile url for the specified tile at the specified zoom level.
|
int |
getTotalMapZoom() |
boolean |
isXr2l() |
boolean |
isYt2b() |
void |
setDefaultZoomLevel(int defaultZoomLevel) |
void |
setXr2l(boolean xr2l) |
void |
setYt2b(boolean yt2b) |
protected String baseURL
public TileFactoryInfo(int minimumZoomLevel,
int maximumZoomLevel,
int totalMapZoom,
int tileSize,
boolean xr2l,
boolean yt2b,
String baseURL,
String xparam,
String yparam,
String zparam)
minimumZoomLevel - The minimum zoom levelmaximumZoomLevel - the maximum zoom leveltotalMapZoom - the top zoom level, essentially the height of the pyramidtileSize - the size of the tiles in pixels (must be square)xr2l - if the x goes r to l (is this backwards?)yt2b - if the y goes top to bottombaseURL - the base url for grabbing tilesxparam - the x parameter for the tile urlyparam - the y parameter for the tile urlzparam - the z parameter for the tile urlpublic TileFactoryInfo(String name, int minimumZoomLevel, int maximumZoomLevel, int totalMapZoom, int tileSize, boolean xr2l, boolean yt2b, String baseURL, String xparam, String yparam, String zparam)
name - A name to identify this information.minimumZoomLevel - The minimum zoom level, the user is allowed to zoom, means the smallest mapmaximumZoomLevel - the maximum zoom level, the user is allowed to zoom, means the biggest maptotalMapZoom - how many zoom levels the map providestileSize - the size of the tiles in pixels (must be square)xr2l - if the x goes r to l (is this backwards?)yt2b - if the y goes top to bottombaseURL - the base url for grabbing tilesxparam - the x parameter for the tile urlyparam - the y parameter for the tile urlzparam - the z parameter for the tile urlpublic int getMinimumZoomLevel()
public int getMaximumZoomLevel()
public int getTotalMapZoom()
public int getMapWidthInTilesAtZoom(int zoom)
zoom - the zoom levelpublic Point2D getMapCenterInPixelsAtZoom(int zoom)
zoom - the zoom levelpublic String getTileUrl(int x, int y, int zoom)
baseURl =
http://www.myserver.com/maps?version=0.1 xparam = x yparam = y zparam = z tilepoint = [1,2] zoom level = 3
then the resulting url would be:
http://www.myserver.com/maps?version=0.1&x=1&y=2&z=3 Note that the URL can be
a file: url.zoom - the zoom levelx - the x value, measured from left to righty - the y value, measured from top to bottompublic int getTileSize(int zoom)
zoom - the zoom levelpublic double getLongitudeDegreeWidthInPixels(int zoom)
zoom - the zoom levelpublic double getLongitudeRadianWidthInPixels(int zoom)
zoom - the zoom levelpublic boolean isXr2l()
public void setXr2l(boolean xr2l)
xr2l - indicates if the X coordinates of tiles go from right to left or left to right.public boolean isYt2b()
public void setYt2b(boolean yt2b)
yt2b - should be true if the Y coordinates of tiles go from top to bottompublic int getDefaultZoomLevel()
public void setDefaultZoomLevel(int defaultZoomLevel)
defaultZoomLevel - the default zoom levelpublic String getName()
public String getBaseURL()
Copyright © 2014. All Rights Reserved.