StandardMapTileFactory (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.dataAccess.mapTile
Class StandardMapTileFactory

    java.lang.Object
      com.bbn.openmap.util.cacheHandler.CacheHandler
          com.bbn.openmap.dataAccess.mapTile.StandardMapTileFactory

All Implemented Interfaces:
  MapTileFactory, PropertyConsumer

Direct Known Subclasses:
  DebugMapTileFactory, ServerMapTileFactory, TileMillMapTileFactory

    public class StandardMapTileFactory

extends CacheHandler
implements MapTileFactory, PropertyConsumer

The StandardImageTileFactory is a TileFactory implementation that retrieves image tiles from local storage. These tiles are assumed to be stored in the local file system, at some root directory, and then in some hierarchy like zoom-level/x coord/y coord.file-extension. This class can be extended to allow different tile naming/storing conventions to be used.

This component can be configured using properties:

     rootDir=the path to the parent directory of the tiles. The factory will construct specific file paths that are appended to this value.
     fileExt=the file extension to append to the tile names
     cacheSize=the number of mapTiles the factory should hold on to. The default is 100.
     # default is OSMMapTileCoordinateTransform, but it depends on the source of tiles.  GDAL is TSMMapTileCoordinateTransform
     mapTileTransform=com.bbn.openmap.dataAccess.mapTile.OSMMapTileCoordinateTransform, or com.bbn.openmap.dataAccess.mapTile.TSMMapTileCoordinateTransform
     # what to do about missing tiles?
     emptyTileHandler=com.bbn.openmap.dataAccess.mapTile.SimpleEmptyTileHandler
     # Set a tile image preparer, if you want to change how images are rendered (greyscale, for instance)
     tileImagePreparer=com.bbn.openmap.dataAccess.mapTile.StandardImagePreparer
     # or
     tileImagePreparer=com.bbn.openmap.dataAccess.mapTile.GreyscaleImagePreparer

Author:
  dietrick

Nested Class Summary
`static class` | `StandardMapTileFactory.TilePathBuilder`

Field Summary
`static java.lang.String` | `CACHE_SIZE_PROPERTY`
`static java.lang.String` | `EMPTY_TILE_HANDLER_PROPERTY`
`protected EmptyTileHandler` | `emptyTileHandler`
`static java.lang.String` | `FILE_EXT_PROPERTY`
`protected java.lang.String` | `fileExt`
`protected Projection` | `lastProj`
`protected static java.util.logging.Logger` | `logger`
`protected static java.util.logging.Logger` | `mapTileLogger`
`protected MapTileRequester` | `mapTileRequester` If set, the MapTileRequester will be notified when the list provided in getTiles() has been updated, and asked if it should continue with the getTiles() request at opportune times, when tile fetching is stable.
`protected MapTileCoordinateTransform` | `mtcTransform` Coordinate transform for the uv coordinates of the tiles.
`static java.lang.String` | `MTCTRANSFORM_PROPERTY`
`protected java.lang.String` | `prefix`
`static java.lang.String` | `ROOT_DIR_PATH_PROPERTY` Inserted into properties loaded via tiles.omp, so that the EmptyTileHandler can know where the tile set is located, in case it needs to know the absolute path.
`static java.lang.String` | `ROOT_DIR_PROPERTY`
`protected java.lang.String` | `rootDir`
`protected java.lang.String` | `rootDirProperty`
`static java.lang.String` | `TILE_IMAGE_PREPARER_PROPERTY`
`static java.lang.String` | `TILE_PROPERTIES` The name of the properties file that the factory looks for in the root directory of the data (tiles.omp).
`protected TileImagePreparer` | `tileImagePreparer`
`protected boolean` | `verbose`
`static java.lang.String` | `ZOOM_LEVEL_INFO_PROPERTY`
`static java.lang.String` | `ZOOM_LEVEL_TILE_SIZE_PROPERTY`
`protected ZoomLevelInfo` | `zoomLevelInfo`
`protected int` | `zoomLevelTileSize` The zoom level tile size is used by the factory to determine when it needs to get tiles for a different zoom level.

Fields inherited from class com.bbn.openmap.util.cacheHandler.CacheHandler
`DEFAULT_MAX_CACHE_SIZE, logicalClock, objs`

Fields inherited from interface com.bbn.openmap.PropertyConsumer
`EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty`

Constructor Summary
`StandardMapTileFactory()`
`StandardMapTileFactory(MapTileRequester layer, java.lang.String rootDir, java.lang.String tileFileExt)`

Method Summary
`protected java.lang.String` | `buildCacheKey(int x, int y, int z, java.lang.String fileExt)` Creates a unique cache key for this tile based on zoom, x, y.
`java.lang.String` | `buildFilePath(int x, int y, int z, java.lang.String fileExt)` Build an image path to load, based on specified tile coordinates, zoom level and file extension settings.
`protected void` | `configureFromProperties(java.io.InputStream is, java.lang.String rootDirectory)` Called with an input stream for a properties file, used for reading tiles.omp files.
`protected OMGraphic` | `createOMGraphicFromBufferedImage(java.awt.image.BufferedImage bi, int x, int y, int zoomLevel, Projection proj)` Creates an OMRaster appropriate for projection and other parameters from a buffered image.
`java.lang.Object` | `get(java.lang.Object key, int x, int y, int zoomLevel, Projection proj)` The main call to retrieve something from the cache, modified to allow load method to do some projection calculations to initialize tile parameters.
`CacheObject` | `getEmptyTile(java.lang.Object key, int x, int y, int zoomLevel, Projection proj)` Call to make when you want the tile factory to create some empty tile representation for the given location.
`EmptyTileHandler` | `getEmptyTileHandler()` Get object that handles empty tiles.
`java.lang.String` | `getFileExt()`
`java.lang.Object` | `getFromCache(java.lang.Object key, int x, int y, int zoomLevel)` An auxiliary call to retrieve something from the cache, modified to allow load method to do some projection calculations to initialize tile parameters.
`java.lang.String` | `getInitPropertiesOrder()`
`MapTileRequester` | `getMapTileRequester()`
`MapTileCoordinateTransform` | `getMtcTransform()`
`java.util.Properties` | `getProperties(java.util.Properties getList)` Method to fill in a Properties object, reflecting the current values of the PropertyConsumer.
`java.util.Properties` | `getPropertyInfo(java.util.Properties list)` 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.
`java.lang.String` | `getRootDir()`
`TileImagePreparer` | `getTileImagePreparer()`
`protected OMGraphic` | `getTileMatchingProjectionType(java.awt.image.BufferedImage image, int x, int y, int zoomLevel)` Create an OMScalingRaster that matches the basic projection of the current map.
`protected OMGraphic` | `getTileNotMatchingProjectionType(java.awt.image.BufferedImage image, int x, int y, int zoomLevel)` Create an OMWarpingImage that knows how to re-project itself for different projections.
`protected StandardMapTileFactory.TilePathBuilder` | `getTilePathBuilder()`
`protected void` | `getTiles(int uvleft, int uvright, int uvup, int uvbottom, ZoomLevelInfo zoomLevelInfo, Projection proj, OMGraphicList list)`
`OMGraphicList` | `getTiles(Projection proj)` Returns projected tiles for the given projection.
`OMGraphicList` | `getTiles(Projection proj, int zoomLevel)` Returns projected tiles for given projection at specified zoom level.
`OMGraphicList` | `getTiles(Projection proj, int zoomLevel, OMGraphicList list)` Returns projected tiles for given projection at specified zoom level.
`ZoomLevelInfo` | `getZoomLevelInfo()` Get the ZoomLevelInfo set on the factory.
`CacheObject` | `load(java.lang.Object key)` Called from get if the key doesn't exist, to "load" the new object into the cache before returning it.
`CacheObject` | `load(java.lang.Object key, int x, int y, int zoomLevel, Projection proj)` Called to load cache object from data source, when not found in cache.
`protected java.awt.image.BufferedImage` | `preprocessImage(java.awt.Image origImage, int imageWidth, int imageHeight)` Method that allows subclasses to modify the image as necessary before it is passed into an OMGraphic.
`void` | `reset()` Tell the factory to dump the cache.
`void` | `setEmptyTileHandler(EmptyTileHandler emptyTileHandler)`
`void` | `setFileExt(java.lang.String fileExt)`
`void` | `setMapTileRequester(MapTileRequester mtRequestor)` Set a MapTileRequestor in the tile factory that should be told to repaint when new tiles become available, and to check with during the tile fetch whether to keep going or not.
`void` | `setMtcTransform(MapTileCoordinateTransform mtcTransform)` Set the map tile coordinate transformed used to figure out lat/lon to tile coordinates.
`void` | `setProperties(java.util.Properties setList)` Method to set the properties in the PropertyConsumer.
`void` | `setProperties(java.lang.String prefix, java.util.Properties setList)` Method to set the properties in the PropertyConsumer.
`void` | `setPropertyPrefix(java.lang.String prefix)` Set the property key prefix that should be used by the PropertyConsumer.
`void` | `setRootDir(java.lang.String rootDirectory)`
`void` | `setTileImagePreparer(TileImagePreparer tileImagePreparer)`
`protected void` | `setTilePathBuilder(StandardMapTileFactory.TilePathBuilder tpb)`
`void` | `setZoomLevelInfo(ZoomLevelInfo zoomLevelInfo)` Get the ZoomLevelInfo set on the factory.

Methods inherited from class com.bbn.openmap.util.cacheHandler.CacheHandler
`clear, get, getCacheSize, listIterator, replaceLeastUsed, resetCache, resetCache, searchCache`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### prefix

    protected java.lang.String prefix

### logger

    protected static final java.util.logging.Logger logger

### mapTileLogger

    protected static final java.util.logging.Logger mapTileLogger

### ROOT_DIR_PROPERTY

    public static final java.lang.String ROOT_DIR_PROPERTY

See Also:
  Constant Field Values

### FILE_EXT_PROPERTY

    public static final java.lang.String FILE_EXT_PROPERTY

See Also:
  Constant Field Values

### CACHE_SIZE_PROPERTY

    public static final java.lang.String CACHE_SIZE_PROPERTY

See Also:
  Constant Field Values

### MTCTRANSFORM_PROPERTY

    public static final java.lang.String MTCTRANSFORM_PROPERTY

See Also:
  Constant Field Values

### EMPTY_TILE_HANDLER_PROPERTY

    public static final java.lang.String EMPTY_TILE_HANDLER_PROPERTY

See Also:
  Constant Field Values

### ZOOM_LEVEL_INFO_PROPERTY

    public static final java.lang.String ZOOM_LEVEL_INFO_PROPERTY

See Also:
  Constant Field Values

### ZOOM_LEVEL_TILE_SIZE_PROPERTY

    public static final java.lang.String ZOOM_LEVEL_TILE_SIZE_PROPERTY

See Also:
  Constant Field Values

### TILE_IMAGE_PREPARER_PROPERTY

    public static final java.lang.String TILE_IMAGE_PREPARER_PROPERTY

See Also:
  Constant Field Values

### ROOT_DIR_PATH_PROPERTY

    public static final java.lang.String ROOT_DIR_PATH_PROPERTY

  Inserted into properties loaded via tiles.omp, so that the EmptyTileHandler can know where the tile set is located, in case it needs to know the absolute path. Will contain the root directory path specified in the factory properties, as opposed to any rootDir property set in the tiles.omp file that would specify a relative root directory path.

  See Also:
    Constant Field Values

### TILE_PROPERTIES

    public static final java.lang.String TILE_PROPERTIES

  The name of the properties file that the factory looks for in the root directory of the data (tiles.omp).

  See Also:
    Constant Field Values

### zoomLevelInfo

    protected ZoomLevelInfo zoomLevelInfo

### rootDir

    protected java.lang.String rootDir

### fileExt

    protected java.lang.String fileExt

### rootDirProperty

    protected java.lang.String rootDirProperty

### emptyTileHandler

    protected EmptyTileHandler emptyTileHandler

### verbose

    protected boolean verbose

### zoomLevelTileSize

    protected int zoomLevelTileSize

  The zoom level tile size is used by the factory to determine when it needs to get tiles for a different zoom level. The default value is 350. That is, when the factory is figuring out what zoom level to use, if the pixel size of a tile is greater than or equal to 350 x 350, it decides to check the next zoom level for retrieving tiles. This is used instead of just comparing projection scales.

### tileImagePreparer

    protected TileImagePreparer tileImagePreparer

### mapTileRequester

    protected MapTileRequester mapTileRequester

  If set, the MapTileRequester will be notified when the list provided in getTiles() has been updated, and asked if it should continue with the getTiles() request at opportune times, when tile fetching is stable.

### mtcTransform

    protected MapTileCoordinateTransform mtcTransform

  Coordinate transform for the uv coordinates of the tiles. Different sources have different origins for tile coordinates.

### lastProj

    protected Projection lastProj

Constructor Detail

### StandardMapTileFactory

    public StandardMapTileFactory()

### StandardMapTileFactory

    public StandardMapTileFactory(MapTileRequester layer,
                                  java.lang.String rootDir,
                                  java.lang.String tileFileExt)

Method Detail

### load

    public CacheObject load(java.lang.Object key)

  Description copied from class: `CacheHandler`
  Called from get if the key doesn't exist, to "load" the new object into the cache before returning it. This function should define how a CacheObject is created, or loaded from the file system, or whatever.

  Specified by:
    `load` in class `CacheHandler`

### reset

    public void reset()

  Tell the factory to dump the cache.

  Specified by:
    `reset` in interface `MapTileFactory`

### load

    public CacheObject load(java.lang.Object key,
                            int x,
                            int y,
                            int zoomLevel,
                            Projection proj)

  Called to load cache object from data source, when not found in cache.

  Parameters:
    `key` - cache key
    `x` - uv x coordinate
    `y` - uv y coordinate
    `zoomLevel` - zoom level for tile to load
    `proj` - passed solely to enable checking if the projection of the tiles matches the rendered projection.
  Returns:
    CacheObject returned from cache, null if not found

### createOMGraphicFromBufferedImage

    protected OMGraphic createOMGraphicFromBufferedImage(java.awt.image.BufferedImage bi,
                                                         int x,
                                                         int y,
                                                         int zoomLevel,
                                                         Projection proj)
                                                  throws java.lang.InterruptedException

  Creates an OMRaster appropriate for projection and other parameters from a buffered image.

  Parameters:
    `bi` - BufferedImage to use for tile.
    `x` - x uv coordinate for tile.
    `y` - y uv coordinate for tile.
    `zoomLevel` - zoom level for tile.
    `proj` - the current map projection
  Returns:
    OMGraphic (OMScalingRaster or OMWarpingImage, most likely)
  Throws:
    `java.lang.InterruptedException`

### getTileMatchingProjectionType

    protected OMGraphic getTileMatchingProjectionType(java.awt.image.BufferedImage image,
                                                      int x,
                                                      int y,
                                                      int zoomLevel)

  Create an OMScalingRaster that matches the basic projection of the current map. Only scales evenly for the opposite corner points.

  Parameters:
    `image` - BufferedImage created from tile file
    `x` - uv x coordinate
    `y` - uv y coordinate
    `zoomLevel` - zoom level for tile retrieval
  Returns:
    OMGraphic, but really an OMScalingRaster.

### getTileNotMatchingProjectionType

    protected OMGraphic getTileNotMatchingProjectionType(java.awt.image.BufferedImage image,
                                                         int x,
                                                         int y,
                                                         int zoomLevel)

  Create an OMWarpingImage that knows how to re-project itself for different projections. The base projection is going to be defined for the mtc transform set on the factory. Warping images are slower to generate for a map projection than scaling rasters.

  Parameters:
    `image` -
    `x` -
    `y` -
    `zoomLevel` -
  Returns:
    OMGraphic, but really an OMWarpingImage

### preprocessImage

    protected java.awt.image.BufferedImage preprocessImage(java.awt.Image origImage,
                                                           int imageWidth,
                                                           int imageHeight)
                                                    throws java.lang.InterruptedException

  Method that allows subclasses to modify the image as necessary before it is passed into an OMGraphic.

  Parameters:
    `origImage` - Any java Image
    `imageWidth` - pixel width
    `imageHeight` - pixel height
  Returns:
    BufferedImage with any changes necessary.
  Throws:
    `java.lang.InterruptedException`

### get

    public java.lang.Object get(java.lang.Object key,
                                int x,
                                int y,
                                int zoomLevel,
                                Projection proj)

  The main call to retrieve something from the cache, modified to allow load method to do some projection calculations to initialize tile parameters. If the object is not found in the cache, then load is called to get it from the data source.

  Parameters:
    `key` - cache key, usually string of location of a tile
    `x` - uv x location of tile
    `y` - uv y location of tile
    `zoomLevel` - zoom level of tile
    `proj` - passed solely to enable checking if the projection of the tiles matches the rendered projection.
  Returns:
    object from cache.

### getFromCache

    public java.lang.Object getFromCache(java.lang.Object key,
                                         int x,
                                         int y,
                                         int zoomLevel)

  An auxiliary call to retrieve something from the cache, modified to allow load method to do some projection calculations to initialize tile parameters. If the object is not found in the cache, null is returned.

  Parameters:
    `key` - cache key, usually string of location of a tile
    `x` - uv x location of tile
    `y` - uv y location of tile
    `zoomLevel` - zoom level of tile
  Returns:
    cache object if found, null if not.

### getEmptyTile

    public CacheObject getEmptyTile(java.lang.Object key,
                                    int x,
                                    int y,
                                    int zoomLevel,
                                    Projection proj)

  Call to make when you want the tile factory to create some empty tile representation for the given location. You can return any type of OMGraphic embedded in a CacheObject.

  Parameters:
    `key` - the cache key for this object
    `x` - the uv x coordinate of the tile
    `y` - the uv y coordinate of the tile
    `zoomLevel` - the zoom level for the tile
    `proj` - the projection being used for the map.
  Returns:
    CacheObject, or null if the empty tile should be blank.

### getTiles

    public OMGraphicList getTiles(Projection proj)

  Returns projected tiles for the given projection.

  Specified by:
    `getTiles` in interface `MapTileFactory`
  Parameters:
    `proj` - the projection to fetch tiles for.
  Returns:
    OMGraphicList containing projected OMGraphics.

### getTiles

    public OMGraphicList getTiles(Projection proj,
                                  int zoomLevel)

  Returns projected tiles for given projection at specified zoom level.

  Specified by:
    `getTiles` in interface `MapTileFactory`
  Parameters:
    `proj` - projection for query
    `zoomLevel` - zoom level 1-20 for tiles to be returned, -1 for code to figure out appropriate zoom level.
  Returns:
    OMGraphicList with tiles.

### getTiles

    public OMGraphicList getTiles(Projection proj,
                                  int zoomLevel,
                                  OMGraphicList list)

  Returns projected tiles for given projection at specified zoom level. Use this call if you are providing a repaint callback component to the factory, so you will have a handle on the OMGraphicList to render to.

  Specified by:
    `getTiles` in interface `MapTileFactory`
  Parameters:
    `proj` - projection for query
    `zoomLevel` - zoom level 1-20 for tiles to be returned, -1 for code to figure out appropriate zoom level.
    `list` - OMGraphicList that is returned, that will also have tiles added to it.
  Returns:
    OMGraphicList with tiles.

### getTiles

    protected void getTiles(int uvleft,
                            int uvright,
                            int uvup,
                            int uvbottom,
                            ZoomLevelInfo zoomLevelInfo,
                            Projection proj,
                            OMGraphicList list)

### buildFilePath

    public java.lang.String buildFilePath(int x,
                                          int y,
                                          int z,
                                          java.lang.String fileExt)

  Build an image path to load, based on specified tile coordinates, zoom level and file extension settings. Look at the root directory definition and determine if the x,y,z values of the path are specified as the holder values {z}, {x} and {y}. If they aren't specified, the provided values will be appended to the rootDir as z/x/y.fileExt. If {z}, {x} or {y} are found in the root dir path, then it's assumed that the rootDir contains all the information needed to specify the path and regular expressions will be used to replace those value holders with the values specified. The file extension in this case will not be appended to the rootDir.

  Parameters:
    `x` - the x tile coordinate
    `y` - the y tile coordinate
    `z` - the zoom level
    `fileExt` - the file extension to use for the path.

### setTilePathBuilder

    protected void setTilePathBuilder(StandardMapTileFactory.TilePathBuilder tpb)

### getTilePathBuilder

    protected StandardMapTileFactory.TilePathBuilder getTilePathBuilder()

### buildCacheKey

    protected java.lang.String buildCacheKey(int x,
                                             int y,
                                             int z,
                                             java.lang.String fileExt)

  Creates a unique cache key for this tile based on zoom, x, y. This method was created so the ServerMapTileFactory could override it and use local cache names for keys if a local cache was being used.

  Parameters:
    `x` - tile coord.
    `y` - tile coord.
    `z` - zoomLevel.
    `fileExt` - file extension.
  Returns:
    String used in cache.

### getMapTileRequester

    public MapTileRequester getMapTileRequester()

### setMapTileRequester

    public void setMapTileRequester(MapTileRequester mtRequestor)

  Description copied from interface: `MapTileFactory`
  Set a MapTileRequestor in the tile factory that should be told to repaint when new tiles become available, and to check with during the tile fetch whether to keep going or not. listUpdate will be called when a new tile has been added to the OMGraphicList passed in the getTiles method, and shouldContinue will be called during stable times during the getTiles fetch.

  Specified by:
    `setMapTileRequester` in interface `MapTileFactory`
  Parameters:
    `mtRequestor` - callback MapTileRequestor to ask status questions.

### getProperties

    public java.util.Properties getProperties(java.util.Properties getList)

  Description copied from interface: `PropertyConsumer`
  Method to fill in a Properties object, reflecting the current values of the PropertyConsumer. If the PropertyConsumer has a prefix set, the property keys should have that prefix plus a separating '.' prepended to each property key it uses for configuration.

  Specified by:
    `getProperties` in interface `PropertyConsumer`
  Parameters:
    `getList` - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
  Returns:
    Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

### getPropertyInfo

    public java.util.Properties getPropertyInfo(java.util.Properties list)

  Description copied from interface: `PropertyConsumer`
  Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. The key for each property should be the raw property name (without a prefix) with a value that is a String that describes what the property key represents, along with any other information about the property that would be helpful (range, default value, etc.).

  Specified by:
    `getPropertyInfo` in interface `PropertyConsumer`
  Parameters:
    `list` - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
  Returns:
    Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

### getInitPropertiesOrder

    public java.lang.String getInitPropertiesOrder()

### getPropertyPrefix

    public java.lang.String getPropertyPrefix()

  Description copied from interface: `PropertyConsumer`
  Get the property key prefix that is being used to prepend to the property keys for Properties lookups.

  Specified by:
    `getPropertyPrefix` in interface `PropertyConsumer`
  Returns:
    the prefix string

### setProperties

    public void setProperties(java.util.Properties setList)

  Description copied from interface: `PropertyConsumer`
  Method to set the properties in the PropertyConsumer. It is assumed that the properties do not have a prefix associated with them, or that the prefix has already been set.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Parameters:
    `setList` - a properties object that the PropertyConsumer can use to retrieve expected properties it can use for configuration.

### setProperties

    public void setProperties(java.lang.String prefix,
                              java.util.Properties setList)

  Description copied from interface: `PropertyConsumer`
  Method to set the properties in the PropertyConsumer. The prefix is a string that should be prepended to each property key (in addition to a separating '.') in order for the PropertyConsumer to uniquely identify properties meant for it, in the midst of of Properties meant for several objects.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Parameters:
    `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.
    `setList` - a Properties object that the PropertyConsumer can use to retrieve expected properties it can use for configuration.

### setPropertyPrefix

    public void setPropertyPrefix(java.lang.String prefix)

  Description copied from interface: `PropertyConsumer`
  Set the property key prefix that should be used by the PropertyConsumer. The prefix, along with a '.', should be prepended to the property keys known by the PropertyConsumer.

  Specified by:
    `setPropertyPrefix` in interface `PropertyConsumer`
  Parameters:
    `prefix` - the prefix String.

### getRootDir

    public java.lang.String getRootDir()

### setRootDir

    public void setRootDir(java.lang.String rootDirectory)

### getTileImagePreparer

    public TileImagePreparer getTileImagePreparer()

### setTileImagePreparer

    public void setTileImagePreparer(TileImagePreparer tileImagePreparer)

### configureFromProperties

    protected void configureFromProperties(java.io.InputStream is,
                                           java.lang.String rootDirectory)
                                    throws java.io.IOException

  Called with an input stream for a properties file, used for reading tiles.omp files.

  Parameters:
    `is` - input stream for tiles.omp file.
    `rootDirectory` - original path to what was specified as root directory
  Throws:
    `java.io.IOException`

### getFileExt

    public java.lang.String getFileExt()

### setFileExt

    public void setFileExt(java.lang.String fileExt)

### getZoomLevelInfo

    public ZoomLevelInfo getZoomLevelInfo()

  Get the ZoomLevelInfo set on the factory. The ZoomLevelInfo has basic layout information about tiles for a particular zoom level, including how tiles are named and how the factory should go about loading them. The default ZoomLevelInfo is based on the OpenStreetMap tile layout, zoom levels 0-20 (where level 0 is all the way zoomed out), and the tiles are stored zoomLevel/x/y.(fileExt).

  Returns:
    the zoomLevelInfo

### setZoomLevelInfo

    public void setZoomLevelInfo(ZoomLevelInfo zoomLevelInfo)

  Get the ZoomLevelInfo set on the factory. The ZoomLevelInfo has basic layout information about tiles for a particular zoom level, including how tiles are named and how the factory should go about loading them. The default ZoomLevelInfo is based on the OpenStreetMap tile layout, zoom levels 0-20 (where level 0 is all the way zoomed out), and the tiles are stored zoomLevel/x/y.(fileExt). You can set a different zoom level info if you want to work with a tile set that is stored/defined differently than OSM.

  Won't allow itself to be set to null.

  Parameters:
    `zoomLevelInfo` - the zoomLevelInfo to set

### getMtcTransform

    public MapTileCoordinateTransform getMtcTransform()

### setMtcTransform

    public void setMtcTransform(MapTileCoordinateTransform mtcTransform)

  Set the map tile coordinate transformed used to figure out lat/lon to tile coordinates. Can't be null, if you set it to null an OSMMapTileCoordTransform will be created instead.

  Parameters:
    `mtcTransform` -

### getEmptyTileHandler

    public EmptyTileHandler getEmptyTileHandler()

  Description copied from interface: `MapTileFactory`
  Get object that handles empty tiles.

  Specified by:
    `getEmptyTileHandler` in interface `MapTileFactory`
  Returns:
    the emptyTileHandler

### setEmptyTileHandler

    public void setEmptyTileHandler(EmptyTileHandler emptyTileHandler)

  Parameters:
    `emptyTileHandler` - the emptyTileHandler to set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details