com.bbn.openmap.dataAccess.mapTile
Class GreyStandardMapTileFactory
java.lang.Object
com.bbn.openmap.util.cacheHandler.CacheHandler
com.bbn.openmap.dataAccess.mapTile.StandardMapTileFactory
com.bbn.openmap.dataAccess.mapTile.GreyStandardMapTileFactory
- All Implemented Interfaces:
- MapTileFactory, PropertyConsumer
public class GreyStandardMapTileFactory
- extends StandardMapTileFactory
A StandardMapTileFactory that converts the tiles to greyscale for display.
- Author:
- ddietrick
| Fields inherited from class com.bbn.openmap.dataAccess.mapTile.StandardMapTileFactory |
CACHE_SIZE_PROPERTY, EMPTY_TILE_HANDLER_PROPERTY, emptyTileHandler, FILE_EXT_PROPERTY, fileExt, lastProj, logger, mapTileLogger, mtcTransform, MTCTRANSFORM_PROPERTY, prefix, repaintCallback, ROOT_DIR_PATH_PROPERTY, ROOT_DIR_PROPERTY, rootDir, rootDirProperty, scales, TILE_PROPERTIES, verbose, ZOOM_LEVEL_INFO_PROPERTY, ZOOM_LEVEL_TILE_SIZE_PROPERTY, zoomLevelInfo, zoomLevelTileSize |
|
Method Summary |
CacheObject |
getEmptyTile(java.lang.Object key,
int x,
int y,
int zoomLevel,
Projection proj)
Overriding the method that creates empty tiles for places with no
coverage. |
protected java.awt.image.BufferedImage |
preprocessImage(java.awt.Image origImage,
int imageWidth,
int imageHeight)
Callback method that converts tiles to greyscale. |
| Methods inherited from class com.bbn.openmap.dataAccess.mapTile.StandardMapTileFactory |
configureFromProperties, createOMGraphicFromBufferedImage, get, getEmptyTileHandler, getFileExt, getFromCache, getMtcTransform, getProperties, getPropertyInfo, getPropertyPrefix, getRepaintCallback, getRootDir, getTileMatchingProjectionType, getTileNotMatchingProjectionType, getTiles, getTiles, getTiles, getTiles, getZoomLevelForProj, getZoomLevelInfo, load, load, reset, setEmptyTileHandler, setFileExt, setMtcTransform, setProperties, setProperties, setPropertyPrefix, setRepaintCallback, setRootDir, setZoomLevelInfo |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GreyStandardMapTileFactory
public GreyStandardMapTileFactory()
GreyStandardMapTileFactory
public GreyStandardMapTileFactory(java.awt.Component layer,
java.lang.String rootDir,
java.lang.String tileFileExt)
getEmptyTile
public CacheObject getEmptyTile(java.lang.Object key,
int x,
int y,
int zoomLevel,
Projection proj)
- Overriding the method that creates empty tiles for places with no
coverage. We need to set the no-coverage attributes for the
EmptyTileHandler (if it's a SimpleEmptyTileHandler) to null, so it
doesn't create empty tiles when it's beyond the coverage zoom level
limit. Those tiles are normally returned as clear, but in the conversion
to greyscale they turn black.
- Overrides:
getEmptyTile in class StandardMapTileFactory
- Parameters:
key - the cache key for this objectx - the uv x coordinate of the tiley - the uv y coordinate of the tilezoomLevel - the zoom level for the tileproj - the projection being used for the map.
- Returns:
- CacheObject, or null if the empty tile should be blank.
preprocessImage
protected java.awt.image.BufferedImage preprocessImage(java.awt.Image origImage,
int imageWidth,
int imageHeight)
throws java.lang.InterruptedException
- Callback method that converts tiles to greyscale.
- Overrides:
preprocessImage in class StandardMapTileFactory
- Parameters:
origImage - Any java ImageimageWidth - pixel widthimageHeight - pixel height
- Returns:
- BufferedImage with any changes necessary.
- Throws:
java.lang.InterruptedException
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details