org.openstreetmap.gui.jmapviewer
Class JTileDownloaderTileSourceWrapper

java.lang.Object
  extended by org.openstreetmap.gui.jmapviewer.JTileDownloaderTileSourceWrapper
All Implemented Interfaces:
TileSource

public class JTileDownloaderTileSourceWrapper
extends java.lang.Object
implements TileSource


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openstreetmap.gui.jmapviewer.interfaces.TileSource
TileSource.TileUpdate
 
Field Summary
private  TileProviderIf tileProvider
           
 
Constructor Summary
JTileDownloaderTileSourceWrapper(TileProviderIf tileProvider)
           
 
Method Summary
 int getMaxZoom()
          Specifies the maximum zoom value.
 int getMinZoom()
          Specifies the minimum zoom value.
 java.lang.String getName()
          A tile layer name has to be unique and has to consist only of characters valid for filenames.
 java.lang.String getTileType()
          Specifies the tile image type.
 TileSource.TileUpdate getTileUpdate()
           
 java.lang.String getTileUrl(int zoom, int tilex, int tiley)
          Constructs the tile url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tileProvider

private TileProviderIf tileProvider
Constructor Detail

JTileDownloaderTileSourceWrapper

public JTileDownloaderTileSourceWrapper(TileProviderIf tileProvider)
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
See Also:
{@inheritDoc}

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
See Also:
{@inheritDoc}

getName

public java.lang.String getName()
Description copied from interface: TileSource
A tile layer name has to be unique and has to consist only of characters valid for filenames.

Specified by:
getName in interface TileSource
Returns:
Name of the tile layer
See Also:
{@inheritDoc}

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
See Also:
{@inheritDoc}

getTileUpdate

public TileSource.TileUpdate getTileUpdate()
Specified by:
getTileUpdate in interface TileSource
Returns:
The supported tile update mechanism
See Also:
{@inheritDoc}

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
See Also:
{@inheritDoc}