public abstract class MapRasterTileSource
extends java.lang.Object
Map.
Default attribute values are as follows:
Overlay type: RasterTileOverlayType.BACKGROUND_REPLACEMENT Transparency: Transparency.TRANSPARENCY_ON Fallback: Enabled 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.
|
static class |
MapRasterTileSource.Transparency
Represents values describing the state of raster tile image transparency.
|
| Modifier and Type | Field and Description |
|---|---|
protected com.nokia.maps.MapRasterTileSourceImpl |
m_impl |
| Modifier | Constructor and Description |
|---|---|
protected |
MapRasterTileSource() |
| 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
|
MapOverlayType |
getOverlayType()
Gets the raster tile overlay type.
|
int |
getTileSize()
Gets the raster tile image size, in pixels.
|
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.
|
boolean |
hasTransparency()
Determines whether raster tile images have transparency enabled.
|
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 |
isFallbackEnabled()
Get whether fallback enabled for this tile.
|
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 |
setFallbackEnabled(boolean enabled)
Specifies whether tiles from lower zoom levels can be rendered at the current zoom level
in case a tile for the current zoom level is unavailable.
|
MapRasterTileSource |
setOverlayType(MapOverlayType newValue)
Sets a
MapOverlayType for the MapRasterTileSource. |
MapRasterTileSource |
setTileSize(int newValue)
Sets a size, in pixels, for the raster tile image.
|
MapRasterTileSource |
setTransparency(MapRasterTileSource.Transparency value)
Sets a
Transparency state for raster tile image. |
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 setOverlayType(MapOverlayType newValue)
MapOverlayType for the MapRasterTileSource.newValue - A MapOverlayType value representing the desired raster tile overlay typeMapRasterTileSource itself.public MapOverlayType getOverlayType()
MapOverlayType valuepublic MapRasterTileSource setTransparency(MapRasterTileSource.Transparency value)
Transparency state for raster tile image.value - A Transparency value representing the desired raster tile image
transparencyMapRasterTileSource itself.public boolean hasTransparency()
Transparency.TRANSPARENCY_ON, false otherwisepublic MapRasterTileSource setTileSize(int newValue)
newValue - Desired size of the raster tile imageMapRasterTileSource itself.public int getTileSize()
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 hidden (see Map.getMaxZoomLevel() and Map.getMinZoomLevel() to
retrieve the supported zoom level range)MapRasterTileSource itself.public MapRasterTileSource showAtZoomLevel(int level)
Map.level - Zoom level at which tiles are to be shown (see Map.getMaxZoomLevel() and Map.getMinZoomLevel() to
retrieve the supported zoom level range).MapRasterTileSource itself.public MapRasterTileSource hideAtZoomRange(int beginZoomLevel, int endZoomLevel)
Map.beginZoomLevel - Zoom level representing the beginning of the range within which tiles are to be
hidden (see Map.getMaxZoomLevel() and Map.getMinZoomLevel() to
retrieve the supported zoom level range).endZoomLevel - 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
shown (see Map.getMaxZoomLevel() and Map.getMinZoomLevel() to
retrieve the supported zoom level range).endZoomLevel - 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).MapRasterTileSource.hideAtZoomRange(int, int)
to hide tiles on unnecessary zoom levels.public boolean isShownAtZoomLevel(int zoomLevel)
Map.zoomLevel - Zoom level to check for raster tile visibility (see Map.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 MapRasterTileSource setFallbackEnabled(boolean enabled)
enabled - True to enable fallback, False otherwise.MapRasterTileSource itself.public boolean isFallbackEnabled()
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