# Class Mercator

java.lang.Object
com.codename1.maps.Projection
com.codename1.maps.Mercator

public class Mercator extends Projection
Represents a Mercator projection http://en.wikipedia.org/wiki/Mercator_projection

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Mercator()`
  Creates a new Mercator projection

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Coord`
  `forwardMercator(double latitude, double longitude)`
  Create a projected Mercator Coord from the given coordinate
  `Coord`
  `fromWGS84(Coord wgs84)`
  Create a projected Mercator Coord from the given coordinate
  `static Coord`
  `inverseMercator(double latitude, double longitude)`
  Create a unprojected Coord(Latitude, Longitude) from the projected Coord
  `Coord`
  `toWGS84(Coord projection)`
  Create a Coord(Latitude, Longitude) from the projected Coord

  ### Methods inherited from class Projection

  `extent, fromWGS84, fromWGS84, toWGS84`

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

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

- ## Constructor Details

  - ### Mercator

    public Mercator()
    Creates a new Mercator projection

- ## Method Details

  - ### forwardMercator

    public static Coord forwardMercator(double latitude, double longitude)

    Create a projected Mercator Coord from the given coordinate

    ###### Parameters

    - `latitude`: to project

    - `longitude`: to project

    ###### Returns

    a projected Mercator

  - ### inverseMercator

    public static Coord inverseMercator(double latitude, double longitude)

    Create a unprojected Coord(Latitude, Longitude) from the projected Coord

    ###### Parameters

    - `latitude`: projected latitude

    - `longitude`: projected longitude

    ###### Returns

    unprojected Coord

  - ### fromWGS84

    public Coord fromWGS84(Coord wgs84)

    Create a projected Mercator Coord from the given coordinate

    ###### Parameters

    - `wgs84`: coordinate to project

    ###### Returns

    projected Mercator Coord

    Specified by:
      `fromWGS84` in class `Projection`

  - ### toWGS84

    public Coord toWGS84(Coord projection)

    Create a Coord(Latitude, Longitude) from the projected Coord

    ###### Parameters

    - `wgs84`: projected Coord

    ###### Returns

    unprojected Latitude, Longitude

    Specified by:
      `toWGS84` in class `Projection`