org.epseelon.mobimap.tiles
Class EmptyTileFactory

java.lang.Object
  extended by org.epseelon.mobimap.tiles.TileFactory
      extended by org.epseelon.mobimap.tiles.EmptyTileFactory

public class EmptyTileFactory
extends TileFactory

A null implementation of TileFactory. Draws empty areas.

Author:
sarbogast

Constructor Summary
EmptyTileFactory()
          Creates a new instance of EmptyTileFactory
EmptyTileFactory(TileFactoryInfo info)
          Creates a new instance of EmptyTileFactory using the specified info.
 
Method Summary
protected  java.lang.String getCoordinatePart(int x, int y, int zoom)
           
protected  int getParticularZoomFromReferenceZoom(int referenceZoom)
           
protected  int getReferenceZoomFromParticularZoom(int particularZoom)
           
 Tile getTile(int x, int y, int zoom)
          Gets an instance of an empty tile for the given tile position and zoom on the world map.
protected  void startLoading(Tile tile)
          Override this method to load the tile using, for example, an ExecutorService.
 
Methods inherited from class org.epseelon.mobimap.tiles.TileFactory
geoToPixel, getInfo, getMapSize, getTileSize, pixelToGeo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyTileFactory

public EmptyTileFactory()
Creates a new instance of EmptyTileFactory


EmptyTileFactory

public EmptyTileFactory(TileFactoryInfo info)
Creates a new instance of EmptyTileFactory using the specified info.

Method Detail

getTile

public Tile getTile(int x,
                    int y,
                    int zoom)
Gets an instance of an empty tile for the given tile position and zoom on the world map.

Specified by:
getTile in class TileFactory
Parameters:
x - The tile's x position on the world map.
y - The tile's y position on the world map.
zoom -
Returns:
the tile that is located at the given tilePoint for this zoom level. For example, if getMapSize() returns 10x20 for this zoom, and the tilePoint is (3,5), then the appropriate tile will be located and returned. This method must not return null. However, it can return dummy tiles that contain no data if it wants. This is appropriate, for example, for tiles which are outside of the bounds of the map and if the factory doesn't implement wrapping. @param x abscissa of the tilePoint

startLoading

protected void startLoading(Tile tile)
Override this method to load the tile using, for example, an ExecutorService.

Specified by:
startLoading in class TileFactory
Parameters:
tile - The tile to load.

getCoordinatePart

protected java.lang.String getCoordinatePart(int x,
                                             int y,
                                             int zoom)
Specified by:
getCoordinatePart in class TileFactory

getParticularZoomFromReferenceZoom

protected int getParticularZoomFromReferenceZoom(int referenceZoom)
Specified by:
getParticularZoomFromReferenceZoom in class TileFactory

getReferenceZoomFromParticularZoom

protected int getReferenceZoomFromParticularZoom(int particularZoom)
Specified by:
getReferenceZoomFromParticularZoom in class TileFactory


Copyright © 2008 Epseelon. All Rights Reserved.