org.openstreetmap.gui.jmapviewer
Class OsmTileSource.AbstractOsmTileSource

java.lang.Object
  extended by org.openstreetmap.gui.jmapviewer.OsmTileSource.AbstractOsmTileSource
All Implemented Interfaces:
TileSource
Direct Known Subclasses:
OsmTileSource.CycleMap, OsmTileSource.Mapnik, OsmTileSource.TilesAtHome
Enclosing class:
OsmTileSource

protected abstract static class OsmTileSource.AbstractOsmTileSource
extends java.lang.Object
implements TileSource


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openstreetmap.gui.jmapviewer.interfaces.TileSource
TileSource.TileUpdate
 
Constructor Summary
protected OsmTileSource.AbstractOsmTileSource()
           
 
Method Summary
 int getMaxZoom()
          Specifies the maximum zoom value.
 int getMinZoom()
          Specifies the minimum zoom value.
 java.lang.String getTileType()
          Specifies the tile image type.
 java.lang.String getTileUrl(int zoom, int tilex, int tiley)
          Constructs the tile url.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openstreetmap.gui.jmapviewer.interfaces.TileSource
getName, getTileUpdate
 

Constructor Detail

OsmTileSource.AbstractOsmTileSource

protected OsmTileSource.AbstractOsmTileSource()
Method Detail

getMaxZoom

public int getMaxZoom()
Description copied from interface: TileSource
Specifies the maximum zoom value. The number of zoom levels is [0.. TileSource.getMaxZoom()].

Specified by:
getMaxZoom in interface TileSource
Returns:
maximum zoom value that has to be smaller or equal to JMapViewer.MAX_ZOOM

getMinZoom

public int getMinZoom()
Description copied from interface: TileSource
Specifies the minimum zoom value. This value is usually 0. Only for maps that cover a certain region up to a limited zoom level this method should return a value different than 0.

Specified by:
getMinZoom in interface TileSource
Returns:
minimum zoom value - usually 0

getTileUrl

public java.lang.String getTileUrl(int zoom,
                                   int tilex,
                                   int tiley)
Description copied from interface: TileSource
Constructs the tile url.

Specified by:
getTileUrl in interface TileSource
Returns:
fully qualified url for downloading the specified tile image

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTileType

public java.lang.String getTileType()
Description copied from interface: TileSource
Specifies the tile image type. For tiles rendered by Mapnik or Osmarenderer this is usually "png".

Specified by:
getTileType in interface TileSource
Returns:
file extension of the tile image type