public class ZoomLevelInfo extends OMComponent
#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.
Modifier and Type | Field and Description |
---|---|
protected float |
scale |
protected int |
zoomLevel |
i18n, propertyPrefix
beanContextChildSupport, isolated
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
ZoomLevelInfo()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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) |
getProperties, getPropertyInfo, getPropertyPrefix, setProperties, setProperties, setPropertyPrefix
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated
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 tileCopyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details