# Class TiledProvider

java.lang.Object
com.codename1.maps.providers.MapProvider
com.codename1.maps.providers.TiledProvider

Direct Known Subclasses:
  `GoogleMapsProvider, OpenStreetMapProvider`

public abstract class TiledProvider extends MapProvider
This is a tiled map provider

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final String`
  `_url`
  `protected int`
  `_zoomLevel`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TiledProvider(String url, Projection projection, Dimension tileSize)`
  Creates a new Tiled provider

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BoundingBox`
  `bboxFor(Coord position, int zoomLevel)`
  Returns the bounding box of a position ina given zoom level
  `Coord`
  `scale(int zoomLevel)`
  Scale to the zoom level
  `Tile`
  `tileFor(BoundingBox bbox)`
  Gets a tile for the given bounding box
  `protected String`
  `url(int zoomLevel, int xTile, int yTile)`
  build a url request for a tile

  ### Methods inherited from class MapProvider

  `attribution, maxZoomFor, maxZoomLevel, minZoomLevel, projection, tileSize, tileSize, translate`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### _url

    protected final String _url

  - ### _zoomLevel

    protected int _zoomLevel

- ## Constructor Details

  - ### TiledProvider

    public TiledProvider(String url, Projection projection, Dimension tileSize)

    Creates a new Tiled provider

    ###### Parameters

    - `url`: the url of the provider

    - `projection`: the Projection system of the Provider

    - `tileSize`: 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

    - `zoomLevel`: the zoom level

    - `xTile`: x position of the tile

    - `yTile`: y position of the tile

    ###### Returns

    the image url of the tile

  - ### scale

    public Coord scale(int zoomLevel)

    Scale to the zoom level

    ###### Parameters

    - `zoomLevel`: to scale to

    ###### Returns

    a scaled coordinate.

    Specified by:
      `scale` in class `MapProvider`

  - ### bboxFor

    public BoundingBox bboxFor(Coord position, int zoomLevel)

    Returns the bounding box of a position ina given zoom level

    ###### Parameters

    - `position`: on the map

    - `zoomLevel`: the zoom level

    ###### Returns

    a bounding box

    Specified by:
      `bboxFor` in class `MapProvider`

  - ### tileFor

    public Tile tileFor(BoundingBox bbox)

    Gets a tile for the given bounding box

    ###### Parameters

    - `bbox`: a bounding box

    ###### Returns

    a Tile for the given bounding box

    Specified by:
      `tileFor` in class `MapProvider`