|
||||||||||
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
public class ZoomLevelInfo
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 zoomMarker.bounds=lat lon lat lon 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=4Note that the zoomMarker keyword should be stored in the TileMaker zoomLevels property list.
Field Summary | |
---|---|
protected float |
scale
|
protected int |
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 | |
---|---|
ZoomLevelInfo()
Default constructor. |
Method Summary | |
---|---|
java.lang.String |
formatImageFilePath(java.lang.String rootDir,
int uvx,
int uvy)
Creates file path given a root directory plus current zoom level, x, and y. |
java.lang.String |
formatParentDirectoryName(java.lang.String rootDir,
int uvx,
int uvy)
Creates the parent directory of the file with the current zoom level set in the ZoomLevelInfo. |
int |
getEdgeTileCount()
|
float |
getScale()
Return the current scale set in this object. |
java.awt.geom.Rectangle2D |
getUVBounds(java.awt.geom.Rectangle2D bounds,
MapTileCoordinateTransform mtct,
int zoomLevel)
Given a bounds containing a lat/lon box (x, y, w, h in decimal degrees) and a transform for the MapTileCoordinates being used for the tiles (OpenStreetMap or Google (MTS)), provide the UV tile coordinates for the the bounding box. |
int |
getZoomLevel()
|
void |
setScale(float scale)
Set the current scale to use for calculating the zoom level. |
void |
setZoomLevel(int zoomLevel)
|
Methods inherited from class com.bbn.openmap.OMComponent |
---|
getProperties, getPropertyInfo, getPropertyPrefix, setProperties, 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 |
---|
protected int zoomLevel
protected float scale
Constructor Detail |
---|
public ZoomLevelInfo()
Method Detail |
---|
public int getZoomLevel()
public void setZoomLevel(int zoomLevel)
zoomLevel
- the current zoom level.public float getScale()
public void setScale(float scale)
scale
- to setpublic int getEdgeTileCount()
public java.awt.geom.Rectangle2D getUVBounds(java.awt.geom.Rectangle2D bounds, MapTileCoordinateTransform mtct, int zoomLevel)
bounds
- decimal degree boundsmtct
- MapTileCoordinateTransform (OSMMapTileCoordinateTransform or
TMSMapTileCoordinateTransform).
public java.lang.String formatParentDirectoryName(java.lang.String rootDir, int uvx, int uvy)
rootDir
- path to root of dir structire, with no file separator at
the end.uvx
- uv x coordinate of map tile.uvy
- uv y coordinate of map tile.
public java.lang.String formatImageFilePath(java.lang.String rootDir, int uvx, int uvy)
rootDir
- path to root of dir structure, with no file separator at
the end.uvx
- uv x coordinate of the map tile.uvy
- uv y coordinate of the map tile
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |