public abstract class TiledProvider
- Object
- MapProvider
- TiledProvider
Known subtypesGoogleMapsProvider, OpenStreetMapProvider
This is a tiled map provider
Fields
protected final String _url | |
protected int _zoomLevel |
Constructors
public TiledProvider(String url, Projection projection, Dimension tileSize) | Creates a new Tiled provider |
Methods
protected String url(int zoomLevel, int xTile, int yTile) | build a url request for a tile |
public Coord scale(int zoomLevel) | Scale to the zoom level |
public BoundingBox bboxFor(Coord position, int zoomLevel) | Returns the bounding box of a position ina given zoom level |
public Tile tileFor(BoundingBox bbox) | Gets a tile for the given bounding box |
Inherited methods
Field details
_url
protected final String _url_zoomLevel
protected int _zoomLevelConstructor details
TiledProvider
public TiledProvider(String url, Projection projection, Dimension tileSize)Creates a new Tiled provider
Parameters
urlString- the url of the provider
projectionProjection- the Projection system of the Provider
tileSizeDimension- the tiles size(usually 256x256)
Method details
url
protected String url(int zoomLevel, int xTile, int yTile)build a url request for a tile
Parameters
zoomLevelint- the zoom level
xTileint- x position of the tile
yTileint- y position of the tile
Returns
the image url of the tile
scale
public Coord scale(int zoomLevel)Scale to the zoom level
Parameters
zoomLevelint- to scale to
Returns
a scaled coordinate.
bboxFor
public BoundingBox bboxFor(Coord position, int zoomLevel)Returns the bounding box of a position ina given zoom level
Parameters
positionCoord- on the map
zoomLevelint- the zoom level
Returns
a bounding box
tileFor
public Tile tileFor(BoundingBox bbox)Gets a tile for the given bounding box
Parameters
bboxBoundingBox- a bounding box
Returns
a Tile for the given bounding box