|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.MapHandlerChild com.bbn.openmap.OMComponent com.bbn.openmap.dataAccess.mapTile.ZoomLevelInfo com.bbn.openmap.dataAccess.mapTile.ZoomLevelMaker
public class ZoomLevelMaker
The ZoomLevelInfo class is used by the TileMaker and handles how tiles are defined and created for a particular zoom level. It handles any bounds restrictions, what layers should be rendered at this zoom level, and the path to the tiles from the root directory. The properties for this component are:
#Needed for property file creation of TileMaker zoomMarker.class=com.bbn.openmap.image.ZoomLevelInfo #Optional, to limit tile areas created, in sets of 4, must be in lat,lon order. zoomMarker.bounds=lat lon lat lon zoomMarker.description=Tiles for zoom level 4 #Marker names for layers to be rendered, the property prefixes for the layers held by TileMaker zoomMarker.layers=lakes shape zoomMarker.name=ZoomLayerInfo 4 zoomMarker.zoomLevel=4 zoomMarker.range=0Note that the zoomMarker keyword should be stored in the TileMaker zoomLevels property list.
Field Summary | |
---|---|
protected java.util.List<java.awt.geom.Rectangle2D> |
bounds
|
static java.lang.String |
BOUNDS_PROPERTY
|
protected java.lang.String |
description
|
static java.lang.String |
DESCRIPTION_PROPERTY
|
protected java.util.List<Layer> |
layerList
|
protected java.util.List<java.lang.String> |
layers
|
static java.lang.String |
LAYERS_PROPERTY
|
protected java.lang.String |
name
|
static java.lang.String |
NAME_PROPERTY
|
protected int |
range
The range should be equal or smaller than the zoom level, describing how many other zoom levels should be created from the tiles created for this zoom level (scaling). |
static int |
RANGE_NOT_SET
|
static java.lang.String |
RANGE_PROPERTY
|
static java.lang.String |
ZOOM_LEVEL_PROPERTY
|
Fields inherited from class com.bbn.openmap.dataAccess.mapTile.ZoomLevelInfo |
---|
scale, zoomLevel |
Fields inherited from class com.bbn.openmap.OMComponent |
---|
i18n, propertyPrefix |
Fields inherited from class com.bbn.openmap.MapHandlerChild |
---|
beanContextChildSupport, isolated |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
ZoomLevelMaker()
Need this to create it from properties |
|
ZoomLevelMaker(java.lang.String name,
java.lang.String desc,
int zoomLevel)
Create a ZoomLevelInfo object that contains information about what map tiles should be created for this zoom level. |
Method Summary | |
---|---|
void |
addBounds(java.awt.geom.Rectangle2D bounds)
Set world coordinate bounds for tiles to be created. |
java.awt.geom.Rectangle2D |
createProperBounds(double x1,
double y1,
double x2,
double y2)
Create a bounding rectangle given the four coordinates, where the upper left corner of the rectangle is the minimum x, y values and the width and height are the difference between xs and ys. |
java.util.List<java.awt.geom.Rectangle2D> |
getBounds()
Get bounds, defined as world coordinates (i.e. |
java.lang.String |
getDescription()
Get the description of this zoom level. |
java.util.List<Layer> |
getLayerList()
Get the List of Layer Objects, if it's been set. |
java.util.List<java.lang.String> |
getLayers()
Get the current marker name (property prefix) for layers considered for this zoom level. |
java.lang.String |
getName()
|
java.util.Properties |
getProperties(java.util.Properties props)
PropertyConsumer method, to fill in a Properties object, reflecting the current values of the OMComponent. |
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. |
int |
getRange()
Get the range of this ZoomLevelMaker. |
java.util.List<java.awt.geom.Rectangle2D> |
getUVBounds(MapTileCoordinateTransform mtct,
int zoomLevel)
Get the bounds as defined as UV tile limits. |
byte[] |
makeTile(double uvx,
double uvy,
MapTileMaker mapTileMaker,
Proj proj)
|
void |
setDescription(java.lang.String description)
Set the description for this zoom level. |
void |
setLayerList(java.util.List<Layer> layerList)
Set a List of Layer objects. |
void |
setLayers(java.util.List<java.lang.String> layers)
Set the marker names (property prefixes) for the layers that should be considered for this zoom level. |
void |
setName(java.lang.String name)
Set the name of this zoom level info. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Sets the properties for the OMComponent. |
void |
setRange(int range)
|
void |
setZoomLevel(int zoomLevel)
|
Methods inherited from class com.bbn.openmap.dataAccess.mapTile.ZoomLevelInfo |
---|
formatImageFilePath, formatParentDirectoryName, getEdgeTileCount, getScale, getUVBounds, getZoomLevel, setScale |
Methods inherited from class com.bbn.openmap.OMComponent |
---|
getPropertyPrefix, setProperties, setPropertyPrefix |
Methods inherited from class com.bbn.openmap.MapHandlerChild |
---|
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BOUNDS_PROPERTY
public static final java.lang.String NAME_PROPERTY
public static final java.lang.String DESCRIPTION_PROPERTY
public static final java.lang.String ZOOM_LEVEL_PROPERTY
public static final java.lang.String LAYERS_PROPERTY
public static final java.lang.String RANGE_PROPERTY
public static final int RANGE_NOT_SET
protected java.lang.String name
protected java.lang.String description
protected java.util.List<java.lang.String> layers
protected java.util.List<Layer> layerList
protected int range
protected java.util.List<java.awt.geom.Rectangle2D> bounds
Constructor Detail |
---|
public ZoomLevelMaker()
public ZoomLevelMaker(java.lang.String name, java.lang.String desc, int zoomLevel)
name
- desc
- zoomLevel
- Method Detail |
---|
public void setProperties(java.lang.String prefix, java.util.Properties props)
OMComponent
setProperties
in interface PropertyConsumer
setProperties
in class OMComponent
prefix
- the token to prefix the property namesprops
- the Properties
objectpublic java.util.Properties getProperties(java.util.Properties props)
OMComponent
getProperties
in interface PropertyConsumer
getProperties
in class OMComponent
props
- a Properties object to load the PropertyConsumer properties
into. If props equals null, then a new Properties object should be
created.
public java.util.Properties getPropertyInfo(java.util.Properties props)
OMComponent
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class OMComponent
props
- a Properties object to load the PropertyConsumer properties
into. If getList equals null, then a new Properties object should
be created.
public java.lang.String getName()
public void setName(java.lang.String name)
name
- public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- public java.util.List<java.lang.String> getLayers()
public void setLayers(java.util.List<java.lang.String> layers)
layers
- public java.util.List<Layer> getLayerList()
public void setLayerList(java.util.List<Layer> layerList)
layerList
- public void setZoomLevel(int zoomLevel)
setZoomLevel
in class ZoomLevelInfo
zoomLevel
- the current zoom level.public java.util.List<java.awt.geom.Rectangle2D> getBounds()
public void addBounds(java.awt.geom.Rectangle2D bounds)
bounds
- No checks performed - x, y have to be the min, height and
width must not exceed boundary limits (lat +/- 85, lon +/- 180)
when added to x, y.public java.util.List<java.awt.geom.Rectangle2D> getUVBounds(MapTileCoordinateTransform mtct, int zoomLevel)
public java.awt.geom.Rectangle2D createProperBounds(double x1, double y1, double x2, double y2)
x1
- y1
- x2
- y2
-
public int getRange()
public void setRange(int range)
public byte[] makeTile(double uvx, double uvy, MapTileMaker mapTileMaker, Proj proj)
uvx
- uvy
- mapTileMaker
- proj
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |