org.openstreetmap.gui.jmapviewer.interfaces
Interface TileSource

All Known Implementing Classes:
JTileDownloaderTileSourceWrapper, OsmTileSource.AbstractOsmTileSource, OsmTileSource.CycleMap, OsmTileSource.Mapnik, OsmTileSource.TilesAtHome

public interface TileSource

Author:
Jan Peter Stotz

Nested Class Summary
static class TileSource.TileUpdate
          Specifies the different mechanisms for detecting updated tiles respectively only download newer tiles than those stored locally.
 
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.
 

Method Detail

getMaxZoom

int getMaxZoom()
Specifies the maximum zoom value. The number of zoom levels is [0.. getMaxZoom()].

Returns:
maximum zoom value that has to be smaller or equal to JMapViewer.MAX_ZOOM

getMinZoom

int getMinZoom()
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.

Returns:
minimum zoom value - usually 0

getTileUpdate

TileSource.TileUpdate getTileUpdate()
Returns:
The supported tile update mechanism
See Also:
TileSource.TileUpdate

getName

java.lang.String getName()
A tile layer name has to be unique and has to consist only of characters valid for filenames.

Returns:
Name of the tile layer

getTileUrl

java.lang.String getTileUrl(int zoom,
                            int tilex,
                            int tiley)
Constructs the tile url.

Parameters:
zoom -
tilex -
tiley -
Returns:
fully qualified url for downloading the specified tile image

getTileType

java.lang.String getTileType()
Specifies the tile image type. For tiles rendered by Mapnik or Osmarenderer this is usually "png".

Returns:
file extension of the tile image type