So far, we've been talking about the abstract idea of a projection. Let's dive into OpenLayer's ol.proj
namespace functions and the associated class ol.proj.Projection
class, which is what we use to actually handle projections. The ol.proj.Projection
class relies on internal code, managing the most used projection in the web mapping world: the EPSG:4326 projection (also named WGS 84) and the EPSG:3857 projection, also known as EPSG:900913 (using leetspeak, it means Google, the first company relying on this exact projection), and also, alternatively named WGS 84 Spherical Mercator. For reference, you can have the full history of the second projection at http://wiki.openstreetmap.org/wiki/EPSG:3857
For other use case such as custom projections, OpenLayers, for convenience, supports an external library called Proj4js, which can be found at http://proj4js.org. First, we'll talk about what we can do without the Proj4js library, and then talk about what we can do with...