An object with methods for projecting geographical coordinates of the world onto a flat surface (and back). See Map projection.
|Projects geographical coordinates into a 2D point.
|The inverse of
project. Projects a 2D point into geographical location.
Leaflet comes with a set of already defined projections out of the box:
|Spherical Mercator projection — the most common projection for online maps, used by almost all free and commercial tile providers. Assumes that Earth is a sphere. Used by the
|Elliptical Mercator projection — more complex than Spherical Mercator. Takes into account that Earth is a geoid, not a perfect sphere. Used by the
|Equirectangular, or Plate Carree projection — the most simple projection, mostly used by GIS enthusiasts. Directly maps
x as longitude, and
y as latitude. Also suitable for flat worlds, e.g. game maps. Used by the