public class DefaultTileSource extends java.lang.Object implements TileSource
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
apiKey |
protected java.lang.String |
baseUrl |
static int |
DEFAULT_TILE_SIZE |
protected java.lang.String |
name |
| Constructor and Description |
|---|
DefaultTileSource(java.lang.String name,
java.lang.String base_url) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getApiKey() |
javafx.scene.image.Image |
getAttributionImage() |
java.lang.String |
getAttributionLinkURL() |
java.lang.String |
getAttributionText(int zoom,
Coordinate topLeft,
Coordinate botRight) |
java.lang.String |
getBaseUrl() |
int |
getMaxZoom()
Specifies the maximum zoom value.
|
int |
getMinZoom()
Specifies the minimum zoom value.
|
java.lang.String |
getName()
A tile layer name has to be unique and has to consist only of characters
valid for filenames.
|
java.lang.String |
getTermsOfUseURL() |
java.lang.String |
getTilePath(int zoom,
int tilex,
int tiley) |
int |
getTileSize()
Specifies how large each tile is.
|
java.lang.String |
getTileUrl(int zoom,
int tilex,
int tiley)
Constructs the tile url.
|
boolean |
isAttributionRequired() |
double |
latToTileY(double lat,
int zoom) |
double |
lonToTileX(double lon,
int zoom) |
void |
setApiKey(java.lang.String apiKey) |
void |
setAttributionImage(javafx.scene.image.Image attributionImage) |
void |
setAttributionLinkURL(java.lang.String attributionLinkURL) |
void |
setAttributionRequired(boolean required) |
void |
setAttributionText(java.lang.String attributionText) |
protected void |
setMaxZoom(int maxZoom) |
protected void |
setMinZoom(int minZoom) |
void |
setTermsOfUserURL(java.lang.String termsOfUserURL) |
void |
setTilePathBuilder(TilePathBuildable tilePathBuilder) |
void |
setUrlBuilder(TileUrlBuildable urlBuilder) |
double |
tileXToLon(int x,
int zoom) |
double |
tileYToLat(int y,
int zoom) |
java.lang.String |
toString() |
public static final int DEFAULT_TILE_SIZE
protected java.lang.String name
protected java.lang.String baseUrl
protected java.lang.String apiKey
public DefaultTileSource(java.lang.String name,
java.lang.String base_url)
public java.lang.String getName()
TileSourcegetName in interface TileSourcepublic int getMaxZoom()
TileSourceTileSource.getMaxZoom()].getMaxZoom in interface TileSourceJMapViewer#MAX_ZOOMpublic int getMinZoom()
TileSourcegetMinZoom in interface TileSourcepublic java.lang.String getTilePath(int zoom,
int tilex,
int tiley)
java.io.IOException - when subclass cannot return the tile URLpublic void setUrlBuilder(TileUrlBuildable urlBuilder)
public java.lang.String getBaseUrl()
public java.lang.String getTileUrl(int zoom,
int tilex,
int tiley)
TileSourcegetTileUrl in interface TileSourcepublic java.lang.String toString()
toString in class java.lang.Objectpublic int getTileSize()
TileSourcegetTileSize in interface TileSourcepublic javafx.scene.image.Image getAttributionImage()
getAttributionImage in interface TileSourcepublic void setAttributionImage(javafx.scene.image.Image attributionImage)
public boolean isAttributionRequired()
isAttributionRequired in interface TileSourcepublic java.lang.String getAttributionText(int zoom,
Coordinate topLeft,
Coordinate botRight)
getAttributionText in interface TileSourcezoom - The optional zoom level for the view.topLeft - The top left of the bounding box for attribution.botRight - The bottom right of the bounding box for attribution.public void setAttributionText(java.lang.String attributionText)
public java.lang.String getAttributionLinkURL()
getAttributionLinkURL in interface TileSourcepublic void setAttributionLinkURL(java.lang.String attributionLinkURL)
public java.lang.String getTermsOfUseURL()
getTermsOfUseURL in interface TileSourcepublic void setTermsOfUserURL(java.lang.String termsOfUserURL)
public double latToTileY(double lat,
int zoom)
latToTileY in interface TileSourcepublic double lonToTileX(double lon,
int zoom)
lonToTileX in interface TileSourcepublic double tileYToLat(int y,
int zoom)
tileYToLat in interface TileSourcepublic double tileXToLon(int x,
int zoom)
tileXToLon in interface TileSourceprotected final void setMinZoom(int minZoom)
protected final void setMaxZoom(int maxZoom)
public void setAttributionRequired(boolean required)
protected java.lang.String getApiKey()
public void setApiKey(java.lang.String apiKey)
public void setTilePathBuilder(TilePathBuildable tilePathBuilder)