AHybridMapInfo, AMapInfo, ArcGISImageInfo, ASatelliteMapInfo, BaiduMapInfo, BaiduSatelliteMapInfo, BingHybridMapInfo, BingMapInfo, BingSatelliteMapInfo, GoogleHybridMapInfo, GoogleHybridTerrainMapInfo, GoogleMapInfo, GoogleSatelliteMapInfo, GoogleTerrainMapInfo, OpenStreetMapInfo, OpenStreetMapQuestSatelliteInfo, OviHybridMapInfo, OviMapInfo, OviSatelliteMapInfo, OviTerrainMapInfo, SLMapServerInfo, TencentMapInfo, YahooHybridMapInfo, YahooMapInfo, YahooSatelliteMapInfopublic class TileFactoryInfo extends Object
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected String |
baseURL |
The base url for loading tiles from.
|
protected double[] |
longitudeDegreeWidthInPixels |
An array of doubles that contain the number of pixels per degree of
longitude at a give zoom level.
|
protected double[] |
longitudeRadianWidthInPixels |
An array of doubles that contain the number of radians per degree of
longitude at a given zoom level (where longitudeRadianWidthInPixels[0] is
the most zoomed out)
|
protected Point2D[] |
mapCenterInPixelsAtZoom |
An array of coordinates in pixels that indicates the center in
the world map for the given zoom level.
|
protected int[] |
mapWidthInTilesAtZoom |
|
protected int |
maximumZoomLevel |
|
protected int |
minimumZoomLevel |
|
protected int |
totalMapZoom |
| 构造器 | 说明 |
|---|---|
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.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
getDefaultZoomLevel() |
|
String |
getLanguage() |
Get language
|
double |
getLongitudeDegreeWidthInPixels(int zoom) |
Get longitude degree within pixels
|
double |
getLongitudeRadianWidthInPixels(int zoom) |
Get longitude radian width in pixels
|
Point2D |
getMapCenterInPixelsAtZoom(int zoom) |
Get map center in pixels at zoom
|
int |
getMapWidthInTilesAtZoom(int zoom) |
Get map width in tiles at zoom
|
int |
getMaximumZoomLevel() |
Get maximum zoom level
|
int |
getMinimumZoomLevel() |
Get minimum zoom level
|
String |
getName() |
The name of this info.
|
protected int |
getServerNum(int x,
int y,
int max) |
|
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() |
Get total map zoom
|
boolean |
isXr2l() |
A property indicating if the X coordinates of tiles go from right to left
or left to right.
|
boolean |
isYt2b() |
A property indicating if the Y coordinates of tiles go from right to left
or left to right.
|
void |
setDefaultZoomLevel(int defaultZoomLevel) |
|
void |
setLanguage(String value) |
Set language
|
void |
setXr2l(boolean xr2l) |
A property indicating if the X coordinates of tiles go from right to left
or left to right.
|
void |
setYt2b(boolean yt2b) |
A property indicating if the Y coordinates of tiles go from right to left
or left to right.
|
protected int minimumZoomLevel
protected int maximumZoomLevel
protected int totalMapZoom
protected int[] mapWidthInTilesAtZoom
protected Point2D[] mapCenterInPixelsAtZoom
protected double[] longitudeDegreeWidthInPixels
protected double[] longitudeRadianWidthInPixels
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 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 int getMinimumZoomLevel()
public int getMaximumZoomLevel()
public int getTotalMapZoom()
public int getMapWidthInTilesAtZoom(int zoom)
zoom - The zoompublic Point2D getMapCenterInPixelsAtZoom(int zoom)
zoom - The zoompublic 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.x - Xy - Yzoom - the zoom levelpublic int getTileSize(int zoom)
zoom - Zoomprotected int getServerNum(int x,
int y,
int max)
public double getLongitudeDegreeWidthInPixels(int zoom)
zoom - The zoompublic double getLongitudeRadianWidthInPixels(int zoom)
zoom - The zoompublic boolean isXr2l()
public void setXr2l(boolean xr2l)
xr2l - public boolean isYt2b()
public void setYt2b(boolean yt2b)
yt2b - public int getDefaultZoomLevel()
public void setDefaultZoomLevel(int defaultZoomLevel)
public String getName()
public String getLanguage()
public void setLanguage(String value)
value - The languageCopyright © 2019. All rights reserved.