public abstract class MapRasterTileSource
extends java.lang.Object
Map
.
Default attribute values are as follows:
Overlay type: RasterTileOverlayType.BACKGROUND_REPLACEMENT Transparency: Transparency.TRANSPARENCY_ON Tile size: 256x256 pixels Valid zoom levels: 0-20 (all zoom levels) Bounding area: Top-Left coordinate: (-180.0, 90.0), Bottom-Right coordinate: (179.99, -90.0)
Note: the currently supported pixel format for the tile images is RGBA.
Modifier and Type | Class and Description |
---|---|
static class |
MapRasterTileSource.MapTileSystemHelper
Represents a helper class for converting raster tile coordinates to other tile system values.
|
static class |
MapRasterTileSource.TileResult
Result class for getting tile.
|
Modifier | Constructor and Description |
---|---|
protected |
MapRasterTileSource()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
GeoBoundingBox |
getBoundingArea()
Gets the
GeoBoundingBox representing the bounding area within which raster tiles are
visible. |
int |
getCacheExpiration()
Get the cache expiration time
|
MapRasterTileSource.TileResult |
getTileWithError(int x,
int y,
int zoomLevel)
Method to be overwritten by derived class to get a tile.
|
int |
getZIndex()
Gets the current z-index (stacking order) of the
MapObject . |
abstract boolean |
hasTile(int x,
int y,
int zoomLevel)
Abstract method to be overwritten by derived class to check if a tile exists.
|
MapRasterTileSource |
hideAtZoomLevel(int level)
Hides tiles at the specified zoom level of the
Map . |
MapRasterTileSource |
hideAtZoomRange(int beginZoomLevel,
int endZoomLevel)
Hides tiles within a given zoom level range of the
Map . |
boolean |
isCachingEnabled()
Get whether tiles are cached to the file system
|
boolean |
isShownAtZoomLevel(int zoomLevel)
Determines whether raster tiles are shown at the specified zoom level of the
Map . |
MapRasterTileSource |
setBoundingArea(GeoBoundingBox boundingBox)
Sets a bounding area within which raster tiles are visible.
|
MapRasterTileSource |
setCacheExpiration(int expireSeconds)
Set the cache expiration time
|
MapRasterTileSource |
setCachePrefix(java.lang.String cache)
Set the cache file prefix
|
MapRasterTileSource |
setCachingEnabled(boolean enabled)
Set whether tiles are cached to the file system.
|
MapRasterTileSource |
setZIndex(int zIndex)
Sets a z-index (stacking order) value for the
MapObject . |
MapRasterTileSource |
showAtZoomLevel(int level)
Shows tiles at the specified zoom level of the
Map . |
MapRasterTileSource |
showAtZoomRange(int beginZoomLevel,
int endZoomLevel)
Shows tiles within a given zoom level range of the
Map . |
public MapRasterTileSource setBoundingArea(GeoBoundingBox boundingBox)
boundingBox
- A GeoBoundingBox
representing
the bounding area of visible raster tilesMapRasterTileSource
itself.public GeoBoundingBox getBoundingArea()
GeoBoundingBox
representing the bounding area within which raster tiles are
visible.public MapRasterTileSource hideAtZoomLevel(int level)
Map
.level
- Zoom level at which tiles are to be hiddenMapRasterTileSource
itself (see Map.getMaxZoomLevel()
and Map.getMinZoomLevel()
to
retrieve the supported zoom level range).public MapRasterTileSource showAtZoomLevel(int level)
Map
.level
- Zoom level at which tiles are to be shownMapRasterTileSource
itself (see Map.getMaxZoomLevel()
and Map.getMinZoomLevel()
to
retrieve the supported zoom level range).public MapRasterTileSource hideAtZoomRange(int beginZoomLevel, int endZoomLevel)
Map
.beginZoomLevel
- Zoom level representing the beginning of the range within which tiles are to be
hiddenendZoomLevel
- Zoom level representing the end of the range within which tiles are to be hiddenMapRasterTileSource
itself (see Map.getMaxZoomLevel()
and Map.getMinZoomLevel()
to
retrieve the supported zoom level range).public MapRasterTileSource showAtZoomRange(int beginZoomLevel, int endZoomLevel)
Map
.beginZoomLevel
- Zoom level representing the beginning of the range within which tiles are to be
shownendZoomLevel
- Zoom level representing the end of the range within which tiles are to be shownMapRasterTileSource
itself (see Map.getMaxZoomLevel()
and Map.getMinZoomLevel()
to
retrieve the supported zoom level range).public boolean isShownAtZoomLevel(int zoomLevel)
Map
.zoomLevel
- Zoom level to check for raster tile visibilityMap.getZoomLevel()
to retrieve the current
zoom level of the Map
).public MapRasterTileSource setCachingEnabled(boolean enabled)
enabled
- True to cache, False otherwiseMapRasterTileSource
itself.public boolean isCachingEnabled()
public MapRasterTileSource setCachePrefix(java.lang.String cache)
cache
- Prefix tagMapRasterTileSource
itself.public MapRasterTileSource setCacheExpiration(int expireSeconds)
expireSeconds
- Expire time in secondsMapRasterTileSource
itself.public int getCacheExpiration()
public int getZIndex()
MapObject
.public MapRasterTileSource setZIndex(int zIndex)
MapObject
.zIndex
- A new z-index value for the MapObject
, a 16-bit int
within the
range of [0..655xx]MapRasterTileSource
itself.public abstract boolean hasTile(int x, int y, int zoomLevel)
x
- X coordinatey
- Y coordinatezoomLevel
- zoom levelpublic MapRasterTileSource.TileResult getTileWithError(int x, int y, int zoomLevel)
x
- X coordinatey
- Y coordinatezoomLevel
- zoom levelTileResult
representing tile data and operation error. Check
TileResult#getError()
to check for error. Check TileResult#getData()
to get RasterTile