|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.dataAccess.mapTile.SimpleEmptyTileHandler
public class SimpleEmptyTileHandler
An EmptyTileHandler that uses DrawingAttributes to create a rectangle to fill in for empty tiles. You can set one of these up using the properties for a MapTileLayer, and those properties will trickle down through the MapTileServer, which will in turn create one of these.
emptyTileHandler=com.bbn.openmap.dataAccess.mapTile.SimpleEmptyTileHandler # The zoom level to start using the no coverage parameters. O by default, so that the # noCoverage parameters are used to create what is sent back by default. noCoverageZoom=zoom level when you don't want empty tiles, you want no coverage tiles # If an image is not defined, these colors will be used to create no coverage # tiles. If not specified, nothing will be sent back. noCoverage.fillColor=hex RGB color noCoverage.lineColor=hex RGB color noCoverage.fillPattern=path to resource, file or URL of pattern to use for tile fill. # If not specified, no image will be returned if zoom level less than noCoverageZoom. If you # want to use these parameters to set up on-the-fly filled tile images, make sure you also adjust # the noCoverageZoom level. background.fillColor=hex RGB color background.lineColor=hex RGB color background.fillPattern=path to resource, file or URL of pattern to use for tile fill.
Field Summary | |
---|---|
static java.lang.String |
BACKGROUND_PROPERTY
|
protected DrawingAttributes |
backgroundAtts
|
protected java.awt.image.BufferedImage |
backgroundTileImage
|
protected java.awt.image.BufferedImage |
emptyTileImage
|
protected static java.util.logging.Logger |
logger
|
static java.lang.String |
NO_COVERAGE_PROPERTY
|
static java.lang.String |
NO_COVERAGE_ZOOM_PROPERTY
|
protected DrawingAttributes |
noCoverageAtts
|
protected int |
noCoverageZoom
The zoom level at which point the EmptyTileHandler will create no-coverage tiles, if defined. |
protected java.lang.String |
prefix
|
static int |
TILE_SIZE
|
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
SimpleEmptyTileHandler()
|
Method Summary | |
---|---|
protected java.awt.image.BufferedImage |
createTileImageFromDrawingAttributes(DrawingAttributes da)
Create a BufferedImage from the provided DrawingAttributes. |
DrawingAttributes |
getBackgroundAtts()
|
java.awt.image.BufferedImage |
getImageForEmptyTile(java.lang.String imagePath,
int x,
int y,
int zoomLevel,
MapTileCoordinateTransform mtcTransform,
Projection proj)
The main call from the MapTileFactory to return something for the given missing tile. |
DrawingAttributes |
getNoCoverageAtts()
|
int |
getNoCoverageZoom()
|
java.util.Properties |
getProperties(java.util.Properties props)
Method to fill in a Properties object, reflecting the current values of the PropertyConsumer. |
java.util.Properties |
getPropertyInfo(java.util.Properties props)
Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. |
java.lang.String |
getPropertyPrefix()
Get the property key prefix that is being used to prepend to the property keys for Properties lookups. |
void |
setBackgroundAtts(DrawingAttributes backgroundAtts)
Set the background drawing attributes and create the cached backgroundTileImage if the drawing attributes provided doesn't match what's there. |
void |
setNoCoverageAtts(DrawingAttributes noCoverageAtts)
Set the no-coverage drawing attributes and create the cached emptyTileImage if the drawing attributes provided doesn't match what's there. |
void |
setNoCoverageZoom(int noCoverageZoom)
|
void |
setProperties(java.util.Properties props)
Method to set the properties in the PropertyConsumer. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Method to set the properties in the PropertyConsumer. |
void |
setPropertyPrefix(java.lang.String pref)
Set the property key prefix that should be used by the PropertyConsumer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.logging.Logger logger
public static final java.lang.String BACKGROUND_PROPERTY
public static final java.lang.String NO_COVERAGE_PROPERTY
public static final java.lang.String NO_COVERAGE_ZOOM_PROPERTY
public static final int TILE_SIZE
protected DrawingAttributes backgroundAtts
protected DrawingAttributes noCoverageAtts
protected java.lang.String prefix
protected java.awt.image.BufferedImage emptyTileImage
protected java.awt.image.BufferedImage backgroundTileImage
protected int noCoverageZoom
Constructor Detail |
---|
public SimpleEmptyTileHandler()
Method Detail |
---|
public java.awt.image.BufferedImage getImageForEmptyTile(java.lang.String imagePath, int x, int y, int zoomLevel, MapTileCoordinateTransform mtcTransform, Projection proj)
EmptyTileHandler
getImageForEmptyTile
in interface EmptyTileHandler
imagePath
- the path of the missing tile that is going to be used as
cache lookup later.x
- the uv x coordinate of the tile.y
- the uv y coordinate of the tile.zoomLevel
- the zoom level of the tile.mtcTransform
- the transform that converts x,y coordinates to
lat/lon and describes the layout of the uv tile coordinates.proj
- the map projection, in case that matters what should be
returned for the empty tile.
public void setPropertyPrefix(java.lang.String pref)
PropertyConsumer
setPropertyPrefix
in interface PropertyConsumer
pref
- the prefix String.public java.lang.String getPropertyPrefix()
PropertyConsumer
getPropertyPrefix
in interface PropertyConsumer
public void setProperties(java.util.Properties props)
PropertyConsumer
setProperties
in interface PropertyConsumer
props
- a properties object that the PropertyConsumer
can use to retrieve expected properties it can use for
configuration.public void setProperties(java.lang.String prefix, java.util.Properties props)
PropertyConsumer
setProperties
in interface PropertyConsumer
prefix
- a String used by the PropertyConsumer to prepend
to each property value it wants to look up -
setList.getProperty(prefix.propertyKey). If the prefix
had already been set, then the prefix passed in should
replace that previous value.props
- a Properties object that the PropertyConsumer
can use to retrieve expected properties it can use for
configuration.public java.util.Properties getProperties(java.util.Properties props)
PropertyConsumer
getProperties
in interface PropertyConsumer
props
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public java.util.Properties getPropertyInfo(java.util.Properties props)
PropertyConsumer
getPropertyInfo
in interface PropertyConsumer
props
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
protected java.awt.image.BufferedImage createTileImageFromDrawingAttributes(DrawingAttributes da)
da
- DrawingAttributes
public DrawingAttributes getBackgroundAtts()
public void setBackgroundAtts(DrawingAttributes backgroundAtts)
backgroundAtts
- the backgroundAtts to setpublic DrawingAttributes getNoCoverageAtts()
public void setNoCoverageAtts(DrawingAttributes noCoverageAtts)
noCoverageAtts
- the noCoverageAtts to setpublic int getNoCoverageZoom()
public void setNoCoverageZoom(int noCoverageZoom)
noCoverageZoom
- the noCoverageZoom to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |