# Class OpenStreetMapProvider

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

public class OpenStreetMapProvider extends TiledProvider
This is an OpenStreetMap Provider http://www.openstreetmap.org/

- ## Field Summary

  ### Fields inherited from class TiledProvider

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OpenStreetMapProvider()`
  Empty Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `attribution()`
  The provider attribution.
  `int`
  `maxZoomLevel()`
  Maximal zoom level.

  ### Methods inherited from class TiledProvider

  `bboxFor, scale, tileFor, url`
  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

  `maxZoomFor, minZoomLevel, projection, tileSize, tileSize, translate`
  Modifier and Type
  Method
  Description
  `int`
  `maxZoomFor(Tile tile)`
  Returns the maximum zoom of a specific Tile.
  `int`
  `minZoomLevel()`
  Minimal zoom level user is able to see.
  `Projection`
  `projection()`
  Gets the Provider projection
  `Dimension`
  `tileSize()`
  Gets the tile size
  `void`
  `tileSize(Dimension size)`
  Request map to provide tiles of specific sizes.
  `Coord`
  `translate(Coord position, int zoomLevel, int pixelsX, int pixelsY)`
  Translates position by [pixelsX, pixelsY] at zoomLevel acordingly to maps scale.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `final Class`
  `getClass()`
  Returns the runtime class of an object.
  `int`
  `hashCode()`
  Returns a hash code value for the object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `String`
  `toString()`
  Returns a string representation of the object.
  `final void`
  `wait()`
  Causes current thread to wait until another thread invokes the method or the method for this object.
  `final void`
  `wait(long timeout)`
  Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
  `final void`
  `wait(long timeout, int nanos)`
  Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

- ## Constructor Details

  - ### OpenStreetMapProvider

    public OpenStreetMapProvider()
    Empty Constructor

- ## Method Details

  - ### attribution

    public String attribution()

    The provider attribution.

    ###### Returns

    a String of the provider attribution

    Specified by:
      `attribution` in class `MapProvider`

  - ### maxZoomLevel

    public int maxZoomLevel()
    Maximal zoom level. Zoom levels are counted from zero to maxZoomLevel(). 0 is farest view, where the scale is greatest.
    Specified by:
      `maxZoomLevel` in class `MapProvider`