public class SimpleEmptyTileHandler extends java.lang.Object implements EmptyTileHandler, PropertyConsumer
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.
Modifier and Type | Field and Description |
---|---|
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 |
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
SimpleEmptyTileHandler() |
Modifier and Type | Method and Description |
---|---|
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.
|
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
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
- DrawingAttributespublic 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 setCopyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details